bash command to move files
Hi Guru's
I'm still no good on linux, please bear with me. I have two directories one is named as bkup and other is exec bkup folder has 200 log files that needs to be moved to exec folder. We need 5 logs per batch every 2 minutes and the 5 logs that needs to be moved consists of the 1st five with the oldest time stamps. I am doing the moving of logs manually, is there a shortcut mode to do this?, I mean in automated mode. |
You would need to write a script to perform the actions you want on whichever files and then use cron to do it on the schedule you want. There are numerous tutorials available on using cron.
|
This question is difficult to understand... but as for running something every 2 or 5 minutes, place these in your crontab file using crontab -e
every 2 minutes: Code:
*/2 * * * * commandorscript Code:
*/5 * * * * commandorscript |
All times are GMT -5. The time now is 05:34 AM. |