![]() Z extension to replace them in the current directory, so you only need to specify the file name you want to restore, but it's alright if you call it with the. The uncompress wrapper works like gzip -cd but it looks for files with the. This is very useful if you need to check the content of a file really quick, and you can even save the output of zcat to a file, just as easy. So you can basically pipe your files to zcat to have them decompressed on the terminal window. zcat īut fear not! zcat it's still useful, because it can decompress from standard output. The only drawback is that your files need to be suffixed with the. gzip -cd > anotherfileĪnother quick way of reading the content of a gzip to standard output is zcat, it's basically the same as calling gzip -cd but you can call multiple files and have them concatenated the same way as the cat command concats text files. We can also pipe the decompressed file to the standard output to save it to another file. There's also a shortcut called gunzip that will do the same. This mode will replace the file with filename.ext in the same directory. The decompression mode of gzip is called with the -d flag. To restore a file to it's uncompressed natural state you can use gzip or other of the wrappers. The following command replaces filename.ext with in the same directory. They make for a "smarter" gzip, as it doesn't compress the file if it would grow after the compression process. OS X also comes with the compress and uncompress commands. ![]() We can also compress from standard input, so we can compress the output of other commands. If you don't want to lose your original file, then you need to pipe the output of gzip -c to a file. The most basic command will compress the file filename.ext and then replace it with in the same directory. If somebody is still finding this question when searching "gzip in Mac", I wrote a guide that it may be useful to somebody else. ![]()
0 Comments
Leave a Reply. |