shell-script-pt
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [shell-script] Verficar permissao 777


From: romano
Subject: Re: [shell-script] Verficar permissao 777
Date: Tue, 17 Mar 2009 15:41:50 -0300
User-agent: Thunderbird 2.0.0.19 (X11/20090105)

stat -c '%a' arquivo.

exemplo


romano@Romano:~/Desktop$ stat -c '%a' Ranma½\ Vol02.zip
644

Ai para saber se ele é 777 é só fazer um if

$file=Ranma½\ Vol02.zip
[[ (stat -c '%a' $file) -eq 640 ]] && echo "sou um arquivo 640"


Ae o if eu não testei só o stat, da uma olhada no help do stat que ele é bem completo.

Att: Bruno Romano


reply via email to

[Prev in Thread] Current Thread [Next in Thread]