click below
click below
Normal Size Small Size show me how
cpio, dd, and dump
Extract info
Question | Answer |
---|---|
Create a cpio archive (copy out mode) | cpio -o |
Extract files from a cpio archive (copy in mode) | cpio -i |
Overwrite an existing file | cpio -u |
Extract directories during an extraction | cpio -d |
Display archive contents without extracting files | cpio -t |
Copy files to a new archive (copy-pass mode) | cpio -p |
create a cpio archive of /myfiles (copy-out) | ls ~/myfiles | cpio > myarchive.cpio |
Extract files from myarchive.cpio archive (copy-in) | cpio –iv < myarchive.cpio |
Copy files from ~/copyme to ./newdir (copy-pass) | ls ~/copyme | cpio -pvd ./newdir |
Copy verbosely using cpio | cpio -v |
Back up the Master Boot record (MBR) to the /root directory using dd | dd if=/dev/sda of=/root/file.mbr bs=512 count=1 |
Make a full backup using dump | dump -o |
Make an incremental backup using dump | dump -1 to 9 |
Specify the number of Kilobytes per dump record using dump | dump -b (max block size) |
Specify the target using dump | dump -f (location of target file) |
Specify the compression level in range of 1 to 9 using dump | dump -z (Compression level) |