University Crest

[wlug] Removing /-rf

wlug archive index About the wlug list Mailing lists home
To The University of Waikato HomepageWaikato Home > Waikato Mailing Lists > wlug Info > wlug archives
Perry Lorier perry@c...
Sat Apr 9 13:22:16 NZST 2005

Bnonn wrote:
>>>	root@s...:/ # rm "-rf"
>>Give it a go.  Find out... I dare you.  Well actually it wont work
>>because you've not specified a dir/file to delete.  It just returns
>>without doing any work.  Even though you quoted the -rf it is
>>interpreted by rm as an option not a filename.
> Stink. I wasn't game enough to give it a go. What's the point of
> demarcating things if the command doesn't recognize the demarcation
> though...?

"" is used to seperate arguments, not to prevent them from being
interpreted.  Applications get given a list of arguments eg:

./foo bar baz narf
gets given ["./foo","bar","baz","narf"]

./foo "bar baz" narf
gets given ["./foo","bar baz","narf"]

./foo "/et*" foo bar
gets given ["./foo","et*","foo","bar"]

./foo /et* foo bar
gets given ["./foo","/etc","foo","bar"]

More information about the wlug mailing list
NOTICE: This is an archive of a public mailing list. The University of Waikato is not responsible for its contents.

The University of Waikato - Te Whare Wananga o Waikato