The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 08-02-2007
the_learner the_learner is offline
Registered User
 

Join Date: Apr 2007
Posts: 75
file size different in unix and windows

I have a file on solaris/linux.

ls -ls shows the logical size to be: 13292

However, when I transfer the file to my windows machine.. Rightclick->Properties shows the file size as: 13421

I wrote a small program on unix and windows that does a stat() on the file and reports the st_size (file size in bytes) and I get the same result (13292 on windows and 13421 on unix)

Interestingly, this happens only with .txt files. For .pdf and .ppt files, the file size is the same. However, for .txt files the file size on windows is > that on unix.

For another txt file (17MB)
Windows: 18701307 bytes
Unix: 18581191

Does anybody know why is this happening ?

Thanks !
Reply With Quote
Remove advertisements
!!
Forum Sponsor