[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Bonehead Move



I'll add my $.02 to the "I don't have any suggestions to you for
recovering your data, but here's what I do to prevent me from shooting
myself in the foot" discussion....

I use the fact that, in bash, "!$" means "whatever was the last
argument on the previous command.  So, if I want to get rid of a bunch
of files, I typically do:

$ ls *~
<list of a bunch of files pops out here>
$ rm !$

Incidentally, this also prevents the mistake of accidentally putting a
space between the "*" and the "~" :-)

In your case, where you wanted to get rid of ./mydir, I would have done:
$ ls -d ./mydir
$ rm -rf !$

--wpd


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]