Christopher Bull bio photo

Christopher Bull

Aspiring Oceanographer at Northumbria University. Big data python enthusiast. Outdoor adventurer.

Email Twitter Github

My life consists of two problems…

  1. I work on many different machines and the files I want are invariably on the wrong machine.
  2. I can never remember the right rsync flags for the different machines I use and my fingers are lazy.

The second problem means I never want to deal with the first two.. Sound familiar?

Here’s some bash functions to help you push and pull files from a remote location.

We have one bash function for pulling files….

And another (slightly more complicated) bash function for pushing files….

So, if you put these in your .bashrc with your relevant server details you should be good to go! Feel free to change the switches if you prefer something else, do get in touch if you improve these, it’s impractical to currently pass include/exclude statements at present for instance… The above are GitHub gists, feel free to comment/fork/pull!

Also, life is a lot more smooth if you’re using ssh keys.

In category: hpc