You are not logged in.

#1 2017-08-25 13:28:18

OP
Member
Registered: 2015-11-16
Posts: 9

Dynamic search directory?

What I'm trying to do: Search and list files containing a keyword and access them as symlinks. Basically, a dynamic directory updated by a search criterion

I can only think of a pretty clumsy way of doing this:

  • create RESULT_DIRECTORY to contain symlinks to files

  • cron job to search for keyword and create symlinks:

     find ~ -type f -iname "*KEYWORD*" -exec ln -l {} ~/RESULT_DIRECTORY 

I feel I'm overlooking something simpler. Is there an elegant way to do this?

Offline

#2 2017-08-30 16:04:49

Starfish
Member
From: Germany
Registered: 2015-10-21
Posts: 134

Re: Dynamic search directory?

Sounds like you want a database:
https://wiki.archlinux.org/index.php/MySQL


"Yesterday is history, tomorrow is a mystery, but today is a gift. That is why it is called the present." - Master Oogway

Offline

#3 2017-09-06 23:36:09

nodivbyzero
Member
Registered: 2016-12-15
Posts: 2

Re: Dynamic search directory?

Offline

#4 2017-09-07 03:34:15

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: Dynamic search directory?

You could do this with FUSE, but it would require much more work than scheduling your "find" script (or an alternative with "locate"). What's the purpose of the directory with the symlinks? This may be an X-Y problem with a more direct solution.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

Board footer

Powered by FluxBB