Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Duplicates in file

Status
Not open for further replies.

mrcuser

Technical User
Aug 26, 2008
22
0
0
GB
Hi!

I have 2 files,that contain a list of volumes:

1st has volumes in filesystem that are readable
2nd has volumes in the filesytem it think are unavailable

First file is called readable
Second file is called unavailable

is there a command that does the opposite of diff to pick out any duplication in both files ?
 
[tt]uniq -d /path/to/file[/tt]

prints duplicated lines in one file

[tt]comm -3 /path/to/file1 /path/to/file2[/tt]

prints lines that appear in both files


HTH,

p5wizard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top