{"id":17748127,"url":"https://github.com/purarue/newest","last_synced_at":"2025-03-18T16:30:23.693Z","repository":{"id":57567324,"uuid":"327214316","full_name":"purarue/newest","owner":"purarue","description":"Basic CLI tool to print the most recently modified file in a directory","archived":false,"fork":false,"pushed_at":"2024-10-25T17:34:21.000Z","size":16,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T10:44:36.394Z","etag":null,"topics":["cli","utility"],"latest_commit_sha":null,"homepage":"","language":"Go","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/purarue.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}},"created_at":"2021-01-06T05:54:41.000Z","updated_at":"2024-10-25T17:34:25.000Z","dependencies_parsed_at":"2024-06-20T11:59:41.873Z","dependency_job_id":"90d54cd4-cde7-4ac7-a7f3-a45b2521d714","html_url":"https://github.com/purarue/newest","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/purarue%2Fnewest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purarue%2Fnewest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purarue%2Fnewest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purarue%2Fnewest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/purarue","download_url":"https://codeload.github.com/purarue/newest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243940058,"owners_count":20372044,"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":["cli","utility"],"created_at":"2024-10-26T10:01:23.502Z","updated_at":"2025-03-18T16:30:23.684Z","avatar_url":"https://github.com/purarue.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"## newest\n\nBasic CLI tool to print the most recently modified file in a directory:\n\n```\nusage: newest [OPTIONS] [DIR]\n\nPrints the newest file in a directory\n\nIf a positional argument is not provided, prints the newest file in this directory\nIf the current directory could not be determined, this fails\n\nOptional arguments:\n  -ignore-hidden\n    \tIgnore hidden files\n  -include-dirs\n    \tInclude directories in addition to files\n```\n\n### Install\n\nUsing `go install` to put it on your `$GOBIN`:\n\n`go install github.com/purarue/newest@latest`\n\nManually:\n\n```bash\ngit clone https://github.com/purarue/newest\ncd ./newest\ngo build .\n# copy binary somewhere on your $PATH\nsudo cp ./newest /usr/local/bin\n```\n\n### Examples\n\nI use this in a lot of small scripts/aliases bound to key bindings:\n\nTo move the last file from my Downloads folder to my current directory:\n\n`mv -v \"$(newest \"${HOME}/Downloads\")\" './'`\n\nTo preview my latest screenshot:\n\n`nsxiv -a \"$(newest \"${HOME}/Pictures/Screenshots\")\"`\n\nTo grab my most recent screenshot, and upload it to imgur:\n\n`imgur-uploader \"$(newest \"${HOME}/Pictures/Screenshots\")\"`\n\nAlso commonly use it to check some output file from a command that just run in this directory:\n\n- `cat \"$(newest)\"`\n- `jq \u003c$(newest)`\n- `wc -l \u003c$(newest)`\n- `tail -f $(newest)`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpurarue%2Fnewest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpurarue%2Fnewest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpurarue%2Fnewest/lists"}