Pregunta

I am trying to find all the files under gt.BridgeGov branch in my view

  find \gtGov -all -version "brtype(gt.BridgeGov)" -print 

This statement works fine and list all the files under branch gt.BridgeGov. I am getting the list on console, but I want to redirect result to text file.

I tried the following

find \gtGov -all -version "brtype(gt.BridgeGov)" > myFile.txt
find \gtGov -all -version "brtype(gt.BridgeGov)" >> myFile.txt 

Its throwing me an error cleartool: Error: Extra arguments: ">"

How can redirect the result to a text file?

-Update:

find \gtGov -all -version "brtype(gt.BridgeGov)" -print > myFile.txt

Tried this also Complete Error When I try

find \gtGov -all -version "brtype(gt.BridgeGov)" | tee myFile.txt 

cleartool: Error: Extra arguments: "|"
Usage: find { pname ... [-depth | -nrecurse | -directory]
        | [pname ...] -all [-visible | -nvisible]
        | -avobs [-visible | -nvisible]
        }
        [-name 'pattern']
        [-cview]
        [-user login-name]
        [-group group-name]
        [-type {f|d|l}...]
        [-follow]
        [-kind object-kind]
        [-nxname]
        [-element query]
        [-branch query]
        [-version query]
        {-print | -exec command-invocation | -ok command-invocation} ...
¿Fue útil?

Solución

You are in a cleartool session.

Don't.

Go to a dos or shell session, in your ClearCase view, and type

cleartool find ... > res.txt

You won't have any issue redirecting the result of a cleartool command that way .

Note that if you are executing that cleartool find command in a dynamic View root directory (M:\myDynView, or /view/myView, ...), you won(t have the right to write directly in said root directory.

However, you can redirect your output to any file you want:

cd /view/MyView
cleartool find -all ... > /my/path/res.txt
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top