Saturday, April 12, 2008

Using -Rf Option in Linux Shell

Linux shells can be powerful, but it can also be deadly, if you are using it without caution. The second one just applied to me. I usually deletes files using * wildcard to make things easier, since i don't want to delete one by one. Sometimes, i used -f parameter to delete without haste, but today, i got a bad experience using -f.

At first, i wanted to delete a movie file that i have downloaded using rm -f blabla.part*, but i accidentally wrote it like this rm -f blabla.part1.rar *. You know what happened. All of my data in that directory is gone crying

The lucky thing is that i didn't use -Rf option. If that's the case, i'll be surely screaming loudly. Most of the data that were gone were movies (no big deal, since i can re-download them again) and also some pictures (well, i can make those avatars again in short time), so nothing important data is lost. Thank God praying

Small tips : Make sure the syntax you are writing is correct, mostly when you use -Rf option in Linux shell.


  1. Anonymous9:29 PM

    pasti karena pengen buru2 sehingga mencet tombol tab tuk auto completion. Namun apa daya ternyata hanya satu file yang match sehingga simbol bintang diletakkan setelah spasi.

    ~pengalaman T__T

  2. Yup betul banget
    aku juga kaget waktu lihat pesan setelah itu