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 / srinivas
Assuming the *.arc files are getting generated under every
5 minutes..
Create script.sh and cut paste the following contents
--------------------------
while true
do
for i in `ls *.arc` ;
do
ls *.arc 2> /dev/null
if [ $? -eq 0 ]
then
gzip $i
else
echo "No files to be zipped at this moment...Exiting"
exit 1
done
sleep 300
done
--------------------------
Hope this helps
-- Srini
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
How do I run a shell script in powershell?
What is a shell made of?
What is @echo off?
What does $@ mean in shell?
What lives in a shell?
What is echo $shell?
Why are shell scripts used?
What are zombie processes?
How to get the 3rd element/column from each line from a file?
What are different types of shell?
How to get the last line from a file using just the terminal?
How to set an array in linux?
What is awk in shell script?
How are shells born?
write a shell script to generate a alert ? like when ur birthday came then generate a alert ur birthday is today like that ?