Article View: es.comp.os.linux.programacion
Article #1687Re: Script tcpdump
From: Kunael
Date: Sun, 21 Aug 2005 10:39
Date: Sun, 21 Aug 2005 10:39
29 lines
1761 bytes
1761 bytes
> ¿Por qué simplemente no añades la hora y minuto al nombre del
> fichero que generas?
>
> En plan:
>
> FECHA=$(date +%m-%d-%Y-%m-%h)
> LOG=/var/log/tcpdump/tcpdump-$FECHA.log
Pozí. Anda que no es fácil.... ay, ¿dónde tendré la cabeza?
:P
De todas maneras, aún es más fácil; como que el -w se usa para dar salida en
formato tcpdump y no lo necesito (puede ser texto plano normal y corriente)
lo he solucionado así de fácil:
#!/bin/bash
FECHA=$(date +%m-%d-%Y)
LOG=/var/log/tcpdump/tcpdump$FECHA.log
tcpdump -i eth0 -q >> $LOG &
exit 0
--
¡Share your knowledge!
Linux user id 332494 # http://counter.li.org/
PGP id 0xC5ABA76A # http://pgp.mit.edu/
Technical Details
Message-ID:
<de9lli$krg$1@antonio.escomposlinux.org>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed.hal-mli.net!feeder1.hal-mli.net!antonio.escomposlinux.org!escomposlinux.org!not-for-mailReferences:
<de6o9k$pob$1@antonio.escomposlinux.org> <pan.2005.08.20.13.07.23.966825@gmailQUITAESTO.com>Show Full Headers
Complete Article Headers
X-Google-Thread: f86c8,261b71624a54c2c5 X-Google-Attributes: gidf86c8,public X-Google-Language: SPANISH,UTF8 Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed.hal-mli.net!feeder1.hal-mli.net!antonio.escomposlinux.org!escomposlinux.org!not-for-mail From: Kunael <kunael4@yahoo.es> Newsgroups: es.comp.os.linux.programacion Subject: Re: Script tcpdump Date: Sun, 21 Aug 2005 12:39:20 +0200 Organization: Servidor de noticias de la red Ecolnet Lines: 29 Message-ID: <de9lli$krg$1@antonio.escomposlinux.org> References: <de6o9k$pob$1@antonio.escomposlinux.org> <pan.2005.08.20.13.07.23.966825@gmailQUITAESTO.com> Reply-To: kunael4@yahoo.es NNTP-Posting-Host: 3.red-217-126-41.pooles.rima-tde.net Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8Bit X-Trace: antonio.escomposlinux.org 1124620787 21360 217.126.41.3 (21 Aug 2005 10:39:47 GMT) X-Complaints-To: newsmaster@antonio.escomposlinux.org NNTP-Posting-Date: Sun, 21 Aug 2005 10:39:47 +0000 (UTC) User-Agent: KNode/0.9.0