Previous page

Next page

Locate page in Contents

Print this page

search

Summary:

Finds the first occurrence of a data block in files.

Request specification:

Name

Min/Max

Type

Description

search

 

navigateType

 

{

 

 

 

offset

0..1

long

Starting search offset. Positive offset means offset from the beginning of a file, and negative from the end of a file.

block

1..1

base64Binary

Data block to find in a file.

backward

0..1

 

Search backwards.

}

 

 

 

Returns:

Name

Min/Max

Type

Description

file

0..[]

 

 

{

 

 

 

name

 

fileType

The name of the file containing the specified block of data.

offset

0..[]

long

Offset at which the block is located in the file.

}

 

 

 

Example:

Search for a string "aaa" in the /tmp.txt file on the specified Virtuozzo Container.

Input

<packet version="4.0.0">

<dst>

<host>24b9acf5-8ca5-49c9-b7b1-4c93fe048389</host>

</dst>

<target>filer</target>

<data>

<filer>

<search>

<cwd>Lw==</cwd>

<path>L3RtcC50eHQ=</path>

<offset>0</offset>

<block>YWFhYQ==</block>

</search>

</filer>

</data>

</packet>

Output

<packet version="4.0.0">

<origin>filer</origin>

<target>vzclient123</target>

<data>

<filer>

<file>

<name>dG1wLnR4dA==</name>

<offset>15</offset>

</file>

</filer>

</data>

</packet>

Please send us your feedback on this help page