ionutb - tech & more
Saturday, January 1, 2011
Shell script test dir empty
Shell script test dir empty
#!/bin/bash
ddir='/mnt/dirname'
filesno=`ls $ddir | wc -l`
if [[ $filesno = 0 ]]; then
echo 'dir empty';
fi
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment