MySQL Commands Cheat Sheet

Another memory-dump. The manual contains more information (that’s a surprise :-). mysql> delete from TABLE where id=X Removes the specified row mysql> describe TABLE; Shows the structure of the specified table mysql> select * from TABLE; Shows all rows in the specified table :-O mysql> show procedure status; Shows stored procedures mysql> show table status; […]

Bash Variables Cheat Sheet

For a complete list, see Bash Reference Manual – Bash Environment Variables. This is just my own memory-dump. To get the value of a variable, you can use: echo $OLDPWD OLDPWD previous current directory PWD current directory LANG the language used by programs, check with locale -a for available locales. Can be set in .bash_profile […]

Linux Directories and Files Cheat Sheet

Just a memory dump for important files and directories. ~/.bashrc runs on interactive login ~/.bash_aliases runs from .bashrc (if uncommented…) ~/.emacs Emacs settings /etc/crontab file that controls scheduled running of scripts /etc/cron.d/hourly, daily, weekly, monthly for running scripts on a scheduled basis /etc/group groups in the system /etc/hosts hard-coded hosts like in Windows. /etc/motd the […]

Linux Commands Cheat Sheet

There are a lot of these on the net. Why not one more? I will try to keep this updated. Some commands are shell-specific (I use bash), and some are application specific, like the Apache commands. a2enmod enable apache module a2dismod disable apache module a2ensite enable apache site a2dissite disable apache site apt-get upgrades Debian/Ubuntu. […]