MLUG: Re: [MLUG] a file named minus
Re: [MLUG] a file named minus
Email address obfuscation in effect -- please click here to turn it off.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
On Thu, 4 Jan 2007, Mike Miller wrote:

On Thu, 4 Jan 2007, Stephen Montgomery-Smith wrote:

Very clever.  That worked too.  So these both work:

rm -- '-'
rm ./-

Of course, your way is shorter.

And it works with cat as well.


Thanks. That is nice. Nothing else seemed to work with cat because it looks for a '-' argument anywhere on the line.


I should add that it works with mv too:

mv ./- filename

That is probably what you'll want to do most often with such a file. In my case the file contained just stdout or stderr from something like wget or lynx, so deleting it was fine.

So the use of ./- is definitely the trick to remember here. Thanks again, Stephen.

Mike

_______________________________________________
members mailing list
EMAIL:PROTECTED
http://mlug.missouri.edu/mailman/listinfo/members