Hi this is more than likely a general linux question but on a CentOS4 box whats going on here? # ls -al foo.txt -r--r--r-- 1 xxx xxx 1373149856 Mar 28 04:34 foo.txt # du -sh foo.txt 808M foo.txt any ideas ?
Tom Brown wrote:> Hi > > this is more than likely a general linux question but on a CentOS4 box > whats going on here? > > # ls -al foo.txt > -r--r--r-- 1 xxx xxx 1373149856 Mar 28 04:34 foo.txt > > # du -sh foo.txt > 808M foo.txt > > any ideas ?Sparse file. The file has holes in it: # cd /var/log # ls -lh lastlog -r-------- 1 root root 577M Mar 29 12:52 lastlog # du -h lastlog 20K lastlog Remember to use -S when tar'ing a file like this :-) Mogens -- Mogens Kjaer, Carlsberg A/S, Computer Department Gamle Carlsberg Vej 10, DK-2500 Valby, Denmark Phone: +45 33 27 53 25, Fax: +45 33 27 47 08 Email: mk at crc.dk Homepage: http://www.crc.dk
On Mar 29, 2007, at 6:48, Tom Brown wrote:> this is more than likely a general linux question but on a CentOS4 > box whats going on here? > > # ls -al foo.txt > -r--r--r-- 1 xxx xxx 1373149856 Mar 28 04:34 foo.txt > > # du -sh foo.txt > 808M foo.txtThis is probably a sparse file. What does a "du -sh --apparent-size" report? Alfred
Tom Brown wrote:> # ls -al foo.txt > -r--r--r-- 1 xxx xxx 1373149856 Mar 28 04:34 foo.txt > > # du -sh foo.txt > 808M foo.txt"man du", search for "--apparent-size". Your file seems to be a sparse file with "holes" in it. Cheers, Ralph -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: <http://lists.centos.org/pipermail/centos/attachments/20070329/ab2084ae/attachment.sig>
On 3/29/07, Tom Brown <tom at ng23.net> wrote:> > Hi > > this is more than likely a general linux question but on a CentOS4 box > whats going on here? > > # ls -al foo.txt > -r--r--r-- 1 xxx xxx 1373149856 Mar 28 04:34 foo.txt > > # du -sh foo.txt > 808M foo.txt > > any ideas ? >Well, this is definitely NOT a general Linux question unless you can show it happens on other Linux platforms. However, I'm not seeing anything like this, but I don't have any files larger than 20Mb, either. mhr -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos/attachments/20070329/cc9d7be6/attachment.html>
On Thu, 29 Mar 2007 11:07:36 -0700, Mark Hull-Richter wrote:> On 3/29/07, Tom Brown <tom at ng23.net> wrote: >> >> Hi >> >> this is more than likely a general linux question but on a CentOS4 box >> whats going on here? >> >> # ls -al foo.txt >> -r--r--r-- 1 xxx xxx 1373149856 Mar 28 04:34 foo.txt >> >> # du -sh foo.txt >> 808M foo.txt >> >> any ideas ? >> >> > Well, this is definitely NOT a general Linux question unless you can show > it happens on other Linux platforms.Sparse files are not unique to Linux. They exist in NTFS and others. They are not OS dependent but rather applications create them. I bet you have such files on your system. Look at /var/log/lastlog for example. Akemi