save file 'howto - Beets Music Library Cleanup.md'

This commit is contained in:
anonymous
2023-12-20 19:13:19 -05:00
parent 553d4a75e1
commit 6273746ddf

View File

@@ -0,0 +1,17 @@
# Music cleanup one-liners
## Find albums with less than 3 tracks
Useful for finding directories that contain only artwork
```bash
NUM=3 && find /mnt/phnas02/music -maxdepth 2 -mindepth 2 -type f -printf '%h\0' | awk -v num="$NUM" 'BEGIN{RS="\0"} {array[$0]++} END{for (line in array) if (array[line]<num) printf "%s\n", line}'
```
## Beets find and remove albums
Delete album with:
```bash
beet rm -a "Jon Oliva" -d
```
(-a for album and -d to delete the files and not just the database entry)