Home | History | Annotate | Download | only in other

Lines Matching defs:stat

0 /* stat.c : display file or file system status
5 USE_STAT(NEWTOY(stat, "<1c:fLt", TOYFLAG_BIN))
7 config STAT
8 bool stat
11 usage: stat [-tfL] [-c FORMAT] FILE...
46 struct stat st;
48 } stat;
79 struct stat *stat = (struct stat *)&TT.stat;
81 if (type == 'a') out('o', stat->st_mode&~S_IFMT);
85 mode_to_string(stat->st_mode, str);
87 } else if (type == 'b') out('u', stat->st_blocks);
89 else if (type == 'd') out('d', stat->st_dev);
90 else if (type == 'D') out('x', stat->st_dev);
91 else if (type == 'f') out('x', stat->st_mode);
95 int i, filetype = stat->st_mode & S_IFMT;
98 if (!stat->st_size && filetype == S_IFREG) t = "regular empty file";
100 } else if (type == 'g') out('u', stat->st_gid);
101 else if (type == 'G') strout(getgroupname(stat->st_gid));
102 else if (type == 'h') out('u', stat->st_nlink);
103 else if (type == 'i') out('u', stat->st_ino);
106 dev_t dev = stat->st_rdev ? stat->st_rdev : stat->st_dev;
109 for (dlist_terminate(mt); mt; mt = mt->next) if (mt->stat.st_dev == dev) {
116 if (S_ISLNK(stat->st_mode))
119 } else if (type == 'o') out('u', stat->st_blksize);
120 else if (type == 's') out('u', stat->st_size);
121 else if (type == 't') out('x', dev_major(stat->st_rdev));
122 else if (type == 'T') out('x', dev_minor(stat->st_rdev));
123 else if (type == 'u') out('u', stat->st_uid);
124 else if (type == 'U') strout(getusername(stat->st_uid));
125 else if (type == 'x') date_stat_format(&stat->st_atim);
126 else if (type == 'X') out('u', stat->st_atime);
127 else if (type == 'y') date_stat_format(&stat->st_mtim);
128 else if (type == 'Y') out('u', stat->st_mtime);
129 else if (type == 'z') date_stat_format(&stat->st_ctim);
130 else if (type == 'Z') out('u', stat->st_ctime);
135 struct statfs *statfs = (struct statfs *)&TT.stat;
195 if (flagf && !statfs(TT.file, (void *)&TT.stat));
196 else if (flagf || (L ? stat : lstat)(TT.file, (void *)&TT.stat)) {