- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: File copy
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
08-28-2001 11:46 PM
08-28-2001 11:46 PM
File copy
EG : File a --> Copy 65% of a to give File b
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2001 11:57 PM
08-28-2001 11:57 PM
Re: File copy
I assume you mean text files - which section of the file do you want to copy, e,g, the first 65% or the last 65%?
Rgds, Robin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2001 12:03 AM
08-29-2001 12:03 AM
Re: File copy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2001 12:03 AM
08-29-2001 12:03 AM
Re: File copy
head -c -n xyz a > b
to copy the last xyz bytes from a to b use
tail - c xyz a > b
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2001 12:07 AM
08-29-2001 12:07 AM
Re: File copy
see man split
Regards
Rainer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2001 12:07 AM
08-29-2001 12:07 AM
Re: File copy
OK - have a look at the split command - you can tell it how many ways to split, or how big each output file should be.
The problem with tail is that it's not good at handling a large tail of a big file.
Rgds, Robin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2001 12:27 AM
08-29-2001 12:27 AM
Re: File copy
there is also th command csplit which allows you to use searchpatterns. So you could use for example a specific date or time in a logfile as the splitposition.
Have a look at man csplit.
Hope this helps.
Regards Stefan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2001 12:18 PM
08-29-2001 12:18 PM
Re: File copy
Manoj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2001 04:37 AM
08-30-2001 04:37 AM
Re: File copy
echo `ls -l fileA`"\nx x x x .65" | tr -s " " " " | cut -d" " -f 5 | xargs echo | sed "s/ / \* /g" | bc | cut -d"." -f1 | sed "s/$/ \/ 512 /" | bc | sed "s:^:dd if=fileA of=fileB count=:"|sh
replace the .65 with whatever percent you want.