Friday, January 20, 2012

Useful rar command line

Usage: rar <command> -<switch 1> <switch N> <archive> <files....>
               <@listfiles...> 
<path_to_extract\>

<Commands>
  a     Add files to archive
  x     Extract files with full path



<Switches>
  m<0..5>   Set compression level (0-store...3-default...5-maximal)
  rr[N]     Add data recovery record
  v[k,b]    Create volumes with size=*1000 [*1024, *1]

So, normally we use :

rar a -m5 -rr -v600000k abc.rar abcfiles

It will be max compression level, with recovery record, and also multi-volume with 600MB for each files.

ssh config file to different machine, user, port

Normally we may have different account at different machine, including different user name or port.

When default ssh run, it will use your user name as default connection user name, and also port 22 for remote port.

We may use ssh -l login_name to overwrite user name, and ssh -p port to overwrite port number.

We may also have below text inside .ssh/config file to default some useful connection :

Host Home
User neo
Port 1234
HostName neozone.com

Host Office
User neo_wong
Port 13579
HostName hellocompany.com

So that when we use ssh Home, it will equal to :

ssh -l neo -p 1234 neozone.com

It dont have have all field exist :

User neo

equal to :

ssh -l neo

* man page of ssh_config http://linux.die.net/man/5/ssh_config

Monday, January 02, 2012

Windows 下如何 dump DNS cache, 如何清除DNS cache

Dump DNS cache : ipconfig /displaydns
Clean DNS cache : ipconfig /flushdns

Outlook 2007 無法遠端存取公司 Exchange 郵件

為了避免登入公司 Domain 時被強制安裝很多監控軟體, 重裝了電腦, 這次不將帳號設成登入公司網域,  只在必要的時候連線公司網路進入 intranet 存取資源
唯一最重要要常常存取的東西就是公司的 mail, 公司的  exchange 預設可以遠端存取郵件, 只是這台新設好的電腦,  在遠端存取上一直發生問題, 出現以下的錯誤 :


[Proxy 伺服器的安全性憑證發生問題,
-安全性憑證不是來自可信任的憑證授權單位,
-Outlook無法連線至Proxy伺服器mail.xxx.com.tw,(錯誤代碼8) ]

google 了一下發現 :

http://social.technet.microsoft.com/forums/zh-TW/exchangezhcht/thread/e24022ee-2b4d-4c7b-bded-eb7a826048f9

對照有登入網域的電腦後, 發現我少了兩個憑證, 從那台電腦匯出, 這台匯入後, 就可以存取了 ,   這樣我的 Outlook 運作正常, 就不需要沒事登入公司的網路了, 嘿嘿

Sunday, January 01, 2012

clear, more command missing in cygwin

Clear command did not default installed, you need to add ncurses package when install cygwin.
Also Ctrl+L could clear screen too, if you dont have clear.exe installed.

More command could be replace by less command, so set an alias should be able to fix it.