Sunday, November 29, 2015

Find recipes


  • Traverse through a directory, skip certain folders:
find .  ! -path "./dir1/*" ! -path "./.dir2/*" ! -path "./dir3/dir4/*" -type f

  • Find matches for certain files:
find . -iname "*.css" -o -iname "*.js" -type f
OR
find . -type f -a \( -iname "*.css" -o -iname "*.js" \)

expr1 expr2 is the same as expr1 -a expr2

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home