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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

file comparison 1

Status
Not open for further replies.

dwcasey

MIS
Oct 31, 2002
179
US
I am trying to look at files in a directory and compare that list of files with a list I have in file.

So compare ls -1 output with a file called allfiles.lst and tell me if any are missing from the ls -1 listing. I just run ls -1 > current then compare current with allfiles.lst.

I've tried grep -f , but it tells me what does match.

Diff's output is a bit awkward to work with since they may not always match in the same order.

Sdiff is better, but I'm having a problem understanding it's output.
 
man sort
man comm

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
tripwire works well to tell you if something's changed in a directory.
 
man sdiff

Mike

"Whenever I dwell for any length of time on my own shortcomings, they gradually begin to seem mild, harmless, rather engaging little things, not at all like the staring defects in other people's characters."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top