Linux command
lnko 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Link packages to the home directory
lnko link [package1] [package2]
Link packages from a specific source to a target directory
lnko link -d [~/dotfiles] -t [~] [package_name]
Unlink a package
lnko unlink [package_name]
Preview changes without creating symlinks
lnko link -n [package_name]
Show status of all packages
lnko status
Remove orphaned symlinks
lnko clean
Force-overwrite conflicting files
lnko link -f [package_name]
说明
lnko is a simple stow-like dotfile linker that creates relative symlinks from a source directory containing packages to a target directory. Each package is a directory whose contents mirror the target structure. It supports tree folding, ignore patterns, dry-run mode, and multiple conflict resolution strategies. When conflicts are detected, lnko provides an interactive prompt with backup, skip, overwrite, and diff options unless an auto-resolve flag is given. Compatible with existing GNU Stow symlinks.
参数
- link
- Create relative symlinks from source packages to the target directory.
- unlink
- Remove symlinks for specified packages.
- status
- Display the current state of all packages and their symlinks.
- clean
- Remove orphaned symlinks pointing to non-existent targets.
- -d, --dir _dir_
- Specify source directory containing packages (default: current directory).
- -t, --target _dir_
- Specify target directory for symlinks (default: $HOME).
- -n, --dry-run
- Preview changes without creating symlinks.
- -v, --verbose
- Output detailed debugging information.
- -b, --backup
- Auto-resolve conflicts by backing up existing files to .lnko-backup/.
- -s, --skip
- Auto-resolve conflicts by skipping conflicting files.
- -f, --force
- Auto-resolve conflicts by force-overwriting.
- --ignore _pattern_
- Exclude files matching pattern (repeatable).
- --no-folding
- Prevent directory folding into symlinks.
FAQ
What is the lnko command used for?
lnko is a simple stow-like dotfile linker that creates relative symlinks from a source directory containing packages to a target directory. Each package is a directory whose contents mirror the target structure. It supports tree folding, ignore patterns, dry-run mode, and multiple conflict resolution strategies. When conflicts are detected, lnko provides an interactive prompt with backup, skip, overwrite, and diff options unless an auto-resolve flag is given. Compatible with existing GNU Stow symlinks.
How do I run a basic lnko example?
Run `lnko link [package1] [package2]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does link do in lnko?
Create relative symlinks from source packages to the target directory.