Posts Tagged With: sort

Sort by Line Length

Tagged with: , , , , ,

Sort file by line length. Original Article…


cat /etc/passwd | awk '{print length, $0}' | sort -n | awk '{$1=""; print $0 }'
1 Comment »

Find Duplicate Lines

Tagged with: , , , , ,

Sort contents of two files by viewing only duplicate line


sort file1 file2 | uniq -d
1 Comment »

Sort and Unique

Tagged with: , , , , , ,

Sort contents of a file and remove repeated lines


sort file.txt | uniq
1 Comment »

Command to Sort Files by Size

Tagged with: , , , , ,

Show size of the files and directories sorted by size


du -sk * | sort -rn
No Comments »

Sort a File

Tagged with: , , , , ,

A Linux command to sort the contests of a file


sort file.ext

[tags][/tags]

No Comments »