{"id":21670874,"url":"https://github.com/tkuchiki/tsmv","last_synced_at":"2025-07-15T17:44:22.947Z","repository":{"id":70076466,"uuid":"66250385","full_name":"tkuchiki/tsmv","owner":"tkuchiki","description":"time sliced mv","archived":false,"fork":false,"pushed_at":"2016-08-23T03:07:38.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-25T09:11:08.147Z","etag":null,"topics":["cli","golang","mv","time-based"],"latest_commit_sha":null,"homepage":null,"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/tkuchiki.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":"2016-08-22T07:41:06.000Z","updated_at":"2023-02-15T21:58:38.000Z","dependencies_parsed_at":"2023-02-28T08:00:48.543Z","dependency_job_id":null,"html_url":"https://github.com/tkuchiki/tsmv","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkuchiki%2Ftsmv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkuchiki%2Ftsmv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkuchiki%2Ftsmv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkuchiki%2Ftsmv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tkuchiki","download_url":"https://codeload.github.com/tkuchiki/tsmv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244574795,"owners_count":20474818,"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","golang","mv","time-based"],"created_at":"2024-11-25T12:36:59.878Z","updated_at":"2025-03-20T07:43:42.292Z","avatar_url":"https://github.com/tkuchiki.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tsmv\ntsmv is time sliced mv.\n\n## Installation\n\nDownload from https://github.com/tkuchiki/tsmv/releases\n\n\n## Usage\n\n```\n$ ./tsmv --help\nusage: tsmv [\u003cflags\u003e] [\u003cfilepaths\u003e...]\n\nFlags:\n      --help              Show context-sensitive help (also try --help-long and --help-man).\n  -t, --target-directory=DIRECTORY\n                          move all source arguments into directory\n  -f, --format=\"%Y%m%d\"   strftime format\n  -c, --create-directory  create target directory\n  -r, --recursive         create directories recursively\n  -m, --mode=0755         file mode\n      --dry-run           enable dry-run mode\n  -n, --name              name based slice (format %Y[._/-]?%m[._/-]?%d[._/-]?%H?)\n      --version           Show application version.\n\nArgs:\n  [\u003cfilepaths\u003e]  some file paths\n```\n\n## Examples\n\n```\n$ ./setup_example.sh\n\n$ ls tmp/\ndest    src\n\n$ ls -l tmp/src/\ntotal 0\n-rw-r--r--  1 tkuchiki  tkuchiki  0  8 22 00:00 testfile-20160722-01.log\n-rw-r--r--  1 tkuchiki  tkuchiki  0  8 22 00:00 testfile-20160722.log\n-rw-r--r--  1 tkuchiki  tkuchiki  0  8 22 00:00 testfile1\n-rw-r--r--  1 tkuchiki  tkuchiki  0  8 22 00:00 testfile2\n-rw-r--r--  1 tkuchiki  tkuchiki  0  8 21 00:00 testfile3\n-rw-r--r--  1 tkuchiki  tkuchiki  0  8 20 00:00 testfile4\n```\n\n### dry-run\n\n```\n$ find ./tmp/src/ -type f | ./tsmv -c -t ./tmp/dest/ --dry-run\nmkdir ./tmp/dest/20160822\nmv ./tmp/src//testfile1 ./tmp/dest/20160822/testfile1\nmv ./tmp/src//testfile2 ./tmp/dest/20160822/testfile2\nmkdir ./tmp/dest/20160821\nmv ./tmp/src//testfile3 ./tmp/dest/20160821/testfile3\nmkdir ./tmp/dest/20160820\nmv ./tmp/src//testfile4 ./tmp/dest/20160820/testfile4\n\n$ find ./tmp/src/ -type f | xargs ./tsmv -c -t ./tmp/dest/ -f \"%Y-%m-%d\" --dry-run\nmkdir ./tmp/dest/2016-08-22\nmv ./tmp/src//testfile1 ./tmp/dest/2016-08-22/testfile1\nmv ./tmp/src//testfile2 ./tmp/dest/2016-08-22/testfile2\nmkdir ./tmp/dest/2016-08-21\nmv ./tmp/src//testfile3 ./tmp/dest/2016-08-21/testfile3\nmkdir ./tmp/dest/2016-08-20\nmv ./tmp/src//testfile4 ./tmp/dest/2016-08-20/testfile4\n\n$ find ./tmp/src/ -type f | xargs ./tsmv -c -t ./tmp/dest/ -f \"%Y%m%d\" -n --dry-run\nmkdir ./tmp/dest/20160722\nmv ./tmp/src//testfile-20160722-01.log ./tmp/dest/20160722/testfile-20160722-01.log\nmv ./tmp/src//testfile-20160722.log ./tmp/dest/20160722/testfile-20160722.log\n\n$ find ./tmp/src/ -type f | xargs ./tsmv -c -t ./tmp/dest/ -f \"%Y%m%d%H\" -n --dry-run\nmkdir ./tmp/dest/2016072201\nmv ./tmp/src//testfile-20160722-01.log ./tmp/dest/2016072201/testfile-20160722-01.log\nmkdir ./tmp/dest/2016072200\nmv ./tmp/src//testfile-20160722.log ./tmp/dest/2016072200/testfile-20160722.log\n```\n\n### run\n\n```\n$ find ./tmp/src/ -type f | xargs ./tsmv -c -t ./tmp/dest/ -f \"%Y%m%d%H\" -n\n\n$ ls tmp/dest/\n2016072200      2016072201\n\n$ ls tmp/dest/20160722*\ntmp/dest/2016072200:\ntestfile-20160722.log\n\ntmp/dest/2016072201:\ntestfile-20160722-01.log\n\n$ find ./tmp/src/ -type f | ./tsmv -c -t ./tmp/dest/\n\n$ ls ./tmp/dest/\n20160820        20160821        20160822\n\n$ ls -l ./tmp/dest/20160820/\ntotal 0\n-rw-r--r--  1 tkuchiki  tkuchiki  0  8 20 00:00 testfile4\n\n$ ls -l ./tmp/dest/20160821\ntotal 0\n-rw-r--r--  1 tkuchiki  tkuchiki  0  8 21 00:00 testfile3\n\n$ ls -l ./tmp/dest/20160822\ntotal 0\n-rw-r--r--  1 tkuchiki  tkuchiki  0  8 22 00:00 testfile1\n-rw-r--r--  1 tkuchiki  tkuchiki  0  8 22 00:00 testfile2\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkuchiki%2Ftsmv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftkuchiki%2Ftsmv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkuchiki%2Ftsmv/lists"}