find all the current log file with date and copy to a specific folder.
Hi,
I want to fetch all the current updated files in a directory and copy them to another without using the name of each files. PHP Code:
PHP Code:
Can any one have the command to do this in shell ? Thanks |
Wow, this sounds familiar:http://www.linuxquestions.org/questi...pt-4175556776/
Again,post what you have tried. |
Try looking at the options to the find command
|
The 'touch' command using the '-t' option can create a file with an arbitrary date and time stamp.
The 'find' command in conjunction with the '-newer' option can make use of such a file. |
Quote:
|
Quote:
This way, the syslog-server host would always have the 'latest' copy of any file you choose. In fact, it updates the remote copy in near real-time. Ask if you want more info on the specifics. But here's a startup set for 2 files (apache2 access and error). There's no reason it can't be done for files in /var/log also. |
All times are GMT -5. The time now is 05:58 PM. |