create/update 'HowTo - Beets Music Library Cleanup.md' file

This commit is contained in:
anonymous
2023-12-19 14:51:49 -05:00
parent 4782839c76
commit ec431798bd

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)