Operating System - HP-UX
1752815 Members
5827 Online
108789 Solutions
New Discussion юеВ

Re: difference between to directories

 
SOLVED
Go to solution
mckiers
Occasional Advisor

difference between to directories

I am trying to determine the missing files between two restores of the same directory.
I have restored the directory to 2 different locations and want to find the files that are different.
6 REPLIES 6
Patrick Wallek
Honored Contributor
Solution

Re: difference between to directories

Have a look at the dircmp command. 'man dircmp' for details.

# dircmp dir1 dir2
Jean-Luc Oudart
Honored Contributor

Re: difference between to directories

go to dir1
ll > /tmp/dir1.out
go to dir2
ll > /tmp/dir2.out

diff -bw /tmp/dir?.out

Regards,
Jean-Luc
fiat lux
RAC_1
Honored Contributor

Re: difference between to directories

diff dir1 dir 2 will give you details.

You cam also just list the files in dir1 put it in a file and list files in dir2, put it another file and then compare the files with comm command.

Check man pages for diff and comm.
There is no substitute to HARDWORK
Geoff Wild
Honored Contributor

Re: difference between to directories

Yes:

dircmp -s

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
mckiers
Occasional Advisor

Re: difference between to directories

Thanks guys for the quick response.
D.Blond
Frequent Advisor

Re: difference between to directories

Hello,
yes for Jean_Luc but sort the files ".out"
D.Blond