강좌
클라우드/리눅스에 관한 강좌입니다.
리눅스 분류

alternatives시스템이 사용하는 두개의 디렉토리

작성자 정보

  • 관리자 작성
  • 작성일

컨텐츠 정보

본문

alternatives시스템이 사용하는 두개의 디렉토리











 

alternatives시스템에는 중요한 2개의 디렉토리가 있습니다.

 

 

 

 하나는 alternatives기본 디렉토리이고 또 하나는 alternatives관리디렉토리입니다.

 

 

 

 첫번째는 /etc/alternatives디렉토리이고 두번째는 /var/lib/alternatives디렉토리입니다.

 

 

 

 이에 대해서 좀 더 자세히 알아 보겠습니다.

 

 

 

 

 

alternatives디렉토리 (alternatives directory)

 

이 디렉토리는 심볼릭링크파일들(이것을 symlink라고 함)이 존재하는 /etc/alternatives/디렉토리를 의미하는 것으로서 alternatives에 관련된 링크파일들이 존재하는 alternatives의 기본 디렉토리입니다.

 

 

 

 

 

[root@su241 alternatives]# ls -l /etc/alternatives/

total 140

lrwxrwxrwx 1 root root 19 Aug  6  2008 antlr -> /usr/bin/antlr-java

lrwxrwxrwx 1 root root 35 Aug  6  2008 java -> /usr/lib/jvm/jre-1.4.2-gcj/bin/java

lrwxrwxrwx 1 root root 32 Aug  6  2008 jaxp_parser_impl -> /usr/share/java/libgcj-4.1.1.jar

lrwxrwxrwx 1 root root 26 Aug  6  2008 jre -> /usr/lib/jvm/jre-1.4.2-gcj

lrwxrwxrwx 1 root root 26 Aug  6  2008 jre_1.4.2 -> /usr/lib/jvm/jre-1.4.2-gcj

lrwxrwxrwx 1 root root 34 Aug  6  2008 jre_1.4.2_exports -> /usr/lib/jvm-exports/jre-1.4.2-gcj

lrwxrwxrwx 1 root root 34 Aug  6  2008 jre_exports -> /usr/lib/jvm-exports/jre-1.4.2-gcj

lrwxrwxrwx 1 root root 26 Aug  6  2008 jre_gcj -> /usr/lib/jvm/jre-1.4.2-gcj

lrwxrwxrwx 1 root root 34 Aug  6  2008 jre_gcj_exports -> /usr/lib/jvm-exports/jre-1.4.2-gcj

lrwxrwxrwx 1 root root 38 Aug  6  2008 keytool -> /usr/lib/jvm/jre-1.4.2-gcj/bin/keytool

lrwxrwxrwx 1 root root 27 Aug  6  2008 mta -> /usr/sbin/sendmail.sendmail

lrwxrwxrwx 1 root root 41 Aug  6  2008 mta-aliasesman -> /usr/share/man/man5/aliases.sendmail.5.gz

lrwxrwxrwx 1 root root 23 Aug  6  2008 mta-mailq -> /usr/bin/mailq.sendmail

lrwxrwxrwx 1 root root 39 Aug  6  2008 mta-mailqman -> /usr/share/man/man1/mailq.sendmail.1.gz

lrwxrwxrwx 1 root root 28 Aug  6  2008 mta-newaliases -> /usr/bin/newaliases.sendmail

lrwxrwxrwx 1 root root 44 Aug  6  2008 mta-newaliasesman -> /usr/share/man/man1/newaliases.sendmail.1.gz

lrwxrwxrwx 1 root root 24 Aug  6  2008 mta-pam -> /etc/pam.d/smtp.sendmail

lrwxrwxrwx 1 root root 23 Aug  6  2008 mta-rmail -> /usr/bin/rmail.sendmail

lrwxrwxrwx 1 root root 26 Aug  6  2008 mta-sendmail -> /usr/lib/sendmail.sendmail

lrwxrwxrwx 1 root root 42 Aug  6  2008 mta-sendmailman -> /usr/share/man/man8/sendmail.sendmail.8.gz

lrwxrwxrwx 1 root root 17 Aug  6  2008 print -> /usr/bin/lpr.cups

lrwxrwxrwx 1 root root 20 Aug  6  2008 print-cancel -> /usr/bin/cancel.cups

