2011年3月15日 星期二

mount command


Mount path: /nas/media


mount nfs
#mount -t nfs 192.168.100.120:/nas/media /mount-point
--------------
利用 mount.cifs 掛載無特殊權限的結構
最近在測試的環境需要特殊的設定環境是 XP(0.11) 網路芳鄰 MyWebs 掛 VMWare 裝 FC6(0.66)目標是透過 Apache ServerRoot 指向 Windows 分享出來的目錄 MyWebs 當作 WebRoot


# mount -t cifs //192.168.0.11/MyWebs /var/www/html -o username=user,password=pass,codepage=cp950
這種的方式掛載出來的目錄權限都會如下
檔案的話 -rwxrwSrwt index.html 會是這種權限(而且是黃底)
目錄則是 drwxrwxrwx cache 雖然說是綠底的權限全開
但是 apache 卻無法對該資料夾進行寫入的動作
另外 mount -t smbfs 與 smbmount 這種古老的用法就不用說了一樣是失敗
其實掛載後透過 Shell 瀏覽檔案內容時是都正常的,
也不符合我要的需求。
最後找到 mount.cifs 的用法,可以完整解決這樣的需求。
用法如下:
#mount.cifs //192.168.0.11/MyWebs /var/www/html -o username=user,password=pass,codepage=cp950
即可完美在 Windows 上面修改檔案,
而使用 Linux Apache 來跑 Windows 上面的 PHP 程式,
這樣子修改檔案就更方便,而且可以透過真實 Linux 平台來測試。

解決Linux Com port不能收ctrl+c 中斷 process

覺得這個還不錯,以前都認為,不要按到ctrl+c 就好了,但是習慣總是改不了.
----

解決Linux Com port不能收ctrl+c 中斷 process

kernel可以把這個打開

CONFIG_SERIAL_8250_EXTENDED=y

Fedora/Linux: cp為何一直出現 overwrite ?

以前有學過,但我忘了.
man cp 不會提到--reply=yes
於是google 找到以下的資料,當做我的筆記.
-----------

Fedora/Linux: cp為何一直出現 overwrite ?
實際情況:
在Fedora 4中
#cp 1 2
cp: overwrite '2'?
就算用 -f force也是出現overwrite ?

原因:
cp預設被 alias cp='cp -i'
因為 -i是interactive
解決方法:
所以建議指定/bin/cp 1 2或
cp 1 2 --reply=yes
-------
> $ alias
> (to see what alias it might have, if any)
>
> $ unalias cp
> (to remove said alias)
>
> $ help alias
> (for info on how to use alias via bash)

如何在Windows的事件檢視器event viewer,查詢開機關機的紀錄

Windows 如何 事件檢視器 查詢開機關機紀錄 Step1: 打開windows的 「 事件檢視器 」,開啟「 建立自訂檢視… 」視窗,在「事件記錄檔」選項,將「Windows 紀錄」內勾選「系統」選項。 Step2: 內含/排除事件識別碼: 」排除事件識別碼打「6005,6...