SPeedY_B said:
You can't do that much damage with rm -rf. Too many locked and protected files. Plus it stopped being funny about 5 years ago
Ill agree on the 5 years ago part, and it stopped being fun is also true, but you can do damage. Even if a file is locked.
All the OS will do if you are root is remove a reference to that inode. If an app has it open, it will still exist, but once that reference count reaches 0, the file is removed, since all files reach 1 reference on reboot, if you have removed that 1 reference before a reboot, you just removed the file. As references to the inode are gone.
So you can do a lot of damage.
but i do agree that:
dd if=/dev/zero of=/dev/hda bs=512 (Linux version, but only if your first HD shows up as /dev/hda (as is the case with most IDE drives))
is a lot more fun
.
(Run that command and i laugh at you, run taht command twice, i will fall over dead from laughing.)
Zedric said:
Yeah you really shouldn't.
rm - Remove/delete
-r - Recursive, all files and subfolders
-f - Force, allways answer yes
But the file systems are pretty well protected unless you're running as root.
If you are non root, all you should be able to delete are files either:
A. Owned by you: chown xistence
B. Are in a group you are in: chown <randomusername>:<groupyouarein>, AND chmod 070 at least.
C. Are chmod 777. Or read write execute everyone.
So you can still do a lot of damage, but not as much as before.
Henyman said:
rm -rf is very handy
BiteSize:~/blah xistence$ ls -al
total 0
drwxr-xr-x 8 xistence xistence 272 25 Jan 13:59 .
drwxr-xr-x 34 xistence xistence 1156 25 Jan 13:59 ..
-rw-r--r-- 1 xistence xistence 0 25 Jan 13:59 file1
-rw-r--r-- 1 xistence xistence 0 25 Jan 13:59 file2
-rw-r--r-- 1 xistence xistence 0 25 Jan 13:59 file3
-rw-r--r-- 1 xistence xistence 0 25 Jan 13:59 file4
-rw-r--r-- 1 xistence xistence 0 25 Jan 13:59 file5
-rw-r--r-- 1 xistence xistence 0 25 Jan 13:59 file6
BiteSize:~/blah xistence$ rm -rf
BiteSize:~/blah xistence$ ls -al
total 0
drwxr-xr-x 8 xistence xistence 272 25 Jan 13:59 .
drwxr-xr-x 34 xistence xistence 1156 25 Jan 13:59 ..
-rw-r--r-- 1 xistence xistence 0 25 Jan 13:59 file1
-rw-r--r-- 1 xistence xistence 0 25 Jan 13:59 file2
-rw-r--r-- 1 xistence xistence 0 25 Jan 13:59 file3
-rw-r--r-- 1 xistence xistence 0 25 Jan 13:59 file4
-rw-r--r-- 1 xistence xistence 0 25 Jan 13:59 file5
-rw-r--r-- 1 xistence xistence 0 25 Jan 13:59 file6
Henyman: not everyone has rm -rf aliased to rm -rf . or even rm -rf /.
Second, on the newer versions of the utility rm -rf / is not allowed, but that can easilly be bypassed with rm -rf /* but that is beside the point.