Created
September 14, 2012 14:17
-
-
Save beezly/3722171 to your computer and use it in GitHub Desktop.
Monstrosity
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find -type f -exec ls -E {} \; | awk '{ print $9 " " $6 " " $7 }' | awk -F/ '{ print $3 " " $2 }' | sort -n > s ; for i in `awk '{ print $1 }' < s | uniq`; do cp -p `grep "^$i" s | awk '{ print $2 " " $3 " " $4 }' | sort -n | tail -1 | awk '{ print $3 }'`/$i out/; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's also worth knowing that this was written with Solaris in mind. ls -E is similar to ls --full-time on Linux.