Tips on Filesystems, security and al on mac os x
-
mount with AFP sharepoints from the command line (thanks to this hint) :
# mount_afp [-i] [-o options] afp_url node mkdir /Volumes/truc mount_afp afp://user:PASSWORD@server/truc /Volumes/truc umount /Volumes/truc rmdir /Volumes/truc
finder nags when changing a file's extension
-
read the default value (should be 0)
defaults read com.apple.finder FXEnableExtensionChangeWarning
-
change it:
defaults write com.apple.finder FXEnableExtensionChangeWarning False
Make spell check show only desired languages
HFS+
One feature of HFS volumes is that fle are referred to as links: for instance you can read a PDF file while changing the name at the same time. No problem!
-
Safely remove '._' files created by HFS(+)
find . -name '._*' -print0 | xargs -0 rm
Spotlight
-
to remove the remaining index files on the volume using the command: `` sudo mdutil -E /Volumes/volume_name `` utilitaires CLI :
sudo mdutil --help mdutil: unrecognized option `--help' usage: mdutil -pE volume ... mdutil can be used to manage the metadata stores used by Spotlight. -p publish metadata for the provided volumes. -i (on|off) set indexing status for the provided volumes. -E erase the master copy of the metadata stores for the provided volumes. -s print indexing status for the provided volumes.
System & Security
http://www.macgeekery.com/tips/security/basic_mac_os_x_security
-
Synthesis of unauthorized accesses to your machine:
sudo grep "failed to auth" /var/log/secure.log | sed 's/^.*user \(.*\) for.*$/\1/' | sort | uniq -c
nmap
-
to scan for open ports on a remote machine :
sudo nmap -T3 -vv -sS -p 1-65535 -P0 google.com Starting nmap 3.81 ( http://www.insecure.org/nmap/ ) at 2006-04-05 16:32 CEST Initiating SYN Stealth Scan against google.com [65535 ports] at 16:32 Discovered open port 80/tcp on google.com SYN Stealth Scan Timing: About 2.18% done; ETC: 16:55 (0:22:26 remaining)
-
to scan for open ports on your local network (see https://stackoverflow.com/questions/13669585/how-to-get-a-list-of-all-valid-ip-addresses-in-a-local-network#15351073 ):
nmap -sP 192.168.1.*
Dash board
-
Don't use Dashboard? No particular reason to leave it running, consuming memory. Following http://www.macosxhints.com/article.php?story=20050723123302403, you can turn Dashboard off by doing:
defaults write com.apple.dashboard mcx-disabled -boolean YES killall Dock
-
Unsurprisingly, you change YES to NO to re-enable Dashboard:
defaults write com.apple.dashboard mcx-disabled -boolean NO killall Dock
Unix - X11
-
install quickly http://trac.macosforge.org/projects/xquartz :
wget http://xquartz.macosforge.org/downloads/X11-2.4.0.dmg sudo installer -pkg X11-2.4.0.pkg -target / rm X11-2.4.0.pkg
Change login window on (Snow) Leopard
-
disrupted by the look of the plasma flames? think it looks like a cheap star trek sundae? check http://paulstamatiou.com/2007/10/31/how-to-change-leopards-login-wallpaper :
cd /System/Library/CoreServices sudo rm DefaultDesktop.jpg #sudo mv DefaultDesktop.jpg DefaultDesktop_old.jpg # if you want to keep the Aurora stuff (it stills around, do a 'locate Aurora' sudo ln -s /Library/Desktop\ Pictures/Nature/Stones.jpg DefaultDesktop.jpg