COP4342 - 2019 Spring
Assignment 1 - Copies

Please login to cop3353.org.

All that you need to do in this assignment is a create a subdirectory "assignment1" in your home directory that has (almost) exact copies of the files in /assignments/assignment1. Here's what that directory looks like, using ls, du, and stat:

cop4342test@cop3353:~$ ls -ali /assignments/assignment1/
total 1040
764930 drwxr-xr-x 2 root root   4096 Feb  1 16:54 .
764929 drwxr-xr-x 3 root root   4096 Feb  1 17:06 ..
764931 -rw-r--r-- 2 root root      0 Feb  1 16:32 a
764932 -rw-r--r-- 1 root root      0 Feb  1 16:32 b
764933 -rw-r--r-- 1 root root      0 Feb  1 16:32 c
764934 lrwxrwxrwx 1 root root      1 Feb  1 16:32 d -> a
764931 -rw-r--r-- 2 root root      0 Feb  1 16:32 e
764935 prw-r--r-- 1 root root      0 Feb  1 16:33 f
764936 -rw-r--r-- 1 root root 524288 Feb  1 16:42 g
764937 -rw-r--r-- 1 root root 575488 Feb  1 16:46 h
764938 -rw-r--r-- 1 root root 524288 Feb  1 16:54 s
cop4342test@cop3353:~$ du -sh /assignments/assignment1/*
0       /assignments/assignment1/a
0       /assignments/assignment1/b
0       /assignments/assignment1/c
0       /assignments/assignment1/d
0       /assignments/assignment1/f
468K    /assignments/assignment1/g
564K    /assignments/assignment1/h
0       /assignments/assignment1/s
cop4342test@cop3353:~$ for name in /assignments/assignment1/*; do stat $name; done
  File: '/assignments/assignment1/a'
  Size: 0               Blocks: 0          IO Block: 4096   regular empty file
Device: 800h/2048d      Inode: 764931      Links: 2
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2019-02-01 17:08:46.219996927 +0000
Modify: 2019-02-01 16:32:45.043330271 +0000
Change: 2019-02-01 17:07:58.116663597 +0000
 Birth: -
  File: '/assignments/assignment1/b'
  Size: 0               Blocks: 0          IO Block: 4096   regular empty file
Device: 800h/2048d      Inode: 764932      Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2019-02-01 17:08:46.219996927 +0000
Modify: 2019-02-01 16:32:45.043330271 +0000
Change: 2019-02-01 17:07:58.116663597 +0000
 Birth: -
  File: '/assignments/assignment1/c'
  Size: 0               Blocks: 0          IO Block: 4096   regular empty file
Device: 800h/2048d      Inode: 764933      Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2019-02-01 17:08:46.219996927 +0000
Modify: 2019-02-01 16:32:45.043330271 +0000
Change: 2019-02-01 17:07:58.116663597 +0000
 Birth: -
  File: '/assignments/assignment1/d' -> 'a'
  Size: 1               Blocks: 0          IO Block: 4096   symbolic link
Device: 800h/2048d      Inode: 764934      Links: 1
Access: (0777/lrwxrwxrwx)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2019-02-01 17:08:08.813330260 +0000
Modify: 2019-02-01 16:32:52.829996934 +0000
Change: 2019-02-01 17:07:58.116663597 +0000
 Birth: -
  File: '/assignments/assignment1/e'
  Size: 0               Blocks: 0          IO Block: 4096   regular empty file
Device: 800h/2048d      Inode: 764931      Links: 2
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2019-02-01 17:08:46.219996927 +0000
Modify: 2019-02-01 16:32:45.043330271 +0000
Change: 2019-02-01 17:07:58.116663597 +0000
 Birth: -
  File: '/assignments/assignment1/f'
  Size: 0               Blocks: 0          IO Block: 4096   fifo
Device: 800h/2048d      Inode: 764935      Links: 1
Access: (0644/prw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2019-02-01 16:33:05.809996933 +0000
Modify: 2019-02-01 16:33:05.809996933 +0000
Change: 2019-02-01 17:07:58.116663597 +0000
 Birth: -
  File: '/assignments/assignment1/g'
  Size: 524288          Blocks: 936        IO Block: 4096   regular file
Device: 800h/2048d      Inode: 764936      Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2019-02-01 17:08:46.219996927 +0000
Modify: 2019-02-01 16:42:24.153330260 +0000
Change: 2019-02-01 17:07:58.116663597 +0000
 Birth: -
  File: '/assignments/assignment1/h'
  Size: 575488          Blocks: 1128       IO Block: 4096   regular file
Device: 800h/2048d      Inode: 764937      Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2019-02-01 17:08:46.229996927 +0000
Modify: 2019-02-01 16:46:27.713330270 +0000
Change: 2019-02-01 17:07:58.116663597 +0000
 Birth: -
  File: '/assignments/assignment1/s'
  Size: 524288          Blocks: 0          IO Block: 4096   regular file
Device: 800h/2048d      Inode: 764938      Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2019-02-01 16:54:27.193330262 +0000
Modify: 2019-02-01 16:54:27.193330262 +0000
Change: 2019-02-01 17:07:58.116663597 +0000
 Birth: -
  

Here's what your ~/assignment1/ directory should look like (largely, of course, since the ownership will of course be shown as your username, and the inode numbers will be different):

cop4342test@cop3353:~$ ls -ali ~/assignment1/
total 1040
392886 drwxr-xr-x  2 cop4342test cop4342test   4096 Feb  1 16:54 .
391515 drwx------ 12 cop4342test cop4342test   4096 Feb  1 17:08 ..
392887 -rw-r--r--  2 cop4342test cop4342test      0 Feb  1 16:32 a
392888 -rw-r--r--  1 cop4342test cop4342test      0 Feb  1 16:32 b
392889 -rw-r--r--  1 cop4342test cop4342test      0 Feb  1 16:32 c
392890 lrwxrwxrwx  1 cop4342test cop4342test      1 Feb  1 16:32 d -> a
392887 -rw-r--r--  2 cop4342test cop4342test      0 Feb  1 16:32 e
392891 prw-r--r--  1 cop4342test cop4342test      0 Feb  1 16:33 f
392892 -rw-r--r--  1 cop4342test cop4342test 524288 Feb  1 16:42 g
392893 -rw-r--r--  1 cop4342test cop4342test 575488 Feb  1 16:46 h
392894 -rw-r--r--  1 cop4342test cop4342test 524288 Feb  1 16:54 s
cop4342test@cop3353:~$ du -sh ~/assignment1/*
0       assignment1/a
0       assignment1/b
0       assignment1/c
0       assignment1/d
0       assignment1/f
468K    assignment1/g
564K    assignment1/h
0       assignment1/s
cop4342test@cop3353:~$ for name in ~/assignment1/*; do stat $name; done
  File: '/home/COP4342/cop4342test/assignment1/a'
  Size: 0               Blocks: 0          IO Block: 4096   regular empty file
Device: 800h/2048d      Inode: 392887      Links: 2
Access: (0644/-rw-r--r--)  Uid: ( 6099/cop4342test)   Gid: ( 6099/cop4342test)
Access: 2019-02-01 16:33:37.219996928 +0000
Modify: 2019-02-01 16:32:45.043330271 +0000
Change: 2019-02-01 17:08:46.219996927 +0000
 Birth: -
  File: '/home/COP4342/cop4342test/assignment1/b'
  Size: 0               Blocks: 0          IO Block: 4096   regular empty file
Device: 800h/2048d      Inode: 392888      Links: 1
Access: (0644/-rw-r--r--)  Uid: ( 6099/cop4342test)   Gid: ( 6099/cop4342test)
Access: 2019-02-01 16:33:37.219996928 +0000
Modify: 2019-02-01 16:32:45.043330271 +0000
Change: 2019-02-01 17:08:46.219996927 +0000
 Birth: -
  File: '/home/COP4342/cop4342test/assignment1/c'
  Size: 0               Blocks: 0          IO Block: 4096   regular empty file
Device: 800h/2048d      Inode: 392889      Links: 1
Access: (0644/-rw-r--r--)  Uid: ( 6099/cop4342test)   Gid: ( 6099/cop4342test)
Access: 2019-02-01 16:33:37.219996928 +0000
Modify: 2019-02-01 16:32:45.043330271 +0000
Change: 2019-02-01 17:08:46.219996927 +0000
 Birth: -
  File: '/home/COP4342/cop4342test/assignment1/d' -> 'a'
  Size: 1               Blocks: 0          IO Block: 4096   symbolic link
Device: 800h/2048d      Inode: 392890      Links: 1
Access: (0777/lrwxrwxrwx)  Uid: ( 6099/cop4342test)   Gid: ( 6099/cop4342test)
Access: 2019-02-01 17:08:51.726663592 +0000
Modify: 2019-02-01 16:32:52.829996934 +0000
Change: 2019-02-01 17:08:46.219996927 +0000
 Birth: -
  File: '/home/COP4342/cop4342test/assignment1/e'
  Size: 0               Blocks: 0          IO Block: 4096   regular empty file
Device: 800h/2048d      Inode: 392887      Links: 2
Access: (0644/-rw-r--r--)  Uid: ( 6099/cop4342test)   Gid: ( 6099/cop4342test)
Access: 2019-02-01 16:33:37.219996928 +0000
Modify: 2019-02-01 16:32:45.043330271 +0000
Change: 2019-02-01 17:08:46.219996927 +0000
 Birth: -
  File: '/home/COP4342/cop4342test/assignment1/f'
  Size: 0               Blocks: 0          IO Block: 4096   fifo
Device: 800h/2048d      Inode: 392891      Links: 1
Access: (0644/prw-r--r--)  Uid: ( 6099/cop4342test)   Gid: ( 6099/cop4342test)
Access: 2019-02-01 16:33:05.809996933 +0000
Modify: 2019-02-01 16:33:05.809996933 +0000
Change: 2019-02-01 17:08:46.219996927 +0000
 Birth: -
  File: '/home/COP4342/cop4342test/assignment1/g'
  Size: 524288          Blocks: 936        IO Block: 4096   regular file
Device: 800h/2048d      Inode: 392892      Links: 1
Access: (0644/-rw-r--r--)  Uid: ( 6099/cop4342test)   Gid: ( 6099/cop4342test)
Access: 2019-02-01 16:42:43.196663593 +0000
Modify: 2019-02-01 16:42:24.153330260 +0000
Change: 2019-02-01 17:08:46.229996927 +0000
 Birth: -
  File: '/home/COP4342/cop4342test/assignment1/h'
  Size: 575488          Blocks: 1128       IO Block: 4096   regular file
Device: 800h/2048d      Inode: 392893      Links: 1
Access: (0644/-rw-r--r--)  Uid: ( 6099/cop4342test)   Gid: ( 6099/cop4342test)
Access: 2019-02-01 16:46:57.093330259 +0000
Modify: 2019-02-01 16:46:27.713330270 +0000
Change: 2019-02-01 17:08:46.229996927 +0000
 Birth: -
  File: '/home/COP4342/cop4342test/assignment1/s'
  Size: 524288          Blocks: 0          IO Block: 4096   regular file
Device: 800h/2048d      Inode: 392894      Links: 1
Access: (0644/-rw-r--r--)  Uid: ( 6099/cop4342test)   Gid: ( 6099/cop4342test)
Access: 2019-02-01 16:54:27.193330262 +0000
Modify: 2019-02-01 16:54:27.193330262 +0000
Change: 2019-02-01 17:08:46.229996927 +0000
 Birth: -
  
Please note that files a and e should have the same inode number, and that the du information is quite surprising for some of the files, and you should make sure that your files preserve any unusual filesize characteristics. And, of course, some of these files are not regular files, so you should make sure that this information is also preserved.

Please finish this by noon on Monday, February 4. I will be checking your work around that time.