M-/
Completes the token (in emacs) or the directory in bash.
less whatever.tar.gz
This actually lists the files in the compressed archive!
Category Archives: Linux
Rescuing lost mysql root password
Run this:
mysqld_safe --skip-grant-tables --user=root &
Then:
UPDATE mysql.user SET Password=PASSWORD('newpwd') WHERE User='root';
FLUSH PRIVILEGES;
Unfortunately, the info on the mysql site seems to be a bit wrong!
Useful netstat
List connections in a useful manner:
netstat -a -tcp
Evaluating variables in bash
echo ${!file_list} will echo $$file_list, so say $something = john and $cat = ‘something’, echo ${!cat} would be something, gettit?
Starting X apps remotely (and keeping them remote)
Specify the display before the application:
DISPLAY=:0 btdownloadgui.py