All my user has a directory called backup on each of their home
directory. All files was a text file. I want to backup those file after
a month had past using tar and delete the text files after I tar it.
Here is my some of the command I'm thinking of
Quote:
#!/bin/bash
DATE=`date --date="1 month ago" | awk '{print $2}'`
ls -l /home/user/Maildir/backup/ | grep $DATE | awk '{print $9}' | xargs
tar crvf user-200910.tar.gz
I want to apply this command to all my users in the server. I just want
to ask some guru in scripting.
Is my script suitable to what I need? Is there any possibility of
bottleneck that might cause slow on the server? How can I apply this
script to all user's backup dir and each has their own filename?
--
You received this message because you are subscribed to the Linux Users Group.
To post a message, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit our group at
http://groups.google.com/group/linuxusersgroup