More on rm (or, Oops I didn t really mean that)

More on rm (or, "Oops! I didn't really mean that")

When you delete a file with Linux, it is gone. If you didn't really mean to delete (or rm) a file, you quickly find out if you have been keeping good backups. The other option is to check with the rm command before you delete a file. Rather than simply typing rm followed by the filename, try this instead:

rm -i file_name1 file_name2 file_name3 

The -i option tells rm to work in interactive mode. For each of the three files in the example, rm pauses and asks if you really mean it.

rm : remove 'file_name1'? 

If you like to be more wordy than that, you can also try rm --interactive file_name, but that goes against the system administrator's first principle.

System Administrator's First Principle

Simplifying things. If your solution makes things more complicated, something has gone terribly wrong.

Of course, in following the system administrator's first principle, you could remove all the files starting with the word file by using the asterisk:

rm -i file* 

Moving to Ubuntu Linux
Moving to Ubuntu Linux
ISBN: 032142722X
EAN: 2147483647
Year: 2004
Pages: 201

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: