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 |
|
|
|
|
|
|
|
|
|
|
|
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 name. |
|
|
|
Group name. |
|
|
|
User ID. |
|
|
|
Group ID. |
|
|
|
Element mode. |
|
|
|
Element size. |
|
|
|
Date of last change. |
|
|
|
Number of hard links. |
|
|
|
Where the link points to. |
|
|
|
File contents description. |
|
|
|
|
|
|
|
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. |
|
|
|
|
|
|
|
If included, the operation will not go across different partitions while traversing. |
|
|
|
|
|
|
|
If present, the information returned for links will be about their references instead of themselves. |
|
|
|
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 name (supports wildcards). |
|
|
|
User ID. |
|
|
|
This sequence is not a child of the |
|
|
|
First UID of the range. |
|
|
|
Last UID of the range. |
|
|
|
|
|
|
|
|
|
|
|
Denotes a choice between the |
|
|
|
Group ID. |
|
|
|
Group name (supports wildcards). |
|
|
|
The sequence is not a child of the |
|
|
|
First UID of the range. |
|
|
|
Last UID of the range. |
|
|
|
|
|
|
|
|
|
|
|
Time of the last change to start with. |
|
|
|
Time of the last change to end with. |
|
|
|
Minimum size. |
|
|
|
Maximum size. |
|
|
|
The filesystem element type. See |
|
|
|
The element name (supports wildcards). |
|
|
|
List files containing this text (this could be a time consuming operation). |
|
|
|
|
|
|
|
To list the entire tree including subdirectories include this element in the request. |
|
|
|
|
Returns:
Name |
Min/Max |
Type |
Description |
|
|
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.
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>