[LINUX] gzip memo

Compress files at maximum compression

# gzip -9 File name

When compressing a file and spitting it out to another location

# cat error_log | gzip -9 >> /tmp/error_log.gz

If you just want to see the contents of the compressed file

#zcat compressed file name

If you want to check a normal file with less, zless

#zless compressed file name

You can use zgrep when you want to find a part of a compressed file that contains a specific string.

#zgrep string compressed file name

This is also the same result
#zcat compressed file name|grep string

You can check the contents of the tar + gzip compressed (tar zcpvf xxx.tgz aaa bbb) file with less.

Recommended Posts

gzip memo
Raspberry-pi memo
Pandas memo
HackerRank memo
Python memo
python memo
graphene memo
Flask memo
pyenv memo
Matplotlib memo
pytest memo
sed memo
Python memo
Install Memo
BeautifulSoup4 memo
networkx memo
python memo
tomcat memo
command memo
Generator memo.
psycopg2 memo
Python memo
SSH memo
Command memo
Memo: rtl8812
pandas memo
Shell memo
Python memo
Pycharm memo
Python memo
AtCoder devotion memo (11/12)
[OpenCV] Personal memo
[Python] Memo dictionary
PyPI push memo
tensorflow-gpu introduction memo
LPIC201 learning memo
Jupyter Notebook memo
LPIC304 virtualization memo
ALDA execution memo
python beginner memo (9.2-10)
youtube download memo
Linux x memo
Django Learning Memo
ARC # 016 Participation memo
Beautiful Soup memo
LPIC101 study memo
python beginner memo (9.1)
linux (ubuntu) memo
scp command memo
Flask Primer Memo
celery / kombu memo
who command memo
django tutorial memo
Flask basic memo
Linux # Command Memo 1
★ Memo ★ Python Iroha
Gender recognition memo
Image reading memo
[MEMO] [TERMINAL] Alacritty
3D rotation memo (1)
[Python] EDA memo