⚡️ 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,
- How to Setup maven on Mac OS X
- vi undo redo command [Examples]
- Hide files and folders on Mac OS X
- Spell check not working in Gmail : Mac OS X
- Transfer files between Android and Mac OS X using usb cable
- How to enable Do Not Disturb mode for Notification Center in Mac OS X 10.10 Yosemite
- Find the location of Spotlight searched file
- Mac OS X Stuck During Booting Gray Screen Logo and Spinner
- [Mac] To open Eclipse you need to install the legacy java se 6 runtime
- Create a large dummy file using Mac OS X terminal command
- Java location in Mac OS X
- Take Screenshot on Mac OS X (Keyboard Shortcuts)
- How to Stop Photos App from auto loading when device connected to the Mac
- Pdf Text to Speech option in Mac OS X Preview App
- Remove Applications from Startup Mac OS X
- Install Apache Tomcat ver 8 on Mac OS X Yosemite 10.10
- Safari appends .html extension to files that are downloaded
- Mac OS X Taking Screen Capture using Terminal
- 4 Open Source SQLite Editor for Mac OS X , Windows and Linux
- Take Screenshots on Mac OS without Keyboard
- Disable Chrome Notification bell from Mac OS X menu bar
- Google Search Hot Trends Screensaver for Mac OS X
- How to Gzip a file directory on Mac OS X using Terminal Command
- Find Java JRE Installation location Mac OS X
- How to See Hidden Folders and Files on macOS
More Posts:
- Android SecurityException: Need BLUETOOTH ADMIN permissicacheNameAndAddresson: Neither user 10123 nor current process has android.permission.BLUETOOTH_ADMIN - Android
- java.lang.NoClassDefFoundError android.support.v4.content.LocalBroadcastManager - Android
- Read Text file from SD Card : Android Programming - Android
- Struts2 : java.lang.ClassNotFoundException: org.apache.commons.fileupload.RequestContext - Java
- How to know your Mac Screen Resolution? - MacOS
- BSNL Broadband upgrades speed to minimum 2MBps for all users 512Kbps 1Mbps - HowTos
- Android AlertDialog with 3 buttons example - Android
- How to Disable EditText Keyboard Android App - Android