utmpdump file edit
utmpdump file edit
Hello. I was wondering if there is possibility to export utmpdump /var/log/btmp to csv file after adding to file header names. I mean is there possibility to add a top row which contains the names of all the coplumns (for example ipaddress, name, dateoflogin etc). I know there is grep or awk usage to do it, but i am newbie and i can't make it working.
- Attachments
-
- Przechwytywanie.JPG (70.79 KiB) Viewed 1760 times
Re: utmpdump file edit
there are no as such options which you are currently looking..however you can try below, it works !
1. create an empty file using comma seperated fields e.g echo ipaddress, name, dateoflogin...etc >tmp_ouput.csv
2. then, try to filter using sed, awk and then append your output to >>tmp_ouput.csv
1. create an empty file using comma seperated fields e.g echo ipaddress, name, dateoflogin...etc >tmp_ouput.csv
2. then, try to filter using sed, awk and then append your output to >>tmp_ouput.csv