Monthly Archives: November 2006

rsync reminder

$ rsync -a a b <==> b/a/foo
$ rsync -a a/ b <==> b/foo
destination (b) <==> destination/ (b/)
If you need to pass parameters to rsync-over-ssh, then includ them in ‘ - as in:
$ rsync -ave ’ssh -i /home/netfortius/.ssh/remote_private_dsa’ user_at_remote@remote_system:/path/ ./local/path

VM printing - Linux (host) & Windows (guest)

# lsof |grep lp (lp0)
- for VM guest (Windows) to print, on host run:
# rmmod lp
NOTE: may need to stop cups daemon on the host, first
- for Linux (host) to print:
# modprobe lp
# chown <user> /dev/parport0
# chgrp lp /dev/parport0

postfix misc. commands

# postqueue -p = list messages
# postsuper -d <msg> = delete
# postsuper -d ALL = delete all
# postsuper -h <msg> = hold
# postsuper -H <msg> = put back in the queue
# postsuper -r ALL = requeue ALL messages
# postcat -q <msg> = display
# mailq = display queue

terminal shortcuts

Control-A = goto beginning of the line
Control-E = goto to the end of the line
ESC B = goto previous word
ESC F = goto next word
Control-H / backspace = delete previous character
Control-D = delete next character
ESC D = cut next word
ESC Backspace = cut previous word
Control-K = cut to end of line
Control-Y = paste last cut [...]

tunneling over SSH

Generic:
$ ssh -N -f -L <local_port>:<end_server>:<end_port> user@ssh_intermediary_server
NOTE: if using auth. w/keys and no passwd, the last part (user@… ;) is not needed
Example:
$ ssh -f -N -L 8025:smtp.comcast.net:25 my_home_machine -L 8110:mail.comcast.net:110 my_home_machine
allows me to use the email client on a laptop, pointing to localhost:8025 for SMTP services, and localhost:8110 for POP3 services associated with my Comcast account, [...]

SSH with keys

Execute on local host, under user’s pwd:
$ mkdir -p ~/.ssh
$ chmod 700 ~/.ssh
$ cd ~/.ssh
$ ssh-keygen -t dsa
Copy the public key to the remote host
$ scp -p id_dsa.pub remoteuser@remotehost:
Password: *********
Log into remote host and install public key
$ ssh remoteuser@remotehost
Password: ********
remotehost$ mkdir -p ~/.ssh
remotehost$ chmod 700 ~/.ssh
remotehost$ cat ida_dsa.pub >> ~/.ssh/authorized_keys
remotehost$ chmod 600 ~/.ssh/authorized_keys
remotehost$ mv id_dsa.pub [...]

“Political Correctness” and English Grammar

My all time favorite comment, regarding usage of indefinite pronouns, appears at the bottom of this article:
“All right, I’m only going to say this once: ‘He’ is the singular indefinite pronoun in English (”if a person drinks too much, he will likely experience a hangover”). ‘He’ also happens to be the masculine personal pronoun.
‘She’ is [...]