Linux cp -S or –suffix=SUFFIX vs cp -b vs cp –backup[=CONTROL]

All three options are used to take a backup of the destination file/directory before overwriting it with the source file/directory but the difference is on the name cp command given to the backup file. With -b option the backup file is suffixed with a tilde (~) sign, with –backup[=CONTROL] suffix the backup file as per [CONTROL] value and –suffix=SUFFIX or -s option lets you decide which suffix to use.

Leave a Reply