UNIX Tips and tricks - 01
Life is unpredictable and bad things can happen but fortunately there are a couple of UNIX commands that can solve some of your problems. Let’s learn about two of them that ensure your work is saved even if you terminate your sessions.
Files in bioinformatics, yet another problem
Before starting any genomics data analysis, you first need to download files. These files are often really massive and sometimes bad things happen: you run out of battery, you need to logout or your internet connexion is disrupted, the UNIX system has a solution for each of these problems.
The nohup command
Nohup stands for no hang up, it is a priceless command for whenever you need to execute a script that takes a long time to finish and you need to terminate your session or logout.
The command scenario is as follows:
nohup COMMAND [ARG]...Resume a curl download
Imagine having to download a huge FASTq file. Your download is progressing then suddenly your internet connexion is interrupted. Once again, UNIX has your back.
curl -L -O url
# An interruption occurs.
# Resume your download!
curl -L -O -C - urlThat’s all for today, I hope you found something helpful here.