Hi ALL,
I am working on a folder where there are lot of files for the past one year. I need to compress a particular month files alone. suppose i need to compress the feb month files alone, what is the script we can use.
Thanks in advance
Hi ALL,
I am working on a folder where there are lot of files for the past one year. I need to compress a particular month files alone. suppose i need to compress the feb month files alone, what is the script we can use.
Thanks in advance
By compress I take it to mean you want to compress each file:
Feb 2011
touch -t 201101302359.59 start_dummy
touch -t 201102282359.59 end_dummy
find /path/to/directory \( -newer start_dummy -a ! - newer end_dummy \) |
while read fname
do
compress $fname
# or use
# gzip $fname
done
Apologies for not being clear
let us take a directory which contain 100 files. out of which there are 40 files belonginf to the month of FEbruary. I need a single script which should pick all the feb files and compress them(Instead of manually compressing each file one by one)