Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: gurman@uvsp.gsfc.nasa.gov (Joseph B. Gurman)
Subject: Re: Deleting files with odd names
Date: 1995/10/05	[thread overview]
Message-ID: <gurman-0510952225230001@goodgulf.gsfc.nasa.gov> (raw)
In-Reply-To: 44rk7q$bg2@lyra.csx.cam.ac.uk

In article <44rk7q$bg2@lyra.csx.cam.ac.uk>, Dave Hodgson
<dmh@sanger.ac.uk> wrote:

> I have a bunch of files in a directory which were tranferred from a Macintosh.
> 
> Somehow the files whose names contained slashes '/' transferred OK and they
> appear, when using `ls`, as having a name with a slash in, e.g:
> 
> % ls
> name/with/slash/in/it
> % ls -al
> name/with/slash/in/it not found
> total 6
> drwxrwxr-x 14 marvin       4096 Oct  3 15:49 .
> drwxrwsr-x133 marvin      24576 Oct  3 16:13 ..
> 
> The name is obviously incompatible with UNIX that uses a '/' to delimit 
> directory names in a path. 
> 
> But no matter how I try I can't delete that damn things, even when I try
> `rm -rf` on the directory above...

    Dave -

    I guess people just aren't being brainwashed with first-grade Bourne
any more (and probably a good thing).

    If you want to "quote" an escape character (.i.e., one the shell would
rather do something else with), precede it with a knockdown (backslash: \)
character: e.g.

% rm name\/with\/slash\/in\/it

This even works for spaces (another MacPossibility).

    rm -rf doesn't work because (of course, you say, regaining your unix
tunnel vision) it assumes an argument of all _regular_ expressions in the
pwd.

    I could refer you to a great chapter in the Unix Hater's Handbook on
how braindead unix file name parsing is, but what's the point?

    Hope this helps,

                  Joe Gurman

-- 
Joseph B. Gurman / NASA Goddard Space Flight Center/ Solar Data Analysis Center / Code 682 / Greenbelt MD 20771 USA / gurman@uvsp.nascom.nasa.gov
| Federal employees are still prohibited from holding opinions while  at work. Any opinions expressed herein must therefore be someone else's.  |



  reply	other threads:[~1995-10-05  4:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-10-03  4:00 Deleting files with odd names Dave Hodgson
1995-10-05  4:00 ` Joseph B. Gurman [this message]
1995-10-11  4:00   ` Michael Sternberg
1995-10-05  4:00 ` John van der Voort van der Kleij
1995-10-06  4:00 ` Dave Hodgson
1995-10-07  4:00 ` Thomas Leitner
1995-10-11  4:00 ` Daniel S. Riley
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox