Monday, October 26, 2009

An A-Z Index of the Apple OS X command line


  alias     Create an alias •
alloc List used and free memory
awk Find and Replace text within file(s)
b
basename Convert a full pathname to just a folder path
bash Bourne-Again SHell
bg Send to background •
bind Display readline key and function bindings •
bless Set volume bootability and startup disk options.
break Exit from a For, While, Until or Select loop •
builtin Execute a shell builtin •
bzip Compress or decompress files
c
cal Display a calendar
caller Return the context of a subroutine call •
case Conditionally perform a command •
cat Display the contents of a file
cd Change Directory •
chflags Change a file or folder's flags
chgrp Change group ownership
chmod Change access permissions
chown Change file owner and group
chroot Run a command with a different root directory
cksum Print CRC checksum and byte counts
clear Clear terminal screen
cmp Compare two files
comm Compare two sorted files line by line
command Run a command (not a function) •
complete Edit a command completion [word/pattern/list] •
continue Resume the next iteration of a loop •
cp Copy one or more files to another location
cron Daemon to execute scheduled commands
crontab Schedule a command to run at a later date/time
cut Divide a file into several parts
d
date Display or change the date & time
dc Desk Calculator
dd Data Dump - Convert and copy a file
declare Declare variable & set attributes •
defaults Set preferences, show hidden files
df Display free disk space
diff Display the differences between two files
diff3 Show differences among three files
dig DNS lookup
dirname Convert a full pathname to just a path
dirs Display list of remembered directories •
diskutil Disk utilities - Format, Verify, Repair
disown Unbind a job from the current login session •
ditto Copy files and folders
dot_clean Remove dot-underscore files
drutil Interact with CD/DVD burners
dscacheutil Query or flush the Directory Service/DNS cache
dscl Directory Service command line utility
du Estimate file space usage
e
echo Display message on screen •
ed A line-oriented text editor (edlin)
enable Enable and disable builtin shell commands •
env Set environment and run a utility
eval Evaluate several commands/arguments •
exec Execute a command •
exit Exit the shell •
expand Convert tabs to spaces
expect Programmed dialogue with interactive programs
Also see AppleScript
export Set an environment variable •
expr Evaluate expressions
f
false Do nothing, unsuccessfully
fc Fix command (history)
fdisk Partition table manipulator for Darwin UFS/HFS/DOS
fg Send job to foreground •
file Determine file type
find Search for files that meet a desired criteria
fmt Reformat paragraph text
fold Wrap text to fit a specified width
for Loop command •
fsck Filesystem consistency check and repair
fsaclctl Filesystem enable/disable ACL support
fs_usage Filesystem usage (process/pathname)
ftp Internet file transfer program
g
GetFileInfo Get attributes of HFS+ files
getopt Parse positional parameters
getopts Parse positional parameters •
goto Jump to label and continue execution
grep Search file(s) for lines that match a given pattern
groups Print group names a user is in
gzip Compress or decompress files
h
hash Refresh the cached/remembered location of commands •
head Display the first lines of a file
hdiutil Manipulate iso disk images
history Command History •
hostname Print or set system name
i
id Print user and group names/id's
if Conditionally perform a command •
info Help info
install Copy files and set attributes
j
jobs List active jobs •
join Join lines on a common field
k
kextfind List kernel extensions
kickstart Configure Apple Remote Desktop
kill Stop a process from running
l
l List files in long format (ls -l)
last Indicate last logins of users and ttys
launchctl Load or unload daemons/agents
ll List files in long format, showing invisible files (ls -la)
less Display output one screen at a time
let Evaluate expression •
lipo Convert a universal binary
ln Make links between files (hard links, symbolic links)
local Set a local (function) variable •
locate Find files
logname Print current login name
login log into the computer
logout Exit a login shell (bye) •
lpr Print files
lprm Remove jobs from the print queue
lpstat Printer status information
ls List information about file(s)
lsregister Reset the Launch Services database
lsbom List a bill of materials file
lsof List open files
m
man Help manual
mdfind Spotlight search
mdutil Manage Spotlight metadata store
mkdir Create new folder(s)
mkfifo Make FIFOs (named pipes)
more Display output one screen at a time
mount Mount a file system
mv Move or rename files or directories
n
net Manage network resources
netstat Show network status
networksetup Network and System Preferences
nice Set the priority of a command
nohup Run a command immune to hangups
ntfs.util NTFS file system utility
o
onintr Control the action of a shell interrupt
open Open a file/folder/URL/Application
osacompile Compile Applescript
osascript Execute AppleScript
p
passwd Modify a user password
paste Merge lines of files
pbcopy Copy data to the clipboard
pbpaste Paste data from the Clipboard
pico Simple text editor
ping Test a network connection
pkgutil Query and manipulate installed packages
plutil Property list utility
pmset Power Management settings
popd Restore the previous value of the current directory •
pr Convert text files for printing
printenv Print environment variables
printf Format and print data •
ps Process status
pushd Save and then change the current directory
pwd Print Working Directory •
q
quota Display disk usage and limits
r
rcp Copy files between machines
read Read one line from standard input •
readonly Mark a variable or function as read-only •
reboot Stop and restart the system
return Exit a function •
rev Reverse lines of a file
rm Remove files
rmdir Remove folder(s)
rpm Remote Package Manager
rsync Remote file copy - Sync file tree (also RsyncX)
s
say Convert text to audible speech
screen Multiplex terminal, run remote shells via ssh
screencapture Capture screen image to file or disk
sdiff Merge two files interactively
security Administer Keychains, keys, certificates and the Security framework
sed Stream Editor
select Generate a list of items •
set Set a shell variable = value •
setfile Set attributes of HFS+ files
shift Shift positional parameters •
shopt Set shell options •
shutdown Shutdown or restart OS X
sleep Delay for a specified time
softwareupdate System software update tool
sort Sort text files
source Execute commands from a file •
split Split a file into fixed-size pieces
stop Stop a job or process
su Substitute user identity
sudo Execute a command as another user
sum Print a checksum for a file
suspend Suspend execution of this shell •
sw_vers Print Mac OS X operating system version
system_profiler Report system configuration
systemsetup Computer and display system settings
t
tail Output the last part of files
tar Tape ARchiver
tee Redirect output to multiple files
test Condition evaluation •
textutil Manipulate text files in various formats (Doc,html,rtf)
time Measure Program Resource Use
times Print shell & shell process times •
touch Change file timestamps
tr Translate, squeeze, and/or delete characters
trap Execute a command when the shell receives a signal •
traceroute Trace Route to Host
true Do nothing, successfully
tty Print filename of terminal on stdin
type Describe a command •
u
ufs.util Mount/unmount UFS file system
ulimit limit the use of system-wide resources •
umask Users file creation mask
umount Unmount a device
unalias Remove an alias •
uname Print system information
unexpand Convert spaces to tabs
uniq Uniquify files
units Convert units from one scale to another
unset Remove variable or function names •
until Loop command •
users Print login names of users currently logged in
uuencode Encode a binary file
uudecode Decode a file created by uuencode
uuidgen Generate a Unique ID (UUID/GUID)
uucp Unix to Unix copy
v
vi Text Editor
w
wait Wait for a process to complete •
wc Print byte, word, and line counts
where Report all known instances of a command
which Locate a program file in the user's path
while Loop command •
who Print all usernames currently logged on
whoami Print the current user id and name (`id -un')
write Send a message to another user
x
xargs Execute utility - passing arguments
yes Print a string until interrupted

An A-Z Index of the Bash command line for Linux

  alias    Create an alias
apropos Search Help manual pages (man -k)
apt-get Search for and install software packages (Debian)
aspell Spell Checker
awk Find and Replace text, database sort/validate/index
b
bash GNU Bourne-Again SHell
bc Arbitrary precision calculator language
bg Send to background
break Exit from a loop
builtin Run a shell builtin
bzip2 Compress or decompress named file(s)
c
cal Display a calendar
case Conditionally perform a command
cat Display the contents of a file
cd Change Directory
cfdisk Partition table manipulator for Linux
chgrp Change group ownership
chmod Change access permissions
chown Change file owner and group
chroot Run a command with a different root directory
chkconfig System services (runlevel)
cksum Print CRC checksum and byte counts
clear Clear terminal screen
cmp Compare two files
comm Compare two sorted files line by line
command Run a command - ignoring shell functions
continue Resume the next iteration of a loop
cp Copy one or more files to another location
cron Daemon to execute scheduled commands
crontab Schedule a command to run at a later time
csplit Split a file into context-determined pieces
cut Divide a file into several parts
d
date Display or change the date & time
dc Desk Calculator
dd Convert and copy a file, write disk headers, boot records
ddrescue Data recovery tool
declare Declare variables and give them attributes
df Display free disk space
diff Display the differences between two files
diff3 Show differences among three files
dig DNS lookup
dir Briefly list directory contents
dircolors Colour setup for `ls'
dirname Convert a full pathname to just a path
dirs Display list of remembered directories
dmesg Print kernel & driver messages
du Estimate file space usage
e
echo Display message on screen
egrep Search file(s) for lines that match an extended expression
eject Eject removable media
enable Enable and disable builtin shell commands
env Environment variables
ethtool Ethernet card settings
eval Evaluate several commands/arguments
exec Execute a command
exit Exit the shell
expect Automate arbitrary applications accessed over a terminal
expand Convert tabs to spaces
export Set an environment variable
expr Evaluate expressions
f
false Do nothing, unsuccessfully
fdformat Low-level format a floppy disk
fdisk Partition table manipulator for Linux
fg Send job to foreground
fgrep Search file(s) for lines that match a fixed string
file Determine file type
find Search for files that meet a desired criteria
fmt Reformat paragraph text
fold Wrap text to fit a specified width.
for Expand words, and execute commands
format Format disks or tapes
free Display memory usage
fsck File system consistency check and repair
ftp File Transfer Protocol
function Define Function Macros
fuser Identify/kill the process that is accessing a file
g
gawk Find and Replace text within file(s)
getopts Parse positional parameters
grep Search file(s) for lines that match a given pattern
groups Print group names a user is in
gzip Compress or decompress named file(s)
h
hash Remember the full pathname of a name argument
head Output the first part of file(s)
history Command History
hostname Print or set system name
i
id Print user and group id's
if Conditionally perform a command
ifconfig Configure a network interface
ifdown Stop a network interface
ifup Start a network interface up
import Capture an X server screen and save the image to file
install Copy files and set attributes
j
join Join lines on a common field
k
kill Stop a process from running
killall Kill processes by name
l
less Display output one screen at a time
let Perform arithmetic on shell variables
ln Make links between files
local Create variables
locate Find files
logname Print current login name
logout Exit a login shell
look Display lines beginning with a given string
lpc Line printer control program
lpr Off line print
lprint Print a file
lprintd Abort a print job
lprintq List the print queue
lprm Remove jobs from the print queue
ls List information about file(s)
lsof List open files
m
make Recompile a group of programs
man Help manual
mkdir Create new folder(s)
mkfifo Make FIFOs (named pipes)
mkisofs Create an hybrid ISO9660/JOLIET/HFS filesystem
mknod Make block or character special files
more Display output one screen at a time
mount Mount a file system
mtools Manipulate MS-DOS files
mv Move or rename files or directories
mmv Mass Move and rename (files)
n
netstat Networking information
nice Set the priority of a command or job
nl Number lines and write files
nohup Run a command immune to hangups
nslookup Query Internet name servers interactively
o
open Open a file in its default application
op Operator access
p
passwd Modify a user password
paste Merge lines of files
pathchk Check file name portability
ping Test a network connection
pkill Stop processes from running
popd Restore the previous value of the current directory
pr Prepare files for printing
printcap Printer capability database
printenv Print environment variables
printf Format and print data
ps Process status
pushd Save and then change the current directory
pwd Print Working Directory
q
quota Display disk usage and limits
quotacheck Scan a file system for disk usage
quotactl Set disk quotas
r
ram ram disk device
rcp Copy files between two machines
read read a line from standard input
readonly Mark variables/functions as readonly
reboot Reboot the system
renice Alter priority of running processes
remsync Synchronize remote files via email
return Exit a shell function
rev Reverse lines of a file
rm Remove files
rmdir Remove folder(s)
rsync Remote file copy (Synchronize file trees)
s
screen Multiplex terminal, run remote shells via ssh
scp Secure copy (remote file copy)
sdiff Merge two files interactively
sed Stream Editor
select Accept keyboard input
seq Print numeric sequences
set Manipulate shell variables and functions
sftp Secure File Transfer Program
shift Shift positional parameters
shopt Shell Options
shutdown Shutdown or restart linux
sleep Delay for a specified time
slocate Find files
sort Sort text files
source Run commands from a file `.'
split Split a file into fixed-size pieces
ssh Secure Shell client (remote login program)
strace Trace system calls and signals
su Substitute user identity
sudo Execute a command as another user
sum Print a checksum for a file
symlink Make a new name for a file
sync Synchronize data on disk with memory
t
tail Output the last part of files
tar Tape ARchiver
tee Redirect output to multiple files
test Evaluate a conditional expression
time Measure Program running time
times User and system times
touch Change file timestamps
top List processes running on the system
traceroute Trace Route to Host
trap Run a command when a signal is set(bourne)
tr Translate, squeeze, and/or delete characters
true Do nothing, successfully
tsort Topological sort
tty Print filename of terminal on stdin
type Describe a command
u
ulimit Limit user resources
umask Users file creation mask
umount Unmount a device
unalias Remove an alias
uname Print system information
unexpand Convert spaces to tabs
uniq Uniquify files
units Convert units from one scale to another
unset Remove variable or function names
unshar Unpack shell archive scripts
until Execute commands (until error)
useradd Create new user account
usermod Modify user account
users List users currently logged in
uuencode Encode a binary file
uudecode Decode a file created by uuencode
v
v Verbosely list directory contents (`ls -l -b')
vdir Verbosely list directory contents (`ls -l -b')
vi Text Editor
vmstat Report virtual memory statistics
w
watch Execute/display a program periodically
wc Print byte, word, and line counts
whereis Report all known instances of a command
which Locate a program file in the user's path.
while Execute commands
who Print all usernames currently logged in
whoami Print the current user id and name (`id -un')
Wget Retrieve web pages or files via HTTP, HTTPS or FTP
write Send a message to another user
x
xargs Execute utility, passing constructed argument list(s)
yes Print a string until interrupted
. Run a command script in the current shell
### Comment / Remark

Top 50 Terminal Commands

Terminal

Top 50 Terminal Commands

Hey

Terminal is Mac OS X way into the command line world. It is designed for you to typing in specific commands that you would not be able to do otherwise. This is great for customizing your Mac and unveiling hidden features. It is also a good way to destroy you system because you screwed something up.

What I have done is crawl the web look of the Top 50 Terminal commands. These commands are designed to make you make look cooler, act quicker or be generally useful. I have tried to keep commands down to one line, so they are simple and effective to use. Each item will include a description of what it does as well as an appropriate picture is necessary. Many of these commands appear as seperate posts all over the web, but never in one big list. I have tried to keep the amount of sudo commands down to a minimum as this can easily destroy your system. Especially if you go sudoing every thing. I have tried to give the best description I can, if you have a problem leave a comment and I will see if I can solve it. The list is in no particular order. Most of the commands can be reverted by replacing YES with NO and 1 with 0, the opposite. Most of these commands are Leopard compatible and many may not work on Tiger. Try them and see what happens.

1) 2D Dock


This quite a popular hack for the people running Leopard and don’t like the 3D feel. It changes the 3D dock to a flat 2D version. To enter copy and past the following code.

defaults write com.apple.dock no-glass -boolean YES
killall Dock

2) Gradient Behind A Stack Item


