How to use 'sort'
The main utility for sorting lines of text files is
sort. In this tutorial you will learn all the posibilities of this command.
sort you can specify a file or, more commonly, pipe the output of another command.
ls | sort
-n: numeric sort.
-r: reverse the sorting.
-h: sort human-readable numbers like
-u: show only the first instance of every value (not the repeated ones).
-k <start,stop>: sort by a column. This parameter allows specifying the ordering type for the start and stop position (see man page).
# sort files by size ls -l | sort -k 5,5 -nr
-t '<character>': specify a field separator.
sort -t ',' -k 2,2 -nr test.csv
In Debian/Ubuntu systems, you can use
dpkg-reconfigureto reconfigure an installed package using intuitive dialogs. I will show you how to use this command to change some system settings.
If you have a scanned PDF and you want to be able to search and copy text from it, in this tutorial I will show you how to do it.
If you want to do X11 forwarding from your container to your host, you can type these simple commands.
If you don’t have a Graphical User Interface (GUI) on your Linux device, or you need a simple text-based web browser, I will show you a couple of great programs.
A comprehensive list of Linux-related websites sorted by categories.