This aught to get you started.
It just list the files and size in the /home/images folder.
You will have to add some more stuff for deleting.
If you want to make a couple of empty files to help in testing,
the easiest way is use the command: >
For example: >file.txt
Edit: you could test for more than one argument with this...
test $# == 1 || usage
# Example: ./test /home/images
echo "Usage: $0 Directory_Name"
test -d "$1" || usage
for i in `ls $1/*` ; do
size=`stat -c %s $i`
if [ $size -lt 1 ]; then
echo "$i is $size ( This one is empty ) "
echo "$i is $size "