- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- diff on directories
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2002 04:16 PM
07-11-2002 04:16 PM
are different than our production binaries.
I am trying to do a
diff -r dir1 dir2
I get some output, but, when it hits the binaries I get binary garbage sent to the
screen.
What is the best way to compare two directories
recursively??
I want to see a list of the names of the files that are different
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2002 04:29 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2002 04:33 PM
07-11-2002 04:33 PM
Re: diff on directories
cd dir1
for i in `ls -R`
do
rv=`cmp -s $i ../dir2/$i`
if [ $rv -ne 0 ]; then
echo $i differs from ../dir2/$i
fi
done
This assumes that the two directories are in the same parent directory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2002 04:36 PM
07-11-2002 04:36 PM
Re: diff on directories
Sorry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2002 04:54 AM
07-12-2002 04:54 AM
Re: diff on directories
Run the "dircmp -s dir1 dir2 > file"
Then vi the file.
The -s supresses listings where the files are the same.
A -d will give diff listings for every file that's different.
I use this to see if somebody changed code in a file buried in a directory structure.
After I have the file, I vi it, then run:
:g/^$/de
...to get rid of all the freakin empty lines.
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2002 05:06 AM
07-12-2002 05:06 AM
Re: diff on directories
Usually development machines do have different versions of the code, compare to what is in production, thats why you should have a "test" machine. And that's why you should have source code control and release install management.
If your developer made this statement, then make them prove it. If someone told me that they think I have a nail in my car tires, I'm not going to take it to the garage and have every tire examined, I'd want that person to prove it to me first.
live free or die
harry