- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Split files using tar
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
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
тАО02-26-2004 08:36 PM
тАО02-26-2004 08:36 PM
-Karthik S S
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2004 08:43 PM
тАО02-26-2004 08:43 PM
Re: Split files using tar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2004 08:44 PM
тАО02-26-2004 08:44 PM
Re: Split files using tar
Or "csplit"
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2004 08:45 PM
тАО02-26-2004 08:45 PM
Re: Split files using tar
tar xvf then split.
sks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2004 08:46 PM
тАО02-26-2004 08:46 PM
Re: Split files using tar
(I haven't tried this, but it should work).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2004 08:54 PM
тАО02-26-2004 08:54 PM
Re: Split files using tar
ex
tar xvf xxx.tar | split -b...
split recognizes the following command-line options and arguments:
-l line_count The input file is split into pieces line_count
lines in size.
-a suffix_length
suffix_length letters are used to form the suffix
of the output filenames. This option allows
creation of more than 676 output files. The
output file names created cannot exceed the
maximum file name length allowed in the directory
containing the files.
-b n The input file is split into pieces n bytes in
size.
-b nk The input file is split into pieces n x 1024 bytes
in size. No space separates the n from the k.
-b nm The input file is split into pieces n x 1048576
bytes in size. No space separates the n from the
m.
-n The input file is split into pieces n lines in
size. This option is obsolescent and is
equivalent to using the -l line_count option.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2004 08:58 PM
тАО02-26-2004 08:58 PM
Re: Split files using tar
tar cf -
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2004 09:07 PM
тАО02-26-2004 09:07 PM
SolutionThe ideas are the same. You can tar and gzip the file. Then use split to split the files in whatever sizes you want.
split -b
split -10m temp.tar.gz myfiles
This will create myfilesxa to myfilesx*.
You can regroup them using cat
cat myfilesxa myfilesxb myfilesxc >temp.tar.gz
HTH
Umapathy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2004 09:10 PM
тАО02-26-2004 09:10 PM
Re: Split files using tar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2004 09:12 PM
тАО02-26-2004 09:12 PM
Re: Split files using tar
Thanks .. I tried the following,
csplit -k hi.tar 70000 '{69999}'
(creates 4 files xx0*)
compare the size (doesn't match)
root@fep1:/depot/tartest>du -sk hi.tar xx0*
34660 hi.tar
6426 xx00
8526 xx01
9750 xx02
1374 xx03
root@fep1:/depot/tartest>bc
6426+8526+9750+1374
26076
quit
Am I missing something? Do I have to club these files using cat??
-Karthik S S
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2004 09:14 PM
тАО02-26-2004 09:14 PM
Re: Split files using tar
Thanks,
Karthik S S