How to create file links on a vfat filesystem of a mounted disk under Linux

filesystemshard linksymlinkvfat

I have an external drive containing different pieces of music. The drive is a vfat formatted drive to be able to work with arbitrary devices.

On the device I have music stored from different artists sorted according to their name. However, I would like to sort the single music pieces into other folders as well, without duplicating them. So, for example, the title 'Addicted to you' should be accessible from within a folder 'Avicii' but also from a different folder named e.g. 'dance'.

Is there a way I can create some kind of link on the disk? I have tried to do this with ln but got an error:

ln: failed to create symbolic link
ln: failed to create hard link

Is there another way to link those files? And to make sure it works with EVERY USB hardware (radio, TV, media set, car radio, …)?

Best Answer

You can certainly create a directory of links to your music in the structure you've described, if it's anything but a FAT filesystem, but FAT doesn't support links, so you'd have to create Windows LNK files (aka shortcuts).

NOTE: Incidentally you may be able to create LNK files using either of these tools. These tools are described as: allowing you to create Windows Shortcut files (extension .LNK) without needing a Windows OS.

But often it's better to create play list files and leave the music in some standardized structure or as a single sub-directory with other sub-directories within it.

To organize the MP3 headers you can use MusicBrainz's tool Picard to make sure the ID3 tags are all up to date on your collection.

There are many tools such as Clementine for constructing playlists. It's discussed here in this AU Q&A titled: Need a playlist creator for linux that will do relative paths.

Related Question