Unix Tar Command


Create

uncompressed

$ tar cvf [archive].tar [directory]
# c - create new archive
# v - verbose
# f - next argument is archive file name [archive]

gzip

$ tar cvzf [archive].tar.gz [directory]

bzip2

$ tar cvjf [archive].tar.bz2 [directory]

gzip vs bzip2

  • bzip2 more time to compress/decompress
  • bzip2 smaller size

Extract

uncompressed

$ tar xvf [archive]
# x - extract

gzip

$ tar xvzf [archive]

bzip2

$ tar xvjf [archive]

More Information


Comments


Basic Bitnami Commands


Stack Services

What services are in this stack that I can start and stop

$ ./ctlscript.sh help

Manage all stack services

$ ./ctlscript.sh start
$ ./ctlscript.sh restart
$ ./ctlscript.sh stop
$ ./ctlscript.sh status

Manage specific stack service

$ ./ctlscript.sh start [service]
$ ./ctlscript.sh restart [service]
$ ./ctlscript.sh stop [service]
$ ./ctlscript.sh status [service]

Examples

$ ./ctlscript.sh start apache
$ ./ctlscript.sh restart mysql
$ ./ctlscript.sh stop postgresql
$ ./ctlscript.sh status apache

Bitnami Shell Environment

Load environment

~ $ ./use_[stack]
~ $ . scripts/setenv.sh

Examples

Django Stack

$ ./use_djangostack

Node.js Stack

$ ./use_nodejs

Wordpress Stack

$ ./use_wordpress

Exit environment

$ exit

More Information


Comments


Basic Virtualenv Commands


Activate virtualenv

$ source [environment dir]/bin/activate

Deactivate virtualenv

$ deactivate

Create requirements.txt

~ $ source [environment dir]/bin/activate
~ $ pip freeze > requirements.txt
~ $ deactivate

Install new environment from requirements.txt

~ $ source [environment dir]/bin/activate
~ $ pip install -r requirements.txt
~ $ deactivate

Create new virtualenv with distribute

$ virtualenv --distribute [environment dir]

More Information


Comments