ln
Create hard or symbolic links with overwrite protection and dry-run preview. Returns link path and type for filesystem aliasing.
Instructions
Create hard or symbolic links with dry-run and overwrite protection. Destructive: creates filesystem links. Use --symbolic for symlinks (cross-filesystem, can point to directories). Overwrite protection enabled by default. Use --dry_run to preview. Returns JSON with link path and type. Use for creating filesystem aliases. Not for hard-link-only operations — use 'link' for guaranteed hard links. Not for copying — use 'cp'. See also 'link', 'cp'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| allow_overwrite | No | Allow replacing an existing destination. | |
| destination | Yes | Link path to create. | |
| dry_run | No | Report operation without changing files. | |
| parents | No | Create missing parent directories. | |
| source | Yes | Source path or symlink target. | |
| symbolic | No | Create a symbolic link. |