How to extract files from compressed archives in Linux CLI

Sometimes I have an archives with unknown (for me) compression format. It's easy if it happened when I use GUI FileRoller or other GUI archive tools. But when I logged in CLI (command line interface/console) I should know command and parameters to unpack.


Bad team leader

I worked in webdev company for position "team leader" last 10 month. It's not a lot but it's enough to announce some findings.


О бобре и справедливости

Кто-то работает за идею, кто-то за красивый вид из окна, кто-то работает за деньги. Мы работаем за деньги. — Такова позиция многих предпринимателей, веб-студии — не исключение. Но есть пара моментов:


Minifying CSS files with YUI Compressor


  1. Download .jar file from page
  2. Install java if you have not.

Let's make script for easy using (sudo vim /usr/bin/css-minify):

java -jar /path/to/build/dir/yuicompressor-2.4.8.jar $1 -o $2

sudo chmod +x /usr/bin/css-minify

And run this script:

css-minify style.css style.min.css


Compress JavaScript with Google Closure minifier


Now you can create shell-script for running minifier. Like this (sudo vim /usr/bin/js-minify):

java -jar /path/to/compiler-latest/compiler.jar --js $1 --js_output_file $2

sudo chmod +x /usr/bin/js-minify

You can use it as:

js-minify script.js script.min.js