在-w
时,需要把文件名写全,相对路径无权限,则需要写成绝对路径,比如
sudo tshark -w /home/xxxx/mypcap.pcap
下面的不行
sudo tshark -w mypcap.pcap # Permission denied
参考链接
tshark gives “permission denied” writing to (any) file in home dir.:https://www.linuxquestions.org/questions/linux-networking-3/tshark-gives-permission-denied-writing-to-any-file-in-home-dir-650952/