- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Diff command
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
Discussions
Discussions
Forums
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
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
тАО01-21-2009 10:05 PM
тАО01-21-2009 10:05 PM
Diff command
Can we use diff command to differentiate files on two servers.
Thanks
SKR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-21-2009 10:19 PM
тАО01-21-2009 10:19 PM
Re: Diff command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-21-2009 10:25 PM
тАО01-21-2009 10:25 PM
Re: Diff command
Can you give me one line script which will cat the file from other server with doing ssh/rmesh/rsh and can be diff with file present on current server.
Thanks
SKR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-21-2009 10:50 PM
тАО01-21-2009 10:50 PM
Re: Diff command
1) rcp xyz:/tmp/abc /tmp/abc.xyz
2) diff /tmp/abc /tmp/abc.xyz
Once done, you could delete the 'abc.xyz' file from the local machine.
This is one way. If you can NFS mount this directory from the other server, then you can directly do:
# diff /tmp/abc /mntpoint-of-server-dir/abc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-21-2009 11:09 PM
тАО01-21-2009 11:09 PM
Re: Diff command
Ah, right you can do that:
remsh remote -n "cat remote-file-path" | diff - local-file-path
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-22-2009 03:48 AM
тАО01-22-2009 03:48 AM
Re: Diff command
Still i am not able to diff these files.
I am able to cat the file, but diff is not working.
Thanks
SKR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-22-2009 04:08 AM
тАО01-22-2009 04:08 AM
Re: Diff command
I have always used diff in one of two ways:
1) took a copy of the files and ran it local
2) Established an nfs connection.
Note that you can not use diff successfully on binary files
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-22-2009 04:11 AM
тАО01-22-2009 04:11 AM
Re: Diff command
I assume you can do:
remsh remote -n "cat remote-file-path" | more
What command did you use? What do you mean "not working"? I hope you kept that "-" I had.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-22-2009 04:14 AM
тАО01-22-2009 04:14 AM
Re: Diff command
If you consider "success" as an exact match or just knowing the files are different, you can.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-22-2009 04:18 AM
тАО01-22-2009 04:18 AM
Re: Diff command
diff file1 file2
is the command.
Thanks,
Kapil+