Operating System Programming 4DISS

(V144a-20210918). This site is managed by VauLSMorg (vlsm.org) since 2020.
May the fork() be with Jolan Tru! --- operatingsystems (@T) vlsm dot org.

View on GitHub

HOME ABOUT WEB GITHUB TOP BOTTOM PREV NEXT


Assignment Week 04 (eg. cbkadal)

Read OSC-10 Chapter 9


Try Demos WEEK 04 and before


Visit https://os.vlsm.org/GitHubPages/


Create your TOP 10 List of Week 04


Update your log


Download https://os.vlsm.org/WEEK/WEEK04.tar.bz2.asc.

INPUT01

wget -c https://os.vlsm.org/WEEK/WEEK04.tar.bz2.asc

OUTPUT01

cbkadal@osp:~/tmp$ wget -c https://os.vlsm.org/WEEK/WEEK04.tar.bz2.asc
--2021-03-18 17:47:16--  https://os.vlsm.org/WEEK/WEEK04.tar.bz2.asc
Resolving os.vlsm.org (os.vlsm.org)... 185.199.108.153, 185.199.109.153, 185.199.110.153, ...
Connecting to os.vlsm.org (os.vlsm.org)|185.199.108.153|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 309656 (302K) [application/pgp-signature]
Saving to: ‘WEEK04.tar.bz2.asc’

WEEK04.tar.bz2.asc   100%[========================================>] 302.40K  --.-KB/s   in 0.1s    

2021-03-18 17:47:16 (3.02 MB/s) - ‘WEEK04.tar.bz2.asc’ saved [309656/309656]

cbkadal@osp:~/tmp$

INPUT02

ls -al
gpg -o WEEK04.tar.bz2 -d WEEK04.tar.bz2.asc
ls -al
tar xf WEEK04.tar.bz2
ls -al

OUTPUT02

cbkadal@osp:~/tmp$ ls -al
total 312
drwxr-xr-x  2 cbkadal cbkadal   4096 Mar 18 17:47 .
drwx--x--x 15 cbkadal cbkadal   4096 Mar 18 17:44 ..
-rw-r--r--  1 cbkadal cbkadal 309656 Mar 18 17:44 WEEK04.tar.bz2.asc

cbkadal@osp:~/tmp$ gpg -o WEEK04.tar.bz2 -d WEEK04.tar.bz2.asc 

gpg: AES256 encrypted data
gpg: encrypted with 1 passphrase

cbkadal@osp:~/tmp$ ls -al
total 536
drwxr-xr-x  2 cbkadal cbkadal   4096 Mar 18 18:23 .
drwx--x--x 15 cbkadal cbkadal   4096 Mar 18 17:44 ..
-rw-r--r--  1 cbkadal cbkadal 228537 Mar 18 18:23 WEEK04.tar.bz2
-rw-r--r--  1 cbkadal cbkadal 309656 Mar 18 17:44 WEEK04.tar.bz2.asc

cbkadal@osp:~/tmp$ tar xf WEEK04.tar.bz2 

cbkadal@osp:~/tmp$ ls -al
total 540
drwxr-xr-x  3 cbkadal cbkadal   4096 Mar 18 18:27 .
drwx--x--x 15 cbkadal cbkadal   4096 Mar 18 17:44 ..
drwxr-xr-x  3 cbkadal cbkadal   4096 Mar 18 17:41 WEEK04
-rw-r--r--  1 cbkadal cbkadal 228537 Mar 18 18:23 WEEK04.tar.bz2
-rw-r--r--  1 cbkadal cbkadal 309656 Mar 18 17:44 WEEK04.tar.bz2.asc

INPUT03

cd WEEK04/
ls -al
bash 000-README.txt
ls -al
cd ..
ls -al

OUTPUT03

cbkadal@osp:~/tmp$ cd WEEK04/

cbkadal@osp:~/tmp/WEEK04$ ls -al
total 16
drwxr-xr-x  3 cbkadal cbkadal 4096 Mar 18 18:39 .
drwxr-xr-x  3 cbkadal cbkadal 4096 Mar 18 18:42 ..
-rw-r--r--  1 cbkadal cbkadal 1827 Mar 18 18:39 000-README.txt
drwxr-xr-x 50 cbkadal cbkadal 4096 Mar 18 18:39 tlpi-dist