One of my favourite hacks that enables you to put a small gradient behind an icon. I think this should be enabled by default.

defaults write com.apple.dock mouse-over-hilte-stack -boolean YES
killall Dock

3) Add A Message To The Login Window

This little Terminal command enables you to add a message of your choice to the Login window. Pretty cool and deserved a screenshot if I new how to take on while not logged in. Warning it’s a sudo command which can be dangerous.

sudo defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText "Your Message"

Replace “Your Message” with the message of your choice, don’t make it to long. If you want to revert it do the following.

sudo defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText ""

4) Add An Exposè Button To The Desktop

If you have reconfigured the F9 and F10 keys to something different you may want to use exposè. This hack adds a bigish blue button onto the desktop to enable you to use exposè. Clicking on it shows all the windows from one application (F10 default), option clicking it shows all windows (F9 default).


defaults write com.apple.dock wvous-floater -bool YES
killall Dock

5) Address Book Debug Menu

If you have some trouble with Address Book it may be useful to open up the debug menu as well as this use some of the hidden features. Make sure address book is closed first before applying the code. If you want to revert it remove YES in the string.


defaults write com.apple.addressbook ABShowDebugMenu -bool YES

6) Increase Dock Magnification Size

This little hack lets you increase the size of the magnification of the dock icons. Don’t go past 512.

