You are not logged in.

#1 2020-09-07 08:54:21

corneelvm
Member
Registered: 2019-05-26
Posts: 5

mount all files in folder with subfolders, to folder without subfoldrs

Good day,

I'd search google for this solution because i'm sure it is possible, but i don't know how to word it.

so i want to mount a folder from looking like this:

folder1
--file1
--file2
folder2
--file3
--file4
folder3
--file5
--file6

to

mountfolder
--file1
--file2
--file3
--file4
--file5
--file6

Any ideas?

thank you.

Offline

#2 2020-09-07 09:24:08

Lithium Sulfate
Member
Registered: 2020-07-01
Posts: 28

Re: mount all files in folder with subfolders, to folder without subfoldrs

I don't think this is quite as trivial as you might think.

In case the file names are known beforehand and you know they will not change, you could possibly use symlinks to achieve this; but of course you would have to keep managing them whenever a file is created or renamed. If you do attempt to "merge-mount" the folders in a way like this, you will certainly run into some problems: What would happen if there were duplicate filenames? What would happen if you created a new file inside the mounted folder; which of the original folders would it go into?

This appears to be a XY problem. What is your actual use case for this? Perhaps there's an easier way to achieve what you're trying to do.

Offline

#3 2020-09-07 09:31:38

corneelvm
Member
Registered: 2019-05-26
Posts: 5

Re: mount all files in folder with subfolders, to folder without subfoldrs

I see.. thank you,

Well i'm using rawtherapee for editing photos, i have all my photo's nicely sorted in dated subfolders, but at times i wish rawtherapee could list all my pictures from all folders in one go, instead of me having to always select indivitual folders.

Offline

#4 2020-09-07 09:37:57

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: mount all files in folder with subfolders, to folder without subfoldrs

Lithium Sulfate wrote:

This appears to be a XY problem.

There is an array of problems that ask to be solved by something like a union file system, like UnionFS, for example. See here: https://wiki.archlinux.org/index.php/Fi … le_systems

EDIT: Stackable file system would have been your search term. Had to look it up myself.

Last edited by Awebb (2020-09-07 09:39:34)

Offline

Board footer

Powered by FluxBB