cht電腦資訊gcin
adm Find login register

Ubuntu 18.04 就算移除了IBus再安裝Gcin仍然無法切換輸入法

tsao0904
joined: 2018-12-06
posted: 8
promoted:
bookmarked:
台灣
1subject: Ubuntu 18.04 就算移除了IBus再安裝Gcin仍然無法切換輸入法Promote 0 Bookmark 02018-12-06quote  

各位好

小弟最近一直在嘗試在Ubuntu 18.04上安裝Gcin,後來發現沒辦法切換輸入法,於是去爬了文章。

然後看了下面這篇文章:

https://www.ubuntu-tw.org/modules/newbb/viewtopic.php?post_id=352412

於是我就把IBus整個刪除掉,再進去試了一次。結果還是跑出如下面連結內圖片的問題:

https://ppt.cc/fb8rbx

而且之前用快速鍵切換輸入法好像也是差不多的問題,他會因為要讀取的檔名是亂碼而找不到那個table檔。

而我剛剛找了一下,gtab.list裡面列出的檔案/usr/share/gcin/table內好像很多都沒有。我覺得這個才是原因,但正常裝起來之後應該要有吧?請問有沒有人有遇過類似的狀況?

 

eliu

joined: 2007-08-09
posted: 11478
promoted: 617
bookmarked: 187
新竹, 台灣
2subject: Promote 0 Bookmark 02018-12-06quote  

你的設定檔有資料錯誤的問題。

rm -fr ~/.gcin/config

重新執行 gcin

也可能是資料夾權限的問題。

edited: 1
tsao0904
joined: 2018-12-06
posted: 8
promoted:
bookmarked:
台灣
3subject: Promote 0 Bookmark 02018-12-07quote  

您好,後來我要裝的時候發生了如下的事情。我試過把那兩個Package刪除掉了他仍然無法重新安裝。

請問這是甚麼問題

$ sudo apt-get install gcin


Reading package lists... Done
Building dependency tree
Reading state information... Done
gcin is already the newest version (2.8.5+dfsg1-4build4).
The following package was automatically installed and is no longer required:
vorbis-tools
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 228 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
ySetting up gcin-gtk2-immodule:amd64 (2.8.5+dfsg1-4build4) ...
Cannot load module /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules/im-gcin.so: libgcin-im-client.so.1: cannot open shared object file: No such file or directory
/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules/im-gcin.so does not export GTK+ IM module API: libgcin-im-client.so.1: cannot open shared object file: No such file or directory
dpkg: error processing package gcin-gtk2-immodule:amd64 (--configure):
installed gcin-gtk2-immodule:amd64 package post-installation script subprocess returned error exit status 1
Setting up gcin-gtk3-immodule:amd64 (2.8.5+dfsg1-4build4) ...
Cannot load module /usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules/im-gcin.so: libgcin-im-client.so.1: cannot open shared object file: No such file or directory
/usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules/im-gcin.so does not export GTK+ IM module API: libgcin-im-client.so.1: cannot open shared object file: No such file or directory
dpkg: error processing package gcin-gtk3-immodule:amd64 (--configure):
installed gcin-gtk3-immodule:amd64 package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
gcin-gtk2-immodule:amd64
gcin-gtk3-immodule:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)

eliu

joined: 2007-08-09
posted: 11478
promoted: 617
bookmarked: 187
新竹, 台灣
4subject: Promote 0 Bookmark 02018-12-07quote  

tsao0904

gcin is already the newest version (2.8.5+dfsg1-4build4).

應該是沒有清除乾淨

dpkg -l | grep gcin

看一下。

tsao0904
joined: 2018-12-06
posted: 8
promoted:
bookmarked:
台灣
5subject: Promote 0 Bookmark 02018-12-07quote  

然後我再補充一下,我剛剛經過很久的調整後已經用Ubuntu Software Center安裝好Gcin Tools了。但我按下設定的某些按鍵的時候會出現下面這樣的問題,也沒辦法切換輸入法。我到現在還是完全沒頭緒,不懂該怎麼修正。勞煩各位了。

https://ppt.cc/fvxOEx


