Tag Archive for 'Command line'

Rsync

Our office network has horrible download speeds, it is more efficient to zip a file before copying it. (No longer slow but still nice to not forget this)

rsync -avz --progress server:source target

Creating an ssh tunnel

Setting up a host for a server in the ssh config and creating an ssh tunnel.

For this your would have to have access to a server. Open your ssh configuration in a text editor.

gedit ~/.ssh/config

Add the server specifications.

Host host
HostName path.to.server.com
User username

Create an ssh tunnel.

ssh host -L8080:127.0.0.1:8080

Now you can reach host as if it were 127.0.0.1 (localhost). “-L8080″ stands for your local host, “127.0.0.1:8080″ stands for what you are on the other side of the tunnel.

To close the tunnel.

exit

Case insensitive terminal

Case insensitivity for tabcompletion is something I have needed more often, this is how to do it. (found the solution on ubuntu forums, http://ubuntuforums.org/showthread.php?t=559596 )

Create or edit the file .inputrc and add the line:

set completion-ignore-case on

My coleague Jarno had the following tip originally as a comment.

You could also add the following to your .bashrc

bind 'set completion-ignore-case on'