Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
zshと仮想端末マネージャで快適ターミナル生活
Search
Nobutoshi Ogata
September 12, 2011
Technology
0
98
zshと仮想端末マネージャで快適ターミナル生活
Nobutoshi Ogata
September 12, 2011
Tweet
Share
More Decks by Nobutoshi Ogata
See All by Nobutoshi Ogata
サーバサイドの技術スタック・アーキテクチャ総ざらい - SmartNews Tech Night in Fukuoka Vol.1
nobu666
1
17k
SmartNews x PLAID - Cost cut and AWS Enterprise Support
nobu666
0
240
Why Slack?
nobu666
0
270
A Complete Work of SmartNews's SRE
nobu666
2
2.9k
SRE at SmartNews
nobu666
0
7.7k
SmartNews の最近の取り組みについて
nobu666
4
3.4k
Introducing in-hourse PaaS
nobu666
1
260
Monitoring of SmartNews
nobu666
0
140
The story becase happy with itamae
nobu666
0
110
Other Decks in Technology
See All in Technology
【Λ(らむだ)】アップデート機能振り返りΛ編 / PADjp20250127
lambda
0
100
消し忘れリソースゼロへ!私のResource Explorer活用法
cuorain
0
120
フラット構造をやめた理由と、EM / Tech Leadを作った理由
baroqueworksdev
0
380
ブロックチェーンR&D企業における SREの実態 / SRE Kaigi 2025
datachain
0
3.2k
コスト削減と精度維持を両立!類似画像検索システムの内製化成功事例
shutotakahashi
0
340
横断SREの立ち上げと、AWSセキュリティへの取り組みの軌跡
rvirus0817
3
3.7k
一人から始めたSREチーム3年の歩み - 求められるスキルの変化とチームのあり方 - / The three-year journey of the SRE team, which started all by myself
vtryo
7
4.9k
20250122_FinJAWS
takuyay0ne
2
350
サービスローンチを成功させろ! 〜SREが教える30日間の攻略ガイド〜
mmmatsuda
2
3.7k
20250129 Findy_テスト高活用化
dshirae
0
170
CNAPPから考えるAWSガバナンスの実践と最適化
yuobayashi
4
390
Women in Agile
kawaguti
PRO
2
130
Featured
See All Featured
We Have a Design System, Now What?
morganepeng
51
7.4k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
3
370
The Art of Programming - Codeland 2020
erikaheidi
53
13k
The Power of CSS Pseudo Elements
geoffreycrofte
74
5.4k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
30
2.1k
Faster Mobile Websites
deanohume
305
30k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
1.3k
Speed Design
sergeychernyshev
25
750
Testing 201, or: Great Expectations
jmmastey
41
7.2k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
39
1.9k
Unsuck your backbone
ammeep
669
57k
Transcript
zshͱԾ ϚωʔδϟͰ շదλʔϛφϧੜ׆ άϦʔגࣜձࣾ ։ൃຊ෦Πϯϑϥ౷ׅ෦ ඌܗ ெढ़ 119݄12݄༵
ΦϥΫϧͳ͏ 119݄12݄༵
About me ඌܗ ெढ़(͓͕ͨ ͷͿͱ͠) @nobu666 http://www.facebook.com/nobutoshi.ogata άϦʔגࣜձࣾ ։ൃຊ෦Πϯϑϥ౷ׅ෦ 2011/8/1ʙ
[email protected]
119݄12݄༵
͍··Ͱͬͯͨ͜ͱ ຊΞϧΰϦζϜגࣜձࣾ डୗ։ൃ ҩྍܥ/ༀܥͷγεςϜ χϑςΟגࣜձࣾʹɺNECϏοά ϩʔϒגࣜձࣾʹ2΄Ͳৗறͯ͠ɺ WebΞϓϦͷઃܭʙ։ൃʙӡ༻·Ͱ 119݄12݄༵
͍·ͬͯΔ͜ͱ ήʔϜ࡞ͬͯ·ͤΜ ϝʔϧͱ͔ɺͷMySQL Proxyͱ ͔ɺͦͷลͷαʔϏεج൫Λ୲͢Δ νʔϜ શจݕࡧͷϦϓϨʔε͡Ί·ͨ͠ 119݄12݄༵
ͦΜͳΘ͚Ͱ λʔϛφϧͱ ྑ͠Ͱ͢ 119݄12݄༵
͜ͷεϥΠυͷओࢫ zsh͜Θ͘ͳ͍Α!! ԾϚωʔδϟ͜Θ͘ͳ͍Α!! ͜ͷ2͕ͯ͢ͳͷͰɺ͢Ͱʹ͍ࠐ ΜͰ͍ΔਓʹΓͳ͍༰Ͱ͢ɻ ྃ͝ঝ͍ͩ͘͞ɻ 119݄12݄༵
ΞδΣϯμ zshɺscreenΛ͍࢝Ί͖͔͚ͨͬ ศར͞ͷҰΛ͝հ Ͱઃఆ͕໘ͳΜͰ͠ΐʁͳํ ·ͱΊ 119݄12݄༵
zshͱscreenΛ ͍࢝Ί͖͔͚ͨͬ 119݄12݄༵
Development Environment Conference 2006/9/9 5લ……ͩͱ…ʁ ड։͔࢝Β3Ͱຬһʹ http://b.hatena.ne.jp/t/decon zshίϐϖͰ͍ͬͯͨͷͷɺ screenͬͯͳ͔ͬͨ 119݄12݄༵
DEConҎલ ɹ_______________________ ɹɹɹɹɹʻ◦√ɹɹͦͬ͘͏ͩΊ͔ɾɾ!! ɹɹɹɹɹ ͘͘ɹɹɹ࡞ۀ͢Δαʔόʔ͕ଟ͗͢Δ ɹɹɹɹɹ ը໘͕PuTTYͩΒ͚ʹ ͳͬͯ͠·͏ɾɾ!! 119݄12݄༵
DEConҎޙ ________________________________ ~| \◦ େৎ͔ʁBOY ∥\ <◦> ∥/ ∥ /│ >> \│ ɹ screen͞Μʂʂ
119݄12݄༵
screen ԾϚωʔδϟͷҰछ screen tscreen tmux byobu 119݄12݄༵
119݄12݄༵
tmux!! ͣͬͱscreenͰ͕ͨ͠ɺࠓճͷεϥΠ υͷͨΊʹͪΐͬͱ͍࢝ΊͨΒΑ ͔ͬͨ!! ͱ͍͏Θ͚Ͱվफ͠·͢ ʼʻ جຊతʹҰॹͰ͕͢ɺσϑΥϧτͰ ͦΕͬΆ͍ઃఆʹͳ͍ͬͯ·͢ 119݄12݄༵
screen/tmuxͷ ͏Ε͍͠ͱ͜Ζ 119݄12݄༵
Α͏ͧ͏͞Μͱ͔ͿΒͳ͍ൣғͰ ͳ͕Β࡞ۀ ׂͯ͠ϩάΛݟͳ͕Β ͍ͭऴΘΔͷ͔Α͘Θ͔Βͳ͍όονͷىಈ σλονͯ͠ؼΔ ϩάΛͤΔ ڭҭͷҰͱͯ͑͠Δ ϚϧνΞλονϞʔυ 119݄12݄༵
zshͷ ͏Ε͍͠ͱ͜Ζ 119݄12݄༵
119݄12݄༵
ཤྺͷΓํ͕͏Ε͍͠ ෳߦʹΔίϚϯυཤྺͷΓํ ͔͠ΤσΟλͷΑ͏ʹ్தΛॻ͖ ͑ͨΓͰ͖·͢ nobu666@cherub $ for n in 1
2 3 for# do for# echo test; for# done test test test nobu666@cherub $(͜͜ͰC-p) nobu666@cherub $for n in 1 2 3 do echo test; done 119݄12݄༵
ࢉज़ԋࢉ͕͏Ε͍͠ nobu666@cherub $ zmodload -i zsh/mathfunc nobu666@cherub $ echo $((
sin(1) )) 0.8414709848078965 nobu666@cherub $ echo $(( log10(2) )) 0.3010299956639812 nobu666@cherub $ echo $(( sqrt(2) )) 1.4142135623730951 nobu666@cherub $ repeat 3 echo $(( rand48() )) 0.9822596229634506 0.37442021252918423 0.13525322333015666 119݄12݄༵
ελοΫ͕͏Ε͍͠ ͬͨΒ͍͠configureΦϓγϣϯॻ͍ ͯΔ్தʹɺ;͍ʹ --help ͕Έͨ͘ͳ Δ C-a C-kͯ͠configure --helpͯ͠C-y……? ESC-q
Ͱ͓̺!! 119݄12݄༵
glob͕͏Ε͍͠ important.cҎ֎ͷ*.cΛফ͍ͨ͠ rm *.c~important.c *.txtҎ֎Λফ͍ͨ͠ rm *~*.txt find . -name
‘*.c’|xargs grep hoge grep hoge **/*.c 119݄12݄༵
άϩʔόϧΤΠϦΞε͕͏Ε͍͠ hogehoge | piyopiyo tail -f /var/log/php.log G Fatal ls
-la L ޙΖʹύΠϓͰͭͳ͛ͯɺׂͱΑ͘͏ͷ શ෦ొ head,tail,grep,sort,uniq,lv,wc,sed,awk... 119݄12݄༵
ϚϧνϦμΠϨΫτ͕͏Ε͍͠ echo “test” > f1 >f2 echo “TEST” >file? <
f1 <f2 < f1 > f3 119݄12݄༵
ϓϩηεஔ͕͏Ε͍͠ ͱࢥͬͨΒbashͰͰ͖ΔΒ͘͠… (´ɾωɾʆ) paste <(hoge) <(moge) diff -u <(hoge|piyo) <(hoge|moge)
αʔόʹtmpϑΝΠϧ࡞Γͨ͘ͳ͍ͱ͖ ͱ͔ʹͲ͏ͧ 119݄12݄༵
Ͱઃఆ͕ ΊΜͲͦ͘͞͏ 119݄12݄༵
ͦΜͳ͋ͳͨͷͨΊʹ zshͷ߹ oh-my-zsh https://github.com/robbyrussell/oh-my-zsh gitͰ͖࣋ͬͯͯthemeΛબΜͩΒɺͦΕͬΆ͍ ઃఆ͕͞Εͯ·͢ https://github.com/robbyrussell/oh-my-zsh/wiki/ themes 119݄12݄༵
ͦΜͳ͋ͳͨͷͨΊʹ(2) screenͷ߹ screen wrapper byobu tmux ͲͬͪσϑΥϧτͰɺͳΜ͔ͦΕͬ Ά͍ઃఆ͕ೖͬͯ·͢ 119݄12݄༵
DEMO 119݄12݄༵
·ͱΊ ݹͷಓ۩ͱ͖ͬͭʹ͍͘ ͕ɺ֮͑Δͱڧྗ zshͦͦ͜͜ރΕ͖ͯͨ Έ߹Θͤ ΦϨΦϨڥ 119݄12݄༵
άϦʔͰ ٕज़ऀΛେืू ͍ͯ͠·͢ʼʻ 119݄12݄༵
͝ਗ਼ௌ ͋Γ͕ͱ͏ ͍͟͝·ͨ͠ 119݄12݄༵