{"id":17865819,"url":"https://github.com/ttskch/touchdir","last_synced_at":"2025-04-02T22:10:08.129Z","repository":{"id":66183973,"uuid":"82663809","full_name":"ttskch/touchdir","owner":"ttskch","description":"A CLI tool to update timestamp of directories to the same timestamp of the newest file in the directory recursively.","archived":false,"fork":false,"pushed_at":"2017-02-21T10:19:08.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-08T12:23:10.920Z","etag":null,"topics":["directory","newest","recursive","touch"],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/ttskch.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":"2017-02-21T09:55:03.000Z","updated_at":"2017-02-21T10:19:56.000Z","dependencies_parsed_at":"2023-02-26T19:30:50.454Z","dependency_job_id":null,"html_url":"https://github.com/ttskch/touchdir","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/ttskch%2Ftouchdir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttskch%2Ftouchdir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttskch%2Ftouchdir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttskch%2Ftouchdir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ttskch","download_url":"https://codeload.github.com/ttskch/touchdir/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246899658,"owners_count":20851898,"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":["directory","newest","recursive","touch"],"created_at":"2024-10-28T09:25:10.741Z","updated_at":"2025-04-02T22:10:08.108Z","avatar_url":"https://github.com/ttskch.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# touchdir\n\nA CLI tool to update timestamp of directories to the same timestamp of the newest file in the directory recursively.\n\n## Requirements\n\n* PHP 5.4+\n\n## Installation\n\n```sh\n$ git clone git@github.com:ttskch/touchdir.git\n$ cd touchdir\n$ composer install\n$ chmod +x touchdir\n$ ln -s $(pwd)/touchdir /usr/local/bin/\n```\n\n## Usage\n\n```sh\n$ touchdir -h\nUsage:\n  touchdir [options] [--] \u003cdir\u003e\n\nArguments:\n  dir                   Target directory\n\nOptions:\n  -N, --dry-run         Show what would be updated without actual updating\n  -h, --help            Display this help message\n  -q, --quiet           Do not output any message\n  -V, --version         Display this application version\n      --ansi            Force ANSI output\n      --no-ansi         Disable ANSI output\n  -n, --no-interaction  Do not ask any interactive question\n  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug\n\nHelp:\n  Update timestamp of directories to the same timestamp of the newest file in the directory recursively\n```\n\n## Example\n\nIf you have a directory like following:\n\n```sh\n$ tree -D\n.\n├── [Feb 20  0:00]  dir1            # \u003c- will be touched to 'Feb 12 12:00\n│   ├── [Feb 20  0:00]  dir2        # \u003c- will be touched to 'Feb 11 20:00\n│   │   ├── [Feb 10  0:00]  file3   #\n│   │   └── [Feb 11 20:00]  file4   # \u003c- newest in dir2\n│   ├── [Feb 12  0:00]  file1       #\n│   └── [Feb 12 12:00]  file2       # \u003c- newest in dir1\n└── [Feb 20  0:00]  dir3            # \u003c- will be touched to 'Feb 11 20:00\n    └── [Feb 11 20:00]  file5       # \u003c- newest in dir3\n\n3 directories, 5 files\n\n```\n\nThen `touchdir` updates timestamps of 3 directories as below: \n\n```sh\n$ touchdir .\n ./dir1/dir2 2017-02-11 20:00:00\n ./dir1      2017-02-12 12:00:00\n ./dir3      2017-02-11 20:00:00\n```\n\nEnjoy :smiley:\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fttskch%2Ftouchdir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fttskch%2Ftouchdir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fttskch%2Ftouchdir/lists"}