Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to transfer all files from within a directory through tar as follows:

tar cz * | ssh -p 57310 root@example.com tar xzv -C /home/site/www

and the error that is returned is

stdin: is not a tty
tar: includes: file changed as we read it
tar: /home/site/www: Cannot chdir: No such file or directory
tar: Error is not recoverable: exiting now

I am connecting to example.com using ssh key.

share|improve this question

migrated from stackoverflow.com May 6 '13 at 8:46

This question came from our site for professional and enthusiast programmers.

1 Answer 1

up vote 4 down vote accepted

This works for me:

 tar cz * | ssh -p XXX account@host "cat | tar xvz -C /home/site/www"
share|improve this answer
    
This worked great, thanks! –  user1074170 May 6 '13 at 4:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.