bug-fileutils
[Top][All Lists]
Advanced

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

rm and files beginning with a dash


From: Chuck Simmons
Subject: rm and files beginning with a dash
Date: Fri, 23 Apr 2004 12:51:36 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

I could not remove a file whose name began with a dash (e.g. "-main-file.tmp"). (Hmmm I suppose I could have tried "rm ./-main-file.tmp".) [Actually, I removed the file, but I used a Solaris tool to do the job instead of a GNU tool because the Solaris tool seemed easier to use.]

Solaris allows "rm - -main-file.tmp".

The Usage information for 'rm' quoted below suggests that "touch blah ; rm blah -main-file.tmp" might work (since it suggests that options and files can't be interspersed), but, of course, options and filenames can be interspersed.

"
ade:[csimmons_main] dlsun620 csimmons 231> rm --help
Usage: rm [OPTION]... FILE...
Remove (unlink) the FILE(s).

-d, --directory unlink directory, even if non-empty (super-user only)
 -f, --force           ignore nonexistent files, never prompt
 -i, --interactive     prompt before any removal
 -r, -R, --recursive   remove the contents of directories recursively
 -v, --verbose         explain what is being done
     --help            display this help and exit
     --version         output version information and exit

Report bugs to <address@hidden>.
"

Cs





reply via email to

[Prev in Thread] Current Thread [Next in Thread]