CBKADAL
OSP Weekly Assignments
C. BinKadal --- Sendirian, Berhad.


OS Week 03 Assignment #4: Assignment Script

Copy from demos:

TARBALL=WEEK03.tar.xz.asc
TARDIR=$HOME/git/demos/WEEK
if [ -d $TARDIR/ ] ; then
  cd $TARDIR/
  git pull
  mkdir -pv $HOME/mywork/
  cd $HOME/mywork/
  cp -v $TARDIR/$TARBALL .
  ls -al
else
  echo "ERROR: no $TARDIR directory!"
fi


Decrypt file WEEK03.tar.xz.asc

  • The passphrase/password will be announced at SCELE at the beginning of the week.
gpg --yes -o WEEK03.tar.xz -d WEEK03.tar.xz.asc


Extract TARBALL

tar xfv WEEK03.tar.xz
cd WEEK03/
ls -al


Check Scripts

for II in [0-9][0-9]* ; do
    echo ""
    echo "= === ==== FILE $II..."
    echo "= === ==== ==== ==== ==== ==== ==== ===="
    cat  "$II"
    sleep 2
done


Run Scripts

bash 00_Basic_Check.sh

bash 01_Version_Check.sh

bash 03_WEEK03.sh


Check RESULT (E.g. Week 03)

cd $HOME/RESULT/W03/
ls -al


The result will be similar to the following. Check if there are error messages inside these files:

  • WEEK03-00-BASIC.txt
  • WEEK03-01-VERSION.txt
  • WEEK03-DEMO-CHECK.txt
  • WEEK03-03-DISK-CHECK.txt
    • CMOUN2: check if /dev/sdb1 (or /dev/vdb1) is mounted to /mnt/cbkadal
    • LSFILE: check if /mnt/cbkadal/cbkadal.txt exists
    • FSWRITE: content of cbkadal.txt
    • BUT: you are not cbkadal!
ZCZC 0FA96F4 WEEKSQ 03 03
ZCZC 0F7A6F8 VERSUM 20:174ABF88 20:174ABF88
ZCZC 0F33017 VERINC 77:8F04B9D7 77:8F04B9D7
ZCZC 0FBC8A5 SCRIPT # REV08: Mon 16 Sep 2024 22:00
ZCZC 0FBFF28 CHDATE 240916 2305
ZCZC 0F22EC6 CMOUN2 /dev/sdb1 /mnt/cbkadal ext4 rw,relatime 0 0
ZCZC 0FCD6C6 FSWRITE Date: Mon 16 Sep 2024 23:05:18 WIB
ZCZC 0FFB9DB LSFILE -rw-r--r-- 1 cbkadal cbkadal 35 Sep 16 23:05 /mnt/cbkadal/cbkadal.txt
ZCZC 0F29321 CHKUSR Date: Mon 16 Sep 2024 23:05:18 WIB
ZCZC 0F137A4 RESULT ===== RESULT IN /home/cbkadal/RESULT/W03/WEEK03-03-DISK-CHECK.txt =====




© 2024-2024 --- C. BinKadal --- Revision: Wed 20 Nov 2024 07:00.