I have set up our family mobile phones to automatically backup all photos taken to a NAS (Qnap TS-231P), one folder per mobile. For one phone, for some reason a lot of photos were copied multiple times without warning. In addition, it seems some photos were taken in 48MP mode, so are large files. There are 314281 files totalling 2.19 TB.
Now the folder is so large that it never loads and can't be practically browsed/used (in Windows, in the Qnap Software, on the apps on my phone, etc). I have used SSH to access the Linux operating system of the NAS, and can navigate to the appropriate directory. I tried du -h
on the directory but 40 Minutes later it's still thinking (the size above comes from the Qnap software).
I have a feeling that there is no real problem with the files, so having the files in multiple folders might help.
How can I enter a command to filter the files by modified date into e.g. one folder per month or perhaps one folder per quarter year?
For bonus points, would it be possible to get (i.e. export to a .txt or .csv) a report on the 314281 files before I do anything?
I'm quite a newbie at Linux, so bear with me.
mv
orrm
orrsync --delete
. Backups, backups, backups.