ubase

suckless linux base utils
git clone git://git.suckless.org/ubase
Log | Files | Refs | README | LICENSE

truncate.1 (662B)


      1 .Dd February 2, 2015
      2 .Dt TRUNCATE 1
      3 .Os ubase
      4 .Sh NAME
      5 .Nm truncate
      6 .Nd shrink or extend the size of a file to the specified size
      7 .Sh SYNOPSIS
      8 .Nm
      9 .Op Fl c
     10 .Fl s Ar size
     11 .Ar file...
     12 .Sh DESCRIPTION
     13 .Nm
     14 shrinks or extends the size of each
     15 .Ar file
     16 specified size. A
     17 .Ar file
     18 argument that does not exist is created. If a
     19 .Ar file
     20 is larger than the specified
     21 .Ar size ,
     22 the extra data is lost. If a
     23 .Ar file
     24 is shorter, it is extended and the extended part (hole) reads as zero bytes.
     25 .Sh OPTIONS
     26 .Bl -tag -width Ds
     27 .It Fl c
     28 Do not create any files.
     29 .It Fl s Ar size
     30 Set or adjust the file size by
     31 .Ar size
     32 bytes.
     33 .El
     34 .Sh SEE ALSO
     35 .Xr ftruncate 2 ,
     36 .Xr truncate 2