Introduction to Linux command line for bioinformatics Wenjun Kang, MS Jorge Andrade, PhD 6/28/2013 Bioinformatics Core, Center.

Slides:



Advertisements
Similar presentations
UNIX Overview. 2 UNIX UNIX is a multi-user and multi-tasking operating system. Multi-tasking: Multiple processes can run concurrently. Example: different.
Advertisements

Shell Script Assignment 1.
Learning Unix/Linux Bioinformatics Orientation 2008 Eric Bishop.
Unix. Outline Commands Environment Variables Basic Commands CommandMeaning lslist files and directories ls -alist all files and directories mkdirmake.
Introduction to Linux Alan Orth April 17, 2010 ILRI, Nairobi.
It's a binary file kept under specific directory.
Linux+ Guide to Linux Certification, Second Edition
T UTORIAL OF U NIX C OMMAND & SHELL SCRIPT S 5027 Professor: Dr. Shu-Ching Chen TA: Samira Pouyanfar Spring 2015.
Very Quick & Basic Unix Steven Newhouse Unix is user-friendly. It's just very selective about who its friends are.
UNIX Overview. 2 UNIX UNIX is a multi-user and multi-tasking operating system. Multi-tasking: Multiple processes can run concurrently. Multi-user: different.
Linux Commands LINUX COMMANDS.
CS 141 Labs are mandatory. Attendance will be taken in each lab. Make account on moodle. Projects will be submitted via moodle.
Using Macs and Unix Nancy Griffeth January 6, 2014 Funding for this workshop was provided by the program “Computational Modeling and Analysis of Complex.
Introduction to Linux Workshop February Introduction Rob Lane & The HPC Support Team Research Computing Services CUIT.
Learning basic Unix command IT 325 operating system.
MCB Lecture #3 Sept 2/14 Intro to UNIX terminal.
Advanced File Processing
Unix Primer. Unix Shell The shell is a command programming language that provides an interface to the UNIX operating system. The shell is a “regular”
Welcome to Linux & Shell Scripting Small Group How to learn how to Code Workshop small-group/
1 Intro to Linux - getting around HPC systems Himanshu Chhetri.
Linux environment ● Graphical interface – X-window + window manager ● Text interface – terminal + shell.
Essential Unix at ACEnet Joey Bernard, Computational Research Consultant.
Agenda User Profile File (.profile) –Keyword Shell Variables Linux (Unix) filters –Purpose –Commands: grep, sort, awk cut, tr, wc, spell.
2INC0 Operating Systems Introduction to Linux
Dedan Githae, BecA-ILRI Hub Introduction to Linux / UNIX OS MARI eBioKit Workshop; Nov , 2014.
CS 6560 Operating System Design Lecture 3:Tour of GNU/Linux.
LINUX Tuesday, 5 July :00 pm. Remote Login l Use Secure Shell (ssh) l Machine name/IP address E.g. ssh hydra.sma.nus.edu.sg Or ssh
Carnegie Mellon Linux Boot Camp Jenna MacCarley, Peter Pearson, Shashank Goyal 9/19/2015.
System Administration Introduction to Unix Session 2 – Fri 02 Nov 2007 Reference:  chapter 1, The Unix Programming Environment, Kernighan & Pike, ISBN.
Session 2 Wharton Summer Tech Camp Basic Unix. Agenda Cover basic UNIX commands and useful functions.
Week 3 Exploring Linux Filesystems. Objectives  Understand and navigate the Linux directory structure using relative and absolute pathnames  Describe.
Advanced File Processing. 2 Objectives Use the pipe operator to redirect the output of one command to another command Use the grep command to search for.
Chapter Five Advanced File Processing Guide To UNIX Using Linux Fourth Edition Chapter 5 Unix (34 slides)1 CTEC 110.
Chapter Five Advanced File Processing. 2 Objectives Use the pipe operator to redirect the output of one command to another command Use the grep command.
Lesson 2-Touring Essential Programs. Overview Development of UNIX and Linux. Commands to execute utilities. Communicating instructions to the shell. Navigating.
Next Unix Topics Tuesday, 2/11 & 18/2014. Change Password (by 2/14/14) ssh to account on – faclinux.cse.ohio-state.edu – stdlinux.cse.ohio-state.edu passwd.
L&T Infotech1 UNIX – Getting Started - Aneesh Ramani.
Chapter Five Advanced File Processing. 2 Lesson A Selecting, Manipulating, and Formatting Information.
Unix/Linux for beginners:
Linux Commands C151 Multi-User Operating Systems.
Linux+ Guide to Linux Certification, Second Edition Chapter 4 Exploring Linux Filesystems.
Linux A practical introduction. 1)Background and Getting Started Linux is an operating system with multiple providers Red Hat/CentOS (our version) Ubuntu.
1 Introduction to Unix. 2 What is UNIX?  UNIX is an Operating System (OS).  An operating system is a control program that helps the user communicate.
A Brief Overview of Unix Brandon Bohrer. Topics What is Unix? – Quick introduction Documentation – Where to get it, how to use it Text Editors – Know.
Lecture 1: Introduction, Basic UNIX Advanced Programming Techniques.
Learning basic Unix command It 325 operating system.
Introduction to Linux Workshop February 15, 2016.
+ Introduction to Unix Joey Azofeifa Dowell Lab Short Read Class Day 2 (Slides inspired by David Knox)
Learning Unix/Linux Based on slides from: Eric Bishop.
INTRODUCTION TO SHELL SCRIPTING By Byamukama Frank
Hackinars in Bioinformatics
UNIX To do work for the class, you will be using the Unix operating system. Once connected to the system, you will be presented with a login screen. Once.
Tutorial of Unix Command & shell scriptS 5027
Andy Wang Object Oriented Programming in C++ COP 3330
Some Linux Commands.
C151 Multi-User Operating Systems
Introduction to Linux Dr Karina Kubiak - Ossowska
Tutorial of Unix Command & shell scriptS 5027
Introduction to UNIX.
Tutorial of Unix Commands
Tutorial of Unix Command & shell scriptS 5027
Introduction to Linux Week 0 - Thursday.
Guide To UNIX Using Linux Third Edition
Tutorial of Unix Command & shell scriptS 5027
Andy Wang Object Oriented Programming in C++ COP 3330
Tutorial Unix Command & Makefile CIS 5027
Linux Commands LINUX COMMANDS.
Short Read Sequencing Analysis Workshop
Presentation transcript:

