Skip to content
Advertisement

Why does rsync create ~ files?

I run the following daily crontab:

JavaScript

It creates these files:

JavaScript

Anyone know why it creates these tilde (~) files? Also anyone know a quick way to delete them?

Advertisement

Answer

Anyone know why it creates these tilde (~) files?

That would be because of the -b option you are specifying to rsync. Its purpose is to request exactly that (creation of backup files for destination files that are being replaced).

Also anyone know a quick way to delete them?

If there is no subdirectory structure to deal with (for example, if you have presented the full list of files), then

JavaScript

would be sufficient. If you need to clean up backup files in subdirectories of that directory, too, then

JavaScript

would handle it.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement