Tag: sort

Sort by Line Length

Sort file by line length. Original Article… cat /etc/passwd | awk ‘{print length, 0}’ | sort -n | awk ‘{1=””;…

Find Duplicate Lines

Sort contents of two files by viewing only duplicate line sort file1 file2 | uniq -d

Sort and Unique

Sort contents of a file and remove repeated lines sort file.txt | uniq

Command to Sort Files by Size

Show size of the files and directories sorted by size du -sk * | sort -rn

Sort a File

A Linux command to sort the contests of a file sort file.ext [tags][/tags]