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