Subject: | |
From: | |
Reply To: | |
Date: | Tue, 20 May 2003 14:51:14 -0400 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
In the Unix Hater's Handbook posted a few weeks ago on this list they say
that rm really hates file names beginning with -. It tends to treat them as
run flags.
They suggest one of the following syntaxes to remove them:
rm - -file
or
rm ./-file
The first syntax is apparently and undocumented feature of rm where a lone
hyphen tells rm to treat all future hyphens as part of the file name. The
second suggestion seems less kludgy.
----- Original Message -----
From: "Paul H. Christidis" <[log in to unmask]>
To: <[log in to unmask]>
Sent: Tuesday, May 20, 2003 2:12 PM
Subject: [HP3000-L] OT: Wildcard characters in UNIX file names
> Folks,
>
> In an attempt to display the 'usage' instructions of a utility in UNIX, I
> invoked it using the '-?' switch. The utility proceeded to run and in the
> process created three files having the '-?' prefix. I've tried different
> incantations of the 'rm' command without any luck. Does anyone have any
> ideas?
>
> Regards
> Paul Christidis
>
> # uname -a
> SunOS lbcns01 5.4 Generic_101945-64 sun4m sparc
> # ls -lsa
> total 848
> 2 -rw-r--r-- 1 root other 55 Apr 28 10:37 -?.cmd
> 2 -rw-r--r-- 1 root other 87 Apr 28 10:37 -?.log
> 0 -rw-r--r-- 1 root other 0 Apr 28 10:37 -?.txt
>
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|
|
|