Sample Header Ad - 728x90

Listen to a folder and modify incoming files on change

1 vote
2 answers
199 views
I want to convert pcap files to json files using shell script (and tshark). As soon as one or more new pcap files are copied into a folder, the command tshark should be executed and the resulting json data should be stored in another file (in a different order). As soon as the conversion is finished the pacap file should be deleted. The idea looks something like that: while(true){ wait_for_IN_folder_changed tshark -T ek -x -r \in\in.pcap > \out\out.json rm \in\in.pcap } It would be best to start the tshark process multithreaded to increase the parallelism and thus the throughput. But would different threads probably get in each other's way here?
Asked by mudvayne (11 rep)
May 15, 2019, 08:26 AM
Last activity: Jun 12, 2019, 10:58 AM