defaults write com.apple.dock largesize -int 512

7) Increase Desktop Icon Size

If you want massive icons on you desktop this little hack lets you increase the icons to 512 pixels x 512 pixels. This is massive, may slow down on older machines. I don’t think it goes larger than 512.

defaults write com.apple.finder DesktopViewOptions -dict IconSize -integer 512
killall Finder

8) Changing the Format Of Screen Shots

If you use the screen shot function, you may want to change the format of the images, this is not easily done normally. Where jpg is in the code you can change this to the format your want, png bmp gif etc. You need to log out and back in again, or restart for the changes to take effect.

defaults write com.apple.screencapture type jpg

9) Change The Login Picture

If you get a bored of the space picture used on the login screen, you can change it with this little bit of code. Change the file location in the second half of the string to the exact file location of your chosen picture.

defaults write /Library/Preferences/com.apple.loginwindow DesktopPicture "/System/Library/CoreServices/Finder.app/Contents/Resources/vortex.png"

10) Change The Loading Bar In Safari To A Pie Chart


This is a Safari 3 hack, so it might not work. This changes the blue bar that goes across the address bar into a small blue pie chart. Insert false instead of true to reverse.

defaults write com.apple.Safari DebugUsePieProgressIndicator -bool true

11) Clear The Open With Menu

