Create a Mavericks USB Key

Something that has been around for  while, but I’ve just stumbled across it, is Diskmaker X

This nifty app will do all the donkey work in creating a bootable Mac OS X USB Key, you just need to following

1. Mavericks Installation app from the Mac App Store

2. Diskmaker X app from their website

3. an empty 8GB USB Key

 

Once you have downloaded the Mavericks app from the App Store and Diskmaker X from their website, then insert your USB Key into your Mac

Run Diskmaker X

When prompted, choose 10.9

It will then look for your Mavericks app, when it finds it, choose ‘Use this copy’

Then if you are using an 8GB USB key, then choose  ‘An 8GB USB Thumb Drive’

If you are using a partition on a larger drive, then choose ‘Another kind of disk’

Confirm the choice of disk by clicking on ‘Choose this disk’

When it warns you about erasing the drive, confirm that you wish to continue by clicking on ‘Erase and create the disk’

You will then be warned that you will need to input your admin password, so click ‘Continue’ and then enter your admin username and password when prompted

The process is fully automated, so from now until completion it will take around an hour, maybe longer on slower machines, you will get a dialog box when it has completed, confirming this and asking you for a donation, it’s not compulsory, but as it is quite a useful app, its always good to encourage future development, so please consider it.

 

You can then boot into the USB from the Startup Disk option in System Preferences, or by holding down ALT when the machine boots up

 

Enjoy

CUPS – Web Interface disabled

If you’ve been trying to access the CUPS web interface on Mac OS X 10.8 then you may have run into this error message

“The web interface is currently disabled. Run “cupsctl WebInterface=yes” to enable it”

(to access CUPS, Open Safari & type http://localhost:631 in the address bar)

To rectify this, you basically do as it asks

Open Terminal & type the following

cupsctl webinterface=yes

Press Enter and then retry the web interface in Safari and you should now have access to CUPS again

Command Line – Search

In this item I will go through a couple of the commands you can use to locate files on your system.

find

Surprisingly enough, to find some files you can run find, examples of usage are below

find -x / -name filename

this will search your boot volume for files entitled filename

find / -name filename

this will search all mounted volumes (including network shares) for the file named filename, this can take rather a long time so probably best to specify the volume you wish to search

find . -name ‘*filename*’

this searches the current directory and subdirectories for any files with filename anywhere in their name

grep

Search the contents of text files and print lines containing the word searched for

grep searchterm ~/Documents/filename

searches the file called filename stored in my Documents folder, for the text ‘searchterm’

grep -R searchterm ~/Documents

searches through all the files and folders in my Documents folder for ‘searchterm’

grep -Rl searchterm ~/Documents

searches through all the files and folders in my Documents folder for ‘searchterm’, but this time it will only list the file path, not the contents of the file matching the ‘searchterm’

grep daemon /var/log/system.log

searches the system log for entries that mention ‘daemon’

For more info on additional options, check out their manuals

man find

man grep

 

Command Line – System Administration

In this article, I will run through a few commands used to admin your machine.

ps

used to list processes running on the system, examples of usage below

ps

List processes belonging to the current user that are attached to the terminal

ps -x

List processes belonging to the current user, whether or not they are attached to the terminal

ps -ax

List all running processes on the system

ps -aux 

List all the running processes on the system, with additional info about the resources used (most commonly used in trying to find the process causing a system slowdown)

top 

Lists the top CPU consuming processes on the system, this will run continuously though so type q to quit it

top

displays a list of processes, highest process ID (process spawned most recently) first, updates once every second

top -us5

Displays processes sorted by CPU usage, updates once every 5 seconds

kill

Used to kill processes, sometimes essential in restoring control to a hung GUI

kill ###

replace ### with the number of the process you wish to terminate and it should end

kill -1 ###

tells process ### to hang up, which is basically like restarting or reloading the process

kill -9 ###

tells process ### to terminate instantly, like a force quit option in the GUI

ifconfig

Used to view the current network configuration, you can use it to change settings but these may not stick after a reboot, so to enforce changes use the Network preference pane in System Preferences

ifconfig -a

List the computers network ports and their settings

lsof

Used to list open files on the machine

lsof

Lists all files currently open by the you and your processes

sudo lsof

Lists all files currently open by any user on the entire system

sudo lsof -i

Lists all open network connections on the entire system

sudo lsof “/Volumes/External_Drive”

Replace External_Drive with the name of your USB Key or External Hard Drive and it will list all the open files on that volume, useful when a drive won’t eject due to something still using that device.

For more info on the functions listed above just type man followed by their name

man ps

man top

man kill

man ifconfig

Zip Files – 4GB Limit?

It appears that originally, Zip files had a 4GB limit, and the software that is part of the Mac OS is only able to open files under this size

If you have zip archives over 4GB then you will need software capable of extracting this, thankfully there is The Unarchiver, a free app from http://wakaba.c3.cx/s/apps/unarchiver.html

Download and install the App into Applications by dragging it there

For ease of use I will put the icon in the dock, then you can just drag a zip archive to the icon to begin extraction