0
votes
0answers
8 views

How to programmatically read until a certain character in a file? [migrated]

My C program writes a .json file. Few of the values in the schema of the .json file is string and has variable length. I am using jansson library. I will have to read a complete .json object ...
0
votes
1answer
118 views

Having trouble executing a compiled C program

I am running an Ubuntu v10.04 through VirtualBox. To test the persistence of files I create in the virtual machine, I wrote a very basic C program. When I shutdown the virtual machine and restart it, ...
3
votes
1answer
513 views

Confused about ident

I inherited a bunch of files that begin with the following statement at the top Ident:/some/path/to/a/file Ident seems to be related to C coding and make files but I am not really sure. None of the ...
4
votes
3answers
281 views

Why is there a type for process ids (pid_t), but not for file descriptors (fd)?

I see that pid_t is typedef'd in unistd.h, and file descriptors are defined to be int in fcntl.h. But since they are used in similar ways, wouldn't it make sense to have a typedef for file ...
0
votes
1answer
81 views

Looking for resources: like C doc for reading files and their attributes? (On Linux)

Looking for resources: like C doc (something like JavaDoc for C on Linux would be cool) for reading files and their attributes? I'm working on recursively reading in files. I can get a list of files ...
3
votes
1answer
3k views

Error when using stat, errno=2

The case is as this, I create many files, and after the file generation, I use stat to get the all files info under the directory. The purpose is to purge all the files which are old than the ...