If you right click on a file you can open it with many applications. Sometimes your OS can get a little confused and list many applications. This is to clear this list and start again. The code below is all on one line.

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/
LaunchServices.framework/Versions/A/Support/lsregister
-kill -r -domain local -domain system -domain user

12) Change The Delay When Dragging Windows In Spaces

This simple hack changes the delay time it takes to drag windows around in spaces, its currently set to 0.75

defaults write com.apple.dock workspaces-edge-delay -float 0.5

13) Disable Dashboard

If you don’t want or like the dashboard running you can disable it. Change YES to NO to enable it again.

defaults write com.apple.dashboard mcx-disabled -boolean YES
killall Dock

14) Enable Double Scroll Arrows


This little hack enables the double arrow set for up and down, left or right, to be at both ends of the scroll bar. Handy if you like the double arrows. Use System Preferences to reset.

defaults write “Apple Global Domain” AppleScrollBarVariant DoubleBoth

15) Disable Tooltips In Safari

This quick little hack for Safari that removes the tooltips you get when you hover over certain elements.

defaults write com.apple.Safari WebKitShowsURLsInToolTips 0

16) Increase The Dock Size

Command #6 enables you to change the magnification. This command enables you to change the size of the dock. Use the sliders in System Preferences to reduce this size. Don’t go larger 256.

