我是一個使用mac才半年多的孩子,
身為一個男孩子,總是會想要不斷的嘗試一些新奇的事物,尤其是在電腦方面,
從pc的使用者,轉成mac的使用者,一開始總是有些不適應。
不過隔了一陣子之後,基本的功能都已經可以了。
可是比較難的程式語言的東西,似乎是沒有辦法一步登天。
今天晚上,我又拿出我的好奇心開始冒險,
看看有沒有什麼新的軟體可以玩的,
想到我剛好想要幫我的硬碟瘦身,順便維護一下。
於是抓了個OnyX來用看看,
一開始先作「清除」的動作,幫自己的硬碟瘦身。
接著,要按下「維護」,想說幫我的小白整理整理,
不過,就在按下的那一刻,我嚇到了!
螢幕上顯示了:
AppleScript錯誤
找不到檔案“Macintosh HD:usr: share:man:whatis.db”。(-43)
這樣子的警告標示。
這讓我很緊張,一來是無法啟動這個軟體的功能,二來是害怕電腦有一些小受傷。
也許是我在進行「清除」動作的時候,刪掉了一些系統的快取還是什麼的?其實我也不懂。
在這個高手如雲的地方,請各位高手幫助我解決這個問題吧!
我應該作些什麼動作才可以把他修好呢?
怎麼做我才可以使用這個軟體?又怎麼樣的處理才是對我的電腦是最好的呢?
小弟弟我真的很害怕,也許是因為太無知了,所以才會那麼害怕吧?
先跟各位叩首了。
因為這是我這輩子第一次使用終端機,之前也沒摸過unix的東西,所以我說說我遇到的困難:
我進入了終端機模式 鍵入man whatis,出現了:
whatis(1) whatis(1)
NAME
whatis - search the whatis database for complete words.
SYNOPSIS
whatis keyword ...
DESCRIPTION
whatis searches a set of database files containing short descriptions
of system commands for keywords and displays the result on the standard
output. Only complete word matches are displayed.
The whatis database is created using the command /usr/sbin/makewhatis.
SEE ALSO
apropos(1), man(1).
Jan 5, 1991 whatis(1)
(END)
這樣的一長串東西,有看到最後一句:
「The whatis database is created using the command /usr/sbin/makewhatis.」
跟前輩講的一樣,要鍵入這樣子的指令。
可是我不知道怎麼做...
要在哪裡鍵入呢?也是在終端機裡面嗎?
接著macde-ibook-g4:~ mac$ 後面打指令嗎?
我試了這樣子的方式,不過得到的是-bash: /usr/sbin/makewhatis: No such file or directory
所以,好像不是在這個地方鍵入。呵呵。
再請前輩給我多一點的提點,真的是很感激!
另外,#/usr/sbin/makewhatis ,最前面的那個#是什麼意思呀?
以前好像有聽過,不過現在忘記了。
還有還有,如果我會把whatis.db做出來之後,
接著我要怎麼處理?
他會出現在哪個位置呢?會乖乖的跑到 Macintosh HD:usr: share:man:whatis.db 這裡嗎?
對不起,問了很多很笨的問題。
希望前輩還可以幫我解決,再次叩首。
你在終端機環境下
$sudo -s
輸入passwd
#cd /usr/libexec
#./makewhatis -a
#
這時你到/usr/share/man目錄下應該會產生一個新的whatis
這個whatis 我看了說明,還蠻好用的,例如:
$ whatis open
open(1) - open files and directories
open(2) - open or create a file for reading or writing
open(3pm) - perl pragma to set default PerlIO layers for input and output
open(ntcl) - Open a file-based or command pipeline channel
open-x11(1) - run X11 programs
powerbookG4:/var/mail jkchang$
會將有關open這個指令的敘述帶出來
系統的威力來自於程式間彼此的關係多於程式本身!
我照著前輩的指示,鍵入了那些指令:
macde-ibook-g4:~ mac$ sudo -s
Password:
macde-ibook-g4:~ root# cd /usr/libexec
macde-ibook-g4:/usr/libexec root# ./makewhatis -a
在#./makewhatis -a之後
它停頓了一下
就跳回macde-ibook-g4:/usr/libexec root#了
這樣子應該是已經建好whatis檔了?
不過那個OnyX軟體還是打不開,
它依舊顯示:
AppleScript錯誤
找不到檔案“Macintosh HD:usr: share:man:whatis.db”。(-43)
我應該怎麼辦呢?
對了對了,我還有一個小問題,
就是在打開終端機之後,打了那些指令,
之後我們要做什麼動作嗎?
我是說要把終端機模式關掉之前,應該是不用儲存或什麼的吧?
因為我要是要把它關掉它就會顯示:
若關閉視窗會終止視窗內正在執行的指令:login,
bash, bash
這樣子應該沒關係吧?
再請高人提點了。
感激不盡。
pennywu71 wrote:
這位前輩真是好強!我...(恕刪)
你先用終端機模式輸入:
$whatis open
是否有:
open(1) - open files and directories
open(2) - open or create a file for reading or writing
open(3pm) - perl pragma to set default PerlIO layers for input and output
open(ntcl) - Open a file-based or command pipeline channel
open-x11(1) - run X11 programs
如果有就表示whatis這個database存在,至於OnyX我想不必去管他,
我覺得這個軟體有蠻多問題的!
open(1) - open files and directories
open(3pm) - perl pragma to set default PerlIO layers for input and output
open(ntcl) - Open a file-based or command pipeline channel
open-x11(1) - run X11 programs
沒有open(2) - open or create a file for reading or writing耶!
不過是不是沒有關係?
謝謝前輩了!我把那個OnyX殺調好了。
再次的感激。