tsao0904
joined: 2018-12-06
posted: 8
promoted:
bookmarked:
台灣
6subject: Promote 0 Bookmark 02018-12-07quote  

eliu

 

應該是沒有清除乾淨

dpkg -l | grep gcin

看一下。

 

好的 謝謝 我立馬試試看

eliu

joined: 2007-08-09
posted: 11478
promoted: 617
bookmarked: 187
新竹, 台灣
7subject: Promote 0 Bookmark 02018-12-07quote  

有清除 ~/.gcin 嗎?

另外一個問題

HOME 這個環境變數

不能亂改。

tsao0904
joined: 2018-12-06
posted: 8
promoted:
bookmarked:
台灣
8subject: Promote 0 Bookmark 02018-12-07quote  

eliu

有清除 ~/.gcin 嗎?

另外一個問題

HOME 這個環境變數

不能亂改。

 

清過了,然後我從來沒有改過這個變數。

另外,我剛剛移除Gcin後,執行下面指令,貌似還是有殘存,請問我該如何把它整個處理掉。

$ dpkg -l | grep gcin
rc gcin 2.8.6+eliu-4 amd64 GTK+ based input method for Chinese users
rc gcin-data 2.8.6+eliu-4 all icons and scripts for gcin

eliu

joined: 2007-08-09
posted: 11478
promoted: 617
bookmarked: 187
新竹, 台灣
9subject: Promote 0 Bookmark 02018-12-07quote  

不知道你的 Ubuntu 是怎麼回事

 

$ dpkg -l | grep gcin
ii gcin 2.8.6+eliu-4 amd64 GTK+ based input method for Chinese users
ii gcin-data 2.8.6+eliu-4 all icons and scripts for gcin
ii gcin-gtk2-immodule:amd64 2.8.6+eliu-4 amd64 GTK3 input method module with gcin as backend
ii gcin-gtk3-immodule:amd64 2.8.6+eliu-4 amd64 GTK3 input method module with gcin as backend
ii gcin-im-client:amd64 2.8.6+eliu-4 amd64 GTK3 input method module with gcin as backend
ii gcin-qt4-immodule:amd64 2.8.6+eliu-4 amd64 Qt4 input method module with gcin as backend
ii gcin-qt5-immodule:amd64 2.8.6+eliu-4 amd64 Qt5 input method module with gcin as backend
ii gcin-tables 2.8.6+eliu-4 all input method tables for gcin

tsao0904
joined: 2018-12-06
posted: 8
promoted:
bookmarked:
台灣
10subject: Promote 0 Bookmark 02018-12-07quote  

eliu

不知道你的 Ubuntu 是怎麼回事

 

$ dpkg -l | grep gcin
ii gcin 2.8.6+eliu-4 amd64 GTK+ based input method for Chinese users
ii gcin-data 2.8.6+eliu-4 all icons and scripts for gcin
ii gcin-gtk2-immodule:amd64 2.8.6+eliu-4 amd64 GTK3 input method module with gcin as backend
ii gcin-gtk3-immodule:amd64 2.8.6+eliu-4 amd64 GTK3 input method module with gcin as backend
ii gcin-im-client:amd64 2.8.6+eliu-4 amd64 GTK3 input method module with gcin as backend
ii gcin-qt4-immodule:amd64 2.8.6+eliu-4 amd64 Qt4 input method module with gcin as backend
ii gcin-qt5-immodule:amd64 2.8.6+eliu-4 amd64 Qt5 input method module with gcin as backend
ii gcin-tables 2.8.6+eliu-4 all input method tables for gcin

 

先說我接觸Linux還不到半年。

我是已經從Software Center 把它給移除了,但還有殘存gcin 跟gcin-data,我打dpkg -p gcin 他也不理我。

然後有裝起來也沒辦法換輸入法,我之後會再搞一個虛擬機重裝試試看。

tsao0904
joined: 2018-12-06
posted: 8
promoted:
bookmarked:
台灣
11subject: Promote 0 Bookmark 02018-12-07quote  

我這樣子的檔案內容應該不可能有錯啊,然後請問我發現我找不到無蝦米的gtab檔案是正常的嗎

