-used not working correctly?

2019-11-14 Thread Martin Schulte
Hello, I create files t (n=1,3,5,7) with ctime=now and atime=now+ days: $ uname -a $ echo $ find --version $ for d in 1 3 5 7; do > touch -a -d "$(date -d "$d day" '+%Y-%m-%d %H:%M:%S')" t$d > done $ echo $ echo find: $ find . -name 't?' -used +4 $ echo done. I expect ./t5 ./t7 as output from

Re: Is there a way to let find return non-zero when nothing is found?

2019-11-14 Thread Stephane Chazelas
2019-11-14 08:19:19 +, Stephane Chazelas: [...] > if [ "$(kill -l "$?")" -eq PIPE ]; then... [...] Sorry, should have been: if [ "$(kill -l "$?")" = PIPE ]; then... -- Stephane

Re: Is there a way to let find return non-zero when nothing is found?

2019-11-14 Thread Stephane Chazelas
2019-11-12 23:54:45 +0100, Bernhard Voelker: [...] > I see the following in 'man find' on NetBSD 8.0: > > -exit [status] [...] > (Interestingly, NetBSD-find does not have -quit.) -exit was added there in 2006. GNU's -quit was added in 4.2.3 (2004) so that makes GNU's -quit the first indeed.