home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / shell / 3833 < prev    next >
Encoding:
Internet Message Format  |  1992-09-08  |  1.3 KB

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