Advertisement
Guest User

Untitled

a guest
May 27th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #include<stdio.h>
  2. #include <sys/types.h>
  3. #include <sys/stat.h>
  4. #include <unistd.h>
  5. #include<errno.h>
  6.  
  7. int main(int argc, char **argv){
  8.  
  9. struct stat st;
  10.  
  11. for(int i=1;i<argc;i++){
  12. int t = stat(argv[i],&st);
  13. if(t!=0){
  14. perror("stat:");
  15. return 1;
  16. }
  17. printf("%s %d\n",argv[i],st.st_uid);
  18. }
  19. return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement