Suche senden
Hochladen
Mac os Terminal 常用指令與小技巧
•
31 gefällt mir
•
20,611 views
Chen Liwei
Folgen
20141119 介紹常用的 Terminal 指令(Linux Like 的系統多數類似)
Weniger lesen
Mehr lesen
Software
Melden
Teilen
Melden
Teilen
1 von 36
Jetzt herunterladen
Downloaden Sie, um offline zu lesen
Empfohlen
常用Mac/Linux命令分享
常用Mac/Linux命令分享
Yihua Huang
Introduce to Linux command line
Introduce to Linux command line
Wen Liao
Some tips
Some tips
Wei-Bo Chen
Command line 初級寶典
Command line 初級寶典
Tom Chen
Linux基础
Linux基础
zhuqling
Zsh
Zsh
Rhythm Sun
揭秘家用路由器Ch10 sharing
揭秘家用路由器Ch10 sharing
Yi-Jun Zheng
Effective linux.2.(tools)
Effective linux.2.(tools)
wang hongjiang
Empfohlen
常用Mac/Linux命令分享
常用Mac/Linux命令分享
Yihua Huang
Introduce to Linux command line
Introduce to Linux command line
Wen Liao
Some tips
Some tips
Wei-Bo Chen
Command line 初級寶典
Command line 初級寶典
Tom Chen
Linux基础
Linux基础
zhuqling
Zsh
Zsh
Rhythm Sun
揭秘家用路由器Ch10 sharing
揭秘家用路由器Ch10 sharing
Yi-Jun Zheng
Effective linux.2.(tools)
Effective linux.2.(tools)
wang hongjiang
《保哥線上講堂》打造一個具有 Linux 溫度的 Windows 命令提示字元工具
《保哥線上講堂》打造一個具有 Linux 溫度的 Windows 命令提示字元工具
Will Huang
Windbg入门
Windbg入门
晓锋 陈
Linux Binary Exploitation - Stack buffer overflow
Linux Binary Exploitation - Stack buffer overflow
Angel Boy
如何学习Bash Shell
如何学习Bash Shell
LI Daobing
[Crypto Course] Block Cipher Mode
[Crypto Course] Block Cipher Mode
WEI CHIEH CHAO
shell script introduction
shell script introduction
Jie Jin
Effective linux.1.(commandline)
Effective linux.1.(commandline)
wang hongjiang
Linux 教育訓練
Linux 教育訓練
Bo-Yi Wu
Binary exploitation - AIS3
Binary exploitation - AIS3
Angel Boy
Linux Binary Exploitation - Heap Exploitation
Linux Binary Exploitation - Heap Exploitation
Angel Boy
Linux binary Exploitation - Basic knowledge
Linux binary Exploitation - Basic knowledge
Angel Boy
新北市教師工作坊 -- Bash script programming 介紹
新北市教師工作坊 -- Bash script programming 介紹
fweng322
OpenResty/Lua Practical Experience
OpenResty/Lua Practical Experience
Ho Kim
Shell奇技淫巧
Shell奇技淫巧
David Xie
Openstack swift, how does it work?
Openstack swift, how does it work?
kao kuo-tung
Execution
Execution
Angel Boy
1, shell intro
1, shell intro
ted-xu
Return to dlresolve
Return to dlresolve
Angel Boy
Monitor is all for ops
Monitor is all for ops
琛琳 饶
深入Docker的资源管理
深入Docker的资源管理
SpeedyCloud
網路組-Ubuntu介紹
網路組-Ubuntu介紹
maryqute520
20121111 linux intro
20121111 linux intro
Chang Mt
Weitere ähnliche Inhalte
Was ist angesagt?
《保哥線上講堂》打造一個具有 Linux 溫度的 Windows 命令提示字元工具
《保哥線上講堂》打造一個具有 Linux 溫度的 Windows 命令提示字元工具
Will Huang
Windbg入门
Windbg入门
晓锋 陈
Linux Binary Exploitation - Stack buffer overflow
Linux Binary Exploitation - Stack buffer overflow
Angel Boy
如何学习Bash Shell
如何学习Bash Shell
LI Daobing
[Crypto Course] Block Cipher Mode
[Crypto Course] Block Cipher Mode
WEI CHIEH CHAO
shell script introduction
shell script introduction
Jie Jin
Effective linux.1.(commandline)
Effective linux.1.(commandline)
wang hongjiang
Linux 教育訓練
Linux 教育訓練
Bo-Yi Wu
Binary exploitation - AIS3
Binary exploitation - AIS3
Angel Boy
Linux Binary Exploitation - Heap Exploitation
Linux Binary Exploitation - Heap Exploitation
Angel Boy
Linux binary Exploitation - Basic knowledge
Linux binary Exploitation - Basic knowledge
Angel Boy
新北市教師工作坊 -- Bash script programming 介紹
新北市教師工作坊 -- Bash script programming 介紹
fweng322
OpenResty/Lua Practical Experience
OpenResty/Lua Practical Experience
Ho Kim
Shell奇技淫巧
Shell奇技淫巧
David Xie
Openstack swift, how does it work?
Openstack swift, how does it work?
kao kuo-tung
Execution
Execution
Angel Boy
1, shell intro
1, shell intro
ted-xu
Return to dlresolve
Return to dlresolve
Angel Boy
Monitor is all for ops
Monitor is all for ops
琛琳 饶
深入Docker的资源管理
深入Docker的资源管理
SpeedyCloud
Was ist angesagt?
(20)
《保哥線上講堂》打造一個具有 Linux 溫度的 Windows 命令提示字元工具
《保哥線上講堂》打造一個具有 Linux 溫度的 Windows 命令提示字元工具
Windbg入门
Windbg入门
Linux Binary Exploitation - Stack buffer overflow
Linux Binary Exploitation - Stack buffer overflow
如何学习Bash Shell
如何学习Bash Shell
[Crypto Course] Block Cipher Mode
[Crypto Course] Block Cipher Mode
shell script introduction
shell script introduction
Effective linux.1.(commandline)
Effective linux.1.(commandline)
Linux 教育訓練
Linux 教育訓練
Binary exploitation - AIS3
Binary exploitation - AIS3
Linux Binary Exploitation - Heap Exploitation
Linux Binary Exploitation - Heap Exploitation
Linux binary Exploitation - Basic knowledge
Linux binary Exploitation - Basic knowledge
新北市教師工作坊 -- Bash script programming 介紹
新北市教師工作坊 -- Bash script programming 介紹
OpenResty/Lua Practical Experience
OpenResty/Lua Practical Experience
Shell奇技淫巧
Shell奇技淫巧
Openstack swift, how does it work?
Openstack swift, how does it work?
Execution
Execution
1, shell intro
1, shell intro
Return to dlresolve
Return to dlresolve
Monitor is all for ops
Monitor is all for ops
深入Docker的资源管理
深入Docker的资源管理
Ähnlich wie Mac os Terminal 常用指令與小技巧
網路組-Ubuntu介紹
網路組-Ubuntu介紹
maryqute520
20121111 linux intro
20121111 linux intro
Chang Mt
Ubuntu
Ubuntu
Liu Lizhi
Linux必备知识与Unix基础文化
Linux必备知识与Unix基础文化
Dahui Feng
Open Street Map安裝指引 (Ubuntu 12.04)
Open Street Map安裝指引 (Ubuntu 12.04)
Marc Huang
20030623 linuxbasic and-security
20030623 linuxbasic and-security
建融 黃
Linux必学的60个命令
Linux必学的60个命令
yiditushe
4, files & folders
4, files & folders
ted-xu
Linux commands ppt
Linux commands ppt
xiaotingting
推薦系統實作
推薦系統實作
FEG
開發流程與工具介紹
開發流程與工具介紹
Shengyou Fan
Rootkit 101
Rootkit 101
WEI CHIEH CHAO
Linux学习
Linux学习
tonyhuang2008
Win dbg入门
Win dbg入门
晓锋 陈
DRBL-live-hadoop at TSLC
DRBL-live-hadoop at TSLC
Yu-Chin Tsai
5, system admin
5, system admin
ted-xu
讓軟體開發與應用更自由 - 使用 Docker 技術
讓軟體開發與應用更自由 - 使用 Docker 技術
Yu Lung Shao
Docker tutorial
Docker tutorial
azole Lai
Aix操作系统培训文档
Aix操作系统培训文档
lwj2012
Hadoop-分布式数据平台
Hadoop-分布式数据平台
Jacky Chi
Ähnlich wie Mac os Terminal 常用指令與小技巧
(20)
網路組-Ubuntu介紹
網路組-Ubuntu介紹
20121111 linux intro
20121111 linux intro
Ubuntu
Ubuntu
Linux必备知识与Unix基础文化
Linux必备知识与Unix基础文化
Open Street Map安裝指引 (Ubuntu 12.04)
Open Street Map安裝指引 (Ubuntu 12.04)
20030623 linuxbasic and-security
20030623 linuxbasic and-security
Linux必学的60个命令
Linux必学的60个命令
4, files & folders
4, files & folders
Linux commands ppt
Linux commands ppt
推薦系統實作
推薦系統實作
開發流程與工具介紹
開發流程與工具介紹
Rootkit 101
Rootkit 101
Linux学习
Linux学习
Win dbg入门
Win dbg入门
DRBL-live-hadoop at TSLC
DRBL-live-hadoop at TSLC
5, system admin
5, system admin
讓軟體開發與應用更自由 - 使用 Docker 技術
讓軟體開發與應用更自由 - 使用 Docker 技術
Docker tutorial
Docker tutorial
Aix操作系统培训文档
Aix操作系统培训文档
Hadoop-分布式数据平台
Hadoop-分布式数据平台
Mehr von Chen Liwei
20160329 facebook access tokens
20160329 facebook access tokens
Chen Liwei
Facebook Pixel
Facebook Pixel
Chen Liwei
Facebook Audience
Facebook Audience
Chen Liwei
Facebook 競價
Facebook 競價
Chen Liwei
Facebook Creative 與 Marketing API 使用
Facebook Creative 與 Marketing API 使用
Chen Liwei
Facebook Lead Ads 簡介
Facebook Lead Ads 簡介
Chen Liwei
Facebook Dynamic Product Adverts
Facebook Dynamic Product Adverts
Chen Liwei
Why do we need backend testing
Why do we need backend testing
Chen Liwei
Mehr von Chen Liwei
(8)
20160329 facebook access tokens
20160329 facebook access tokens
Facebook Pixel
Facebook Pixel
Facebook Audience
Facebook Audience
Facebook 競價
Facebook 競價
Facebook Creative 與 Marketing API 使用
Facebook Creative 與 Marketing API 使用
Facebook Lead Ads 簡介
Facebook Lead Ads 簡介
Facebook Dynamic Product Adverts
Facebook Dynamic Product Adverts
Why do we need backend testing
Why do we need backend testing
Mac os Terminal 常用指令與小技巧
1.
Mac OS Terminal
常⽤用指令與⼩小技巧
2.
終端機 • Linux
的介⾯面就是終端機,看到畫⾯面的地⽅方。 • Linux 系統同時會有很多終端機,⼀一般⼀一次只會 看到⼀一個。 • Mac OS 因爲有圖像化介⾯面,視窗的概念,因 此可以同時操作多個終端機。
3.
Option + ⽅方向鍵
可快速在⻑⾧長指令內,做遊標的移動
4.
pwd • 顯⽰示當前⺫⽬目錄
5.
! • 重複上⼀一個執⾏行過,開頭相同的指令
• ex. !redis > redis-server
6.
ls -alh •
可列出當前⺫⽬目錄的檔案系統 • al: 全部檔案(含隱藏檔)與屬性 • h: ⼤大⼩小顯⽰示爲可讀的⼤大⼩小(B,K,M)
7.
ls -alh
8.
檔案權限 權限擁有者羣組
9.
chown • 可同時變更擁有者與羣組
• ex. chown user:group file
10.
檔案權限 格式爲 drwxrwxrwx
• 綠:是否爲⺫⽬目錄 • 紅:擁有者(Owner)權限 • ⿈黃:羣組(Group)權限 • 紫:擁有者(Other)權限
11.
檔案權限 rwx •
讀取:是否可讀取 • 寫⼊入:是否可寫⼊入 • 執⾏行:是否可執⾏行
12.
檔案權限 22 rwx
• 每⼀一個區塊的權限都是數字的總和 • 如果只可執⾏行權限就是 1 • 可讀執⾏行不可寫是 5 • 不具有權限是 0 20 21
13.
chmod • 可變更檔案或是資料夾的權限
• ex. chmod 777 mylog < 最壞⽰示範 • ex. chmod -R 755 htdoc < Web 常⽤用權限
14.
Recursive與檔案系統 • 資料夾與檔案都是物件,有各⾃自的權限
• chmod 與 chown 都只能變更⼀一個標的 • 遞迴可以讓指令對⺫⽬目標下的檔案與根⺫⽬目錄重複 執⾏行
15.
rm • 只能移除檔案
• 移除資料夾使⽤用 rmdir ,且只能移除空資料夾 • 透過遞迴可以移除所有檔案與資料夾 • ex. rm -Rf test/ < ⾮非常危險
16.
touch • 修改檔案時間戳記
(存取時間與更改時間) • 有時候也被當做快速建⽴立檔案的⽅方式 • 建⽴立的檔案權限就是建⽴立者的權限
17.
tail • 可在終端機顯⽰示特定檔案最後⼗十⾏行內容
• 適合⽤用來觀看 log 檔案
18.
tail • 加上參數
-n 20 可顯⽰示 20 ⾏行,或是可以偷懶直 接帶⼊入數字
19.
tail • 加上參數
-f 可以讓終端機持續顯⽰示 log 的更新, 直到按下 Ctrl + C 中斷操作
20.
& • 執⾏行檔案的指令後⾯面加上
& 符號,可不鎖定終 端機 • 但是這個程式如果有 print 訊息,還是會在終端 機上⾯面被看到 • ex. redis-server&
21.
> • 執⾏行檔案的指令後⾯面加上
> 符號,可將程式 print 的訊息導向 • ex. redis-server > /dev/null
22.
ps • Process
Status,顯⽰示當前使⽤用者執⾏行的程序 • 加上 aux 參數,可顯⽰示所有系統的程序 • ex. ps aux
23.
grep • Globally
Search a Regular Expression and Print,搜尋⼯工具 • 給 grep 關鍵字或正規表⽰示式,會列出結果 • ex. grep apple fruitlist.txt
24.
| • pipe
,會把左邊的執⾏行結果丟給右邊 • ex. ps aux | grep redis
25.
kill • 關閉系統程序,後⾯面通常加上
PID • 正常關閉 : 15 • 強制關閉 : 9 • ex. kill -9 5568
26.
Finder
27.
不能被關閉 • 可以關閉
Finder 所有視窗 • 但是 Finder 不能被關閉
28.
回到上⼀一層 • 在
Windows 內是倒退鍵 • 在 Mac 使⽤用 Cmd+ 上
29.
新增視窗與分⾴頁 • Cmd+N,開新視窗
• Cmd+T,開新分⾴頁
30.
31.
精度 var numA
= 0.1; var numB = 0.2; alert( (numA + numB) === 0.3 ); 會顯⽰示?
32.
精度 false
33.
精度 0.1+0.2 =
???? JavaScript 說 0.01 = 0.0001 1001 1001 1001 … 無限循環 0.02 = 0.0011 0011 0011 0011 … 無限循環 不過雙精度浮點數最⾼高是 52 位
34.
精度 所以相加後是 0.0100110011001100110011001100110011001
100110011001100 轉爲⼗十進位就是 0.30000000000000004
35.
精度 只要先將數字乘上10的 n
次⽅方,n 是你要的⼩小數 點精度,運算完在除以10的 n 次⽅方就可以解決這 個問題。 ex. 想要算出 0.1+0.2,可寫成 var accuracy = 1 * 10; alert((0.1*accuracy+0.2*accuracy)/accuracy);
36.
閉包 • myText
執⾏行完 closure_test 之後就應該要消失了 • 但是因爲 closure_test return 了⼀一個 function,且這 個 function 內部使⽤用到了 text 變數,形成了⼀一個閉 包。 • 這個閉包的特性,就像保護罩⼀一樣保護了 myText 。
Jetzt herunterladen