Created
July 27, 2022 17:34
-
-
Save meowmeowxw/fbd88c38e5444d85161c4cba8ec17938 to your computer and use it in GitHub Desktop.
Find images in subdirectories
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
#!/bin/bash | |
mkdir images | |
for f in $(find . -type f); do file $f | grep image; [ $? -eq 0 ] && cp $f ./images/$(date '+%F' -d "@$( stat -c '%Y' "$f";)")_$(basename $f);done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment