nmap - output
You can save the output of an nmap scan to a file using the -o options. Here's how you do it:
-
To save as a text file:
nmap -oN output.txt <target> -
To save in XML format:
nmap -oX output.xml <target> -
To save in a grepable format:
nmap -oG output.gnmap <target> -
To save in all formats:
nmap -oA output <target>
This will generate three files:
output.nmap(normal text)output.xml(XML)output.gnmap(grepable format)