#!/bin/sh # (C)2006 Sato Makoto # Print all permissions and numeric modes. # to "permissions_list.txt". # you must execute this script by superuser # or sudo, setuid root, etc. # This script generate "[0-9][0-9][0-9][0-9][0-9]LIST". # why? LIST=permissions_list.txt TEMP=hogehogehogehoge touch $$LIST $TEMP for S in 0 1 2 3 4 5 6 7 do for U in 0 1 2 3 4 5 6 7 do for G in 0 1 2 3 4 5 6 7 do for O in 0 1 2 3 4 5 6 7 do chmod $S$U$G$O $TEMP echo -n "$S$U$G$O is " >> $LIST ls -l $TEMP | cut -f 1 -d" " >> $LIST done done done done rm $TEMP