Public
snipts » osx
showing 1-20 of 46 snipts for osx
-
∞ show sockets on OS X
lsof -iTCP -n -P
-
∞ show/hide hidden files in OSX
Show: defaults write com.apple.finder AppleShowAllFiles TRUE killall Finder Hide: defaults write com.apple.finder AppleShowAllFiles FALSE killall Finder
-
∞ show & hide hidden files in finder
Show: defaults write com.apple.finder AppleShowAllFiles TRUE killall Finder Hide: defaults write com.apple.finder AppleShowAllFiles FALSE killall Finder
-
∞ See which modules are loaded in Apache (on OSX)
/usr/sbin/apachectl -l
-
∞ Crate a *NIX-friendly disk image on Mac OS X
# image.iso: Output image file # Source/: Directory from which the image is built hdiutil makehybrid -o image.iso Source/
-
∞ osx force eject
$ drutil tray eject -
∞ Uninstall AIR
cd /Volumes/Adobe AIR/Adobe AIR Installer.app/Contents/MacOS sudo ./Adobe\ AIR\ Installer -uninstall
-
∞ Enable mouseover highlights in stacks
$ defaults write com.apple.dock mouse-over-hilite-stack -boolean yes $ killall Dock
-
∞ Perform a packet dump for your Mac airport express card
$ sudo tcpdump -i en1 -vvv -n -s 0 -w ~/Desktop/DumpFile.dmp -
∞ os x dvd iso using hdutil
#hdutil method #!/bin/sh DIR=$1 NAME=$(basename "${DIR}") hdiutil makehybrid -udf -udf-volume-name "${NAME}" -o "${NAME}" "${DIR}"
-
∞ os x dvd iso
$mkisofs -f -dvd-video -udf -V DVD_VIDEO -o ~/Desktop/DVD_VIDEO.iso ~/Desktop/DVD_VIDEO/ # Made into a script #!/bin/sh DIR=$1 NAME=$(basename "${DIR}") mkisofs -f -dvd-video -udf -V "${NAME}" -o "${NAME}".iso "${DIR}"
-
∞ time machine interval
$sudo defaults write /System/Library/LaunchDaemons/com.apple.backupd-auto StartInterval -int 14400 -
∞ Change SSH port on OS X
# Add a service on an unused port in: sudo vim /etc/services # Change the string "ssh" below "SockServiceName" to whatever name used in the above file sudo vim /System/Library/LaunchDaemons/ssh.plist
-
∞ Uninstall MySQL from OS X 10.5+
#Uninstalling MySQL - (Mac - OS) #From a terminal do the following: $ sudo rm /usr/local/mysql $ sudo rm -rf /usr/local/mysql* $ sudo rm -rf /Library/StartupItems/MySQLCOM $ sudo rm -rf /Library/PreformancPanes/My* $ (Edit /etc/hostconfig) sudo vi /etc/hostconfig (Remove line MYSQLCOM=-YES) $ sudo rm -rf /Library/Reciepts/mysql* $ sudo rm -rf /Library/Reciepts/MySQL*
-
∞ show hidden files in Mac OSX Finder
#show hidden files in MacOSX Finder #type the following in the shell defaults write com.apple.finder AppleShowAllFiles TRUE killall Finder #revert to original settings defaults write com.apple.finder AppleShowAllFiles FALSE killall Finder
-
∞ Profile
PATH="/usr/local/bin:${PATH}" export PATH
-
∞ osx show all files
defaults write com.apple.finder AppleShowAllFiles -bool true -
∞ Recursively remove all .svn directories
find . -name .svn -exec rm -rf {} \;
-
∞ Reset OS X Password without a OS X DVD
# 1. Reboot your Mac # 2. Hold "Apple Key + S" down after you hear the chime sound. # 3. When you get text prompt to enter, just enter following: $ mount -uw / $ rm /var/db/.AppleSetupDone $ shutdown -h now # After a reboot you'll have a new admin account :)
-
∞ Tracing TCP data in OS X
#In Leopard you can use -K for additional check sum. $ sudo tcpdump -i en0 -vvv -K -n -s 0 -w ~/Desktop/DumpFile.dmp #or just: $ sudo tcpdump -i en0 -vvv -n -s 0 -w ~/Desktop/DumpFile.dmp #to stop it from capturing hit: Control-C #then type: $ tcpdump -s 0 -n -e -x -vvv -r Desktop/DumpFile.dmp # to view the file itself.



Linux in a Nutshell