fuse filesystems are fucking sweet
Table of Contents
index - posts - git - bookmarks - spotify 🎵
FUSE filesystems are fucking cool
by kebles! - Tue Nov 30 13:39:42 2021
i wanted to do a brief show-and-tell of several virtual filesystems for Linux that i've found to be very novel and surprisingly useful.
mp3fs - https://khenriks.github.io/mp3fs/
this is a filesystem that transparently converts lossless (currently flac and ogg files) to mp3. literally will just turn a sprawling directory of FLACs into MP3s, for storage compression or comparison between quality levels on the fly, etc.
the site gives a better explanation and examples than I can here. but as an idea, what i did was mount an mp3fs on my server, source being my music directory.
mp3fs /data/Syncthing/Music /data/.mp3
Then on my laptop, over ssh mounted via sshfs, I copied the directories and directly overwrote the artist-album folders so I ended up with two copies of each track, one FLAC and one mp3.
rsync -rv --ignore-existing --info=progress2 /data/.mp3/Music ~/Music
you can copy or rsync or even drag and drop with your GUI file manager.
find -name "*\.flac" -delete
and enjoy your free space back! obviously for audiophiles this is neigh useless but for casual listeners it's a stupidly cool-feeling way to transcode audio.
rofs-filtered - https://github.com/gburca/rofs-filtered
read-only filtered filesystem. i discovered this when i wanted basically a read-only "proxy" filesystem for backup software that filtered out garbage, like temp files that i otherwise don't have proper garbage collection on my system for.
provide it with a config file with a list of regular expressions to filter out of a filesystem, directory tree, etc, and you can then mount a read-only mirror, sans said filtered files. it also has a double negative "invert" flag which only shows files matching the regular expression; the readme indicates this option can be tricky to set up however.
but what this allows for is excluding files if you want to, for example, allow drag and drop backups of a home directory that includes browser profiles but filters out their cache directories. the author has other good backup-centric use cases in the readme as well.
i'm obsessed with filesystem organization and this gives me a boner.