Home
last modified time | relevance | path

Searched refs:stat (Results 1 – 25 of 122) sorted by relevance

12345

/coreutils/src/
Dstatx.h33 statx_to_stat (struct statx *stx, struct stat *stat) in statx_to_stat() argument
35 stat->st_dev = makedev (stx->stx_dev_major, stx->stx_dev_minor); in statx_to_stat()
36 stat->st_ino = stx->stx_ino; in statx_to_stat()
37 stat->st_mode = stx->stx_mode; in statx_to_stat()
38 stat->st_nlink = stx->stx_nlink; in statx_to_stat()
39 stat->st_uid = stx->stx_uid; in statx_to_stat()
40 stat->st_gid = stx->stx_gid; in statx_to_stat()
41 stat->st_rdev = makedev (stx->stx_rdev_major, stx->stx_rdev_minor); in statx_to_stat()
42 stat->st_size = stx->stx_size; in statx_to_stat()
43 stat->st_blksize = stx->stx_blksize; in statx_to_stat()
[all …]
Dfind-mount-point.c30 find_mount_point (char const *file, struct stat const *file_stat) in find_mount_point()
33 struct stat last_stat; in find_mount_point()
66 if (stat (".", &last_stat) < 0) in find_mount_point()
79 struct stat st; in find_mount_point()
80 if (stat ("..", &st) < 0) in find_mount_point()
Dtest.c170 struct stat finfo; in get_mtime()
171 bool ok = (stat (filename, &finfo) == 0); in get_mtime()
270 struct stat stat_buf, stat_spare; in binary_operator()
338 return (stat (argv[op - 1], &stat_buf) == 0 in binary_operator()
339 && stat (argv[op + 1], &stat_spare) == 0 in binary_operator()
387 struct stat stat_buf; in unary_operator()
401 return stat (argv[pos - 1], &stat_buf) == 0; in unary_operator()
418 if (stat (argv[pos - 1], &stat_buf) != 0) in unary_operator()
428 if (stat (argv[pos - 1], &stat_buf) != 0) in unary_operator()
439 if (stat (argv[pos - 1], &stat_buf) != 0) in unary_operator()
[all …]
Dpwd.c151 find_dir_entry (struct stat *dot_sb, struct file_name *file_name, in find_dir_entry()
156 struct stat parent_sb; in find_dir_entry()
170 if ((0 <= fd ? fstat (fd, &parent_sb) : stat (".", &parent_sb)) < 0) in find_dir_entry()
182 struct stat ent_sb; in find_dir_entry()
271 struct stat dot_sb; in robust_getcwd()
277 if (stat (".", &dot_sb) < 0) in robust_getcwd()
300 struct stat st1; in logical_getcwd()
301 struct stat st2; in logical_getcwd()
318 if (stat (wd, &st1) == 0 && stat (".", &st2) == 0 && psame_inode (&st1, &st2)) in logical_getcwd()
/coreutils/tests/chgrp/
Dbasic.sh36 chgrp $g1 f || fail=1 ; test $(stat --p=%g f) = $g1 || fail=1
37 chgrp $g2 f || fail=1 ; test $(stat --p=%g f) = $g2 || fail=1
38 chgrp $g2 f || fail=1 ; test $(stat --p=%g f) = $g2 || fail=1
39 chgrp '' f || fail=1 ; test $(stat --p=%g f) = $g2 || fail=1
40 chgrp $g1 f || fail=1 ; test $(stat --p=%g f) = $g1 || fail=1
41 chgrp $g1 f || fail=1 ; test $(stat --p=%g f) = $g1 || fail=1
42 chgrp --reference=f2 f ; test $(stat --p=%g f) = $g2 || fail=1
44 chgrp -R $g2 d ||fail=1; test $(stat --p=%g: $d_files) = "$g2:$g2:" || fail=1
45 chgrp -R $g1 d ||fail=1; test $(stat --p=%g: $d_files) = "$g1:$g1:" || fail=1
46 chgrp -R $g2 d ||fail=1; test $(stat --p=%g: $d_files) = "$g2:$g2:" || fail=1
[all …]
/coreutils/tests/stat/
Dstat-birthtime.sh20 print_ver_ stat
25 btime=$(stat --format %W a) || fail=1
26 atime=$(stat --format %X a) || fail=1
27 mtime=$(stat --format %Y a) || fail=1
28 ctime=$(stat --format %Z a) || fail=1
44 test "x$btime" = x$(stat --format %W a) &&
45 test "x$atime" != x$(stat --format %X a) &&
46 test "x$mtime" != x$(stat --format %Y a) &&
47 test "x$ctime" != x$(stat --format %Z a)
Dstat-slash.sh20 print_ver_ stat
35 stat --format=%n link1 > out || fail=1
36 returns_ 1 stat --format=%n link1/ >> out || fail=1
38 stat --format=%F link2 >> out || fail=1
39 stat -L --format=%F link2 >> out || fail=1
40 stat --format=%F link2/ >> out || fail=1
Dstat-fmt.sh20 print_ver_ stat
26 out=$(stat --form="$fmt" .)
34 stat -c%N \' >> out || fail=1
Dstat-hyphen.sh20 print_ver_ stat
25 stat --format=%n - < f > out || fail=1
26 returns_ 1 stat -f - < f || fail=1
Dstat-mount.sh20 print_ver_ stat
22 stat_mnt=$(stat -c%m .) || fail=1
/coreutils/tests/split/
Dfilter.sh45 returns_ 1 stat x?? 2>/dev/null || fail=1
68 seq 1 $N | tr '0-9' 1 > stat.exp
69 stat -c%s x??.n > stat.out || framework_failure_
70 compare stat.exp stat.out || fail=1
/coreutils/tests/ls/
Dstat-free-color.sh21 require_strace_ stat
27 for stat in $other_stats; do
28 strace -qe "$stat" true > /dev/null 2>&1 &&
29 stats="$stats,$stat"
35 cat <<EOF > color-without-stat || framework_failure_
54 eval $(dircolors -b color-without-stat)
Dstat-free-symlinks.sh21 require_strace_ stat
26 for stat in $other_stats; do
27 strace -qe "$stat" true > /dev/null 2>&1 &&
28 stats="$stats,$stat"
Dstat-vs-dirent.sh23 root_dev_ino=$(stat --format=%d-%i /)
35 st_ino=$(stat --format=%i "$t/$file") ||
56 dev_ino=$(stat --format=%d-%i "$t")
/coreutils/tests/du/
Dbasic.sh32 B=$(stat --format=%B a/b/F)
40 f=$(stat --format=%b a/b/F)
41 b=$(stat --format=%b a/b)
42 a=$(stat --format=%b a)
70 t2=$(stat --format=%b d/sub/2)
71 ts=$(stat --format=%b d/sub)
72 t1=$(stat --format=%b d/1)
73 td=$(stat --format=%b d)
Dthreshold.sh29 Ba=$(stat --format="%B * %b" a | xargs expr)
30 Bb=$(stat --format="%B * %b" a/b | xargs expr)
31 Bc=$(stat --format="%B * %b" a/c | xargs expr)
32 B0=$(stat --format="%B * %b" a/b/0 | xargs expr)
33 B1=$(stat --format="%B * %b" a/b/1 | xargs expr)
34 B2=$(stat --format="%B * %b" a/b/2 | xargs expr)
35 B3=$(stat --format="%B * %b" a/b/3 | xargs expr)
40 S0=$(stat --format=%s a/b/0)
41 S1=$(stat --format=%s a/b/1)
42 S2=$(stat --format=%s a/b/2)
[all …]
/coreutils/tests/truncate/
Dtruncate-parameters.sh42 test $(stat --format %s file) = 2 || fail=1
46 test $(stat --format %s file) = 3 || fail=1
50 test $(stat --format %s file) = 3 || fail=1
52 test $(stat --format %s file2) = 3 || fail=1
/coreutils/tests/cp/
Dpreserve-slink-time.sh30 case $(stat --format=%y dangle) in
39 stat --format=%y dangle > t1 || framework_failure_
40 stat --format=%y d2 > t2 || framework_failure_
Dsparse-extents.sh60 test $(stat -c %s empty.big) = $(stat -c %s cp.test) || fail=1
77 test $(stat -c %s unwritten.withdata) = $(stat -c %s cp.test) || fail=1
Dnfs-removal-race.sh50 __xstat (int ver, const char *path, struct stat *st)
52 static int (*real_stat)(int ver, const char *path, struct stat *st) = NULL;
56 /* When asked to stat nonexistent "d",
/coreutils/tests/test/
Dtest-N.sh20 print_ver_ test stat
23 mtime=$(env stat -c '%.Y' "$1")
24 atime=$(env stat -c '%.X' "$1")
/coreutils/tests/misc/
Dselinux.sh20 print_ver_ chcon cp ls mv stat
41 c=$(stat --printf %C $i); test x$c = x$ctx || fail=1
56 c=$(stat --printf %C s1/$i); test x$c = x$ctx || fail=1
62 c=$(stat --printf %C s2/$i); test x$c = x$ctx || fail=1
/coreutils/man/
Dstat.x2 stat \- display file or file system status
6 stat(2), statfs(2), statx(2)
/coreutils/gl/lib/
Dtargetdir.c61 target_directory_operand (char const *file, struct stat *st) in target_directory_operand()
74 stat_result = stat (file, st); in target_directory_operand()
97 errno = (((O_DIRECTORY ? stat (file, st) : stat_result) == 0 in target_directory_operand()
/coreutils/tests/chcon/
Dchcon.sh39 stat --printf='f|%C\n' f > out || fail=1
43 stat --printf='g|%C\n' g >> out || fail=1
51 stat --printf="f|$i|"'%C\n' f >> out || fail=1
57 stat --printf="f|$i|"'%C\n' f >> out || fail=1

12345