LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   tshark - save capture packet to txt file (http://www.linuxquestions.org/questions/linux-software-2/tshark-save-capture-packet-to-txt-file-753332/)

varun.sharma 09-07-2009 10:21 AM

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

acid_kewpie 09-07-2009 12:28 PM

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.

varun.sharma 09-14-2009 12:20 PM

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.

acid_kewpie 09-14-2009 02:10 PM

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

lutusp 09-14-2009 05:52 PM

Quote:

Originally Posted by varun.sharma (Post 3673121)
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.

varun.sharma 09-17-2009 12:04 PM

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


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