-=Serj=- пишет:исключить некоторые расширения, типа - .gif .js .HLP .tif .TTF .css .ico .INF .ini .PFB
намекаете на то, что питон умеет регулярки?
man find
-regex pattern
File name matches regular expression pattern. This is a match on the whole
path, not a search. For example, to match a file named `./fubar3', you can
use the regular expression `.*bar.' or `.*b.*3', but not `f.*r3'. The regu-
lar expressions understood by find are by default Emacs Regular Expressions,
but this can be changed with the -regextype option.
Anatoly2012 пишет:Да, но не исключает указанные выше расширения и не предоставляет выбора что и где удалить, а что оставить. В этом плане питон практичней.
выбор нужен? И это есть у find
-ok command ;
Like -exec but ask the user first. If the user agrees, run the command.
Otherwise just return false. If the command is run, its standard input is
redirected from /dev/null.
The response to the prompt is matched against a pair of regular expressions
to determine if it is an affirmative or negative response. This regular
expression is obtained from the system if the `POSIXLY_CORRECT' environment
variable is set, or otherwise from find's message translations. If the sys-
tem has no suitable definition, find's own definition will be used. In
either case, the interpretation of the regular expression itself will be
affected by the environment variables 'LC_CTYPE' (character classes) and
'LC_COLLATE' (character ranges and equivalence classes).
и вообще, дрова лучше пилить бензопилой. Да, я знаю, ваш швейцарский нож тоже с пилой в комплекте. Но моя бензопила практичнее.
Anatoly2012 пишет:Не надо выкидывать то, что реально помогает и нет пока лучшей альтернативы.
ой, а мужики-то не знали... А как вы думаете, что делали тогда, когда вашего питона не было?
Anatoly2012 пишет:Простите, а как правильно будет связать эти команды:
по умолчанию find связывает по "И"
find УСЛОВИЕ1 AND УСЛОВИЕ2 AND УСЛОВИЕ3 AND ДЕЙСТВИЕ
ДЕЙСТВИЕ выполнится тогда, и только тогда, когда все условия истинны. Самое ДЕЙСТВИЕ -- тоже условие, ибо всякая команда выдаёт код возврата, и она истинна, если код равен 0.
Карусель разнесло по цепочке за час
Всех известий — конец
Да, весна началась!
(всё к лицу подлецу, как родному отцу, не рассказывай, батя, и так всё пройдёт)