user3054568
user3054568

Reputation: 29

linux - sync two local directories

I need to sync two local directories in linux. For example /var/www and /www. I heard about Rsync but I don't know how to use it. Basically, when I put something in /var/www it needs to appear in /www and when I put something in /www it needs to appear in /var/www.

Upvotes: 1

Views: 973

Answers (1)

Tyler Marshall
Tyler Marshall

Reputation: 314

Could you not make a soft link of the two files, then when you load something into one directory it loads it into the other.

ln -s {target-filename} {symbolic-filename}
ln -s /var/www /www

Upvotes: 2

Related Questions