Re: [#!/fr] Autre problème de droits.

Page principale
Supprimer ce message
Répondre à ce message
Auteur: koenig.yvan
Date:  
À: La liste francophone des scripts shell
Sujet: Re: [#!/fr] Autre problème de droits.
Je l'ai légèrement remanié afin de pouvoir l'utiliser aisément avec plusieurs disques connectés.

--{code}
--[SCRIPT deleteRevisions]
my deleteRevisions(path to startup disk as text)
-- my deleteRevisions("Aluice-500-Lion:")

on deleteRevisions(leVolume)
          local leDossier, cheminUnix
          set leDossier to leVolume & ".DocumentRevisions-V100:"
          set cheminUnix to quoted form of POSIX path of leDossier


-- do shell script "stat -F " & cheminUnix
--> "d--x--x--x 7 root wheel 238 Aug 7 11:21:07 2011 /.DocumentRevisions-V100//"

do shell script "chmod 700 " & cheminUnix with administrator privileges

-- do shell script "stat -F " & cheminUnix
--> "drwx------ 7 root wheel 238 Aug 7 15:47:00 2011 /.DocumentRevisions-V100//"

do shell script "rm -dfr " & cheminUnix with administrator privileges
--> ""
end deleteRevisions

--=====
--[/SCRIPT]
--{code}

Yvan KOENIG (VALLAURIS, France) dimanche 7 août 2011 22:30:47


_______________________________________________
archives :
http://listes.patpro.net/list/sshfr.fr.html
http://listes.patpro.net/mailman/listinfo/script_shell_fr