[PLUG] That's It! Nautilus is HISTORY!
Sandy Herring
sandy at herring.org
Thu Sep 8 18:25:03 UTC 2005
On Tue, 06 Sep 2005, Jason wrote:
[...]
> I've had to rebuild my /home folder a couple of times because I wanted
> to remove a lot of .doc files. So I did 'rm * .doc' instead of 'rm
> *.doc'. Doh!
BTDT :-\ Now I protect dirs I care about by creating a `-i' file so
that wildcard expansion by rm sees it as an option. To wit...
[sandy at pickled ~]$ mkdir rmtest
[sandy at pickled ~]$ cd rmtest
[sandy at pickled rmtest]$ touch this that .the .other thing
[sandy at pickled rmtest]$ touch -- -i
[sandy at pickled rmtest]$ ls -a
. .. -i .other that .the thing this
[sandy at pickled rmtest]$ rm -rf t *
rm: cannot lstat `t': No such file or directory
rm: remove regular empty file `that'? n
rm: remove regular empty file `thing'? n
rm: remove regular empty file `this'? n
Of course, that still won't protect dot files...
[sandy at pickled rmtest]$ rm -rf .t*
[sandy at pickled rmtest]$ ls -a
. .. -i .other that thing this
Sandy
--
Sandy Herring, RHCE o sandy at herring.org
Peck of Pickled Pisces __ o http://herring.org/
*nix || Web authoring questions? |\/ o\ o http://herring.org/finger.html
->http://herring.org/techie.html |/\__/ http://herring.org/pub-key.asc
More information about the PLUG
mailing list