printing uid of a file on linux system
Posted
by neo730
on Stack Overflow
See other posts from Stack Overflow
or by neo730
Published on 2010-06-06T13:04:11Z
Indexed on
2010/06/06
13:12 UTC
Read the original article
Hit count: 366
i am learning c programming. I am trying to make my own program similar to ls command but with less options.what i am doing is taking input directory/file name as argument and then gets all directory entry with dirent struct(if it is directory) .
After it i use stat() to take all information of the file but here is my problem when i use write() to print these value its fine but when i want to print these with printf() i get warninng : format ‘%ld’ expects type ‘long int’, but argument 2 has type ‘__uid_t’. I don't know what should use at place of %ld and also for other special data types.
© Stack Overflow or respective owner