A Linux Hosting India administrator use a number highly useful commands to execute the file listing processes. Most of the hosting professionals use ‘uniq’ command to perform specific file functions. Find below the syntax of this command.
- uniq: Used to print the file by removing duplicate adjacent lines.
- uniq –u filename –unique : Prints the only unique lines
- uniq –d filename –repeated : Prints the only duplicate lines
- uniq –c filename –count : Prints the number of times each line occurred
Syntax: uniq filename
Ex: $ uniq file

