Unix 基本指令操作

IO Redirection: File Descriptors
file descriptor 0 is associated with STDIN, 1 with STDOUT, and 2 with STDERR.
ex: 2>&1 將 錯誤訊息(STDERR) 直接導向 標準輸出(STDOUT)
ex: 2>& > /tmp/output
ex: >& > /tmp/output (標準輸出 輸入都一起導到 /tmp/output file)

< input file : read standard input from file
> output file : write standard output to file
>> output file: append standard output to file
>& error file : write error message to file
| command2 : pipe output as input for command2

ex: ls 2>/dev/null 1>/tmp/output
& => 指定到 &1 的變數(不然會變成 1 的 file)

閱讀全文〈Unix 基本指令操作〉

SSH Tunnel

SSH Tunnel用起來超方便的~

若現在想要使用 Windows "MySQL Center control" 來管理遠端 MySQL.

設定如下:

  1. MySQL Center control 設 3309 port
  2. Open putty
  3. Choose Tunnels
  4. Forwarded ports -> 打(3309 desc: localhost:3306) L3309 localhost:3306(本機 3306 port 連到 3309 port)
  5. Auth -> Allow agent forwaring

之後使用 "MySQL Center control" 前, 打開 putty 連結就可控管遠端 DB.

閱讀全文〈SSH Tunnel〉

取得網路卡的驅動程式版本資訊

可以使用ethtool這隻工具程式. 首先確定你要偵測的網路卡屬於第幾個eth裝置.

  • $ ifconfig -a

可以幫助你列出目前使用中或未使用中的網路裝置. 確定後, 再執行

  • $ ethtool -i ethx, (x代表裝置編號).

就會列出你的網路卡的關於驅動程式使用的資料了.

轉載: 要如何取得網路卡的驅動程式版本資訊?

閱讀全文〈取得網路卡的驅動程式版本資訊〉

要如何將檔案目錄中製作出ISO檔?

可以使用mkisofs這個命令, mkisofs能夠將目錄包裝成標準的ISO檔案,方便光碟燒錄, 也可以作為資料建檔備份和交換.

範例如下:
$> mkisofs -o test.iso target_dir

執行後會將taget_dir下的所有目錄和檔案包裝成test.iso.

轉載自: 要如何將檔案目錄中製作出ISO檔?

閱讀全文〈要如何將檔案目錄中製作出ISO檔?〉