[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: Andrii
Subject: [bug #42985] find reports "No such file or directory" when executing rm
Date: Fri, 22 Sep 2017 04:48:12 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

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

Thank you a lot for explanations - I am sure they will be valuable for
everyone who encounters similar error from `find rm`.

It also helped me to create following test case for huge amount of input data,
in which the suggestions don't seem to help.

Warning: the script puts high load on filesystem, so use it only in good test

mkdir -p 42985
set -e
cd 42985
echo creating many folders
for i in {1..10000}; do n=$(echo $i | md5sum); n=${n%% *}; mkdir $n; touch
$n/$n $n/${n}1 $n/${n}2 ; done > /dev/null
if ! find $(pwd) . -mindepth 1 -maxdepth 1 -regex $cpat -prune -o -exec rm
-rfv {} \+ >/dev/null 2>../error.log ; then
        echo "there were errors:"
        head ../error.log
        echo success

The produced output in my environment:

creating many folders
there were errors:
find: ‘./041f49053a1b6be294e4149b75b997b4’: No such file or directory
find: ‘./1b6bbdb9e57e72c47bca951947563fc9’: No such file or 

Please let me know if this looks like valid bug and whether I should create
dedicated report for it.

(I know the workaround will be using unique entries in input folder list or
handing one folder per call, just hopefully find can manage this job anyway).


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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