Anyone know any nice tools for indexing external media? I like to find files on any of my external drives, without having to each mount them and run 'find' on...
Thanks
Anyone know any nice tools for indexing external media? I like to find files on any of my external drives, without having to each mount them and run 'find' on...
Thanks
@wmd Uninformed guesswork: Locate doesn't work for that?
@nameLess @wmd According to the man page you can either use --database or $LOCATE_PATH to use other databases than the standard one (for mlocate)
@pettter @wmd not quite. Locate is normally scheduled to run daily and overwrites it's db. But you might be onto something here. No time to check this at the moment but maybe locate can be persuaded to use some other db. You'd have to connect all those drives force locate to use different db, run update.
As I said before I don't know if it's capable of it (and there are couple of locate implementation -- slocate mlocate maybe some others).
Other option would be to run find -type f >drive-name and then just grep the drive-name files
@nameLess @wmd and updatedb.mlocate can do both -o <file> to write to a specific database file, and -U <root> to only index the files from a specific root directory to that database, so it should be possible to cobble something together here...
@wmd @nameLess @purple Mm, indexing does take time no matter how you square it. At least in my mlocate man page, it does say explicitly that it doesn't check that the file exists before reporting the result, but that might definitely be different between versions.
Downside of this is having to do that, as soon as I make a change to any disk. Another option I guess is have a locatedb stored on each disks root.
Atleast the version of locate I have doesn't seem to have any options to retain paths/devices that are no longer plugged in. But also I have no examples section in my manpage where @purple refers to.
I could indeed make a separate db the moment I've got every disk plugged in, and run a special updatedb process for some hours?
GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.
All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.