Skip to content

Instantly share code, notes, and snippets.

@magicznyleszek
Last active November 30, 2015 08:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save magicznyleszek/8faf47c675042e20e5c1 to your computer and use it in GitHub Desktop.
Save magicznyleszek/8faf47c675042e20e5c1 to your computer and use it in GitHub Desktop.
Useful Mac Commands

Useful Mac Commands

Common stuff

Find all files in current directory by extension

find . -type f -name "*.extension"

DS_Store

Delete all .DS_Store files

sudo find / -name "*.DS_Store" -type f -delete

Elastic scrolling

Disable:

defaults write -g NSScrollViewRubberbanding -int 0

Enable:

defaults delete -g NSScrollViewRubberbanding

EMFILE: Too many opened files error

This is because of your system's max opened file limit. For OSX the default is very low (256). Temporarily increase your limit with ulimit -n 10480, the number being the new max limit.

In some versions of OSX the above solution doesn't work. In that case try launchctl limit maxfiles 10480 10480 and restart your terminal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment