SlideShare una empresa de Scribd logo
1 de 74
Introduction to Linux
@yokofakun
http://plindenbaum.blogspot.com
UMR 1087 - Institut du Thorax. Nantes. France
June 25, 2015
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
Windows Linux
SORT
UNIQ
JOIN
CUT
PASTE
AWK
GREP
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
The terminal
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
The shell: BASH is running
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
Unix keeps files arranged in a
hierarchical structure
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
home
me
/
dir1
dir2
dir3
other
dir1/dir2/file2
/home/me/dir1/dir2/file2
file2
dir1/dir2
/home/me/dir1/dir2
dir1
/home/me/dir1
.
/home/me
dir3
/home/me/dir3
..
/home
../..
/
file4../other
/home/other ../other/file4
/home/other/file4
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
PROGRAM
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
$ programname ( options ) ( f i l e s )
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
Navigation
where am I ?
$ pwd
Go to directory dir1
$ cd d i r 1
Go to directory dir1/dir2
$ cd d i r 1 / d i r 2
Go upper directory
$ cd . .
Go upper directory and then go to dir4
$ cd . . / d i r 4
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
Navigation
Go to the root
$ cd /
Go to my home
$ cd ˜
Go to my previous directory
$ cd /
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
Completion
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
CASE matters
$ cd d i r 1
$ cd DIR1
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
Regular Expression.
’?’ : The question mark indicates there is zero or one of the
preceding element. For example, colou?r matches both ”color” and
”colour”.
’*’ : The asterisk indicates there is zero or more of the preceding
element. For example, ab*c matches ”ac”, ”abc”, ”abbc”,
”abbbc”, and so on.
’+’ : The plus sign indicates there is one or more of the preceding
element. For example, ab+c matches ”abc”, ”abbc”, ”abbbc”,
and so on, but not ”ac”.
(a—b)* denotes the set of all strings.
: A bracket expression. Matches a single character that is
contained within the brackets.
ˆMatches the starting position within the string.
$ Matches the ending position of the string or the position just
before a string-ending newline.
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
Escape characters.
Cariage Return.
n
Tabulation.
 t
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
Shell shortcuts.
Arrow-up/down: prev/next in history.
Ctr-R : Search history.
Ctr-A : Begin line.
Ctr-E : End line.
Ctr-K : Cut line.
Ctr-D and tab : insert tabulation.
Ctr-D and tab : insert tabulation.
Ctr-D (in pipeline): EOF (End Of File).
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
whitespaces matter
$ cd my r e s u l t s
bash : cd : my: No such f i l e or d i r e c t o r y
$ cd ”my r e s u l t s ”
$ cd my r e s u l t s
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
man
$ man man
MAN(1)
NAME
man − an i n t e r f a c e to the on−l i n e
r e f e r e n c e
SYNOPSIS
man [−C f i l e ] [−d ] [−D] [−−
warnings[=wa
[−−names−only ] [−a ] [−u ] [−−no−subpages
] [−P
[−X[ dpi ] ] [−Z] [ [ s e c t i o n ] page . . . ] . . .
man −k [ apropos options ] regexp . . .
man −K [−w|−W] [−S l i s t ] [− i |− I ] [−−
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
apropos
$ apropos apropos
apropos (1) − search the manual page
names and
$ apropos pdf
pdfcrop (1) − crop pdf f i l e s to t h e i r
minimal
a2ping (1) − − convert between PS ,
EPS and PD
d v i p d f (1) − Convert TeX DVI f i l e to
PDF u s i n
dvipdfm (1) − Produce PDF f i l e s
d i r e c t l y from
d v i p d f t (1) − c r e a t e thumbnail images
for use
e 2 p a l l (1) − convert a l l EPS f i l e s
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
pwd
$ pwd
/home/ l i n d e n b / s r c / courses / about . l i n u x
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
mkdir
$ mkdir DIR1
$ mkdir DIR1/DIR2
$ mkdir −p DIR1/DIR3/DIR3
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
ls
$ l s
$ l s −l
$ l s −l a
$ l s −l a /home/
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
stdin, stderr, stdout
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
Redirection
$ echo ” Hello ” > f i l e 1 . t x t
$ echo ” Hello ” > f i l e 1 . t x t
$ echo ” Hello ” > f i l e 1 . t x t
$ cat f i l e 1 . t x t
Hello
$ echo ” Hello ” >> f i l e 2 . t x t
$ echo ” Hello ” >> f i l e 2 . t x t
$ echo ” Hello ” >> f i l e 2 . t x t
$ cat f i l e 2 . t x t
Hello
Hello
Hello
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
Reading
$ grep Hello << BARBAPAPA
> Hello
> Hello
> world
> BARBAPAPA
Hello
Hello
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
Pipe
$ gunzip −c input . vcf . gz | grep −v ’#’ | cut −
f 1 ,2 ,3 | t r ” t ” ”.” | sed ’ s / chr // ’ |
s o r t −t ’ . ’ −k2 ,2 rn | uniq | cat −n
1 1.871334. rs4072383
2 1.870903. rs13303094
3 1.866511. rs71576583
4 1.866319. rs9988021
5 1.861630. rs2879816
6 1.861008. rs28521172
7 1.762273. rs3115849
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
echo
$ echo ”ABCD”
$ echo −n ”ABCD”
$ echo −e ”AtBnCD”
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
’file’
Determine what type of data is
within a file.
$ f i l e ˜/ j e t e r . vcf . gz ˜/Documents/2011028. odp
/home/ l i n d e n b / j e t e r . vcf . gz : gzip
compressed data , e x t r a f i e l d
/home/ l i n d e n b /Documents /2011028. odp :
OpenDocument P r e s e n t a t i on
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
’tr’
translate or delete characters.
$ echo ”AAAAAAABCD” | t r ”A” ”a”
aaaaaaaBCD
$ echo ”AAAAAAABCD” | t r −s ”A”
ABCD
$ echo ”AAAAAAABCD” | t r −d ”A”
BCD
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
rm
$ rm f i l e 1 . t x t f i l e 2 . t x t
$ rm −r DIR1/ f i l e 1 . t x t
$ rm −i DIR1/ f i l e 1 . t x t
$ rm −f DIR1/ f i l e 1 . t x t
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
rmdir
$ rmdir DIR1
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
mv
$ mv DIR1/ f i l e 1 . t x t DIR2/
$ mv olname . t x t newname . t x t
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
cp
$ cp olname . t x t newname . t x t
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
more
$ more f i l e 1 . t x t f i l e 2 . t x t
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
cat
$ cat f i l e 1 . t x t f i l e 2 . t x t
$ cat −n f i l e 1 . t x t
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
head
output the first part of files.
$ head f i l e 1 . t x t
$ head −n 100 f i l e 1 . t x t
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
tail
output the last part of files.
$ head f i l e 1 . t x t
$ head −n 100 f i l e 1 . t x t
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
grep
$ grep Gene1 genes . t x t
$ grep −v Gene1 genes . t x t
$ grep −i Gene1 genes . t x t
$ grep −E ’( Gene1 | Protein1 ) ’ genes . t x t
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
cut
$ cut −d ’ ’ −f1 ,2 ,4 −10 f i l e 1
$ cut −c1−10 f i l e 1
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
sort
$ s o r t f i l e
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
nano
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
uniq
$ s o r t f i l e | uniq
$ s o r t f i l e | uniq −u
$ s o r t f i l e | uniq −d
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
wc
$ wc f i l e
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
awk for filtering
awk −F ’ ’ ’( $1==” chr1 ” && i n t ( $2 )>10 && i n t (
$2 ) <100) ’ f i l e . vcf
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
awk for printing
$ echo −e ” chr1  t20  t30  nchr1  t10  t20 ” |
awk −F ’ t ’ ’{ p r i n t f ( ”%s:%s−%dn” , $1 , $2 −1 ,
$3 + 4) ; } ’
chr1 :19−34
chr1 :9−24
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
join
$ j o i n −t ’ ’ −1 1 −2 1 f i l e 1 . t x t f i l e 2 . t x t
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
comm
$ comm f i l e 1 . t x t f i l e 2 . t x t
$ comm −12 f i l e 1 . t x t f i l e 2 . t x t
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
gzip , gunzip
$ gzip f i l e 1 . t x t
$ gunzip −c f i l e 1 . t x t . gz
$ gunzip f i l e 1 . t x t
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
sed
Usage:
sed ’ s /PATTERN/REPLACEBY/MODIFIER ’
Examples:
$ echo ” chr1 chr2 chr3 ” | sed ’ s / chr /CHROM / ’
CHROM 1 chr2 chr3
$ echo ” chr1 chr2 chr3 ” | sed ’ s / chr /CHROM /g ’
CHROM 1 CHROM 2 CHROM 3
$ echo ” chr1 chr2 chr3 ” | sed ’ s /Chr/CHROM / gi
’
CHROM 1 CHROM 2 CHROM 3
$ echo ” chr1 chr2 chr3 ” | sed ’ s / chr /CHROM /2 ’
chr1 CHROM 2 chr3
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
cmp
$ cmp f i l e 1 f i l e 2
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
diff
$ d i f f f i l e 1 f i l e 2
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
find
$ f i n d /path1 / path2 / d i r 2 −name ” ∗. vcf . gz”
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
paste
$ paste f i l e 1 f i l e 2 f i l e 3 f i l e 4
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
curl
$ c u r l ” f t p :// f t p .1000 genomes . e b i . ac . uk/ vol1 /
f t p / r e l e a s e /20110521/ ALL . wgs .
p h a s e 1 r e l e a s e v 3 .20101123. s n p s i n d e l s s v .
s i t e s . vcf . gz” |
gunzip −c | head
##f i l e f o r m a t=VCFv4 .1
##INFO=<ID=LDAF, Number=1,Type=Float ,
D e s c r i p t i on =”MLE A l l e l e Frequency
Accounting f o r LD”>
##INFO=<ID=AVGPOST, Number=1,Type=Float ,
D e s c r i p t i on =”Average p o s t e r i o r p r o b a b i l i t y
from MaCH/Thunder”>
##INFO=<ID=RSQ, Number=1,Type=Float , D e s c r i p t i on
=”Genotype imputation q u a l i t y from MaCH/
Thunder”>
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
curl + NCBI
$ c u r l −sg ’ http ://www. ncbi . nlm . nih . gov/ e n t r e z
/ e u t i l s / esearch . f c g i ?db=pubmed&term=watson [
AU]+ c r i c k [AU]+1953[ Date+−+P u b l i c a t i on ] ’
<?xml v e r s i o n=” 1.0 ” encoding=”UTF−8”?>
<eSearchResult >
<Count>3</Count>
<RetMax>3</RetMax>
<RetStart >0</RetStart >
<I d L i s t >
<Id >13063483</Id>
<Id >13054692</Id>
<Id >13168976</Id>
</I d L i s t >
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
curl + NCBI
$ c u r l −sg ’ http ://www. ncbi . nlm . nih . gov/ e n t r e z
/ e u t i l s / e f e t c h . f c g i ?db=pubmed&id
=13063483 ,13054692 ,13168976& retmode=xml ’ |
grep A r t i c l e T i t l e
<A r t i c l e T i t l e >G e n e t i c a l i m p l i c a t i o n s of the
s t r u c t u r e of d e o x y r i b o n u c l e i c acid .</
A r t i c l e T i t l e >
<A r t i c l e T i t l e >Molecular s t r u c t u r e of n u c l e i c
a c i d s ; a s t r u c t u r e for d e ox y r i b os e n u c l e i c
acid .</ A r t i c l e T i t l e >
<A r t i c l e T i t l e >The s t r u c t u r e of DNA.</
A r t i c l e T i t l e >
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
script
$ s c r i p t m y f i l e . t x t
S c r i p t started , f i l e i s m y f i l e . t x t
$ echo ” Hello ”
Hello
$ exit
S c r i p t done , f i l e i s m y f i l e . t x t
$ cat m y f i l e . t x t
> S c r i p t s t a r t e d on Thu 25 Jun 2015 11:50:43
AM CEST
> $ echo ” Hello ”
> Hello
> $ exit
> S c r i p t done on Thu 25 Jun 2015 11:50:52 AM
CEST
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
bc
$ echo ” (13.3∗2) /2.3 ” | bc
11
$ echo ” (13.3∗2) /2.3 ” | bc −l
11.56521739130434782608
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
chown/chmod/chgrp
chown p i e r r e f i l e . t x t
chgrp b i o i n f o r m a t i c s f i l e . t x t
chmod u+rw f i l e . t x t
chmod g+r f i l e . t x t
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
sqlite3
$ s q l i t e 3 test . s q l i t e 3
SQLite v e r s i o n 3. 7. 9 2011−11−01 00:52:41
Enter ” . help ” for i n s t r u c t i o n s
Enter SQL statements terminated with a ” ; ”
s q l i t e > c r e a t e t a b l e Person (name t e x t ) ;
s q l i t e > i n s e r t i n t o Person (name) v a l u e s ( ’
Pierre ’ ) ;
s q l i t e > i n s e r t i n t o Person (name) v a l u e s ( ’ Paul
’ ) ;
s q l i t e > i n s e r t i n t o Person (name) v a l u e s ( ’
Jacques ’ ) ;
s q l i t e > select name from Person ;
P i e r r e
Paul
Jacques
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
mysql
$ mysql −−user=genome −−host=genome−mysql . cse .
ucsc . edu −D hg19 −e ’ select chrom ,
chromStart , chromEnd , Observed from snp141
where name=” rs25 ” ’
+−−−−−−−+−−−−−−−−−−−−+−−−−−−−−−−+−−−−−−−−−−+
| chrom | chromStart | chromEnd | Observed |
+−−−−−−−+−−−−−−−−−−−−+−−−−−−−−−−+−−−−−−−−−−+
| chr7 | 11584141 | 11584142 | A/G |
+−−−−−−−+−−−−−−−−−−−−+−−−−−−−−−−+−−−−−−−−−−+
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
R
SampleID Dye C on c e n t r a t i on 1l Concentration2
rapp Qt AS Vol
E1−4 Cy5 3 ,52 203 ,79 2 ,25 6 ,1 17 ,3 4 ,05
E1−5 Cy3 3 ,14 174 ,16 2 ,22 5 ,2 18 4 ,74
E2−4 Cy3 1 ,64 101 ,18 2 ,25 3 16 ,2 8 ,15
E2−5 Cy3 3 ,41 213 ,74 2 ,26 6 ,4 16 3 ,86
E3−4 Cy3 3 ,11 184 ,15 2 ,22 5 ,5 16 ,9 4 ,48
E3−5 Cy5 3 ,58 189 ,31 2 ,24 5 ,7 18 ,9 4 ,36
mean( samples$Concentration2 )
samples <− read . table ( ” samples2 . t x t ” ,
dec=” , ” ,
header=TRUE)
mean( samples$ Concentration2 )
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
’git’
mkdir t e s t
cd t e s t
g i t i n i t
I n i t i a l i z e d empty Git r e p o s i t o r y i n t e s t /. g i t /
$ g i t add f i l e . t x t
$ g i t commit −m ”Added one f i l e ”
[ master ( root−commit) 4954 d33 ] Added one f i l e
$ echo ”World ” >> f i l e . t x t
$ g i t d i f f
d i f f −−g i t a/ f i l e . t x t b/ f i l e . t x t
@@ −1 +1,2 @@
H e l l o
+World
$ g i t add f i l e . t x t
$ g i t commit −m ” added h e l l o ”
$ g i t log f i l e . t x t
( . . . )
$ g i t rm f i l e . t x t
$ g i t checkout f i l e . t x t
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
’LaTeX’
documentclass{article}
title{My Thesis}
author{Pierre}
date{September 2015}
begin{document}
maketitle
Hello world!
end{document}
p d f l a t e x input . tex
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
Install a program
c u r l −kL −o bwa −0.7.12. z i p −L ” https :// github .
com/ lh3 /bwa/ a r c h i v e / 0 . 7 . 1 2 . z i p ”
unzip bwa −0.7.12. z i p
make −C bwa −0.7.12/
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
bash Scripting
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
chmod+x and shebang
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
bash script
#!/ bin /bash
echo ” Hello ” > h e l l o . t x t
echo ”World” > world . t x t
cat h e l l o . t x t world . t x t > h e l l od w or l d . t x t
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
make
#!/ bin /bash
function q u i t {
exit
}
function e {
echo $1
}
e Hello
e World
q u i t
echo foo
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
Simple math
echo $((1+1) )
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
Simple loop
#!/ bin /bash
for i in 1 2 3 4 5 6; do
echo item : $i
done
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
While read
#!/ bin /bash
cat f i l e . t x t | while read L ; do
echo $L
done
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
Make Scripting
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
make
a l l : h e l l od w or l d . t x t
cat $<
h e l l od w or l d . t x t : h e l l o . t x t world . t x t
cat $ˆ > $@
h e l l o . t x t :
echo ” Hello ” > $@
world . t x t :
echo ”World” > $@
clean :
rm −f h e l l od w or l d . t x t h e l l o . t x t world
. t x t
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
See also:
http://korflab.ucdavis.edu/Unix_and_Perl/current.html
http://unix.stackexchange.com/
http://stackoverflow.com/
https://www.biostars.org/
@yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux

Más contenido relacionado

La actualidad más candente

Using the Power to Prove
Using the Power to ProveUsing the Power to Prove
Using the Power to ProveKazuho Oku
 
¡Ups! código inseguro: detección, explotación y mitigación de vulnerabilidade...
¡Ups! código inseguro: detección, explotación y mitigación de vulnerabilidade...¡Ups! código inseguro: detección, explotación y mitigación de vulnerabilidade...
¡Ups! código inseguro: detección, explotación y mitigación de vulnerabilidade...Software Guru
 
Tutti i miei sbagli, versione 7 Marzo 2012 al XPUG mi
Tutti i miei sbagli, versione 7 Marzo 2012 al XPUG miTutti i miei sbagli, versione 7 Marzo 2012 al XPUG mi
Tutti i miei sbagli, versione 7 Marzo 2012 al XPUG miAndrea Francia
 
PHP-FIG: Past, Present and Future
PHP-FIG: Past, Present and FuturePHP-FIG: Past, Present and Future
PHP-FIG: Past, Present and FuturePhil Sturgeon
 
System Hacking Tutorial #1 - Introduction to Vulnerability and Type of Vulner...
System Hacking Tutorial #1 - Introduction to Vulnerability and Type of Vulner...System Hacking Tutorial #1 - Introduction to Vulnerability and Type of Vulner...
System Hacking Tutorial #1 - Introduction to Vulnerability and Type of Vulner...sanghwan ahn
 
ch6-pv2-device-drivers
ch6-pv2-device-driversch6-pv2-device-drivers
ch6-pv2-device-driversyushiang fu
 
Python by Martin Geisler
Python by Martin GeislerPython by Martin Geisler
Python by Martin GeislerAberla
 
7 strace examples to debug the execution of a program in linux
7 strace examples to debug the execution of a program in linux7 strace examples to debug the execution of a program in linux
7 strace examples to debug the execution of a program in linuxchinkshady
 
The state of PHPUnit
The state of PHPUnitThe state of PHPUnit
The state of PHPUnitEdorian
 
Masters bioinfo 2013-11-14-15
Masters bioinfo 2013-11-14-15Masters bioinfo 2013-11-14-15
Masters bioinfo 2013-11-14-15Yannick Wurm
 
A Stealthy Stealers - Spyware Toolkit and What They Do
A Stealthy Stealers - Spyware Toolkit and What They DoA Stealthy Stealers - Spyware Toolkit and What They Do
A Stealthy Stealers - Spyware Toolkit and What They Dosanghwan ahn
 
StackOverflow
StackOverflowStackOverflow
StackOverflowSusam Pal
 
System Hacking Tutorial #2 - Buffer Overflow - Overwrite EIP
System Hacking Tutorial #2 - Buffer Overflow - Overwrite EIPSystem Hacking Tutorial #2 - Buffer Overflow - Overwrite EIP
System Hacking Tutorial #2 - Buffer Overflow - Overwrite EIPsanghwan ahn
 
The bytecode hocus pocus - JavaOne 2016
The bytecode hocus pocus - JavaOne 2016The bytecode hocus pocus - JavaOne 2016
The bytecode hocus pocus - JavaOne 2016Raimon Ràfols
 
T3CON14EU: Migrating from TYPO3 CMS to TYPO3 Flow
T3CON14EU: Migrating from TYPO3 CMS to TYPO3 FlowT3CON14EU: Migrating from TYPO3 CMS to TYPO3 Flow
T3CON14EU: Migrating from TYPO3 CMS to TYPO3 Flowmhelmich
 
Ilfak Guilfanov - Decompiler internals: Microcode [rooted2018]
Ilfak Guilfanov - Decompiler internals: Microcode [rooted2018]Ilfak Guilfanov - Decompiler internals: Microcode [rooted2018]
Ilfak Guilfanov - Decompiler internals: Microcode [rooted2018]RootedCON
 

La actualidad más candente (20)

Using the Power to Prove
Using the Power to ProveUsing the Power to Prove
Using the Power to Prove
 
Java Bytecodes by Example
Java Bytecodes by ExampleJava Bytecodes by Example
Java Bytecodes by Example
 
¡Ups! código inseguro: detección, explotación y mitigación de vulnerabilidade...
¡Ups! código inseguro: detección, explotación y mitigación de vulnerabilidade...¡Ups! código inseguro: detección, explotación y mitigación de vulnerabilidade...
¡Ups! código inseguro: detección, explotación y mitigación de vulnerabilidade...
 
Linux
LinuxLinux
Linux
 
Tutti i miei sbagli, versione 7 Marzo 2012 al XPUG mi
Tutti i miei sbagli, versione 7 Marzo 2012 al XPUG miTutti i miei sbagli, versione 7 Marzo 2012 al XPUG mi
Tutti i miei sbagli, versione 7 Marzo 2012 al XPUG mi
 
PHP-FIG: Past, Present and Future
PHP-FIG: Past, Present and FuturePHP-FIG: Past, Present and Future
PHP-FIG: Past, Present and Future
 
System Hacking Tutorial #1 - Introduction to Vulnerability and Type of Vulner...
System Hacking Tutorial #1 - Introduction to Vulnerability and Type of Vulner...System Hacking Tutorial #1 - Introduction to Vulnerability and Type of Vulner...
System Hacking Tutorial #1 - Introduction to Vulnerability and Type of Vulner...
 
ch6-pv2-device-drivers
ch6-pv2-device-driversch6-pv2-device-drivers
ch6-pv2-device-drivers
 
Python by Martin Geisler
Python by Martin GeislerPython by Martin Geisler
Python by Martin Geisler
 
7 strace examples to debug the execution of a program in linux
7 strace examples to debug the execution of a program in linux7 strace examples to debug the execution of a program in linux
7 strace examples to debug the execution of a program in linux
 
The state of PHPUnit
The state of PHPUnitThe state of PHPUnit
The state of PHPUnit
 
ROP
ROPROP
ROP
 
TimeCryption
TimeCryptionTimeCryption
TimeCryption
 
Masters bioinfo 2013-11-14-15
Masters bioinfo 2013-11-14-15Masters bioinfo 2013-11-14-15
Masters bioinfo 2013-11-14-15
 
A Stealthy Stealers - Spyware Toolkit and What They Do
A Stealthy Stealers - Spyware Toolkit and What They DoA Stealthy Stealers - Spyware Toolkit and What They Do
A Stealthy Stealers - Spyware Toolkit and What They Do
 
StackOverflow
StackOverflowStackOverflow
StackOverflow
 
System Hacking Tutorial #2 - Buffer Overflow - Overwrite EIP
System Hacking Tutorial #2 - Buffer Overflow - Overwrite EIPSystem Hacking Tutorial #2 - Buffer Overflow - Overwrite EIP
System Hacking Tutorial #2 - Buffer Overflow - Overwrite EIP
 
The bytecode hocus pocus - JavaOne 2016
The bytecode hocus pocus - JavaOne 2016The bytecode hocus pocus - JavaOne 2016
The bytecode hocus pocus - JavaOne 2016
 
T3CON14EU: Migrating from TYPO3 CMS to TYPO3 Flow
T3CON14EU: Migrating from TYPO3 CMS to TYPO3 FlowT3CON14EU: Migrating from TYPO3 CMS to TYPO3 Flow
T3CON14EU: Migrating from TYPO3 CMS to TYPO3 Flow
 
Ilfak Guilfanov - Decompiler internals: Microcode [rooted2018]
Ilfak Guilfanov - Decompiler internals: Microcode [rooted2018]Ilfak Guilfanov - Decompiler internals: Microcode [rooted2018]
Ilfak Guilfanov - Decompiler internals: Microcode [rooted2018]
 

Destacado

NGS data formats and analyses
NGS data formats and analysesNGS data formats and analyses
NGS data formats and analysesrjorton
 
diffReps: automated ChIP-seq differential analysis package
diffReps: automated ChIP-seq differential analysis packagediffReps: automated ChIP-seq differential analysis package
diffReps: automated ChIP-seq differential analysis packageLi Shen
 
Quality Control of NGS Data
Quality Control of NGS Data Quality Control of NGS Data
Quality Control of NGS Data Surya Saha
 
IFB cloud: Integration of snakemake workflows in an appliance designed for Ch...
IFB cloud: Integration of snakemake workflows in an appliance designed for Ch...IFB cloud: Integration of snakemake workflows in an appliance designed for Ch...
IFB cloud: Integration of snakemake workflows in an appliance designed for Ch...Claire Rioualen
 
NGS Data Preprocessing
NGS Data PreprocessingNGS Data Preprocessing
NGS Data PreprocessingcursoNGS
 
Next-generation sequencing format and visualization with ngs.plot
Next-generation sequencing format and visualization with ngs.plotNext-generation sequencing format and visualization with ngs.plot
Next-generation sequencing format and visualization with ngs.plotLi Shen
 
Case studies of HTS / NGS applications
Case studies of HTS / NGS applicationsCase studies of HTS / NGS applications
Case studies of HTS / NGS applicationsrjorton
 
Pourquoi et comment créer son Réseau
Pourquoi et comment créer son RéseauPourquoi et comment créer son Réseau
Pourquoi et comment créer son RéseauPierre Lindenbaum
 
Artificial Intelligence: Facebook loses to Google in race to solve the ancien...
Artificial Intelligence: Facebook loses to Google in race to solve the ancien...Artificial Intelligence: Facebook loses to Google in race to solve the ancien...
Artificial Intelligence: Facebook loses to Google in race to solve the ancien...Claire Rioualen
 
Bioinfo ngs data format visualization v2
Bioinfo ngs data format visualization v2Bioinfo ngs data format visualization v2
Bioinfo ngs data format visualization v2Li Shen
 
Genomics in the Cloud
Genomics in the CloudGenomics in the Cloud
Genomics in the CloudMatt Wood
 
Long-read: assets and challenges of a (not so) emerging technology
Long-read: assets and challenges of a (not so) emerging technologyLong-read: assets and challenges of a (not so) emerging technology
Long-read: assets and challenges of a (not so) emerging technologyClaire Rioualen
 
Deciphering cancer stem cells regulatory circuits through an interactome–regu...
Deciphering cancer stem cells regulatory circuits through an interactome–regu...Deciphering cancer stem cells regulatory circuits through an interactome–regu...
Deciphering cancer stem cells regulatory circuits through an interactome–regu...Claire Rioualen
 
Next-generation sequencing - variation discovery
Next-generation sequencing - variation discoveryNext-generation sequencing - variation discovery
Next-generation sequencing - variation discoveryJan Aerts
 
Data Management for Quantitative Biology - Data sources (Next generation tech...
Data Management for Quantitative Biology - Data sources (Next generation tech...Data Management for Quantitative Biology - Data sources (Next generation tech...
Data Management for Quantitative Biology - Data sources (Next generation tech...QBiC_Tue
 
Variant (SNP) calling - an introduction (with a worked example, using FreeBay...
Variant (SNP) calling - an introduction (with a worked example, using FreeBay...Variant (SNP) calling - an introduction (with a worked example, using FreeBay...
Variant (SNP) calling - an introduction (with a worked example, using FreeBay...Manikhandan Mudaliar
 
Next-generation sequencing: Data mangement
Next-generation sequencing: Data mangementNext-generation sequencing: Data mangement
Next-generation sequencing: Data mangementGuy Coates
 

Destacado (20)

NGS data formats and analyses
NGS data formats and analysesNGS data formats and analyses
NGS data formats and analyses
 
diffReps: automated ChIP-seq differential analysis package
diffReps: automated ChIP-seq differential analysis packagediffReps: automated ChIP-seq differential analysis package
diffReps: automated ChIP-seq differential analysis package
 
Quality Control of NGS Data
Quality Control of NGS Data Quality Control of NGS Data
Quality Control of NGS Data
 
IFB cloud: Integration of snakemake workflows in an appliance designed for Ch...
IFB cloud: Integration of snakemake workflows in an appliance designed for Ch...IFB cloud: Integration of snakemake workflows in an appliance designed for Ch...
IFB cloud: Integration of snakemake workflows in an appliance designed for Ch...
 
NGS Data Preprocessing
NGS Data PreprocessingNGS Data Preprocessing
NGS Data Preprocessing
 
Next-generation sequencing format and visualization with ngs.plot
Next-generation sequencing format and visualization with ngs.plotNext-generation sequencing format and visualization with ngs.plot
Next-generation sequencing format and visualization with ngs.plot
 
NGS - QC & Dataformat
NGS - QC & Dataformat NGS - QC & Dataformat
NGS - QC & Dataformat
 
Case studies of HTS / NGS applications
Case studies of HTS / NGS applicationsCase studies of HTS / NGS applications
Case studies of HTS / NGS applications
 
Pourquoi et comment créer son Réseau
Pourquoi et comment créer son RéseauPourquoi et comment créer son Réseau
Pourquoi et comment créer son Réseau
 
Make
MakeMake
Make
 
Artificial Intelligence: Facebook loses to Google in race to solve the ancien...
Artificial Intelligence: Facebook loses to Google in race to solve the ancien...Artificial Intelligence: Facebook loses to Google in race to solve the ancien...
Artificial Intelligence: Facebook loses to Google in race to solve the ancien...
 
Bioinfo ngs data format visualization v2
Bioinfo ngs data format visualization v2Bioinfo ngs data format visualization v2
Bioinfo ngs data format visualization v2
 
Genomics in the Cloud
Genomics in the CloudGenomics in the Cloud
Genomics in the Cloud
 
Long-read: assets and challenges of a (not so) emerging technology
Long-read: assets and challenges of a (not so) emerging technologyLong-read: assets and challenges of a (not so) emerging technology
Long-read: assets and challenges of a (not so) emerging technology
 
Deciphering cancer stem cells regulatory circuits through an interactome–regu...
Deciphering cancer stem cells regulatory circuits through an interactome–regu...Deciphering cancer stem cells regulatory circuits through an interactome–regu...
Deciphering cancer stem cells regulatory circuits through an interactome–regu...
 
Advanced NCBI
Advanced NCBI Advanced NCBI
Advanced NCBI
 
Next-generation sequencing - variation discovery
Next-generation sequencing - variation discoveryNext-generation sequencing - variation discovery
Next-generation sequencing - variation discovery
 
Data Management for Quantitative Biology - Data sources (Next generation tech...
Data Management for Quantitative Biology - Data sources (Next generation tech...Data Management for Quantitative Biology - Data sources (Next generation tech...
Data Management for Quantitative Biology - Data sources (Next generation tech...
 
Variant (SNP) calling - an introduction (with a worked example, using FreeBay...
Variant (SNP) calling - an introduction (with a worked example, using FreeBay...Variant (SNP) calling - an introduction (with a worked example, using FreeBay...
Variant (SNP) calling - an introduction (with a worked example, using FreeBay...
 
Next-generation sequencing: Data mangement
Next-generation sequencing: Data mangementNext-generation sequencing: Data mangement
Next-generation sequencing: Data mangement
 

Similar a Introduction to Linux

01_linux_basics.ppt
01_linux_basics.ppt01_linux_basics.ppt
01_linux_basics.pptMahmood Adel
 
A CTF Hackers Toolbox
A CTF Hackers ToolboxA CTF Hackers Toolbox
A CTF Hackers ToolboxStefan
 
Kernel Recipes 2016 - Why you need a test strategy for your kernel development
Kernel Recipes 2016 - Why you need a test strategy for your kernel developmentKernel Recipes 2016 - Why you need a test strategy for your kernel development
Kernel Recipes 2016 - Why you need a test strategy for your kernel developmentAnne Nicolas
 
Simplest-Ownage-Human-Observed… - Routers
 Simplest-Ownage-Human-Observed… - Routers Simplest-Ownage-Human-Observed… - Routers
Simplest-Ownage-Human-Observed… - RoutersLogicaltrust pl
 
Filip palian mateuszkocielski. simplest ownage human observed… routers
Filip palian mateuszkocielski. simplest ownage human observed… routersFilip palian mateuszkocielski. simplest ownage human observed… routers
Filip palian mateuszkocielski. simplest ownage human observed… routersYury Chemerkin
 
Slackware Demystified [SELF 2011]
Slackware Demystified [SELF 2011]Slackware Demystified [SELF 2011]
Slackware Demystified [SELF 2011]Vincent Batts
 
Shell programming 2
Shell programming 2Shell programming 2
Shell programming 2Kalkey
 
Shell programming 2
Shell programming 2Shell programming 2
Shell programming 2Gourav Varma
 
Being functional in PHP
Being functional in PHPBeing functional in PHP
Being functional in PHPDavid de Boer
 
Linux Network commands
Linux Network commandsLinux Network commands
Linux Network commandsHanan Nmr
 
Event Stream Processing with Multiple Threads
Event Stream Processing with Multiple ThreadsEvent Stream Processing with Multiple Threads
Event Stream Processing with Multiple ThreadsSylvain Hallé
 
17 Linux Basics #burningkeyboards
17 Linux Basics #burningkeyboards17 Linux Basics #burningkeyboards
17 Linux Basics #burningkeyboardsDenis Ristic
 

Similar a Introduction to Linux (20)

Unix 5 en
Unix 5 enUnix 5 en
Unix 5 en
 
01_linux_basics.ppt
01_linux_basics.ppt01_linux_basics.ppt
01_linux_basics.ppt
 
01 linux basics
01 linux basics01 linux basics
01 linux basics
 
10.8.2018
10.8.201810.8.2018
10.8.2018
 
A CTF Hackers Toolbox
A CTF Hackers ToolboxA CTF Hackers Toolbox
A CTF Hackers Toolbox
 
Linux Basics
Linux BasicsLinux Basics
Linux Basics
 
Farewell to Disks: Efficient Processing of Obstinate Data
Farewell to Disks: Efficient Processing of Obstinate DataFarewell to Disks: Efficient Processing of Obstinate Data
Farewell to Disks: Efficient Processing of Obstinate Data
 
Kernel Recipes 2016 - Why you need a test strategy for your kernel development
Kernel Recipes 2016 - Why you need a test strategy for your kernel developmentKernel Recipes 2016 - Why you need a test strategy for your kernel development
Kernel Recipes 2016 - Why you need a test strategy for your kernel development
 
Perl Programming - 01 Basic Perl
Perl Programming - 01 Basic PerlPerl Programming - 01 Basic Perl
Perl Programming - 01 Basic Perl
 
Python1
Python1Python1
Python1
 
Simplest-Ownage-Human-Observed… - Routers
 Simplest-Ownage-Human-Observed… - Routers Simplest-Ownage-Human-Observed… - Routers
Simplest-Ownage-Human-Observed… - Routers
 
Filip palian mateuszkocielski. simplest ownage human observed… routers
Filip palian mateuszkocielski. simplest ownage human observed… routersFilip palian mateuszkocielski. simplest ownage human observed… routers
Filip palian mateuszkocielski. simplest ownage human observed… routers
 
Slackware Demystified [SELF 2011]
Slackware Demystified [SELF 2011]Slackware Demystified [SELF 2011]
Slackware Demystified [SELF 2011]
 
Shell programming 2
Shell programming 2Shell programming 2
Shell programming 2
 
Shell programming 2
Shell programming 2Shell programming 2
Shell programming 2
 
Basic Introduction to LaTeX
Basic Introduction to LaTeXBasic Introduction to LaTeX
Basic Introduction to LaTeX
 
Being functional in PHP
Being functional in PHPBeing functional in PHP
Being functional in PHP
 
Linux Network commands
Linux Network commandsLinux Network commands
Linux Network commands
 
Event Stream Processing with Multiple Threads
Event Stream Processing with Multiple ThreadsEvent Stream Processing with Multiple Threads
Event Stream Processing with Multiple Threads
 
17 Linux Basics #burningkeyboards
17 Linux Basics #burningkeyboards17 Linux Basics #burningkeyboards
17 Linux Basics #burningkeyboards
 

Más de Pierre Lindenbaum

Más de Pierre Lindenbaum (20)

Mum, I 3D printed a gel comb !
Mum, I 3D printed a gel comb !Mum, I 3D printed a gel comb !
Mum, I 3D printed a gel comb !
 
Building a Simple LIMS with the Eclipse Modeling Framework (EMF) ,my notebook
Building a Simple LIMS with the Eclipse Modeling Framework (EMF) ,my notebookBuilding a Simple LIMS with the Eclipse Modeling Framework (EMF) ,my notebook
Building a Simple LIMS with the Eclipse Modeling Framework (EMF) ,my notebook
 
XML for bioinformatics
XML for bioinformaticsXML for bioinformatics
XML for bioinformatics
 
20120423.NGS.Rennes
20120423.NGS.Rennes20120423.NGS.Rennes
20120423.NGS.Rennes
 
Sketching 20120412
Sketching 20120412Sketching 20120412
Sketching 20120412
 
Introduction to mongodb for bioinformatics
Introduction to mongodb for bioinformaticsIntroduction to mongodb for bioinformatics
Introduction to mongodb for bioinformatics
 
Biostar17037
Biostar17037Biostar17037
Biostar17037
 
Tweeting for the BioStar Paper
Tweeting for the BioStar PaperTweeting for the BioStar Paper
Tweeting for the BioStar Paper
 
Variation Toolkit
Variation ToolkitVariation Toolkit
Variation Toolkit
 
Bioinformatician 2.0
Bioinformatician 2.0Bioinformatician 2.0
Bioinformatician 2.0
 
Analyzing Exome Data with KNIME
Analyzing Exome Data with KNIMEAnalyzing Exome Data with KNIME
Analyzing Exome Data with KNIME
 
NOTCH2 backstage
NOTCH2 backstageNOTCH2 backstage
NOTCH2 backstage
 
Bioinfo tweets
Bioinfo tweetsBioinfo tweets
Bioinfo tweets
 
Post doctoriales 2011
Post doctoriales 2011Post doctoriales 2011
Post doctoriales 2011
 
MyWordle.java
MyWordle.javaMyWordle.java
MyWordle.java
 
Biblio2.0
Biblio2.0Biblio2.0
Biblio2.0
 
Me & Biohackathon 2010
Me & Biohackathon 2010Me & Biohackathon 2010
Me & Biohackathon 2010
 
An implementation of Jan Aerts' LocusTree
An implementation of Jan Aerts' LocusTreeAn implementation of Jan Aerts' LocusTree
An implementation of Jan Aerts' LocusTree
 
Bibliography2.0
Bibliography2.0Bibliography2.0
Bibliography2.0
 
RoXaN, une nouvelle protéine cellulaire interagissant avec la protéine non-st...
RoXaN, une nouvelle protéine cellulaire interagissant avec la protéine non-st...RoXaN, une nouvelle protéine cellulaire interagissant avec la protéine non-st...
RoXaN, une nouvelle protéine cellulaire interagissant avec la protéine non-st...
 

Último

Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 

Último (20)

Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 

Introduction to Linux

  • 1. Introduction to Linux @yokofakun http://plindenbaum.blogspot.com UMR 1087 - Institut du Thorax. Nantes. France June 25, 2015 @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 3. The terminal @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 4. The shell: BASH is running @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 5. Unix keeps files arranged in a hierarchical structure @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 7. PROGRAM @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 8. $ programname ( options ) ( f i l e s ) @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 9. Navigation where am I ? $ pwd Go to directory dir1 $ cd d i r 1 Go to directory dir1/dir2 $ cd d i r 1 / d i r 2 Go upper directory $ cd . . Go upper directory and then go to dir4 $ cd . . / d i r 4 @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 10. Navigation Go to the root $ cd / Go to my home $ cd ˜ Go to my previous directory $ cd / @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 11. Completion @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 12. CASE matters $ cd d i r 1 $ cd DIR1 @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 13. Regular Expression. ’?’ : The question mark indicates there is zero or one of the preceding element. For example, colou?r matches both ”color” and ”colour”. ’*’ : The asterisk indicates there is zero or more of the preceding element. For example, ab*c matches ”ac”, ”abc”, ”abbc”, ”abbbc”, and so on. ’+’ : The plus sign indicates there is one or more of the preceding element. For example, ab+c matches ”abc”, ”abbc”, ”abbbc”, and so on, but not ”ac”. (a—b)* denotes the set of all strings. : A bracket expression. Matches a single character that is contained within the brackets. ˆMatches the starting position within the string. $ Matches the ending position of the string or the position just before a string-ending newline. @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 14. Escape characters. Cariage Return. n Tabulation. t @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 15. Shell shortcuts. Arrow-up/down: prev/next in history. Ctr-R : Search history. Ctr-A : Begin line. Ctr-E : End line. Ctr-K : Cut line. Ctr-D and tab : insert tabulation. Ctr-D and tab : insert tabulation. Ctr-D (in pipeline): EOF (End Of File). @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 16. whitespaces matter $ cd my r e s u l t s bash : cd : my: No such f i l e or d i r e c t o r y $ cd ”my r e s u l t s ” $ cd my r e s u l t s @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 17. man $ man man MAN(1) NAME man − an i n t e r f a c e to the on−l i n e r e f e r e n c e SYNOPSIS man [−C f i l e ] [−d ] [−D] [−− warnings[=wa [−−names−only ] [−a ] [−u ] [−−no−subpages ] [−P [−X[ dpi ] ] [−Z] [ [ s e c t i o n ] page . . . ] . . . man −k [ apropos options ] regexp . . . man −K [−w|−W] [−S l i s t ] [− i |− I ] [−− @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 18. apropos $ apropos apropos apropos (1) − search the manual page names and $ apropos pdf pdfcrop (1) − crop pdf f i l e s to t h e i r minimal a2ping (1) − − convert between PS , EPS and PD d v i p d f (1) − Convert TeX DVI f i l e to PDF u s i n dvipdfm (1) − Produce PDF f i l e s d i r e c t l y from d v i p d f t (1) − c r e a t e thumbnail images for use e 2 p a l l (1) − convert a l l EPS f i l e s @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 19. pwd $ pwd /home/ l i n d e n b / s r c / courses / about . l i n u x @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 20. mkdir $ mkdir DIR1 $ mkdir DIR1/DIR2 $ mkdir −p DIR1/DIR3/DIR3 @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 21. ls $ l s $ l s −l $ l s −l a $ l s −l a /home/ @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 22. stdin, stderr, stdout @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 23. Redirection $ echo ” Hello ” > f i l e 1 . t x t $ echo ” Hello ” > f i l e 1 . t x t $ echo ” Hello ” > f i l e 1 . t x t $ cat f i l e 1 . t x t Hello $ echo ” Hello ” >> f i l e 2 . t x t $ echo ” Hello ” >> f i l e 2 . t x t $ echo ” Hello ” >> f i l e 2 . t x t $ cat f i l e 2 . t x t Hello Hello Hello @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 24. Reading $ grep Hello << BARBAPAPA > Hello > Hello > world > BARBAPAPA Hello Hello @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 25. Pipe $ gunzip −c input . vcf . gz | grep −v ’#’ | cut − f 1 ,2 ,3 | t r ” t ” ”.” | sed ’ s / chr // ’ | s o r t −t ’ . ’ −k2 ,2 rn | uniq | cat −n 1 1.871334. rs4072383 2 1.870903. rs13303094 3 1.866511. rs71576583 4 1.866319. rs9988021 5 1.861630. rs2879816 6 1.861008. rs28521172 7 1.762273. rs3115849 @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 26. echo $ echo ”ABCD” $ echo −n ”ABCD” $ echo −e ”AtBnCD” @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 27. ’file’ Determine what type of data is within a file. $ f i l e ˜/ j e t e r . vcf . gz ˜/Documents/2011028. odp /home/ l i n d e n b / j e t e r . vcf . gz : gzip compressed data , e x t r a f i e l d /home/ l i n d e n b /Documents /2011028. odp : OpenDocument P r e s e n t a t i on @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 28. ’tr’ translate or delete characters. $ echo ”AAAAAAABCD” | t r ”A” ”a” aaaaaaaBCD $ echo ”AAAAAAABCD” | t r −s ”A” ABCD $ echo ”AAAAAAABCD” | t r −d ”A” BCD @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 29. rm $ rm f i l e 1 . t x t f i l e 2 . t x t $ rm −r DIR1/ f i l e 1 . t x t $ rm −i DIR1/ f i l e 1 . t x t $ rm −f DIR1/ f i l e 1 . t x t @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 30. rmdir $ rmdir DIR1 @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 31. mv $ mv DIR1/ f i l e 1 . t x t DIR2/ $ mv olname . t x t newname . t x t @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 32. cp $ cp olname . t x t newname . t x t @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 33. more $ more f i l e 1 . t x t f i l e 2 . t x t @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 34. cat $ cat f i l e 1 . t x t f i l e 2 . t x t $ cat −n f i l e 1 . t x t @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 35. head output the first part of files. $ head f i l e 1 . t x t $ head −n 100 f i l e 1 . t x t @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 36. tail output the last part of files. $ head f i l e 1 . t x t $ head −n 100 f i l e 1 . t x t @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 37. grep $ grep Gene1 genes . t x t $ grep −v Gene1 genes . t x t $ grep −i Gene1 genes . t x t $ grep −E ’( Gene1 | Protein1 ) ’ genes . t x t @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 38. cut $ cut −d ’ ’ −f1 ,2 ,4 −10 f i l e 1 $ cut −c1−10 f i l e 1 @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 39. sort $ s o r t f i l e @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 40. nano @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 41. uniq $ s o r t f i l e | uniq $ s o r t f i l e | uniq −u $ s o r t f i l e | uniq −d @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 42. wc $ wc f i l e @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 43. awk for filtering awk −F ’ ’ ’( $1==” chr1 ” && i n t ( $2 )>10 && i n t ( $2 ) <100) ’ f i l e . vcf @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 44. awk for printing $ echo −e ” chr1 t20 t30 nchr1 t10 t20 ” | awk −F ’ t ’ ’{ p r i n t f ( ”%s:%s−%dn” , $1 , $2 −1 , $3 + 4) ; } ’ chr1 :19−34 chr1 :9−24 @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 45. join $ j o i n −t ’ ’ −1 1 −2 1 f i l e 1 . t x t f i l e 2 . t x t @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 46. comm $ comm f i l e 1 . t x t f i l e 2 . t x t $ comm −12 f i l e 1 . t x t f i l e 2 . t x t @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 47. gzip , gunzip $ gzip f i l e 1 . t x t $ gunzip −c f i l e 1 . t x t . gz $ gunzip f i l e 1 . t x t @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 48. sed Usage: sed ’ s /PATTERN/REPLACEBY/MODIFIER ’ Examples: $ echo ” chr1 chr2 chr3 ” | sed ’ s / chr /CHROM / ’ CHROM 1 chr2 chr3 $ echo ” chr1 chr2 chr3 ” | sed ’ s / chr /CHROM /g ’ CHROM 1 CHROM 2 CHROM 3 $ echo ” chr1 chr2 chr3 ” | sed ’ s /Chr/CHROM / gi ’ CHROM 1 CHROM 2 CHROM 3 $ echo ” chr1 chr2 chr3 ” | sed ’ s / chr /CHROM /2 ’ chr1 CHROM 2 chr3 @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 49. cmp $ cmp f i l e 1 f i l e 2 @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 50. diff $ d i f f f i l e 1 f i l e 2 @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 51. find $ f i n d /path1 / path2 / d i r 2 −name ” ∗. vcf . gz” @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 52. paste $ paste f i l e 1 f i l e 2 f i l e 3 f i l e 4 @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 53. curl $ c u r l ” f t p :// f t p .1000 genomes . e b i . ac . uk/ vol1 / f t p / r e l e a s e /20110521/ ALL . wgs . p h a s e 1 r e l e a s e v 3 .20101123. s n p s i n d e l s s v . s i t e s . vcf . gz” | gunzip −c | head ##f i l e f o r m a t=VCFv4 .1 ##INFO=<ID=LDAF, Number=1,Type=Float , D e s c r i p t i on =”MLE A l l e l e Frequency Accounting f o r LD”> ##INFO=<ID=AVGPOST, Number=1,Type=Float , D e s c r i p t i on =”Average p o s t e r i o r p r o b a b i l i t y from MaCH/Thunder”> ##INFO=<ID=RSQ, Number=1,Type=Float , D e s c r i p t i on =”Genotype imputation q u a l i t y from MaCH/ Thunder”> @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 54. curl + NCBI $ c u r l −sg ’ http ://www. ncbi . nlm . nih . gov/ e n t r e z / e u t i l s / esearch . f c g i ?db=pubmed&term=watson [ AU]+ c r i c k [AU]+1953[ Date+−+P u b l i c a t i on ] ’ <?xml v e r s i o n=” 1.0 ” encoding=”UTF−8”?> <eSearchResult > <Count>3</Count> <RetMax>3</RetMax> <RetStart >0</RetStart > <I d L i s t > <Id >13063483</Id> <Id >13054692</Id> <Id >13168976</Id> </I d L i s t > @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 55. curl + NCBI $ c u r l −sg ’ http ://www. ncbi . nlm . nih . gov/ e n t r e z / e u t i l s / e f e t c h . f c g i ?db=pubmed&id =13063483 ,13054692 ,13168976& retmode=xml ’ | grep A r t i c l e T i t l e <A r t i c l e T i t l e >G e n e t i c a l i m p l i c a t i o n s of the s t r u c t u r e of d e o x y r i b o n u c l e i c acid .</ A r t i c l e T i t l e > <A r t i c l e T i t l e >Molecular s t r u c t u r e of n u c l e i c a c i d s ; a s t r u c t u r e for d e ox y r i b os e n u c l e i c acid .</ A r t i c l e T i t l e > <A r t i c l e T i t l e >The s t r u c t u r e of DNA.</ A r t i c l e T i t l e > @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 56. script $ s c r i p t m y f i l e . t x t S c r i p t started , f i l e i s m y f i l e . t x t $ echo ” Hello ” Hello $ exit S c r i p t done , f i l e i s m y f i l e . t x t $ cat m y f i l e . t x t > S c r i p t s t a r t e d on Thu 25 Jun 2015 11:50:43 AM CEST > $ echo ” Hello ” > Hello > $ exit > S c r i p t done on Thu 25 Jun 2015 11:50:52 AM CEST @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 57. bc $ echo ” (13.3∗2) /2.3 ” | bc 11 $ echo ” (13.3∗2) /2.3 ” | bc −l 11.56521739130434782608 @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 58. chown/chmod/chgrp chown p i e r r e f i l e . t x t chgrp b i o i n f o r m a t i c s f i l e . t x t chmod u+rw f i l e . t x t chmod g+r f i l e . t x t @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 59. sqlite3 $ s q l i t e 3 test . s q l i t e 3 SQLite v e r s i o n 3. 7. 9 2011−11−01 00:52:41 Enter ” . help ” for i n s t r u c t i o n s Enter SQL statements terminated with a ” ; ” s q l i t e > c r e a t e t a b l e Person (name t e x t ) ; s q l i t e > i n s e r t i n t o Person (name) v a l u e s ( ’ Pierre ’ ) ; s q l i t e > i n s e r t i n t o Person (name) v a l u e s ( ’ Paul ’ ) ; s q l i t e > i n s e r t i n t o Person (name) v a l u e s ( ’ Jacques ’ ) ; s q l i t e > select name from Person ; P i e r r e Paul Jacques @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 60. mysql $ mysql −−user=genome −−host=genome−mysql . cse . ucsc . edu −D hg19 −e ’ select chrom , chromStart , chromEnd , Observed from snp141 where name=” rs25 ” ’ +−−−−−−−+−−−−−−−−−−−−+−−−−−−−−−−+−−−−−−−−−−+ | chrom | chromStart | chromEnd | Observed | +−−−−−−−+−−−−−−−−−−−−+−−−−−−−−−−+−−−−−−−−−−+ | chr7 | 11584141 | 11584142 | A/G | +−−−−−−−+−−−−−−−−−−−−+−−−−−−−−−−+−−−−−−−−−−+ @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 61. R SampleID Dye C on c e n t r a t i on 1l Concentration2 rapp Qt AS Vol E1−4 Cy5 3 ,52 203 ,79 2 ,25 6 ,1 17 ,3 4 ,05 E1−5 Cy3 3 ,14 174 ,16 2 ,22 5 ,2 18 4 ,74 E2−4 Cy3 1 ,64 101 ,18 2 ,25 3 16 ,2 8 ,15 E2−5 Cy3 3 ,41 213 ,74 2 ,26 6 ,4 16 3 ,86 E3−4 Cy3 3 ,11 184 ,15 2 ,22 5 ,5 16 ,9 4 ,48 E3−5 Cy5 3 ,58 189 ,31 2 ,24 5 ,7 18 ,9 4 ,36 mean( samples$Concentration2 ) samples <− read . table ( ” samples2 . t x t ” , dec=” , ” , header=TRUE) mean( samples$ Concentration2 ) @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 62. ’git’ mkdir t e s t cd t e s t g i t i n i t I n i t i a l i z e d empty Git r e p o s i t o r y i n t e s t /. g i t / $ g i t add f i l e . t x t $ g i t commit −m ”Added one f i l e ” [ master ( root−commit) 4954 d33 ] Added one f i l e $ echo ”World ” >> f i l e . t x t $ g i t d i f f d i f f −−g i t a/ f i l e . t x t b/ f i l e . t x t @@ −1 +1,2 @@ H e l l o +World $ g i t add f i l e . t x t $ g i t commit −m ” added h e l l o ” $ g i t log f i l e . t x t ( . . . ) $ g i t rm f i l e . t x t $ g i t checkout f i l e . t x t @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 63. ’LaTeX’ documentclass{article} title{My Thesis} author{Pierre} date{September 2015} begin{document} maketitle Hello world! end{document} p d f l a t e x input . tex @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 64. Install a program c u r l −kL −o bwa −0.7.12. z i p −L ” https :// github . com/ lh3 /bwa/ a r c h i v e / 0 . 7 . 1 2 . z i p ” unzip bwa −0.7.12. z i p make −C bwa −0.7.12/ @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 65. bash Scripting @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 66. chmod+x and shebang @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 67. bash script #!/ bin /bash echo ” Hello ” > h e l l o . t x t echo ”World” > world . t x t cat h e l l o . t x t world . t x t > h e l l od w or l d . t x t @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 68. make #!/ bin /bash function q u i t { exit } function e { echo $1 } e Hello e World q u i t echo foo @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 69. Simple math echo $((1+1) ) @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 70. Simple loop #!/ bin /bash for i in 1 2 3 4 5 6; do echo item : $i done @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 71. While read #!/ bin /bash cat f i l e . t x t | while read L ; do echo $L done @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 72. Make Scripting @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux
  • 73. make a l l : h e l l od w or l d . t x t cat $< h e l l od w or l d . t x t : h e l l o . t x t world . t x t cat $ˆ > $@ h e l l o . t x t : echo ” Hello ” > $@ world . t x t : echo ”World” > $@ clean : rm −f h e l l od w or l d . t x t h e l l o . t x t world . t x t @yokofakunhttp://plindenbaum.blogspot.comUMR 1087 - Institut du Thorax. Nantes. FranceIntroduction to Linux