[Discuss] Strange rm behavior

Jerry Feldman gaf at blu.org
Wed Sep 21 13:03:45 EDT 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I have a directory that is mounted from a NAS server
/mnts/workspaces/foobar/project

In my script, the code is:
RM=/bin/rm
cd /mnts/workspaces/foobar
count=3
while [ -d project ] && [count -gt 0];do
    sleep 5  # there may be a process using a file. Wait for it to
cleanup and exit
    $RM -rf project
    let count=$count-1
done

rm returns 0. buf fails to remove a couple of subdirectories.
However all other subdirectories are successfully removed.
if I execute the command '/bin/rm -rf project ' by hand it works fine.

Also, I'm sure that no other process that affects this process is
running in my test case.

- -- 
Jerry Feldman <gaf at blu.org>
Boston Linux and Unix
PGP key id:3BC1EB90
PGP Key fingerprint: 49E2 C52A FC5A A31F 8D66  C0AF 7CEA 30FC 3BC1 EB90
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEVAwUBTnoY8HzqMPw7weuQAQJkxwf/QwrGaR5WCxaqEeROdgtLxuhaa32AfER/
idYTq6YUnuNFZkNMfl5p1ZyESbuy3vB+19aTWxsos9D89hirrNDFcQ1PcCCCIxYC
R2ifX5GM4rwVP8MywjagZ3MspuwSa5DGP/mx1NFRIfIT3S2W+zQh3v1y6wHWGnPt
ndlOMw+gW9Ba7fYv3tgeqrj9GkV4W+iwofM2va5L9S/2QECtfrBufMqef0p+TUkN
FFMBGCMK6Gn5xsFRU6ysoFRjpiN9iZQOmXLzcbM6ZPLg0fHdVe4xyqCdb5UB1fi1
cU6kt/Qt3WrMck19bKCVvg1XY5zXANCV+rtoK5Fo1/htZkyR+03aqA==
=oAeB
-----END PGP SIGNATURE-----




More information about the Discuss mailing list