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

Re: $find -executable, $ls e $stat. Cosa accade?



On Thu, Apr 20, 2017 at 08:33:27PM +0200, Davide Prina wrote:
> On 20/04/2017 11:43, Felipe Salvador wrote:
> 
> > $ find ~/ -type f -executable -name "*.html" -o -name "*.cfg" -o -name
> > "*.xml" -o -name "*.txt" -exec chmod -x {} \;
> > 
> > Si suppone che in questo modo i permessi di ogni file trovato vengano
> > modificati e in effetti così pare essere, se non fosse che,
> > rilanciando:
> > 
> > $ find ~/ -type f -executable -name "*.html" -o -name "*.cfg" -o -name
> > "*.xml" -o -name "*.txt"
> > 
> > la lista dei files trovati appare invariata.
> 
> $ mkdir /tmp/1
> $ cd /tmp/1
> $ touch a.txt
> $ touch a.html
> $ ls -l
> totale 0
> -rw-r--r-- 1 davide davide 0 apr 20 20:28 a.html
> -rw-r--r-- 1 davide davide 0 apr 20 20:28 a.txt
> $ find /tmp/1 -type f -executable -name "*.html" -o -name "*.txt"
> /tmp/1/a.txt
> $ find /tmp/1 -type f -executable -name "*.html" \
>            -o -type f -executable -name "*.txt"
> $

Illuminante,
erano tutti files di cui mi vergogno, perlopiù giochi proprietari,
(pare che sia TUTTO eseguibile in quelle cartelle), qualcosa di
firefox.

Grazie


> Ciao
> Davide
> 

-- 
Felipe Salvador


Reply to: