Re: How to search for large files >1Gigabyte via command line

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

 



On 15Aug2012 07:24, NOSpaze <nospaze@xxxxxxxxx> wrote:
| On Mon, 2012-08-13 at 20:41 +0100, Aaron Gray wrote:
| > On 13 August 2012 19:53, Jack Craig <jack.craig.aptos@xxxxxxxxx> wrote:
| >     du -ahx * | sort -rh | head -30
| 
| Kinda same approach with find, just for files...
| 
| find . -type f -print0 | xargs -0 du -h | sort -hr | head -30

Using "du" on a file is overkill. (Unless you have a lot of sparse files
in play, uncommon.)

Try:

  find . -type f -ls | sort -rn -k 7 | sed 30q

"head" is for the weak!

Note: sort's "-h" option (needed for du's -h output) is a GNU-specific
and _recent_ addition to GNU sort. Not very portable - your scripts will
break on many platforms.

Cheers,
-- 
Cameron Simpson <cs@xxxxxxxxxx>

I have seen all the works that are done under the sun;
and, behold, all is vanity and vexation of spirit.
-- 
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
Have a question? Ask away: http://ask.fedoraproject.org


[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux