MacBook OS 常用CLI

Macbook Console Connand

$ ls -ltr /dev/usb
crw-rw-rw- 1 root wheel 0x9000004 Jan 1 12:00 /dev/tty.usbserial-FTCASTH9
crw-rw-rw- 1 root wheel 0x9000005 Jan 1 12:00 /dev/cu.usbserial-FTCASTH9
#有看到這個就表示有抓到了tty.usb….!!!

可直接使用內建的 screen 來連線
$ screen /dev/tty.usbserial-FTCASTH9 9600
Ctrl-A Ctrl-\ 就可離開~

轉接頭一定要搭配轉接頭cisco RJ45轉接跳線

connect iPhone 上網瞬斷問題

砍掉USB裝置,自動重新抓取驅動
終端機上輸入:sudo killall -STOP -c usbd

Add路由

增加介面路由
sudo route add host x.x.x.x iface lo 0
sudo route add net x.x.x.x iface lo 0

Getaway Route
sudo route -n add {-net/-host} x.x.x.x/24 x.x.x.x
sudo route -n delete {-net/-host} x.x.x.x/24 x.x.x.x

Delete Route
sudo route delete x.x.x.x
sudo route delete x.x.x.x/24

Print Route
netstat -rn

螢幕擷取快捷鍵

Command+shift+3 (全螢幕)
Command+shift+4 (拖曳範圍)

資料夾隱藏

chflags hidden 檔案/資料夾路徑位置
chflags nohidden 檔案/資料夾路徑位置