| | |
Handling log files in UNIX
Please support our Shell Scripting advertiser: Programming Forums - DaniWeb Sister Site
![]() |
A log file is a record of what has happened. On linux/unix they tend to be in /var/log.
As a developer I use them when stuff goes wrong and I want to find out why.
IT use them to keep tabs on things, monitor network use etc.
Web masters use them to spot trends and stuff (often using something to interpret their log files like webalizer).
You write to a log file like any other text file. To read from one just type
A useful way of printing the end of a log file and update it when it changes is to use
As a developer I use them when stuff goes wrong and I want to find out why.
IT use them to keep tabs on things, monitor network use etc.
Web masters use them to spot trends and stuff (often using something to interpret their log files like webalizer).
You write to a log file like any other text file. To read from one just type
cat filename.log or tail filename.log.A useful way of printing the end of a log file and update it when it changes is to use
tail -f filename.log. Note to self... pocket cup
![]() |
Similar Threads
- General Tips for Mac OS X (Mac tips 'n' tweaks)
- retaining system log files (Visual Basic 4 / 5 / 6)
- hijack this log after running it succesfully, also getting unknown log files and icon (Viruses, Spyware and other Nasties)
- hijack this log can someone tell me what files i need to delete (Viruses, Spyware and other Nasties)
- another newbie with alot of redhat and apache server Q'S (Linux Servers and Apache)
- Im new, help with log files for first time please (Viruses, Spyware and other Nasties)
Other Threads in the Shell Scripting Forum
- Previous Thread: FInding dates on files
- Next Thread: sequential numbering
| Thread Tools | Search this Thread |





