[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #62480] find -D stat cannot print anything
From: |
Bernhard Voelker |
Subject: |
[bug #62480] find -D stat cannot print anything |
Date: |
Tue, 17 May 2022 11:13:37 -0400 (EDT) |
Update of bug #62480 (project findutils):
Status: None => Working as Intended
Assigned to: None => berny
_______________________________________________________
Follow-up Comment #1:
The point is that `find` does not have to invoke stat() for
an invocation using the default -print. Reading the directory
entries is sufficient for that.
One has to use tests or actions which need a stat(), e.g.:
# Prepare some files with different size.
$ touch f0
$ for f in 1 100 1000; do if=/dev/zero bs=1 count=$f > f$f; done
# -ls needs stat().
$ find -D stat -ls
409613 4 drwxr-xr-x 2 berny users 4096 May 17 17:07 .
debug_stat (f0)
394313 0 -rw-r--r-- 1 berny users 0 May 17 17:07 ./f0
debug_stat (f100)
393551 0 -rw-r--r-- 1 berny users 0 May 17 17:07
./f100
debug_stat (f1000)
394287 0 -rw-r--r-- 1 berny users 0 May 17 17:07
./f1000
debug_stat (f1)
393513 0 -rw-r--r-- 1 berny users 0 May 17 17:07 ./f1
# -size needs stat().
$ find -D stat . -size -300c
debug_stat (f0)
./f0
debug_stat (f100)
./f100
debug_stat (f1000)
./f1000
debug_stat (f1)
./f1
Therefore, -D stat works as expected.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?62480>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/