defaults write com.apple.dock tilesize -int 256

17) Disable the Crash Dialog Box

This disables the quit dialog box when an application crashes. Type prompt to enable again.

defaults write com.apple.CrashReporter DialogType none

18)Drag A Widget Onto The Desktop


Probably one of the coolest hacks. This command enables widgets to be placed onto the desktop. Drag a widget around and press F12 to drag it onto the desktop. Repeat the process again to drag a widget back onto the dashboard. This may need you to log off or restart for it to take effect.

defaults write com.apple.dashboard devmode YES

19) Enable Debug Menu In Safari


Adding debug menus to programs is great as you can access a whole range of features. This one is for Safari.

defaults write com.apple.Safari IncludeDebugMenu 1

20) Enable The Path View In Finder


One of may favourite hacks as it lets you see the current path of the Finder window you are in. Its great if you work with a lot of windows.

defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES

21)Enable Time Machine On Unsupported Drives


Another favourite hack of mine, simply because it enable Time Machine to work on unsupported drives such as a NAS. Use with caution as it is unsupported.

defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

22) Enable Web Inspector


This is a very detailed web inspector that enables you to find out specific information about a page. It is accessible through the debug menu but this enables you to use it without. You can quickly access it through right-click.

defaults write com.apple.Safari WebKitDeveloperExtras -bool true

