I need to recursively read through a directory and then zip all the files older than 3 months. All the files have to be zipped seperately.
for file in `find . -ctime +90 -print`
do
gzip $file
done
TMOWTDI
find . -type f -ctime +90 -exec gzip {} \;
How to zip only unzipped files in a directory. I have
a directory in which there are both zipped and unzipped files. I want to
pick up only unzipped files and then zip them.
Something like
if [ file is unzipped ]
then
gzip filename
fi.
Just zip all the files in that directory, those file already ziped nothing
happen, those file not zip will zip up now.
cd /directory
gzip -9 *
Quick Links:
Do you have
a UNIX Question?
Unix Home: Unix System Administration
Hints and Tips