This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

file doesn’t exist!

0

Hi, I wrote this code in cygwin in windows:

file=c:\man.pcap
for stream in $(tshark -nlr $file -Y tcp.flags.syn==1 -T fields -e tcp.stream | sort -n | uniq)
do
  echo "Processing stream $stream"
  tshark -nlr $file -qz "follow,tcp,ascii,$stream" > stream-$stream.log
done

but I got this error message: tshark: The file "c:man.pcap" doesn't exist.

the file "man.pcap" is located in C drive. I haven't any idea for fix this problem.What should I do? tnx for ur attention.

asked 30 Aug '13, 07:05

Soroor's gravatar image

Soroor
21448
accept rate: 0%

edited 30 Aug '13, 07:49

SYN-bit's gravatar image

SYN-bit ♦♦
17.1k957245


One Answer:

5

Use a forward "/" slash in the path spec, e.g. C:/man.pcap. Cygwin thinks a backlash is escaping the next character.

answered 30 Aug '13, 07:34

grahamb's gravatar image

grahamb ♦
19.8k330206
accept rate: 22%

1

Or try

file=c:\\man.pcap

so that Cygwin thinks that's a literal backslash, rather than a backslash escaping the next character.

(30 Aug '13, 13:17) Guy Harris ♦♦