B.50 TruncateTask

Set the length of one file, as the intermittently available truncate Unix utility/function.

Table B.52: Attributes

fileStringThe name of the file.n/aYes
lengthStringSpecifies the new file length (in bytes) to set. The following suffixes are supported:
  • "k" : Kilobytes (1024 bytes)

  • "m" : Megabytes (1024 K)

  • "g" : Gigabytes (1024 M)

adjustStringSpecifies the number of bytes (and positive/negative direction) by which to adjust file lengths. The same suffixes are supported for this attribute as for the length attribute.n/aNo
createBooleanWhether to create nonexistent files.trueNo
mkdirsBooleanWhether to create nonexistent parent directories when creating new files.falseNo

B.50.1 Examples

<truncate file="foo" />