{
    "mode": "man",
    "parameter": "qsrotate",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/qsrotate/1/json",
    "generated": "2026-06-12T04:55:46Z",
    "synopsis": "qsrotate  -o <file> [-s <sec> [-t <hours>]] [-b <bytes>] [-f] [-z] [-g <num>] [-u <name>] [-m\n<mask>] [-p] [-d]",
    "sections": {
        "NAME": {
            "content": "qsrotate - a log rotation tool (similar to Apache's rotatelogs).\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "qsrotate  -o <file> [-s <sec> [-t <hours>]] [-b <bytes>] [-f] [-z] [-g <num>] [-u <name>] [-m\n<mask>] [-p] [-d]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "qsrotate reads from stdin (piped log) and writes the data to the provided file  rotating  the\nfile after the specified time.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-o <file>",
                    "content": "Output log file to write the data to (use an absolute path).\n",
                    "flag": "-o",
                    "arg": "<file>"
                },
                {
                    "name": "-s <sec>",
                    "content": "Rotation interval in seconds, default are 86400 seconds.\n",
                    "flag": "-s",
                    "arg": "<sec>"
                },
                {
                    "name": "-t <hours>",
                    "content": "Offset to UTC (enables also DST support), default is 0.\n",
                    "flag": "-t",
                    "arg": "<hours>"
                },
                {
                    "name": "-b <bytes>",
                    "content": "File size limitation (default/max. are 2147352576 bytes, min. are 1048576 bytes).\n\n-f     Forced log rotation at the specified interval even no data is written.\n\n-z     Compress (gzip) the rotated file.\n",
                    "flag": "-b",
                    "arg": "<bytes>"
                },
                {
                    "name": "-g <num>",
                    "content": "Generations (number of files to keep).\n",
                    "flag": "-g",
                    "arg": "<num>"
                },
                {
                    "name": "-u <name>",
                    "content": "Become  another  user,  e.g.  www-data. -m <mask> File permission which is either 600,\n640, 660 (default) or 664.\n\n-p     Writes data also to stdout (for piped logging). -d Line-by-line data reading prefixing\nevery line with a timestamp.\n",
                    "flag": "-u",
                    "arg": "<name>"
                }
            ]
        },
        "EXAMPLE": {
            "content": "TransferLog \"|/usr/bin/qsrotate -f -z -g 3 -o /var/log/apache/access.log -s 86400\"\n\nThe  name  of the rotated file will be /dest/filee.YYYYmmddHHMMSS where YYYYmmddHHMMSS is the\nsystem time at which the data has been rotated.\n",
            "subsections": []
        },
        "NOTE": {
            "content": "- Each qsrotate instance must use an individual file.\n- You may trigger a file rotation manually by sending the signal USR1 to the process.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "qsdt(1), qsexec(1), qsfilter2(1),  qsgeo(1),  qsgrep(1),  qshead(1),  qslog(1),  qslogger(1),\nqsre(1), qsrespeed(1), qspng(1), qssign(1), qstail(1)\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Pascal Buchbinder, http://mod-qos.sourceforge.net/\n\n\n\nmodqos utilities 11.63                       May 2019                                   QSROTATE(1)",
            "subsections": []
        }
    },
    "summary": "qsrotate - a log rotation tool (similar to Apache's rotatelogs).",
    "flags": [
        {
            "flag": "-o",
            "long": null,
            "arg": "<file>",
            "description": "Output log file to write the data to (use an absolute path)."
        },
        {
            "flag": "-s",
            "long": null,
            "arg": "<sec>",
            "description": "Rotation interval in seconds, default are 86400 seconds."
        },
        {
            "flag": "-t",
            "long": null,
            "arg": "<hours>",
            "description": "Offset to UTC (enables also DST support), default is 0."
        },
        {
            "flag": "-b",
            "long": null,
            "arg": "<bytes>",
            "description": "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."
        },
        {
            "flag": "-g",
            "long": null,
            "arg": "<num>",
            "description": "Generations (number of files to keep)."
        },
        {
            "flag": "-u",
            "long": null,
            "arg": "<name>",
            "description": "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."
        }
    ],
    "examples": [
        "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."
    ],
    "see_also": [
        {
            "name": "qsdt",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/qsdt/1/json"
        },
        {
            "name": "qsexec",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/qsexec/1/json"
        },
        {
            "name": "qsfilter2",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/qsfilter2/1/json"
        },
        {
            "name": "qsgeo",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/qsgeo/1/json"
        },
        {
            "name": "qsgrep",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/qsgrep/1/json"
        },
        {
            "name": "qshead",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/qshead/1/json"
        },
        {
            "name": "qslog",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/qslog/1/json"
        },
        {
            "name": "qslogger",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/qslogger/1/json"
        },
        {
            "name": "qsre",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/qsre/1/json"
        },
        {
            "name": "qsrespeed",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/qsrespeed/1/json"
        },
        {
            "name": "qspng",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/qspng/1/json"
        },
        {
            "name": "qssign",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/qssign/1/json"
        },
        {
            "name": "qstail",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/qstail/1/json"
        }
    ]
}