史萊姆論壇

史萊姆論壇 (http://forum.slime.com.tw/)
-   網路疑難應用技術研討區 (http://forum.slime.com.tw/f47.html)
-   -   Linux下如何做檔案比對? (http://forum.slime.com.tw/thread128105.html)

Jeanet 2004-10-07 12:08 PM

Linux下如何做檔案比對?
 
請教各位,如何在Linux下,當多個檔案拷貝後,如何做檔案大小比對?
是要用diff or cmp嬤?可是都會失敗,說明
cmp: 無效的 --ignore-initial值
cmp: 請嘗試 'cmp --help' 來獲取更多資訊。
還是另外有其他的解決方案,請各位幫幫忙,謝謝。

Jeanet 2004-10-11 11:22 AM

個人寫ㄌ小批次檔,煩請各位幫我看看有沒有問題?謝謝。

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.

『服務條款』

* 有問題不知道該怎麼解決嗎?請聯絡本站的系統管理員 *


SEO by vBSEO 3.6.1