目前準備開始使用RoboCopy指令,可是發現它的參數說明是全英文的
某些參數說明我是翻譯出來了,但不知道是否有錯誤?
還有些翻譯不出來的(便不了解它的功能),可否請您幫個忙?
來源參數
/S : 複製每個目錄及其包含的子目錄,不複製空目錄 copy Subfolders
/E : 複製每個目錄及其包含的子目錄,也複製空目錄 copy Subfolders, including Empty Subfolders.
/SEC : 複製安全性 copy SECurity info (both source and dest must be NTFS).##
/A : 只複製設定成保存屬性的檔案,不要改變屬性的設定 copy only files with the Archive attribute set.
/M : 只複製設定成保存屬性的檔案,並清除保存屬性 like /A, but remove Archive attribute from source files.
/LEV:n : only copy the top n LEVels of the source tree.##
/MAXAGE:n : 排除比指定日期要舊的檔案 MAXimum file AGE - exclude files older than n days/date.##
/MINAGE:n : 排除比指定日期要新的檔案 MINimum file AGE - exclude files newer than n days/date.##
(If n < 1900 then n = n days, else n = YYYYMMDD date).
複製參數
/L : 顯示要複製的檔案 List only - don't copy, timestamp or delete any files.
/MOV : 移動檔案 MOVe files (delete from source after copying).##
/MOVE : 移動檔案與資料夾 Move files and dirs (delete from source after copying).
/Z : 在可重新開始的模式中複製網路檔案 copy files in restartable mode (survive network glitch).##
/R:n : number of Retries on failed copies - default is 1 million.
/W:n : Wait time between retries - default is 30 seconds.
/REG : Save /R:n and /W:n in the Registry as default settings.
/TBD : wait for sharenames To Be Defined (retry error 67).##
目的地參數
/A+:[R][A][S][H] : set file Attributes on destination files - add.
/A-:[R][A][S][H] : set file Attributes on destination files - remove.
/FAT : 將目的檔案設定成FAT8.3名稱(不太了解意思) create destination files using 8.3 FAT file names only.##
/SECFIX : FIX SECurity info on existing files and dirs.##
/TimFix : FIX Timestamp on all existing destination files,
including skipped files. ##
(prior to version 1.95 this was /T it's not backwards compatible
so scripts that use /T may fail)
/CREATE : CREATE directory tree structure + zero-length files only.
/PURGE : 刪除目的檔案,當來源檔案已不存在時 delete dest files/folders that no longer exist in source.
/MIR : MIRror a directory tree - equivalent to /PURGE plus all subfolders (/E) ##
記錄參數
/L : 顯示要複製的檔案(前面也有個/L,但不知差異在哪) List only - don't copy, timestamp or delete any files.
/NP : 不要顯示拷貝的百分比 No Progress - don't display % copied.
/LOG:file : 將記錄複寫到記錄檔 output status to LOG file (overwrite existing log). ##
/LOG+:file : 將記錄附加到記錄檔 output status to LOG file (append to existing log). ##
進階參數
/XO : 排除目的檔案的日期跟來源檔案一樣或更新 eXclude Older - if destination file exists and is the same date
or newer than the source - don't bother to overwrite it.
/XC | /XN : 排除變更過的檔案 eXclude Changed | 排除新增的檔案 Newer files
/XX | /XL : eXclude eXtra | Lonely files and dirs.
An "extra" file is present in destination but not source,
excluding extras will delete from destination.
A "lonely" file is present in source but not destination
excluding lonely will prevent any new files being added to the destination.
/IS : 複寫檔案,既使他們是一樣的(不太了解意思) Overwrite files even if they are already the same.
/XF file [file]... : 排除指定的檔案,可包含路徑與萬用字元 eXclude Files matching given names/paths/wildcards.##
/XD dirs [dirs]... : 排除指定的資料夾 eXclude Directories matching given names/paths. ##
XF and XD can be used in combination e.g.
ROBOCOPY c:\source d:\dest /XF *.doc *.xls /XD c:\unwanted /S
/MAX:n : 排除比指定bytes要大的檔案 MAXimum file size - exclude files bigger than n bytes. ##
/MIN:n : 排除比指定bytes要小的檔案 MINimum file size - exclude files smaller than n bytes.##
/XA:[R][A][S][H] : eXclude files with any of the given Attributes
/IA:[R][A][S][H] : Include files with any of the given Attributes ##
/X : report all eXtra files, not just those selected & copied.
/V : produce Verbose output log, showing skipped files.
/ETA : 顯示預估完成的時間 show Estimated Time of Arrival of copied files.
2009年8月29日 星期六
好用的 robocopy 指令
2009年8月12日 星期三
windows 2008 license activate
http://technet.microsoft.com/en-us/library/cc303280.aspx#_Activate_MAK_Clients
Activate MAK Clients
After a client is converted to MAK activation, it attempts to activate over the Internet at the next scheduled interval. You can force an immediate activation through the System application, over the Internet, using a telephone, or using the Volume Activation Management Tool (VAMT).
To confirm that your computer is activated, check the bottom right corner of the desktop for Windows is activated. You can also run Slmgr.vbs /dli from a command prompt to view the activation status of a computer.
Activate MAK Clients over the Internet
To complete the following procedures, you must have administrative rights on the MAK client computer and the MAK client computer must have access to the Internet. Windows reports whether the activation was successful or a failure. If you are unable to activate, the wizard presents additional options.
To activate MAK manually using System properties
1. Log on to the MAK client.
2. Open the System application in Control Panel. To do this, click Start, click Control Panel, and then double-click System.
3. Click the option Click here to activate Windows now.
To activate a MAK client manually over the Internet
1. Log on to the MAK client.
2. Open an elevated command prompt. To do this, click Start, click All Programs, click Accessories, right-click Command Prompt, and then click Run as administrator.
3. At the command prompt, type Regedit.exe and then press Enter.
4. Type the following at the command prompt, and then press Enter:
cscript \windows\system32\slmgr.vbs /ato
5. The script reports whether activation was a success or failure and includes a result code.
2009年7月27日 星期一
2009年7月13日 星期一
freebsd 安裝 bash
真神奇…居然預設沒有安裝bash....
1. 安裝 bash
# cd /usr/ports/shells/bash
# make install clean
2. 將 shell 改成 bash
# chsh <== 這個指令就是 change shell 的意思
#Changing user database information for root.
Login: root
Password:
Uid [#]: 0
Gid [# or name]: 0
Change [month day year]:
Expire [month day year]: Class: Home directory: /root
Shell: /bin/tcsh <== 把 /bin/tcsh 改成 /usr/local/bin/bash
Full Name: Charlie &
Office Location: Office Phone: Home Phone: Other information:
3. 存檔離開
4. 編輯 bash 設定檔
# vi /etc/profile 加入 export LANG=zh_TW.Big5 #設定繁體中文 export LC_ALL=zh_TW.Big5 #設定繁體中文
alias ls='ls -fGa' # 讓 ls 能顯現出顏色
alias rm='rm -i' # 刪除確認 alias cp='cp -i' # 拷貝確認
alias mv='mv -i' # 搬移確認
5. 自訂命令提示字元 PS1="[\u@\h \W]\\$ " 說明: \u --> 顯示使用者帳號
\h --> 顯示系統的 hostname
\w --> 完整路徑
\$ --> 以 # 表示 root,以 $ 表示一般使用者
6. 存檔離開,重新登入即可生效...
2009年7月8日 星期三
rebuild freebsd soft raid
(2) 如果 mirror 中某一個硬碟壞掉了,怎麼辦?
# gmirror remove gm0 ad0 # 移除 mirror 壞掉的 ad0
# gmirror forget gm0 # 忽略 mirror 中之前存在,而現在不存在的裝置
# shutdown -h now # 關機拔掉壞掉那棵 HD 假設壞掉的是 ad0 更換新的 HD 接著重開 gm0 就會使用 ad1 進入 OS 可看看是否正常運作
# shutdown -h now # 再次關機接上新的硬碟
# gmirror insert gm0 /dev/ad0 # 重開後再 insert 新的硬碟
http://freebsd.ntut.idv.tw/document/freebsd_software_raid_geom.html
2009年7月6日 星期一
ProFTPd quick intallation
ProFTPd是bsd下ports裡面就有的一個ftpd
所以想安裝的請到/usr/ports/ftp/proftpd
打make install clean
就可以安裝了
然後請
cd /usr/local/etc
vi proftpd.conf
修改ServerName
使""內和你hostname顯示的相同
ServerType可選standalone或是inetd
然後請在檔案內加一行
ScoreboardFile /var/run/proftpd.scoreboard
加完之後
離開vi
打touch /var/run/proftpd.scoreboard
然後應該就可以執行
/usr/local/etc/rc.d/proftpd.sh start
來啟動proftpd了
然後就可以/usr/local/etc/rc.d/proftpd.sh status
來看proftpd有沒有執行
不過這樣設定的情況下 是不能匿名登入的
就剛開始的設定 使用者也不會被限制在他的家目錄
如果要開放匿名目錄
把
<Anonymous ~ftp>
到
</Anonymous>
前面的#去掉即可
看看要不要改什麼設定
根據上面的說明
#DefaultRoot ~
把這行前面的#去掉
就可以限制使用者只能在他的家目錄活動
官方網站
http://www.proftpd.org/
2009年7月5日 星期日
freebsd ftp script command
#!/bin/sh
#
# ftp script to send/get file automatically
#
# define the variables
filename1="/path1/filename1"
filename2="/path1/filename2"
hostname="ftp.domain_name.com"
username="username"
password="password"
# main
ftp -n $hostname <<EOF
quote USER $username
quote PASS $password
binary
put $filename1
get $filename2
quit
EOF
