顯示具有 software 標籤的文章。 顯示所有文章
顯示具有 software 標籤的文章。 顯示所有文章

2012/08/10

7-Zip 64-bit 右鍵選單問題

公司的電腦是 64b-it 的 Windows 7,今天安裝了 7-zip 64-bit 的版本,結果在檔案或是資料夾上面按右鍵一直無法出現選單,查詢的結果發現似乎是 7-Zip 本身的 bug,只要執行以下幾個步驟就可以解決這個問題。

Step 1.

移除已經安裝好的 7-Zip,然後再次執行安裝,全部都用預設值即可,接著前往安裝後的目錄,通常位於 C:\Program Files\7-Zip,找到 7zFM.exe 這個檔案,按右鍵選單選取以系統管理員身分執行。

Step 2.

點選工具,選項,在系統欄位上,點選 7z, zip, rar 作為關聯,若有更多的需求可以另外點選。

Step 3.

切到 7-Zip 這個 tab,把將 7-Zip 整合到快顯功能表中這個勾取消,按確定退出,並且關閉 7-Zip 檔案管理員。

Step 4.

重複 Step 1 的動作打開,用系統管理員身分打開 7-Zip 檔案管理員,這次將將 7-Zip 整合到快顯功能表中打勾,然後按下確定,做完這些步驟,可以按的壓縮選單應該就會出現了。

2011/10/14

MarkdownPad

MarkdownPad logo

MarkdownPad

之前就常常在別的論壇講這套可以快速寫 html code 的軟體,但都只有 Linux 以及 OSX 的應用,今天上網看到已經有 Windows 版本的軟體了,立刻來嘗鮮一下,DARING FIREBALL 這個網站有詳細的語法介紹,甚至有線上版本的編輯器可以讓你看到結果。

中文網站

快速鍵介紹

  • Ctrl+B:粗體
  • Ctrl+I:斜體
  • Ctrl+Q:區塊
  • Ctrl+L:超連結
  • Ctrl+G:圖片
  • Ctrl+K:程式碼

示範影片

常用語法簡介

1-6 # 為 h1 ~ h6 的語法

#h1
##h2
###h3
####h4
#####h5
#####h6

結果

h1

h2

h3

h4

h5
h6

粗體斜體

**粗體**
*斜體*

結果

粗體
斜體


水平線

---

結果



超連結語法

[facebook](http://www.facebook.com "facebook"]

結果

facebook


圖片語法

![MarkdownPad logo](http://goo.gl/zHuia "Logo")

結果

MarkdownPad logo


程式碼語法

`code`

結果

code


區塊語法

> 1
> 2
> 3

結果

1 2 3


列表語法

* a
* b
* c

結果

  • a
  • b
  • c

數字列表語法

1. a
2. b
3. c

結果

  1. a
  2. b
  3. c

小提示,如果要使用 br 那種斷行效果,只要在結尾輸入兩個 space 即可。

2011/09/14

xshell & xftp

簡介

最近比較常接觸到 Linux,因此一個可以連結 ssh 的 tool 是必備的
市面上比較多人用的軟體大致上是這兩種 pietty 以及 putty
putty 可以說是最多人用的,可以選用的項目很多,但這兩套軟體都有一個共通不便的地方
就是他們沒有支援多視窗,也就是說,每要開一個新的 ssh,你就要開一個 putty
相信我,東西處理起來,一口氣開 7-8 個視窗並不奇怪
於是我去找了能夠支援多視窗介面又好用易上手的軟體
讓我找到了 xshell

建議連 xftp 一起 download,可以交互搭配使用

使用

這是安裝好的畫面,他會在你的電腦模擬一個 terminal,可以下達一些指令
輸入 help,可以看到在 terminal 可以使用的功能

Internal Commands:
new:      Creates a new session.
open:     Opens a session or the session dialog box.
edit:     Opens the Session Property dialog box for a session.
list:     Lists information of all available sessions.
          'ls' and 'dir' do the same.
cd:       Changes the current working directory.
clear:    Clears the screen/address/command history.
help:     Displays this help. '?' does the same.
quit:     Quits Local Shell. 'exit' does the same.
ssh:      Connects to a host using the SSH protocol.
telnet:   Connects to a host using the TELNET protocol.
rlogin:   Connects to a host using the RLOGIN protocol.
sftp:     Connects to a host to transfer files securely.
ftp:      Connects to a host to transfer files.

External Commands:
ipconfig: Configures TCP/IP network interfaces.
ping:     Sends ICMP ECHO_REQUEST packets to network hosts.
tracert:  Prints the route packets take to network host.
netstat:  Displays current protocol statistics and current
          TCP/IP network connections.
nslookup: Resolves a hostname to IP address.

For more information, type 'help command' for each command.
ex) help telnet
Xshell:\> clear
Xshell:\> help
Internal Commands:
new:      Creates a new session.
open:     Opens a session or the session dialog box.
edit:     Opens the Session Property dialog box for a session.
list:     Lists information of all available sessions.
          'ls' and 'dir' do the same.
cd:       Changes the current working directory.
clear:    Clears the screen/address/command history.
help:     Displays this help. '?' does the same.
quit:     Quits Local Shell. 'exit' does the same.
ssh:      Connects to a host using the SSH protocol.
telnet:   Connects to a host using the TELNET protocol.
rlogin:   Connects to a host using the RLOGIN protocol.
sftp:     Connects to a host to transfer files securely.
ftp:      Connects to a host to transfer files.

External Commands:
ipconfig: Configures TCP/IP network interfaces.
ping:     Sends ICMP ECHO_REQUEST packets to network hosts.
tracert:  Prints the route packets take to network host.
netstat:  Displays current protocol statistics and current
          TCP/IP network connections.
nslookup: Resolves a hostname to IP address.

For more information, type 'help command' for each command.
ex) help telnet

