Excluding directories with find
I am trying to exclude 2 directories with find and pass it into cpio. I have tried
Code:
find . -depth -path '.evolution' -prune -o -path '.gconf' -prune -o -print|cpio -aov > /media/caca/full$date Code:
find . -depth \( -path ./evolution -prune -o -path ./gconf -prune \) -print|cpio -aov > /media/caca/full$date Code:
find . \( -wholename ./evolution -o -wholename ./gconf \) -prune -o -type f -print0 | cpio -aov /media/caca/backup$date Code:
find . -type d \( -name ".evolution" -o -name ".gconf" \) -prune -o -print0 | cpio -aov /media/caca/backup$date |
I don't think you need the '-depth' flag :)
Code:
find . -path './FOO' -prune -o -path './BAR' -prune -o print Hope this helps, |
Code:
find . \( -wholename ./.evolution -o -wholename ./.gconf \) -prune -o -print |
this worked
Code:
find . \( -wholename ./.evolution -o -wholename ./.gconf \) -prune -o -print Code:
find . -path './FOO' -prune -o -path './BAR' -prune -o print |
Hehe, sorry, look like I left the hyphen out before 'print'. If your problem is solved, could you mark the thread '[SOLVED]' too? Thanks :)
|
All times are GMT -5. The time now is 07:21 AM. |