The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

Интерактивная система просмотра системных руководств (man-ов)

 ТемаНаборКатегория 
 
 [Cписок руководств | Печать]

truncate (1)
  • >> truncate (1) ( FreeBSD man: Команды и прикладные программы пользовательского уровня )
  • truncate (2) ( FreeBSD man: Системные вызовы )
  • truncate (2) ( Русские man: Системные вызовы )
  • truncate (2) ( Linux man: Системные вызовы )
  • truncate (3) ( Solaris man: Библиотечные вызовы )
  • truncate (3) ( POSIX man: Библиотечные вызовы )
  • truncate (7) ( Linux man: Макропакеты и соглашения )

  • BSD mandoc
     

    NAME

    
    
    truncate
    
     - truncate or extend the length of files
    
     
    

    SYNOPSIS

    [-c ] -words -s [+ ] size [K | k | M | m | G | g | T | t ] file ...
    [-c ] -words -r rfile file ...  

    DESCRIPTION

    The utility adjusts the length of each regular file given on the command-line.

    The following options are available:

    -c
    Do not create files if they do not exist. The utility does not treat this as an error. No error messages are displayed and the exit value is not affected.
    -r rfile
    Truncate or extend files to the length of the file rfile
    -s [+ ] size [K | k | M | m | G | g | T | t ]
    If the size argument is preceded by a plus sign (+ ) files will be extended by this number of bytes. If the size argument is preceded by a dash (- ) file lengths will be reduced by no more than this number of bytes, to a minimum length of zero bytes. Otherwise, the size argument specifies an absolute length to which all files should be extended or reduced as appropriate.

    The size argument may be suffixed with one of K M G or T (either upper or lower case) to indicate a multiple of Kilobytes, Megabytes, Gigabytes or Terabytes respectively.

    Exactly one of the -r and -s options must be specified.

    If a file is made smaller, its extra data is lost. If a file is made larger, it will be extended as if by writing bytes with the value zero. If the file does not exist, it is created unless the -c option is specified.

    Note that, while truncating a file causes space on disk to be freed, extending a file does not cause space to be allocated. To extend a file and actually allocate the space, it is necessary to explicitly write data to it, using (for example) the shell's `>>' redirection syntax, or dd(1).  

    EXIT STATUS

    Ex -std If the operation fails for an argument, will issue a diagnostic and continue processing the remaining arguments.  

    SEE ALSO

    dd(1), touch(1), truncate(2)  

    STANDARDS

    The utility conforms to no known standards.  

    HISTORY

    The utility first appeared in Fx 4.2 .  

    AUTHORS

    The utility was written by An Sheldon Hearn Aq [email protected] .


     

    Index

    NAME
    SYNOPSIS
    DESCRIPTION
    EXIT STATUS
    SEE ALSO
    STANDARDS
    HISTORY
    AUTHORS


    Поиск по тексту MAN-ов: 




    Партнёры:
    PostgresPro
    Inferno Solutions
    Hosting by Hoster.ru
    Хостинг:

    Закладки на сайте
    Проследить за страницей
    Created 1996-2024 by Maxim Chirkov
    Добавить, Поддержать, Вебмастеру