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
Shell Basic
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
zhiyelee
April 17, 2014
Programming
3
88
Shell Basic
ls,cd,wc,grep,find
zhiyelee
April 17, 2014
Tweet
Share
Other Decks in Programming
See All in Programming
例外処理とどう使い分ける?Result型を使ったエラー設計 #burikaigi
kajitack
16
6k
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
2
170
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
370
高速開発のためのコード整理術
sutetotanuki
1
390
20260127_試行錯誤の結晶を1冊に。著者が解説 先輩データサイエンティストからの指南書 / author's_commentary_ds_instructions_guide
nash_efp
0
900
AI時代のキャリアプラン「技術の引力」からの脱出と「問い」へのいざない / tech-gravity
minodriven
20
6.8k
CSC307 Lecture 05
javiergs
PRO
0
490
ThorVG Viewer In VS Code
nors
0
760
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
5.9k
フルサイクルエンジニアリングをAI Agentで全自動化したい 〜構想と現在地〜
kamina_zzz
0
400
Grafana:建立系統全知視角的捷徑
blueswen
0
330
AIフル活用時代だからこそ学んでおきたい働き方の心得
shinoyu
0
130
Featured
See All Featured
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
130
How to train your dragon (web standard)
notwaldorf
97
6.5k
The Curse of the Amulet
leimatthew05
1
8.2k
Paper Plane
katiecoart
PRO
0
46k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
50
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
110
Leo the Paperboy
mayatellez
4
1.4k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
[SF Ruby Conf 2025] Rails X
palkan
0
740
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
Transcript
Shell Basic @zhiyelee! F2E! https://github.com/zhiyelee
How to learn • man man man ! • practice
dir/file manipulation • mkdir / mkdir -p! • rmdir /
rmdir -p! • rm -rf! • cp -i! • ln -s
cd
ls • ls -- list directory contents! • Options! •
-l,-a,-t! • -Ut
ls
tree • tree -- list files in tree-like format! •
Options! • -a,-d,-f! • -P,-I
tree
Display Files
cat • cat - Concatenate Files! • cat -n !
• cat -s
cat
cat multiple files
less & more • less/more! • less line move,more page
move! • does not read the entire input file before starting! • less -N line-number! • ls /etc | less
tail & head • tail ! • tail -f! •
tail -5! ! • head! • head -5
wc • wc -l
echo • echo -e! • echo -n
echo
Identifying Commands • type - Display A Command's Type! •
type cd! • type ll
type
Identifying Commands • which - Display An Executable's Location! •
which ls! • cat `which hlfile`
which
Redirction
Redirection • stdin,stdout,stderr! • 0 1 2! • /dev/null! •
< > >>! • Case! • redirect error! • redirect stdout and error to a file
2>&1
Permissions
" chmod – Change a file's mode! " umask –
Set the default file permissions! " su – Run a shell as another user! " sudo – Execute a command as another user! " chown – Change a file's owner
from《The Linux Command Line》William E. Shotts, Jr.
None
umask • umask! • the default permissions of created file!
• octal notation ! • express a mask of bits to be removed from a file's mode attributes! • common default value: 022 002
umask
umask 022 owner group other original file mode rw- 110
rw- 110 rw- 110 umask 000 010 010 mode of created file rw- 110 r— 100 r— 100
umask 002 owner group other original file mode rw- 110
rw- 110 rw- 110 umask 000 000 010 mode of created file rw- 110 rw- 110 r— 100
chmod • chmod! • change file mode(permissions)! • usage! •
chmod 755 file! • chmod ug+x file
chmod
Search
Grep • Options! • -v, -l,-L, -A, -B,n, -r/-R! •
Case! • get templates contains `misc` cssfile! • get templates not contain `footer.php`! • contain `misc` but not `footer.php`
get templates contains `misc` cssfile
get templates not contain `footer.php`
contain `misc` but not `footer.php`
Grep
Find • Options! • -name, -perm, -delete,-regex! • !! •
Case! • find all .swp files! • delete all .swp files! • find not .png and jpg file
find and delete
Find
find perm
trap
Case Study • deploywww! • fetch all imgs of a
cssfile! • git pu
fetch all imgs of a css file
git pu
Reference • 《The Linux Command Line》William E. Shotts, Jr.! •
20130109 - 李志业 - Shell编程