java -jar yuicompressor-x.y.z.jar style.css
In this case I'm assuming that the CSS file is located in the same directory of the YUI Compressor, but you can specify a complete path if you want to. This is a basic usage of the YUI Compressor. The
-x.y.z letters indicate the tool's version, so you have to substitute them when you run the previous example. A more advanced usage involves some parameters that allow you to specify how the output file should be treated. For example, here we use the
-o parameter to redirect our input to an output file:
java -jar yuicompressor-x.y.z.jar style.css -o style.min.css
Again, you can use absolute paths to redirect everything elsewhere. There are many other parameters available that you can easily find here.