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?

{ 12 comments }

I have a directory with many files. I am trying to write a shell script that will only show first 10 or 20 lines of a file. How do I display first 10 or 20 lines of a file on Linux or Unix-like systems?

{ 0 comments }

How do I display first line of a text file called foo.txt on Linux or Unix-like operating systems?

{ 0 comments }

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

{ 44 comments }