How to find latest modified files and delete them with SHELL code
问题 I need some help with a shell code. Now I have this code: find $dirname -type f -exec md5sum '{}' ';' | sort | uniq --all-repeated=separate -w 33 | cut -c 35- This code finds duplicated files (with same content) in a given directory. What I need to do is to update it - find out latest (by date) modified file (from duplicated files list), print that file name and also give opportunity to delete that file in terminal. 回答1: Doing this in pure bash is a tad awkward, it would be a lot easier to