cbkadal@osp:~/tmp/WEEK04$ bash 000-README.txt 
make[1]: Entering directory '/home/cbkadal/tmp/WEEK04/tlpi-dist/lib'
rm -f *.o ename.c.inc ../libtlpi.a
make[1]: Leaving directory '/home/cbkadal/tmp/WEEK04/tlpi-dist/lib'
make[1]: Entering directory '/home/cbkadal/tmp/WEEK04/tlpi-dist/acl'
rm -f  acl_update acl_view *.o

==== TL;DR ====

rm -f  vdso_gettimeofday syscall_gettimeofday *.o
make[1]: Leaving directory '/home/cbkadal/tmp/WEEK04/tlpi-dist/vdso'
make[1]: Entering directory '/home/cbkadal/tmp/WEEK04/tlpi-dist/vmem'
rm -f memlock madvise_dontneed t_mprotect  *.o
make[1]: Leaving directory '/home/cbkadal/tmp/WEEK04/tlpi-dist/vmem'
make[1]: Entering directory '/home/cbkadal/tmp/WEEK04/tlpi-dist/xattr'
rm -f  t_setxattr xattr_view *.o
make[1]: Leaving directory '/home/cbkadal/tmp/WEEK04/tlpi-dist/xattr'

cbkadal@osp:~/tmp/WEEK04$ ls -al
total 16
drwxr-xr-x  3 cbkadal cbkadal 4096 Mar 18 18:39 .
drwxr-xr-x  3 cbkadal cbkadal 4096 Mar 18 18:43 ..
-rw-r--r--  1 cbkadal cbkadal 1827 Mar 18 18:39 000-README.txt
drwxr-xr-x 50 cbkadal cbkadal 4096 Mar 18 18:43 tlpi-dist

cbkadal@osp:~/tmp/WEEK04$ cd ..

cbkadal@osp:~/tmp$ ls -al
total 608
drwxr-xr-x  3 cbkadal cbkadal   4096 Mar 18 18:43 .
drwx--x--x 15 cbkadal cbkadal   4096 Mar 18 18:40 ..
drwxr-xr-x  3 cbkadal cbkadal   4096 Mar 18 18:39 WEEK04
-rw-r--r--  1 cbkadal cbkadal 229003 Mar 18 18:42 WEEK04.tar.bz2
-rw-r--r--  1 cbkadal cbkadal 310290 Mar 18 18:41 WEEK04.tar.bz2.asc
-rw-r--r--  1 cbkadal cbkadal  66254 Mar 18 18:43 WEEK04-TLPI.txt

cbkadal@osp:~/tmp$ 

INPUT04

cat WEEK04-TLPI.txt

OUTPUT04

cbkadal@osp:~/tmp/WEEK04$ cat WEEK04-TLPI.txt 
===
pwd
/home/cbkadal/tmp/WEEK04/tlpi-dist
===
chktoken OS211W04
cbkadal 4302-76DF
===
date
Thu 18 Mar 18:43:02 WIB 2021
===
time/calendar_time
Seconds since the Epoch (1 Jan 1970): 1616067782 (about 51.211 years)
  gettimeofday() returned 1616067782 secs, 626014 microsecs
Broken down by gmtime():
  year=121 mon=2 mday=18 hour=11 min=43 sec=2 wday=4 yday=76 isdst=0
Broken down by localtime():
  year=121 mon=2 mday=18 hour=18 min=43 sec=2 wday=4 yday=76 isdst=0

asctime() formats the gmtime() value as: Thu Mar 18 11:43:02 2021
ctime() formats the time() value as:     Thu Mar 18 18:43:02 2021
mktime() of gmtime() value:    1616042582 secs
mktime() of localtime() value: 1616067782 secs
===
ls -alR

==== TL;DR ====

