Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Any idea?
#2
I use rsync regularly, but never from Python. Why would you do that?

Look here in linuxquestions.org, an answer from michaelk, who has helped me many times!

Quote:arg="rsync -avn "+ bk_src_dir + " " + bk_tar_dir
subprocess.run(arg,shell=True)

Basically, he made a string called arg:

Quote:"rsync -avn "+ bk_src_dir + " " + bk_tar_dir

then handed it to subprocess.run()

Either this post in lq was you, or you are copying it!

Canondale said this works in a terminal:

Quote:rsync -a /home/jer/.[^.]*/ /Temp
Reply


Messages In This Thread
Any idea? - by Cloved1945 - Sep-12-2024, 07:42 AM
RE: Any idea? - by Pedroski55 - Sep-12-2024, 05:33 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020