Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <unistd.h>
- #include<errno.h>
- int main(int argc, char **argv){
- struct stat st;
- for(int i=1;i<argc;i++){
- int t = stat(argv[i],&st);
- if(t!=0){
- perror("stat:");
- return 1;
- }
- printf("%s %d\n",argv[i],st.st_uid);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement