[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #42985] find reports "No such file or directory" when executing rm

From: James Youngman
Subject: [bug #42985] find reports "No such file or directory" when executing rm
Date: Tue, 14 Nov 2017 17:53:45 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.75 Safari/537.36

Follow-up Comment #9, bug #42985 (project findutils):

> find $(pwd) . -mindepth 1 -maxdepth 1 -regex $cpat -prune -o -exec rm -rfv
{} \+ >/dev/null 2>../error.log

The documentation explains why you should not do that.

9.3 Cleaning Up

This section gives examples of removing unwanted files in various
situations.  Here is a command to remove the CVS backup files created when an
update requires a merge:

     find . -name '.#*' -print0 | xargs -0r rm -f

   If your 'find' command removes directories, you may find that you get a
spurious error message when 'find' tries to recurse into a directory that has
now been removed.  Using the '-depth' option will normally resolve this


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]