|
CentOS Linux Server Guide |
Displaying unique file contents in CentOS Linux |
|||||||||||||||
Uniq command is used to eliminate duplicated lines in a file.
Command and Options: uniq [options] filename
Option:
Examples:
The the following example will remove any duplicate lines in mail.log
The following example will remove any duplicate lines of A.log and redirect the output (save) to B.log
The following example will count and display the number of times of A.log duplication
The following example will sort the field 2 to filed 10 of A.log
The following example, the sort command will merge the files of A.log and C.log by sorting them together
|
|||||||||||||||
|
Copyright 2011 http://www.1a-centosserver.com All Rights Reserved All trademarks are the property of their respective owners. Contact Us | Terms of Use | Privacy Policy |