LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   script for file manipulation (https://www.linuxquestions.org/questions/programming-9/script-for-file-manipulation-474443/)

yongitz 08-16-2006 11:53 AM

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..

rickh 08-16-2006 01:43 PM

http://www.arachnoid.com/linux/shell_programming.html

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.

yongitz 08-16-2006 10:01 PM

thanks rickh i will check it out today..

soggycornflake 08-17-2006 11:22 AM

You also might want to look at rsync.


All times are GMT -5. The time now is 12:46 PM.