- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: remote diffs (running diff on remote directori...
Operating System - HP-UX
1824976
Members
3647
Online
109678
Solutions
Forums
Categories
Company
Local Language
юдл
back
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
Forums
Discussions
юдл
back
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
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
тАО06-04-2001 12:52 PM
тАО06-04-2001 12:52 PM
remote diffs (running diff on remote directories)
Hi
I was woundering if there was a way to run diff against a local and remote directory. I thought about nfs mounting the remote file system but the network link speed we have is less than that supported by HP-UX (according to the documentation). Ideally I thought maybe there was a command similar to rcp where you could specify the hostname:/path
e.g. diff remote_host:/path/to/check local_host:/path/to/check
Is there such a beast?
Regards
David
I was woundering if there was a way to run diff against a local and remote directory. I thought about nfs mounting the remote file system but the network link speed we have is less than that supported by HP-UX (according to the documentation). Ideally I thought maybe there was a command similar to rcp where you could specify the hostname:/path
e.g. diff remote_host:/path/to/check local_host:/path/to/check
Is there such a beast?
Regards
David
hmmmmm.........
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-04-2001 01:07 PM
тАО06-04-2001 01:07 PM
Re: remote diffs (running diff on remote directories)
Hi David,
No diff w/o NFS will not do this but if all you want to know is are the two files different
there is a way - use cksum or sum.
e.g.
REMOTE_HOST=elvis
FILES="/tmp/myfile1 /tmp/myfile2"
for X in ${FILES}
do
LOCAL=`cksum ${X}`
REM=`remsh ${REMOTE_HOST} cksum ${X}`
if [ "${LOCAL}" != "${REM}" ]
then
echo "File ${X} different"
fi
done
BTW - I have run NFS over slow links.
Regards, Clay
No diff w/o NFS will not do this but if all you want to know is are the two files different
there is a way - use cksum or sum.
e.g.
REMOTE_HOST=elvis
FILES="/tmp/myfile1 /tmp/myfile2"
for X in ${FILES}
do
LOCAL=`cksum ${X}`
REM=`remsh ${REMOTE_HOST} cksum ${X}`
if [ "${LOCAL}" != "${REM}" ]
then
echo "File ${X} different"
fi
done
BTW - I have run NFS over slow links.
Regards, Clay
If it ain't broke, I can fix that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-04-2001 03:04 PM
тАО06-04-2001 03:04 PM
Re: remote diffs (running diff on remote directories)
Thanks for the prompt answer Clay.
In my case your approach is certainly do-able but there are a large number of files and directories under a particular root dir that I want to compare. That's where the recursive feature of "diff" would come in handy 8-)
Any other suggestions?
David
In my case your approach is certainly do-able but there are a large number of files and directories under a particular root dir that I want to compare. That's where the recursive feature of "diff" would come in handy 8-)
Any other suggestions?
David
hmmmmm.........
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-05-2001 11:26 AM
тАО06-05-2001 11:26 AM
Re: remote diffs (running diff on remote directories)
Whay don't you just expand Clay's idea and built the recursion yourself?
$local_dir=LOCALDIR
$remote_dir=REMOTEDIR
$remote_sys=REMOTESYSTEM
find $local_dir | xargs -i cksum {} > local.out
remsh $remote_sys "find $remote_dir | xargs -i cksum {}" > remote.out
diff local.out remote.out
Good luck,
Ovidiu
$local_dir=LOCALDIR
$remote_dir=REMOTEDIR
$remote_sys=REMOTESYSTEM
find $local_dir | xargs -i cksum {} > local.out
remsh $remote_sys "find $remote_dir | xargs -i cksum {}" > remote.out
diff local.out remote.out
Good luck,
Ovidiu
Simple solutions to complex problems
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP