I am needing some help with a script. I'm currently trying to select PDF filesfile that meetmeets a specific requirement in the file name in order to move it to a different location.
The filename format I'm trying to select from has six _-separatedseparated sections like the example below:
I_XXX_PACK_6788669_6_9358869.pdf I_XXX_PACK_6788669_6_9358869.pdf What I am trying to do is select only files that have a particular value inthe last section 6in the file name (e.g. 9358869) and ignore all others pdf files in the directory.
Can it be done with Unix tools (POSIX find, sed, grep, etc.), my main issue right now is trying to only get only the one file that was 6 separated sections in its filename and ignoring all other files.
- Can this be done with
bashonly? - Also is it possible to only choose the files that were created 1hr prior to system time? I have use sed on other file types to check for time, but not on a pdf file. So I am not sure if that is possible or not