Dev License: This installation of WHMCS is running under a Development License and is not authorized to be used for production use. Please report any cases of abuse to abuse@whmcs.com

Synchronizing Two Folders Print

  • 7

The following commands can be used to synchronize the changes from one folder into another.

Method A - Copy (CP) Command

cp -ruvf source_folder/ destination_folder/

In the above:
-r indicates recursive
-u indicates to copy if file is newer or does not exist
-v indicates to print verbose the activity being performed
-f indicates to force the overwrite of existing files

Method B - Remote Synch (RSYNC) Command

rsync -rtvu source_folder/ destination_folder/

In the above:
-r indicates recursive
-t indicates to preserve the modification time
-v indicates to print verbose the activity being performed
-u indicates to copy if file is newer or does not exist


Was this answer helpful?

« Back

Powered by WHMCompleteSolution