largest file in a directory tree - Printable Version +- Linux-Noob Forums (https://www.linux-noob.com/forums) +-- Forum: Linux Noob (https://www.linux-noob.com/forums/forum-3.html) +--- Forum: Tips and Tricks (https://www.linux-noob.com/forums/forum-59.html) +---- Forum: Filesystem Management (https://www.linux-noob.com/forums/forum-26.html) +---- Thread: largest file in a directory tree (/thread-3737.html) |
largest file in a directory tree - hijinks - 2004-01-15 So you did a df and noticed that /var was full or you just want to find what the biggest file in the directory tree is. Well run this command and it'll show you. Code: ls -lsR | sort -n That will sort all of the files and place the largest files at the end. largest file in a directory tree - gamekeeper - 2004-01-16 Neat :P largest file in a directory tree - anyweb - 2004-01-27 also du -ch --max-depth 2 / try that largest file in a directory tree - shigawire - 2004-07-12 find is your friend... ;) Code: #!/bin/bash hijinks tip could be substituted for the "xargs ls -l" portion to improve the listing & sort. -HTH |