hye everybody ,
i'm new to the scripting world.. hope you guys can help me out with this one..
i'm trying to identify any directory under /tmp/saya that is created more than one day from the current date..
e.g, today is March 14, so any directory that has time stamp March 13 backwards, i want to tar it and put under /tmp/awak..
this is the script that i created (without the date)
### PART 1 : TO TAR FILE IN /tmp/saya AND PUT IN /tmp/awak ###
cd /tmp/saya
for file in *
do
if [[ -d $file ]]
then
tar -cvf /tmp/awak/$file.tar $file
fi
done
thanks a lot!
-fara