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
Using set -A write a script to print the output of the ls command in 5 columns with two spaces between each column. Pretend that ls does not have multicolumn output.
How do I edit a .sh file?
Write the syntax for "if" conditionals in linux?
Is bash a shell script?
What is the meaning of $1 in shell script?
Explain about stdin, stdout and stderr?
What is scripting used for?
Suppose you execute a command using exec, what will be the status of your current process in the shell?
How do I run a powershell script?
How to print all array elements and their respective indexes?
Write a command sequence to find the count of each word?
How do you debug a script?
In my bash shell I want my prompt to be of format '$"present working directory":"hostname"> and load a file containing a list of user-defined functions as soon as I log in, how will you automate this?
What is the default shell of solaris?
How to print all the arguments provided to the script?