![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to make sound using C under UNIX | trapeze | UNIX for Dummies Questions & Answers | 6 | 12-10-2007 11:14 PM |
| Unix Make | mmipko | High Level Programming | 3 | 11-23-2007 03:18 PM |
| to make groupings of object using unix command | cdfd123 | UNIX for Dummies Questions & Answers | 1 | 08-03-2007 12:10 PM |
| Make a copy of a unix HDD | josramon | UNIX for Dummies Questions & Answers | 0 | 03-20-2007 08:57 AM |
| Make file in Unix | gandhevinod | UNIX Desktop for Dummies Questions & Answers | 6 | 04-20-2005 04:15 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
I made a liitle source about that..
BUt I got a trouble when making files'authority.. How can I display them?? p.s.) used struct stat ..
__________________
----------------------------- Thanks alot.... |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
check the /usr/include/sys/stat.h for the structure definition of 'stat':
struct stat { . . mode_t st_mode; /* File mode; see #define's in */ uid_t st_uid; /* User ID of the file's owner */ gid_t st_gid; /* Group ID of the file's group */ . . }; 1.) where st_mode will give u the Access (/usr/include/sys/mode.h has all the access modes) 2.) st_uid will give u the user id which can b mapped with: /etc/passwd for the UID 3.) st_gid will give u the group id which can b mapped with: /etc/passwd for the GID all the rest of the information is present in the structure 'stat' (/usr/include/sys/stat.h) Regards SHAIK |
|||
| Google The UNIX and Linux Forums |