Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 05-30-2009, 05:33 PM   #1
Registered: May 2008
Location: deep dark north wales
Distribution: Zenwalk
Posts: 162

Rep: Reputation: 30
use tar to print to stdout instead of file and do the opposite

I want to transfer a folder over ssh but if i compress it, ssh it over and then uncompress i will run out of disk spacee so i was wondering if i could do
ssh user@ipaddress 'tar <letters> <folder>'|tar <letters>
The idea being that it will take less time, send less info over the network and make transfering hundreds of files simpler

thanks in advance
Old 05-30-2009, 05:53 PM   #2
harry edwards
Registered: Nov 2007
Location: Lincolnshire, UK
Distribution: CentOS, Fedora, and Suse
Posts: 365

Rep: Reputation: 48
The man page states that "-" means stdin/stdout, so I think you will need that i.e.

ssh user@ipaddress 'tar <letters> <folder>'|tar - <letters>


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
redirect AND print stdout samel_tvom Programming 12 10-07-2012 05:37 PM
gave wrong syntax for tar as tar -cvzf file file.tgz how to recover the file gautham Linux - General 4 04-13-2005 03:15 AM
Redirecting stdout to tar hari_s_82 Linux - Newbie 6 10-08-2004 01:49 AM
Redirecting stdout from tar to a text file. heatlill Programming 2 01-22-2002 10:27 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:54 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration