I tried the rmdir and get the following error - any thoughts ?

find /msdtest -path '/msdtest/*'
-type d -exec rmdir {} \;
find: 001-0023 Error found opening file /msdtest/dir1. No such path or
directory.
find: 001-0023 Error found opening file /msdtest/dir2. No such path or
directory.
find: 001-0023 Error found opening file /msdtest/dir3. No such path or
directory.
find: 001-0023 Error found opening file /msdtest/dir4. No such path or
directory.
$

Don





From: "Scott Klement" <midrange-l@xxxxxxxxxxxxxxxx>
To: midrange-l@xxxxxxxxxxxxxxxxxx
Date: 02/02/2021 02:45 AM
Subject: Re: Removing empty directories on the IFS
Sent by: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxxxxxxxx>



He's doing '-type d', so I think rmdir is exactly what he wants.

Granted, it'll fail if there's anything in the directory, but that's
probably a good thing in this case.


On 2/1/21 7:05 AM, Kevin Bucknum wrote:
rmdir instead of rm would probably work for the specific example you
have here. Also, if you use the find available in the RPM packages, it
does have the empty.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.