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

Why do we use shell scripting?

999


How to open a read-only file in the shell?

1130


What makes c shell a more preferable option than the bourne shell?

978


What is the significance of the shebang line in shell scripting?

1133


What is another name for a bash shell script that you might see?

1476


How to find duplicate record in file using shell script?

1412


What lives in a shell?

967


Why are there shells on the beach?

1157


What is k shell?

967


What are script files?

1040


What is shell and terminal?

1011


How to debug the problems encountered in the shell script/program?

1152


What is path in shell script?

1100


Is powershell a language?

1053


What is a beat in a script?

1080