BTW我怎麼按Ctrl+Space還是一如往常沒反應,而按下Ctrl+Alt+4也是一樣的結果,完全不能切換輸入法。

/usr/share/gcin/table# ls

ar30-big.gtab en-american.idx NewCJ3.gtab simplex-punc.gtab
ar30.gtab et26.kbm pho-char.gtab s-pho-huge.tab2
ar33.gtab et.kbm pho-huge.tab2 s-pho.tab2
array10a.gtab german.gtab pho.tab2 s-tsin32
array-symbols.gtab greek.gtab phrase-ctrl.table s-tsin32.idx
cj543.gtab gtab.list phrase.table symbols.gtab
cj5.gtab hangul.gtab pin-juyin.xlt symbol-table
cj.gtab hangul-phrase.txt pinyin.gtab t2s.dat
cj-punc.gtab hsu.kbm pinyin.kbm tsin-1.src
colemak.kbm ibm.kbm pinyin-no-tone.kbm tsin32
dayi3.gtab jyutping.gtab russian.gtab tsin32.idx
dvorak.kbm latin-letters.gtab s2t.dat vims.gtab
en-american mitac.kbm simplex.gtab zo.kbm

edited: 1
samwhelp
joined: 2016-10-21
posted: 26
promoted:
bookmarked:
12subject: Ubuntu 18.04 就算移除了IBus再安裝Gcin仍然無法切換輸入法Promote 0 Bookmark 02018-12-07quote  

tsao0904

各位好

小弟最近一直在嘗試在Ubuntu 18.04上安裝Gcin,後來發現沒辦法切換輸入法,於是去爬了文章。

然後看了下面這篇文章:

https://www.ubuntu-tw.org/modules/newbb/viewtopic.php?post_id=352412

於是我就把IBus整個刪除掉,再進去試了一次。結果還是跑出如下面連結內圖片的問題:

https://ppt.cc/fb8rbx

而且之前用快速鍵切換輸入法好像也是差不多的問題,他會因為要讀取的檔名是亂碼而找不到那個table檔。

而我剛剛找了一下,gtab.list裡面列出的檔案/usr/share/gcin/table內好像很多都沒有。我覺得這個才是原因,但正常裝起來之後應該要有吧?請問有沒有人有遇過類似的狀況?

 

關於您提供的那張圖片發生的狀況,可以參考另一篇討論「回覆#3」。

以上提供參考!

:-)

samwhelp
joined: 2016-10-21
posted: 26
promoted:
bookmarked:
13subject: 移除套件範例Promote 0 Bookmark 02018-12-07quote  


以下測試的環境是「Ubuntu 18.04」

================================================================================

執行


$ dpkg -l | grep gcin



顯示


ii  gcin                                          2.8.5+dfsg1-4build4                         amd64        GTK+ based input method for Chinese users
ii  gcin-anthy:amd64                              2.8.5+dfsg1-4build4                         amd64        support library to use Anthy in gcin
ii  gcin-data                                     2.8.5+dfsg1-4build4                         all          icons and scripts for gcin
ii  gcin-gtk2-immodule:amd64                      2.8.5+dfsg1-4build4                         amd64        GTK2 input method module with gcin as backend
ii  gcin-gtk3-immodule:amd64                      2.8.5+dfsg1-4build4                         amd64        GTK3 input method module with gcin as backend
ii  gcin-qt5-immodule:amd64                       2.8.5+dfsg1-4build4                         amd64        Qt5 input method module with gcin as backend
ii  gcin-tables                                   2.8.5+dfsg1-4build4                         amd64        input method tables for gcin
ii  gcin-voice                                    0~20170223-1                                all          gcin voice data
ii  libgcin:amd64                                 2.8.5+dfsg1-4build4                         amd64        library for gcin



================================================================================

除了上面的方式,也可以執行下面指令


$ dpkg -l '*gcin*'



