Created
November 25, 2025 21:49
-
-
Save steffen-wirth/4b38b27afb59e0eeb7b7167d299806c4 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
| # move all files | |
| find . -type f -exec bash -c 'mkdir -p "${1%/*}/$(date -r "$1" "+%Y")"; mv "$1" "${1%/*}/$(date -r "$1" "+%Y")/"' _ {} \; | |
| # copy files | |
| find . -type f -exec bash -c 'mkdir -p "${1%/*}/$(date -r "$1" "+%Y")"; cp "$1" "${1%/*}/$(date -r "$1" "+%Y")/"' _ {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment