Ln (유닉스): 두 판 사이의 차이

내용 삭제됨 내용 추가됨
TedBot (토론 | 기여)
잔글 봇: 인용 틀 구식 변수 정리
15번째 줄:
| website =
}}
<code>'''ln'''</code> 명령어는 기존 파일에 대한 [[하드 링크]]나 [[심볼릭 링크]]를 생성하기 위해 사용되는 표준 [[유닉스 명령어 목록|유닉스 명령]] 유틸리티이다.<ref name=UNIXKP>{{서적 인용|last1=Kernighan|first1=Brian W.|last2=Pike|first2=Rob|title=The Unix programming environment.|url=https://archive.org/details/unixprogramminge0000kern|date=1984|publisher=Prentice-Hall|location=Englewood Cliffs, N.J.|isbn=013937681X|page=[https://archive.org/details/unixprogramminge0000kern/page/59 59]}}</ref> 하드 링크를 사용하면 여러 개의 [[파일 이름]]을 동일한 [[컴퓨터 파일|파일]]에 연결할 수 있으며, 하드 링크는 지정된 파일의 [[아이노드]]를 가리키게 되며 데이터는 [[하드 디스크 드라이브|디스크]]에 저장된다. 한편, 심볼릭 링크는 [[파일 이름|이름]]을 통해 다른 파일들을 가리키는 특수한 파일들이다.<ref name=GNULnman>{{웹 인용|title=GNU Coreutils: ln invocation|url=https://www.gnu.org/software/coreutils/manual/html_node/ln-invocation.html|website=gnu.org|publisher=Free Software Foundation, Inc.|accessdate=7 August 2015}}</ref>
 
<code>ln</code> 명령어는 기본적으로 하드 링크를 생성하며 [[명령 줄 인터페이스|명령 줄]] [[명령 줄 인터페이스|변수]] <code>ln '-s'</code>로 호출할 때 심볼릭 링크를 생성한다.<ref>{{웹 인용|title=ln - The Open Group Base Specifications Issue 7|url=http://pubs.opengroup.org/onlinepubs/9699919799/utilities/ln.html|website=pubs.opengroup.org|publisher=The IEEE and The Open Group|accessdate=7 August 2015}}</ref> 대부분의 [[운영 체제]]는 [[디렉터리]]에 대한 하드 링크 생성을 금지하는데, 이러한 기능은 [[파일 시스템]]의 구조를 파괴하여 다른 유틸리티의 동작에 간섭을 줄 수 있기 때문이다.<ref>{{웹 인용|title=Why are hard links not allowed to directories in UNIX/Linux?|url=http://unix.stackexchange.com/questions/22394/why-hard-links-not-allowed-to-directories-in-unix-linux?rq=1|website=unix.stackexchange.com|accessdate=7 August 2015}}</ref> 그러나 <code>ln</code> 명령어는 기존에 존재하지 않는 파일에 대한 심볼릭 링크를 생성하기 위해 사용할 수 있다.<ref name=GNULnman />