在 terminal mode 輸入 new,或者是按下導覽列的 new 按鈕
變可以建立新的帳戶,可以使用的功能有 ssh、telnet、rlogin、sftp、serial
目前常用到的應該就是

  1. ssh:用來連結 Linux Server
  2. telnet:連結 bbs 如 ptt
  3. sftp:直接透過此模式存取 server 檔案

在 Connection 填入Name 跟 Host 之後,點選 Authentication
可以選擇 Password、Public Key 以及 Keyboard Interactive 模式連結 Server
基本上這樣就可以使用了,也可以針對不同的 case 來設定不同的內容
如語系(點選 Terminal 後選擇下方 Encoding)

以 bbs 為例,預設的字型跟字級大小要瀏覽 ptt 很吃力 於是我點選了 Apperance,將 Font Name 改為細明體,Font Size 改為 14

這樣看 ptt 就很舒服了

指令模式

讓我們回到 terminal 模式,ls 後 enter,可以列出你所有建立的帳戶
使用 open 後接你的帳戶,如 open ptt,便會連去 ptt
如果你想不建立任何帳戶,直接連線,可以直接下指令
ssh 123.123.123.123 或是 telnet ptt.cc

External Commands:
ipconfig: Configures TCP/IP network interfaces.
ping:     Sends ICMP ECHO_REQUEST packets to network hosts.
tracert:  Prints the route packets take to network host.
netstat:  Displays current protocol statistics and current
          TCP/IP network connections.
nslookup: Resolves a hostname to IP address.

像這些在 dos command line 常用的指令也可以在他的 terminal 使用

Toolbar

上述的所有功能都可以在最上方的 toolbar 找到對應的按鈕

設定

再來我們看一下 Options 幾個我覺得比較實用的內容
點選 Options、Advanced,我溝選了 Minimize to system tray
這樣當不使用的時候可以將 xshell 縮到 tray,少佔用了一個 CTRL+TAB 的切換空間,很方便
我另外將 Confirm connection close whe Xshell exitst 以及 Confirm connection close when a session 打勾取消
這樣我要關閉任何視窗時他都不會再詢問我

xftp

當你使用 ssh 進去某個帳戶之後,按下快捷鍵 CTRL+ALT+F
便可以叫出 xftp,讓你在視窗介面直接可以使用檔案傳輸的功能,是不是非常方便呢

快捷鍵一覽表

Shortcut key Description
Alt + N Same as New on the File menu.
Alt + O Same as Open on the File menu.
Alt + C Same as Close on the File menu.
Alt + Enter Changes to Full Screen view.
Alt + D Moves the keyboard focus to the Address bar.
Alt + Right Same as Next on the Window menu.
Alt + Left Same as Previous on the Window menu.
Ctrl + D Exit the Xshell on the local prompt.
Ctrl + Alt + ] Escape to the local prompt while connecting to a remote computer.
Ctrl + Alt + T Same as New Terminal on the Window menu.
Ctrl + Alt + F Same as New File Transfer on the Window menu.
Ctrl + Tab Switches to the next session within the same Xshell window.
Ctrl + Shift + Tab Switches to the previous session within the same Xshell window.
Shift + Home Scroll to Top.
Shift + End Scroll to Bottom.
Shift + PgUp Scroll Page Up.
Shift + PgDn Scroll Page Down.
Shift + Up Arrow Scroll Up.
Shift + Down Arrow Scroll Down.

2011/02/17

7-Zip

官方網站:http://www.7-zip.org/

