Thursday, 19 December 2013

Deliver & Rebase basics - Clearcase

In clearcase when you want to your changes on your stream (child stream) to be delivered (merged) to the another stream (usually parent stream), it is known as delivering. In other words, you typically deliver from your development stream to the main integration stream.

The rebase is exact opposite of delivering. It is used to move the changes from parent stream onto a child stream. Typically in a multi-member team, when you rebase a parent stream onto your own child stream, the recommended baselines act as the foundation for the project.

Recommend a Baseline in Clearcase

The concept of baselines is to make sure all team members are on the same page and all have the latest updated versions of the project code.

A recommended baseline is a set / collection of the versions of various components which are identified as stable.

In order to recommend a baseline in Clearcase from the command line, we have to use the chstream command in the following fashion.

cleartool chstream -recommend <baseline-name> <stream-selector>

More detailed information can be found at this IBM technote here.

Unlock Stream - Clearcase

In Clearcase in order to unlock a stream use the commnd as follows:

cleartool unlock <stream-selector>

Eg:

cleartool unlock stream:Testvob_stream@\Test_pvob 

System Uptime - Unix

In Unix, you can find how long your system was up by using the uptime command

You could get the output like:

15:34  up 22 days, 29 mins, 4 users, load averages: 0.78 0.82 0.77

Hard Link vs Soft Link - Unix

As you may be aware, in Unix we can create Links to point to a certain program or a file.

We create a link using ln command. We can create a symbolic link (also known as symlink) using the -s switch.

Eg:

ln -s /path to file1/file1.rtf /path to file2/file2.rtf

Now there are 2 types of links : a Hard link and a Soft link

Basically both types point to a certain file or a program. However one key difference is when the original file name is changed or modified.

If the name of original file is modified or renamed or if the original program is deleted from its location then:

a soft link is broken BUT a hard link does NOT break

Secondly, a Hard link cannot point to directories while a Soft link can link directories.


Wednesday, 18 December 2013

Exit status of previous command - Unix

In Unix, one is often asked to find out the exit status of previous command i.e whether it was executed successfully or not.

In order to find out, type the foll. in terminal :

echo $?

If the output is 0 then it means the previous command got executed successfully.

If the previous command failed then the output of echo $? would be 127.

Tail the Logs - Unix

Tail is just another basic command in Unix where you can 'tail' a certain file to view its contents Bottoms-up.

Usage:

tail -lines <file-name>

Eg:

To view last ten lines of a file log.txt. Note the -n switch

tail -n 10 log.txt

To view the live results of a logfile use the -f switch

tail -f logfile.txt
Related Posts Plugin for WordPress, Blogger...
eXTReMe Tracker