How To Use The DD Command in Linux

  Рет қаралды 25,371

SecureRandom

3 жыл бұрын

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 -
kzbin.info/door/ZuWRiLNv1HJHcOWLyJRbWQ
SecureRandom on LBRY / Odysee -
odysee.com/@SecureRandom:1
----------------------------------------------------------------
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

Пікірлер: 21
@greenfinch628
@greenfinch628 2 ай бұрын
Your video really demystified DD for me. Thank you.
@boy23techy65
@boy23techy65 Жыл бұрын
Thank You: dd with gzip is what i was looking for.
@sussusamogus7831
@sussusamogus7831 29 күн бұрын
great video thank you
@eforever27
@eforever27 3 жыл бұрын
that was super nice video about dd Thank you!
@fadiallo1
@fadiallo1 26 күн бұрын
Best
@Nicnackity
@Nicnackity 2 жыл бұрын
excellent
@jim7smith
@jim7smith 2 жыл бұрын
Excellent, you earned a like and a sub
@danielgx83
@danielgx83 7 ай бұрын
thanks
@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 Жыл бұрын
Yes
@arturopresa6552
@arturopresa6552 Жыл бұрын
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 Жыл бұрын
sudo !!
@vanderwilhelm667
@vanderwilhelm667 Жыл бұрын
Im kinda late but use sudo
@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
@yos2413
@yos2413 2 жыл бұрын
thanks
Крутой фокус + секрет! #shorts
00:10
Роман Magic
Рет қаралды 31 МЛН
Un coup venu de l’espace 😂😂😂
00:19
Nicocapone
Рет қаралды 7 МЛН
Последствия выхода Айфона 16
0:23
ТРЕНДИ ШОРТС
Рет қаралды 5 МЛН
The force of electromagnetic eddy currents
0:31
Nikola Toy
Рет қаралды 25 МЛН
iOS 18 в реальной жизни
14:42
HUDAKOV
Рет қаралды 214 М.