Back to Blog
Arnošt Havelka

SORT - Order Data

Sort lines of text files.

Start Interactive Lesson
SORT - Order Data

The sort command allows you to arrange lines of text in a specific order.

Basic Sorting

By default, sort orders lines alphabetically.

Try the command

Try sorting a file!

Build the command
sort-r
sortSort alphabetically
-rReverse sort order
Terminal
C:\Users\User>sort -r

References

These documentation links provide authoritative details for the commands used in this article.

Up Next

SORT - Unique Lines

Sort and remove duplicates.