FHS and System Logs FHS: Filesystem Hierarchy Standard

FHS and System Logs FHS: Filesystem Hierarchy Standard

FHS and System Logs FHS: Filesystem Hierarchy Standard jboydt :: csci 26 | fhs and system logs FHS: what is it? ● A standard? ○ an agreed-upon set of rules and/or practices ○ developed by volunteer industry professionals ● Why FHS? ○ to provide users of FHS-compliant systems an assurance that: ■ the contents of the root filesystem are adequate to boot, restore, recover, and/or repair the system ○ to guide creators of systems in their choices about: ■ core system directories ■ core system utilities ○ to provide a predictable foundation for software developers ○ to provide a predictable experience for users jboydt :: csci 26 | fhs and system logs FHS: core details ● Foundation ○ FHS assumes the underlying system has UNIX-like security features ● What the standard covers ○ the filesystem ○ the root filesystem ○ the /usr secondary hierarchy ○ the /var secondary hierarchy jboydt :: csci 26 | fhs and system logs FHS: core details ● Root filesystem -- required directories: ○ /bin -- essential command binaries ○ /boot -- static files of the boot loader ○ /dev -- device files ○ /etc -- host-specific system configuration ○ /lib -- essential shared libraries and kernel modules ○ /media -- mount point for removable media ○ /mnt -- mount point for temporary filesystem ○ /opt -- add-on applications ○ /sbin -- essential system binaries ○ /srv -- data for services provided by the system ○ /tmp -- temporary files ○ /usr -- secondary hierarchy ○ /var -- variable data jboydt :: csci 26 | fhs and system logs Bonus section: find and locate ● find ○ find PATH EXPRESSION ○ examples: ■ find /bin -name “z*” ■ find /var -user root ■ find /etc -group staff ■ find / -user janedoe -name “*.log” 2> /dev/null ● locate ○ locate FILE ○ updatedb ○ + faster than find as it uses its own database for a fast search ○ - its own database needs to be up-to-date ○ example: locate mail jboydt :: csci 26 | fhs and system logs Bonus section: whereis and which ● whereis ○ search for file in a limited set of directories ○ + can be faster than find ○ - only searches a limited set of directories ○ example: whereis ls ● which ○ search user PATH for an executable ○ example: which ls jboydt :: csci 26 | fhs and system logs Bonus section: type ● type ○ display how a command will be interpreted ○ examples: ■ type ls ■ type echo jboydt :: csci 26 | fhs and system logs System Logs jboydt :: csci 26 | fhs and system logs System logs: the basics ● What is a log? ○ a file used to record information about system operations ○ Linux system use many log files ○ examples in /var/log: ■ messages -- global system messages, including system startup ■ dmesg -- kernel ring buffer information (* dmesg command) ■ auth.log -- system authorization information ■ lastlog -- recent login information for users (* lastlog command) jboydt :: csci 26 | fhs and system logs rsyslog: the basics ● What is rsyslog? ○ an implementation of syslog that is the default on Debian systems ● OK, so what is syslog? ○ a daemon to handle log maintenance on a Linux system ■ a daemon? ● a system service that runs non-interactively in the background ○ unifies all system logging activities ■ gives Sys Admin control over how and where messages are logged jboydt :: csci 26 | fhs and system logs jboydt :: csci 26 | fhs and system logs.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    12 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us