Cover V03, I03
Article
Figure 1
Figure 2
Listing 1
Listing 10
Listing 11
Listing 12
Listing 13
Listing 14
Listing 2
Listing 3
Listing 4
Listing 5
Listing 6
Listing 7
Listing 8
Listing 9

may94.tar


Listing 10: prog6

:
#######################################################
# prog6 - list 0-length files and core files
#######################################################

# see also mklist
masterlist=/usr/stevei/c/stat/master.list

cat $masterlist |
awk '
/core$/       { core++   ; print ; next }
/^...[sS]/    { setuid++ ; print ; next }
/^......[sS]/ { setgid++ ; print ; next }
{
fsize=$7
if ( fsize == 0 )
{ zerolen++ ; print }
}
END {
printf("%10d core files\n", core)
printf("%10d setuid files\n", setuid)
printf("%10d setgid files\n", setgid)
printf("%10d zero-length files\n", zerolen)

}'