head command

I have a large number of files stored in ~/Downloads/ directory. How do I sort and print sizes in human readable format using du -h command under Ubuntu Linux LTS version 12.04 or any other Linux distributions?

{ 7 comments }

I type the following command:

ps -auxf | sort -nr -k 4 | head -10

And I get the output along with warning message:

Warning: bad syntax, perhaps a bogus ‘-’? See /usr/share/doc/procps-3.2.7/FAQ


How do I fix this problem?

{ 0 comments }

How do I find the largest top files and directories on a Linux or Unix like operating systems?

{ 33 comments }