- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Compare to directory structures
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
06-11-2004 08:22 AM
06-11-2004 08:22 AM
Compare to directory structures
Im have a permission problem on one of the machines and the directories and files are quit extensive.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2004 08:26 AM
06-11-2004 08:26 AM
Re: Compare to directory structures
machine 1
dir *. > mach1
machine 2
dir *. > mach2
ftp, scp whatever
diff the two files
dir is an alias for us that does an ll -d
If its a paticular file, then use ll -R instead of dir
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
06-11-2004 08:27 AM
06-11-2004 08:27 AM
Re: Compare to directory structures
find /dir1 -type d -exec ls -ald {} \; > /tmp/dir1
find /dir2 -type d -exec ls -ald {} \; > /tmp/dir2
then do a:
diff /tmp/dir1 /tmp/dir2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2004 08:35 AM
06-11-2004 08:35 AM
Re: Compare to directory structures
eg: for files starting with abc* and permissions 644
# find . -name "abc*" -a -perm 0644 -exec ls -l {} \; > /tmp/a1
or for files owned by abc and permissions 600,
# find . -owner abc -a -perm 0644 -exec ls -l {} \; > /tmp/a1
Then comapre the outputs from both machines by sdiff.
to help the sdiff, just filter out the filelds with differences and probable do a sort before doing an sdiff.
HTH,
Abdul.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2004 09:34 AM
06-11-2004 09:34 AM
Re: Compare to directory structures
http://hpux.cs.utah.edu/hppd/hpux/Users/els-1.48a/
This provides an extended ls utility which is easier to use with scripts.
Then do a list on the first directory-
cd /first/directory
/opt/els/bin/els -R +f':' +TI +G"F':1:'PUGsm" >/tmp/l1
Then do a list on the second-
cd /first/directory
/opt/els/bin/els -R +f':' +TI +G"F':2:'PUGsm" >/tmp/l2
Then run both through sort and uniq-
sort /tmp/l1 /tmp/l2 | sort -u >/tmp/notsame
The sort/uniq combination will filter out those files that are the same between the 2 directorites. What is left are files that exist in only one of the directories and files whose permission/uid/gid/size aren't the same.
HTH
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2004 10:01 AM
06-11-2004 10:01 AM
Re: Compare to directory structures
Should have been-
sort /tmp/l1 /tmp/l2 | uniq -u >/tmp/notsame
-- Rod Hills