Dave's Brain

Browse - Computer Tips - How I can I find the largest file in a directory?

Date: 2012oct25
OS: Linux, cygwin
Keywords: biggest, smallest, space

Q.  How I can I find the largest file in a directory?

A.  Show the top ten files in the current folder by size:

ls -Sl | head
The -S option for ls sorts by size.

Add a comment

Sign in to add a comment
Copyright © 2008-2017, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.