Hello.
This command is correct :
find /home/user_install \( \
\( -type d \( -iname "*firefox*" -o -iname ".cache" -o -iname "libreoffice" \
-o -iname "session" -o -wholename "/home/user_install/dir1/dir2/¬¬ICONS_WALLPAPERS_THEMES" \) \) -prune -o \
\( -type f \( -iname "*.iso" -o -iname "*.png" -o -iname "*.jpg" \
-o -iname "*.log*" -o -iname "*.run" \) \) -prune -o \
\( ! -newer /run/media/user_install/BESTRUNNER-8Go-14/NEW_INSTALL_SYSTEM/HOME_USER_INSTALL_4-skel-file-change-flag/foo_ref_date_2019_11_18_16h_41m_00s.txt \) -prune \) -o -print
user_install@ASUS-G750JZ-JC:~> ~/test_027.sh
/home/user_install
/home/user_install/.config
/home/user_install/.config/startupconfigkeys
/home/user_install/.config/kdeglobals
/home/user_install/.config/startupconfig
/home/user_install/.config/startupconfigfiles
/home/user_install/.config/gtkrc
/home/user_install/.config/gtkrc-2.0
....................
/home/user_install/test_025.sh
/home/user_install/error_log.txt
/home/user_install/test_020.sh
/home/user_install/test_021.sh
Now I would like to remove result coming from starting point.
The following should be removed :
/home/user_install/test_025.sh
/home/user_install/error_log.txt
/home/user_install/test_020.sh
/home/user_install/test_021.sh
I have tried to put -mindepth 1
in different places but that does not work :
find /home/user_install -mindepth 1 \( \
..........
..........
Do not change output
/home/user_install/test_025.sh
/home/user_install/error_log.txt
/home/user_install/test_020.sh
/home/user_install/test_021.sh
or
find /home/user_install \( \
\( -mindepth 1 \) \
..........................
give a warning :
find: warning: you have specified the -mindepth option after a non-option argument (, but options are not positional (-mindepth affects tests specified before it as well as those specified after it). Please specify options before other arguments.
Or does not work at all ( .cache should be exclude )
...........
...........
/home/user_install/.cache/mesa_shader_cache
/home/user_install/.cache/mesa_shader_cache/index
/home/user_install/.cache/mesa_shader_cache/78
/home/user_install/.cache/mesa_shader_cache/78/ba03e85b7c39a151259121010c6c8d3b6243a3
...........
/
Any help is welcome