7-Zip 是一個免費的壓縮軟體,擁有自己的壓縮技術,副檔名為 .7z
但他同時也可以解壓縮市面上比較常見的 Zip 以及 RAR
同樣的擁有 GUI 以及 Command Line 兩種 mode

GUI

這是 7z 的 GUI 模式

我建立了兩個文字檔案叫 1.txt 跟 2.txt
壓縮的方式很簡單,選擇下方你要壓縮的檔案之後,點上方的加入



可以決定檔案名稱、檔案目標路徑、模式、密碼,也可以決定當壓縮檔超過幾 MB 的時候拆開檔案分別放置
這些內容跟 WinRAR 差不多,基本上用預設值就可以達到一般目的



按下確定後就產生了一個 7z.zip


選擇好目的後按下確定即可解壓縮


按下測試按鈕可以查看壓縮檔案健不健康


點檔案兩下可以進去看到壓縮的內容

選擇某些檔案之後可以使用上方的複製按鈕將檔案複製到其他位置,移動的話則是搬運
刪除按鈕基本上可以用 delete 鍵達到同樣的效果





在安裝完 7z 之後,可以對檔案使用左鍵即可達到壓縮以及解壓縮的功能
這是最快也是最一般的處理方式,不過就不像 GUI 有那麼多選項可以使用

Command Line
7z 有提供 command line 的模式,可以在 dos 底下執行

http://dotnetperls.com/7-zip-examples
這個網站有對 command line 詳盡的介紹,我在這邊介紹一些比較常用的功能

  a: Add files to archive 壓縮檔案
  d: Delete files from archive 從壓縮檔中刪除檔案
  e: Extract files from archive (without using directory names) 解壓縮檔案
  l: List contents of archive 呈現壓縮檔案內容
  t: Test integrity of archive 測試壓縮檔案
  u: Update files to archive 更新壓縮檔案
  x: eXtract files with full paths 無視路徑解壓縮檔案

在這邊我使用 command line 來達成我們剛剛使用 GUI 的結果

1. 壓縮
7z a 7z.zip *
*號為 DOS 指令,此指令會將當下目錄所有的檔案及目錄都壓縮進 7z.zip,你也可以個別指定

7z a 7z.zip *.txt
只壓縮附檔名為 txt 的檔案

7z a 7z.zip a*.txt
只壓縮開頭為 a 附檔名為 txt 的檔案

7z a 7z.zip 1.txt test
假設目前有 1.txt 2.txt 以及 [test] 這個目錄,今天要壓縮 1.txt 以及包涵 [test] 目錄的話,指令這樣下即可,以此類推

2. 解壓縮
我們現在有一個包涵 1.txt 以及 2.txt 的 7z.zip,解壓縮的方式為
7z e 7z.zip

因為我們現在所在的資料夾這兩個檔案本來就存在,所以 7z 會有詢問的動作
(Y)es / (N)o / (A)lways / (S)kip all / A(u)to rename all / (Q)uit?

Yes 覆蓋
No 不覆蓋
Always 全部覆蓋
Skip all 全部不覆蓋
Auto rename 自動編檔名,7z 會幫你把該檔案加上 "_序號"做檔案的區隔
Quit 離開

我們可以指定解壓縮目錄,便不有這個問題,假設我們要傳到 [test] 目錄,指令如下
7z e 7z.zip -otest
-o 是output的意思,與目錄明稱不用空白鍵間隔,若資料夾不存在則會自動幫你建立

7z 提供一種很酷的解壓縮方式
7z x 7z.zip

x 這個指令可以不管原始檔案的目錄結構,把所有的檔案都解壓縮到根目錄,搭配檔案篩選的話可以很輕易就只解出我們要得東西,例如
7z x 7z.zip *.doc
這樣就只會解出所有的 word 檔案而已

3. 列出檔案
7z l 7z.zip

7-Zip 9.20  Copyright (c) 1999-2010 Igor Pavlov  2010-11-18

Listing archive: 7z.zip

--
Path = 7z.zip
Type = zip
Physical Size = 1020

   Date      Time    Attr         Size   Compressed  Name
------------------- ----- ------------ ------------  ------------------------
2011-02-17 19:49:12 ....A          159           95  1.txt
2011-02-17 19:49:15 ....A         3121          659  2.txt
------------------- ----- ------------ ------------  ------------------------
                                  3280          754  2 files, 0 folders


這個指令可以列出所有壓縮檔案的內容

4. 測試檔案
7z t 7z.zip

7-Zip 9.20  Copyright (c) 1999-2010 Igor Pavlov  2010-11-18

Processing archive: 7z.zip

Testing     1.txt
Testing     2.txt

Everything is Ok

Files: 2
Size:       3280
Compressed: 1020

這個指令會檢查壓縮檔案的健康程度


