DELETE statement

The DELETE file placement policy rule statement is very similar to the RELOCATE statement in both form and function, lacking only the <TO> clause. File placement policy-based deletion may be thought of as relocation with a fixed destination.

Note:

Use DELETE statements with caution.

The following XML snippet illustrates the general form of the DELETE statement:

 <DELETE>
   <FROM>
     <SOURCE>
       <CLASS> placement_class_name </CLASS>
     </SOURCE>
     <SOURCE>
       additional_placement_class_specifications
     </SOURCE>
   </FROM>
   <WHEN> relocation_conditions </WHEN>
 </DELETE>

A DELETE statement contains the following clauses:

<FROM>

An optional clause that contains a list of placement classes from whose volumes designated files should be deleted if the files meet the conditions specified in the <WHEN> clause. No priority is associated with the ordering of placement classes in a <FROM> clause. If a file to which the rule applies is located on a volume in any specified placement class, the file is deleted. If a DELETE statement does not contain a <FROM> clause, VxFS deletes qualifying files no matter on which of a file system's volumes the files reside.

<WHEN>

An optional clause specifying the conditions under which files to which the rule applies should be deleted. The form of the <WHEN> clause in a DELETE statement is identical to that of the <WHEN> clause in a RELOCATE statement. If a DELETE statement does not contain a <WHEN> clause, files designated by the rule's SELECT statement, and the <FROM> clause if it is present, are deleted unconditionally.