IBM Support

Identifying hijacked files in a snapshot view

Question & Answer


Question

How can I identify hijacked files in a IBM® Rational® ClearCase® snapshot view?

Answer

Hijacking an element in a snapshot view involves making it writable and making a change to it. There is no lshijack or lsprivate -hijacked command to list the files. While the cleartool update operation does generate a log identifying hijacked files, the best way is to use cleartool ls command which identifies hijacked versions in much less time than an update would take.

Use cleartool ls from the command line and look for the [hijacked] tag on objects.

Example output:

%> cleartool ls

archive.ppt@@\main\1
[hijacked]         Rule: \main\LATEST
project.doc@@\main\1                    Rule: \main\LATEST
doc_resources.ppt@@\main\2
[hijacked]   Rule: \main\LATEST

To obtain a list of all hijacked files in a snapshot view, use the following command:

  • On UNIX® and Linux® you can run the following command from a snapshot view:


cleartool ls -recurse | grep "hijacked"

  • On Microsoft® Windows® you can run the following command from a snapshot view:

cleartool ls -recurse | findstr "hijacked"

This command will perform a recursive "cleartool ls" and then use "grep" or "findstr" command respectively to filter any lines that have the [hijacked] line associated with them.

Note: GREP is a native UNIX command; however, it can be run on Windows if the utility is installed. The grep tool comes with applications like GNU, Free Software Foundation or Cygwin.

[{"Product":{"code":"SSSH27","label":"Rational ClearCase"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"View: Snapshot","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF015","label":"IRIX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"2003.06.00;2003.06.16;7.0;7.0.1;7.1","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SSSH27","label":"Rational ClearCase"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"View: Snapshot","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
29 September 2018

UID

swg21123318