2011年5月6日 星期五

Ubuntu安裝dos2unix工具

Ubuntu安裝dos2unix工具: "sudo apt-get install tofrodos

- 已使用 Google 工具列寄出"

想不到Ubuntu下居然沒有辦法找到這個套件dos2unix

參考此篇文章安裝tofrodos試看看

安裝玩後

設定

sudo ln -s /usr/bin/todos /usr/bin/unix2dos
sudo ln -s /usr/bin/fromdos /usr/bin/dos2unix

就可以嚕

透過Facebook分享

doxygen 文件產生器

doxygen | Tsung's Blog: "- 已使用 Google 工具列寄出"

build 時發生error

make[2]: doxygen: Command not found
make[2]: *** [doc] Error 127

udo apt-get install doxygen
[sudo] password for nelsonchung:
正在讀取套件清單... 完成
正在重建相依關係
正在讀取狀態資料... 完成
以下套件是被自動安裝進來的,且已不再會被用到了:
openoffice.org-l10n-common openoffice.org-l10n-zh-tw
使用 'apt-get autoremove' 來將其移除。
下列的額外套件將被安裝:
lacheck lmodern luatex tex-common texlive-base texlive-binaries texlive-common texlive-doc-base texlive-extra-utils texlive-luatex
建議套件:
doxygen-doc doxygen-gui auctex perl-tk dvidvi fragmaster latexmk xindy purifyeps
下列【新】套件將會被安裝:
doxygen lacheck lmodern luatex tex-common texlive-base texlive-binaries texlive-common texlive-doc-base texlive-extra-utils texlive-luatex
升級 0 個,新安裝 11 個,移除 0 個,有 0 個未被升級。
需要下載 48.6MB 的套件檔。
此操作完成之後,會多佔用 114MB 的磁碟空間。
是否繼續進行 [Y/n]?

透過Facebook分享

插上usb 轉 uart

dmesg看到
[84136.712589] CE: hpet increasing min_delta_ns to 22500 nsec
[91398.532049] usb 6-1: new full speed USB device using uhci_hcd and address 2
[91398.701179] usb 6-1: configuration #1 chosen from 1 choice
[91399.156665] usbcore: registered new interface driver usbserial
[91399.156772] USB Serial support registered for generic
[91399.156851] usbcore: registered new interface driver usbserial_generic
[91399.156853] usbserial: USB Serial Driver core
[91399.172370] USB Serial support registered for ch341-uart
[91399.172403] ch341 6-1:1.0: ch341-uart converter detected
[91399.186071] usb 6-1: ch341-uart converter now attached to ttyUSB0
[91399.186108] usbcore: registered new interface driver ch341

diff /dev設備的差異
81a82
> serial
161a163
> ttyUSB0

透過Facebook分享

cp的迷失

常常會把以下兩個cp搞錯

cp -a A/* B

cp -a A/ C


差異在於
cp -a A/* B會把A目錄下的所有資料複製到B目錄下

cp -a A/ C會把A目錄(包含A)的所有資料複製到C目錄下


cp -a A/* B


cp -a A/ C

透過Facebook分享

svn diff 加上顏色

軟體工匠 R 的筆記: 超好用的 colordiff: "- 已使用 Google 工具列寄出"

需要使用colordiff

安裝
sudo apt-get install colordiff

使用svn diff | colordiff
就可以看到
-用紅色表示
+用藍色表示




透過Facebook分享