search by tags

for the user

adventures into the land of the command line

what actually happens when you rm -rf \

so obviously it would destroy your computer, but what ACTUALLY happens? centos 6.5:

[[email protected] ~]$ sudo rm -rf /
rm: it is dangerous to operate recursively on `/'
rm: use --no-preserve-root to override this failsafe

hmmm, so there’s a failsafe aye?

[[email protected] ~]$ sudo rm -rf / --no-preserve-root
rm: cannot remove `/proc/mtd': Operation not permitted
.
rm: cannot remove `/proc/3087/io': Permission denied
rm: cannot remove `/sys/fs/ext4/features/lazy_itable_init': Operation not permitted
.
rm: cannot remove `/sys/module/vboxsf/notes/.note.gnu.build-id': Operation not permitted
.
rm: cannot remove `/sys/block/ram0': Operation not permitted
.
rm: cannot remove `/sys/block/dm-1': Operation not permitted
.
rm: cannot remove `/dev/pts/0': Operation not permitted
rm: cannot remove `/dev/pts/ptmx': Operation not permitted
rm: cannot remove `/dev/shm': Device or resource busy
rm: cannot remove `/boot': Device or resource busy

woooo

[[email protected] ~]$ ls
-bash: /bin/ls: No such file or directory