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

내용 삭제됨 내용 추가됨
편집 요약 없음
편집 요약 없음
5번째 줄:
== 사양 ==
[[단일 유닉스 규격]]을 준수하는 시스템 상의 <code>ln</code> 유틸리티는 SUS의 일부를 형성하는 셸과 유틸리티(XCU) 문서에 명시되어 있다.<ref name=SUSOverview>{{웹 인용|title=The Single UNIX Specification, Version 4 - Overview|url=http://www.unix.org/version4/overview.html|website=unix.org|publisher=unix.org|accessdate=7 August 2015}}</ref><ref name=XCUTOC>{{웹 인용|title=Shell & Utilities: Detailed Toc|url=http://pubs.opengroup.org/onlinepubs/9699919799/utilities/contents.html|website=pubs.opengroup.org|publisher=The IEEE and The Open Group|accessdate=7 August 2015}}</ref>
 
이 사양은 <code>ln</code> 유틸리티를 호출하는 2가지 방법을 기술한다.<ref name=lnSpec>{{웹 인용|title=ln|url=http://pubs.opengroup.org/onlinepubs/9699919799/utilities/ln.html#tag_20_67|website=pubs.opengroup.org|publisher=The IEEE and The Open Group|accessdate=7 August 2015}}</ref> 더 구체적으로 말해,
::하나의 파일을 호출할 때 <code>ln</code> 유틸리티는 <code>target_file</code> 연산자에 의해 지정된 목적 경로에서 <code>source_file</code> 연산자에 의해 지정된 소스 파일에 대한 새로운 하드 링크(디렉터리 엔트리)를 생성한다. 그러나 <code>-s</code> 옵션이 지정되면 심볼릭 링크를 생성한다.
::<syntaxhighlight lang="bash">
ln [-fs] [-L|-P] source_file target_file
</syntaxhighlight>
::여러 개의 파일을 호출할 때 <code>ln</code> 유틸리티는 새로운 하드 링크를 만들지만([http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_130 Directory entry]) <code>-s</code> 옵션을 지정하면 심볼릭 링크를 생성한다. 이는 <code>target_dir</code> 연산자에 의해 명명된 기존의 디렉터리의 목적 경로에서 <code>source_file</code> 연산자에 의해 지정된 각 파일을 대상으로 한다.
::<syntaxhighlight lang="bash">
ln [-fs] [-L|-P] source_file_1 source_file_2 ... target_dir
</syntaxhighlight>
 
== 같이 보기 ==