Finding multiple files with ascending numerical files extensions
I've recently been tasked with writing a smart script that can grab binlog files from MySQL, tar/gzip them and then be able to recognize which files it has already grabbed and then move onto the next chunk of log files.
I need to be able to find/locate files 00x through 00x, and leaving out any 00x file that isn't listed in my parameters.
Thus far I haven't found a way to do this using Find.
You can use regular expressions when using find: find . -type f -iname "file.00[0-5]" should give back file.000 - file.005 (if they actually exist).
Hope this helps.
Thanks! That solved my issue.
In the long run you'd probably be better off using the logrotate facility for that kind of work.
|All times are GMT -5. The time now is 10:12 AM.|