LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Script to copy files (https://www.linuxquestions.org/questions/linux-newbie-8/script-to-copy-files-689839/)

defend 12-11-2008 09:38 AM

Script to copy files
 
Hello I am pretty good with administering Linux but I have a task to write a script to do the following:

1. I need to copy all dbf files from a specific date to present from one directory to another.
2. After these files are copied every hour a new file is copied into a specific directory...I now need to copy these new files from source directory into another directory...every hour...

I know I will have to check the attribute on these files and then copy it because the directory would have other files with the same extension...

Ugently awaiting your help here....

TB0ne 12-11-2008 10:16 AM

Quote:

Originally Posted by defend (Post 3371768)
Hello I am pretty good with administering Linux but I have a task to write a script to do the following:

1. I need to copy all dbf files from a specific date to present from one directory to another.
2. After these files are copied every hour a new file is copied into a specific directory...I now need to copy these new files from source directory into another directory...every hour...

I know I will have to check the attribute on these files and then copy it because the directory would have other files with the same extension...

Ugently awaiting your help here....

Please don't say things are urgent...we all volunteer our time.

Check out the ctime/atime/mtime flags http://dsl.org/cookbook/cookbook_10.html. Since you're pretty good with Linux, this should be easy.

pixellany 12-11-2008 10:56 AM

This sounds like homework.

Please tell us what you have tried and what specific aspect you have difficulty with.


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