Snippets Collections
#!/usr/bin/env python
import subprocess
from multiprocessing import Pool
import os

src = "/home/student-03-474f458f89e0/data/prod"
dest = "/home/student-03-474f458f89e0/data/prod_backup"

def run_sync(file):
    print(os.path.join(dest,file))
    subprocess.call(["rsync", "-arq", os.path.join(src,file), os.path.join(dest,file)])

if __name__ == "__main__":
    files = os.listdir(src)
    p = Pool(len(files))
    p.map(run_sync, files)

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension