![]() |
Linux下如何做檔案比對?
請教各位,如何在Linux下,當多個檔案拷貝後,如何做檔案大小比對?
是要用diff or cmp嬤?可是都會失敗,說明 cmp: 無效的 --ignore-initial值 cmp: 請嘗試 'cmp --help' 來獲取更多資訊。 還是另外有其他的解決方案,請各位幫幫忙,謝謝。 |
個人寫ㄌ小批次檔,煩請各位幫我看看有沒有問題?謝謝。
test.sh #!/bin/bash declare –i s count echo “How many times do you want to run:” read count for (( i=1; i<=count; i=i+1 )) do cp –v Source Destination diff -r Source Destination rm Destination -rvf s=s+1 done echo “The count is ==> $s” |
所有時間均為台北時間。現在的時間是 04:24 PM。 |
Powered by vBulletin® 版本 3.6.8
版權所有 ©2000 - 2025, Jelsoft Enterprises Ltd.
『服務條款』
* 有問題不知道該怎麼解決嗎?請聯絡本站的系統管理員 *