{"id":22188419,"url":"https://github.com/vmikk/symlink2file","last_synced_at":"2026-07-13T15:31:52.297Z","repository":{"id":219435410,"uuid":"749047105","full_name":"vmikk/symlink2file","owner":"vmikk","description":"Replace symlinked files with their original files","archived":false,"fork":false,"pushed_at":"2026-06-23T09:20:17.000Z","size":85,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-06-23T12:17:49.327Z","etag":null,"topics":["cli","files","golang","symlink"],"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/vmikk.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":"2024-01-27T12:38:07.000Z","updated_at":"2026-06-23T09:20:33.000Z","dependencies_parsed_at":"2024-06-21T05:30:19.782Z","dependency_job_id":"31586f61-2c84-47bc-83e8-b621f7507980","html_url":"https://github.com/vmikk/symlink2file","commit_stats":null,"previous_names":["vmikk/symlink2file"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/vmikk/symlink2file","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vmikk%2Fsymlink2file","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vmikk%2Fsymlink2file/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vmikk%2Fsymlink2file/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vmikk%2Fsymlink2file/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vmikk","download_url":"https://codeload.github.com/vmikk/symlink2file/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vmikk%2Fsymlink2file/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35427834,"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-07-13T02:00:06.543Z","response_time":119,"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":["cli","files","golang","symlink"],"created_at":"2024-12-02T11:10:24.664Z","updated_at":"2026-07-13T15:31:52.292Z","avatar_url":"https://github.com/vmikk.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# symlink2file\n[![Go](https://github.com/vmikk/symlink2file/actions/workflows/go.yml/badge.svg)](https://github.com/vmikk/symlink2file/actions/workflows/go.yml)\n\n## Overview\n\n`symlink2file` is a command-line tool designed for Unix-like operating systems. \nIts primary function is to replace symbolic links (symlinks) in a specified directory \nwith the actual files they point to. This tool may be useful in scenarios where symlinks \nneed to be converted to regular files, such as for archival purposes, \nsimplifying file structures, or preparing data for environments that do not support symlinks.\n\n## Features\n\n- Symlink resolving: Recursively resolves symlinks (absolute and relative), including those pointing to other symlinks, to ensure the final result is a regular file;\n- Backup: Provides an option to backup original symlinks before replacement;\n- Subdirectory traversal (optional);\n- Broken symlink handling: Offers configurable behavior for dealing with broken symlinks - either keep them as-is or delete them.\n- Preservation of file attributes: Attempts to preserve the original file attributes (like creation time) where possible.\n\n\n## Usage\n\nBasic usage:\n```bash\n./symlink2file [OPTIONS] \u003cdirectory\u003e\n```\n\nOptions:\n- `--no-backup`: Disable backup of original symlinks;\n- `--broken-symlinks=keep|delete`: Define how to handle broken symlinks (default: `keep`);\n- `--no-recurse`: Disable recursive traversal of subdirectories.\n\nExample:\n```bash\n./symlink2file --no-backup --broken-symlinks delete ./path/to/directory\n```\n\nThis command will replace all symlinks in `./path/to/directory` with their target files, \nwithout creating backups, \nand will delete any broken symlinks found.\n\n\n## Installation\n\n`symlink2file` can be installed either by downloading a pre-compiled binary or by compiling the source code manually. \n\n### Option 1: Download Pre-compiled Binary\n\n1. Go to the [Releases](https://github.com/vmikk/symlink2file/releases) page;\n2. Download the binary;\n3. Make the binary executable:\n```bash\nchmod +x symlink2file\n```\n\n### Option 2: Compile from source\n\n1. Ensure you have [Go](https://go.dev/) (`\u003e=1.21`) installed on your system;\n2. Clone the repository and compile the source code:\n\n```bash \ngit clone https://github.com/vmikk/symlink2file\ncd symlink2file\ngo build -ldflags=\"-s -w\" symlink2file.go\n```\n\nThis will create an executable named `symlink2file` in the current directory.\n\n\nFor cross-platform compatibility, you can use the `GOOS` and `GOARCH` environment variables to specify the target platform. For example:\n\n```bash\nGOOS=linux GOARCH=amd64 go build -ldflags=\"-s -w\" symlink2file.go -o symlink2file-linux-amd64\nGOOS=linux GOARCH=arm64 go build -ldflags=\"-s -w\" symlink2file.go -o symlink2file-linux-arm64\nGOOS=darwin GOARCH=amd64 go build -ldflags=\"-s -w\" symlink2file.go -o symlink2file-darwin-amd64\nGOOS=darwin GOARCH=arm64 go build -ldflags=\"-s -w\" symlink2file.go -o symlink2file-darwin-arm64\n```\n\n### Run tests\n\nTests are written using [Bats](https://github.com/bats-core/bats-core) and can be run with the following commands:\n\n```bash\n# Pull bats submodules  \ngit submodule update --init --recursive\n\n# Run tests\n./test/bats/bin/bats test/test.bats\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvmikk%2Fsymlink2file","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvmikk%2Fsymlink2file","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvmikk%2Fsymlink2file/lists"}