I have some files like this:
2012-12-17_083213_1.log
2012-12-17_083213_1.log_stats
2012-12-17_083213_1.logaccount_ptr
2012-12-17_083213_1.loginitial_ptr
2012-12-17_083213_1.logptr
2012-12-17_093049_2.log
2012-12-17_093049_2.log_stats
2012-12-17_093049_2.logaccount_ptr
2012-12-17_093049_2.loginitial_ptr
2012-12-17_093049_2.logptr
In here every 1G of data, a new file is created with the name in Year-Month-Day_HourMinuteSecond_number.log format (as you can see above).
I want to
- Copy all *.log files to a new folder named with the format Year-Month-Day, so for these it would be named: 2012-12-17
tgz
that folder- Send it to a server IP.
I don't know how exactly. I want it as a bash script so that I can run it every day for the newly added files.