Avatar of willlandymore
willlandymore
Flag for United States of America asked on

delete files/directories from source after rsync is done?

I'm running an rsync script and it's working well. I have something like:

rsync -rz "/mnt/source" "/mnt/destination"

I've tried the --delete-after switch with this but I can't delete the files from the source directory once it's done transferring.

Can anyone tell me how to totally empty the source once it's finished with the transfer?
LinuxLinux Networking

Avatar of undefined
Last Comment
farzanj

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
farzanj

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
willlandymore

ASKER
that makes sense... :)

Worked like a charm.
farzanj

Great :)
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck