[LCP]writing into a file

David Spencer David.W.Spencer at oracle.com
Wed Nov 7 21:28:07 UTC 2001


Not sure.  Partial output from 'ls' after my version of the program:

-rwxr-xr-x    1 dave     users       15096 Nov  7 10:00 a.out*
drwxr-xr-x    2 dave     users        4096 Nov  7 10:00 dump/
-rwxr-xr-x    1 dave     users       18035 Jul 27 19:11 esc*
-rw-r--r--    1 dave     users        1024 Nov  7 10:00 esc.00
-rw-r--r--    1 dave     users        1024 Nov  7 10:00 esc.01
-rw-r--r--    1 dave     users        1024 Nov  7 10:00 esc.02
...
-rw-r--r--    1 dave     users        1024 Nov  7 10:00 esc.16
-rw-r--r--    1 dave     users         627 Nov  7 10:00 esc.17

(splitting esc)

Dave.


Sateesh Kumar Narayana wrote:
> 
> I am trying to write a file splitter (splitting files into 1KB each).First i
> am opening the file in binary mode and reading some 1KB and writing the same
> into a new file.
> After completion of this ,i am getting the files size as 1066 bytes instead
> of 1024.While debugging it is shown as no of bytes written is 1024 bytes.
> 
> Can anyone explain me from where  these additional bytes are coming in?????
> 
>   ------------------------------------------------------------------------
>                            Name: Wipro_Disclaimer.txt
>    Wipro_Disclaimer.txt    Type: Plain Text (text/plain)
>                        Encoding: 7bit



More information about the linuxCprogramming mailing list