linuxwindowsunixxcopy

Xcopy for other os


I am loocking for an equivalent of windows's xcopy /s /q /e /h /i folder0 folder1 for other os(mainley the most common like linux and unix). This is for exportability on a (python) script I am writing.


Solution

  • I think you can try for Linux systèmes :

    cp -a folder1 folder2

    In your python script you can use:

    import subprocess subprocess.run(["cp", "-a"])

    It should do the job