| @@ -1,15 +1,11 @@ | |||
| 1 | 1 | # find most common added-dates for a group of files | |
| 2 | - | fd -t f -0 /mnt/media/Music \ | |
| 3 | - | | xargs -0 stat -c '%y' \ | |
| 4 | - | | cut -d' ' -f1 \ | |
| 2 | + | find . -type f -printf '%TY-%Tm-%Td\n' \ | |
| 5 | 3 | | sort \ | |
| 6 | 4 | | uniq -c \ | |
| 7 | 5 | | sort -nr \ | |
| 8 | 6 | | head -5 | |
| 9 | 7 | ||
| 10 | 8 | # explore files added on a date | |
| 11 | - | fd -t f -0 /mnt/media/Music \ | |
| 12 | - | | xargs -0 stat -c '%y %n' \ | |
| 13 | - | | grep '^2025-03-14' \ | |
| 9 | + | find . -type f -newermt '2025-03-14' ! -newermt '2025-03-15' \ | |
| 14 | 10 | | shuf \ | |
| 15 | 11 | | head -20 | |
ian / Find most common creation date for files
Last active 1 month ago
ian revised this gist 1 month ago · 0061bef
1 file changed, 2 insertions, 6 deletions
ian revised this gist 1 month ago · ca4b8f5
1 file changed, 15 insertions
| @@ -0,0 +1,15 @@ | |||
| 1 | + | # find most common added-dates for a group of files | |
| 2 | + | fd -t f -0 /mnt/media/Music \ | |
| 3 | + | | xargs -0 stat -c '%y' \ | |
| 4 | + | | cut -d' ' -f1 \ | |
| 5 | + | | sort \ | |
| 6 | + | | uniq -c \ | |
| 7 | + | | sort -nr \ | |
| 8 | + | | head -5 | |
| 9 | + | ||
| 10 | + | # explore files added on a date | |
| 11 | + | fd -t f -0 /mnt/media/Music \ | |
| 12 | + | | xargs -0 stat -c '%y %n' \ | |
| 13 | + | | grep '^2025-03-14' \ | |
| 14 | + | | shuf \ | |
| 15 | + | | head -20 | |