From 57876ed0e7a10c1930c12020fa24c158791db3fe Mon Sep 17 00:00:00 2001 From: thylong Date: Fri, 26 Dec 2014 15:46:48 -0500 Subject: [PATCH 1/2] Add cheat for gzip --- cheat/cheatsheets/gzip | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 cheat/cheatsheets/gzip diff --git a/cheat/cheatsheets/gzip b/cheat/cheatsheets/gzip new file mode 100644 index 0000000..05269d8 --- /dev/null +++ b/cheat/cheatsheets/gzip @@ -0,0 +1,14 @@ +# To create a *.gz compressed file +gzip test.txt + +# To create a *.gz compressed file to a specific location using -c option (standard out) +gzip -c test.txt > test_custom.txt.gz + +# To uncompress a *.gz file +gzip -d test.txt.gz + +# Discplay compression ratio of the compressed file using gzip -l +gzip -l *.gz + +# Recursively compress all the files under a specified directory +gzip -r documents_directory \ No newline at end of file From 9506167af817b35a881894f370c68efb02186b07 Mon Sep 17 00:00:00 2001 From: thylong Date: Fri, 26 Dec 2014 15:46:48 -0500 Subject: [PATCH 2/2] Add cheat for gzip --- cheat/cheatsheets/gzip | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 cheat/cheatsheets/gzip diff --git a/cheat/cheatsheets/gzip b/cheat/cheatsheets/gzip new file mode 100644 index 0000000..74cd174 --- /dev/null +++ b/cheat/cheatsheets/gzip @@ -0,0 +1,17 @@ +# To create a *.gz compressed file +gzip test.txt + +# To create a *.gz compressed file to a specific location using -c option (standard out) +gzip -c test.txt > test_custom.txt.gz + +# To uncompress a *.gz file +gzip -d test.txt.gz + +# Display compression ratio of the compressed file using gzip -l +gzip -l *.gz + +# Recursively compress all the files under a specified directory +gzip -r documents_directory + +# To create a *.gz compressed file and keep the original +gzip < test.txt > test.txt.gz \ No newline at end of file