B.48 TruncateTask

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

Table B.50: Attributes

NameTypeDescriptionDefaultRequired
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)

n/aNo
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.48.1 Examples

<truncate file="foo" />