Skip to content

Instantly share code, notes, and snippets.

@ucaiado
Last active August 29, 2015 14:07
Show Gist options
  • Save ucaiado/f9b37cc0b5c0eb62734d to your computer and use it in GitHub Desktop.
Save ucaiado/f9b37cc0b5c0eb62734d to your computer and use it in GitHub Desktop.
MAC

##MAC - COMMAND LINE

###Random #####Go to teh home directory Cmd + shift + H

you should create your own bash profile: ~/.profile

#####compress files tar -cvzf nameofmytar.tar.gz /path/to/file/*.xxx

#####See bare files on finder defaults write com.apple.finder AppleShowAllFiles TRUE

#####Edit a bare file using testEdit sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit /Library/Python/2.7/site-packages/MyModules.pth

#####Insert a new path export PATH=/usr/local/Cellar/mongodb/2.4.8/bin/:$PATH

#####mostra arquivo de texto no terminal more file.py

#####mostra arquivo no terminal vi simple_example1.js

#####roda script usando mongo cat simple_example1.js | mongo

#####show working directory pwd

#####insert the a folder to my path export PATH=$PATH:/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin

####Tell the terminal that a file without extension should be run as a script

source: http://stackoverflow.com/questions/8409946/how-do-i-make-this-file-sh-executable-via-double-click

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