I have started working on Linux recently. I'm looking for a solution for monitoring a folder for zipped files and unzip them. I have created a simple script(say unzip.sh) to unzip the files but there is no fix time at which zipped are received, so I want to use a script that checks for zipped files and calls this unzip.sh script if found any zipped files. Thanks.
#!/bin/sh
cd <dir name>
for i in `find . -name "*.gz"`; do
gunzip $i
done