Working with Data Files
When you have a large amount of data, handling the information and making it useful can be difficult. As you saw with the du
command in the previous section, it's easy to get data overload when working with system commands.
The Linux system provides several command line tools to help you manage large amounts of data. This section covers the basic commands that every system administrator — as well as any everyday Linux user — should know how to use to make their lives easier.
Sorting data
The sort
command is a popular function that comes in handy when working with large amounts of data. The sort
command does what it says: It sorts data.
By default, the sort
command sorts the data lines in a text file using standard sorting rules for the language you specify as the default for the session.
$ cat file1
one
two
three
four
five
$ sort file1
five
four
one
three
two
$
It's pretty simple, but things aren't always as easy as they...