script to detect new directory and move contents
Anybody could help my scenario with shell script, I am very new to this.
1. Everyday there will be a directory is getting updated with some contents in a server, I should be able to find the latest directory in that based on particular string and copy to another directory with date. Any idea. using shell script.
directory structure will be `date`/mystring-.xxx/
Every day the date directory will be updated to that days date. Parameterized would be great.
You can use rsync if you are thinking for backup.
rsync finds files that need to be transferred using a "quick check" algorithm(by default) that looks for files that have changed in size or in last-modified time, which reduces the amount of data sent over the network by sending only the differences between the source files and the existing files in the destination. rsync is widely used for backups and mirroring and as an improved copy command for everyday use.
|All times are GMT -5. The time now is 09:04 PM.|