开发者

How do i mount sub folder contents to parent folder?

开发者 https://www.devze.com 2023-01-25 10:07 出处:网络
I have folder structure as below: /files /fi开发者_开发知识库les/upload I need to mount /files/upload to /files.

I have folder structure as below:

/files
/fi开发者_开发知识库les/upload

I need to mount /files/upload to /files.

When user uploads files to

/files/upload
it should auto copy(sync/mount) uploaded file to base folder:
/files
.

Is it achievable using linux mount command ?

Thanks.


No. That would be pretty recursive.

You can however just have a separate process/daemon that moves/copies the files manually.

There is a mechanism in Linux called "fnotify" that would let a daemon register for filesystem events. i.e. it would tell the daemon whenever someone added a file into /file/upload - allowing you to initiate the copy/move.

But I'd be interesting in hearing more about why you are doing this before committing to a method.

0

精彩评论

暂无评论...
验证码 换一张
取 消