Previous page

Next page

Locate page in Contents

Print this page

list

Summary:

Lists information about files, directories and other filesystem elements. The command is also capable of searching the backup archives and retrieve the information about the archived files and directories.

Request specification:

Name

Min/Max

Type

Description

list

 

navigateType

 

{

 

 

 

info

0..1

 

The fields for which to provide the output. If an element from this sequence is included in the call, the information that it refers to will be included in the result set.

{

 

 

 

user

0..1

 

User name.

group

0..1

 

Group name.

uid

0..1

 

User ID.

gid

0..1

 

Group ID.

mode

0..1

 

Element mode.

size

0..1

 

Element size.

date

0..1

 

Date of last change.

links

0..1

 

Number of hard links.

link_name

0..1

 

Where the link points to.

content_type

0..1

 

File contents description.

}

 

 

 

usage

0..1

 

If present, the size returned for an element is a gross size on a disk, so for directories it is calculated by traversing their children.

{

 

 

 

single_fs

0..1

 

If included, the operation will not go across different partitions while traversing.

}

 

 

 

follow_links

0..1

 

If present, the information returned for links will be about their references instead of themselves.

filter

0..[]

 

File filtering criteria. Inside a single filter, the AND rule applies (all must be satisfied). Multiple filters work as the OR rule (at least one should be satisfied).

{

 

 

 

[

 

 

Denotes a choice between user, uid, or the start_uid/end_uid sequence.

user

1..1

string

User name (supports wildcards).

uid

1..1

int

User ID.

{

 

 

This sequence is not a child of the uid element but is a separate entry in the choice group.

start_uid

0..1

int

First UID of the range.

end_uid

0..1

int

Last UID of the range.

}

 

 

 

]

 

 

 

[

 

 

Denotes a choice between the gid, group, or the start_uid/end_uid sequence.

gid

1..1

int

Group ID.

group

1..1

string

Group name (supports wildcards).

{

 

 

The sequence is not a child of the group element but a separate choice.

start_uid

0..1

int

First UID of the range.

end_uid

0..1

int

Last UID of the range.

}

 

 

 

]

 

 

 

start_date

0..1

date

Time of the last change to start with.

end_date

0..1

date

Time of the last change to end with.

min_size

0..1

long

Minimum size.

max_size

0..1

long

Maximum size.

type

0..1

int

The filesystem element type. See fileType/type for the available types.

name

0..1

base64Binary

The element name (supports wildcards).

block

0..1

base64Binary

List files containing this text (this could be a time consuming operation).

}

 

 

 

recursively

0..1

none

To list the entire tree including subdirectories include this element in the request.

}

 

 

 

Returns:

Name

Min/Max

Type

Description

file

0..[]

fileType

The file information structure.

Description:

The path can be specified using wildcard extensions. Please note that if you are using a wildcard in any of the path elements, you must include the wildcard option. If an absolute path is given, the cwd parameter is ignored.

To search the backup archives, the path option must contain the URI specifying the location of the archived file or directory. The format of the URI is as follows:

backup://BACKUP_ID/path

where backup indicates that we want to search the backup archive; BACKUP_ID is a string containing the backup ID; path is the absolute path to the original location of a file or directory. For example:

<path>backup://2005-09-04T203847+0400@tc9/C:/Windows/info.txt</path>

If the usage option is included, the size returned for an element is the actual size on the disk (the size of the elements in blocks multiplied by the filesystem block size ). For directories it is calculated by adding up the sizes of all the descendents of a directory.

You can customize the result set by specifying only the file properties that you want to see. This can be done by including the appropriate parameters in the info option.

The values of the start_date and the end_date elements are specified as a time in seconds starting from the year 1970. If start_date is absent, filter everything from 0 to the value specified in the end_date element. If end_date is absent, filter everything from start_date up to the current date.

Note: By default, the call will get the list of files from the Hardware Node. To retrieve the list from a Virtuozzo Container, use the remote message targeting mechanism by including the dst element in the message header containing the target Server ID. This rule applies to most of the file management calls.

Linux Example:

Retrieving a list of files from the "/" directory from the specified server.

Input

<packet version="4.0.0">

<dst>

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

</dst>

<target>filer</target>

<data>

<filer>

<list>

<cwd>Lw==</cwd>

<path>Lw==</path>

<info>

<user/>

<name/>

<uid/>

<group/>

<gid/>

</info>

</list>

</filer>

</data>

</packet>

Output

<ns1:packet priority="0" version="4.0.0">

<ns1:origin>filer</ns1:origin>

<ns1:target>vzclient3</ns1:target>

<ns1:data>

<ns2:filer>

<ns2:file>

<ns2:name>aG9tZQ==</ns2:name>

<ns2:user>root</ns2:user>

<ns2:group>root</ns2:group>

<ns2:uid>0</ns2:uid>

<ns2:gid>0</ns2:gid>

</ns2:file>

<ns2:file>

<ns2:name>bGli</ns2:name>

<ns2:user>root</ns2:user>

<ns2:group>root</ns2:group>

<ns2:uid>0</ns2:uid>

<ns2:gid>0</ns2:gid>

</ns2:file>

<ns2:file>

<ns2:name>cHJvYw==</ns2:name>

<ns2:user>root</ns2:user>

<ns2:group>root</ns2:group>

<ns2:uid>0</ns2:uid>

<ns2:gid>0</ns2:gid>

</ns2:file>

<ns2:file>

<ns2:name>Li4=</ns2:name>

<ns2:user>root</ns2:user>

<ns2:group>root</ns2:group>

<ns2:uid>0</ns2:uid>

<ns2:gid>0</ns2:gid>

</ns2:file>

<ns2:file>

<ns2:name>bWlzYw==</ns2:name>

<ns2:user>root</ns2:user>

<ns2:group>root</ns2:group>

<ns2:uid>0</ns2:uid>

<ns2:gid>0</ns2:gid>

</ns2:file>

<ns2:file>

<!-- the rest of the output is omitted -->

</ns2:filer>

</ns1:data>

</ns1:packet>

Please send us your feedback on this help page