Results 1 to 2 of 2
Hello Everybody,
After writing some data to a file , then closing the file using fclose function .. then immediately passing the file as an argument to a shell script ...
- 07-27-2011 #1Just Joined!
- Join Date
- Jul 2011
- Posts
- 3
problem in file reading and writing in c
Hello Everybody,
After writing some data to a file , then closing the file using fclose function .. then immediately passing the file as an argument to a shell script command or opening the file for immediately reading .. Will the data be found correctly or the Operating System will still being writing the file so that if i read something before it finishes it may be some garbage ??
Thanks in advance,
- 07-28-2011 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
The data, even if not written completely to disc, will be in the system cache, so opening the file with another application or shell script should work just fine.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote