Contents
How do I export a log file in Unix?
For example, run ls command and store its output the file called “file-lists.txt”:
- ls -l /bin > file-lists.txt. …
- cat file-lists.txt. …
- more file-lists.txt. …
- # command must be run as root # grep ‘1.2.3.4’ /var/log/httpd/access_log > /root/spam-log.txt.
How do I save a log file in Linux?
Linux systems typically save their log files under /var/log directory. This works fine, but check if the application saves under a specific directory under /var/log . If it does, great. If not, you may want to create a dedicated directory for the app under /var/log .