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

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

Re: [shell-script] Expressão Regular para identificar executavel


From: Marcelo Beckmann
Subject: Re: [shell-script] Expressão Regular para identificar executavel
Date: Sun, 6 Feb 2005 03:43:49 -0200

hmmm....
Você quer procurar por arquivos que tenham algum bit de permissão de
execução setado?

Se for isso, o find resolve:
find . -type f -perm +111

Vamos testar:
[03:42:10 marcelo@cadaver teste]$ ls -laF
total 28
drwxrwxr-x    2 marcelo  marcelo      4096 Fev  6 03:42 ./
drwxrwxrwt   94 root     root        12288 Fev  6 03:29 ../
-rw-rw-r--    1 marcelo  marcelo        30 Fev  6 03:30 f.sh
-rwxr-x---    1 marcelo  marcelo        30 Fev  6 03:30 g.sh*
-rw-rw-r--    1 marcelo  marcelo        30 Fev  6 03:30 h.sh
[03:42:14 marcelo@cadaver teste]$ find . -type f -perm +111
./g.sh

[]s
Marcelo Beckmann


On Sat, 5 Feb 2005 15:28:30 -0200, Herbert Alexander Faleiros
<address@hidden> wrote:
> 
> On Saturday 05 February 2005 15:02, J. F. Mitre wrote:
> > Estou em busca de uma expressão regular que me ajude a identificar
> > executáveis através da permissão octal....
> 
> ER não sei, mas vc pode user o file associado ao grep e procurar por ELF's.
> 
> find . | xargs file | grep "executable" | grep ELF
> find . | xargs file | grep "shared object" | grep ELF
>


reply via email to

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