Computing.Net > Forums > Linux > Using awk to make archives

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Using awk to make archives

Reply to Message Icon

Name: HunterColt22
Date: May 26, 2007 at 22:51:41 Pacific
OS: Windows XP
CPU/Ram: Centrino Duo Processor
Product: HP Pavilion
Comment:

Hi everyone, I am currently in my first programming class and we are learning BASH, this has been the first time I have used Linux or a conjunction of it or Unix before this class. As of up untill now, I have been doing well and been able to figure it out on my own mostly. I am stuck on this on problem though. I need to make shell script that uses awk to archive my files and directories into seperate archives based on the month and year they were created on. It should also be able to take a command line arguement of a directory path to where it should be archived to. thanks a bunch for any help on this at all, thank you again.



Sponsored Link
Ads by Google

Response Number 1
Name: ghostdog
Date: May 27, 2007 at 03:36:37 Pacific
Reply:

you can use a combination of find and tar.
find is to find files according to your date and tar is to archive them. check your man pages. Also google for "find tar backup files".


0

Response Number 2
Name: HunterColt22
Date: May 27, 2007 at 19:03:03 Pacific
Reply:

Thanks for that bit of info, though wasnt exactly what I had a problem with. I knew I would have to find and tar them in the script, the only thing I can not figure it out is how to make files go into a certain archive if they were made on a certain month within a certain year, I know I would need to use the find 'date' for that but, I am not sure what to do after that. Thanks though, that gives me a bit more of an idea what to do.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Undelete files on ext3 fi... I am not getting any soun...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: Using awk to make archives

How to make Remote login using ssh, www.computing.net/answers/linux/how-to-make-remote-login-using-ssh/15422.html

how to make boot floppy? www.computing.net/answers/linux/how-to-make-boot-floppy/2371.html

Spam!! I need to make it stop www.computing.net/answers/linux/spam-i-need-to-make-it-stop/25115.html