23) Enable Debug in iCal

Another debug menu (I like debug menus) this time its for iCal. You need to restart iCal for the changes to take effect.

defaults write com.apple.iCal IncludeDebugMenu YES

24) Enable Quit In Finder


This is a very useful command for anyone who does a lot of fiddling and needs to quit Finder.

defaults write com.apple.finder QuitMenuItem -bool YES
killall Finder

25) Force Mail To Display In Plain Text

If you have problems with HTML emails or you just want emails to be displayed in plain text use the following command. You need to restart Mail for the changes to take effect. Replace with false to revert.

defaults write com.apple.mail PreferPlainText -bool TRUE

26) Increase Time Machine Backups

If you do a lot of work on you Mac, and you want time machine to back up more frequently you need to change the value. It is in seconds. The default is set to an hour which is 3600. Change this value to suit, half and hour is 1800 seconds.

sudo defaults write /System/Library/LaunchDaemons/com.apple.backupd-auto StartInterval -int 1800

27) Kill A Process

Sometimes you just need a process to stop running. If you want to kill it in Terminal with out using Activity Monitor, find the process ID (In Activity Monitor) and then use the following command. Only really useful if you don’t like much clicking or are writing a program.

kill PID 478

28) Let Terminal Talk

If you are bored one day you can get Terminal to quickly talk anything back to you using the voice engine. Replace hello with anything you want.

say hello

29) Make Hidden Applications Icons Transparent


If you hide a lot of applications you can make there icons transparent in the dock. A very good visual clue.

defaults write com.apple.Dock showhidden -bool YES
killall Dock

30) Make The Dock Spring Loaded

Makes the dock spring loaded so you can open files or windows from within the dock.

defaults write com.apple.dock enable-spring-load-actions-on-all-items -boolean YES

31) Recent Applications Stack

This command creates a new stack in your dock so you can view the recently used Applications.

defaults write com.apple.dock persistent-others -array-add '{ "tile-data" = { "list-type" = 1; }; "tile-type" = "recents-tile"; }'

32) Change The Arrows In iTunes

Normally the arrows in iTunes link to the music store, adding this command enables you to search your library. You need to click on the song first for the arrows to appear.

defaults write com.apple.iTunes invertStoreLinks -bool YES

33) Pin The Dock To The Left

This command pins the dock to the left hand side of the screen. I’m not sure what happens if you have the dock on the left or right edge. Replace start with middle to revert.

defaults write com.apple.dock pinning -string start

34) Pin The Dock To The Right

Exactly the same as above except it pins the dock to the right hand side of the screen.

