From bbs@aidebbs.edu.tw Thu Jul 7 18:10:34 1994 Date: Fri, 8 Jul 1994 07:00:25 +0800 From: Bulletin Board Software UNIX FAQ (小魚兒整理校正) 0. 編者言: 這份資料是從各大學 BBS 站上,將眾多人對於 UNIX 的問與答, 整理下來, 並沒有章節次序之分. 在每篇問與答之前, 皆附上問話或答話者 id, 感謝 眾多人的熱心回答問題. id 格式為: [userid@發信BBS站名 (該 id 膩稱)] 若您不想將您的文章納入這篇 FAQ, 請 mail 給我, 我將對您說聲抱歉, 並將之從此 FAQ 上剔除. 若您有任何的問題, 或發現有不正確的資料, 也請 mail 給我, 並歡迎將此 FAQ 傳播給須要的人, 謝謝. 我的 e-mail address 為: tywen@csie.nctu.edu.tw (溫宗昱, 交大資工) * * * UNIX FAQ - 2 (整理於 1994/4/2) 11. Q: [chu@cis_nctu (Chyi-Hwa Chu)] 在 UNIX 下,我們可以用 .FORWARD 檔來轉信. 可是我自己試了好幾次都沒有成功. 請問各位高手,到底 .forward 的格式是甚麼? A: [Olies@phoenix (吉爾菲艾斯)] add your name on another hosts in .forward , it will be forwarded to there . example(1): yourname@anotherhost , ............ It will be forwarded to another account on another hosts . example(2): \yourname ( the account on this host ) , yourname@antherhost It will get a copy on this host . ------ 12. Q: [soonly@cis_nctu (B&B 家族的老人)] set 與 setenv 均可設定unix shell 下的變數,兩者之間最大的差異在那裡﹖ 什麼時候用set 什麼時候用 setenv﹖ A: [daniel@info1 (Shung-I You)] set 所設的變數is local variable. When you run up shell program from current shell, these variables will not pass to it. The variables set by setenv are passed to next shell. ------ 13. Q: [pete@CCCA.NCTU.edu.tw (Shaou-Ming Shyu)] How to uncompress *.tgz A1:[boby@cis_nctu (賴永相)] *.tgz 是 tar 和 gzip 兩個組合的使用。 先用 gzip -d file.tgz 解成 file.tar 再用 tar -xvf file.tar 就可以 A2:[daniel@info2 (Shung-I You)] To save your space, don't uncompress it. Use >gzcat file.tgz | tar xvf - ------ 14. Q: [Sandakan@phoenix (Ikan)] How to find out what softwares are available in the unix system ? A: [yenchee@whitman (無名小卒)] Try archie at first. ------ 15. Q: [boby@cis_nctu (賴永相)] 在 SUN OS 下 /usr/spool/cron 下有個 file 結構如下, prw------- 1 root 0 Oct 4 13:16 FIFO ^ 請問此 File 放在這兒有甚麼用途? mod "p" 是如何產生的? 是個 device file 嗎? A: [zqshen@Munchkin.Oz.nthu.edu.tw (Zhi-Qiang Shen)] This file is FIFO file as his file name. You can make a FIFO file like following : mkmod fifo p ------ 16. Q: [kacy@cis_nctu (小堯..)] UNIX 下的 last 指令是參考那個檔案的資料 ? 多謝指點 ... A1:[dwyan@cis_nctu (Solaris)] /var/adm/wtmp A2:[CASIO@ccsun24 (Lee)] you can use the instruction "trace [filename]" to trace it !! ------ 17. Q: [soonly@cis_nctu (B&B 家族的老人)] telnet與rlogin 之間最大的差別在那裡呢﹖ A: [daniel@info1 (Shung-I You)] If there two account name daniel in info1. and siyou in ccsun8. If there is file name .rhosts in info1. Its' content is + siyou then siyou can login to info1 without password >rlogin info1 -l daniel If /etc/hosts.equiv in ccsun8 has ccsun1 ccsun2 ccsun8 then siyou can rlogin to ccsun2 ccsun1 ccsun8 without enter his passwd >rlogin ccsun2 ------ 18. Q: [soonly@cis_nctu (B&B 家族的老人)] 1. ftp 與rcp間的差異在那兒﹖各有何優缺點﹖ 2. rcp 時須不須輸入要remote host 的password呢﹖ A: [helios@cis_nctu (..太陽神..)] 1. rcp(Remote Copy). Copies files or directories between your local workstation and a remote workstation on your network. ftp(File Transfer). Copies files(but not directories) between local and remote workstations, when the local workstation is on one network and the remote workstation is on another. 2. 因為 rcp 的 remote host 需與 local host 在同一 network 上, 所以你在 remote host 上需有相同的 account 存在,不需輸入 password, 但對於要 copy 的檔案須有 read permission, 而目錄 則須有 read and execute permission. ------ 19. Q: [soonly@cis_nctu (B&B 家族的老人)] 在unix 中有一個umask指令,請問它的功用是什麼﹖ A1:[william@cis_nctu (C++/ASM/Win Master)] 選擇新建檔案的預設存取模式。 man umask for more help. A2:[daniel@info1 (Shung-I You)] For example : umask 022 When you create file, the file's permission is rw-r--r-- so it mean disable the permission that you want. ------ 20. Q: [CASIO@ccsun24 (Lee)] 如何統計login次數﹖ A: [daniel@info1 (Shung-I You)] You can use 'last' to do it. last will display all user's login. * * *