5. 更新檔案
7z u 7z.zip *.txt
這個指令基本上跟 a 的意思差不多,但他只會將較新的檔案更新至壓縮檔裡

6. 刪除壓縮檔案內容
7z d 7z.zip 1.txt
利用這個指令將 1.txt 從 7z.zip 裡面刪除

7z l 7z.zip

利用 l 指令檢視一下,果然只剩下 2.txt 了

7-Zip 9.20  Copyright (c) 1999-2010 Igor Pavlov  2010-11-18

Listing archive: 7z.zip

--
Path = 7z.zip
Type = zip
Physical Size = 803

   Date      Time    Attr         Size   Compressed  Name
------------------- ----- ------------ ------------  ------------------------
2011-02-17 19:49:15 ....A         3121          659  2.txt
------------------- ----- ------------ ------------  ------------------------
                                  3121          659  1 files, 0 folders



2011/02/16

FastCopy - 最快的檔案拷貝工具

這兩天在逛公司阿龍的資料夾的時候
發現他有一個分類叫做最快的檔案拷貝工具
居然有這麼囂張的軟體而我不知道?
尋線找到了他的官網,使用一會發現的確還不錯
在這邊寫一些使用方式跟大家分享


官方網站
http://ipmsg.org/tools/fastcopy.html.en


FastCopy (簡稱 FC )有兩種使用方式,GUI 以及 Command Line

這是他的 GUI 介面

Source: 來源
DestDir: 目的


這兩個東西我想不用多做解釋,右方的下拉選單是重點
ModeDetail
Diff (No Overwrite)Copy if the same filename doesn't exist in destination.
如果目標資料夾沒有相同的檔案時則複製
Diff (Size/date)Copy if size or date is different, or if it doesn't exist (in default)
如果檔案不存在或者是大小以及尺寸不相同則複製(預設值)
Diff (Newer)Copy if source file timestamp is newer or doesn't exist.
檔案不存在,或者是原始檔案的時間比較新的話則複製
Copy (Overwrite all)Always copy/overwrite all.
不管怎樣都複製以及覆蓋
Sync (Size/date)Copy
if size or date is different, or doesn't exist. In addition, delete all
destination files/directories that don't exist in source.
如果目標資料夾檔案時間與大小不同、或者市不存在則複製,除此之外,會刪除目標資料夾裡面不存在於來源資料夾的檔案,也就是同步兩個資料夾的意思
Move (Overwrite all)Always
copy/overwrite all and delete all copied source files. (It is able to
change "Move (Overwrite all)" -> "Move (Size/date)" in settings
dialog.)
搬運檔案,也就是複製完畢之後來源資料夾會被清空
DeleteDelete all files/dirs by force.
刪除檔案

所以當你選了來源以及目標之後,再選擇你要做的事情,執行右方的 Execute,FC 就會用很快的速度幫你完成


這是使用 Windows Vista 5400 轉硬碟的速度


這是使用 FC 的速度,差了將近一倍

另外,我們可以將 FC 的功能註冊到滑鼠右鍵,點選上方的 Option,選 Shell Extension,將左右兩方的 Use sub menu 都打勾,如果你遇到權限的問題,請先關閉 FC,並且用系統管理員的身份執行,這樣就可以順利註冊了






註冊成功以後,我們可以直接在檔案上面按右鍵,來使用 FC 的功能

Command Line
FC 支援 Command Line 的指令,所以我們可以把我們的備份需求寫成 bat 檔,用排程定期執行
就可以得到一個又方便又迅速的檔案備份功能,官網有詳盡的 command line 指令說明,我講幾個我覺得比較會用到的


/cmd=(noexist_only|diff|update|sync|force_copy|move|delete) ... Specify operation mode.
(By default, diff mode is used. If delete mode is specified, then "/to=" option isn't used.)
cmdline in GUI
noexist_only Diff (No Overwrite)
diff Diff (Size/date)
update Diff (update)
force_copy Copy (Overwrite)
sync Sync (Size/date)
move Move (Overwrite)
delete Delete

等同於 GUI 裡面那幾個功能


/auto_close ... Close automatically after execution is finished with no errors
執行之後自動關閉 GUI

/no_confirm_del ... Don't confirm before deleting.

刪除功能不顯示確認視窗

假設今天要複製資料夾,指令為
C:\>fastcopy /cmd=diff /auto_cloce c:\source /to=c:\destination
若目的資料夾不存在時,FC 會自動幫你建立

要刪除資料夾的話就是
C:\>fastcopy /cmd=delete c:\destination

如果不想確認又不需要看到 GUI 提示的話則為
C:\>fastcopy /cmd=delete /no_confirm_del /auto_close /to=c:\destination

想要達到怎樣的需求從官方提供的 api 去做變化搭配,例如說 log 之類的都可以做