#!/bin/sh
#파일인지 디렉토리인지 확인및파일은 rwx 가능한지 체크합니다.
for name in $(ls $1)
do
        echo -n "$name : "
        whf=$1/$name
        if [ -d $whf ]
        then
                echo "diretory"
        else
                if [ -r $whf ]
                then
                echo -n " r "
                fi
                if [ -w $whf ]
                then
                echo -n " w "
                fi
                if [ -x $whf ]
                then
                echo -n " x "
                fi
                echo "file"
        fi
done

+ Recent posts