Last active
January 13, 2017 16:32
-
-
Save phcostabh/654bc3f3ecf244938b9d1eae64fbc0e3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| N=29; for f in *.mp4; do printf -v prefix_str '%02d' "$((N--))"; mv "$f" "$prefix_str-${f%-*.mp4}"; done | |
| N=9; for f in $(find -type f -name '*.mp4' -exec stat --printf='%W %n\n' {} \; | sort -r | awk '{ print $2 }' | sed 's,\./,,'); do printf -v prefix_str '%02d' "$((N--))"; mv "$f" "$prefix_str-${f%-*.mp4}"; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment