
![[RSS Feed]](/img/feed-icon32x32_1.png)
Force-Delete locked files
permlink: _.at: Force-Delete locked files
Unix Timestamp
+"%s" gives output in seconds since the epoch Convert a unix timestamp back to a date:
date -jf "%s" 1394146800
permlink: _.at: Unix Timestamp
OS X Terminal Commands
permlink: _.at: OS X Terminal Commands
OS X Terminal
permlink: _.at: OS X Terminal
Encrypt An External Disk Volume
# diskutil cs convert /Volumes/Spare -passphrase Or split into two steps:
# diskutil cs convert /Volumes/Spare
# diskutil cs encryptVolume /Volumes/Spare -passphrase To check the status of the encryption process:
# diskutil cs info /Volumes/Spare Obviously the volumename 'Spare' should be replaced by your volume in question...
permlink: _.at: Encrypt An External Disk Volume
Disable a MacOS X service
/Library/LaunchDaemons
/System/Library/LaunchDaemons
/System/Library/LaunchAgents
permlink: _.at: Disable a MacOS X service
MacOS X Download History
~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV2
which is an SQLite database. Contents can be dumped using this command: sqlite3 -header -line ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV2 \
'SELECT LSQuarantineAgentName AS Browser, LSQuarantineDataURLString AS File FROM LSQuarantineEvent WHERE LSQuarantineAgentName <> "PubSubAgent"' Brushed up SQL inspired by the script found in the linked article below.
permlink: _.at: MacOS X Download History
Create a Unix User / Group from the command line on MacOS X
% sudo dscl . -create /Users/luser UserShell /bin/bash
% sudo dscl . -create /Users/luser RealName "Realname for user"
% sudo dscl . -create /Users/luser UniqueID "1010"
% sudo dscl . -create /Users/luser PrimaryGroupID 80
% sudo dscl . -create /Users/luser NFSHomeDirectory /Users/luser Create a group:
% sudo dscl . -create /groups/tomcat
% sudo dscl . -append /groups/tomcat gid 230
% sudo dscl . -append /groups/tomcat passwd "*" Add a user to this group (replace username with the correct value):
% sudo dscl . -append /groups/tomcat GroupMembership luser in part derived from an answer at Serverstack: http://serverfault.com/a/20706
Start MacOS X Screen Sharing
# open /System/Library/CoreServices/Screen\ Sharing.app/ Under OS X 10.10 this moved application was moved:
# open /System//Library/CoreServices/Applications/Screen\ Sharing.app
permlink: _.at: Start MacOS X Screen Sharing
Change Networksettings on MacOS X on the commandline
# networksetup -listallnetworkservices Read the current configuration for a service (name as listed in the output above):
# networksetup -getinfo Ethernet Change e.g. the DNS server:
# networksetup -setdnsservers "Ethernet" 8.8.8.8
Disable Lion Window Animations and other minor annoyances
# defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool NO
Replace 'NO' with 'YES' to re-enable them. Disable animations in Mail:
# defaults write com.apple.Mail DisableReplyAnimations -bool YES
Quit Mail before changing this setting. Replace 'YES' with 'NO' to re-enable animations. Restore key autorepeat:
# defaults write -g ApplePressAndHoldEnabled -bool false Make Library folder visible:
# chflags nohidden ~/Library/ Disable Spelling correction:
# defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool NO Disable local Timemachine:
# sudo tmutil disablelocal
ZFS
permlink: _.at: ZFS
Reset Macbook/Air/Pro SMC
permlink: _.at: Reset Macbook/Air/Pro SMC
Debian: set default encoding
permlink: _.at: Debian: set default encoding
Manually add users under MacOS X Leopard
all articles represent the sole opinion of their respective author. all content comes without any warranty for correctnes, despite due diligence.