Copying local files with curl [closed] Copying local files with curl [closed] unix unix

Copying local files with curl [closed]


You could say:

curl -o /path/to/destination file:///path/to/source/file 

This would copy /path/to/source/file to /path/to/destination.


you can use rsync

rsync -avz /path/to/src/file /path/to/dst/dir

You can also use tar

cd /path/to/src/dir; tar -cpf - sourcefile | (cd /path/to/dest/dir; tar -xpf -)

if your tar support -C

cd /path/to/src/dir; tar -cpf - sourcefile | tar -xpf - -C /path/to/dest/dir