user707549
user707549

Reputation:

what is the echo command in clearcase?

I have a question about clearcase, someone helped me on some issue in clearcase, he used a command as follow: echo " " > xxx.log and

cleartool co -nc filename 

what does this mean?

Upvotes: 2

Views: 364

Answers (3)

VonC
VonC

Reputation: 1327224

When you have a file which is "checkedout but removed", as described in ct ls:

The element was checked out in this view, but the view-private file was subsequently removed.
You may have deleted the file.

A solution to restore that file is to checkout it again, but if you do that directly, ClearCase would complain about being unable to access said file (because it isn't physically there anymore).

Hence the:

 echo " " > afile

You need to have some content in that file in order to make a cleartool command on it.
So even if its content is a bogus one, it at least allows you to proceed.

Then, you can checkout it again (-nc means without comment, but it also means "takes the previous comments used on the current checked out version)

 cleartool checkout -nc afile

Another way to restore it is to uncheckout the file:

 cleartool unco afile

That will also restore its content.

Upvotes: 1

Sanjeev
Sanjeev

Reputation: 211

Just a tip: 'echo' might to used to clear xxx.log file.

co - stands for check out filename, nc - stands for no comments

Might be helpful: http://www.yolinux.com/TUTORIALS/ClearcaseCommands.html

Upvotes: 0

forty-two
forty-two

Reputation: 12817

The first command writes a space to xxx.log; echo is a shell command and has nothing to do with clearcase. The second command checks out filename without comments. These two commands seem to be pretty unrelated, unless there something else you haven't told us.

Upvotes: 0

Related Questions