- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- how to divide big file into several small files?
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
02-08-2003 10:55 PM
02-08-2003 10:55 PM
how to divide big file into several small files?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2003 11:11 PM
02-08-2003 11:11 PM
Re: how to divide big file into several small files?
Go through the man pages of "tail".
Use this command to take the respected lines of the logfile. Like use
tail -100
Or use sed to save the lines to some file
sed '100q' logfile >log1
or
sed -n 20,50p logfile >log2
prints 50 lines after 20th line to a file.
Cheers
Rajeev
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2003 12:53 AM
02-09-2003 12:53 AM
Re: how to divide big file into several small files?
You can use split take a look at the man page.
Robert-Jan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2003 06:16 AM
02-09-2003 06:16 AM
Re: how to divide big file into several small files?
If you want to view it without breaking it up, try the "more" command. You can search for things with "more" also - such as dates or times in the log:
more logfile
then type:
/Jan 6
and it will jump to where "Jan 6" appears first in the file. The spacebar will move ahead one page.
Type "man more" for more information.
Good luck,
Vince
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2003 08:15 AM
02-09-2003 08:15 AM
Re: how to divide big file into several small files?
In trimming any logfile, you need to look at example contents to determine what is important to save, A logfile trimmer script might scan for certain keywords, extract those entries into an archive and then zero the file length. Or a trimmer might copy the file weekly (daily?) into a series of files and use compress to save space. As the admin, you need to determine how long too keep the files. I prefer to keep a quantity (5 or 10) and trim the logfiles only when they exceed a certain size, say 1 to 5 megs.
For verbose logs that have a lot of generally useless info, scanning and saving the important messages makes more sense. Here's a quick line that works well for syslog.log:
grep -i -e err -e warn -e fail -e alert -e fatal -e crit /var/adm/syslog/syslog.log
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2003 08:38 PM
02-10-2003 08:38 PM
Re: how to divide big file into several small files?
Using split command you can split the files,
example:
split -b nk
split command split into pieces n*1024 bytes in sizes.
See the man page of split.
Regards
Kvs Raju
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2003 11:11 PM
02-10-2003 11:11 PM
Re: how to divide big file into several small files?
Regards,
Trond
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2003 02:34 AM
02-11-2003 02:34 AM
Re: how to divide big file into several small files?
tail is usefull for real-time tracing, but don't use it with big files, as it has buffer limited to 20kB only.
Split will create you a copy of everything in several files. If you want only interesting part (from byte no. to byte no.) you can use dd.
Good luck
Adam Markiewicz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2003 03:16 AM
02-11-2003 03:16 AM
Re: how to divide big file into several small files?
"So I can't open it with word"
unquote
Is this a Unix system?
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2003 03:20 AM
02-11-2003 03:20 AM
Re: how to divide big file into several small files?
"So I can't open it with word"
unquote
Is this a Unix system?
What I mean is: is this a Unix system that you're trying to deal with the log file on? If you're trying to do this from a Microsoft PC, it's going to be difficult. You need to log on to the HP system itself. The you can use tail and split and all the other suggestions above.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2003 07:17 AM
02-11-2003 07:17 AM
Re: how to divide big file into several small files?
You will probably have to adapt the script to your own format. Its set up to grep the log file by date. I don't know how domino sets up its log file(s), but at the very minimum, you can adapt the script for your own use.
For example: this morning in my in box I got the filtered system log from the NTP server. This recorded almost 13,000 entries yesterday--most of them NTP entries, but a few FTP entries as well. The filtering process removed 12,967 entries, leaving only about 30 lines to look at.
At the end, it emails the results of the filtering process to me and to others.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2003 07:40 AM
02-11-2003 07:40 AM
Re: how to divide big file into several small files?
The split command will be useful for you, pls check "man split" to a get a lot of options about. Also sed command will be a possiblity:
sed -n "
Rgds.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2003 07:49 AM
02-11-2003 07:49 AM
Re: how to divide big file into several small files?
split splits the file in to half or as per the lines specified.
Manoj Srivastava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2003 08:02 AM
02-11-2003 08:02 AM