-
Website
http://www.tech-recipes.com/ -
Original page
http://www.tech-recipes.com/rx/64/tar-and-compress-a-file-in-one-step/ -
Subscribe
All Comments -
Community
-
Top Commenters
-
davak
83 comments · 1 points
-
Web Design
3 comments · 1 points
-
danishbacker
9 comments · 1 points
-
flexinfo
11 comments · 1 points
-
Tonychelle
4 comments · 1 points
-
-
Popular Threads
-
Facebook: How To Get Only Status Updates on Your FB Home Page
1 week ago · 4 comments
-
Firefox: Enable Case Sensitive Searches When Using Find (Ctrl+F)
4 days ago · 1 comment
-
Windows 7: How To Disable Live Preview for Taskbar Thumbnails
1 week ago · 2 comments
-
Gmail: How to block a sender from your inbox
2 weeks ago · 3 comments
-
Our first iPhone game GreenThumb available in the App Store
3 weeks ago · 2 comments
-
Facebook: How To Get Only Status Updates on Your FB Home Page
You must already have the hostkey from the remote machine (i.e., logged in at least once) otherwise this will fail. SSH allows you to connect to a remote machine and pass a commandline rather than firing up an interactive shell. The output is then dumped to your local console for further processing.
Before you scratch your head, think of this. You have a machine that has virtually no space left (or at least, not enough to make that tarball). qmchenry's post shows you how to get tar to spool the archive to stdout:
tar -cf - target
What if you can capture that to your own workstation, which probably has ample space. Picture this:
ssh user@remotemachine "cd /path;tar -cf - target | gzip -c" > /path/target.tgz
You've just had the remote machine produce a tarball, run it through gzip, and dump the results to stdout. You just captured that at your own workstation, and saved the results.
tar -cvf - mySelection | gzip -c | (cd myNewDirectory ; gzip -dc | tar xvf -)
make this match to your own needs...
tar -cf /home/eaips/var/fileName.tar /home/eaips/var/fileName
gzip /home/eaips/var/fileName.tar
tar -cf - /home/eaips/var/fileName | gzip -c > /home/eaips/var/fileName.tar.gz
gtar -cvzf target output.tgz