[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [linux] commande Linux
perm=`ls -l $1 | sed "
s/^.\(.\{9\}\).*/\1/
s/\(..[sS]..[sS]..[^tT]\)/6\1/
s/\(..[sS]..[^sS]..[tT]\)/5\1/
s/\(..[sS]..[^sS]..[^tT]\)/4\1/
s/\(..[^sS]..[sS]..[tT]\)/3\1/
s/\(..[^sS]..[sS]..[^tT]\)/2\1/
s/\(..[^sS]..[^sS]..[tT]\)/1\1/
s/S/-/g; s/s/x/g; s/t/x/; s/T/-/; s/--x/1/g
s/-w-/2/g; s/-wx/3/g; s/r--/4/g; s/r-x/5/g
s/rw-/6/g; s/rwx/7/g; s/---/0/g"`
Voila un super alias qui fait cela.
Il vient de R.farow (un Auteur dans Usenix mag).
hope this helps
alx
--
---
Alexandre Dulaunoy
Work : http://www.conostix.com/ adulau@conostix.com
Private : http://www.thinkingsecure.com/ adulau@thinkingsecure.com
"Liberty is the great parent of science and of virtue; and a nation will
be great in both in proportion as it is free. " T. Jefferson
On Wed, 26 Sep 2001, cahier wrote:
> Bonjour
> J'ai besoins d'afficher les permissions d'un fichier non pas sous la
> forme "drwxrwxrwx" mais sous une forme numérique "1777 ,775, ...".
> Le man ls ne m'a rien donné.
> Comment faire ?
> Merci pour vos futures réponses.
>
>
[ Soyez précis dans vos sujets svp afin de déterminer directement ]
[ le type de demande... ]
[ Pour vous (dés)inscrire, aller sur http://unixtech.be/ml.php ]
[ Archives de la mailing list: http://archives.unixtech.be/linux/ ]
[ http://unixtech.be Contact: listmaster@unixtech.be ]