Updated: 2012-10-27 16:42 EDT
Your Final Exam schedule is posted in the ICT office and on the Course Home Page.
Review last week. Did you do everything assigned last week?
Why doesn’t this work? (See Worksheet section 5.3.)
$ touch lab5.3b
$ rm lab5.[3b]
A useful option to ls
is -L
- dereference symlinks:
$ ls -dils /bin/*sh
524294 936 -rwxr-xr-x 1 root root 955024 Apr 3 2012 /bin/bash
524318 108 -rwxr-xr-x 1 root root 109768 Mar 29 2012 /bin/dash
524419 0 lrwxrwxrwx 1 root root 4 Sep 7 00:22 /bin/rbash -> bash
524434 0 lrwxrwxrwx 1 root root 4 Sep 7 00:22 /bin/sh -> dash
524438 0 lrwxrwxrwx 1 root root 7 Sep 7 00:22 /bin/static-sh -> busybox
$ ls -dilsL /bin/*sh
524294 936 -rwxr-xr-x 1 root root 955024 Apr 3 2012 /bin/bash
524318 108 -rwxr-xr-x 1 root root 109768 Mar 29 2012 /bin/dash
524294 936 -rwxr-xr-x 1 root root 955024 Apr 3 2012 /bin/rbash
524318 108 -rwxr-xr-x 1 root root 109768 Mar 29 2012 /bin/sh
524297 1788 -rwxr-xr-x 1 root root 1827920 Apr 13 2012 /bin/static-sh
$ ls -dilsL /bin/*sh | sort
524294 936 -rwxr-xr-x 1 root root 955024 Apr 3 2012 /bin/bash
524294 936 -rwxr-xr-x 1 root root 955024 Apr 3 2012 /bin/rbash
524297 1788 -rwxr-xr-x 1 root root 1827920 Apr 13 2012 /bin/static-sh
524318 108 -rwxr-xr-x 1 root root 109768 Mar 29 2012 /bin/dash
524318 108 -rwxr-xr-x 1 root root 109768 Mar 29 2012 /bin/sh
find
is -links
- find by number of links:
$ find /lib -type f -links +1 -ls
find
is -inum
- find by inode number:
$ find /lib -inum 171600 -ls
Changes by Ubuntu to the basic Unix security model for symlinks and hard links:
sysctl -w kernel.yama.protected_sticky_symlinks=0
sysctl -w kernel.yama.protected_nonaccess_hardlinks=0