Re: Unremovable files.
- From: Bill Campbell <bill@xxxxxxxxxxxxx>
- Date: Wed, 11 Oct 2006 15:51:28 -0700
On Wed, Oct 11, 2006, Jean-Pierre Radley wrote:
OSR 5.0.6/506a
There is a directory for which 'ls -l' prints scores of entries that all
look like this:
l: ./8_7732.trc not found: No such file or directory (error 2)
In all likelihood these files contain whitespace or some other
characters that the shell is expanding to prevent the rm command
from seeing.
One solution to this might be:
cd path_do_directory
find . -type f -print0 | xargs -0 rm
The ``-print0'' argument to find has it separate entries with NUL
characters, and the ``-0'' argument to xargs tells it to expect
NUL terminated arguments.
BTW: This is the expected behavior with gnu-ish versions of find
and xargs. The vanilla find command on 5.0.6? doesn't seem to
grok that.
Bill
--
INTERNET: bill@xxxxxxxxxxxxx Bill Campbell; Celestial Systems, Inc.
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/
The only logical reason to take guns away from responsible people is to
give irresponsible people an edge in the perpetration of their crimes
against us. -- The Idaho Observer, Vol. 1, No. 2 February 1997
.
- References:
- Unremovable files.
- From: Jean-Pierre Radley
- Unremovable files.
- Prev by Date: Re: Unremovable files.
- Next by Date: Re: Unremovable files.
- Previous by thread: Re: Unremovable files.
- Next by thread: Re: Unremovable files.
- Index(es):
Relevant Pages
|
|