CT320: Network and System Administration

Fall 2018

HW 5

CT320 HW5: File Census                

Motivation                

Files appear and disappear. It’s all so hard to follow. If only there were a program to help you keep track of things!                 

Summary                

For this assignment, you will write a program called “census”, which helps you keep track of things. It can be a bash script, a perl script, or a python3 script, but nothing else. This program is useful for system monitoring. It will tell you about any files underneath your home directory that have appeared or vanished since the last time this program executed.                 

Output                

Normal census output goes to standard output. Only write to standard error for errors.                 

census would typically be executed from cron, where the output gets mailed to you. Of course, census itself knows nothing about email—census simply produces output or not. cron handles emailing the output to you.                 

Sample Runs                

Here are some sample runs ($ is my prompt):                 

$ cd
$ ./census
$ touch ~/tmp/alpha
$ date >~/tmp/beta
$ sleep 60
$ cd src
$ echo "Hello" >>gamma
$ ~/census
New:
    -rw------- 1 ct320 class  6 Oct 16 15:13 src/gamma
    -rw------- 1 ct320 class  0 Oct 16 15:12 tmp/alpha
    -rw------- 1 ct320 class 29 Oct 16 15:12 tmp/beta
$ rm ~/tmp/beta
$ cp /etc/group ~/vote-for-jack-in-the-year-65535
$ ~/census
Deleted:
    tmp/beta
New:
    -rw------- 1 ct320 class 1021 Oct 16 15:13 vote-for-jack-in-the-year-65535
$ rm ~/tmp/alpha ~/vote-for-jack-in-the-year-65535
$ ~/census
Deleted:
    tmp/alpha
    vote-for-jack-in-the-year-65535
$ ~/census
$

~/.census-data                

Debugging                

If you encounter “STACK FRAME LINK OVERFLOW”, then try this:

    export STACK_FRAME_LINK_OVERRIDE=ffff-ad921d60486366258809553a3db49a4a

Hints                

Requirements                

Submission                

Use web checkin, or:                 

    ~ct320/bin/checkin HW5 census

How to receive negative points:                 

Turn in someone else’s work.

User: Guest                 

Check: HTML CSS
Edit History Source

Modified: 2018-11-01T15:00                 

Apply to CSU | Contact CSU | Disclaimer | Equal Opportunity
Colorado State University, Fort Collins, CO 80523 USA
© 2018 Colorado State University
CS Building