Wednesday, 26 December 2012

Command line Tricks for Mac OS X

In general cases, the command line is often considered for advanced users. Some command line tips will help you to do your task in easy way . This collection of terminal tips should apply to a wide variety of Mac users, and everyone from beginners to advanced users. 

1. Use “purge” command to Free Up Memory:- This command flushes the disk and memory cache and it can provide a speed boost. Type purge on terminal and wait a minute or so for changes to take effect, the process is usually much faster on Macs with SSD drives.

2. Extract PKG Files with “pkgutil”:- Type pkgutil --expand sample.pkg ~/Desktop/ on command line, you will see the content wrapped inside the file.

4. Prevent Screen Savers and Sleep with “caffeinate”:- New to OS X Mountain Lion, caffeinate is like a command line version of everyones favorite Caffeine utility. With caffeinate running the Mac will not sleep, and screen savers will not activate.

5. Updating OS X without the App Store:- You can update software and your Mac OS without visiting Apple Store. Just type this command:-
sudo softwareupdate -i -a

6. List Everything You’ve Ever Downloaded:- You downloaded something a while ago from a domain you sort of remember, but you can’t quite remember what or from where, just type this command:-
sqlite3 ~/Library/Preferences/* 'select LSQuarantineDataURLString from LSQuarantineEvent' |more
You can delete this list also.

7. Hide Files or Folders from Finder with “chflags”:- Use chflags command to keep any file invisible from the OS X GUI file system, just type chflags hidden /path/to/file/or/folder/

8. Password protected Zip Archive:- you can create a password protected zip archive with the -e flag: zip -e /file/to/protect/

9. Automatically Type Long Paths with a Drag & Drop:- You can drag and drop any file from the Finder into the command line and the entire path to that file will be automatically printed? This isn’t exclusively a command line tip, but it’s very useful that it has to be included.

These commnds will help you to do your work easily and fast on Mac.

No comments:

Post a Comment

We do not accept comments containing with links.