양쪽 이전 판 이전 판 다음 판 | 이전 판 |
linuxfromscratch [2024/06/10 07:05] – [Debian 설치 후 추가적인 사항] baecy | linuxfromscratch [2024/06/16 23:14] (현재) – [PS1 설정] baecy |
---|
| |
<code bash> | <code bash> |
for i in $(echo "ldapadd, ldapcompare, ldapdelete, ldapexop, ldapmodify, ldapmodrdn, ldappasswd, ldapsearch, ldapurl, ldapvc, ldapwhoami, slapacl, slapadd, slapauth, slapcat, slapd, slapdn, slapindex, slapmodify, slappasswd, slapschema, slaptest" | sed 's/,/ /g') ; do find /usr/bin -type f -name $i ; done | for i in $(echo "ldapadd, ldapcompare, ldapdelete, ldapexop, ldapmodify, slapschema, slaptest" | sed 's/,/ /g') ; do find /usr/bin -type f -name $i ; done |
</code> | </code> |
==== Grep && Tar ==== | ==== Grep && Tar ==== |
PS1_USER='\[$(tput setaf 75)\][ \[$(tput sgr0)\]\w \[$(tput setaf 75)\]] \[$(tput sgr0)\]\$\n' | PS1_USER='\[$(tput setaf 75)\][ \[$(tput sgr0)\]\w \[$(tput setaf 75)\]] \[$(tput sgr0)\]\$\n' |
PS1_HEAD='\[$(tput setaf 229)\]\u\[$(tput setaf 199)\]@\[$(tput setaf 215)\]\h ' | PS1_HEAD='\[$(tput setaf 229)\]\u\[$(tput setaf 199)\]@\[$(tput setaf 215)\]\h ' |
if [ "$(awk '$5=="/" {print $1}' </proc/1/mountinfo)" != "$(awk '$5=="/" {print $1}' </proc/$$/mountinfo)" ] ; th | if [ "$(awk '$5=="/" {print $1}' </proc/1/mountinfo)" != "$(awk '$5=="/" {print $1}' </proc/$$/mountinfo)" ] ; then |
en | |
if [ $(id -u) -eq 0 ] ; then | if [ $(id -u) -eq 0 ] ; then |
PS1="<Chroot>${PS1_HEAD}${PS1_ROOT}" | PS1="<Chroot>${PS1_HEAD}${PS1_ROOT}" |
else | else |
PS1="<Chroot>${PS1_HEAD}${PS1_USER}" | PS1="<Chroot>${PS1_HEAD}${PS1_USER}" |
fi | fi |
else | else |
if [ $(id -u) -eq 0 ] ; then | if [ $(id -u) -eq 0 ] ; then |
PS1="${PS1_HEAD}${PS1_ROOT}" | PS1="${PS1_HEAD}${PS1_ROOT}" |
else | else |
PS1="${PS1_HEAD}${PS1_USER}" | PS1="${PS1_HEAD}${PS1_USER}" |