defaults write com.apple.dock pinning -string end

35) Play Star Wars Episode IV


Using a simple telnet address you Terminal will connect in and play Star Wars Episode IV in its ASCII glory.

telnet towel.blinkenlights.nl

36) Quicklook A File

Quicklook is a great little application in Leopard. The command lets you quicklook a file right in Terminal. First you need to change the folder by using the “cd” command and then the folder you want. To enable this command to work you need to type the file name exactly.

qlmanage -p "Jaguar Aqua Graphite.jpg"

37) Disable The Spotlight Icon

This command removes the spotlight icon. Type 755 to re-enable it, instead of 0.

sudo chmod 0 /System/Library/CoreServices/Spotlight.app
killall Spotlight

38) Remove The Stripes In List View

A simple hack that removes the alternating stripes in list view in finder.

defaults write com.apple.finder FXListViewStripes -bool FALSE
killall Finder

39) Turn The Menu Bar White

If you don’t like the menu bar in its cool transparent glory you can change it so it appears white. This requires a password and you will need to restart you mac.

sudo defaults write /System/Library/LaunchDaemons/com.apple.WindowServer 'EnvironmentVariables' -dict 'CI_NO_BACKGROUND_IMAGE' 1

40) Turn The Menu Bar Grey

If you don’t like the white version of the menu bar you can change it so it appears gret.

sudo defaults write /System/Library/LaunchDaemons/com.apple.WindowServer 'EnvironmentVariables' -dict 'CI_NO_BACKGROUND_IMAGE' 0

41) Revert The Menu Bar Back To Default

If you prefer the transparent menu bar and you want it back type the following into Terminal.

sudo defaults delete /System/Library/LaunchDaemons/com.apple.WindowServer 'EnvironmentVariables'

42) Set The Expanded Print Dialogue As Default

If you want access to a lot of the extra print menus on by default you can use the following command to enable you to do this. Requires restart.

defaults write -g PMPrintingExpandedStateForPrint -bool TRUE

43) Set The Expanded Save Dialogue As Default

Similar as the print dialogue this sets the save dialogue to the expanded view as default. Requires restart.

defaults write -g NSNavPanelExpandedStateForSaveMode -bool TRUE

44) Set The Screen Saver As The Wallpaper


This command sets the currently selected screen saver as the desktop background. Use command + c or . to stop while in Terminal. Alternatively you can use wallsaver.

/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -background

45) Set The History Limit In Safari To A Number Of Items

If you don’t want a massive history you can set it to a limited number of items. Change the number to suit.

defaults write com.apple.Safari WebKitHistoryItemLimit 2000

46) Set The History Limit In Safari To A Number Of Days

Similar to the hack above you can set the number of days Safari keeps its history.

defaults write com.apple.Safari WebKitHistoryAgeInDaysLimit 30

47) Show Hidden Files In Finder


A lot of the files in Finder are hidden. This is probably a wise choice by Apple as there are countless things you can screw up. But if you want to take a look at how many there are and what they are you can show them within Finder. Be careful as these files are needed by the system, if you screw something up don’t come complaining. Repeat the command with false to revert. The image above, click for larger version, show the amount of files there actually is, with these hidden there is only 4 shown normally.

defaults write com.apple.finder AppleShowAllFiles TRUE

48) Skip Disk Image Verification

If you want to save some time you can skip the disk image verification for a disk image. Potentially risky as a whole load of things could go wrong without you knowing.

com.apple.frameworks.diskimages skip-verify TRUE

49) Show SubFolders In Graphical Format In Terminal

This is a very cool little hack that enables you to show an ASCII graphical view of sub folders. Use the cd command to change to a directory other wise the command will list every folder. For more information look here.

ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'

50) Speed Up Dialogue Boxes

Most dialogue boxes have a cool animation effect that looks cool. If you want to speed this up you can change the speed at which is renders so it appears almost instantly. The default is 0.2.

defaults write NSGlobalDomain NSWindowResizeTime 0.01