I have a quick and prehaps easy to solve problem. I was listing a directories list via
find ~/me/ -maxdepth 1 -type d -not -name "test1" -and -not -name "test4"
$ find ~/me/ -maxdepth 1 -type d -not -name "test1" -and -not -name "test4"
/home/me/
/home/me/test2
/home/me/test3
I want to use something like: find ~/me/ -maxdepth 1 -type d -not -name "test1" -and -not -name "test4" | xargs rm -rf
, however the find shows me the:
/home/me root dir.
I was looking for a way to not include it in the search results. Any hints? Thanks in advance.
-mindepth 1
not working for you?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With