Command to create tar.gz file
The benefits of using Linux as an alternative is that it forces you to gain useful technical knowledge that also applies to the Mac. Umm, windows has its uses, such as gaming, but yes, linux is like using stick-shift mac. Thanks for writing it all out. Top notch. I have no trouble creating the.
Or it would be done already.. Thanks for the read guyz. TBH, i cant remember the command, so this article is my goto when i need to tar and gzip something.
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. 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 , files! 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.
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. Ask Question.
Asked 10 years, 3 months ago. Active 2 years ago. Viewed 53k times. Improve this question. Dherik 1 1 gold badge 5 5 silver badges 16 16 bronze badges. Add a comment. Active Oldest Votes. Now Windows supports a native tar command: tar -cvzf output. Improve this answer.
Serhiy Serhiy 1 1 gold badge 3 3 silver badges 15 15 bronze badges. If you'd like to do it in a one-liner: 7za. In my case, neither 7za. This is why when yopu open a tar. DGoiko I know that part -- I just didn't understand why the archive. These syntax options can be reordered, but a straight format must be followed.
The command line options are switches or flags that determined how the commands are executed or controlled. If you want to create an archived file called confidential. To create a new archive file using the tar. If you just want to extract the confidential. Your email address will not be published. This site uses Akismet to reduce spam. Learn how your comment data is processed. Ubuntu Linux.
0コメント