linux - find command to prune only files starting with dot(filter files that start with dot) -


the following find command filters files , directories starting dot symbol.

find $pwd \( -name '.*' -prune \) -o -print  

where adding "-type f" condition not filter files starting dot.

find $pwd \( -name '.*' -type f -prune \) -o -print # not work 

how prune files starting dot

edit 1: clarification on "does not work"

the command lists file starting dot operator. later found symbolic link file(which not start dot). tried using -l (follow symbolic links) option below still listed symbolic link file starting dot.

find -l $pwd \( -name '.*' -type f -prune \) -o -print 

you seem bit confused meaning of "prune": -prune means do not descend subdirectory, not make sense -type f.


Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -