[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
- [20220329]windwos下使用seq與xargs建立多個子目錄問題(補充).txt
- [20240202]windows時間同步問題.txtWindows
- [20220329]是否開發寫錯sql語句.txtSQL
- [20180420]windows下使用cmd的小問題.txtWindows
- [20231109]bbed p命令dba引數問題.txt
- [20220329]19c sql語句打補丁.txtSQL
- [20200224]windows命令學習筆記.txtWindows筆記
- MySql用Windows命令列中亂碼問題MySqlWindows命令列
- 解決macOS新建txt文件在Windows下不換行問題MacWindows
- Windows 複製 xcopy 檔案到另外一個 目錄Windows
- [20190411]linux stat 命令疑問.txtLinux
- windows系統相關命令及問題排查實踐Windows
- [20190221]sql patch 問題.txtSQL
- [20181217]strace使用問題.txt
- [20181204]bbed修改問題.txt
- [20190313]備份問題.txt
- [20180619]bbed verify問題.txt
- [20190116]rman的老問題.txt
- [20181206]toad 12小問題.txt
- [20180509]函式索引問題.txt函式索引
- [20190522]rman備份問題.txt
- [20181227]bbed的使用問題.txt
- [20221203]sqlplus set trimspool 問題.txtSQL
- [20221107]除錯crontab問題.txt除錯
- [20221202]sqlplus set trimout 問題.txtSQL
- [20220623]linux 口令expire問題.txtLinux
- [20210303]bbed使用小問題.txt
- [20201221]spfile設定問題.txt
- 兩行命令解決 Windows 下 Homestead 執行緩慢的問題Windows
- Windows下Pycharm執行命令列語句結果亂碼問題��Ȩ��Ӧ��WindowsPyCharm命令列
- [20181031]模擬網路問題.txt
- [20190114]conemu與kitty小問題.txt
- [20181123]關於降序索引問題.txt索引
- [20190314]使用strace注意的問題.txt
- [20231020]增加欄位的問題.txt
- [20191129]關於hugepages的問題.txt