Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Iv'e done this and had some problems.' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Iv'e done this and had some problems.
Authored by: SOX on Sep 13, '05 11:16:04AM
the trouble with this hint is that it does not quite handle the possible flags on rm gracefully. in particular rm -r. instead you could alias it to a perl script.

perl -wane 'foreach  (@F) { system("mv",$_, "~/.trash") unless  m/^-/ } '
this script just silently removes any command line argument begininng with a "-". It will of course fail for any file whose name really does start with a dash.

[ Reply to This | # ]