mirror of
https://gogs.blitter.com/RLabs/xs
synced 2024-08-14 10:26:42 +00:00
Added cp.cmd file - notes on using tar to bundle/xmit/extract over link
This commit is contained in:
parent
04e8b94b5d
commit
c3f3bcb13f
1 changed files with 11 additions and 0 deletions
11
cp.cmd
Normal file
11
cp.cmd
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
## Template for copying files from local to remote site, destdir DEST:
|
||||||
|
tar -cz -f - testdir/sub1/bar.txt | \
|
||||||
|
tar -xzv -C DEST --xform="s#.*/\(.*\)#\1#"
|
||||||
|
|
||||||
|
# Note the --xform= option will strip leading path components from the file
|
||||||
|
# on extraction (ie., throw away dirtree info when copying into remote DEST)
|
||||||
|
#
|
||||||
|
# Probably need to have a '-r' option ala 'scp -r' to control --xform=
|
||||||
|
# (in the absence of --xform=.. above, files and dirs will all be extracted
|
||||||
|
# to remote DEST preserving tree structure.)
|
||||||
|
|
Loading…
Reference in a new issue