bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #12162] Enhancement req: finding files less than 2Gb in size [needs


From: Martin Steigerwald
Subject: [bug #12162] Enhancement req: finding files less than 2Gb in size [needs community feedback]
Date: Wed, 15 Aug 2012 14:20:33 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20100101 Firefox/14.0.1 Iceweasel/14.0.1

Follow-up Comment #23, bug #12162 (project findutils):

I have:

mango:/tmp# find -name "nullen*" -printf "%p %sn" | sort
./nullen0999 1022976
./nullen1000 1024000
./nullen1001 1025024
./nullen1024 1048576
./nullen1025 1049600
./nullen2047 2096128
./nullen2048 2097152
./nullen2049 2098176

Yet while

mango:/tmp# find -size +1M -size -3M -printf "%p %sn" | sort
./nullen1025 1049600
./nullen2047 2096128
./nullen2048 2097152

Does not show up nullen2049 cause find rounds -3M to next integer unit <=2M.
Yet find doesn't round up +1M to >=2M. I think this behavior is quite
unpredictable and inconsistent.

Especially as -[a|m|c]mtime exactly behaves that way even for "+" – well at
least in my last test it did.

But unless I am grossly off track this doesn't work at all ATM:

address@hidden:/tmp/find-times> touch -d "1 day ago" morethan1dayago
address@hidden:/tmp/find-times> touch -d "22 hours ago" lessthan1dayago
address@hidden:/tmp/find-times> touch -d "2 days ago" morethan2daysago
address@hidden:/tmp/find-times> touch -d "3 days ago" morethan3daysago
address@hidden:/tmp/find-times> touch -d "46 hours ago" lessthan2daysago
address@hidden:/tmp/find-times> touch -d "70 hours ago" lessthan3daysago

address@hidden:/tmp/find-times#2> ls -l --time=ctime
insgesamt 0
-rw-rw-r-- 1 ms teamix 0 Aug 15 16:11 lessthan1dayago
-rw-rw-r-- 1 ms teamix 0 Aug 15 16:12 lessthan2daysago
-rw-rw-r-- 1 ms teamix 0 Aug 15 16:12 lessthan3daysago
-rw-rw-r-- 1 ms teamix 0 Aug 15 16:11 morethan1dayago
-rw-rw-r-- 1 ms teamix 0 Aug 15 16:11 morethan2daysago
-rw-rw-r-- 1 ms teamix 0 Aug 15 16:11 morethan3daysago

address@hidden:/tmp/find-times> date
Mi 15. Aug 16:16:26 CEST 2012

address@hidden:/tmp/find-times> find -ctime -2 -printf "%pt %cn" | sort
./lessthan1dayago        Wed Aug 15 16:11:33.0439805365 2012
./lessthan2daysago       Wed Aug 15 16:12:00.0298369109 2012
./lessthan3daysago       Wed Aug 15 16:12:10.0625203012 2012
./morethan1dayago        Wed Aug 15 16:11:23.0256899464 2012
./morethan2daysago       Wed Aug 15 16:11:42.0723161276 2012
./morethan3daysago       Wed Aug 15 16:11:50.0711165207 2012
.        Wed Aug 15 16:12:10.0625203012 2012

Note how find display day as 15 August on every file. find -ls shows correct
results.

Hmmm, but thats a different bug it seems, that I will report in a moment.

Still last I checked with -exec ls -ld {} ; -ctime behaved as follows:

- ctime 1: 24-48 hours earlier
- ctime -1: 0-24 hours earlier
- ctime +1: >=48 (!) hours earlier 

So I suggest new time options as well. I'd like the aliasing idea with -size
=> -blocksize.

Or maybe "gt" and "lt" could serve for new fractional comparing? Like in
"test" command. But thats > and <, not <= and =>. I think the semantics which
one find uses should also be clarified.    

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?12162>

_______________________________________________
  Nachricht gesendet von/durch Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]