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

Print the 10th line without using tail and head command.

2177


What is a shell in operating system?

1103


How can any user find out all information about a specific user like his default shell, real-life name, default directory, when and how long he has been using the system?

1104


Is scripting and coding the same thing?

986


Explain about "s" permission bit in a file?

1058


What does $1 mean in bash?

1098


What are the two files of crontab command?

1235


What is wc in shell script?

983


How do I open the shell in cmd?

1139


Explain about debugging?

1025


How do I run a bin bash script?

1032


How do I run a .sh file on mac?

1189


What is scripting autism?

1215


how will you find the total disk space used by a specific user?

1051


How to use arguments in a script?

1107