Check tutorial of 9 Command Line Tricks for Mac OS X You Should Know
So after a lot of requests from our users here is a guide about 9 Command Line Tricks for Mac OS X You Should Know.
The command line is often considered the domain of advanced users, but that doesn’t mean that every use of Terminal should involve rocket science. This collection terminal tips should apply to a wide variety of Mac users, and everyone from beginners to advanced users should find something worthwhile here.
Some of these tricks may require Xcode to be installed on Mac, Xcode is a free download from the App Store.
Avoid screen saver and sleep with ‘caffeine’
New in OS X Mountain Lion, Caffeine is like a command line version of everyone’s favorite caffeine utility. The use is simple: with caffeine on the Mac, the Mac does not sleep and screensavers are not activated. At its simplest it can be run on its own, but it’s probably best to use with a time limit attached, such as:
The -t flag indicates the time in seconds, in the example above one hour of caffeine is used.
Extract PKG files with “pkgutil”
Do you want to extract a file from a .pkg file? Maybe you want to see what’s in a package without installing it? No sweat, pkgutil does the job:
pkgutil –expand sample.pkg ~ / Desktop /
This will dump the entire contents of the package into the specified directory without installing it.
Use “purge” for Free Up Memory
The purge command forcibly flushes the disk and memory caches with the same effect as restarting a Mac. While some say that cleaning only provides a placebo effect, it definitely works to return system memory from the “Inactive” category to the freely available RAM, and in situations where you are low on real memory, it can give a speed boost.
Using purge is easy, type the following at a command prompt:
Wait about a minute for the changes to take effect, the process is usually much faster on Macs with SSD drives.
Start multiple instances of apps with ‘open’
You may already know that you can open applications in the OS X GUI from the command line with the ‘open’ command, but did you know that you can run multiple instances of apps by attaching the -n flag to the open command? It’s easy to use, here’s everything you need to do:
open -n /Applications/Safari.app/
In the example, another instance of Safari is running. Change the app name accordingly and don’t forget to include the .app extension.
Updating OS X without the App Store
Want to install system software and updates without worrying about the Mac App Store? You can do that directly from the command line using the software update command. To install any available update, run the following:
sudo software update -i -a
You can read more about the software update command here, it’s been bundled in OS X for years and works the same no matter what version you’re using.
List everything you’ve ever downloaded
We’ve all been there before; a while ago you downloaded something from a domain that you remember a little bit, but you don’t know exactly what or where from. You’re in luck, because Quarantine Services keeps a database of everything ever downloaded, and you can search that database to find what you were looking for. To see everything, use the sqlite3 command as follows:
sqlite3 ~ / Library / Preferences / com.apple.LaunchServices.QuarantineEventsV * ‘select LSQuarantineDataURLString from LSQuarantineEvent’ | Lake
You can of course also delete that list if existence bothers you.
Hide files or folders in the Finder with “chflags”
Do you have a secret file or folder that you want to keep hidden in the Finder? Use chflags to make any file invisible from the OS X GUI file system, it works the same whether you point it to a file or a folder:
chflags hidden / path / to / file / or / folder /
Luck (or bad luck) for us humans on the command line, the file will still be visible with ls, but it will remain hidden in the Finder until the “nohidden” flag is attached like this:
chflags nohidden / path / to / unhide /
Changes are immediate in either case.
Automatically type long paths with drag and drop
Did you know that you can drag and drop any file from the Finder to the command line and the full path to that file will be printed automatically? This is not just a command line tip, but it is so useful that it must be included. This is probably best used in conjunction with a prefix command such as:
sudo vi (drag the file here to print the full path)
This works anywhere on the command line, even if you’re already in an app.
Create a password protected zip archive
If you are sending a file via unsecured medium or publicly hosted, but still want to provide some level of protection, you can create a password-protected zip archive with the -e flag:
zip -e protected.zip / file / to / protect /
Without the -e flag, you just create a standard zip file with no password.
9 Command Line Tricks for Mac OS X You Should Know Guide is free?
This guide is a free model
Free Trial: May be included, please check on the official site, we mentioned above.
The 9 Command Line Tricks for Mac OS X You Should Know tutorial price is Free or Freemium. This means you can truly enjoy the 9 Command Line Tricks for Mac OS X You Should Know guide.
The 9 Command Line Tricks for Mac OS X You Should Know guide gives you an easy-to-use and efficient management and 9 Command Line Tricks for Mac OS X You Should Know allows you to focus on the most important things. It’s friendly guide to use maybe you will love it and 9 Command Line Tricks for Mac OS X You Should Know tutorial can be used on Linux, Windows or android devices.
9 Command Line Tricks for Mac OS X You Should Know: benefits
- The 9 Command Line Tricks for Mac OS X You Should Know tutorial is free .
- Helps many users follow up with interest in a timely manner.
- The price of the 9 Command Line Tricks for Mac OS X You Should Know guide is free.
9 Command Line Tricks for Mac OS X You Should Know: FAQ
Tutorial Summary: 9 Command Line Tricks for Mac OS X You Should Know
How this tutorial helping you?
What is actual time in which this method complete?
What are the supported Device?
What are the supported Operating system?
9 Command Line Tricks for Mac OS X You Should Know Tutorial: final note
For our visitors: If you have any queries regards the 9 Command Line Tricks for Mac OS X You Should Know, then please ask us through the comment section below or directly contact us.
Education: This guide or tutorial is just for educational purposes.
Misinformation: If you want to correct any misinformation about the guide “9 Command Line Tricks for Mac OS X You Should Know”, then kindly contact us.
Want to add an alternate method: If anyone wants to add the more methods to the guide 9 Command Line Tricks for Mac OS X You Should Know, then kindly contact us.
Our Contact: Kindly use our contact page regards any help. You may also use our social and accounts by following the Whatsapp, Facebook, and Twitter for your questions. We always love to help you. We answer your questions within 24-48 hours (Weekend off).
Channel: If you want the latest software updates and discussion about any software in your pocket, then here is our Telegram channel.