roberto wrote:
hello i use the "df -h" or "du -h"command to check how much disk space is occupied by files and directories but is it possible to sort the output list in an order such that the first (or conversely the last) item is the largest in size ? thank you
Unfortunately, df will often produce 2 lines of output for a single filesystem if the name is too long. Here's a pipeline that seems to handle that to produce decent output:df | sed 1q; df | sed -n -e 1d -e '/^ /{H; s/.*//g; x; s/\n//; p; n}; x; p; ${x; p}' | column -t | sort -n -r -k 2