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
make
cd EBSeq
make
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
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

Advertisements

About Lisa Johnson

PhD candidate at UC Davis.
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:

WordPress.com Logo

You are commenting using your WordPress.com 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