Re: Lista directory con permessi [messaggio #39656] |
lun, 20 giugno 2011 16:13 |
Pictor Messaggi: 18 Registrato: gennaio 2011 |
Junior Member |
|
|
On 20 Giu, 12:51, "mallin.shetland" <nob...@nowhere.es> wrote:
>
>
> find %startdirectory -type d execdir stat --printf '%A;%C;%N\n' +
>
> man find
> man stat
Non capisco il "+" finale nella sintassi di 'execdir'.... non è parte
dell'espressione "stat" vero? Dal man di 'find' non si capisce.
Ho sistemato il resto ma, messi insieme così, mi restituisce un
errore:
find: paths must precede expression
e non riesco a farglielo digerire. Ho provato a giocare un pò di apici
e quotes ma non capisco cosa gli dia fastidio....
|
|
|
Re: Lista directory con permessi [messaggio #39666 è una risposta a message #39656] |
lun, 20 giugno 2011 20:19 |
mallin.shetland Messaggi: 129 Registrato: novembre 2010 |
Senior Member |
|
|
Addì lunedì 20 giugno 2011 16:13 Pictor scrisse:
> Non capisco il "+" finale nella sintassi di 'execdir'.... non è parte
> dell'espressione "stat" vero? Dal man di 'find' non si capisce.
Non si capisce? Boh. Visto che hai difficoltà con l'italiano
ti mando l'originale del manuale in inglese
man find
....
-execdir command ;
-execdir command {} +
Like -exec, but the specified command is run from the subdirectory
containing the matched file, which is not normally the directory
in which you started find. This a much more secure method for invoking
commands, as it avoids race conditions during resolution of the paths
to the matched files. As with the -exec action, the ‘+' form of
-execdir will build a command line to process more than one matched
file, but any given invocation of command will only list files that
exist in the same subdirectory. If you use this option, you must ensure
that your $PATH environment variable does not reference ‘.'; otherwise,
an attacker can run any commands they like by leaving an appropriately-
named file in a directory in which you will run -execdir. The same
applies to having entries in $PATH which are empty or which are not
absolute directory names.
....
> Ho sistemato il resto ma, messi insieme così, mi restituisce un
> errore:
In effetti ho commesso alcuni refusi, l'espressione corretta è:
find $startdirectory -type d -execdir stat --printf '%A;%C;%N\n' {} +
Capisci cosa vuol dire $startdirectory vero?
|
|
|