File ownership check

B

Benden Ziyade

Hello;

I want to write a C program that check file ownership in /bin
directory(ls, mkdir...). But I don't know how I start. I'm happy with
your helping.
 
L

liamfoy

Benden said:
Hello;

I want to write a C program that check file ownership in /bin
directory(ls, mkdir...). But I don't know how I start. I'm happy with
your helping.

Do you want to check whether you have ownership, or just print who
has ownership?
 
J

Jens.Toerring

Benden Ziyade said:
I want to write a C program that check file ownership in /bin
directory(ls, mkdir...). But I don't know how I start. I'm happy with
your helping.

Sorry, but there isn't any function to determine the "ownerships" of
file in C (and also no function to list directories etc.), so you
need some system-specific extensions. Since what you write looks a
bit like you're using some UNIX-like system comp.unix.programmer
would probably be the right group to ask (and where you might get told
to use the stat(2) function).
Regards, Jens
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top