Useful Linux commands

Decompress a gzipped tar file:

tar -xzvf file.tar.gz

Or just a tar file:

tar -xvf file.tar

Install program:

tar -xzvf rsem-1.2.8.tar.gz
cd rsem-1.2.8
cd EBSeq
echo 'export PATH=$PATH:/root/rsem-1.2.8' >> ~/.bashrc
source ~/.bashrc

Screen command, when you want to break your ssh connection but still want process to run and see output later. Use Ctrl-A-D to detach screen.

screen -r
screen -r 11074.pts-25.phoenix2

Find latest 10 subdirectories by date:

find /ifs/data/sequence/Illumina/production/ -maxdepth 1 -type d -mtime -10 | sed -e 's/.*\///' | sort


About Lisa Johnson

PhD candidate at UC Davis in Molecular, Cellular, and Integrative Physiology
This entry was posted in bash, Linux. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s