Entries Tagged as 'unix'

Monday, February 9th, 2009

GEEK: prune directories, files from find output

Sometimes you want to exclude a directory and/or files from a search. This alias: cfind=’find . \( -type d -name .svn -prune -o -path ./stock-data/tests/data -prune \) -o \( -type f \! -name “*.csv” -print0 \) | xargs -0 grep’ …means: “Recursively loop through all of the files and directories in the current directory and [...]

Tuesday, July 22nd, 2008

GEEK: how to add a user to the admin group on Mac OS X

Here’s how to add a user to the admin group using dscl: dscl . append /Groups/admin GroupMembership crasch Remove a user: dscl . delete /Groups/admin GroupMembership crasch Reading the membership of the admin group: dscl . read /Groups/admin GroupMembership