MavericksOver the last few years OS X has got progressively more intuitive memory management, however – it’s still not completely flawless. This is obvious when using Virtual Machine technologies such as VMWare Fusion, OS X is not overly quick ‘mopping’ up memory once fusion is closed down. Which is where the terminal command PURGE comes in.

The purge command cleans out the memory and disk caches, and by doing a purge you are essentially replicating a system reboot.

To perform a purge, follow the instructions below:

  1. Open Finder
  2. Open the Utilities folder
  3. Open a terminal window
  4. Copy and paste the following line in:
    sudo purge
  5. Press return
  6. Enter your admin password
  7. Press return

This one is worth a shot if you’re busy opening/closing applications and you feel performance slipping.



Terminal
One feature which seems to divide the masses is OS X’s ability to relaunch your applications on startup/reboot. This feature is know as Apple Persistence, which is personally a feature I am not really a fan of. It’s very rare for me to want the same applications on each use of my MacBook, asides from the obvious email and unified comms clients of course.

So – to disable to ‘persistent’ application mode simply follow these simple steps below

  1. Open the Utilities folder
  2. Open a terminal window
  3. Copy and paste the following line in:
    sudo defaults write -g ApplePersistence -bool no
  4. Enter your password and press enter

Now the next time you reboot, you’ll be greeted with your beautiful desktop wallpaper, and not the plethora of apps and browser windows.

If you decide you miss the feature, all you need to do is switch the boolean value back to yes:

sudo defaults write -g ApplePersistence -bool yes


ChromeGoogle Chrome for OS X generally doesn’t play well with proxy servers, especially those that require NTLM authentication. Those who have tried to use it in the past will be greeted with a constant barrage of proxy authentication prompts, each successful entry of credentials loads a tiny little bit more of the site..

However, there is a way to resolve this. Using a simple command in OS X terminal you can enable NTLM authentication in Chrome, and only have to enter your credentials once.

  1. Open Finder
  2. Open the Utilities folder
  3. Open a terminal window
  4. Copy and paste the following line in:
    Sudo /Applications/Google Chrome.app/Contents/MacOS/Google Chrome --auth-schemes="ntlm"
  5. Enter your password and press enter
  6. Now quit and relaunch all Chrome windows.

That’s it. You should never be prompted again, at least not until you change your password.



Mike Hudson WhoIs ScreenshotDid you know that you can obtain domain whois information for any web domain using
nothing but OS X Terminal?

For years I’ve used many web services including (and probably my favourite) CentralOps, however, sometimes its handy to be able to do things without leaving the comfort of your current terminal session!

So.. To get some of the information web services can provide, launch Terminal and type:

whois google.co.uk

NOTE: You can replace google.co.uk with the domain name of your choice.

WHOIS (pronounced as the phrase who is) is a query and response protocol that is widely used for querying databases that store the registered users or assignees of an Internet resource, such as a domain name, an IP address block, or an autonomous system, but is also used for a wider range of other information. The protocol stores and delivers database content in a human-readable format. The WHOIS protocol is documented in RFC 3912.

Source



20130330-212630.jpg

One of the powerful features of OS X built-in spotlight is its ability to search the contents of files for your search string.. However, for reasons yet unknown, I have found this functionality to sometimes be a little hit and miss..

Which is where Terminal comes in.. Using a single line terminal command OS X will rapidly return all the files containing the text you are looking for.

First of all, for this example you need to first set your current path in terminal to the folder containing the files you want to query.

Then type/copy & paste the following

grep -l "Search String" File.Extentions

So for example, should you want to find all the text files containing the word AppleScript, you would use the following command:

grep -l AppleScript *.txt

To expand of the example above, should you want to extend that and search sub folders all you need to do is add ‘r’ for recursive:

grep -lr AppleScript *.txt

This will now return all text files in the folder and subfolder containing the term AppleScript.




Page 1 of 3123