[20220329]windows xcopy命令問題.txt
[20220329]windows xcopy命令問題.txt
--//需要同步隨身碟的一個檔案,使用xcopy命令,遇到的問題做一個記錄.
--//我習慣性輸入如下:
--//cmd 版本如下:
Microsoft Windows XP [版本 5.1.2600]
(C) 版權所有 1985-2001 Microsoft Corp.
g:\> xcopy /d/e/y g:\blog\jd.txt u:\blog
--//檔案很小,如果需要複製更新應該很快完成.可是我等了很久一直都沒有完成.
--//使用sysinternals自帶的Procmon.exe跟蹤發現:
"Time of Day","Process Name","PID","Operation","Duration","Path","Result","Detail","TID","Parent PID"
"16:27:45.9604751","xcopy.exe","1176","CreateFile","0.0001131","G:\blog\XXXTTT.com","SUCCESS","Desired Access: Generic Read, Disposition: Open, Options: Sequential Access, Synchronous IO Non-Alert, Open Reparse Point, Attributes: n/a, ShareMode: Read, AllocationSize: n/a, OpenResult: Opened","1812","884"
"16:27:45.9606854","xcopy.exe","1176","QueryAttributeTagFile","0.0000274","G:\blog\XXXTTT.com","SUCCESS","Attributes: DAC, ReparseTag: 0x0","1812","884"
"16:27:45.9607712","xcopy.exe","1176","QueryStandardInformationFile","0.0000204","G:\blog\XXXTTT.com","SUCCESS","AllocationSize: 0, EndOfFile: 0, NumberOfLinks: 1, DeletePending: False, Directory: True","1812","884"
"16:27:45.9608268","xcopy.exe","1176","QueryBasicInformationFile","0.0000165","G:\blog\XXXTTT.com","SUCCESS","CreationTime: 2019-11-10 9:22:08, LastAccessTime: 2022-3-27 16:25:44, LastWriteTime: 2022-2-21 20:06:52, ChangeTime: 2022-3-26 8:22:54, FileAttributes: DAC","1812","884"
"16:27:45.9609187","xcopy.exe","1176","QueryStreamInformationFile","0.0000615","G:\blog\XXXTTT.com","SUCCESS","","1812","884"
"16:27:45.9610550","xcopy.exe","1176","QueryBasicInformationFile","0.0000179","G:\blog\XXXTTT.com","SUCCESS","CreationTime: 2019-11-10 9:22:08, LastAccessTime: 2022-3-27 16:25:44, LastWriteTime: 2022-2-21 20:06:52, ChangeTime: 2022-3-26 8:22:54, FileAttributes: DAC","1812","884"
"16:27:45.9611475","xcopy.exe","1176","QueryEaInformationFile","0.0000246","G:\blog\XXXTTT.com","SUCCESS","EaSize: 0","1812","884"
"16:27:45.9699584","xcopy.exe","1176","CreateFile","0.0035851","U:\blog\XXXTTT.com","SUCCESS","Desired Access: Read Data/List Directory, Write Data/Add File, Write EA, Read Attributes, Write Attributes, Delete, Synchronize, Disposition: OpenIf, Options: Directory, Synchronous IO Non-Alert, Attributes: DAC, ShareMode: None, AllocationSize: 0, OpenResult: Opened","1812","884"
"16:27:45.9736876","xcopy.exe","1176","QueryBasicInformationFile","0.0000213","U:\blog\XXXTTT.com","SUCCESS","CreationTime: 2019-11-9 22:32:13, LastAccessTime: 2022-3-25 0:00:00, LastWriteTime: 2022-2-21 20:06:52, ChangeTime: 1601-1-1 8:00:00, FileAttributes: DA","1812","884"
"16:27:45.9737815","xcopy.exe","1176","QueryAttributeInformationVolume","0.0000355","U:\blog\XXXTTT.com","SUCCESS","FileSystemAttributes: Case Preserved, Unicode, MaximumComponentNameLength: 255, FileSystemName: FAT32","1812","884"
"16:27:45.9738731","xcopy.exe","1176","QueryBasicInformationFile","0.0000146","U:\blog\XXXTTT.com","SUCCESS","CreationTime: 2019-11-9 22:32:13, LastAccessTime: 2022-3-25 0:00:00, LastWriteTime: 2022-2-21 20:06:52, ChangeTime: 1601-1-1 8:00:00, FileAttributes: DA","1812","884"
"16:27:45.9739527","xcopy.exe","1176","QueryAttributeInformationVolume","0.0000545","G:\blog\XXXTTT.com","SUCCESS","FileSystemAttributes: Case Preserved, Case Sensitive, Unicode, ACLs, Compression, Named Streams, EFS, Object IDs, Reparse Points, Sparse Files, Quotas, MaximumComponentNameLength: 255, FileSystemName: NTFS","1812","884"
"16:27:45.9741947","xcopy.exe","1176","SetBasicInformationFile","0.0103901","U:\blog\XXXTTT.com","SUCCESS","CreationTime: 1601-1-1 8:00:00, LastAccessTime: 1601-1-1 8:00:00, LastWriteTime: 1601-1-1 8:00:00, ChangeTime: 1601-1-1 8:00:00, FileAttributes: DAC","1812","884"
--//xcopy在掃描g:\blog的各個子目錄來同步U:\blog目錄.
--//我在隨身碟建立一個bblog目錄再次嘗試.
G:\>xcopy /d/e/y g:\blog\jd.txt u:\bblog
G:\blog\jd.txt
--//等上一小會,馬上按ctrl+c中斷.
d:\notes>dir u:\bblog /b
jd.txt
0x.tools
.....
G:\>xcopy /?
...
/E 複製目錄和子目錄,包括空的。
與 /S /E 相同。可以用來修改 /T。
--//windows的xcopy命令真變態,實際上xcopy /e引數還把其他目錄下的檔案做了同步以及檢查,實際上上面的命令正確的執行方式是
G:\>xcopy /d/y g:\blog\jd.txt u:\bblog
複製了 0 個檔案
--//這樣很快完成.提示"複製了 0 個檔案"是因為現在兩邊檔案一致無需要做同步處理.
--//怪不得,我寫的同步指令碼同步開始時有點慢,原來是掃描子目錄的原因.
--//連結 http://blog.itpub.net/267265/viewspace-2137969/ =>[20170425]實現磁碟檔案與隨身碟同步.txt
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2884435/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- [20210812]windows xcopy問題.txtWindows
- [20220329]批量修改檔名.txt
- Windows xp下,貼上選單灰色顯示的處理(使用xcopy命令)Windows
- MySql用Windows命令列中亂碼問題MySqlWindows命令列
- 在WINDOWS下使用xcopy遠端複製檔案Windows
- 解決macOS新建txt文件在Windows下不換行問題MacWindows
- [20220329]是否開發寫錯sql語句.txtSQL
- [20240202]windows時間同步問題.txtWindows
- Windows 複製 xcopy 檔案到另外一個 目錄Windows
- [20220329]19c sql語句打補丁.txtSQL
- [20180420]windows下使用cmd的小問題.txtWindows
- windows系統相關命令及問題排查實踐Windows
- [20140411]windows的forfiles命令.txtWindows
- postgresql copy UNICODE txt 問題。SQLUnicode
- Windows批處理命令專題Windows
- [20231109]bbed p命令dba引數問題.txt
- Windows下Pycharm執行命令列語句結果亂碼問題��Ȩ��Ӧ��WindowsPyCharm命令列
- 兩行命令解決 Windows 下 Homestead 執行緩慢的問題Windows
- Windows共享的那些問題Windows
- javah命令問題請教Java
- rman 的crosscheck命令問題!ROS
- 把TXT文字匯入SQLServer常見問題SQLServer
- Ubuntu11.10 亂碼問題(TXT)。Ubuntu
- [20190411]linux stat 命令疑問.txtLinux
- windows命令列命令Windows命令列
- windows解決埠占用問題Windows
- windows 卡在正在啟動問題Windows
- windows自動任務問題Windows
- windows下vim的使用問題Windows
- C++windows編碼問題C++Windows
- 通過truss命令trace問題
- {HELP}sar命令的問題(轉)
- [20200224]windows命令學習筆記.txtWindows筆記
- 解決windows docker lnmp訪問慢問題WindowsDockerLNMP
- [20160910]sqlldr使用問題.txtSQL
- java 讀取.txt檔案時,注意的問題Java
- [20121028]not in與NULL問題.txtNull
- [20160608]perf定位問題.txt