# phpman > man > qsrotate(1)

[QSROTATE(1)](https://www.chedong.com/phpMan.php/man/QSROTATE/1/markdown)                               qsrotate man page                              [QSROTATE(1)](https://www.chedong.com/phpMan.php/man/QSROTATE/1/markdown)



## NAME
       qsrotate - a log rotation tool (similar to Apache's rotatelogs).

## SYNOPSIS
       qsrotate  -o <file> [-s <sec> [-t <hours>]] [-b <bytes>] [-f] [-z] [-g <num>] [-u <name>] [-m
       <mask>] [-p] [-d]

## DESCRIPTION
       qsrotate reads from stdin (piped log) and writes the data to the provided file  rotating  the
       file after the specified time.

## OPTIONS
### -o <file>
              Output log file to write the data to (use an absolute path).

### -s <sec>
              Rotation interval in seconds, default are 86400 seconds.

### -t <hours>
              Offset to UTC (enables also DST support), default is 0.

### -b <bytes>
              File size limitation (default/max. are 2147352576 bytes, min. are 1048576 bytes).

       -f     Forced log rotation at the specified interval even no data is written.

       -z     Compress (gzip) the rotated file.

### -g <num>
              Generations (number of files to keep).

### -u <name>
              Become  another  user,  e.g.  www-data. -m <mask> File permission which is either 600,
              640, 660 (default) or 664.

       -p     Writes data also to stdout (for piped logging). -d Line-by-line data reading prefixing
              every line with a timestamp.

## EXAMPLE
         TransferLog "|/usr/bin/qsrotate -f -z -g 3 -o /var/log/apache/access.log -s 86400"

       The  name  of the rotated file will be /dest/filee.YYYYmmddHHMMSS where YYYYmmddHHMMSS is the
       system time at which the data has been rotated.

## NOTE
        - Each qsrotate instance must use an individual file.
        - You may trigger a file rotation manually by sending the signal USR1 to the process.

## SEE ALSO
       [qsdt(1)](https://www.chedong.com/phpMan.php/man/qsdt/1/markdown), [qsexec(1)](https://www.chedong.com/phpMan.php/man/qsexec/1/markdown), [qsfilter2(1)](https://www.chedong.com/phpMan.php/man/qsfilter2/1/markdown),  [qsgeo(1)](https://www.chedong.com/phpMan.php/man/qsgeo/1/markdown),  [qsgrep(1)](https://www.chedong.com/phpMan.php/man/qsgrep/1/markdown),  [qshead(1)](https://www.chedong.com/phpMan.php/man/qshead/1/markdown),  [qslog(1)](https://www.chedong.com/phpMan.php/man/qslog/1/markdown),  [qslogger(1)](https://www.chedong.com/phpMan.php/man/qslogger/1/markdown),
       [qsre(1)](https://www.chedong.com/phpMan.php/man/qsre/1/markdown), [qsrespeed(1)](https://www.chedong.com/phpMan.php/man/qsrespeed/1/markdown), [qspng(1)](https://www.chedong.com/phpMan.php/man/qspng/1/markdown), [qssign(1)](https://www.chedong.com/phpMan.php/man/qssign/1/markdown), [qstail(1)](https://www.chedong.com/phpMan.php/man/qstail/1/markdown)

## AUTHOR
       Pascal Buchbinder, <http://mod-qos.sourceforge.net/>



mod_qos utilities 11.63                       May 2019                                   [QSROTATE(1)](https://www.chedong.com/phpMan.php/man/QSROTATE/1/markdown)