wc -l WEEK04-TLPI.txt
1201 WEEK04-TLPI.txt
===
make clean
===
date
Thu 18 Mar 18:43:04 WIB 2021
===
mv WEEK04-TLPI.txt ../../

cbkadal@osp:~/tmp/WEEK04$


Create a new “$HOME/RESULT/W04/” directory

INPUT05

ls -al
cd ..
ls -al
mkdir -p $HOME/RESULT/W04/
mv WEEK04-TLPI.txt $HOME/RESULT/W04/
ls -al   $HOME/RESULT/W04/

OUTPUT05

cbkadal@osp:~/tmp/WEEK04$ ls -al
total 16
drwxr-xr-x  3 cbkadal cbkadal 4096 Mar 18 18:39 .
drwxr-xr-x  3 cbkadal cbkadal 4096 Mar 18 19:08 ..
-rw-r--r--  1 cbkadal cbkadal 1827 Mar 18 18:39 000-README.txt
drwxr-xr-x 50 cbkadal cbkadal 4096 Mar 18 19:08 tlpi-dist

cbkadal@osp:~/tmp/WEEK04$ cd ..

cbkadal@osp:~/tmp$ ls -al
total 608
drwxr-xr-x  3 cbkadal cbkadal   4096 Mar 18 19:08 .
drwx--x--x 15 cbkadal cbkadal   4096 Mar 18 18:40 ..
drwxr-xr-x  3 cbkadal cbkadal   4096 Mar 18 18:39 WEEK04
-rw-r--r--  1 cbkadal cbkadal 229003 Mar 18 18:42 WEEK04.tar.bz2
-rw-r--r--  1 cbkadal cbkadal 310290 Mar 18 18:41 WEEK04.tar.bz2.asc
-rw-r--r--  1 cbkadal cbkadal  66254 Mar 18 19:08 WEEK04-TLPI.txt

cbkadal@osp:~/tmp$ mkdir -p $HOME/RESULT/W04/

cbkadal@osp:~/tmp$ mv WEEK04-TLPI.txt $HOME/RESULT/W04/

cbkadal@osp:~/tmp$ ls -al $HOME/RESULT/W04/
total 76
drwxr-xr-x 2 cbkadal cbkadal  4096 Mar 18 19:09 .
drwxr-xr-x 4 cbkadal cbkadal  4096 Mar 18 19:09 ..
-rw-r--r-- 1 cbkadal cbkadal 66254 Mar 18 19:08 WEEK04-TLPI.txt

cbkadal@osp:~/tmp$ 


Update “TXT/myscript.sh”

INPUT06

cd $HOME/git/os211/TXT/
ls -al
bash myscript.sh
ls -al

OUTPUT06

cbkadal@osp:~/tmp$ cd $HOME/git/os211/TXT/

cbkadal@osp:~/git/os211/TXT$ ls -al
total 32
drwxr-xr-x 2 cbkadal cbkadal 4096 Mar 18 19:31 .
drwxr-xr-x 9 cbkadal cbkadal 4096 Mar 18 19:25 ..
-rw-r--r-- 1 cbkadal cbkadal 1171 Mar 11 14:28 mylog.txt
-rw-r--r-- 1 cbkadal cbkadal 3147 Mar 11 14:28 mypubkey.txt
-rw-r--r-- 1 cbkadal cbkadal  491 Mar 11 14:28 myrank.txt
-rw-r--r-- 1 cbkadal cbkadal 1576 Mar 15 19:29 myscript.sh
-rw-r--r-- 1 cbkadal cbkadal  478 Mar 18 19:30 SHA256SUM
-rw-r--r-- 1 cbkadal cbkadal  833 Mar 18 19:30 SHA256SUM.asc

cbkadal@osp:~/git/os211/TXT$ bash myscript.sh
~/RESULT ~/git/os211/TXT
tar cfj myW03.tar.bz2 W03/
gpg --armor --output myW03.tar.bz2.asc --encrypt --recipient operatingsystems@vlsm.org --recipient cbk@dummy myW03.tar.bz2
tar cfj myW04.tar.bz2 W04/
gpg --armor --output myW04.tar.bz2.asc --encrypt --recipient operatingsystems@vlsm.org --recipient cbk@dummy myW04.tar.bz2
~/git/os211/TXT
Check and move /home/cbkadal/RESULT/myW03.tar.bz2.asc...
Check and move /home/cbkadal/RESULT/myW04.tar.bz2.asc...
Check and move /home/cbkadal/RESULT/fakeDODOL...
rm -f SHA256SUM SHA256SUM.asc
sha256sum my*.asc my*.txt my*.sh > SHA256SUM
sha256sum -c SHA256SUM
myW03.tar.bz2.asc: OK
myW04.tar.bz2.asc: OK
mylog.txt: OK
mypubkey.txt: OK
myrank.txt: OK
myscript.sh: OK
gpg -o SHA256SUM.asc -a -sb SHA256SUM
gpg --verify SHA256SUM.asc SHA256SUM
gpg: Signature made Thu 18 Mar 2021 19:31:19 WIB
gpg:                using RSA key 56754A8214D01B20B97BF5EF078CA2C2F3F22F37
gpg: Good signature from "Cicak Bin Kadal (CBK) <cbk@dummy>" [ultimate]

cbkadal@osp:~/git/os211/TXT$ ls -al
total 48
drwxr-xr-x 2 cbkadal cbkadal  4096 Mar 18 19:31 .
drwxr-xr-x 9 cbkadal cbkadal  4096 Mar 18 19:25 ..
-rw-r--r-- 1 cbkadal cbkadal  1171 Mar 11 14:28 mylog.txt
-rw-r--r-- 1 cbkadal cbkadal  3147 Mar 11 14:28 mypubkey.txt
-rw-r--r-- 1 cbkadal cbkadal   491 Mar 11 14:28 myrank.txt
-rw-r--r-- 1 cbkadal cbkadal  1576 Mar 15 19:29 myscript.sh
-rw-r--r-- 1 cbkadal cbkadal  3555 Mar 18 19:31 myW03.tar.bz2.asc
-rw-r--r-- 1 cbkadal cbkadal 11623 Mar 18 19:31 myW04.tar.bz2.asc
-rw-r--r-- 1 cbkadal cbkadal   478 Mar 18 19:31 SHA256SUM
-rw-r--r-- 1 cbkadal cbkadal   833 Mar 18 19:31 SHA256SUM.asc

cbkadal@osp:~/git/os211/TXT$


Do the “4 git mantra”: pull, add, commit, push.

INPUT

git pull; git add -A; git commit -m "OS211 cbkadal"; git push;

OUTPUT

cbkadal@osp:~/git/os211/TXT$ git pull; git add -A; git commit -m "OS211 cbkadal"; git push;
Already up to date.
[master 266b231] OS211 cbkadal
 6 files changed, 260 insertions(+), 78 deletions(-)
 rewrite TXT/SHA256SUM.asc (91%)
 rewrite TXT/myW03.tar.bz2.asc (96%)
 create mode 100644 TXT/myW04.tar.bz2.asc
Enumerating objects: 16, done.
Counting objects: 100% (16/16), done.
Delta compression using up to 6 threads
Compressing objects: 100% (9/9), done.
Writing objects: 100% (9/9), 12.76 KiB | 12.76 MiB/s, done.
Total 9 (delta 4), reused 0 (delta 0)
remote: Resolving deltas: 100% (4/4), completed with 4 local objects.
To github.com:cbkadal/os211.git
   0798df0..266b231  master -> master

cbkadal@osp:~/git/os211/TXT$

CHECK LIST

HOMEPAGE: links to W01/, W02/, W03/, W04/
Top10 Files: w01.md, w02.md, w03.md, w04.md
TXT/mylog.txt: Log Update
TXT/mypubkey.txt: Public Key
TXT/myrank.txt: Top10 review up to Week03.
TXT/myscript.sh: A script to automate the process
TARBALLS: myW03.tar.bz2.asc, myW04.tar.bz2.asc (assignments)
Checksum: SHA256SUM 
Signature: SHA256SUM.asc



HOME ABOUT WEB GITHUB TOP BOTTOM PREV NEXT