Shortcuts in Science
Wednesday, 10 February 2016
How to Check If Folder Is Empty or Have Folder File Use Shell Script?
Cited from
if [ "$(ls -A $DIR 2> /dev/null)" == "" ];
then
# The directory is empty
fi
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment