3

I'm trying to merge my CSS files the following way:

find /Applications/MAMP/htdocs/css/ -type f -name "*.css" -exec cat {} + > ./temporary/css_backend_merged.css

That works great, but I want to include only files that begin with a certain prefix e.g. "include_". Does anyone know how to tweak the find command to do that?

Thanks a lot!

1
  • 1
    -name "include_*.css" should do the trick.
    – Mikael S
    Dec 26, 2009 at 15:38

2 Answers 2

9

Just add the prefix in the -name argument.

find /Applications/MAMP/htdocs/css/ -type f -name "include_*.css" -exec cat {} + > /temporary/css_backend_merged.css
0
0

ok guys, just found it myself :)

find /Applications/MAMP/htdocs/css/ -type f -name "incl_*.css" -exec cat {} + > ./temporary/css_backend_merged.css

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .