system administration is a craft

Wednesday, December 31, 2008

find命令中maxdepth和prune

找指定深度的目录:

find / -maxdepth 2 -name "fonts"

在找查文件时, exclude指定目录:

find / -path "/usr/portage" -prune -o -name "fonts"
* 不包括/usr/portage文件夹

0 comments:

Post a Comment