How do I tell when a directory is empty in a script?

Rodney Volz rodney at tyrell.stgt.sub.org
Mon Apr 22 06:51:48 AEST 1991


In article <1991Apr18.054735.6733 at metapro.DIALix.oz.au> bernie at metapro.DIALix.oz.au (Bernd Felsche) writes:
>
>rmdir $dir && mkdir $dir || echo $dir not empty 1>&2

What about permissions?

-Rodney
-- 
                     Rodney Volz - 7000 Stuttgart 1 - FRG
 ============> ...uunet!mcsun!unido!gtc!aragon!tyrell!rodney <=============
  rodney at tyrell.gtc.de * rodney at delos.stgt.sub.org * rodney at mcshh.hanse.de 
  \_____________ May your children and mine live in peace. ______________/



More information about the Comp.unix.questions mailing list