Fri*_*Dev 2 linux symbolic-link
我有一个包含以下内容的文件夹。我想更改单个原子事务中的符号链接而不删除它。
drwxr-xr-x 9 root root 4096 Apr 10 13:47 2012-03-19
drwxr-xr-x 9 root root 4096 Apr 10 13:44 2012-04-10
lrwxrwxrwx 1 root root 10 Mar 19 15:28 current -> 2012-03-19
Run Code Online (Sandbox Code Playgroud)
我曾经想过以下方法可以做到:
# ln -sf 2012-04-10 current
Run Code Online (Sandbox Code Playgroud)
但是,不需要。任何帮助是极大的赞赏!
尝试以下
ln -sfn 2012-04-10 current
Run Code Online (Sandbox Code Playgroud)
原因
-n, --no-dereference
treat destination that is a symlink to a directory as if it were a normal file
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
487 次 |
| 最近记录: |