I will assume you want to change the header but keep the rest of the 30 million lines. Since the new header has the same length, the following will open file for both reading and writing:
This will be very fast and replace the file in place. Be careful.
Hello,
Does changing a header in a shared library under Solaris (say adding a new class data member) will result in not only compiling that library but all of the libraries that depend on that lib that was changed because of the change in the object's size? What about adding a virtual function?... (0 Replies)
I have a log file that is about 1.2 million lines long and about 300MB.
we need a way to clean up this file and only keep the last few thousand lines.
if i use tail command we run our of memory as the file is too big.
I do have a key word to match on.
example, we want to keep every line... (8 Replies)
awk -F ";" '{if($10>80 && NR>1) print $0 }' txt_file_*
I am using this command to print the lines which has 10th field more then 80 and leaving the first line of the file which is the header.
But this is not working , the first line is is coming as output , please correct me .
thanks (2 Replies)
How can i tweak sendmail configuration files so that the "Received:" field is removed from email header information?
Or else can i change Received: (from enswitch@localhost) in email header to something likeReceived: (from xyz@localhost)?
---------- Post updated at 09:57 PM ---------- Previous... (2 Replies)
Hi,
I need a help in creating a report file.
The input file is like this
1 A
2 B
3 V
4 X
5 m
6 O
7 X
8 p
9 a
10 X
There is a header which i have to print & save the result as a output file.
The header has multiple lines on is like say:
New New
S.No Name (15 Replies)
Dear All,
I have two files both containing 10 Million records each separated by comma(csv fmt).
One file is input.txt other is status.txt.
Input.txt-> contains fields with one unique id field (primary key we can say)
Status.txt -> contains two fields only:1. unique id and 2. status
... (8 Replies)
these are numeric ids..
222932017099186177
222932014385467392
222932017371820032
222932017409556480
I have text file having 300 millions of line as shown above. I want to find duplicates from this file. Please suggest the quicker way..
sort | uniq -d will... (3 Replies)
HI ,
i have to print the first header of df -h (Filesystem Size Used Avail Use% Mounted on)and line which conatin size Network path only.
Filesystem Size Used Avail Use% Mounted on
/test/sda3 35G 1.8G 32G 6% /
/test/sda10 7.8G 1.1G ... (3 Replies)
I've been struggling with this one for quite a while and cannot seem to find a solution for this find/replace scenario. Perhaps I'm getting rusty.
I have a file that contains a number of metrics (exactly 3 fields per line) from a few appliances that are collected in parallel. To identify the... (3 Replies)
Discussion started by: verdepollo
3 Replies
LEARN ABOUT OSX
pcap-savefile
PCAP-SAVEFILE(5@) PCAP-SAVEFILE(5@)
NAME
pcap-savefile - libpcap savefile format
DESCRIPTION
NOTE: applications and libraries should, if possible, use libpcap to read savefiles, rather than having their own code to read savefiles.
If, in the future, a new file format is supported by libpcap, applications and libraries using libpcap to read savefiles will be able to
read the new format of savefiles, but applications and libraries using their own code to read savefiles will have to be changed to support
the new file format.
``Savefiles'' read and written by libpcap and applications using libpcap start with a per-file header. The format of the per-file header
is:
+------------------------------+
| Magic number |
+--------------+---------------+
|Major version | Minor version |
+--------------+---------------+
| Time zone offset |
+------------------------------+
| Time stamp accuracy |
+------------------------------+
| Snapshot length |
+------------------------------+
| Link-layer header type |
+------------------------------+
All fields in the per-file header are in the byte order of the host writing the file. The first field in the per-file header is a 4-byte
magic number, with the value 0xa1b2c3d4. The magic number, when read by a host with the same byte order as the host that wrote the file,
will have the value 0xa1b2c3d4, and, when read by a host with the opposite byte order as the host that wrote the file, will have the value
0xd4c3b2a1. That allows software reading the file to determine whether the byte order of the host that wrote the file is the same as the
byte order of the host on which the file is being read, and thus whether the values in the per-file and per-packet headers need to be byte-
swapped.
Following this are:
A 2-byte file format major version number; the current version number is 2.
A 2-byte file format minor version number; the current version number is 4.
A 4-byte time zone offset; this is always 0.
A 4-byte number giving the accuracy of time stamps in the file; this is always 0.
A 4-byte number giving the "snapshot length" of the capture; packets longer than the snapshot length are truncated to the snapshot
length, so that, if the snapshot length is N, only the first N bytes of a packet longer than N bytes will be saved in the capture.
a 4-byte number giving the link-layer header type for packets in the capture; see pcap-linktype(7) for the LINKTYPE_ values that can
appear in this field.
Following the per-file header are zero or more packets; each packet begins with a per-packet header, which is immediately followed by the
raw packet data. The format of the per-packet header is:
+---------------------------------------+
| Time stamp, seconds value |
+---------------------------------------+
| Time stamp, microseconds value |
+---------------------------------------+
| Length of captured packet data |
+---------------------------------------+
|Un-truncated length of the packet data |
+---------------------------------------+
All fields in the per-packet header are in the byte order of the host writing the file. The per-packet header begins with a time stamp
giving the approximate time the packet was captured; the time stamp consists of a 4-byte value, giving the time in seconds since January 1,
1970, 00:00:00 UTC, followed by a 4-byte value, giving the time in microseconds since that second. Following that are a 4-byte value giv-
ing the number of bytes of captured data that follow the per-packet header and a 4-byte value giving the number of bytes that would have
been present had the packet not been truncated by the snapshot length. The two lengths will be equal if the number of bytes of packet data
are less than or equal to the snapshot length.
SEE ALSO pcap(3PCAP), pcap-linktype(7)
21 October 2008 PCAP-SAVEFILE(5@)