Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Hi,
i want to zip the files that generates automatically
every few minutes (files generated are in .arc
extension)....any body write a script for this...
thanks in advance

Answer Posted / vipul dalwala

while true
do
THIRDFILE=`ls -t | sed -n '3p'`
find . -name '*.arc' ! -newer ${THIRDFILE} -exec gzip {}
\;
sleep 300
done

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is bash command used for?

1004


What is the use of a shebang line?

1112


Given a file find the count of lines containing the word "abc".

1491


wats the deinitions for shell utility and filter?

2251


What lives in a shell?

893


What does egrep mean?

913


How do I run a shell script on a mac?

1069


How will you copy a file from one machine to other?

945


Why is used in shell scripting?

936


How do I start a shell script?

1124


How do we create command aliases in a shell?

936


What will happen to my current process when I execute a command using exec?

977


What is the default ubuntu terminal?

1051


What does it mean by #!/Bin/sh or #!/Bin/bash at the beginning of every script?

999


What is bourne shell scripting?

918