Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
LinuxCommand入門2
Search
Seiya
July 01, 2021
Technology
310
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
LinuxCommand入門2
大学サークルのイントロ用資料です
https://speakerdeck.com/silmin_/linuxcommandru-men
の続きです
Seiya
July 01, 2021
More Decks by Seiya
See All by Seiya
ATProtocol ざっくり概要把握してみた @ DWeb Tokyo Meetup #2
silmin_
0
75
おうちGitLabのススメ
silmin_
4
2k
Git入門
silmin_
38
27k
暗号について
silmin_
0
220
LinuxCommand入門
silmin_
0
430
Webについて
silmin_
3
230
ネットワークとは
silmin_
0
290
コンピュータとは|初心者向け資料
silmin_
1
230
ビットについて|入門者向け資料
silmin_
0
240
Other Decks in Technology
See All in Technology
Multica × 長期記憶:40個のミニプロジェクト管理
eiei114
1
230
20260912_スクラムにジェネラリストは必要か
ryugen04
0
300
DEFCON_CHV_CTF_Write-up.pdf
bata_24
0
130
生成AIのテナント制御とシャドーMCP対策 | AIを"止めずに"、情報を守る
yukun
0
140
AIとペアプロを始める。人とのペアプロをやめる。ペアプロの良さを改めて知る。もっと好きになった。 / Rediscovering Pair Programming
honyanya
1
330
Amazon Quick on DesktopがIAM Identity Centerで動かない理由
yukiogawa
0
150
幾何アルゴリズムで なめらかなピン操作を / iOSDC Japan 2026 / smoothpin
kazumanagano
0
250
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
3
450
Driving AI Adoption Using In-House GPUs to Serve Qwen
po3rin
2
480
ASTを使って影響範囲を特定する
nealle
0
140
Microsoft 365 Copilot chat -tekoälypalvelun tietosuojaongelmat
hponka
0
620
The Agent Builder Loop from Daily Work to OSS
minorun365
PRO
3
120
Featured
See All Featured
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.6k
Embracing the Ebb and Flow
colly
88
5.2k
The untapped power of vector embeddings
frankvandijk
2
1.9k
Why Our Code Smells
bkeepers
PRO
340
58k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
490
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
520
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.6k
Darren the Foodie - Storyboard
khoart
PRO
3
3.9k
Music & Morning Musume
bryan
47
7.4k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
600
Transcript
Linux Command 入門 2 Secprj Intro-phase
標準入力 / 標準出力 standard input / standard output
標準入力 / 標準出力 standard input / standard output
入力と出力 input / output コマンドには入力と出力となるファイルが存在する $ cp の場合は... $ cp
file1 file2 コマンド本体 引数
入力と出力 input / output コマンドには入力と出力となるファイルが存在する $ cp の場合は... $ cp
file1 file2 コマンド本体 引数 input output
入力と出力 input / output コマンドには入力と出力となるファイルが存在する $ cp の場合は... cp file2
file1 input output - inputされた ファイルを複製 - 指定された名前 でoutput
None
Terminalへの出力がある
Terminalへの出力がない
標準入力 / 標準出力 standard input / standard output
$ ls は出力先を指定してない
どうやって出力先を決めるか $ cp のように指定したわけではない Terminalがたくさんあったら? 指定してないけど,出力先が決まっている ls file1 dir/ input
Terminal output 勝手に 決まってる?
どうやって出力先を決めるか 何も指定しない場合に暗黙的に使用される 出力先のことを標準出力という (厳密にはlsが標準出力を指定している) ls file1 dir/ input Terminal standard
output 暗黙的に使用 される出力先
標準入力 / 標準出力 standard input / standard output
標準入力は標準出力の入力版 何も指定しないとき,コマンドが入力を求めた場合,標準入力から入力する 標準入力 bcコマンドは入力された文字列に対し,簡単な四則演算をして出力する
標準入力は標準出力の入力版 何も指定しないとき,コマンドが入力を求めた場合,標準入力から入力する 標準入力 bc Terminal standard output Terminal standard input
パイプとリダイレクト どちらも標準入出力を引き回す方法 パイプ |:コマンドの標準出力を他のコマンドの標準入力にする リダイレクト <, >, ...:コマンドの標準入出力を他のファイル宛にする $ ls
-l /bin | less $ bc < file1 > file2
パイプ(Pipe) コマンドの標準出力を他のコマンドの標準入力にする $ ls -l /usr/bin $ ls -l /usr/bin
| less lsの引数は何でもいい 今回はlessを使う関係上 長めなやつを選んだ
パイプ(Pipe) コマンドの標準出力を他のコマンドの標準入力にする $ ls -l /usr/bin $ ls -l /usr/bin
| less ls Terminal standard output ls Terminal output less standard output
パイプ(Pipe) コマンドの標準出力を他のコマンドの標準入力にする $ ls -l /usr/bin | less ls Terminal
output less standard output 標準出力した と思っている 標準入力された と思っている
リダイレクト(Redirect) コマンドの標準入出力を他のファイル宛にする $ bc > file2 $ bc < file1
$ bc $ bc < file1 > file2 bc Terminal standard output file1 input bc file2 output Terminal standard input bc Terminal standard output Terminal standard input bc file2 output file1 input
パイプとgrepコマンド grepコマンドは検索文字列と検索対象を受け取り,結果を出力する $ grep str file1
パイプとgrepコマンド 検索対象は標準入力から受け取ることもできる $ ls -l /usr/bin | grep apt
パイプとリダイレクトを組み合わせた例 $ tail はファイルの最後 数行のみを出力するコマンド $ cat hoge.out | grep
hoge.9 > hoge9
正規表現(regular expression) 文字列が特定のパターンにマッチするかどうかを判定してくれる このほかにもたくさんある 文字 説明 . 任意の1文字にマッチ + 直前の文字が1回以上繰り返す
* 直前の文字が0回以上繰り返す \n 改行文字 \t タブ文字 基本的な正規表現一覧 | murashun.jp https://murashun.jp/article/programming/regular-expression.html
正規表現(regular expression) CLI操作をする上で便利な場面がいくつかある $ ls -l *.py