IsDirectoryEmpty.sh is a UNIX shell script that determines whether a directory is empty. This script takes in a path as its command-line argument. It evaluates whether the directory specified is empty. If it is an empty directory, then it outputs '1' (for true). If the directory is not empty, the path is not a directory, or the path doesn't exist, it outputs '0' (for false).
IsDirectoryEmpty.sh is distributed as executable source code under the GNU General Public License. Please see the license agreement elsewhere on this site.
> IsDirectoryEmpty.sh "/etc"
I've made this "IsDirectoryEmpty.sh" shell script more robust. Now it checks whether the directory specified exists or not. The new version is attached below.
Did your message disappear? Read the Forums FAQ.
Spam Control | * indicates required field
No TrackBacks yet. TrackBack can be used to link this thread to your weblog, or link your weblog to this thread. In addition, TrackBack can be used as a form of remote commenting. Rather than posting the comment directly on this thread, you can posts it on your own weblog. Then have your weblog sends a TrackBack ping to the TrackBack URL, so that your post would show up here.
Messages, files, and images copyright by respective owners.
14 Users Online
Copyright © 1996 - 2017. All Rights Reserved.