Hi!

Am 2003-10-09  1:29 +0200 schrieb Sven Luther:
> Ideally, i should erase the ld.conf, verify that the directory is empty,
> and then rmdir it. I have no idea how i test that a directory is empty
> though.

What about 

        rmdir /path/to/dir 2> /dev/null || echo "not empty"

? If you don't need the outcome (i. e. just make sure that its gone if
it was empty), a plain

        rmdir --ignore-fail-on-non-empty /path/to/dir

is sufficient, rmdir doesn't return an error then.

Martin
-- 
Martin Pitt
home:  www.piware.de
eMail: [EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to