{"id":34118544,"url":"https://github.com/ilkutkutlar/archive","last_synced_at":"2026-06-05T15:31:44.067Z","repository":{"id":144335024,"uuid":"279426772","full_name":"ilkutkutlar/archive","owner":"ilkutkutlar","description":"A POSIX-compliant Unix shell script which adds archiving functionality to your directories.","archived":false,"fork":false,"pushed_at":"2021-09-26T18:42:46.000Z","size":76,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-12T02:52:01.219Z","etag":null,"topics":["posix-shell","productivity","shell","shell-script"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ilkutkutlar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-07-13T22:42:04.000Z","updated_at":"2021-10-02T18:08:30.000Z","dependencies_parsed_at":"2025-12-14T21:06:40.753Z","dependency_job_id":null,"html_url":"https://github.com/ilkutkutlar/archive","commit_stats":null,"previous_names":["ilkutkutlar/archive.sh"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/ilkutkutlar/archive","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilkutkutlar%2Farchive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilkutkutlar%2Farchive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilkutkutlar%2Farchive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilkutkutlar%2Farchive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ilkutkutlar","download_url":"https://codeload.github.com/ilkutkutlar/archive/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilkutkutlar%2Farchive/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33949038,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-05T02:00:06.157Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["posix-shell","productivity","shell","shell-script"],"created_at":"2025-12-14T20:56:23.696Z","updated_at":"2026-06-05T15:31:44.062Z","avatar_url":"https://github.com/ilkutkutlar.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# archive\n\nA [POSIX](https://en.wikipedia.org/wiki/POSIX)-compliant Unix shell script which adds archiving functionality to your directories. Archiving in this context refers to archiving as found in email clients, etc.\n\n## Motivation\n\nEmail clients and productivity software (e.g. to-do list or note taking applications) usually offer an 'archive' feature, which users can use to move items which are not relevant anymore to a separate area to reduce cluttering. This way, the user can focus on items which are relevant right now, while still keeping old items for reference. This script aims to add this functionality to Unix-like systems.\n\n## How does it work?\n\nIt is essentially a specialised interface to the tool `tar`. Instead of the user having to worry about remembering and typing long tar commands, handling errors, keeping track of tar files, etc. this script abstracts away all that to make archiving as simple as archiving an email with the click of a button: `archive -a file.txt`.\n\n## Installation\n\nClone repository\n\n```sh\ngit clone https://github.com/ilkutkutlar/archive.sh.git\n```\n\nthen run the `install.sh` script in project root directory. It will install files in `/usr/local` by default, but you can specify another directory as well - just make sure the `bin` directory in custom install directory is in your PATH.\n\n```sh\ncd archive\n\n# Install in default /usr/local\nsudo sh install.sh\n\n# Install in custom directory\nsudo sh install.sh /usr\n```\n\n## Basic usage\n\nEach directory has its own archive file (called `.archive.tar`) that's created when first file is archived. That's where all archived files are stored. Add file to CWD's archive (without removing file):\n\n```sh\narchive -a file.txt\n```\n\nTo move file to archive (add to archive, remove it afterwards):\n\n```sh\narchive -a file.txt -d\n```\n\nTo archive a gzipped version of the file (gzip the file, add gzipped version to archive, remove the gzipped file but keep the original unchanged):\n\n```sh\narchive -z file.txt\n```\n\nPass the `-d` flag to remove the original, un-gzipped file after adding the gzipped version to archive:\n\n```sh\n# Gzip the file to file.txt.gz, add file.txt.gz to archive,\n# then remove 'file.txt.gz' and remove 'file.txt' as well.\narchive -z file.txt -d\n```\n\nTo unarchive file (but still keep in archive):\n\n```sh\narchive -u file.txt\n```\n\nTo unarchive file and remove from archive:\n\n```sh\narchive -u file.txt -d\n```\n\nTo list archive contents:\n\n```sh\narchive -l\n```\n\n## Options\n\n```sh\n-a, --add FILE          # Add file to archive of current directory\n-u, --unarchive FILE    # Unarchive file from archive of current directory\n-d, --delete            # Pass flag to -a, -u or -z to delete file in dir/archive after operation\n-z, --add-gzipped FILE  # Add a gzipped version of file to archive. Original file is not affected unless -d is passed\n-l, --list              # List the files in current directory archive\n-t, --top-level         # List only top-level files and directories in current directory archive\n-v, --version           # Print version and exit\n-h, --help              # Print help and exit\n```\n\n## Development\n\n- Script itself is written in POSIX-compliant shell (It works at least with [Dash](https://en.wikipedia.org/wiki/Almquist_shell#dash), a very minimalistic shell that has very little to no extra features beyond what POSIX standard specifies).\n- The tests are written in [Bats](https://github.com/bats-core/bats-core) \u003e= v1.2.1. Even though it is generally meant for Bash scripts, since Dash/POSIX shell is a subset of Bash, it can still be used for this project.\n- [ShellCheck](https://github.com/koalaman/shellcheck) \u003e= v0.7.1 is used to check for best-practices.\n- You can run all tests and ShellCheck together by using the `run_tests` script:\n\n```sh\nsh test/run_tests\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filkutkutlar%2Farchive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Filkutkutlar%2Farchive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filkutkutlar%2Farchive/lists"}