Packing with tar gzip, bzip2 and zip

Looking on my block at the end of the year i see than nearly two years ago i wrote about extracting archives under Linux but not about putting files in to archives. Now a have some time to continue.

Tar.gz

Here are some common way to create your archives.

#Creates simple targetfile.tar without compression.
tar cvf targetfile.tar sourcedir/*

#Zip everything beneath sourcedir to targetfile.tar.gz
tar cvzf targetfile.tar.gz sourcedir/*

#Bzip2 everything beneath sourcedir to targetfile.tar.bz2
tar cvjf targetfile.tar.bz2 sourcedir/*

Parameters explanation:

Alternative with pipe usage:

tar -cf - sourcedir | gzip -c > filename.tar.gz

Zip

Some examples

#Zip every file in current directroy to file.zip.
#But hidden files like (.htaccess) are not included.
zip file.zip sourcedir/*

#also includes hidden files.
zip file.zip sourcedir/* .*

The above examples include directories but still not their content recursively, -r option is required.

#Adds all files and directories recursivly.
zip file.zip -r /sourcedir/*

#Same as abowe with addtional enryption and password lock.
#Password is prompted on the terminal.
zip file.zip -re /sourcedir/*

#Splitts creted archive to parts not bigger than 2 Gigabytes.
zip -s 2g -r test.zip ./*

Hope that helps someone.

Happy new year!!!

Jboss 7 setup on debian linux

This is a short step by step explanation of the setup of JBoss 7.0.2 on your Linux (explicit debian). Nowadays there is still no official Debian package for JBoss 7 out there, so we have to do a couple of steps manually.  First i describe how to download and to prepare the jboss. Secondly we do some basic configuration that you’ll be needed and at the end i will show you one of the ways to register JBoss as a service.

1. download and prepare.

Start by download  currently available version (7.0.2) of the JBoss 7.

#Web Profile version download.
wget http://download.jboss.org/jbossas/7.0/jboss-as-7.0.2.Final/jboss-as-web-7.0.2.Final.tar.gz

Extracting files to the final location using tar.


Read the rest of this entry »

Installing Java 7 on Debian

Here is just an example of how to install java 7 on your linux.
I use current Debian and oracle (former sun) java 7.

First i had to download the latest java from oracle site and then extrat it. I have to do it because at the moment the is no official debain package for java 7.
So we are not able to do it with apt-get as we can it for java 6.


Read the rest of this entry »

Favorite Eclipse UML Plugin

What is your favorite Free or Open-Source UML Plug-in?

Every year i try some of them and  remove them after few hours. As i remember, they where resource-hungry or just bad in reverse engineering

Some weeks ago i tried ObjectAid UML Explorer Class Diagram and liked it. It could quick and easy create simple class Diagrams – just by Drag & Drop. And i had no problems with static constructors or inner classes and other stuff in the code which causes problems to another Plug-ins.

Unfortunately Object Aid Sequence Diagram are not free but cost not much for private usage. Maybe i’ll try it soon.

But first i would ask you what is your favorite Eclipse IDE Plug-in for fast and easy (e.g. partly) revers engineered UML diagrams which can be used to show some architectural details to your colleagues?

Thank you for comments!

Bootcharting

The pictureon the right (klick to enrange)  shows  how Ubunto boot process is going on my 5 years old Thinkpad T60. Bootchart utility does such charts automatically. If you interestiong how easy it it to enable such bootcharting read below.

Installing bootchart

See how to install bootchart logger on ubuntu, and other linux distributions.

Yo need bootchart and, pybootchartgui

apt-get install bootchart

apt-get install pybootchartgui


Read the rest of this entry »

GIT

I want to share with you some thoughts on GIT because I think that was a right invention to the right time and place.

(This article should be finished half year ago right after i wrote about svn server installation, but unfortunatelly i didn’t find any time to finish it untill now.)

Motivation

My first version control system (VCS) was CVS and i used it with eclipse 2.0 for programming in java. I found CVS quite impressive and liked it a lot. It was also quite reliable and moderatelly fast.
Then someone at the university told us to use SVN, because it has “plenty” of advantages. Somehow i found SVN not bad even if the eclipse svn plugin quality was never quite good. However SVN matured  and became powerful source control system and many many people and companies started using it. I think it’s the most used version control system.

I like SVN for easy branching and tagging (with good eclipse plugin support), for global version numbers, for understanding “http://” (with Web-Dav) as well as for more comfortable managing tools and easy installation and configuration.

But that’s all what i like… There is no more practical advantages over CVS and moreover there are even some disadvantages also in comparison to cvs.

All of these disadvantages i mentioned above are fixed in GIT. Git is much faster, flexible. So let  install it!
Read the rest of this entry »

Java EE 5 vs Java EE 6

This post visualizes changes between Java EE Standards 5 and 6. The comparison of standards is listed in four sections Web-Services, Web-Container, Enterprise Application technologies and Maintenance. Hope this helps someone.

Web Service related changes

Java EE 5 (JSR-244)Java EE 6 (JSR-316)
JAX-RPC 1.1 JSR 101JAX-RPC 1.1
Enterprise Web Services 1.2 JSR 109Enterprise Web Services 1.3 (new version)
Web Service Metadata 1.0 JSR 181Web Service Metadata 1.0
Streaming API for XML 1.0 JSR 173Streaming API for XML 1.0
JAX-WS 2.0  JSR 224JAX-WS 2.2 (new version)
JAXB 2.0 JSR 222JAXB 2.2 (new version)
SOAP with Attachments API for Java (SAAJ) JSR 67Java APIs for XML Messaging 1.3 (new version) spec
new! JAX-RS 1.1 JSR 311
new! Java API for XML Registries (JAXR 1.0) JSR 93


Read the rest of this entry »

Subversion on Debian Linux

Today i describe the few steps of installation of subversion (with repository) on Linux (Debian lenny). That description show the installtion proccess in 5 steps. And the configuration of Apache Mod-DAV as additiona information. So let’s start.

Step 1: Install subversion

If subversion is not installed, install it with:

$apt-get install subversion


Read the rest of this entry »

lsof command (Linux)

Today i’ll give you some interesting examples of using lsof command.

lsof stands for “list open files”. So actually it shows all files used by some processes of a system. That command exist on most of and on different Linuxes and Unixes.
It bases on architecture of a kernel which causes evety procces to hold it used files in /proc – (a virtual file-system).  A typical hierarchy wold look like:

/proc/process id/fd/file descriptor

In the absence of any options, lsof lists all open files belonging to all active processes of a system. But that is to much for most cases, because many of cases are networkrelated. An if you consider that sockets are files in linux we can use lsof to search fo them.
Read the rest of this entry »

102 Post so far

I noticed that my last post was  a 101 post on this blog which is good occasion to do some self evaluation.

I started to write here in January 2007 it’s nearly 4 years ago. You see I’m not very productive blogger. Nevertheless i wrote some interesting things which have attracted some people or comments. Here some of them chronologically:

I’ve learned pretty much and i tried different themes. I think in the future i will write more and more technical stuff. So e.g. Java comes to short so far also web technologies where not covered while i have to do with them relatively often.
Read the rest of this entry »