[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: rm difficult filename



On Wed, Sep 08, 2004 at 04:21:12PM +0800, John Summerfield wrote:
> Often, too, you can use the TAB key to advance over problematic 
> characters, a "?" to represent one of them and "*" to represent any 
> number of them. So
> 
> rm ?rtsp-stream-over-tcp
> rm *over-tcp

Hmm... I don't think this works since the shell will expand to
"rm -rtsp-stream-over-tcp".  rm will still see the file name as an
option.

jrennie@desk:~$ cat > -foo
foo
jrennie@desk:~$ rm -foo
rm: invalid option -- o
Try `rm --help' for more information.
jrennie@desk:~$ rm ?foo
rm: invalid option -- o
Try `rm --help' for more information.
jrennie@desk:~$ rm *foo
rm: invalid option -- o
Try `rm --help' for more information.
jrennie@desk:~$ rm -- -foo
rm: remove regular file `-foo'? y
jrennie@desk:~$ 

Jason



Reply to: