List and execute UNIX command to display the sizes of the six largest files in the current directory listed in ascending order of their size?

1 answer

Answer

1139137

2026-03-02 23:50

+ Follow

There are several ways to do this (typical Unix ...).

you could execute the following command:

du | sort -n | tail -6

The 'du' command lists disk usage by listing a file name and size per line, then use the sort command to list numerically, and the last 6 will be the 6 largest.

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.