开发者

How to stop find command from listing folders with dot(.)

开发者 https://www.devze.com 2023-03-04 09:24 出处:网络
In my home dir , i have folders like .cpan .cpcpanand they are also showing. How i hide them . i am using

In my home dir , i have folders like .cpan .cpcpan and they are also showing.

How i hide them . i am using

find /home -mindepth 1 -maxdepth 1 -type d -printf 开发者_JS百科"%f\n"


Prune them.

find /home -mindepth 1 -maxdepth 1 -type d \( -name '.*' -prune -o -printf "%f\n" \)
0

精彩评论

暂无评论...
验证码 换一张
取 消