system directory hierarchy - cornell universitychagall.med.cornell.edu/unixcourse/unixslides.pdf ·...
TRANSCRIPT
![Page 1: System Directory Hierarchy - Cornell Universitychagall.med.cornell.edu/UNIXcourse/UnixSlides.pdf · System Directory Hierarchy homes050 unixst02 othersothers others unixinst unixst01](https://reader031.vdocument.in/reader031/viewer/2022022710/5bf9b4d809d3f24c058bef71/html5/thumbnails/1.jpg)
System Directory Hierarchy
homes050
unixst02 othersothersothersunixinst unixst01
quotationQuotationsequences bin
a4_bovin.sw 1O91.pdb others
pbtech_mounts
© J. Banfelder, L. Skrabanek, Weill Cornell Medicine, 2004-2018.
1
/
![Page 2: System Directory Hierarchy - Cornell Universitychagall.med.cornell.edu/UNIXcourse/UnixSlides.pdf · System Directory Hierarchy homes050 unixst02 othersothers others unixinst unixst01](https://reader031.vdocument.in/reader031/viewer/2022022710/5bf9b4d809d3f24c058bef71/html5/thumbnails/2.jpg)
homes050
unixst02 othersothersothersunixinst unixst01
quotationQuotationsequences bin
a4_bovin.sw 1O91.pdb others
pbtech_mounts
© J. Banfelder, L. Skrabanek, Weill Cornell Medicine, 2004-2018.
2
/
Relative Pathnamescat ../unixinst/quotation
![Page 3: System Directory Hierarchy - Cornell Universitychagall.med.cornell.edu/UNIXcourse/UnixSlides.pdf · System Directory Hierarchy homes050 unixst02 othersothers others unixinst unixst01](https://reader031.vdocument.in/reader031/viewer/2022022710/5bf9b4d809d3f24c058bef71/html5/thumbnails/3.jpg)
Your Directory Hierarchyunixstxx
human
dat
struct seq
cow
struct seq
rodent
struct seq
*.pdb *.fasta *.pdb *.pdb*.fasta *.fasta
othersothersothers
© J. Banfelder, L. Skrabanek, Weill Cornell Medicine, 2004-2018.
3
![Page 4: System Directory Hierarchy - Cornell Universitychagall.med.cornell.edu/UNIXcourse/UnixSlides.pdf · System Directory Hierarchy homes050 unixst02 othersothers others unixinst unixst01](https://reader031.vdocument.in/reader031/viewer/2022022710/5bf9b4d809d3f24c058bef71/html5/thumbnails/4.jpg)
stdout
UNIX Commands: No Redirectionsort
stdin
© J. Banfelder, L. Skrabanek, Weill Cornell Medicine, 2004-2018.
stderr
4
![Page 5: System Directory Hierarchy - Cornell Universitychagall.med.cornell.edu/UNIXcourse/UnixSlides.pdf · System Directory Hierarchy homes050 unixst02 othersothers others unixinst unixst01](https://reader031.vdocument.in/reader031/viewer/2022022710/5bf9b4d809d3f24c058bef71/html5/thumbnails/5.jpg)
stdout
UNIX Commands: Redirect inputsort < in.txt
stdin
© J. Banfelder, L. Skrabanek, Weill Cornell Medicine, 2004-2018.
stderr
5
![Page 6: System Directory Hierarchy - Cornell Universitychagall.med.cornell.edu/UNIXcourse/UnixSlides.pdf · System Directory Hierarchy homes050 unixst02 othersothers others unixinst unixst01](https://reader031.vdocument.in/reader031/viewer/2022022710/5bf9b4d809d3f24c058bef71/html5/thumbnails/6.jpg)
stdout
UNIX Commands: Redirect Outputsort > sorted.txt
stdin
© J. Banfelder, L. Skrabanek, Weill Cornell Medicine, 2004-2018.
stderr
6
![Page 7: System Directory Hierarchy - Cornell Universitychagall.med.cornell.edu/UNIXcourse/UnixSlides.pdf · System Directory Hierarchy homes050 unixst02 othersothers others unixinst unixst01](https://reader031.vdocument.in/reader031/viewer/2022022710/5bf9b4d809d3f24c058bef71/html5/thumbnails/7.jpg)
stdout
UNIX Commands: Redirect Outputsort > sorted.txt 2> err.log
stdin
© J. Banfelder, L. Skrabanek, Weill Cornell Medicine, 2004-2018.
stderr
7
![Page 8: System Directory Hierarchy - Cornell Universitychagall.med.cornell.edu/UNIXcourse/UnixSlides.pdf · System Directory Hierarchy homes050 unixst02 othersothers others unixinst unixst01](https://reader031.vdocument.in/reader031/viewer/2022022710/5bf9b4d809d3f24c058bef71/html5/thumbnails/8.jpg)
stdout
UNIX Commands: Combined Redirection
sort > sorted.txt 2>&1
stdin
stderr
© J. Banfelder, L. Skrabanek, Weill Cornell Medicine, 2004-2018.
8
![Page 9: System Directory Hierarchy - Cornell Universitychagall.med.cornell.edu/UNIXcourse/UnixSlides.pdf · System Directory Hierarchy homes050 unixst02 othersothers others unixinst unixst01](https://reader031.vdocument.in/reader031/viewer/2022022710/5bf9b4d809d3f24c058bef71/html5/thumbnails/9.jpg)
stdout
UNIX Commands: More examplessort < in.txt > sorted.txt
stdin
© J. Banfelder, L. Skrabanek, Weill Cornell Medicine, 2004-2018.
stderr
9
![Page 10: System Directory Hierarchy - Cornell Universitychagall.med.cornell.edu/UNIXcourse/UnixSlides.pdf · System Directory Hierarchy homes050 unixst02 othersothers others unixinst unixst01](https://reader031.vdocument.in/reader031/viewer/2022022710/5bf9b4d809d3f24c058bef71/html5/thumbnails/10.jpg)
stdout
UNIX Commands: More examplessort < in.txt >> sorted.txt
stdin
© J. Banfelder, L. Skrabanek, Weill Cornell Medicine, 2004-2018.
stderr
10
![Page 11: System Directory Hierarchy - Cornell Universitychagall.med.cornell.edu/UNIXcourse/UnixSlides.pdf · System Directory Hierarchy homes050 unixst02 othersothers others unixinst unixst01](https://reader031.vdocument.in/reader031/viewer/2022022710/5bf9b4d809d3f24c058bef71/html5/thumbnails/11.jpg)
UNIX Commands: More examples sort < in.txt > sorted.txt 2>&1
stdoutstdin
stderr
© J. Banfelder, L. Skrabanek, Weill Cornell Medicine, 2004-2018.
11
![Page 12: System Directory Hierarchy - Cornell Universitychagall.med.cornell.edu/UNIXcourse/UnixSlides.pdf · System Directory Hierarchy homes050 unixst02 othersothers others unixinst unixst01](https://reader031.vdocument.in/reader031/viewer/2022022710/5bf9b4d809d3f24c058bef71/html5/thumbnails/12.jpg)
UNIX Commands: Pipesegrep PAT < in.txt | sort | head -1 > first.txt
© J. Banfelder, L. Skrabanek, Weill Cornell Medicine, 2004-2018.
12
![Page 13: System Directory Hierarchy - Cornell Universitychagall.med.cornell.edu/UNIXcourse/UnixSlides.pdf · System Directory Hierarchy homes050 unixst02 othersothers others unixinst unixst01](https://reader031.vdocument.in/reader031/viewer/2022022710/5bf9b4d809d3f24c058bef71/html5/thumbnails/13.jpg)
The csplit Commandcsplit seq.fasta '%^>%' '/^>/' '{3}’
csplit seq.fasta '%^>%' '/^>/' '/^>/' '/^>/' '/^>/'
xx00
xx01
xx02
xx03
xx04
5 patterns = 6 groups• Lines before the first match.• Lines from the first match up to
(but not including) the second match.• Lines from the second match up to
(but not including) the third match.• Lines from the third match up to
(but not including) the fourth match.• Lines from the fourth match up to
(but not including) the fifth match.• Lines from the fifth match up to
the end of the file.
>seqAMNSGVRMVTRSKVPVWEPQNWQ>seqBMEPPVPQSSVPGPPELAPTPAR>seqCPLDLKGPTAPPCTNEDDEGSCA>seqDSVICKAASGDTMNWNNITLTIV>seqESFRNFLGDIGCLISSNLLSYIK
%pattern% skip over this group (no file)/pattern/ create file for this group{n} repeat previous pattern n times
© J. Banfelder, L. Skrabanek, Weill Cornell Medicine, 2004-2018.
13
![Page 14: System Directory Hierarchy - Cornell Universitychagall.med.cornell.edu/UNIXcourse/UnixSlides.pdf · System Directory Hierarchy homes050 unixst02 othersothers others unixinst unixst01](https://reader031.vdocument.in/reader031/viewer/2022022710/5bf9b4d809d3f24c058bef71/html5/thumbnails/14.jpg)
© J. Banfelder, L. Skrabanek, Weill Cornell Medicine, 2004-2018.
Modes of vi
SURF
EDIT
COMMAND
Aa
Ii
Oo
:
:wq
:q!
<Esc>
14