Basically, we want to find all files that are more than a year old for archiving purposes.. we have a specific drive dedicated for data storage. Inside those are sub-directories which contains other sub-directories as well. What we want is a command that we can run to list all those files with the following details:
- Date last modified
- Owner
- File Size in Human Readable format
- The filename and its file path
Kind of like an output like this:
Demouser 11G /datadrive/January/dataset1
Demouser 10G /datadrive/January/dataset2
Demouser 9G /datadrive/January/dataset1
Demouser 8G /datadrive/February/dataset3
Demouser 7G /datadrive/January/dataset3
What we have no is somewhat similar to the output above, although it is sorted per directory, and what we want is to sort it irregardless of the location and also only files that are more than a year old.
du
and https://unix.stackexchange.com/questions/194863/delete-files-older-than-x-days – Panki Jan 28 '20 at 07:48