반응형
출처 :: http://my.jhlabs.org/60
리눅스의 파일시스템에서 자체 지원하는 심볼릭 링크는 아주 유용한 기능이다.
이제 윈도우 비스타 및 Windows Server 2008에서도 심볼릭 링크 기능을 자체 내장하게 되었단다.
바로 mklink 명령어를 이용하면 된다.
Description of 'mklink' command
C:\test>mklink
Creates a symbolic link.
MKLINK [[/D] | [/H] | [/J]] Link Target
/D Creates a directory symbolic link. Default is a file
symbolic link.
/H Creates a hard link instead of a symbolic link.
/J Creates a Directory Junction.
Link specifies the new symbolic link name.
Target specifies the path (relative or absolute) that the new link
refers to.
Creating a symbolic link to a file
C:\test>mklink foo c:\Windows\system32\notepad.exe
symbolic link created for foo <<===>> c:\Windows\system32\notepad.exe
C:\test>dir
Volume in drive C has no label.
Volume Serial Number is 2211-7428
Directory of C:\test
04/14/2006 11:24 AM <DIR> .
04/14/2006 11:24 AM <DIR> ..
04/14/2006 11:24 AM <SYMLINK> foo [c:\Windows\system32\notepad.exe]
1 File(s) 0 bytes
2 Dir(s) 69,238,722,560 bytes free
Creating a symbolic link to a directory
C:\test>mklink /d bar c:\windows
symbolic link created for bar <<===>> c:\windows
C:\test>dir
Volume in drive C has no label.
Volume Serial Number is 2211-7428
Directory of C:\test
04/14/2006 11:24 AM <DIR> .
04/14/2006 11:24 AM <DIR> ..
04/14/2006 11:24 AM <SYMLINKD> bar [c:\windows]
04/14/2006 11:24 AM <SYMLINK> foo [c:\Windows\system32\notepad.exe]
1 File(s) 0 bytes
3 Dir(s) 69,238,722,560 bytes free
Deleting a symbolic link to a file
C:\test>del foo
C:\test>dir
Volume in drive C has no label.
Volume Serial Number is 2211-7428
Directory of C:\test
04/14/2006 11:24 AM <DIR> .
04/14/2006 11:24 AM <DIR> ..
04/14/2006 11:24 AM <SYMLINKD> bar [c:\windows]
0 File(s) 0 bytes
3 Dir(s) 69,238,722,560 bytes free
Deleting a symbolic link to a directory
C:\test>rmdir bar
C:\test>dir
Volume in drive C has no label.
Volume Serial Number is 2211-7428
Directory of C:\test
04/14/2006 11:24 AM <DIR> .
04/14/2006 11:24 AM <DIR> ..
0 File(s) 0 bytes
2 Dir(s) 69,238,722,560 bytes free
MKLINK [[/D] | [/H] | [/J]] Link Target
/D Creates a directory symbolic link. Default is a file symbolic link. /H Creates a hard link instead of a symbolic link. /J Creates a Directory Junction. Link specifies the new symbolic link name. Target specifies the path (relative or absolute) that the new link refers to.
Directory of C:\test
04/14/2006 11:24 AM <DIR> . 04/14/2006 11:24 AM <DIR> .. 04/14/2006 11:24 AM <SYMLINK> foo [c:\Windows\system32\notepad.exe] 1 File(s) 0 bytes 2 Dir(s) 69,238,722,560 bytes free
Directory of C:\test
04/14/2006 11:24 AM <DIR> . 04/14/2006 11:24 AM <DIR> .. 04/14/2006 11:24 AM <SYMLINKD> bar [c:\windows] 04/14/2006 11:24 AM <SYMLINK> foo [c:\Windows\system32\notepad.exe] 1 File(s) 0 bytes 3 Dir(s) 69,238,722,560 bytes free
Directory of C:\test
04/14/2006 11:24 AM <DIR> . 04/14/2006 11:24 AM <DIR> .. 04/14/2006 11:24 AM <SYMLINKD> bar [c:\windows] 0 File(s) 0 bytes 3 Dir(s) 69,238,722,560 bytes free
Directory of C:\test
04/14/2006 11:24 AM <DIR> . 04/14/2006 11:24 AM <DIR> .. 0 File(s) 0 bytes 2 Dir(s) 69,238,722,560 bytes free
반응형
'Tips' 카테고리의 다른 글
putty 나 xShell 등 shell 프로그램에서 GUI (X11) 보기 (0) | 2011.08.09 |
---|---|
진수 계산기 (0) | 2011.06.08 |
Code highlighters (java) (0) | 2011.05.02 |
우분투에서 한글사용 (0) | 2011.01.03 |
[Fedora] no such table: packages (0) | 2010.12.29 |
댓글