论坛风格切换切换到宽版
  • 805阅读
  • 3回复

[问题求助][SuSE] 动态修改命令提示符 [复制链接]

上一主题 下一主题
离线dwenhcil.
 
发帖
2054
C币
-132295
威望
381
贡献值
1
银元
-4
铜钱
4658
人人网人气币
0
只看楼主 倒序阅读 使用道具 楼主  发表于: 2009-05-01
我用的是suse linux,动态配置命令提示符.会执行命令PS1='\u@\h:\w> ',\u.标识用户,\h标识主机,\w标识全路径等,还有一些参数,请.问从哪可以查到这些参数的含义?.

评价一下你浏览此帖子的感受

精彩

感动

搞笑

开心

愤怒

无聊

灌水
发帖
2004
C币
-60800
威望
397
贡献值
1
银元
-2
铜钱
4591
人人网人气币
0
只看该作者 沙发  发表于: 2010-04-14
Re:[SuSE]
shell 的手册

离线wx8052.
发帖
1934
C币
-235534
威望
393
贡献值
1
银元
-1
铜钱
4518
人人网人气币
0
只看该作者 板凳  发表于: 2010-04-14
Re:[SuSE]
man bash

查找PS1。

              \a     an ASCII bell character (07)
              \d     the  date  in "Weekday Month Date" format (e.g., "Tue May
                     26")
              \D{format}
                     the format is passed to strftime(3)  and  the  result  is
                     inserted  into the prompt string; an empty format results
                     in a locale-specific time representation.  The braces are
                     required
              \e     an ASCII escape character (033)
              \h     the hostname up to the first ‘.’
              \H     the hostname
              \j     the number of jobs currently managed by the shell
              \l     the basename of the shell’s terminal device name
              \n     newline
              \r     carriage return
              \s     the  name  of  the shell, the basename of $0 (the portion
                     following the final slash)
              \t     the current time in 24-hour HH:MM:SS format
              \T     the current time in 12-hour HH:MM:SS format
              \@     the current time in 12-hour am/pm format
              \A     the current time in 24-hour HH:MM format
              \u     the username of the current user
              \v     the version of bash (e.g., 2.00)
              \V     the release of bash, version + patch level (e.g., 2.00.0)
              \w     the  current  working  directory,  with $HOME abbreviated
                     with a tilde
              \W     the basename of the current working directory, with $HOME
                     abbreviated with a tilde
              \!     the history number of this command
              \#     the command number of this command
              \$     if the effective UID is 0, a #, otherwise a $
              \nnn   the character corresponding to the octal number nnn
              \\     a backslash
              \[     begin  a sequence of non-printing characters, which could
                     be used to embed a terminal  control  sequence  into  the
                     prompt
              \]     end a sequence of non-printing characters

离线h1821388.
发帖
2209
C币
-235179
威望
414
贡献值
1
银元
-6
铜钱
4968
人人网人气币
0
只看该作者 地板  发表于: 2010-04-14
Re:[SuSE]
谢谢changzi100对新人的支持,非常感谢!已解决!
快速回复
限100 字节
如果您在写长篇帖子又不马上发表,建议存为草稿
 
上一个 下一个