we are running out of space on an expensive production NAS. We’ve decided to move all the files to our in house storage server and use the production NAS as a cache for our most streamed and listened to tracks.
Is there a way to delete every file with .m4a extension in specific root folder except ones listed in a .txt file?
The file has over 22.4k lines of absolute paths and the estimated size of files to be deleted is around 9.2TB
Haven’t find any efficient solution
2
Answers
Not the most efficient solution, but it should get the job done. For each file, your "files to keep" text file is scanned.
Files are deleted without confirmation. Use at your own risk.
I think it’s easier to simply act upon the listed files, rather than to check against the list when performing a separate action: