I’ve been learning how to do things in Terminal (OSX Command Line app) the last few months and have either looked these up on the web or asked team members how to do these things. I’ve been keeping them written on a notepad at my desk up until now but they’re becoming scattered so I thought I’d just keep everything in a blog post so others can reference too.
db connect to database (after setting this up in .bash_profile, and .bash_aliases. Just quicker than typing mysql)
ls list
\. filepath.sql add sql to database
ctrl A go to beginning of line
ctrl K clear the line
\q exits db
\u or use switches the database you’re using when followed with the db’s name
cd change directory
php filename.php = run php script
ln -s = symbolic link
scp = secure copy
sudo /usr/sbin/apachect/ restart restarts apache
You can also restart apache in OSX by going to System Preferences > Sharing > Uncheck “Web Sharing” then recheck the box.
This list is by no means complete! These are just a few that I’ve found useful/used often and recently learned.
Related.. Trackback…
[...]the time to read or visit the content or sites we have linked to below the[...]…