⚡️ Usage: gzip [OPTION]... [FILE]... - Compress or uncompress FILEs (by default, compress FILES in-place).
If you want to gzip a file or a directory, you can do it by running a simple command using Terminal.
- Go to Spotlight Search and type Terminal and Open it,
- Now browse to the location where the file or folder is presently using the cd command. (eg. if the file is situated on the desktop: cd /Users/your-mac-user-name/Desktop/
- Now simply type gzip followed by the file name with extension.
Example for single file : gzip filename.txt
Example for dir : tar cvf - myDirToCompress | gzip > myDirToCompress.gzip
Need more details - type "gzip -h" to get help!
-a, --ascii ascii text; convert end-of-line using local conventions
-c, --stdout write on standard output, keep original files unchanged
-d, --decompress decompress
-f, --force force overwrite of output file and compress links
-h, --help give this help
-k, --keep keep (don't delete) input files
-l, --list list compressed file contents
-L, --license display software license
-n, --no-name do not save or restore the original name and timestamp
-N, --name save or restore the original name and timestamp
-q, --quiet suppress all warnings
-r, --recursive operate recursively on directories
--rsyncable make rsync-friendly archive
-S, --suffix=SUF use suffix SUF on compressed files
--synchronous synchronous output (safer if system crashes, but slower)
-t, --test test compressed file integrity
-v, --verbose verbose mode
-V, --version display version number
-1, --fast compress faster
-9, --best compress better
With no FILE, or when FILE is -, read standard input.
⛔️ Warning: When you gzip compress file using gzip command on the Mac the original file is deleted!!
More Posts related to Mac-OS-X,
- Transfer files between Android and Mac OS X using usb cable
- Find Java JRE Installation location Mac OS X
- How to enable Do Not Disturb mode for Notification Center in Mac OS X 10.10 Yosemite
- Remove Applications from Startup Mac OS X
- Open New tab using keyboard shortcut in Mac Terminal
- Create a large dummy file using Mac OS X terminal command
- Hide files and folders on Mac OS X
- Install Apache Tomcat ver 8 on Mac OS X Yosemite 10.10
- Location of eclipse.ini file on Mac OS X
- Take Screenshots on Mac OS without Keyboard
- [Solved] Dynamic Web Module 3.0 requires Java 1.6 or newer Mac OSX
- Mac OS X Taking Screen Capture using Terminal
- How to Stop Photos App from auto loading when device connected to the Mac
- Change Mouse Scrolling in Mac OS X
- How to Setup maven on Mac (macOS)
- Mac Studio Display Buzzing sound from the Monitor
- 4 Open Source SQLite Editor for Mac OS X , Windows and Linux
- Save webpage as pdf in Google Chrome for Mac OS X
- vi undo redo command [Examples]
- How to See Hidden Folders and Files on macOS
- [Mac] To open Eclipse you need to install the legacy java se 6 runtime
- Java location in Mac OS X
- Safari appends .html extension to files that are downloaded
- Pdf Text to Speech option in Mac OS X Preview App
- How to run Gradle from Mac Terminal (Command Line)
More Posts:
- How to open new Terminal using Bash Command - Bash
- Bash Command to Find String in a File - Bash
- Horizontally Center Align tag in HTML using CSS - CSS
- Find and Replace Multiple different words with the same word in a text file - NotepadPlusPlus
- How to Manage Profile Picture on Microsoft Teams - Teams
- Using Java 8 Month Enum with Examples - Java
- PowerShell: How to Write Output to a File - Powershell
- How to Find the Location of Notepad on Windows 11 - Windows