This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Here is another one from
o http://www.shelldorado.com/scripts/categories.html
----------- cut here ------------------------------- : # rmemptydir - remove empty directories # Heiner Steven (heiner.steven@odn.de), 2000-07-17 # # Category: File Utilities
[ $# -lt 1 ] && set -- .
find "$@" -type d -depth -print | while read dir do [ `ls "$dir" | wc -l` -lt 1 ] || continue echo >&2 "$0: removing empty directory: $dir" rmdir "$dir" || exit $? done exit 0 ----------- cut here -------------------------------
$ find . -type d -depth -print ./asd ./asdf asdf/jkl ./asdf asdf ./usr/bin ./usr .
$ find . -type d -print . ./asd ./asdf asdf ./asdf asdf/jkl ./usr ./usr/bin
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |