How to do scripts and other command line tasks
Ubuntu Linux has a rich set of commands for manipulating and accessing files. The du utility gives information on disk usage, and the sort utility can sort the results. Finally, we can run those results through the head command, which gives you the top 10 lines outputted through any other command. We’ll chain the commands together to get the output that we want.
If you have an unwieldy text file that you are trying to process, splitting it in sections can sometimes help processing time, especially if we were going to import a file into a spreadsheet. Or you might want to just retrieve a particular set of lines from a file.