LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 12-11-2008, 10:38 AM   #1
defend
LQ Newbie
 
Registered: Dec 2008
Posts: 1

Rep: Reputation: 0
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....
 
Old 12-11-2008, 11:16 AM   #2
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,944

Rep: Reputation: 2671Reputation: 2671Reputation: 2671Reputation: 2671Reputation: 2671Reputation: 2671Reputation: 2671Reputation: 2671Reputation: 2671Reputation: 2671Reputation: 2671
Quote:
Originally Posted by defend View Post
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.
 
Old 12-11-2008, 11:56 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
This sounds like homework.

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


Reply

Tags
linux, scripting


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
how to make a startup script to copy files dgr Linux - Newbie 3 09-26-2007 10:45 PM
bash script to copy files thtr2k Programming 1 02-08-2007 01:03 AM
script or utility to copy files and folders m2azer Linux - General 1 12-22-2005 11:09 AM
will this script copy only certain files? verbatim Programming 5 04-28-2005 10:28 AM
How to copy in a script files to a samba folder? Julianus Linux - Networking 1 10-09-2004 08:29 PM


All times are GMT -5. The time now is 06:20 AM.

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