How To Use The DD Command in Linux

  Рет қаралды 27,576

SecureRandom

SecureRandom

Күн бұрын

The dd command in Linux is a utility for copying and converting files and has many practical uses. In this video we go over a few of the most important ones.
Support the channel:
BTC - 3NzWDDH3n5PsBKqWJyAb7rvsGvJKxcAPFv
ETH - 0xB09212235c648a448F0E7eEB416ce5652362c772
Follow me:
SecureRandom on KZbin -
/ @securerandom5420
SecureRandom on LBRY / Odysee -
odysee.com/@Se...
----------------------------------------------------------------
Commands used in this video
Wipe a drive
dd if=/dev/urandom of=/dev/sdb bs=1M conv=noerror
for n in `seq 7`; do dd if=/dev/urandom of=/dev/sdb bs=1M conv=notrunc,noerror; done
Backing up and restoring an entire disk or a partition
dd if=/dev/sdb of=/dev/sdc bs=1M conv=noerror
Creating a compressed disk image
dd if=/dev/sdb | gzip -c {right angle bracket} /tmp/testdisk.img.gz
dd if=/dev/sdb | gzip -c - | ssh user@local dd of=image.gz
gzip -dc /tmp/testdisk.img.gz | dd of=/dev/sdb
Create a bootable USB Drive
dd if=~/Downloads/linuxmint-20-xfce-64bit.iso of=/dev/sdb bs=1M
File carving
dd if=/dev/shm/test.txt of=/dev/shm/test2.txt skip=5 bs=1
dd if=/dev/shm/test.txt of=/dev/shm/test2.txt skip=5 bs=1 count=8

Пікірлер
@greenfinch628
@greenfinch628 6 ай бұрын
Your video really demystified DD for me. Thank you.
@youssef.0exe
@youssef.0exe 4 ай бұрын
loved the explanation, liked and subscribed
@boy23techy65
@boy23techy65 Жыл бұрын
Thank You: dd with gzip is what i was looking for.
@HutS-e5c
@HutS-e5c 3 ай бұрын
at 3:29 what does "do not truncate the output" mean? Also, I see that you address the drive or the partition through the dev directory. Can you access the drive or the partition through its mounting point instead? At 6:00 Why did you use "-" after gzip -c ? When I create a bootable USB drive using an iso file (I used Ubuntu server iso), I get a read-only USB. I mean, my USB drive is 64GB but I end up with a closed 2GB USB (the 2GB are filled with the new operating system files) with no ability to use the extra space as storage. Is there a way to make a bootable USB and in the same time I still can write on the unused empty space on the USB (like what I get if I use Rufus software on windows)?
@marioandresheviacavieres1923
@marioandresheviacavieres1923 2 ай бұрын
Thank you :)
@sussusamogus7831
@sussusamogus7831 5 ай бұрын
great video thank you
@eforever27
@eforever27 3 жыл бұрын
that was super nice video about dd Thank you!
@fadiallo1
@fadiallo1 5 ай бұрын
Best
@Sam-vf5uc
@Sam-vf5uc 2 жыл бұрын
If I were to do this to the boot drive (say, a SATA HDD to a SATA SSD), assuming I have enough space, would the drive used as the output file also be boot-able in the same machine?
@opalcitrine
@opalcitrine 2 жыл бұрын
Yes
@jim7smith
@jim7smith 2 жыл бұрын
Excellent, you earned a like and a sub
@dkell1597
@dkell1597 Ай бұрын
How do i delete a partioned ssd?
@arturopresa6552
@arturopresa6552 2 жыл бұрын
Why I have this error? dd if=/dev/sdb of=/dev/sdc bs=1M conv=noerror dd: failed to open '/dev/sdc': Permission denied
@powerpc64
@powerpc64 2 жыл бұрын
sudo !!
@vanderwilhelm667
@vanderwilhelm667 2 жыл бұрын
Im kinda late but use sudo
@Nicnackity
@Nicnackity 3 жыл бұрын
excellent
@yos2413
@yos2413 2 жыл бұрын
thanks
@anshumankanungo4181
@anshumankanungo4181 3 жыл бұрын
I have got queries to ask on these 2 command operations, 1. IN, dd if=/dev/sdb | gzip -c - | ssh user@local dd of=image.gz Q1>THE COMPRESSED BACKUP FILE IS CREATED WHERE?ON CLIENT OR SERVER? 2.IN , gzip -dc /tmp/testdisk.img.gz | dd of=/dev/sdb Q2>THE img.dz FILE WILL BE DECOMPRESSED AND ALL THE FILES IN THEIR ORIGINAL STATE WILL BE CREATED IN /dev/sdb or THE SAME COMPRESSED FILES WILL BE CREATED IN /dev/sdb?????
@securerandom5420
@securerandom5420 3 жыл бұрын
Anshuman, 1. The file is being compressed on the client where you execute the command and then being sent to the remote server where it is being written to the image.gz file. 2. The file is being decompressed and piped into the DD command as its input, it's then being written directly onto the /dev/sdb device. Once this is complete all the files will be decompressed and in their original state on the /dev/sdb device. Let me know if this answers your question
@anshumankanungo4181
@anshumankanungo4181 3 жыл бұрын
@@securerandom5420 Thanks for explaining. But still have a query i.e. what will be the location of image.gz file in this command : dd if=/dev/sdb | gzip -c - | ssh user@local dd of=image.gz or i mean to ask where is this file located? On the remote server or my client(my linux pc)?
@securerandom5420
@securerandom5420 3 жыл бұрын
@@anshumankanungo4181 It will be located on the remote server. Specifically, it will be located at /home/user/image.gz.
@anshumankanungo4181
@anshumankanungo4181 3 жыл бұрын
@@securerandom5420 Thank you for explaining and clearing my doubt😀
@H-RutherfordHill
@H-RutherfordHill 2 жыл бұрын
"sue-due"
@vittiw3737
@vittiw3737 3 жыл бұрын
V
@danielgx83
@danielgx83 11 ай бұрын
thanks
Managing Kernel Parameters with Sysctl
11:09
SecureRandom
Рет қаралды 5 М.
How to clone drives using DD and GParted
14:09
ElectronicsWizardry
Рет қаралды 67 М.
Сестра обхитрила!
00:17
Victoria Portfolio
Рет қаралды 958 М.
Une nouvelle voiture pour Noël 🥹
00:28
Nicocapone
Рет қаралды 9 МЛН
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 45 МЛН
LCL 30 - sed - Linux Command Line tutorial for forensics
23:02
BlueMonkey 4n6
Рет қаралды 14 М.
How to Back Up/Image your SD Card on Linux
23:40
Learn Linux TV
Рет қаралды 30 М.
Using Linux DD
30:48
Gary Cantrell
Рет қаралды 12 М.
DD tutorial - how to clone, backup and restore disks and partitions
20:03
Abstract programmer
Рет қаралды 28 М.
Demystifying "find" and "find -exec" ...Lil' Linux Lesson!
8:12
Veronica Explains
Рет қаралды 65 М.
Структура файлов и каталогов в Linux
20:28
Aleksey Samoilov
Рет қаралды 442 М.
How A Steam Bug Deleted Someone’s Entire PC
11:49
Kevin Fang
Рет қаралды 1 МЛН
The Linux Filesystem Explained | How Each Directory is Used
14:08
Akamai Developer
Рет қаралды 240 М.
Сестра обхитрила!
00:17
Victoria Portfolio
Рет қаралды 958 М.