concept log file in category linux

appears as: log file, log files, log files
Linux in Action

This is an excerpt from Manning's book Linux in Action.

  • ddrescue -d /dev/sdc1 /run/usb-mount/sdc1-backup.img /run/usb-mount/sdc1-backup.logfile—Saves files on a damaged partiton to an image named sdc1-backup.img, and writes events to a log file.
  • Even a lightly used system can generate many thousands of lines of log files between the time it’s booted up and shut down, and busy applications can easily produce millions of lines a day. Because log files tend to be long and boring, you’ll probably want to outsource their reading to software that can intelligently filter only urgent entries, like warnings of imminent failures, and notify you only when absolutely necessary. The better you get at configuring your system’s log behavior and managing the ever-growing log files, the better you’ll understand your system’s strengths and weaknesses—and the more reliable your system will become.

    For those who can read them, log files are a treasure chest of valuable insights. They can tell you about weaknesses in your security defenses and past unauthorized intrusions. Log entries can help you anticipate problems with your system security and performance, and diagnose them once everything has already blown up.

    Listing 11.2. Some common settings from the /etc/logrotate.conf file
    # rotate log files weekly
    weekly
    # keep 4 weeks worth of backlogs
    rotate 4
    # create new (empty) log files after rotating old ones
    create
    # packages drop log rotation information into this directory
    include /etc/logrotate.d