2010年6月1日 星期二
To solve we can't type any word in minicom
Alt+Z->O->Serial port setup -->Hardware Flow Contorl ->no
2010年5月20日 星期四
Screen 命令使用
screen使用
使用screen非常簡易.只需在SHELL鍵入screen,便可打開一個screen session。
而在每個screen session 下,所有命令都以 ctrl+a(C-a) 開始。
現在讓我來簡單介紹基本的命令
C-a c -> Create == 開啟新的 window
C-a n -> Next == 切換到下個 window
C-a p -> Previous == 前一個 window
C-a C-a -> Other == 在兩個 window 間切換
C-a w -> Windows == 列出已開啟的 windows 有那些
C-a 0 -> 切換到第 0 個 window
C-a 1..9 -> 切換到第 1..9 個window
C-a a -> 發出 C-a,在 emacs, ve, bash, tcsh 下可移到行首
C-a t -> Time,顯示當前時間,和系統的 load
C-a K(大寫) -> kill window,強行關閉當前的 window
C-a [ -> 進入 copy mode,在 copy mode 下可以回滾、搜索、複製就像用使用 vi 一樣
C-b Backward,PageUp
C-f Forward,PageDown
H(大寫) High,將游標移至左上角
L Low,將游標移至左下角
0 移到行首
$ 行末
w forward one word,以字為單位往前移
b backward one word,以字為單位往後移
Space 第一次按為標記區起點,第二次按為終點
Esc 結束 copy mode
C-a ] -> Paste,把剛剛在 copy mode 選定的內容貼上
C-a ? -> Help,顯示簡單說明
C-a d -> detach,將目前的 screen session (可能含有多個 windows)
丟到後臺執行當按了 C-a d 把 screen session detach 掉後,會回到還沒進 screen 時的狀態,此時在 screen session 裏每個 window 內運行的 process (無論是前臺/後臺)都在繼續執行,即使 logout 也不影響。下次 login 進來時:screen -ls -> 顯示所有的 screen sessions
screen -r [keyword] -> 選擇一個screen session 恢復對話若 screen -ls 裏有 Attached sessions:
screen -d [keyword] -> 強制 detach,以便「接手」過來
使用screen非常簡易.只需在SHELL鍵入screen,便可打開一個screen session。
而在每個screen session 下,所有命令都以 ctrl+a(C-a) 開始。
現在讓我來簡單介紹基本的命令
C-a c -> Create == 開啟新的 window
C-a n -> Next == 切換到下個 window
C-a p -> Previous == 前一個 window
C-a C-a -> Other == 在兩個 window 間切換
C-a w -> Windows == 列出已開啟的 windows 有那些
C-a 0 -> 切換到第 0 個 window
C-a 1..9 -> 切換到第 1..9 個window
C-a a -> 發出 C-a,在 emacs, ve, bash, tcsh 下可移到行首
C-a t -> Time,顯示當前時間,和系統的 load
C-a K(大寫) -> kill window,強行關閉當前的 window
C-a [ -> 進入 copy mode,在 copy mode 下可以回滾、搜索、複製就像用使用 vi 一樣
C-b Backward,PageUp
C-f Forward,PageDown
H(大寫) High,將游標移至左上角
L Low,將游標移至左下角
0 移到行首
$ 行末
w forward one word,以字為單位往前移
b backward one word,以字為單位往後移
Space 第一次按為標記區起點,第二次按為終點
Esc 結束 copy mode
C-a ] -> Paste,把剛剛在 copy mode 選定的內容貼上
C-a ? -> Help,顯示簡單說明
C-a d -> detach,將目前的 screen session (可能含有多個 windows)
丟到後臺執行當按了 C-a d 把 screen session detach 掉後,會回到還沒進 screen 時的狀態,此時在 screen session 裏每個 window 內運行的 process (無論是前臺/後臺)都在繼續執行,即使 logout 也不影響。下次 login 進來時:screen -ls -> 顯示所有的 screen sessions
screen -r [keyword] -> 選擇一個screen session 恢復對話若 screen -ls 裏有 Attached sessions:
screen -d [keyword] -> 強制 detach,以便「接手」過來
| Key | Action | Notes |
|---|---|---|
| Ctrl+a c | new window | |
| Ctrl+a n | next window | |
| Ctrl+a p | previous window | |
| Ctrl+a “ | select window from list | |
| Ctrl+a Ctrl+a | previous window viewed | |
| Ctrl+a S | split terminal horizontally into regions | Ctrl+a c to create new window there |
| Ctrl+a | | split terminal vertically into regions | Requires debian/ubuntu patched screen 4.0 |
| Ctrl+a :resize | resize region | |
| Ctrl+a :fit | fit screen size to new terminal size | Ctrl+a F is the same. Do after resizing xterm |
| Ctrl+a :remove | remove region | Ctrl+a X is the same |
| Ctrl+a tab | Move to next region | |
| Ctrl+a d | detach screen from terminal | Start screen with -r option to reattach |
| Ctrl+a A | set window title | |
| Ctrl+a x | lock session | Enter user password to unlock |
| Ctrl+a [ | enter scrollback/copy mode | Enter to start and end copy region. Ctrl+a ] to leave this mod |
| Ctrl+a ] | paste buffer | Supports pasting between windows |
| Ctrl+a > | write paste buffer to file | useful for copying between screens |
| Ctrl+a < | read paste buffer from file | useful for pasting between screens |
| Ctrl+a ? | show key bindings/command names | Note unbound commands only in man page |
| Ctrl+a : | goto screen command prompt | up shows last command entered |
2010年5月18日 星期二
gtags & htags (trace code)
1. $ sudo apt-get install global
2. $ cd
3. $ gtags
4. $ global
5. $ global -r
6. $ global -x
7. $ global -xg
* Not work with VIM, use the above commands under SHELL
reference: http://www.gnu.org/software/global/globaldoc.html
使用 htags
使用編輯器閱讀源碼,可以直接編輯。也可使 用內含的 htags 編成 HTML,結果會放在 ./HTML 裡面。
$ htags --suggest
s: 加入 object definitions, references, symbols
a: 依照字母順序處理 function index
n: 加入行號
o: 除了 binary files 外,源碼以及其他文字檔全數加入
h: 加入檔頭,
I: 使用 icon 取代文字
v: verbose
$ htags --suggest: 便利入門者,直接調用熱門選項,相當於'-afghInosTxv --show-position'
2010年5月17日 星期一
常用 Internet Protocol Numbers
0 (0x00) IPv6 Hop-by-Hop Option
1 (0x01) ICMP protocol
2 (0x02) IGMP protocol
4 (0x04) IP over IP
6 (0x06) TCP protocol
17 (0x11) UDP protocol
41 (0x29) IPv6 protocol
Definitive list is here
1 (0x01) ICMP protocol
2 (0x02) IGMP protocol
4 (0x04) IP over IP
6 (0x06) TCP protocol
17 (0x11) UDP protocol
41 (0x29) IPv6 protocol
Definitive list is here
2010年5月14日 星期五
VirtualBOX 分享資料夾設定
* 客端作業系統為Windows時:當你在功能表列 上選取裝置→安裝客端額外功能,他就會開始安裝,直到結束。他就會將相關的虛擬驅動程式安裝完成,定打開主客間很重要的資料夾分享的功能,在使用手冊上說 明你可以在命令提示字元上輸入net use x: \\vboxsvr\sharename其 中”x”代表網路磁碟機的代號,你可以自選,”sharename”為你自己所設定的分享資料夾的名字,但或許你可利用檔案管理員上得的工具→連線網路磁 碟機上去做選擇可能會容易一些。
* 客端作業系統為Linux時:在功能表 列上選取和按下裝置→安裝客端額外功能後,就會掛載上一個虛擬光碟,然後利用root的權限執行VBoxLinuxAdditions.run,就會將額 外的功能來開啟。而在主客間的資料夾分享功能,在使用手冊上說明是mount -t vboxsf [-o OPTIONS] sharename mountpoint,其中”sharename”是你自訂分享資料夾的名 字,”mountpoint”是在linux裡所要掛載對應的資料夾位置,例如: /mnt/share,而在/mnt下的”share”目錄夾,你可要用root的身份去自己建立,所以你也可以自行去命名,所以自行可用如”sudo mount -t vboxsf myz /mnt/zd“。
* 客端作業系統為Linux時:在功能表 列上選取和按下裝置→安裝客端額外功能後,就會掛載上一個虛擬光碟,然後利用root的權限執行VBoxLinuxAdditions.run,就會將額 外的功能來開啟。而在主客間的資料夾分享功能,在使用手冊上說明是mount -t vboxsf [-o OPTIONS] sharename mountpoint,其中”sharename”是你自訂分享資料夾的名 字,”mountpoint”是在linux裡所要掛載對應的資料夾位置,例如: /mnt/share,而在/mnt下的”share”目錄夾,你可要用root的身份去自己建立,所以你也可以自行去命名,所以自行可用如”sudo mount -t vboxsf myz /mnt/zd“。
訂閱:
文章 (Atom)
How to repair and clone disk with ddrescue
ddrescue is a tool that can be used to repair and clone disks on a Linux system . This includes hard drives, partitions, DVD discs, flas...
-
From: http://blog.chinaaet.com/justlxy/p/5100064818 SMI:串行管理接口(Serial Management Interface),通常直接被稱為MDIO接口(Management Data Input/Output I...
-
from: https://www.wpgdadatong.com/tw/blog/detail?BID=B0594 一. PHY包含的各個子層 : PCS:編碼和解碼 PMA:串行器和反序列化器 PMD:取決於物理介質 Firgure 1: OSI模型裡示意...
-
在 前面我們所談的那些可以說是比較基本的東西,但是對於一份文件來說,光有前面所介紹的游標移動、刪除等等功能是不足夠的。面對一份文件我們通常會因為某些 緣故而使得我們必須去修改當中固定出現的字串樣式(pattern)成我們想要的樣子。最常遇到的就像中文文件的標點符號問題,或是 un...

