Create tar.gz in OpenSolaris

I need to make backup for our public_html directory

using tar command I used to use :

tar cvzf  filename.tar.gz directory_name

It work in linux or bsd but I have different situation with OpenSolaris :

# uname -a

SunOS TGLxxxxxxx 5.11 snv_86 i86pc i386 i86xpv

# tar cvzf public_html.tar.gz public_html

tar: z: unknown function modifier
Usage: tar {c|r|t|u|x}[BDeEFhilmnopPqTvw@/[0-7]][bfk][X…] [blocksize] [tarfile] [size] [exclude-file…] {file | -I include-file | -C directory file}…

Combine it with gzip using pipe will give tar.gz file :

tar cvf -  public_html | gzip > public_html.tar.gz

Yes, it works!

scp time.

P.S :

In case you want to extract .tar.gz file in OpenSolaris use this command :

gzip -dc filename.tar.gz | tar xvf –

in Work | 131 Words

Trying OpenSolaris VPS : Install pkg-get

I have chance to try opensolaris vps, since I have no experience in OpenSolaris before I try to learn some basic command before achieve my goal :

Running wordpress in my OpenSolaris VPS

Here’s what I reach so far :

1. pkg for listing file

[arasyid@TGL107201 mysql]# pkg list -s | grep mysql
SUNWmysql-base                 MySQL Database Management System (Base)
SUNWmysql5                     MySQL 5.0.45 – MySQL Database Management System (usr component)

2. pkgadd for install

pkgadd -d

By default, it wil save all file in /opt

Make sure to update /opt/csw/etc/pkg-get.conf for nearest mirror

I use :


Using vi and update catalog file:

/opt/csw/bin/pkg-get -U

3. Use pkg-get for install software

I want to install nano for vi alternative 🙂

/opt/csw/bin/pkg-get -i nano

I want to install ee but I can’t find it.

[arasyid@TGL107201 bin]# /opt/csw/bin/pkg-get -a | grep nano
nano 1.2.5,REV=2005.08.14
[arasyid@TGL107201 bin]#

Install wget for download file

/opt/csw/bin/pkg-get -i wget

Great, I love it.

in Unix | 178 Words