Use xargs to process files in parallel

find ./ -type f -iname '*.nii' | xargs -n 1 --max-procs 4 gzip

Generate index.html using tree command

  • To install:
    sudo apt-get install tree
  • To use:
    tree -H <base> -T <title> -o <output.html>
    for example:
    tree -H /maven -T "Mediaflux Maven Repository" -o index.html

X11 forwarding over ssh

ssh -XYC user@server xterm
The options are:
  1. X: enables x11 forwarding
  2. Y: enables trusted x11 forwarding
  3. C: compresses the communication
  4. xterm: can be substituted with other commands that are available on the server

X11 forwarding over multiple ssh hops

Suppose you do not have direct ssh access to server2. You can access server2 via server1 over ssh. (localhost => server1 => server2)
  1. In terminal 1:
    ssh server1 -L2200:server2:22
  2. In terminal 2:
    ssh localhost -XYC -p2200 xterm
    It will run xterm on server2 and displays back to localhost.