LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-07-2009, 10:21 AM   #1
varun.sharma
LQ Newbie
 
Registered: Sep 2009
Posts: 3

Rep: Reputation: 0
tshark - save capture packet to txt file


Hi all,

i want to save the capture packet into a txt file without using ">"(greater then operator).

example :
tshark -V -R "http" > /tmp/file.txt
this command save all the http packet into a /tmp/file.txt file but i dont want to use ">"(greater then operator).

how can i do this ?
please suggest


Thanks
Varun

Last edited by varun.sharma; 09-07-2009 at 10:23 AM.
 
Old 09-07-2009, 12:28 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
this command won't save the packet at all, just some human readable text data. to save the packet, you would use "-r /tmp/file.cap" on the command line.
 
Old 09-14-2009, 12:20 PM   #3
varun.sharma
LQ Newbie
 
Registered: Sep 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for reply
but i have expected this command on my RHEL5.1 machine and it captured the packet in text format.
question is....can we save the content into a file without using '>' operator.
 
Old 09-14-2009, 02:10 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Well I'd wonder why on earth you couldn't use one, maybe you need to escape it instead?

You could use tee if you wish:

tshark | tee file.txt
 
Old 09-14-2009, 05:52 PM   #5
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by varun.sharma View Post
Hi all,

i want to save the capture packet into a txt file without using ">"(greater then operator).

example :
tshark -V -R "http" > /tmp/file.txt
this command save all the http packet into a /tmp/file.txt file but i dont want to use ">"(greater then operator).
... why ... not? ... If you offer an explanation, a reason why the redirection operator ruins your day, someone will offer a way to avoid the unstated problem.
 
Old 09-17-2009, 12:04 PM   #6
varun.sharma
LQ Newbie
 
Registered: Sep 2009
Posts: 3

Original Poster
Rep: Reputation: 0
i know its a bit silly think to ask but i m getting problem thats why i asked.
i m into a telecom project and we have a tool FunTasy used for telecom testing automation.
we need to capture sniff and safe that content into a file for further validation.
FunTasy has its own command prompt with limitations and currently it is not accepting charcter like '>'.

Anywaz.....i hope that tee option will be used as a workaround

Thanks for your help


Regards,
Varun
 
  


Reply



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
tshark output to file noir911 Linux - Server 1 03-25-2009 06:17 AM
List Hardware Configuration and save as txt file hmendoza Linux - Newbie 3 01-27-2009 03:12 PM
A packet filter using libipq which uses ether type field to capture the packet can26_manish Programming 2 10-16-2007 05:35 AM
How can read from file.txt C++ where can save this file(file.txt) to start reading sam_22 Programming 1 01-11-2007 05:11 PM
how do i read the data in the packet that i have captured after packet capture? gajaykrishnan Programming 23 04-19-2006 05:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:57 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
Open Source Consulting | Domain Registration