USB Disk
2014-11-19
2014-11-18
MD5 Checksum - Linux
- Tool: md5sum
Generate MD5 checksum
Generate a 10M file for test propose.
- # dd if=/dev/zero of=/tmp/test-10M bs=1048576 count=10
- 10+0 records in
- 10+0 records out
- 10485760 bytes (10.0MB) copied, 0.063248 seconds, 158.1MB/s
- # ls -la
- test-10m
Generate MD5checksum
- # cd /tmp
- # md5sum test-10M > test-10M.md5
- # ls -la
- test-10M
- test-10M.md5
- # cat test-10M.md5
- f1c9645dbc14efddc7d8a322685f26eb test-10M
Verify MD5 checksum
Copy test file (test-10m & test-10m.md5) to USB flash
- # mount -t vfat /dev/sda1 /usb
- # cp -rf test-10M test-10M.md5 /usb
- # ls -la /usb
- test-10M
- test-10M.md5
Verify test file in MD5checksum
- # cd /usb
- # md5sum -c test-10m.md5
- test-10M: OK
2014-11-17
TCL, Switch - Select right one through multi-options
set num 3
switch $num {
" 1 " { puts "Monday" }
" 2 " { puts "Tuesday" }
" 3 " { puts "Wednesday" }
" 4 " { puts "Thursday" }
" 5 " { puts "Friday" }
" 6 " { puts "Saturday" }
" 7 " { puts "Sunday" }
" default " { puts "Wrong Value" }
}
[Output]
- Wednesday
TCL, File and Directory
Establish, Delete, Copy & Rename
Detect existing, Size & Type
[ALL Syntax]
Detect existing, Size & Type
[ALL Syntax]
file mkdir "directory_name"
file delete "directory_name"
file delete -force "directory_name"
file delete "file_name"
file copy source-filename target-filename
file copy -force source-filename target-filename
file rename source-filename target-filename
file exists filename
file isdirectory filename
file isfile filename
file size filename
file type filename
TCL, File's Input & Output
[Procedure]
- Open file --> Read/Write file --> Close file
[Syntax]
- Open ==> open filename "access"
- Write ==> puts filename "content"
- Close ==> close filename
- set fd [open "$PATH/$var_sn.tmp.log" a]
- puts $fd "[time_str]: $msg"
- close $fd
[Access Parameter List]
- r : Reading a existing file
- r+ : Reading & Writing a existing file
- w : Empty a existing file, and Writing the content.
- w: Establish a new file, and Writing the content.
- w+ : Empty a existing file, and Writing & Reading the content.
- w+ : Establish a new file, and Writing & Reading the content.
- a : Append the content into the end of existing file, or Establish a new one.
- a+ : Append (Read & Write) the content into the end of existing file, or Establish a new one.
End.
2014-11-05
yEd - Flow Chart tool
Payment: Free
Download place on Official web: http://www.yworks.com/en/downloads.html#yEd
This is a green software that so no need to install it into the Windows and Linux platform.
And JAVA JRE is required before the software installation.
Download place on Official web: http://www.yworks.com/en/downloads.html#yEd
This is a green software that so no need to install it into the Windows and Linux platform.
And JAVA JRE is required before the software installation.
2014-10-16
TCL, TroubleShooting
Trouble-141016a]
輸入的字串無法被餵入 Console.
Example
輸入的字串無法被餵入 Console.
Example
- puts -nonewline $Cmd "q"
=> 輸入 q 欲離開播放程式, 但指令並沒有被下到播放程式
TCL, 特殊字串使用 e.g. Ctrl+C 的字串為 \x03
US-ASCII 控制字元
Ctrl + C ... (^C) ==> \x03 .. 字元名 End of Text(正文結束)
Ctrl + X ... (^X) ==> \x18 .. 字元名 Cancel(取消)
Ctrl + [ ... (^[) ==> \x1B .. 字元名 Escape(跳脫)
Ctrl + C ... (^C) ==> \x03 .. 字元名 End of Text(正文結束)
Ctrl + X ... (^X) ==> \x18 .. 字元名 Cancel(取消)
Ctrl + [ ... (^[) ==> \x1B .. 字元名 Escape(跳脫)
2014-09-12
Disable Sublime Text 3 version update.
Way 1: Works
Under Windows 7 64bits
Fill this in "Preferences / Settings - User
=========================
Way 2: Looks not work sometimes.
Under Windows 7 32bits
Modify "hosts" file on path C:\Windows\System32\drivers\etc
Fill 2 lines into hosts file to STOP SUBLIMETEXT UPDATES.
Under Windows 7 64bits
Fill this in "Preferences / Settings - User
=========================
Way 2: Looks not work sometimes.
Under Windows 7 32bits
Modify "hosts" file on path C:\Windows\System32\drivers\etc
Fill 2 lines into hosts file to STOP SUBLIMETEXT UPDATES.
- 127.0.0.1 sublimetext.com
- 127.0.0.1 www.sublimetext.com
訂閱:
文章 (Atom)