I'm replying to this older post because I think this is a good point to explain another bit of Unix basics.Grench said:Tor said:.. just don't try the atomicthumbs command and you'll be fine.
I'm still such a noob...
Doesn't that say he's going to concatenate the data stored in RAM to the first partition on the first disk but not to a named file? That doesn't make much sense...?
First comes a bit of a tangent, some info about cat. cat really does concatenate things; the following line would print the contents of 1.txt, 2.txt and 3.txt concatenated:
cat 1.txt 2.txt 3.txt
Now let's take a look at /dev/sda1. In Unix (and Linux is a Unix clone) pretty much everything is a file. Your hard drive? A file. Each partition on that hard drive? A file. Other things that are files are your RAM, your mouse and even abstract things like two different pseudorandom number generators and a bunch of info about your system.
Everything in /dev is a device. You typically don't want to directly mess with the things in here; while the file representing your hard drive is here, the file system is somewhere else. You can, however, open (for example) /dev/sda1¹ in a hex editor and look at the raw partition data as it is stored on your hard drive. You can even write to it and this can be useful in an emergency when you really know what you're doing. I once saved data off a hard drive I couldn't cleanly mount anymore by getting an identical replacement and using an error-resistant bit-precise copying program to directly move data from the old hard disk to the new one.
It's still a phantastically easy way of losing all your data, though, and I wouldn't muck around with /dev/sd?? unless neccessary.
So the command atomicthumbs gave means "take the contents of the RAM and overwrite the beginning of the first partition of the first SATA drive with them". Contrary to what Rathum wrote, this doesn't neccessarily destroy your OS. Just usually. This is simply because while you can run Linux from just about any partition you feel like, most people will have it on sda1.
Oh, and do stay away from fork bombs. Those will just freeze your system but they're still annoying and Linux isn't meant to be cold-rebooted (just like modern Windows). If something looks like a random string of special characters, be suspicious.
¹ the "sda1" means:
sd = SCSI disk, also used for SATA and USB devices
a = first disk of such type; the second one would be sdb, then sdc and so on
1 = first partition
So for a disk with two partitions you'd see the following files:
/dev/sda - the disk itself
/dev/sda1 - the first partition
/dev/sda2 - the second partition
Last edited by a moderator: