Wednesday, April 25, 2012

How do I remove filenames with dashes?

This does not work....
ITASC $ rm '-z'
rm: illegal option -- z
usage: rm [-f | -i] [-dPRrvW] file ...
       unlink file
Simple: use the /- to depict dashes:
./CustomFunctions/.classpath
./-z
tibco@pghdbeengl01:~/build
$ rm ./-*

No comments:

Post a Comment