| 1 | #!/bin/bashscip-shell filesystem . . `/bin/bash`. |
| 2 | # fileinfo.sh |
| 3 | |
| 4 | FILES="/usr/sbin/accept |
| 5 | /usr/sbin/pwck |
| 6 | /usr/sbin/chroot |
| 7 | /usr/bin/fakefile |
| 8 | /sbin/badblocks |
| 9 | /sbin/ypbind" # List of files you are curious about. |
| 10 | # Threw in a dummy file, /usr/bin/fakefile. |
| 11 | |
| 12 | echoscip-shell system . . echo. |
| 13 | |
| 14 | for file in $FILES |
| 15 | do |
| 16 | |
| 17 | if [scip-shell system . . `[`. ! -e "$file" ] # Check if file exists. |
| 18 | then |
| 19 | echoscip-shell system . . echo. "$file does not exist."; echoscip-shell system . . echo. |
| 20 | continue # On to next. |
| 21 | fi |
| 22 | |
| 23 | lsscip-shell system . . ls. -l $file | awkscip-shell system . . awk. '{ print $8 " file size: " $5 }' # Print 2 fields. |
| 24 | whatisscip-shell system . . whatis. `basenamescip-shell system . . basename. $file` # File info. |
| 25 | # Note that the whatis database needs to have been set up for this to work. |
| 26 | # To do this, as root run /usr/bin/makewhatis. |
| 27 | echoscip-shell system . . echo. |
| 28 | done |
| 29 | |
| 30 | exit 0 |