[Fwd: Re: deleting directories with ??? in name]
Walter
walterk1 at earthlink.net
Tue Mar 16 07:18:49 PST 2004
Matthew Seaman wrote:
> On Mon, Mar 15, 2004 at 07:07:46PM -0800, Chris Pressey wrote:
>
>
>>That wouldn't explain why 'rm -i *' returned 'no match', though.
>
>
> Just to eliminate the obvious: did these weird filenames begin with a
> '.'? Shell globbing treats file names with a leading period
> specially. You'ld have to do:
>
> % ls -d .*
>
> to get a listing of those files, and:
>
> % rm -ri .[^.]*
>
> to delete them. Note the extra effort taken to avoid matching the
> special names '.' and '..' -- doing a recursive delete of '..' is a
> real foot-shooting exercise.
>
> Cheers,
>
> Matthew
>
I don't remember whether the files had leading dots or not. Sorry.
But I'll keep this method in mind if it happens again. Thanks.
More information about the freebsd-questions
mailing list