顯示


Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                            Version              Architecture         Description
+++-===============================-====================-====================-====================================================================
ii  gcin                            2.8.5+dfsg1-4build4  amd64                GTK+ based input method for Chinese users
ii  gcin-anthy:amd64                2.8.5+dfsg1-4build4  amd64                support library to use Anthy in gcin
ii  gcin-data                       2.8.5+dfsg1-4build4  all                  icons and scripts for gcin
ii  gcin-gtk2-immodule:amd64        2.8.5+dfsg1-4build4  amd64                GTK2 input method module with gcin as backend
ii  gcin-gtk3-immodule:amd64        2.8.5+dfsg1-4build4  amd64                GTK3 input method module with gcin as backend
ii  gcin-qt5-immodule:amd64         2.8.5+dfsg1-4build4  amd64                Qt5 input method module with gcin as backend
ii  gcin-tables                     2.8.5+dfsg1-4build4  amd64                input method tables for gcin
ii  gcin-voice                      0~20170223-1         all                  gcin voice data
ii  libgcin:amd64                   2.8.5+dfsg1-4build4  amd64                library for gcin



================================================================================

參考上面的列表,所以可以執行下面的指令,來移除「gcin」相關的套件

執行


$ sudo apt-get purge gcin gcin-anthy gcin-data gcin-gtk2-immodule gcin-gtk3-immodule gcin-qt5-immodule gcin-tables gcin-voice libgcin



或是執行


$ sudo dpkg -P gcin gcin-anthy gcin-data gcin-gtk2-immodule gcin-gtk3-immodule gcin-qt5-immodule gcin-tables gcin-voice libgcin



================================================================================

除了上面執行「dpkg -l | grep gcin」或是「dpkg -l '*gcin*'」。

也可以執行


$ dpkg --get-selections | grep gcin | grep install



顯示


gcin                        install
gcin-anthy:amd64                install
gcin-data                    install
gcin-gtk2-immodule:amd64            install
gcin-gtk3-immodule:amd64            install
gcin-qt5-immodule:amd64                install
gcin-tables                    install
gcin-voice                    install



執行下面指令,只取第一個欄位顯示。


$ dpkg --get-selections | grep gcin | grep install | awk '{print $1}'



顯示


gcin
gcin-anthy:amd64
gcin-data
gcin-gtk2-immodule:amd64
gcin-gtk3-immodule:amd64
gcin-qt5-immodule:amd64
gcin-tables
gcin-voice
libgcin:amd64




所以移除的指令,就可以合併一行,範例如下

執行下面指令


sudo apt-get purge $(dpkg --get-selections | grep gcin | grep install | awk '{print $1}')



或是執行下面指令


sudo dpkg -P $(dpkg --get-selections | grep gcin | grep install | awk '{print $1}')



================================================================================

同樣的模式也可以應用在「dpkg -l」上

執行


$ dpkg -l | grep gcin | grep '^ii' | awk '{print $2}'



顯示


gcin
gcin-anthy:amd64
gcin-data
gcin-gtk2-immodule:amd64
gcin-gtk3-immodule:amd64
gcin-qt5-immodule:amd64
gcin-tables
gcin-voice
libgcin:amd64



合併成一行,範例如下


sudo apt-get purge $(dpkg -l | grep gcin | grep '^ii' | awk '{print $2}')



或是執行


sudo dpkg -P $(dpkg -l | grep gcin | grep '^ii' | awk '{print $2}')



================================================================================

以上提供參考

:-)

samwhelp
joined: 2016-10-21
posted: 26
promoted:
bookmarked:
14subject: 關於「/usr/share/gcin/table/」這個資料夾Promote 0 Bookmark 02018-12-07quote  


在我的環境,執行


$ 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



顯示


51



表示「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」安裝了那些檔案在系統上。


$ dpkg -L gcin-tables



顯示


/.
/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」行,跟上面的對照,一樣有「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」的資料夾結構。


$ tree 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


一樣顯示「51筆」。

================================================================================

以上提供參考

:-)

tsao0904
joined: 2018-12-06
posted: 8
promoted:
bookmarked:
台灣
15subject: Promote 0 Bookmark 02018-12-07quote  

謝謝樓上,我立馬去試。

cht電腦資訊gcin
adm Find login register
views:34936