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]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux