Review your favorite Linux distribution.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 08-16-2006, 11:53 AM   #1
Registered: Nov 2005
Location: Davao City, Philippines
Distribution: RHEL, CentOS, Ubuntu, Mint
Posts: 139

Rep: Reputation: 20
script for file manipulation

hi there people! first of all im no good at bash scripting. can somebody give me a short script or any pointers on how copy/backup directories and all its contents or just files from that directory but with a certain condition that these directories and its contents are created/modified at a certain period (e.g. created/modified 1 day ago). i know that the command find will do the trick but my problem is how to do it if for example, the directory was created beyond the specified time and so as the other files in it and that i would only want to copy/backup the latest modified files in that directory and so as the directory itself. thanks in advance..

Last edited by yongitz; 08-17-2006 at 04:49 AM.
Old 08-16-2006, 01:43 PM   #2
Senior Member
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Rep: Reputation: 62

That's a nice beginner tutorial. I'm not anything near an expert, but I can usually get started using those examples. 1st step would be to get a script that lists only the files you want to back up.
Old 08-16-2006, 10:01 PM   #3
Registered: Nov 2005
Location: Davao City, Philippines
Distribution: RHEL, CentOS, Ubuntu, Mint
Posts: 139

Original Poster
Rep: Reputation: 20
thanks rickh i will check it out today..
Old 08-17-2006, 11:22 AM   #4
Registered: May 2006
Location: England
Distribution: Slackware 10.2, Slamd64
Posts: 249

Rep: Reputation: 31
You also might want to look at rsync.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
String manipulation with BASH script King V Programming 9 04-21-2006 03:15 PM
shell script: File Manipulation simon_qwl Programming 2 10-29-2005 03:40 PM
file manipulation with c C.Aymen Programming 2 09-01-2005 12:48 PM
String manipulation with a script. philipina Programming 4 03-16-2004 02:42 PM
String manipulation with a script? philipina General 1 03-15-2004 12:07 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:36 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration