07-15-2023, 12:29 AM
Hi @TDarcos
Clever program.
Did you know you can actually use find command in linux and either pass the results to xargs or use the -exec method to do something ?
Find all files modified since the the last year (run from root directory of where you are scanning):
You could then simply do:
For every file created or modified since this year (365 days) execute the command:
The funky syntax for the -exec arg simply replaces {} with the found file, and the \; let's you terminate the -exec command. The backslash is to escape the ; in the shell.
Your program is cool too, not saying to not use it. Also it's lots of fun to solve our own problems!
I just wanted to share this 1 liner since i've used it so much in my life. The linux find command is a life saver.
Check out the docs:
Clever program.
Did you know you can actually use find command in linux and either pass the results to xargs or use the -exec method to do something ?
Find all files modified since the the last year (run from root directory of where you are scanning):
Code: (Select All)
find . -mtime +365 -print
Code: (Select All)
find . -mtime +365 -exec cp {} destination/dir/{} \;
Code: (Select All)
cp (foundfile) destination/dir/(foundfile)
Your program is cool too, not saying to not use it. Also it's lots of fun to solve our own problems!
I just wanted to share this 1 liner since i've used it so much in my life. The linux find command is a life saver.
Check out the docs:
Code: (Select All)
man find