linuxmaillists@charter.net wrote:
On Tuesday 13 February 2007, Frank Cox wrote:
On Tue, 13 Feb 2007 19:25:41 -0500
Tod tod@stthomasepc.org wrote:
Thus I ended up doing rm -fr ./ mydir. Goodbye home dir.
Create a file named -i in your home directory to prevent this from happening in the future.
How does this prevent that happening?
Because rm takes the -i file as an option.
-i, --interactive prompt before any removal
For example:
mkdir ~/TEST cd ~/TEST touch -- -i touch test touch test2 touch test3 rm -fr *
And see what happens. :-)