Nguyen Vu Hung a ?crit :
> Why du -sh and ls -lh gives different results??? ( 701MB and 9.4MB )
>
> [vuhung at aoclife $ ls -lh
> total 9.4M
> -rw-r--r-- 1 vuhung vuhung 701M Jan 27 23:03 file.avi
> -rw-r--r-- 1 vuhung vuhung  904 Jan 26 02:18 file.ssa
> -rw-r--r-- 1 vuhung vuhung 1.2K Jan 26 02:18 file.txt
> [vuhung at aoclife $ du -sh
> 9.4M
>   
Because "du" shows the real disk usage hence "ls" shows the declared one
(which is not the same as reserved).

Here it's probably because your file.avi is mostly full of zero which
will not be stored in a filesystem with "sparse" support (like ext3).
Most modern technologies (especially P2P, like bittorrent) use this
capability.

Check for the "sparse" keyword in the manual pages of "cp", "tar" or
"rsync".

-- 
Jean Christophe "????" ANDR? ? Responsable technique r?gional
Bureau Asie-Pacifique (BAP) ? http://asie-pacifique.auf.org/
Agence universitaire de la Francophonie (AuF) ? http://www.auf.org/
Adresse postale : AUF, 21 L? Th?nh T?ng, T.T. Ho?n Ki?m, H? N?i, Vi?t Nam
T?l. : +84 4 9331108   Fax : +84 4 8247383   Mobile : +84 91 3248747
? Note personnelle : merci d'?viter de m'envoyer des fichiers PowerPoint  ?
? ou Word, voir http://www.gnu.org/philosophy/no-word-attachments.fr.html ?


-------------- section suivante --------------
Une pi?ce jointe non texte a ?t? nettoy?e...
Nom: signature.asc
Type: application/pgp-signature
Taille: 252 octets
Desc: OpenPGP digital signature
Url: 
http://lists.hanoilug.org/pipermail/hanoilug/attachments/20080307/e2bfefa3/attachment.pgp
 

Trả lời cho