2018年4月9日 星期一

Linux 'df' and 'diff' to validate copy operations.

yulin@WNC:/$ ls -lR /HOUSE/yulin/folder/ /work/yulin/folder/
/HOUSE/yulin/folder/:
total 454016
lrwxrwxrwx 1 yulin yulin        71 Apr  9 13:33 link -> mdm9640-le-3-1_test_device-e2a8d364460df84e3b8db18266545dcf4800b662.zip
-rwxr--r-- 1 yulin yulin 464901470 Mar 20 10:44 mdm9640-le-3-1_test_device-e2a8d364460df84e3b8db18266545dcf4800b662.zip
drwxrwxr-x 2 yulin yulin      4096 Apr  9 13:38 sub

/HOUSE/yulin/folder/sub:
total 4
lrwxrwxrwx 1 yulin yulin 74 Apr  9 13:38 link -> ../mdm9640-le-3-1_test_device-e2a8d364460df84e3b8db18266545dcf4800b662.zip

/work/yulin/folder/:
total 454020
lrwxrwxrwx 1 yulin yulin        71 Apr  9 13:33 link -> mdm9640-le-3-1_test_device-e2a8d364460df84e3b8db18266545dcf4800b662.zip
-rwxr--r-- 1 yulin yulin 464901470 Mar 20 10:44 mdm9640-le-3-1_test_device-e2a8d364460df84e3b8db18266545dcf4800b662.zip
drwxrwxr-x 2 yulin yulin      4096 Apr  9 13:39 sub

/work/yulin/folder/sub:
total 4
lrwxrwxrwx 1 yulin yulin 74 Apr  9 13:39 link -> ../mdm9640-le-3-1_test_device-e2a8d364460df84e3b8db18266545dcf4800b662.zip
yulin@WNC:/$
yulin@WNC:/$
yulin@WNC:/$
yulin@WNC:/$ du -s /HOUSE/yulin/folder/ /work/yulin/folder/
454024  /HOUSE/yulin/folder/
454028  /work/yulin/folder/
yulin@WNC:/$ du -s /HOUSE/yulin/folder/mdm9640-le-3-1_test_device-e2a8d364460df84e3b8db18266545dcf4800b662.zip /work/yulin/folder/mdm9640-le-3-1_test_device-e2a8d364460df84e3b8db18266545dcf4800b662.zip
454008  /HOUSE/yulin/folder/mdm9640-le-3-1_test_device-e2a8d364460df84e3b8db18266545dcf4800b662.zip
454012  /work/yulin/folder/mdm9640-le-3-1_test_device-e2a8d364460df84e3b8db18266545dcf4800b662.zip
yulin@WNC:/$ du -s -b /HOUSE/yulin/folder/mdm9640-le-3-1_test_device-e2a8d364460df84e3b8db18266545dcf4800b662.zip /work/yulin/folder/mdm9640-le-3-1_test_device-e2a8d364460df84e3b8db18266545dcf4800b662.zip
464901470       /HOUSE/yulin/folder/mdm9640-le-3-1_test_device-e2a8d364460df84e3b8db18266545dcf4800b662.zip
464901470       /work/yulin/folder/mdm9640-le-3-1_test_device-e2a8d364460df84e3b8db18266545dcf4800b662.zip
yulin@WNC:/$ du -s -b /HOUSE/yulin/folder/ /work/yulin/folder/
464909807       /HOUSE/yulin/folder/
464909807       /work/yulin/folder/



yulin@WNC:/$ rm /work/yulin/folder/sub/link
yulin@WNC:/$ cd /work/yulin/folder/sub/
yulin@WNC:/work/yulin/folder/sub$ ln -s /HOUSE/yulin/mdm9640-le-3-1_test_device-e2a8d364460df84e3b8db18266545dcf4800b662.zip link
yulin@WNC:/work/yulin/folder/sub$ cd /



yulin@WNC:/$ ls -lR /HOUSE/yulin/folder/ /work/yulin/folder/
/HOUSE/yulin/folder/:
total 454016
lrwxrwxrwx 1 yulin yulin        71 Apr  9 13:33 link -> mdm9640-le-3-1_test_device-e2a8d364460df84e3b8db18266545dcf4800b662.zip
-rwxr--r-- 1 yulin yulin 464901470 Mar 20 10:44 mdm9640-le-3-1_test_device-e2a8d364460df84e3b8db18266545dcf4800b662.zip
drwxrwxr-x 2 yulin yulin      4096 Apr  9 13:38 sub

/HOUSE/yulin/folder/sub:
total 4
lrwxrwxrwx 1 yulin yulin 74 Apr  9 13:38 link -> ../mdm9640-le-3-1_test_device-e2a8d364460df84e3b8db18266545dcf4800b662.zip

/work/yulin/folder/:
total 454020
lrwxrwxrwx 1 yulin yulin        71 Apr  9 13:33 link -> mdm9640-le-3-1_test_device-e2a8d364460df84e3b8db18266545dcf4800b662.zip
-rwxr--r-- 1 yulin yulin 464901470 Mar 20 10:44 mdm9640-le-3-1_test_device-e2a8d364460df84e3b8db18266545dcf4800b662.zip
drwxrwxr-x 2 yulin yulin      4096 Apr  9 13:42 sub

/work/yulin/folder/sub:
total 4
lrwxrwxrwx 1 yulin yulin 84 Apr  9 13:42 link -> /HOUSE/yulin/mdm9640-le-3-1_test_device-e2a8d364460df84e3b8db18266545dcf4800b662.zip
yulin@WNC:/$
yulin@WNC:/$
yulin@WNC:/$
yulin@WNC:/$ du -s /HOUSE/yulin/folder/ /work/yulin/folder/
454024  /HOUSE/yulin/folder/
454028  /work/yulin/folder/
yulin@WNC:/$
yulin@WNC:/$ du -s -b /HOUSE/yulin/folder/ /work/yulin/folder/
464909807       /HOUSE/yulin/folder/
464909817       /work/yulin/folder/
yulin@WNC:/$
yulin@WNC:/$
yulin@WNC:/$
yulin@WNC:/$ diff -r /HOUSE/yulin/folder/ /work/yulin/folder/
yulin@WNC:/$
yulin@WNC:/$ diff -r --no-dereference /HOUSE/yulin/folder/ /work/yulin/folder/
Symbolic links /HOUSE/yulin/folder/sub/link and /work/yulin/folder/sub/link differ
yulin@WNC:/$

沒有留言: