home *** CD-ROM | disk | FTP | other *** search
- From: kevinl@tisdec.tis.tandy.com
- Date: 20 Aug 92 07:35 CDT
- Newsgroups: comp.unix.shell
- Subject: Re: How can I rm a file with a '&' ????
- Message-ID: <28300002@tisdec.tis.tandy.com>
- Path: sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!eff!news.oc.com!utacfd.uta.edu!rwsys!trsvax!trsvax!tisdec.tis.tandy.com!kevinl
- Nf-ID: #R:<S025H1G@obh.in-berlin.de>:-26:tisdec.tis.tandy.com:28300002:000:518
- Nf-From: tisdec.tis.tandy.com!kevinl Aug 20 07:35:00 1992
- References: <S025H1G@obh.in-berlin.de>
- Lines: 15
-
-
- You can try 'rm -i *', or you can try using a hex editor on your
- directory and changing the files name slightly, like replacing the '&'
- with an 'A', and then removing the file.
- You could also try piping a directory listing through awk like
- this:
-
- ls -l | awk '{if(index($8, "&")) system("rm " $8)}'
-
- where $8 is the eighth column in you're long listing of the directory.
- If the file name appears in another column, adjust the number accordingly.
- The first column is $1 ($0 is the whole line).
-
- Hope this helps! 8-)
-
-