[Linux] 使用 bridge-utils 操作 bridge
這幾天在看 docker 是怎麼實現 container 網路隔離的 在 ubuntu 16.04 上想要對 bridge 進行操作 可以使用 brctl brctl show 查看橋接介面狀態, 如果找不到指令 可以用 sudo apt-get install bridge-utils 安裝 »
這幾天在看 docker 是怎麼實現 container 網路隔離的 在 ubuntu 16.04 上想要對 bridge 進行操作 可以使用 brctl brctl show 查看橋接介面狀態, 如果找不到指令 可以用 sudo apt-get install bridge-utils 安裝 »
今天再測一隻 api 的時後, 因對方 api 有設定限制 ip local 的網路 ip 無法做測試, 因此要做一個 ssh tunnel step0. 在本機必須可以 ssh 到該台機器上 e.g. $ ssh dd3 dd3 是使用 ssh config 設定的 host step1. 建立 ssh tunnel $ ssh -D 9999 -C -N dd3 這行指令的意思是 ‘建立一個與 dd3 的 ssh tunnel, 在本機可以透過 port 9999 做 forwarding »
大部分的 linux 系統都內建這兩個指令 wget wget 是專門處理檔案下載的工具,支援遞歸下載與檔案續傳 wget 有很多 options 可以使用,可以參考GNU Wget 1.18 Manual curl curl 是 server 傳輸資料的工具,除了下載資料也可以上傳資料、取得網頁內容、測試 api curl 可以在 url 內加入變數,做批量下載 使用方式見 curl.1 the man page »
在 Linux 系統中,每個使用者可以定義自己的 cron table 來設定週期性排程,管理 cron table 的方法是透過 crontab 指令。 crontab 指令: crontab -e # 編輯排程 crontab -r # 移除排程 crontab -l # 顯示目前排程 crontab -u # 管理某特定使用者的 cron table。例如: crontab -u user filename crontab 的格式如下: 分(0-59), 時(0-23) »