Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Nov 2013 11:04:32 +0100
From:      Florent Peterschmitt <florent@peterschmitt.fr>
To:        Dimitry Andric <dim@FreeBSD.org>
Cc:        freebsd-stable stable <freebsd-stable@freebsd.org>
Subject:   Re: tcpdump | grep pattern > capture   nothing got
Message-ID:  <528DDAB0.7020002@peterschmitt.fr>
In-Reply-To: <528DBF67.1090107@peterschmitt.fr>
References:  <528D0302.7090906@peterschmitt.fr> <966AFB1F-D273-4754-96AC-01298FBF6F42@FreeBSD.org> <528DBF67.1090107@peterschmitt.fr>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--VgGKIgAiwqvjrldiPnGWipvNJ4MIkowgP
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

On 21/11/13 09:08, Florent Peterschmitt wrote:
> On 20/11/13 23:38, Dimitry Andric wrote:
>> On 20 Nov 2013, at 19:44, Florent Peterschmitt <florent@peterschmitt.f=
r> wrote:
>>> I use FreeBSD 10.0-BETA3 amd64, upgraded from 9.2-RELEASE with
>>> freebsd-update.
>>>
>>> I was capturing with tcpdump and doing some grep on it:
>>>
>>> # tcpdump -li nfe0 port 53 | grep Refused > capture.txt
>>>
>>> I was surprised that capture.txt is totally empty. If I don't redirec=
t
>>> the output, then it writes what I need on stdout.
>>
>> Try grep --line-buffered instead (which incurs a performance penalty,
>> but you probably don't care in this case).
>>
>> BSD grep also supports this option.
>>
>> -Dimitry
>>
>=20
> It works, thank you. But, I didn't have to do this on a GNU/Linux
> machine. Is that normal?
>=20

Woops my bad, it's the same on both FreeBSD and Linux.

--=20
Florent Peterschmitt           | Please:
florent@peterschmitt.fr        |  * Avoid HTML/RTF in E-mail.
+33 (0)6 64 33 97 92           |  * Send PDF for documents.
http://florent.peterschmitt.fr |  * Trim your quotations. Really.
Proudly powered by Open Source | Thank you :)


--VgGKIgAiwqvjrldiPnGWipvNJ4MIkowgP
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJSjdqwAAoJEFr01BkajbiB04cP/2ZWulcGQtmRwmkoSW8kTEAw
xF6uztpP6Tnj4mPrsprZ0/oSDKnh38ZluD94kcMwcpG5uwNcMR2jaQIbQB52Pnf0
8F0Z9oOzct9Wo4UzXgDcGVOahCm0FCdsVXXtUscybqSg9JJT98bLxLnCLeWeVOB4
3rfVJJdaeBxm4DYeJoWYO9ExbrXa5YVYI5Z6A8PyMMjqNxRwbI/oG0+IjFVc7qEV
rVJhQ6LrQycUClWba1XdzbeJyFC8FfRZKhhqVY6kFJLsW3KKXa8pr4KnpvMkeq+c
aINC1A3sI8fkG2ma6ebKRs0clvp/4ZDrSMeucTdkBDYGHGMA8lED4zqveUFXSCfS
KHHA/0zwR8zv1uVDcsCXPFIMDm/SlB0tqHi3UVYuMZqs5kbXhotYloGHIqgTWRIK
WFFfhzr90+fEXq4mRakTmKnhlGM7AcB9anLUhHqojMledoFAL9rte7XkbOZHQArd
YUWFwWfUoNsv9LJLfMQxcf25yyiAcyyrDcObPd6I3cz+i2KmFHQ50NjyDQ8qna7H
eTd8HqwHOJP6KAe4eWQbqHo1kvfaf9QixR5Bn8TowOA5TgST6KRoXYhJpIUHr8j9
Da73LTV+kvSL0Svz65zBCylaz7MF6Dn4XGEa4V3HF1ipacwwvTioD/CHLnO/PYpm
bEmd/K07OHhQsSHPom+H
=7Q0q
-----END PGP SIGNATURE-----

--VgGKIgAiwqvjrldiPnGWipvNJ4MIkowgP--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?528DDAB0.7020002>