How do i mount sub folder contents to parent folder?
I have folder structure as below:
/files /fi开发者_开发知识库les/upload
I need to mount /files/upload to /files.
When user uploads files to
/files/uploadit 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.
精彩评论