- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Compare two file system
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
тАО04-09-2009 02:08 AM
тАО04-09-2009 02:08 AM
Compare two file system
I want to compare two file system and identify the file incomplete transfered by size on destination directory. then remove those incomplete transferd files.
Regards
Pranav Pachchigar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-09-2009 03:49 AM
тАО04-09-2009 03:49 AM
Re: Compare two file system
Please make yur issue a bit more clear.
> I want to compare two file system
What I understand is, you have copied the file sys to another place and now want to compare (by size) whether every file is copied properly or not?
If this is the case, I have one way you can try:
# du -kx /abc_source/* > file1
# du -kx /abc_dest/* > file2
# cmp file1 file2
file1 and file2 contain size of every file in the file system and so they can be very long depending upon the file system size.
Well, there may better ways also. Keep searching for them if this does not serve you.
Regds,
R.K.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-09-2009 04:05 AM
тАО04-09-2009 04:05 AM
Re: Compare two file system
Using size as a criteria to determine a successful transfer is potentially misleading. How you measure the size matters too.
If you are FTP'ing text files between a UNIX platform and a Windows one (for example), a carriage-return will be added to the newline line delimiters.
If you use 'cp' (for example) to copy a sparse file, then the file is "inflated". Utilities like 'pax' can retain the sparseness.
Directories are often larger on the source side of a copy than on the destination side. This is because once blocks are allocated to a directory's space they are not removed (but rather are left free) pending reuse of the space.
You might want to consider using 'diff' to compare files and directories along with a checksum calculation like 'cksum' or 'md5sum', for example if you want to be rigouous.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-09-2009 04:13 AM
тАО04-09-2009 04:13 AM
Re: Compare two file system
rsync can be used to test what is different with the dry run mode:
rsync -v -a -n -H sourcedir targetdir
sourcedir or targetdir can be nfs mounted
Note that rsync can also be used in a clients erver mode ..
I always use now rsync to do sync beetween two folders, even very large folder >100GB, it works well and it has big performance
patrick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-09-2009 04:48 AM
тАО04-09-2009 04:48 AM
Re: Compare two file system
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-09-2009 05:34 AM
тАО04-09-2009 05:34 AM
Re: Compare two file system
Let me clear.
i have HP unix 11.23, doing ftp from one sever to other unix server. My problem is that during ftp syncronizing due to network problem some files are not transfered completely,
e.g my source dir has file with 50mb but on destination it is transfered to 20mb (incompletely) transfered.
Now i want to identifiy those file with size mismatch at destination directory and remove those files so my ftp software will retransfer files from source to destination.
i tried rsync but not running in HP Unix
pl suggest what to
Thanks
pranav pachchigar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-09-2009 06:14 AM
тАО04-09-2009 06:14 AM
Re: Compare two file system
you can download it from HP Softawre depot
It's a free software
Why not restarting the ftp, for 50MB it will take very low times to achieve ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-09-2009 07:49 PM
тАО04-09-2009 07:49 PM
Re: Compare two file system
You could do a find on each and then use ll to get the lengths:
find . -type f -exec ll {} + | awk '{print $9, $5}' | sort > system_X.sort
Then use comm:
comm -13 system_src.sort system_des.sort
This will give a list of files that are different sizes OR aren't on the source machine.