Jump to content

#rm -rf /

csmith1991
Go to solution Solved by alpenwasser,

See here:

https://www.youtube.com/watch?v=SIIweirHwek

And as said, running 'rm' on a filename will not actually remove the

data from the disk as long as the file is still opened somewhere.

More about UNIX-like filesystems, inodes and all that here:

http://en.wikipedia.org/wiki/Inode

http://en.wikipedia.org/wiki/Inode_pointer_structure

http://www.slashroot.in/how-does-file-deletion-work-linux

http://www.thegeekstuff.com/2012/01/linux-inodes/

http://www.linux.org/threads/intro-to-inodes.4130/


I've always kinda wondered what rm -rf / would do, assuming you had root file permissions. Would it delete everything in site? Would it delete everything until the instruction set for rm got deleted? Would it simply not work because every single distribution of linux/unix is smart enough to know not to delete itself?

 

What do you think would happen?

 

I guess I could setup a VM and find out for myself, but... I'm not even sure I would know what to make of the aftermath if it stopped half way through.

Current Build Log: Here on LTT and Corsair's Forum

Link to comment
Share on other sites

Link to post
Share on other sites

Most distros wont allow you to rm /. they now require you use --no-preserve-root

 

There is no limit to how far/how much it will delete. Processes can run even after their binaries have been removed. It is completely unpredictable.

Link to comment
Share on other sites

Link to post
Share on other sites

sudo rm -rf / 

 

deletes EVERYTHING in that partition. go try it on a VM its fun ;)

"Unofficially Official" Leading Scientific Research and Development Officer of the Official Star Citizen LTT Conglomerate | Reaper Squad, Idris Captain | 1x Aurora LN


Game developer, AI researcher, Developing the UOLTT mobile apps


G SIX [My Mac Pro G5 CaseMod Thread]

Link to comment
Share on other sites

Link to post
Share on other sites

See here:

https://www.youtube.com/watch?v=SIIweirHwek

And as said, running 'rm' on a filename will not actually remove the

data from the disk as long as the file is still opened somewhere.

More about UNIX-like filesystems, inodes and all that here:

http://en.wikipedia.org/wiki/Inode

http://en.wikipedia.org/wiki/Inode_pointer_structure

http://www.slashroot.in/how-does-file-deletion-work-linux

http://www.thegeekstuff.com/2012/01/linux-inodes/

http://www.linux.org/threads/intro-to-inodes.4130/

BUILD LOGS: HELIOS - Latest Update: 2015-SEP-06 ::: ZEUS - BOTW 2013-JUN-28 ::: APOLLO - Complete: 2014-MAY-10
OTHER STUFF: Cable Lacing Tutorial ::: What Is ZFS? ::: mincss Primer ::: LSI RAID Card Flashing Tutorial
FORUM INFO: Community Standards ::: The Moderating Team ::: 10TB+ Storage Showoff Topic

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×