I want to redirect the output of airodump into a txt file.Im using this command
airodump-ng --encrypt wpa wlan0 > airodump.txt
That work fine and all the output is redirect to the .txt file without memory leak.
Now if i try to run it in background with & or &> /dev/null & and then launch others commands after the airodump command, the file airodump.txt generated by airodump-ng take more than 100mo of memory in only few seconds.Here is the script.
#!/bin/bash
echo $$ >/tmp/scan.pid # we take the pid to kill it later
airodump-ng --encrypt wpa wlan0 > airodump.txt &> /dev/null &
sleep 60;
echo -e "Ok airodump output has been captured"
cat airodump.txt
Im using debian11 OS.How i can launch airodump-ng and redirect the output to a txt file without memory leak ?