Re: Unremovable files.



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
.



Relevant Pages

  • Re: find - exec vs xargs
    ... If I use exec grep it takes way longer ... to complete than xargs grep. ... It is likely that the time of this command is dominated by the ... outputs a list of file names separated by NL characters while NL ...
    (comp.unix.shell)
  • Re: Performance problem on import
    ... I am attempting to do a mass import of data to this database using a C++ program and the ... mutiple insert commands on both child tables ... until I get to about 50 or so entries in the master table. ... I see delays of 2 or 3 seconds on every insert command. ...
    (microsoft.public.access.externaldata)
  • Re: clients losing server connection
    ... We can use the nbtstat.exe command to remove or correct preloaded entries. ... Check if the server name - Ip are appeared in pair. ... Newsgroups: microsoft.public.win2000.networking ...
    (microsoft.public.win2000.networking)
  • Re: tagging unique items in a list
    ... Copy the whole column of these entries into Column A of a new sheet ... within that subgroup that entry is unique. ... either the last character or starts 8 to 9 characters from the right. ... entries 3 & 4 are duplicates we move past those characters and look at the ...
    (microsoft.public.excel.worksheet.functions)
  • Re: tagging unique items in a list
    ... Copy the whole column of these entries into Column A of a new sheet ... within that subgroup that entry is unique. ... either the last character or starts 8 to 9 characters from the right. ... entries 3 & 4 are duplicates we move past those characters and look at the ...
    (microsoft.public.excel.worksheet.functions)