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

Python Kivy ListView: How to delete selected ListItemButton? -

asp.net mvc 4 - A specified Include path is not valid. The EntityType '' does not declare a navigation property with the name '' -