[Ilugc] rm command

  • From: anandsaha@xxxxxxxxx (Anand Saha)
  • Date: Wed Apr 25 08:57:52 2007

On 4/25/07, K.Balavignesh <kbalavignesh@xxxxxxxxx> wrote:

Noooooooo ... Think twice before do this.

Some months before , I had lots of .php files and also some temp files which
was ended with php~ (tild) sign .
So i want to delete the temp files . I thought to give the following command

#rm -fr *~

This thread has become the 'horror stories' thread :)

If i need to use * or any expression for rm, i usually would type the command
with command name as 'm' or something, read it carefully, and then replace
m with rm, and press return - specially on a server. it sort of guards against
accidental return key press.

m: command not found.

well, i _try_ to follow that, not that i follow it every time.

I had my share of frustration as well. In one case my file was a text file,
and i had to use 'dd', read chunks, search through using grep .... it was very
painful,  but worth it because the document was very important. could
automate it to some extent, because i knew exact phrases from the doc.

--

Other related posts: