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?

  • JamonBear@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    28
    ·
    2 days ago

    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.

    • Lka1988@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      4
      ·
      edit-2
      2 days ago

      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.

      • Björn@swg-empire.de
        link
        fedilink
        English
        arrow-up
        5
        ·
        2 days ago

        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.flac and ~/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.

        • Lka1988@lemmy.dbzer0.com
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          2 days ago

          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.

          • colourlessidea@sopuli.xyz
            link
            fedilink
            English
            arrow-up
            3
            ·
            2 days ago

            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.

            • Lka1988@lemmy.dbzer0.com
              link
              fedilink
              English
              arrow-up
              4
              ·
              2 days ago

              That makes sense to an extent, but sounds like it leaves a big, unorganized mess in the downloads folder.