Copyright(c) by Galaxy CD – http://www.galaxycd.com
21
$
pwd
/users/user2
$
ls
-l
total 2
drwxrwxr-x 2
user2 stagiair
96
Apr
4
10:20 copie
drwxrwxr-x 2
user2 stagiair
96
Apr
4
10:21 source
$
mv source
replace
$
ls
-l
total 2
drwxrwxr-x 2
user2 stagiair 96
Apr
4
10:20 copie
drwxrwxr-x 2
user2 stagiair 96
Apr
4
10:21 replace
$
ls
-l
replace
total 3
-rw-rw-r-- 1 user2 stagiair
16
Apr
5
16:25 original1.bis
-rw-rw-r-- 1 user2 stagiair
17
Apr
5
16:26 original2
-rw-rw-r-- 1 user2 stagiair
18
Apr
5
16:27 original3
4.3 Taïo lieân keát vôùi file:
Taïo lieân keát vôùi file laø taïo theâm cho file teân môùi vaø ñöôøng daãn töông öùng. Leänh
ln
cho
pheùp ta laøm vieäc treân.
$
ln
file_nguoàn
file_ñích
Baèng leänh ls -l, ta coù theå xem soá lieân keát cuûa file. Leänh rm duøng ñeå xoùa moät lieân keát.
Muoán xoaù moät file, ta phaûi xoaù taát caû caùc lieân keát cuûa noù.
Thí duï:
$
pwd
/users/user2
$
ls
-l
total 2
drwxrwxr-x 2
user2 stagiair
96
Apr
4
10:20 appli
drwxrwxr-x 2
user2 stagiair
96
Apr
4
10:21 source
$
ls
-l
appli
total 1
-rw-rw-r-- 1 user2 stagiair
71
Apr
5
17:05 file1
$
ln
appli/file1
file.link