Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 03-02-2004, 05:13 PM   #1
LQ Newbie
Registered: Jan 2004
Posts: 11

Rep: Reputation: 0
tcpdump -w command doesn't write to file

Anyone know why when I run < tcpdump -w file > I get know output in the file specified. I get network traffic on standard output but nothing when I try to redirect to a file.
Old 03-02-2004, 05:54 PM   #2
Senior Member
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571

Rep: Reputation: 45
I don't know why, but, from man tcpdump:

"In all cases, only packets that match expression will be processed by tcpdump."

With expression being the last thing on the command line, or so it seems.
Old 03-03-2004, 07:10 AM   #3
Registered: Jul 2003
Location: London
Posts: 548

Rep: Reputation: 30
If you check the man pages, this writes the *raw* package to file, hence if you view the file, you'll get a load of binary. The quickest / easiest way to write to a file is:
# tcpdump > filename


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
grip : no write access to write encoded file bidouilleur Linux - Software 5 10-09-2010 09:23 PM
retransmiting tcpdump capture file? JWT2 Linux - Networking 9 10-09-2005 08:27 AM
Linux shell command for to create a text file and write to it alix123 Programming 8 01-07-2005 08:18 AM
How to write down result of performance of a command in a file ukrainet Linux - Newbie 3 12-08-2004 09:51 AM
How to use tcpdump command to post a special type? jerrytw Linux - Networking 1 11-08-2004 08:56 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:03 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration