MyFirstLemmy
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
CoderSupreme@programming.dev to Linux@lemmy.ml ·
edit-2
2 years ago

Which tool could I use to scan all drives and find where I have a file even when the drives are disconnected?

message-square
message-square
17
link
fedilink
34
message-square

Which tool could I use to scan all drives and find where I have a file even when the drives are disconnected?

CoderSupreme@programming.dev to Linux@lemmy.ml ·
edit-2
2 years ago
message-square
17
link
fedilink
alert-triangle
You must log in or # to comment.
  • AbidanYre@lemmy.world
    link
    fedilink
    English
    arrow-up
    10
    ·
    2 years ago

    Git annex will keep track of where files are for you.

    • aurtzy@discuss.tchncs.de
      link
      fedilink
      English
      arrow-up
      5
      ·
      2 years ago

      I use git-annex for syncing and backing up all of my data; would highly recommend if you’re looking for something that scales well, OP.

  • MangoPenguin@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    7
    ·
    2 years ago

    You could make a text file of all the directories/files, name it according to the drive name, and then you could search the text files or just scroll through it.

    https://stackoverflow.com/questions/23808798/how-can-i-export-a-recursive-directory-file-listing-to-a-text-file-in-linux-ba

    • Shadow@lemmy.ca
      link
      fedilink
      arrow-up
      13
      ·
      2 years ago

      A slightly more polished version might be a locate db per disk

      • d3Xt3r@lemmy.nzM
        link
        fedilink
        arrow-up
        6
        ·
        edit-2
        2 years ago

        This. By default, the locate command does not check whether the files found in the database still exist, so you could use it even if the indexed filesystem or path is offline.

  • fakeman_pretendname@feddit.uk
    link
    fedilink
    arrow-up
    6
    ·
    2 years ago

    Not sure if it’s more suitable than what’s been suggested already, but I use Virtual Volumes View, an open source program to log/index my (disconnected) external drives and older hard drives.

    I then keep the database/catalogue in a shared location I can check from my desktop/laptop.

  • bloopernova@programming.dev
    link
    fedilink
    English
    arrow-up
    5
    ·
    2 years ago

    Save a list of all the files full paths, then run that file through fzf https://github.com/junegunn/fzf

  • anon5621@lemmy.ml
    link
    fedilink
    arrow-up
    5
    ·
    edit-2
    2 years ago

    Strange that anyone,didn’t recommend gui app fsearch https://github.com/cboxdoerfer/fsearch

  • ipsirc@lemmy.ml
    link
    fedilink
    English
    arrow-up
    4
    ·
    2 years ago

    https://plocate.sesse.net/

  • PseudoSpock@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    4
    ·
    2 years ago

    mlocate, plocate, slocate

    Mount the drive, run updatedb, then unmount the db when that finishes. Then use the locate command.

  • dack@lemmy.world
    link
    fedilink
    arrow-up
    4
    ·
    2 years ago

    You could maybe do some tricks with one of the variations of locate - such as mlocate or locate. There are options for the updatedb to index specific paths and store in the specified database. If you store a separate db per drive, a bit of scripting to loop through all DBs would let you search them all.

  • thefactremains@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    2 years ago

    deleted by creator

  • CoderSupreme@programming.devOP
    link
    fedilink
    arrow-up
    1
    ·
    2 years ago

    To index the contents of the drives, you can redirect the output of the find command to a file. For example, find /path/to/your/drive -type f > drive_index.txt will create a file named drive_index.txt containing a list of all the files in the drive.

    Then place all the file list in the same folder and grep that folder to find which drive contains the file.

  • chingadera@lemmy.world
    link
    fedilink
    arrow-up
    6
    arrow-down
    5
    ·
    2 years ago

    The hard drive that is disconnected

    • MangoPenguin@lemmy.blahaj.zone
      link
      fedilink
      English
      arrow-up
      4
      ·
      2 years ago

      That’s not very helpful lol

      • Kbobabob@lemmy.world
        link
        fedilink
        arrow-up
        4
        ·
        2 years ago

        I think they just dropped this

        ?

    • bloopernova@programming.dev
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      1
      ·
      2 years ago

      The hard drive that is disconnected

      The Hard Drive That Is Disconnected

  • PuppyOSAndCoffee@lemmy.ml
    link
    fedilink
    arrow-up
    2
    arrow-down
    3
    ·
    2 years ago

    Not being facetious but you could write your own tool. It might take a minute at first but then it would be yours and be totes worth it.

Linux@lemmy.ml

linux@lemmy.ml

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !linux@lemmy.ml

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

  • !opensource@lemmy.ml
  • !libre_culture@lemmy.ml
  • !technology@lemmy.ml
  • !libre_hardware@lemmy.ml

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 1.99K users / day
  • 3.57K users / week
  • 7.57K users / month
  • 17.8K users / 6 months
  • 1 local subscriber
  • 56.1K subscribers
  • 5.28K Posts
  • 111K Comments
  • Modlog
  • mods:
  • AgreeableLandscape@lemmy.ml
  • nooter692@lemmy.ml
  • MarcellusDrum@lemmy.ml
  • Arthur Besse@lemmy.ml
  • Cyclohexane@lemmy.ml
  • d3Xt3r@lemmy.nz
  • UI: unknown version
  • BE: 0.19.12
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org