Archive for the ‘Linux tips’ Category

Enable .bashrc on OSX Snow Leopard (and Lion)

Wednesday, October 19th, 2011

Unfortunately OSX doesn’t use .bashrc per default, but it is easy to enable it. To do it, open up the file /etc/profile with root privileges like this:

sudo nano /etc/profile

And add the following line:

[ -r $HOME/.bashrc ] && source $HOME/.bashrc

[ -r $HOME/.bashrc ] && source $HOME/.bashrc

Save, and now your .bashrc file should work like you expect.

Downloading files from SSH over an unstable connection

Sunday, October 9th, 2011

As mentioned earlier I am doing a lot of traveling at the moment, which means that I am mostly on a mobile connection.

I needed to download a 100Mb file from my Linux server, and with scp the download would fail.

Instead I am now using this rsync command that would resume if the connection drops:
rsync –partial –progress –rsh=ssh root@rauw.dk:filename.exe filename.exe

Also, if you are using SSH on a slow connection, typing things make lag, you can use this command:

rlwrap -a ssh user@address