LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-14-2007, 02:02 AM   #1
Fond_of_Opensource
Member
 
Registered: May 2006
Posts: 55

Rep: Reputation: 15
Unhappy capture 100 packets tcpdump


hi all,


how to capture a given number of packets(say hundred) into a file using tcpdump command?

I used,
Code:
#tcpdump -w file.cap
It saves all the packets into the file file.cap
but I want to save only first 10 packets

HOw to do it using tcpdump?

please help

thanks in advance.
 
Old 06-14-2007, 02:19 AM   #2
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Did you not even bother to read the man page? Use the -c option..
 
Old 06-14-2007, 02:33 AM   #3
opensourcedevelopmen
LQ Newbie
 
Registered: Jun 2007
Location: Delhi
Distribution: Linux
Posts: 21

Rep: Reputation: 16
tcpdump -c 100
 
Old 06-14-2007, 02:52 AM   #4
opensourcedevelopmen
LQ Newbie
 
Registered: Jun 2007
Location: Delhi
Distribution: Linux
Posts: 21

Rep: Reputation: 16
tcpdump -c 100
 
  


Reply


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
tcpdump does not capture all packets logicalfuzz Linux - Networking 1 03-19-2007 12:47 PM
How to modify tcpdump packets? chinmays Linux - Security 3 09-24-2006 01:31 PM
Using Tcpdump and Tethereal to capture packets shanu_technical Linux - Networking 3 06-14-2006 08:54 AM
Sniffing: tcpdump gets some initial packets merlin-themage Linux - Networking 0 05-28-2004 07:07 AM
tcpdump and dropped packets Blindsight Linux - Networking 5 07-14-2003 10:41 PM


All times are GMT -5. The time now is 01:00 PM.

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