469,902 Members | 1,939 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,902 developers. It's quick & easy.

File ownership check

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.
Nov 14 '05 #1
2 2034
Benden Ziyade wrote:
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?

Nov 14 '05 #2
Benden Ziyade <be*******@gmail.com> wrote:
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
--
\ Jens Thoms Toerring ___ Je***********@physik.fu-berlin.de
\__________________________ http://www.toerring.de
Nov 14 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Ryan | last post: by
7 posts views Thread by Joseph | last post: by
11 posts views Thread by Jacob | last post: by
1 post views Thread by igotyourdotnet | last post: by
13 posts views Thread by eclipsme | last post: by
5 posts views Thread by =?Utf-8?B?UVNJRGV2ZWxvcGVy?= | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.