$ ls |grep -i file
–file1
$ rm –file1
rm: illegal option — file1
usage: rm [-fiRr] file …
$ rm “–file1”
rm: illegal option — file1
usage: rm [-fiRr] file …
Solution:
$ rm ./–file1
$ ls|grep -i file
Comments
Tags: REMOVE A FILE STARTING WITH A Dash “-“, Solairs, solaris command, SPARC SERVER, SPARC TSERIES SERVER, SUN server