home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbnewsc!cbfsb!att-out!rutgers!cmcl2!panix!cwahl
- From: cwahl@panix.com (Charles Wahl)
- Newsgroups: comp.unix.shell
- Subject: Re: How can I rm a file with a '&' ????
- Message-ID: <1992Sep6.044026.14156@panix.com>
- Date: 6 Sep 92 04:40:26 GMT
- References: <S025H1G@obh.in-berlin.de> <28300002@tisdec.tis.tandy.com> <1992Aug24.081355.6563@physiol.su.OZ.AU> <22856@sybase.sybase.com>
- Organization: PANIX Public Access Unix, NYC
- Lines: 15
-
- In <22856@sybase.sybase.com> hsc@sybase.com (Howard Cohen) writes:
-
- >Ok, some facts. It can be hard to remove files that contain certain
- >characters, becuase of side-effects of their special meanings. For example,
- >try to remove a file that begins with a dash (-). Surprise! Not so easy.
-
- Actually, it is very easy: just specify the filename as part of a path
- which hides the hyphen from ls(1), which tries to interpret the argument
- as an optio;, e.g. 'rm ./-deleteme'. Those who have problems
- with this sort of thing are encouraged to revisit the man pages for
- whichever shell one uses, and become more familiar with the way that the
- input line is parsed. I believe that there is a pretty good discussion
- of manipulating files with funny names is one of the comp.unix FAQs.
-
- Charles Wahl <cwahl@panix.com>
-