Code:Hi, Please see the program below. ============================================== #include <stdio.h> #include <sys/stat.h> #include <pwd.h> #include <grp.h> #include <time.h> struct passwd *getpwuid(); struct group *getgrgid(); main ( int argc , char *argv[] ) { struct stat thebuf; char *path; int i; for ( i = 1 ; i < argc ; i++ ) { path = argv[i]; printf("path : %s\n",path); if ( !stat(path,&thebuf)) { printf("File mode : %o\n",thebuf.st_mode); printf("inode no : %d\n",thebuf.st_ino); printf("Device Id : %d\n",thebuf.st_dev); printf("Spl device Id : %d\n",thebuf.st_rdev); printf("No of links : %d\n",thebuf.st_nlink); printf("User id : %d\n",thebuf.st_uid); printf("(%s)\n",getpwuid(thebuf.st_uid)->pw_name); printf("Group id : %d\n",thebuf.st_gid); printf("(%s)\n",getgrgid(thebuf.st_gid)->gr_name); printf("size in bytes : %ld\n",thebuf.st_size); printf("Last access time : %s\n",ctime(&thebuf.st_atime)); printf("Last modification time : %s\n",ctime(&thebuf.st_mtime)); printf("Last status time : %s\n",ctime(&thebuf.st_ctime)); printf("\n"); } } } ============================================================ I have a doubt in filemode.Actually for directory file mode gives 40755. For files it gives 100644.755 and 644 are the permissions. What is 40 and 100 here? Could anybody explain this little briefly? Thanks, Rajisankar