Posts Tagged ‘REMOVE A FILE STARTING WITH A Dash “-“’

REMOVE A FILE STARTING WITH A Dash “-“

September 26th, 2021, posted in Solaris
Share

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

Share