<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How to Create a Tar GZip File from the Command Line</title>
	<atom:link href="http://osxdaily.com/2012/04/05/create-tar-gzip/feed/" rel="self" type="application/rss+xml" />
	<link>http://osxdaily.com/2012/04/05/create-tar-gzip/</link>
	<description>News, tips, software, reviews, and more for Mac OS X, iPhone, iPad</description>
	<lastBuildDate>Fri, 24 May 2013 05:38:39 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: Shawn</title>
		<link>http://osxdaily.com/2012/04/05/create-tar-gzip/#comment-409386</link>
		<dc:creator>Shawn</dc:creator>
		<pubDate>Tue, 24 Jul 2012 07:52:54 +0000</pubDate>
		<guid isPermaLink="false">http://osxdaily.com/?p=29167#comment-409386</guid>
		<description>I have no trouble creating the .tgz; The trouble for me is creating the tarball in a separate directory without removing the original, and a checksum would be nice too, I just want to make sure everything went ok before I remove the files I want to send. Google has indexed and linked me here and though interesting I still think I should consult the man page because I just started picturing doing something with the pipe operator and I am confused on how James /\ sent anything like that without creating a namedpipe, Just baffled right now, and my e2fsck and fsck repair today, brought everything back that I can remember and it seemed more organized all numbered in the lost+found because I am sure I destroyed the file table but seeing as I know the physical layout of my flash, it wasn&#039;t too difficult, now in this sleepy state I say personal buttler tgz directly to another drive without removing the originals or trying to make a local copy first because space is scarce.. Or it would be done already.. and now I just inspired to create my first named pipe for mostly just the fun of it and hey why not I just did my first fsck recovery.. and it was easy.. and I didn&#039;t know ncat could do that.. that tool is handy.. Thanks for the read guyz.</description>
		<content:encoded><![CDATA[<p>I have no trouble creating the .tgz; The trouble for me is creating the tarball in a separate directory without removing the original, and a checksum would be nice too, I just want to make sure everything went ok before I remove the files I want to send. Google has indexed and linked me here and though interesting I still think I should consult the man page because I just started picturing doing something with the pipe operator and I am confused on how James /\ sent anything like that without creating a namedpipe, Just baffled right now, and my e2fsck and fsck repair today, brought everything back that I can remember and it seemed more organized all numbered in the lost+found because I am sure I destroyed the file table but seeing as I know the physical layout of my flash, it wasn&#8217;t too difficult, now in this sleepy state I say personal buttler tgz directly to another drive without removing the originals or trying to make a local copy first because space is scarce.. Or it would be done already.. and now I just inspired to create my first named pipe for mostly just the fun of it and hey why not I just did my first fsck recovery.. and it was easy.. and I didn&#8217;t know ncat could do that.. that tool is handy.. Thanks for the read guyz.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sinnebril</title>
		<link>http://osxdaily.com/2012/04/05/create-tar-gzip/#comment-398860</link>
		<dc:creator>Sinnebril</dc:creator>
		<pubDate>Fri, 15 Jun 2012 11:55:48 +0000</pubDate>
		<guid isPermaLink="false">http://osxdaily.com/?p=29167#comment-398860</guid>
		<description>I tried to converd a file by commandline to tar.gz extention, but I get an error: &quot;&#039;tar&#039;is not recognized as an internal or external command, operable program or batch file.&quot;
Do I need to install a program or do something else before running the command &quot;tar -cvzf jpegarchive.tar.gz /path/to/images/*.jpg&quot;?

Please help!</description>
		<content:encoded><![CDATA[<p>I tried to converd a file by commandline to tar.gz extention, but I get an error: &#8220;&#8216;tar&#8217;is not recognized as an internal or external command, operable program or batch file.&#8221;<br />
Do I need to install a program or do something else before running the command &#8220;tar -cvzf jpegarchive.tar.gz /path/to/images/*.jpg&#8221;?</p>
<p>Please help!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Create &#38; Extract bz2 Archives in Mac OS X</title>
		<link>http://osxdaily.com/2012/04/05/create-tar-gzip/#comment-392851</link>
		<dc:creator>Create &#38; Extract bz2 Archives in Mac OS X</dc:creator>
		<pubDate>Tue, 29 May 2012 22:27:54 +0000</pubDate>
		<guid isPermaLink="false">http://osxdaily.com/?p=29167#comment-392851</guid>
		<description>[...] it just compresses them. If you want to add a group of files to a bzip archive you&#8217;d want to use tar beforehand. Some versions of tar even support creating bz2 archives natively with the -j flag, but [...]</description>
		<content:encoded><![CDATA[<p>[...] it just compresses them. If you want to add a group of files to a bzip archive you&#8217;d want to use tar beforehand. Some versions of tar even support creating bz2 archives natively with the -j flag, but [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Theo Vosse</title>
		<link>http://osxdaily.com/2012/04/05/create-tar-gzip/#comment-373547</link>
		<dc:creator>Theo Vosse</dc:creator>
		<pubDate>Sat, 07 Apr 2012 07:43:41 +0000</pubDate>
		<guid isPermaLink="false">http://osxdaily.com/?p=29167#comment-373547</guid>
		<description>A .tar, .gz or .tar.gz file also unpacks with the default &quot;Archiver Utility&quot;, at least on 10.7.

That said, I think it&#039;s a good idea to have people use the command line, if only to get a feeling that under the hood there is something else than icons and windows.</description>
		<content:encoded><![CDATA[<p>A .tar, .gz or .tar.gz file also unpacks with the default &#8220;Archiver Utility&#8221;, at least on 10.7.</p>
<p>That said, I think it&#8217;s a good idea to have people use the command line, if only to get a feeling that under the hood there is something else than icons and windows.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Linuxy</title>
		<link>http://osxdaily.com/2012/04/05/create-tar-gzip/#comment-373109</link>
		<dc:creator>Linuxy</dc:creator>
		<pubDate>Fri, 06 Apr 2012 13:22:26 +0000</pubDate>
		<guid isPermaLink="false">http://osxdaily.com/?p=29167#comment-373109</guid>
		<description>I always advise people to use Linux from time to time, rather than just the Mac 100% of the time.

The benefits of using Linux as an alternative is that it forces you to gain useful technical knowledge that also applies to the Mac. It&#039;s like driving stick-shift.

Whereas... using Windows is a waste of time, I find.</description>
		<content:encoded><![CDATA[<p>I always advise people to use Linux from time to time, rather than just the Mac 100% of the time.</p>
<p>The benefits of using Linux as an alternative is that it forces you to gain useful technical knowledge that also applies to the Mac. It&#8217;s like driving stick-shift.</p>
<p>Whereas&#8230; using Windows is a waste of time, I find.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: abacus rosse</title>
		<link>http://osxdaily.com/2012/04/05/create-tar-gzip/#comment-372868</link>
		<dc:creator>abacus rosse</dc:creator>
		<pubDate>Fri, 06 Apr 2012 01:10:52 +0000</pubDate>
		<guid isPermaLink="false">http://osxdaily.com/?p=29167#comment-372868</guid>
		<description>I forget things like this so it&#039;s nice to have the refresher, sometimes we have our heads so thick in the sands of iOS and OS X that we forget the core of both operating systems is BSD unix.</description>
		<content:encoded><![CDATA[<p>I forget things like this so it&#8217;s nice to have the refresher, sometimes we have our heads so thick in the sands of iOS and OS X that we forget the core of both operating systems is BSD unix.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Floris</title>
		<link>http://osxdaily.com/2012/04/05/create-tar-gzip/#comment-372848</link>
		<dc:creator>Floris</dc:creator>
		<pubDate>Fri, 06 Apr 2012 00:43:49 +0000</pubDate>
		<guid isPermaLink="false">http://osxdaily.com/?p=29167#comment-372848</guid>
		<description>Old school knowledge, refreshed for the new generation of UNIX / Mac users. Thanks for writing it all out. Top notch.</description>
		<content:encoded><![CDATA[<p>Old school knowledge, refreshed for the new generation of UNIX / Mac users. Thanks for writing it all out. Top notch.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pfffffft</title>
		<link>http://osxdaily.com/2012/04/05/create-tar-gzip/#comment-372846</link>
		<dc:creator>Pfffffft</dc:creator>
		<pubDate>Fri, 06 Apr 2012 00:40:16 +0000</pubDate>
		<guid isPermaLink="false">http://osxdaily.com/?p=29167#comment-372846</guid>
		<description>Seriously, who the hell doesn&#039;t know how to create a tarball from the command line?

Yikes, have the script kiddies taken over or something?!</description>
		<content:encoded><![CDATA[<p>Seriously, who the hell doesn&#8217;t know how to create a tarball from the command line?</p>
<p>Yikes, have the script kiddies taken over or something?!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James</title>
		<link>http://osxdaily.com/2012/04/05/create-tar-gzip/#comment-372837</link>
		<dc:creator>James</dc:creator>
		<pubDate>Fri, 06 Apr 2012 00:26:31 +0000</pubDate>
		<guid isPermaLink="false">http://osxdaily.com/?p=29167#comment-372837</guid>
		<description>You really want a mind bender, how&#039;s this for fun: 

Had to copy hundreds of thousands of small files from a Linux server to a Mac over the LAN.  A normal cp operation is slow because it never gets a chance to increase the network bandwidth as it resets for each individual file. Watching a performance graph would show it peaking and falling for every individual file.  So the solution would be to tar gzip the files into one huge file and then copy that file.  Trouble was, there was not enough free disk space to handle the huge file.  

Netcat to the rescue!  Netcat is a very powerful tool it can open a raw network port and pass data through that port and it can listen for a raw data stream on the other end.  So the trick is to tar gzip the files and pipe the output (no filename) into nc directing nc to a network port number of choice.  Then on the receiving computer you listen with nc and pipe it&#039;s data to untar and ungzip the files on the receiving end.  

To give you an idea of how effective something like that is; the attempted copy operation over an SMB share ran for 5 hours and the Finder was still just calculating the number of files which at that point was well over 500,000 files! i.e. nothing had actually started to be copied! I tried using the cp command from terminal and it was only about a third of the way through the copy process having run overnight.  I aborted the copy process and setup nc to listen on a particular port and piped it&#039;s output to a tar gz command that would untar and ungzip the files to the required path.  Then on the sending system I created a tar gzip command and piped it&#039;s output to nc directing to the IP address of the receiving computer and the same network port.  The copy operation finished in 2 hours and looking at the network activity the Gigabit Ethernet adapter was almost completely saturated at 100%.  The performance graph rapidly peaked and stayed completely peaked the entire time the copy process ran.  

So essentially, the sending system executed tar and gzip operations storing the data in RAM while it pushed that data over netcat to a waiting netcat listening on a pre-determined network port where the files were pushed to a tar gzip command that decompressed the files.  Since there was a large continuous amount of data pumping through the network port, the amount of bandwidth increased exponentially until it maxed out the Ethernet card.  This allowed it to go as fast as it possibly could have run.  

The mind blowing part?  These tools are built in to OS X and every Unix system but they have been around for more than 20 years.  The whole Unix concept is small tools that do one thing very well and you connect the tools to one another via the pipe command.  

The funny part?  I&#039;ve been around the block for years and Windows cannot do this at all.  I don&#039;t even know of a single third party application that comes close to the way I was able to use tar gzip and netcat to speed up copying an enormous amount of data.  But I can boot a Windows box with a Linux USB flash drive and do it!

Let&#039;s have a few more articles about interesting things you can do with the Unix pipe and some little known command line programs!  

Disclaimer: The sending system was Linux running a newer GNU version of netcat while OS X includes the older FreeBSD version.  I had to use homebrew to install the GNU version of netcat on OS X to get it to work with the Linux system.  The command parameters vary a bit between the two netcat programs and I was unable to get the built-in OS X version of netcat to play nice with the Linux GNU version. 

Homebrew is a way to install Linux tools on OS X it&#039;s really simple and easy. http://mxcl.github.com/homebrew/ - for example OS X includes the curl command but maybe you want the wget command which is similar but maybe you are more familiar with wget.  Homebrew installs the add-on tools into a location that won&#039;t interfere with the normal OS X tools and if their names are the same, it will use the Homebrew one first.  Homebrew will not mess up your Mac, but it might confuse someone else trying to work on your Mac.</description>
		<content:encoded><![CDATA[<p>You really want a mind bender, how&#8217;s this for fun: </p>
<p>Had to copy hundreds of thousands of small files from a Linux server to a Mac over the LAN.  A normal cp operation is slow because it never gets a chance to increase the network bandwidth as it resets for each individual file. Watching a performance graph would show it peaking and falling for every individual file.  So the solution would be to tar gzip the files into one huge file and then copy that file.  Trouble was, there was not enough free disk space to handle the huge file.  </p>
<p>Netcat to the rescue!  Netcat is a very powerful tool it can open a raw network port and pass data through that port and it can listen for a raw data stream on the other end.  So the trick is to tar gzip the files and pipe the output (no filename) into nc directing nc to a network port number of choice.  Then on the receiving computer you listen with nc and pipe it&#8217;s data to untar and ungzip the files on the receiving end.  </p>
<p>To give you an idea of how effective something like that is; the attempted copy operation over an SMB share ran for 5 hours and the Finder was still just calculating the number of files which at that point was well over 500,000 files! i.e. nothing had actually started to be copied! I tried using the cp command from terminal and it was only about a third of the way through the copy process having run overnight.  I aborted the copy process and setup nc to listen on a particular port and piped it&#8217;s output to a tar gz command that would untar and ungzip the files to the required path.  Then on the sending system I created a tar gzip command and piped it&#8217;s output to nc directing to the IP address of the receiving computer and the same network port.  The copy operation finished in 2 hours and looking at the network activity the Gigabit Ethernet adapter was almost completely saturated at 100%.  The performance graph rapidly peaked and stayed completely peaked the entire time the copy process ran.  </p>
<p>So essentially, the sending system executed tar and gzip operations storing the data in RAM while it pushed that data over netcat to a waiting netcat listening on a pre-determined network port where the files were pushed to a tar gzip command that decompressed the files.  Since there was a large continuous amount of data pumping through the network port, the amount of bandwidth increased exponentially until it maxed out the Ethernet card.  This allowed it to go as fast as it possibly could have run.  </p>
<p>The mind blowing part?  These tools are built in to OS X and every Unix system but they have been around for more than 20 years.  The whole Unix concept is small tools that do one thing very well and you connect the tools to one another via the pipe command.  </p>
<p>The funny part?  I&#8217;ve been around the block for years and Windows cannot do this at all.  I don&#8217;t even know of a single third party application that comes close to the way I was able to use tar gzip and netcat to speed up copying an enormous amount of data.  But I can boot a Windows box with a Linux USB flash drive and do it!</p>
<p>Let&#8217;s have a few more articles about interesting things you can do with the Unix pipe and some little known command line programs!  </p>
<p>Disclaimer: The sending system was Linux running a newer GNU version of netcat while OS X includes the older FreeBSD version.  I had to use homebrew to install the GNU version of netcat on OS X to get it to work with the Linux system.  The command parameters vary a bit between the two netcat programs and I was unable to get the built-in OS X version of netcat to play nice with the Linux GNU version. </p>
<p>Homebrew is a way to install Linux tools on OS X it&#8217;s really simple and easy. <a href="http://mxcl.github.com/homebrew/" rel="nofollow">http://mxcl.github.com/homebrew/</a> &#8211; for example OS X includes the curl command but maybe you want the wget command which is similar but maybe you are more familiar with wget.  Homebrew installs the add-on tools into a location that won&#8217;t interfere with the normal OS X tools and if their names are the same, it will use the Homebrew one first.  Homebrew will not mess up your Mac, but it might confuse someone else trying to work on your Mac.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CraigMcNerdy</title>
		<link>http://osxdaily.com/2012/04/05/create-tar-gzip/#comment-372826</link>
		<dc:creator>CraigMcNerdy</dc:creator>
		<pubDate>Thu, 05 Apr 2012 23:48:03 +0000</pubDate>
		<guid isPermaLink="false">http://osxdaily.com/?p=29167#comment-372826</guid>
		<description>You can use the xzvf switch when untarring to avoid needing to use unzip (or gzip).

e.g. 
tar xzvf myTarFile.tar.gz

also you may find tarred/gzip files called .tgz
The file extension doesn&#039;t actually matter on these, but your readers should know this lil&#039; factoid.</description>
		<content:encoded><![CDATA[<p>You can use the xzvf switch when untarring to avoid needing to use unzip (or gzip).</p>
<p>e.g.<br />
tar xzvf myTarFile.tar.gz</p>
<p>also you may find tarred/gzip files called .tgz<br />
The file extension doesn&#8217;t actually matter on these, but your readers should know this lil&#8217; factoid.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced (User agent is rejected)
Database Caching 1/3 queries in 0.004 seconds using disk: basic
Object Caching 288/289 objects using disk: basic
Content Delivery Network via cdn.osxdaily.com

Served from: osxdaily.com @ 2013-05-24 01:50:35 -->