I’m using Linux and I’m trying to avoid accidentally downloading the same files multiple times.
For example, I use Soulseek to download music. After a song finishes downloading, I usually move it to another folder (my main music library). Later on, when I’m searching again, I don’t always remember whether I already have a particular song, and I end up re-downloading it.
Is there a good way on Linux to keep track of what I’ve already downloaded, even after files are moved to different folders, so I can avoid downloading duplicates? Ideally, I’d like something that doesn’t require manually searching my entire music library every time.
One idea I had was leaving a placeholder file behind in the original download directory and configuring Soulseek not to overwrite it, but I’m not sure if Soulseek even has that option.
What tools or workflows would you recommend for this?
Could you just set soul seek to the same directory you’re moving the files to eventually and save a step?
Nah I like different folders for the different media types
If your soulseek and music directories are on the same partition, you can do hardlinks (
cp -l) instead of moving files (mv), so the same file is available from the 2 locations while its content is only recorded once on your filesystem.I never fully understood this concept. Why would I want my media files to remain in the “downloads” folder? It makes way more sense to move them to their appropriate “media” directories so their associated library software can see and properly catalog them.
With hardlinks you would have both. File content can have multiple names pointing to it. That name basically includes the directory tree. So you can have
~/downloads/song.flacand~/media/music/artist/album/song.flac. Both would point to exactly the same data on the drive. Not just a copy, but exactly the same spot on the drive.As to why, see OPs post.
Right, but the media management software (*arr stack, in my case) already knows what it has and won’t call to the downloader for duplicates unless manually triggered to do so. It just seems like an overcomplication to have hardlinks in multiple directories when you really only need the relevant files to be in the media directories…
I might be overthinking this.
You might be underthinking it. With hardlinks the media management software looks in the media folder for the music files, while the downloading software looks in the downloads folder to avoid downloading duplicates. The files are stored only once but both softwares are happy.
That makes sense to an extent, but sounds like it leaves a big, unorganized mess in the downloads folder.
Assuming your filenames are unique, you can just run a recursive search for the file on your whole music library:
find /path/to/search -type f -name "filename.ext"Amazing some people actually memorise that, I just abuse pipes and
find /path/ | grep fileSince OP mentoned SoulSeek, they may want to consider putting each download in a directory under the username they got it from and keeping their directory structure. Sort of like a URL.
You could write a bash script to move the file from the download folder to the music library too.
Haven’t done any bash scripting in a minute so sorry if this is off, but you get the gist:
For files in /path/downloads/*; do mv “$files” /path/musiclibrary/; done
You can also output a list of all the files in your music library with ls -alR /path/musiclibrary >> /downlaods/musiclibrary if you want a list
Which you can grep for a file name to check if it’s there
Can’t you just search whatever files you’re sharing to see if you have it?
I use beets.io to manage my music. Once you’ve got it set up, you can just search for stuff with
beet lsThe music was just an example, what about movies, books, etc.
Most people use Radarr, Sonarr, Lidarr for that.
I would keep track of them in Tellico, it is designed for this purpose.
Can’t you just use fsearch on all drives?




