Re: Bonehead Move

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

 



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


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux