Changes

Jump to: navigation, search

OPS235 Lab 5 - CentOS7 - VMware

9 bytes added, 12:33, 8 June 2016
no edit summary
= INVESTIGATION 1: MONITORING HARD DISK SPACE =
=== Part 1: Viewing Free Disk Space & Disk Usage ===
[[Image:disk_usage.png|thumb|500px|right|The '''df''' and '''du''' commands are useful tools for Linux system administrators to flag disk space issues and investigate their causes.]]
Another essential duty of a Linux system administrator is to anticipate problems and take preventative measures to avoid computer system problems <u>before</u> that occur.
===Part 2: Schedule Execution of Shell Scripts or Commands (Crontab)===
{|width="40%" align="right" cellpadding="10"
|- valign="top"
|{{Admon/tip|Bash Shell Scripting Tips:|<br><ul><li>'''Using awk to Manipulate Text:'''<br><br>Legend has it that the '''awk''' command was invented by three C programmers that wanted to create a utility in Unix that had programming syntax more like C programming. People started to use the command and found it very useful for report generation and file repair or manipulation.<br><br>The command mimics a C program, with braces '''{ }''' that surround the action to perform based on records from a database file matching either test conditions, regular expressions, etc. Fields appear as numbers with $.<br><br>'''<u>Examples</u>:'''<br><br>''awk '{print}' data-file.txt''<br><br>''awk -F";" '{print $5,$3}' data-file.txt''<br><br>''awk -F"," '$4 &gt;&#61; 10000 {print $1, $2}' salary.txt''<br><br></li><li>'''Crontab (Chronograph Tables):'''<br><br>Used to automatically run (as opposed to manually run) scripts, programs, or commands. There are many tables (files), but the main one is: '''/etc/cron'''. The '''crontab''' command can be used to ''list'', ''create'', ''modify'' or ''remove'' scheduled jobs in the file.<br><br>'''<u>Examples</u>:'''<br><br>''crontab -e -u user'' # create/modify<br><br>''crontab -r -u user-name'' # remove specific user's crontab<br><br>''crontab -l -u username'' #List current schedules</li></ul>}}
|}
=== Part 3: Manually Mounting and Unmounting Partitions ===
We take for granted that a file-system must be mounted (for example the root partition) in order for a Linux system to be usable upon system start-up. This was create automatically for the '''/archive''' mount point automatically when we used the system-config-lvm utility in the previous investigation. We need to learn now to do this manually by editing or adding an entry in the ''/etc/fstab'' file. The '''/etc/fstab''' (file system table) contains entries to mount various file systems automatically upon start-up of the Linux system.
13,420
edits

Navigation menu