1

I have 2 folders on my Linux OS, Apache 2 Webserver. Call them folderA and folderB . They are have following paths

site1/public/sites/all/folderA

site2/public/sites/all/folderB

I would like that whenever a file is added/edited to folderA, a symlink is created/modified in folderB

Is there a way I can do it?

Any help would be appreciated.

2 Answers2

1

I would suggest incron or inotifytools. They will watch for file creation or other activity and take an action that you designate.

Dennis Williamson
  • 60,515
  • 14
  • 113
  • 148
  • Agreed. With `incron`, make a rule that will look like `site1/public/sites/all/folderA IN_CREATE,IN_CLOSE_WRITE /path/to/your/script $@` where `$@` will contain the path to the created/modified file. Have a look at `man 5 incrontab` for more info. – raphink Sep 14 '10 at 14:43
0

folderB can be a symlink to folderA.

Porch
  • 680
  • 5
  • 12