{"id":20331205,"url":"https://github.com/comcast/infinite-file-curtailer","last_synced_at":"2025-04-11T21:07:45.982Z","repository":{"id":145661429,"uuid":"155905333","full_name":"Comcast/Infinite-File-Curtailer","owner":"Comcast","description":"Curtail is a utility program that reads stdin and writes to a file bound by size.","archived":false,"fork":false,"pushed_at":"2023-12-12T16:04:58.000Z","size":31,"stargazers_count":35,"open_issues_count":4,"forks_count":9,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-11T21:07:39.845Z","etag":null,"topics":["command-line-tool","log","logging","utility","utility-library"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Comcast.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-02T18:16:24.000Z","updated_at":"2024-12-11T07:56:18.000Z","dependencies_parsed_at":"2023-12-12T17:53:23.175Z","dependency_job_id":"bf630830-7f4f-4d72-a54a-6b2c181b80a5","html_url":"https://github.com/Comcast/Infinite-File-Curtailer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Comcast%2FInfinite-File-Curtailer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Comcast%2FInfinite-File-Curtailer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Comcast%2FInfinite-File-Curtailer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Comcast%2FInfinite-File-Curtailer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Comcast","download_url":"https://codeload.github.com/Comcast/Infinite-File-Curtailer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248480434,"owners_count":21110937,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["command-line-tool","log","logging","utility","utility-library"],"created_at":"2024-11-14T20:19:14.379Z","updated_at":"2025-04-11T21:07:45.959Z","avatar_url":"https://github.com/Comcast.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Infinite-File-Curtailer - a program that reads stdin and writes to a fixed size file.\n\nRequires Linux 3.15+ and a filesystem that supports the FALLOC_FL_COLLAPSE_RANGE flag for fallocate.  This is currently ext4 and XFS.  Hopefully more in the future...\n\n----\n\n## Usage\n\n```\n./curtail [-s size] \u003coutput file\u003e\n```\n\nOptions:\n\n```\n-verbose  enable all debug output (on stderr)\n-quiet    disable all non-error output (on stderr)\n-size     Maximum size of the output file (ie. 8192, 64K, 10M, 1G, etc) - default is 16K\n```\n\n## Example\n\nA typical usage scenario is to capture the output of a program in a file.  Using curtail prevents the program from creating a runaway file that will eventually fill up the filesystem and cause system failure if not handled at the system level.  In the example below, the file my_app_log.txt cannot exceed 2 megabytes in size.\n\n```\n./my_app | curtail -s 2M ./my_app_log.txt\n```\n\n## Build instructions\n\nCurtail uses autotools (must be installed on the local system).  If not already installed, install the tools using the following commands with the appropriate package manager (apt, yum, etc) for your system:\n\n```\nsudo apt install libtool\nsudo apt install automake\nsudo apt install autoconf\n```\n\nTo build curtail locally, please run the following commands from the base dir of the project:\n\n```\nlibtoolize\naclocal\nautoheader\nautoconf\nautomake --add-missing\n./configure\nmake\n```\n\nTo install in the local system, run the following additional command with appropriate priviledges:\n\n```\nsudo make install\n```\n\n## Library usage\n\nCurtail can also be integrated directly into an application instead of used on the command line.  Include the file curtail.h and link the application with -lcurtail.  After successfully calling crtl_init, the program's stdout will be directed to the specified file until crtl_term is called.\n\n## Logrotate comparision\n\nCurtail is not intended to be a replacement for logrotate.  They are fundamentally different.  Some of the notable differences are below:\n\nlogrotate mitigates runaway files... curtail prevents them.  \nlogrotate requires sysadmin... curtail does not.\nlogrotate creates multiple files...  curtail only one.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomcast%2Finfinite-file-curtailer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcomcast%2Finfinite-file-curtailer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomcast%2Finfinite-file-curtailer/lists"}