Tuesday, March 25, 2014

How to quickly convert pdf into png in Unix

Let say you grabbed a snapshot and have pdf file that you want to convert to png to load into Google drive presentation. In Unix do this easily in terminal:

In terminal install package imagemagick
sudo apt-get install imagemagick
Then type:
convert file.pdf file.png

And there it is.

Monday, March 24, 2014

How to transfer files across computers using SSH and terminal

If you need to transfer large files, e.g. fastq files, from your computer to the server that will do the downstream analysis use scp command in the terminal:

scp username1@hostname1:/path/to/folder/file.fastq username2@hostname2:/path/to/folder

In the case of coping files from your computer to the server:

scp /path/to/folder/file.fastq username@hostname:/path/to/folder
In case of copying files from the server to your computer

scp username@hostname:/path/to/folder/file.fastq /path/to/folder

You will be asked for the password and the file will be copied after.