lrwxrwxrwx 1 root root 36 Aug  6  2008 print-cancelman -> /usr/share/man/man1/cancel-cups.1.gz

lrwxrwxrwx 1 root root 16 Aug  6  2008 print-lp -> /usr/bin/lp.cups

lrwxrwxrwx 1 root root 18 Aug  6  2008 print-lpc -> /usr/sbin/lpc.cups

lrwxrwxrwx 1 root root 33 Aug  6  2008 print-lpcman -> /usr/share/man/man8/lpc-cups.8.gz

lrwxrwxrwx 1 root root 32 Aug  6  2008 print-lpman -> /usr/share/man/man1/lp-cups.1.gz

lrwxrwxrwx 1 root root 17 Aug  6  2008 print-lpq -> /usr/bin/lpq.cups

lrwxrwxrwx 1 root root 33 Aug  6  2008 print-lpqman -> /usr/share/man/man1/lpq-cups.1.gz

lrwxrwxrwx 1 root root 18 Aug  6  2008 print-lprm -> /usr/bin/lprm.cups

lrwxrwxrwx 1 root root 33 Aug  6  2008 print-lprman -> /usr/share/man/man1/lpr-cups.1.gz

lrwxrwxrwx 1 root root 34 Aug  6  2008 print-lprmman -> /usr/share/man/man1/lprm-cups.1.gz

lrwxrwxrwx 1 root root 20 Aug  6  2008 print-lpstat -> /usr/bin/lpstat.cups

lrwxrwxrwx 1 root root 36 Aug  6  2008 print-lpstatman -> /usr/share/man/man1/lpstat-cups.1.gz

lrwxrwxrwx 1 root root 42 Aug  6  2008 rmiregistry -> /usr/lib/jvm/jre-1.4.2-gcj/bin/rmiregistry

[root@su241 alternatives]#

 

 

관리디렉토리(administrative directory)

 

alternatives의 상태정보를 저장하고 있는 /var/lib/alternatives디렉토리로서  alternatives의 기본관리 디렉토리를 의미합니다.

 

 

 

 

 

[root@su241 ~]# ls -l /var/lib/alternatives/

total 56

-rw-r--r-- 1 root root  44 Aug  6  2008 antlr

-rw-r--r-- 1 root root 321 Aug  6  2008 java

-rw-r--r-- 1 root root  79 Aug  6  2008 jaxp_parser_impl

-rw-r--r-- 1 root root 145 Aug  6  2008 jre_1.4.2

-rw-r--r-- 1 root root 139 Aug  6  2008 jre_gcj

-rw-r--r-- 1 root root 700 Aug  6  2008 mta

-rw-r--r-- 1 root root 861 Aug  6  2008 print

[root@su241 ~]#

 

어떤 상태정보를 보관하고 있는가를 확인해 보기 위하여 위의 파일들 가운데 java라는 파일의 내용을 보도록 하겠습니다.

 

 

 

 

 

[root@su241 alternatives]# cat java

manual

/usr/bin/java

jre

/usr/lib/jvm/jre

jre_exports

/usr/lib/jvm-exports/jre

keytool

/usr/bin/keytool

rmiregistry

/usr/bin/rmiregistry

 

/usr/lib/jvm/jre-1.4.2-gcj/bin/java

1420

/usr/lib/jvm/jre-1.4.2-gcj

/usr/lib/jvm-exports/jre-1.4.2-gcj

/usr/lib/jvm/jre-1.4.2-gcj/bin/keytool

/usr/lib/jvm/jre-1.4.2-gcj/bin/rmiregistry

[root@su241 alternatives]#

 

, 위의 /usr/lib/alternatives디렉토리에 있는 java라는 파일로서 그 내용을 살펴보면 “manual”이라는 것은 수동모드(manual mode)를 의미하며 (모드에 대해서는 뒤에서 설명함) 그 다음은 심볼릭링크에 대한 정보들을 나타내고 있습니다.

 

 

 

 심볼릭링크에 대한 설명도 뒤에서 자세히 하고 있습니다.

 

 

 

 

 

 

관련자료

댓글 0
등록된 댓글이 없습니다.

공지사항


뉴스광장


  • 현재 회원수 :  60,039 명
  • 현재 강좌수 :  35,848 개
  • 현재 접속자 :  91 명