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 web script?

1141


Write a command sequence to find the count of each word?

1032


What is shell prompt?

1071


Is shell scripting a programming language?

1095


What is option in shell script?

1066


What does $0 mean in shell script?

1052


one folder contains lot of students name but I want to fetch hello with every student name individually using shell script

1003


What is echo in shell?

1156


What is the use of "$#" in shell scripting?

1138


What exactly is a shell?

1133


What is a shell in operating system?

1157


Write a script to print the first 10 elements of fibonacci series.

2412


What is wc in shell script?

1027


How do scripts work?

1088


What are the types of script?

1256