Hello,
I have a script which finds files in a directory that are older than 30 days and moves them to the specified directory.
The problem is I don't know why it works the way it does?
Code:
find . -name '*.sql' ! -mtime -30 -exec mv '{}' /dataload/archivelogs \;
I was under the impression that +30 should be used to find files over 30 days old however in this case it is the opposite.
I was hoping someone can explain?
What I was trying to achieve was to find a file name in a specific directory not directory's above or below that is older than 30 days and move them.