View Single Post
  #9   (View Single Post)  
Old 12th May 2008
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Tcpdump Spy
 
Join Date: Apr 2008
Location: Netherlands
Posts: 2,243
Default

No, it's not true, I was lying earlier. (<-- joke)

An "ISO file" or "disk image" is just a filesystem inside a file, cat and dd will both just make a "raw copy" of anything, here are some example uses (Not very useful, just proof of concept):

Make a floppy image and write put it to another floppy
# cat /dev/fd0 > floppy.img
# cat floppy.img > /dev/fd1

Copy a partition:
# cat /dev/ad0s1a > /dev/ad1s1a

Copy CDROM to disk and mount it
# cat /dev/acd0 > /dev/ad0s1d
# mount_cd9660 /dev/ad0s1d /mnt/cdrom

"Secure" erase a disk
# cat /dev/random > /dev/ad0

Make a backup
# cat /dev/ad0 | gz > backup.img.gz
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote