В:
find -type f -name "*.txt" -exec sh -c 'mv -v "${0%/*}" ../bar' {} \;
find
открывает текущий каталог (.
), получает содержание (list1
). Затем продолжает обрабатывать тот список. Это обрабатывает dir6
; поскольку тот файл является каталогом, это chdirs в него, открывается, это получает второй список файлов (list2
), процессы file.txt
и делает:
mv -v ./dir6 ../bar
Теперь, find
текущий каталог не изменился, но его путь изменился: это теперь ../bar/dir6
. После окончания пересекающего содержания dir6
, это возвращается (chdir("..")
) и находится теперь в ../bar
. find
обнаруживает, что каталог не является тем же как прежде и выходы.
Приятель Я уверен, что вы уже поняли, но на всякий случай:
инструмент подскажет, что делать
[root@zabbix audit]# sealert -a /var/log/audit/audit.log
49% done'list' object has no attribute 'split'
100% done
found 1 alerts in /var/log/audit/audit.log
--------------------------------------------------------------------------------
SELinux is preventing /usr/bin/python2.7 from name_connect access on the tcp_socket port 3306.
***** Plugin catchall (100. confidence) suggests **************************
If you believe that python2.7 should be allowed name_connect access on the port 3306 tcp_socket by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep python /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp