쉘 프롬프트에 전체 경로나오려면..

cguy의 이미지

말 그대로 입니다.

디렉토리 이름 말고, 전체 경로가 나왔으면 합니다.

[root@localhost public_html]# -> [root@localhost /home/cguy/public_html/]#

쉘 프롬프트를 위처럼 변형해서 출력하고 싶습니다.

그럼 답변 부탁드립니다.

단풍의 이미지

--- bashrc.orig Wed Jun 11 05:43:24 2003
+++ bashrc      Wed Jun 11 05:43:37 2003
@@ -37,7 +37,7 @@
                [ -e /etc/sysconfig/bash-prompt-default ] && PROMPT_COMMAND=/etc/sysconfig/bash-prompt-default
            ;;
     esac
-    [ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h \W]\\$ "
+    [ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h \w]\\$ "

     if [ "x$SHLVL" != "x1" ]; then # We're not a login shell
         for i in /etc/profile.d/*.sh; do

대문자 W -> 소문자 w 변경