{"id":18527676,"url":"https://github.com/helinwang/sync_mv","last_synced_at":"2025-04-23T06:22:39.225Z","repository":{"id":65133264,"uuid":"579079488","full_name":"helinwang/sync_mv","owner":"helinwang","description":null,"archived":false,"fork":false,"pushed_at":"2022-12-29T16:44:58.000Z","size":36,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-13T01:04:07.458Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/helinwang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-12-16T15:54:39.000Z","updated_at":"2025-01-08T05:33:44.000Z","dependencies_parsed_at":"2023-01-01T00:36:16.312Z","dependency_job_id":null,"html_url":"https://github.com/helinwang/sync_mv","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/helinwang%2Fsync_mv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helinwang%2Fsync_mv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helinwang%2Fsync_mv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helinwang%2Fsync_mv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/helinwang","download_url":"https://codeload.github.com/helinwang/sync_mv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250380821,"owners_count":21421012,"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":[],"created_at":"2024-11-06T17:55:43.070Z","updated_at":"2025-04-23T06:22:39.207Z","avatar_url":"https://github.com/helinwang.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# sync_mv\n\n## Overview\nGenerates a script containing `mkdir` and `mv` commands that moves the files in the `dst` folder to\nmatch the file structure of the `src` folder.\n\nThis utility is helpful for avoiding file copy (often from a remote computer) when using `rsync` and\nthe files in the `src` folder have been moved:\n\n1. It detects a file that have been moved in `src` that already existing in `dst`, and generate a\n`mv` command to move the file.\n\n2. It detects duplication with file size and modified date. So it's assuming `rsync` is copying the\nfile attributes over. E.g., using `rsync -a`.\n\n3. By default files smaller than 1MB is ignored, since copying them with `rsync` does not add much\ntime. The threshold can be controlled by the `--min-file-size` flag.\n\n4. All symlinks are ignored.\n\nCommand:\n\n```bash\nsync_mv --action digest --folder source_folder --min-file-size 1000000 \u003e src.json\n# or: ssh user@host_ip '/home/user/sync_mv --action digest --folder source_folder --min-file-size 1000000' \u003e src.json\nsync_mv --action digest --folder destination_folder --min-file-size 1000000 \u003e dst.json\nsync_mv --action diff --src src.json --dst dst.json \u003e diff.txt\n```\n\nThe above command generates a diff.txt containing the command to run. You can inspect the file and\nrun it and then optionally sync the folders with `rsync`. E.g.,\n\n```bash\nbash diff.txt\nrsync -avh source_folder destination_folder\n```\n\n## Installation\n\n1. [install cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html)\n2. run `cargo install sync_mv`\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelinwang%2Fsync_mv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhelinwang%2Fsync_mv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelinwang%2Fsync_mv/lists"}