Loading...
Loading...
Create soft links (symbolic links) supporting Windows, macOS and Linux systems. Automatically select the correct command to create soft links for directories or files according to the current operating system. This skill is used when users need to create soft links, symbolic links, or need to share files/directories in different locations.
npx skill4agent add steelan9199/wechat-publisher create-symlinkprocess.platformC:\\Users\\...D:\\.../Users/username/...~/.../home/username/...~/...win32darwinlinuxNew-Item -ItemType SymbolicLink -Path "目标路径" -Target "源路径"mklink /D "目标路径" "源路径"ln -s "源路径" "目标路径"New-Item -ItemType SymbolicLink -Path "目标文件路径" -Target "源文件路径"mklink "目标文件路径" "源文件路径"ln -s "源文件路径" "目标文件路径"mklink /H "目标文件路径" "源文件路径"ln "源文件路径" "目标文件路径"C:\\Users\\name\\folder"C:\\Users\\name\\folder"/home/user/folder~/folderNew-Item -ItemType SymbolicLink -Path "D:\\shared\\tools" -Target "C:\\tools"New-Item -ItemType SymbolicLink -Path "C:\\Users\\Public\\Desktop\\config.json" -Target "D:\\MyConfigs\\main-config.json"ln -s /Users/username/Documents/work /Users/username/Desktop/work-linkln -s ~/.config/app/settings.json ~/Desktop/settings-link.jsonln -s /home/user/projects/myapp /var/www/myappln -s /etc/nginx/sites-available/my-site /etc/nginx/sites-enabled/my-site# 查看链接详情
Get-ChildItem "链接路径"
# 查看是否为符号链接
(Get-Item "链接路径").Attributes# 查看链接详情
ls -la "链接路径"
# 验证链接指向
readlink "链接路径"
# 查看链接和源文件
ls -la "链接路径" "源路径"# 删除软链接(不要加 -Recurse,否则会删除源文件)
Remove-Item "链接路径"# 删除软链接(不要加 -r,否则会删除源文件)
rm "链接路径"
# 或
unlink "链接路径"