- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How can I copy a sparse file ?
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
09-07-2004 09:29 PM
09-07-2004 09:29 PM
How can I copy a sparse file ?
I can create a sparse file. But when this sparse file is copied (cp command), the new file is not a sparse file.
How can I copy a sparse file so that new file be a sparse file too ?
Thanx in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2004 09:32 PM
09-07-2004 09:32 PM
Re: How can I copy a sparse file ?
usually i use "dd" to copy oracle datafiles, that are sparse files. I never had problems.
HTH,
Massimo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2004 10:10 PM
09-07-2004 10:10 PM
Re: How can I copy a sparse file ?
# echo A > f1
# dd if=f1 of=f2 bs=1024 seek=1024
0+1 records in
0+1 records out
# ll f?
-rw-r----- 1 root sys 2 Sep 8 12:07 f1
-rw-r----- 1 root sys 1048578 Sep 8 12:08 f2
# du -skx f?
1 f1
1 f2
# dd if=f2 of=f3
2048+1 records in
2048+1 records out
# ll f?
-rw-r----- 1 root sys 2 Sep 8 12:07 f1
-rw-r----- 1 root sys 1048578 Sep 8 12:08 f2
-rw-r----- 1 root sys 1048578 Sep 8 12:08 f3
# du -skx f?
1 f1
1 f2
1025 f3
I need f3 ocuppies the same disk blocks as f2.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2004 10:32 PM
09-07-2004 10:32 PM
Re: How can I copy a sparse file ?
I think that you could try the GNU version of cpio, it supports sparse file handling...
http://hpux.connect.org.uk/hppd/hpux/Gnu/cpio-2.5/man.html
Massimo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2004 11:37 PM
09-07-2004 11:37 PM
Re: How can I copy a sparse file ?
dd is morethan sufficient.
instead of specifying dd if=f1 of=f2 bs=1024 seek=1024 this way use
#dd if=f1 of=f2
#ll
try like this
regards
SK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2004 11:45 PM
09-07-2004 11:45 PM
Re: How can I copy a sparse file ?
# prealloc 10MBfile 10485760
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2004 08:22 PM
09-08-2004 08:22 PM
Re: How can I copy a sparse file ?
I searched in google and found
http://publibn.boulder.ibm.com/doc_link/en_US/a_doc_lib/aixbman/admnconc/sparse_files_under.htm
This page says that "cp", "mv", "tar" and "cpio" cannot preserver sparse allocation of a file.
Nevertheless, "pax" can ...
I tested... it's fine !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2005 05:41 AM
11-28-2005 05:41 AM