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

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

 



On Sat, 2010-03-27 at 15:34 -0500, Aaron Konstam wrote:
> > I think it's clear that he wants to find files of under 1Gb. That is
> not
> > what "find -size 1G" does. It gives a list of all files with
> non-zero
> > size, which is not the same thing.
> > 
> > poc
> > 
> 
> Ok, lets settle this. Do you know what you say to be true? Have you
> tested it on files larger than 1G? I have no files that big  so I
> can't test it.

I said nothing about files larger than 1G. My remarks were in relation
to files of non-zero size.

In any case, testing this is easy:

        $ mkdir tst
        $ cd tst
        $ touch a
        $ dd if=/dev/zero obs=1c count=1 of=b
        $ dd if=/dev/zero obs=1c count=1 seek=1073741824 of=c
        $ ls -l
        total 8
        -rw-rw-r-- 1 poc poc          0 2010-03-27 18:34 a
        -rw-rw-r-- 1 poc poc        512 2010-03-27 18:34 b
        -rw-rw-r-- 1 poc poc 1073742336 2010-03-27 18:34 c
        $ find tst -size -1G
        a
        $ find tst -size 1G
        b
        $ find tst -size +1G
        c

IOW, the "-size 1G" variant lists files of size greater than zero and not greater than 1G.

poc

-- 
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