Check the file size and number symbols in a file using C in Unix 
Author Message
 Check the file size and number symbols in a file using C in Unix

        I would like to ask that is there any command to check the size of
a file and the number of symbols(character or unprintable symbol) in a
file?

        What is the relationship between file size and number of symbols
in a file?

Fish



Tue, 25 Jul 2000 03:00:00 GMT  
 Check the file size and number symbols in a file using C in Unix

Quote:

>    I would like to ask that is there any command to check the size of
>a file and the number of symbols(character or unprintable symbol) in a
>file?

Not in standard C.
I generally find that reading a file char by char and counting the
number of chars read gives a reasonably accurate measure of the number
of chars in the file.

Quote:
>    What is the relationship between file size and number of symbols
>in a file?

Years of experience have taught me that most of the time, the more
things that are in a file, the larger the file tends to be. As a
matter of fact, I don't recall ever adding something to a file and
having it become smaller. Perhaps someone with more math skills than I
could determine the relatonship exactly, but it *does* seem to be
linear. (Perhaps a one-to-one relationship???)

Quote:

>Fish

--

Cameron Foster

http://www2.netcom.com/~cdfoster/



Tue, 25 Jul 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Newbie: separate big .cs file into small .cs files

2. Two CS files (using namespaces)

3. resx files needed for cs - files ??

4. CS files display in VS6 like CPP files ?

5. Finding the minimum number of a txt file of numbers using input redirection

6. HELP - How to check file size in DOS

7. FILE SIZE CHECKING FROM C PROGRAM

8. Unix 2GB file size limit

9. checking file size

10. Easiest way to get file size (unix)?

11. size of UNIX files

12. Checking file sizes

 

 
Powered by phpBB® Forum Software