[ale] backup script part II
Yu, Jerry
Jerry.Yu at Voicecom.com
Fri Mar 18 12:32:30 EST 2005
ls -1tr *.tar.bz2 | tail -10 > /tmp/latest10.list (note, it is number one, not letter 'l' in the ls arguments)
tar cf blah.tar -T /tmp/latest10.list
# -----Original Message-----
# From: ale-bounces at ale.org [mailto:ale-bounces at ale.org]
# Sent: Friday, March 18, 2005 12:23 AM
# To: ale at ale.org
# Subject: [ale] backup script part II
#
#
# I'm still working on a backup script in Bash, and everything
# was set up
# perfectly, but for structural reasons I have to change what
# gets backed up.
# (just when you think you've got it...)
#
# What I need is to backup only the last ten tar.bz2 files in
# the directory.
# Can someone demonstrate how you do a for loop that would
# determine the ten
# most recent files and then tar only those ten into one big tar file?
#
# I appreciate the help with this...Bash scripting is still
# very confusing for
# me and my only alternative is to make it a Perl script. I'm a Python
# programmer and don't know any Perl, so neither is a great
# option. I'd love
# to write it in Python but the place I'm working doesn't want
# to have anything
# around that isn't in Perl for support reasons.
#
# -Jay
#
# _______________________________________________
# Ale mailing list
# Ale at ale.org
# http://www.ale.org/mailman/listinfo/ale
#
This email and any attached files herein contain information that is intended only for the use of the individual or entity to whom it is addressed and may contain information that is legally privileged, confidential or otherwise exempt from disclosure under applicable laws. If the reader of this message is not the recipient, any disclosure, dissemination, distribution, copying or other use or retention of this communication or its substance is prohibited.
More information about the Ale
mailing list