- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- file changes after cp
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
03-26-2003 06:23 AM
03-26-2003 06:23 AM
file changes after cp
Original file:
# ll prestg_extra_08012002.dat
-rw-r----- 1 orionadm orion 2692865136 Mar 13 09:55 prestg_extra_08012002.dat
# wc -c prestg_extra_08012002.dat
2692865136 prestg_extra_08012002.dat
# wc -m prestg_extra_08012002.dat
2692865136 prestg_extra_08012002.dat
# wc -l prestg_extra_08012002.dat
3634096 prestg_extra_08012002.dat
copy:
# cp prestg_extra_08012002.dat tmp.dat
# ll tmp.dat
-rw-r----- 1 root sys 2692865136 Mar 26 09:01 tmp.dat
# wc -l tmp.dat
88 tmp.dat
# wc -c tmp.dat
65536 tmp.dat
# wc -m tmp.dat
65536 tmp.dat
Any ideas what's happening, and how to resolve it? Is this standard behavior for cp?
Is it the nature of the file itself?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2003 06:28 AM
03-26-2003 06:28 AM
Re: file changes after cp
You can not copy a dabase with it open as it will error on the open blocks.
Now, I have seen minor changes in file sizes when being copied from large block file systems to small blocks. I.E. In FEA I use 8K blocks for scratch, most of the time these files reduce in size when being copied to a 1/2K block file system.
But.. the binary contents will not change unless there is one of the 2 issues I mentioned going on.
Regards,
Shannon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2003 06:28 AM
03-26-2003 06:28 AM
Re: file changes after cp
Does the destination File System support files bigger than 2 GB ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2003 06:30 AM
03-26-2003 06:30 AM
Re: file changes after cp
Another way to verify the integrity of the file is to use "cksum". For example:
# cksum file.original
# cksum file.copied
You should obtain the same outputs if the original and the copy are identical.
Hai
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2003 06:32 AM
03-26-2003 06:32 AM
Re: file changes after cp
Copying an open database(mentioned above)
Copying a 2.6 Gig file to a filesystem that is not enabled with largefiles. To rebuild newfs -F vxfs -o largefiles In HP-Ux below 11.11, you'll need a largefiles entry in the /etc/fstab file which automounts filesystems at system start.
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
03-26-2003 06:34 AM
03-26-2003 06:34 AM
Re: file changes after cp
1) It's not a database. It's a flat file. It wasn't open by any process when copied.
2) note the original post. I made a copy in the same directory. If largefiles wasn't enabled, the source file couldn't be that large.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2003 06:44 AM
03-26-2003 06:44 AM
Re: file changes after cp
cd /destination
fbackup -i /tmp/source -f - | frecover -x -X -f -
Note the dashes "-".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2003 07:02 AM
03-26-2003 07:02 AM
Re: file changes after cp
Never seen that ... Perhaps I would check the filesystem using fsck and try again. You should also rather use cksum to check files, but wc should also work, at least -c option.
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2003 01:23 AM
03-28-2003 01:23 AM
Re: file changes after cp
Also do a du(1) on the original and copy and compare/post the results.
You mentioned what the file is not (a database file), but not what it is. What kind of file/data is it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2003 05:33 AM
03-28-2003 05:33 AM