The NetworkManager Applet running on my Ubuntu can show me all wireless connections that I've made over the years with their names and last connection times. However, the applet does not allow me to save this list in a machine readable format (e.g. csv or xml). How could I do it? Is this list stored somewhere in the file system in plain text?
1 Answer
I solved the problem with a quick and ugly commandline:
find $HOME/.gconf/system/networking/connections/ -name "%gconf.xml" | xargs -n 1 bash parse_wifi_conf.sh | grep -v '^\s*$'
where parse_wifi_conf.sh
is defined as
cat $1 | egrep "Auto|\"id\"" | tr '\012' ' ' | sed 's/^.*mtime="\([^"]*\)".*>Auto \([^<]*\)<.*$/\1\t\2/'
echo
This prints out two tab-separated columns: the timestamp of the last connection time and the name of the network.