$ ln target target_hdlink
$ ln -s target target_stlink
$ ls -al target_stlink
lrwxrwxrwx 1 beyes beyes 6 Jun 23 07:42 target_stlink -> target
$ ln -s target target_stlink
ln: creating symbolic link `target_stlink': File exists
$ ln -i target target_hdlink
ln: replace `target_hdlink'? y
$ ln -f target target_hdlink
$ ln -b target target_hdlink
$ ls
target target_hdlink target_hdlink~
$ ln --backup=numbered target target_hdlink
$ ln --backup=numbered target target_hdlink
$ ln --backup=t target target_hdlink
$ ls
target target_hdlink~ target_stlink
target_hdlink target_hdlink.~1~ target_hdlink.~2~ target_hdlink.~3~
- `none', `off'
- `simple', `never'
- `existing', `nil'
- `numbered', `t'
$ ln -b -S .hdback target target_hdlink
$ ls
target target_hdlink target_hdlink.hdback target_stlink
ln [OPTION]... TARGET... DIRECTORY (3rd form)
$ ls -al
total 16
drwxr-xr-x 4 beyes beyes 4096 Jun 23 08:27 .
drwxr-xr-x 3 beyes beyes 4096 Jun 23 06:50 ..
-rw-r--r-- 1 beyes beyes 0 Jun 23 08:23 file1
-rw-r--r-- 1 beyes beyes 0 Jun 23 08:23 file2
-rw-r--r-- 1 beyes beyes 0 Jun 23 08:25 file3
drwxr-xr-x 2 beyes beyes 4096 Jun 23 08:26 filedir
drwxr-xr-x 2 beyes beyes 4096 Jun 23 08:27 SLDir
$ ln -s /home/beyes/command/ln/file1 /home/beyes/command/ln/file2 /home/beyes/command/ln/file3 /home/beyes/command/ln/filedir/ SLDir/
$ ls -al
total 8
drwxr-xr-x 2 beyes beyes 4096 Jun 23 08:27 .
drwxr-xr-x 4 beyes beyes 4096 Jun 23 08:27 ..
lrwxrwxrwx 1 beyes beyes 28 Jun 23 08:27 file1 -> /home/beyes/command/ln/file1
lrwxrwxrwx 1 beyes beyes 28 Jun 23 08:27 file2 -> /home/beyes/command/ln/file2
lrwxrwxrwx 1 beyes beyes 28 Jun 23 08:27 file3 -> /home/beyes/command/ln/file3
lrwxrwxrwx 1 beyes beyes 31 Jun 23 08:27 filedir -> /home/beyes/command/ln/filedir/
ln -d SDir TDir
$ ln -s Dir1 Dir1SL
$ ln -s Dir1 Dir1SLF
beyes@debian:~/command/ln$ ls -al
total 12
drwxr-xr-x 3 beyes beyes 4096 Jun 23 09:23 .
drwxr-xr-x 3 beyes beyes 4096 Jun 23 06:50 ..
drwxr-xr-x 2 beyes beyes 4096 Jun 23 09:24 Dir1
lrwxrwxrwx 1 beyes beyes 4 Jun 23 09:22 Dir1SL -> Dir1
lrwxrwxrwx 1 beyes beyes 4 Jun 23 09:23 Dir1SLF -> Dir1
$ ln -s Dir1 Dir1SLF
ln: creating symbolic link `Dir1SLF/Dir1': File exists
欢迎光临 曲径通幽论坛 (http://www.groad.net/bbs/) | Powered by Discuz! X3.2 |