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
Shell Basic
Search
zhiyelee
April 17, 2014
Programming
90
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Shell Basic
ls,cd,wc,grep,find
zhiyelee
April 17, 2014
Other Decks in Programming
See All in Programming
複雑なUIコンポーネントとの ⻑い付き合い⽅:波及するバグからテスト戦略を経て、安全な再設計へ
mixplace
0
410
Unity6 URPによる海底をテーマにしたVJシステムの解説 | Unity Shader 完全に理解した 勉強会
gam0022
0
370
自サークルのIdPからログアウトできるようになるまで
taiseiue
1
140
JIS keyboard support in Omarchy
lef237
0
110
S3 TablesのIcebergデータに、AIエージェントからアクセスしてみた / 20261016developersio2026joetsu-accessing-iceberg-in-s3tables-via-agent
kasacchiful
PRO
0
150
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
390
Next.js: The final boss of Web Performance
guaca
0
250
SREの越境 / SRE Collaboration
y0hgi
2
310
動作中のプログラムの中身をリアルタイムに覗く / Realtime Debugger for CSharp with Roslyn
prota
1
1.9k
パスワード再設定メールのURLについて知っておこう
uyuki234
0
160
ジョジョの世界をXRで再現する
mofurune
0
160
作れる、でも消せるか?──安全に「枯らして消す」機能削除術 / Drain, Then Delete
chobishiba
2
630
Featured
See All Featured
A Modern Web Designer's Workflow
chriscoyier
699
190k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
1
280
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
630
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
The SEO identity crisis: Don't let AI make you average
varn
0
590
Tell your own story through comics
letsgokoyo
1
1.1k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
310
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.7k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
20k
Leo the Paperboy
mayatellez
10
2.4k
Evolving SEO for Evolving Search Engines
ryanjones
0
330
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编程