在我的環境,執行
$ ls /usr/share/gcin/table/ -1
|
顯示
ar30-big.gtab ar30.gtab ar33.gtab array10a.gtab array-symbols.gtab cj543.gtab cj5.gtab cj.gtab cj-punc.gtab colemak.kbm dvorak.kbm en-american en-american.idx et26.kbm et.kbm german.gtab greek.gtab gtab.list hangul.gtab hangul-phrase.txt hsu.kbm ibm.kbm jyutping.gtab latin-letters.gtab mitac.kbm NewCJ3.gtab pho-char.gtab pho-huge.tab2 pho.tab2 phrase-ctrl.table phrase.table pin-juyin.xlt pinyin.gtab pinyin.kbm pinyin-no-tone.kbm russian.gtab s2t.dat simplex.gtab simplex-punc.gtab s-pho-huge.tab2 s-pho.tab2 s-tsin32 s-tsin32.idx symbols.gtab symbol-table t2s.dat tsin-1.src tsin32 tsin32.idx vims.gtab zo.kbm
|
================================================================================
搭配「wc」,了解上面顯示幾行
執行
$ ls /usr/share/gcin/table/ -1 | wc -l
|
顯示
表示「ls /usr/share/gcin/table/ -1」顯示「51行」,換句話說,也就是有「51」個檔案
================================================================================
關於「/usr/share/gcin/table/」這個資料夾
執行
$ file /usr/share/gcin/table/
|
顯示
/usr/share/gcin/table/: directory
|
執行
$ file /usr/share/gcin/table
|
顯示
/usr/share/gcin/table: symbolic link to ../../lib/x86_64-linux-gnu/gcin/table
|
表示「/usr/share/gcin/table」symbolic link「/usr/lib/x86_64-linux-gnu/gcin/table」
================================================================================
執行下面指令,了解「/usr/share/gcin/table/」這個資料夾是來自於那個「Package」。
$ dpkg -S /usr/share/gcin/table/
|
顯示
gcin-tables: /usr/share/gcin/table
|
表示「/usr/share/gcin/table/」這個資料夾,是來自於「gcin-tables」這個「Package」
================================================================================
執行下面指令,觀看「gcin-tables」這個「Package」安裝了那些檔案在系統上。
顯示
/. /usr /usr/lib /usr/lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/gcin /usr/lib/x86_64-linux-gnu/gcin/table /usr/lib/x86_64-linux-gnu/gcin/table/NewCJ3.gtab /usr/lib/x86_64-linux-gnu/gcin/table/ar30-big.gtab /usr/lib/x86_64-linux-gnu/gcin/table/ar30.gtab /usr/lib/x86_64-linux-gnu/gcin/table/ar33.gtab /usr/lib/x86_64-linux-gnu/gcin/table/array-symbols.gtab /usr/lib/x86_64-linux-gnu/gcin/table/array10a.gtab /usr/lib/x86_64-linux-gnu/gcin/table/cj-punc.gtab /usr/lib/x86_64-linux-gnu/gcin/table/cj.gtab /usr/lib/x86_64-linux-gnu/gcin/table/cj5.gtab /usr/lib/x86_64-linux-gnu/gcin/table/cj543.gtab /usr/lib/x86_64-linux-gnu/gcin/table/colemak.kbm /usr/lib/x86_64-linux-gnu/gcin/table/dvorak.kbm /usr/lib/x86_64-linux-gnu/gcin/table/en-american /usr/lib/x86_64-linux-gnu/gcin/table/en-american.idx /usr/lib/x86_64-linux-gnu/gcin/table/et.kbm /usr/lib/x86_64-linux-gnu/gcin/table/et26.kbm /usr/lib/x86_64-linux-gnu/gcin/table/german.gtab /usr/lib/x86_64-linux-gnu/gcin/table/greek.gtab /usr/lib/x86_64-linux-gnu/gcin/table/gtab.list /usr/lib/x86_64-linux-gnu/gcin/table/hangul-phrase.txt /usr/lib/x86_64-linux-gnu/gcin/table/hangul.gtab /usr/lib/x86_64-linux-gnu/gcin/table/hsu.kbm /usr/lib/x86_64-linux-gnu/gcin/table/ibm.kbm /usr/lib/x86_64-linux-gnu/gcin/table/jyutping.gtab /usr/lib/x86_64-linux-gnu/gcin/table/latin-letters.gtab /usr/lib/x86_64-linux-gnu/gcin/table/mitac.kbm /usr/lib/x86_64-linux-gnu/gcin/table/pho-char.gtab /usr/lib/x86_64-linux-gnu/gcin/table/pho-huge.tab2 /usr/lib/x86_64-linux-gnu/gcin/table/pho.tab2 /usr/lib/x86_64-linux-gnu/gcin/table/phrase-ctrl.table /usr/lib/x86_64-linux-gnu/gcin/table/phrase.table /usr/lib/x86_64-linux-gnu/gcin/table/pin-juyin.xlt /usr/lib/x86_64-linux-gnu/gcin/table/pinyin-no-tone.kbm /usr/lib/x86_64-linux-gnu/gcin/table/pinyin.gtab /usr/lib/x86_64-linux-gnu/gcin/table/pinyin.kbm /usr/lib/x86_64-linux-gnu/gcin/table/russian.gtab /usr/lib/x86_64-linux-gnu/gcin/table/s-pho-huge.tab2 /usr/lib/x86_64-linux-gnu/gcin/table/s-pho.tab2 /usr/lib/x86_64-linux-gnu/gcin/table/s-tsin32 /usr/lib/x86_64-linux-gnu/gcin/table/s-tsin32.idx /usr/lib/x86_64-linux-gnu/gcin/table/s2t.dat /usr/lib/x86_64-linux-gnu/gcin/table/simplex-punc.gtab /usr/lib/x86_64-linux-gnu/gcin/table/simplex.gtab /usr/lib/x86_64-linux-gnu/gcin/table/symbol-table /usr/lib/x86_64-linux-gnu/gcin/table/symbols.gtab /usr/lib/x86_64-linux-gnu/gcin/table/t2s.dat /usr/lib/x86_64-linux-gnu/gcin/table/tsin-1.src /usr/lib/x86_64-linux-gnu/gcin/table/tsin32 /usr/lib/x86_64-linux-gnu/gcin/table/tsin32.idx /usr/lib/x86_64-linux-gnu/gcin/table/vims.gtab /usr/lib/x86_64-linux-gnu/gcin/table/zo.kbm /usr/share /usr/share/doc /usr/share/doc/gcin-tables /usr/share/doc/gcin-tables/NEWS.Debian.gz /usr/share/doc/gcin-tables/changelog.Debian.gz /usr/share/doc/gcin-tables/copyright /usr/share/gcin /usr/share/gcin/table
|
搭配「grep」,只顯示「/usr/lib/x86_64-linux-gnu/gcin/table/」相關的
執行
$ dpkg -L gcin-tables | grep '/usr/lib/x86_64-linux-gnu/gcin/table/'
|
顯示
/usr/lib/x86_64-linux-gnu/gcin/table/NewCJ3.gtab /usr/lib/x86_64-linux-gnu/gcin/table/ar30-big.gtab /usr/lib/x86_64-linux-gnu/gcin/table/ar30.gtab /usr/lib/x86_64-linux-gnu/gcin/table/ar33.gtab /usr/lib/x86_64-linux-gnu/gcin/table/array-symbols.gtab /usr/lib/x86_64-linux-gnu/gcin/table/array10a.gtab /usr/lib/x86_64-linux-gnu/gcin/table/cj-punc.gtab /usr/lib/x86_64-linux-gnu/gcin/table/cj.gtab /usr/lib/x86_64-linux-gnu/gcin/table/cj5.gtab /usr/lib/x86_64-linux-gnu/gcin/table/cj543.gtab /usr/lib/x86_64-linux-gnu/gcin/table/colemak.kbm /usr/lib/x86_64-linux-gnu/gcin/table/dvorak.kbm /usr/lib/x86_64-linux-gnu/gcin/table/en-american /usr/lib/x86_64-linux-gnu/gcin/table/en-american.idx /usr/lib/x86_64-linux-gnu/gcin/table/et.kbm /usr/lib/x86_64-linux-gnu/gcin/table/et26.kbm /usr/lib/x86_64-linux-gnu/gcin/table/german.gtab /usr/lib/x86_64-linux-gnu/gcin/table/greek.gtab /usr/lib/x86_64-linux-gnu/gcin/table/gtab.list /usr/lib/x86_64-linux-gnu/gcin/table/hangul-phrase.txt /usr/lib/x86_64-linux-gnu/gcin/table/hangul.gtab /usr/lib/x86_64-linux-gnu/gcin/table/hsu.kbm /usr/lib/x86_64-linux-gnu/gcin/table/ibm.kbm /usr/lib/x86_64-linux-gnu/gcin/table/jyutping.gtab /usr/lib/x86_64-linux-gnu/gcin/table/latin-letters.gtab /usr/lib/x86_64-linux-gnu/gcin/table/mitac.kbm /usr/lib/x86_64-linux-gnu/gcin/table/pho-char.gtab /usr/lib/x86_64-linux-gnu/gcin/table/pho-huge.tab2 /usr/lib/x86_64-linux-gnu/gcin/table/pho.tab2 /usr/lib/x86_64-linux-gnu/gcin/table/phrase-ctrl.table /usr/lib/x86_64-linux-gnu/gcin/table/phrase.table /usr/lib/x86_64-linux-gnu/gcin/table/pin-juyin.xlt /usr/lib/x86_64-linux-gnu/gcin/table/pinyin-no-tone.kbm /usr/lib/x86_64-linux-gnu/gcin/table/pinyin.gtab /usr/lib/x86_64-linux-gnu/gcin/table/pinyin.kbm /usr/lib/x86_64-linux-gnu/gcin/table/russian.gtab /usr/lib/x86_64-linux-gnu/gcin/table/s-pho-huge.tab2 /usr/lib/x86_64-linux-gnu/gcin/table/s-pho.tab2 /usr/lib/x86_64-linux-gnu/gcin/table/s-tsin32 /usr/lib/x86_64-linux-gnu/gcin/table/s-tsin32.idx /usr/lib/x86_64-linux-gnu/gcin/table/s2t.dat /usr/lib/x86_64-linux-gnu/gcin/table/simplex-punc.gtab /usr/lib/x86_64-linux-gnu/gcin/table/simplex.gtab /usr/lib/x86_64-linux-gnu/gcin/table/symbol-table /usr/lib/x86_64-linux-gnu/gcin/table/symbols.gtab /usr/lib/x86_64-linux-gnu/gcin/table/t2s.dat /usr/lib/x86_64-linux-gnu/gcin/table/tsin-1.src /usr/lib/x86_64-linux-gnu/gcin/table/tsin32 /usr/lib/x86_64-linux-gnu/gcin/table/tsin32.idx /usr/lib/x86_64-linux-gnu/gcin/table/vims.gtab /usr/lib/x86_64-linux-gnu/gcin/table/zo.kbm
|
再加上「wc」,來計算「行數」
執行
$ dpkg -L gcin-tables | grep '/usr/lib/x86_64-linux-gnu/gcin/table/' | wc -l
|
顯示
有「51」行,跟上面的對照,一樣有「51」個檔案。
================================================================================
執行下面指令,下載「gcin-tables」這個「Package」
$ apt-get download gcin-tables
|
會下載一個檔案「gcin-tables_2.8.5+dfsg1-4build4_amd64.deb」
執行下面指令,解開「gcin-tables_2.8.5+dfsg1-4build4_amd64.deb」
$ dpkg -x gcin-tables_2.8.5+dfsg1-4build4_amd64.deb gcin-tables
|
會解開到資料夾「gcin-tables」,
可以執行下面指令,觀看「gcin-tables」的資料夾結構。
顯示
gcin-tables └── usr ├── lib │ └── x86_64-linux-gnu │ └── gcin │ └── table │ ├── ar30-big.gtab │ ├── ar30.gtab │ ├── ar33.gtab │ ├── array10a.gtab │ ├── array-symbols.gtab │ ├── cj543.gtab │ ├── cj5.gtab │ ├── cj.gtab │ ├── cj-punc.gtab │ ├── colemak.kbm │ ├── dvorak.kbm │ ├── en-american │ ├── en-american.idx │ ├── et26.kbm │ ├── et.kbm │ ├── german.gtab │ ├── greek.gtab │ ├── gtab.list │ ├── hangul.gtab │ ├── hangul-phrase.txt │ ├── hsu.kbm │ ├── ibm.kbm │ ├── jyutping.gtab │ ├── latin-letters.gtab │ ├── mitac.kbm │ ├── NewCJ3.gtab │ ├── pho-char.gtab │ ├── pho-huge.tab2 │ ├── pho.tab2 │ ├── phrase-ctrl.table │ ├── phrase.table │ ├── pin-juyin.xlt │ ├── pinyin.gtab │ ├── pinyin.kbm │ ├── pinyin-no-tone.kbm │ ├── russian.gtab │ ├── s2t.dat │ ├── simplex.gtab │ ├── simplex-punc.gtab │ ├── s-pho-huge.tab2 │ ├── s-pho.tab2 │ ├── s-tsin32 │ ├── s-tsin32.idx │ ├── symbols.gtab │ ├── symbol-table │ ├── t2s.dat │ ├── tsin-1.src │ ├── tsin32 │ ├── tsin32.idx │ ├── vims.gtab │ └── zo.kbm └── share ├── doc │ └── gcin-tables │ ├── changelog.Debian.gz │ ├── copyright │ └── NEWS.Debian.gz └── gcin └── table -> ../../lib/x86_64-linux-gnu/gcin/table
10 directories, 54 files
|
可以執行下面指令,觀看「gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/」裡面的檔案列表。
$ find gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/*
|
顯示
gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/ar30-big.gtab gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/ar30.gtab gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/ar33.gtab gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/array10a.gtab gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/array-symbols.gtab gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/cj543.gtab gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/cj5.gtab gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/cj.gtab gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/cj-punc.gtab gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/colemak.kbm gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/dvorak.kbm gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/en-american gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/en-american.idx gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/et26.kbm gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/et.kbm gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/german.gtab gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/greek.gtab gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/gtab.list gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/hangul.gtab gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/hangul-phrase.txt gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/hsu.kbm gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/ibm.kbm gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/jyutping.gtab gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/latin-letters.gtab gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/mitac.kbm gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/NewCJ3.gtab gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/pho-char.gtab gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/pho-huge.tab2 gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/pho.tab2 gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/phrase-ctrl.table gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/phrase.table gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/pin-juyin.xlt gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/pinyin.gtab gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/pinyin.kbm gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/pinyin-no-tone.kbm gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/russian.gtab gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/s2t.dat gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/simplex.gtab gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/simplex-punc.gtab gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/s-pho-huge.tab2 gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/s-pho.tab2 gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/s-tsin32 gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/s-tsin32.idx gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/symbols.gtab gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/symbol-table gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/t2s.dat gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/tsin-1.src gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/tsin32 gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/tsin32.idx gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/vims.gtab gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/zo.kbm
|
加上「wc」計算行數,執行下面指令
$ find gcin-tables/usr/lib/x86_64-linux-gnu/gcin/table/* | wc -l
|
顯示
一樣顯示「51筆」。
================================================================================
以上提供參考
:-)