Re: find /etc -size -1G return only empty files

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

 



On 03/26/2010 03:58 PM, Aaron Konstam wrote:
> On Fri, 2010-03-26 at 11:53 -0430, Patrick O'Callaghan wrote:
>> On Fri, 2010-03-26 at 10:30 -0500, Aaron Konstam wrote:
>>> On Thu, 2010-03-25 at 14:20 -0700, Rick Stevens wrote:
>>>> On 03/25/2010 01:57 PM, Aaron Konstam wrote:
>>>>> On Thu, 2010-03-25 at 12:43 -0430, Patrick O'Callaghan wrote:
>>>>>> On Thu, 2010-03-25 at 13:04 -0400, Kevin J. Cummings wrote:
>>>>>>>> Note that this clarification is not present in the man page find(1).
>>>>>>> So
>>>>>>>> it's either a bug in find or a bug in the documentation.
>>>>>>>
>>>>>>> When I ran the command as "-size 1G", it returned all the files less
>>>>>>> than 1GB in size (I'm not sure if /etc *has* any files greater than
>>>>>>> 1GB!)  So, I agree, its either a bug in the documentation or in find.
>>>>>>> Bugzilla it!  Let's hear from the developers.
>>>>>>
>>>>>> Are you sure? In my case it returned only the zero-length files, same as
>>>>>> what the OP reported. This is on F12, just in case.
>>>>>>
>>>>>> poc
>>>>>>
>>>>> That is how it works for me. zero length files are not returned.
>>>>
>>>> After reading all the replies to this thread, I must agree that the
>>>> "-1G" does work as the documents say, but it sure as hell is misleading.
>>>>
>>>> As I suspect most did, I read (past tense) "-1G" as "return files less
>>>> than 1GB in size" (and I've been in the business a LONG time).  However,
>>>> the docs DO say that the "G" bit means "use gigabyte blocks", so only
>>>> zero-length files fit that criteria and would be displayed (even a
>>>> 1-byte file uses part of that first 1G block).
>>>>
>>>> With all that being said, it is bloody misleading.  It'd be nice if the
>>>> maintainers could offer some way to do the inferred (by most)
>>>> behavior.  Perhaps "-1Gc" (less than 1 gigacharacters).  As it stands,
>>>> you'd need to use "-1099511627776c" to get the inferred behavior and
>>>> that's a right pain.
>>> No, find -size 1G
>>> will do what you want.
>>
>> Have you read the rest of this thread? Your interpretation of what the
>> OP wants is not what he says he wants, which in turn is not what "-size
>> -1G" actually does.
>>
>> poc
>>
>
> I rfead the whole thread. And I agree that find -size -!G does not do
> what he wants but find -size 1G
> does. Try it and you will see.

In a hopeless pedantic vein, the result differs from what was originally
sought if the file size is exactly 1G.

-- 
Bob Nichols     "NOSPAM" is really part of my email address.
                 Do NOT delete it.

-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux