Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Mar 2004 19:36:48 -0800
From:      Bill Campbell <freebsd@celestial.com>
To:        Questions <freebsd-questions@FreeBSD.org>, freebsd-questions-local@be-well.ilk.org
Subject:   Re: [Fwd: Re: deleting directories with ??? in name]
Message-ID:  <20040316033648.GA53149@alexis.mi.celestial.com>
In-Reply-To: <20040315190746.799e4b0d.cpressey@catseye.mine.nu>
References:  <40564E2C.7060706@earthlink.net> <44smg9oa4r.fsf@be-well.ilk.org> <20040315190746.799e4b0d.cpressey@catseye.mine.nu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Mar 15, 2004, Chris Pressey wrote:
>On 15 Mar 2004 20:26:12 -0500
>Lowell Gilbert <freebsd-questions-local@be-well.ilk.org> wrote:
>
...
>
>That wouldn't explain why 'rm -i *' returned 'no match', though.
>
>I think it's more likely that (for whatever reason) the FTP server is
>allowing files to be created with extremely funky filenames - possibly
>embedded NULs?  I wouldn't have thought this was possible with open(2)
>or fopen(3) - and I wouldn't think that an FTP server would use some
>other method of creating a file...

I've never seen embedded NULs, but I've seen a pretty wide variety of other
garbage in our anonymous ftp site's /incoming directory.  We allow uploads
with automatic e-mail notification when any new file is uploaded, but the
ownership and permissions are set so that nobody can download without
manual intervention by somebody here.

My normal way of nuking these directories is a one-liner typed from the
command line using gnu-find where $somefile is some file or directory in in
the incoming directory that's older than the ones I want to nuke:

gfind . -newer $somefile -maxdepth 1 -mindepth 1 -print0 | xargs -0 rm -rv

Bill
--
INTERNET:   bill@Celestial.COM  Bill Campbell; Celestial Software LLC
UUCP:               camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:            (206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

``It's time to feed the hogs''
                -- Unintended Consequences



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040316033648.GA53149>