Introduction to Linux command line for bioinformatics Wenjun Kang, MS Jorge Andrade, PhD 6/28/2013 Bioinformatics Core, Center for Research Informatics, University of Chicago

Goals The goal of this tutorial is to provide hands-on training basics of using Linux via the command line. It addresses people who have no previous experience with Unix-like systems, or who know a few commands but would like to know more.

Topics What’s Unix/Linux Navigation Directory and file operations File transfer between computers I/O redirection and pipe Text extraction and manipulation Shell scripts Exercises

Unix/Linux UNIX is the operating system of choice for engineering and scientific computing. The variant of UNIX found at CRI is GNU/Linux. CRI currently uses CentOS Linux. There are many other distributions (RedHat, Ubuntu, Debian)

Difference between Unix and Linux Unix developed in the late 1960s and Linux in the early 1990s based on Unix-like system MINIX Linux is a UNIX clone Linux is an operating system kernel The terms are often used interchangeably

Unix Architecture Kernel: The heart of the operating system It interacts with hardware. Memory management, task scheduling and file management. Shell: The utility that processes your requests. the shell interprets the command and calls the program that you want. Commands and Utilities: Eg: cp, mv, cat and grep etc. Files and Directories: All data in UNIX is organized into files. All files are organized into directories. These directories are organized into a tree- like structure called the filesystem.

Connect to a Linux Machine Remote to a Linux machine via ssh – From MAC: $ ssh – From PC: use Putty to connect User Name Machine NameCurrent Directory

CRI File System group grp1 grp2

Anatomy of a Linux Command $ ls -l -r -s /tmp  ls (command or utility or program)  -l -r -s (options, or flags –control the flavors of the command)  /tmp (argument – what is been operated on)

Navigation Commands: cd, ls, and pwd cd / cd /tmp ls ls q* pwd ls -l cd ~

Handy shortcuts Anywhere in Command Line: – up(down)_key - scrolls through command history Auto Completion: – TAB When specifying file names: – ".." (dot dot) - refers to the parent directory – "~" (Tilda) or "~/" - refers to user's home directory – “*” (star) - refers to any file names

Directory and file operations Create a new directory – mkdir mydir1 Create a new file in a directory – cd mydir1 – nano file1.txt Copy a file – cp file1.txt file1_copy.txt Delete a file or directory – rm file1_copy.txt – rm -r folder1

Directory and file operations Rename a file or folder – mv file1.txt file12.txt – mv folder1 folder2 Move file from one folder to another – mv folder1/file1.txt folder2 Compress files – gzip, and gunzip

File Permissions

File transfer between computers Winscp (between Windows and Linux) scp (else) – scp file1.txt wget url – wget mosomal_feature/saccharomyces_cerevisiae.gff

I/O redirection and pipe > file, Output re-direction, overwrite – cat file1.txt > file2.txt >> file, Output re-direction, append – cat file1.txt >> file2.txt < file, input re-direction – cat < file1.txt CommandA | command B, pipe output from CommandA to command B – ls -l | wc -l

Text extraction and manipulation Text Editor: vi, vim, nano, emacs, and others. Text Viewers: – less (more) – head, and tail Pattern Search – grep “word” file.txt – find. –name “somename” Text replacement and text operation – cat, sed, tr, and rev

Text extraction and manipulation Table manipulation – sort – uniq – cut – awk – paste Count the number of word, lines and bytes – wc

Shell Script >nano hello.sh > chmod u+x hello.sh >./hello.sh #!/bin/bash echo "Hello World!“

Questions?

Hands on Exercises

Basic Commands CommandMeaning ls (-artlh)list files and directories mkdirmake a directory cd directorychange to named directory pwddisplay the path of the current directory mv file1 file2move or rename file1 to file2 cp file1 file2copy file1 and call it file2 rm fileremove a file rmdirremove a directory cat filedisplay a file less filedisplay a file one page a time head/tail filedisplay the first/last few lines of a file