linux实验
时间:2006-03-22 来源:BIGC_xiepy
202.112.229.168
stu
abcdefg mkdir
printenv 要显示环境变量的值
echo $PATH cd ~ cat .bashrc
export ps1='\u0\h:\w\$' stu0debian:/usr/bin$ find/home -name ifconfig
stu0debian:/usr/bin$ find/ -name ifconfig
////////////////第五道作业////////////////////////////////////////////////////////////////////////
stu@debian:~$ cd /home
stu@debian:/home$ find /home -name .bashrc
/home/bliu/.bashrc
find: /home/bliu/.scim: ȨÏÞ²»¹»
find: /home/bliu/.gconf: ȨÏÞ²»¹»
find: /home/bliu/.gconfd: ȨÏÞ²»¹»
find: /home/bliu/.gnome: ȨÏÞ²»¹»
find: /home/bliu/.gnome2: ȨÏÞ²»¹»
find: /home/bliu/.gnome2_private: ȨÏÞ²»¹»
find: /home/bliu/.metacity: ȨÏÞ²»¹»
find: /home/bliu/.nautilus/metafiles: ȨÏÞ²»¹»
find: /home/bliu/.mozilla: ȨÏÞ²»¹»
find: /home/bliu/.thumbnails: ȨÏÞ²»¹»
find: /home/bliu/.Trash: ȨÏÞ²»¹»
find: /home/bliu/.kde: ȨÏÞ²»¹»
find: /home/bliu/.ssh: ȨÏÞ²»¹»
stu@debian:/home$ cat /home/bliu/.bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples # If not running interactively, don't do anything:
[ -z "$PS1" ] && return # don't put duplicate lines in the history. See bash(1) for more options
#export HISTCONTROL=ignoredups # check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize # enable color support of ls and also add handy aliases
if [ "$TERM" != "dumb" ]; then
eval "`dircolors -b`"
alias ls='ls --color=auto'
#alias dir='ls --color=auto --format=vertical'
#alias vdir='ls --color=auto --format=long'
fi # some more ls aliases
#alias ll='ls -l'
#alias la='ls -A'
#alias l='ls -CF' # set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" -a -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi # set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color)
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
;;
*)
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
;;
esac # Comment in the above and uncomment this below for a color prompt
#PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' # If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
;;
*)
;;
esac # enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profiles
# sources /etc/bash.bashrc).
#if [ -f /etc/bash_completion ]; then
# . /etc/bash_completion
#fi PATH=$PATH:/usr/local/jdk1.5.0_06/bin
export PATH
JAVA_HOME=/usr/local/jdk1.5.0_06/
export JAVA_HOME
stu@debian:/home$ stu@debian:/home$ find /home -name .bashrc
find: /home/bliu/.scim: ȨÏÞ²»¹»
-bash: stu@debian:/home$: ûÓÐÄǸöÎļþ»òĿ¼
find: /home/bliu/.gconf: ȨÏÞ²»¹»
find: /home/bliu/.gconfd: ȨÏÞ²»¹»
find: /home/bliu/.gnome: ȨÏÞ²»¹»
find: /home/bliu/.gnome2: ȨÏÞ²»¹»
stu@debian:/home$ /home/bliu/.bashrc
# don't put duplicate lines in the history. See bash(1) for more options
#export HISTCONTROL=ignoredups -bash: /home/bliu/.bashrc: ȨÏÞ²»¹»
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize # enable color support of ls and also add handy aliases
if [ "$TERM" != "dumb" ]; then
eval "`dircolors -b`"
alias ls='ls --color=auto'
#alias dir='ls --color=auto --format=vertical'
#alias vdir='ls --color=auto --format=long'
fi stu@debian:/home$ find: /home/bliu/.scim: ȨÏÞ²»¹»
;;
-bash: find:: command not found
stu@debian:/home$ find: /home/bliu/.gconf: ȨÏÞ²»¹»
-bash: find:: command not found
export JAVA_HOME
stu@debian:/home$stu@debian:/home$ find: /home/bliu/.gconfd: ȨÏÞ²»¹»
-bash: find:: command not found
stu@debian:/home$ find: /home/bliu/.gnome: ȨÏÞ²»¹»
-bash: find:: command not found
stu@debian:/home$ find: /home/bliu/.gnome2: ȨÏÞ²»¹»
-bash: find:: command not found
stu@debian:/home$ find: /home/bliu/.gnome2_private: ȨÏÞ²»¹»
-bash: find:: command not found
stu@debian:/home$ find: /home/bliu/.metacity: ȨÏÞ²»¹»
-bash: find:: command not found
stu@debian:/home$ find: /home/bliu/.nautilus/metafiles: ȨÏÞ²»¹»
-bash: find:: command not found
stu@debian:/home$ find: /home/bliu/.mozilla: ȨÏÞ²»¹»
-bash: find:: command not found
stu@debian:/home$ find: /home/bliu/.thumbnails: ȨÏÞ²»¹»
-bash: find:: command not found
stu@debian:/home$ find: /home/bliu/.Trash: ȨÏÞ²»¹»
-bash: find:: command not found
stu@debian:/home$ find: /home/bliu/.kde: ȨÏÞ²»¹»
-bash: find:: command not found
stu@debian:/home$ find: /home/bliu/.ssh: ȨÏÞ²»¹»
-bash: find:: command not found
stu@debian:/home$ stu@debian:/home$ cat /home/bliu/.bashrc
-bash: stu@debian:/home$: ûÓÐÄǸöÎļþ»òĿ¼
stu@debian:/home$ # ~/.bashrc: executed by bash(1) for non-login shells.
stu@debian:/home$ # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
stu@debian:/home$ # for examples
stu@debian:/home$
stu@debian:/home$ # If not running interactively, don't do anything:
stu@debian:/home$ [ -z "$PS1" ] && return
stu@debian:/home$
stu@debian:/home$ # don't put duplicate lines in the history. See bash(1) for more options
stu@debian:/home$ #export HISTCONTROL=ignoredups
stu@debian:/home$
stu@debian:/home$ # check the window size after each command and, if necessary,
stu@debian:/home$ # update the values of LINES and COLUMNS.
stu@debian:/home$ shopt -s checkwinsize
stu@debian:/home$
stu@debian:/home$ # enable color support of ls and also add handy aliases
stu@debian:/home$ if [ "$TERM" != "dumb" ]; then
> eval "`dircolors -b`"
> alias ls='ls --color=auto'
> #alias dir='ls --color=auto --format=vertical'
> #alias vdir='ls --color=auto --format=long'
> fi
stu@debian:/home$
stu@debian:/home$ # some more ls aliases
stu@debian:/home$ #alias ll='ls -l'
stu@debian:/home$ #alias la='ls -A'
stu@debian:/home$ #alias l='ls -CF'
stu@debian:/home$
stu@debian:/home$ # set variable identifying the chroot you work in (used in the prompt below)
stu@debian:/home$ if [ -z "$debian_chroot" -a -r /etc/debian_chroot ]; then
> debian_chroot=$(cat /etc/debian_chroot)
> fi
stu@debian:/home$
stu@debian:/home$ # set a fancy prompt (non-color, unless we know we "want" color)
stu@debian:/home$ case "$TERM" in
> xterm-color)
> PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
> ;;
> *)
> PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
> ;;
> esac
stu@debian:/home$
stu@debian:/home$ # Comment in the above and uncomment this below for a color prompt
stu@debian:/home$ #PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
stu@debian:/home$
stu@debian:/home$ # If this is an xterm set the title to user@host:dir
stu@debian:/home$ case "$TERM" in
> xterm*|rxvt*)
> PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
> ;;
> *)
> ;;
> esac
stu@debian:/home$
stu@debian:/home$ # enable programmable completion features (you don't need to enable
stu@debian:/home$ # this, if it's already enabled in /etc/bash.bashrc and /etc/profiles
stu@debian:/home$ # sources /etc/bash.bashrc).
stu@debian:/home$ #if [ -f /etc/bash_completion ]; then
stu@debian:/home$ # . /etc/bash_completion
stu@debian:/home$ #fi
stu@debian:/home$
stu@debian:/home$ PATH=$PATH:/usr/local/jdk1.5.0_06/bin
stu@debian:/home$ export PATH
stu@debian:/home$ JAVA_HOME=/usr/local/jdk1.5.0_06/
stu@debian:/home$ export JAVA_HOME
stu@debian:/home$ export JAVA_HOME ////////////////////////////////////////////////////////////////////////////////////////
stu
abcdefg mkdir
printenv 要显示环境变量的值
echo $PATH cd ~ cat .bashrc
export ps1='\u0\h:\w\$' stu0debian:/usr/bin$ find/home -name ifconfig
stu0debian:/usr/bin$ find/ -name ifconfig
////////////////第五道作业////////////////////////////////////////////////////////////////////////
stu@debian:~$ cd /home
stu@debian:/home$ find /home -name .bashrc
/home/bliu/.bashrc
find: /home/bliu/.scim: ȨÏÞ²»¹»
find: /home/bliu/.gconf: ȨÏÞ²»¹»
find: /home/bliu/.gconfd: ȨÏÞ²»¹»
find: /home/bliu/.gnome: ȨÏÞ²»¹»
find: /home/bliu/.gnome2: ȨÏÞ²»¹»
find: /home/bliu/.gnome2_private: ȨÏÞ²»¹»
find: /home/bliu/.metacity: ȨÏÞ²»¹»
find: /home/bliu/.nautilus/metafiles: ȨÏÞ²»¹»
find: /home/bliu/.mozilla: ȨÏÞ²»¹»
find: /home/bliu/.thumbnails: ȨÏÞ²»¹»
find: /home/bliu/.Trash: ȨÏÞ²»¹»
find: /home/bliu/.kde: ȨÏÞ²»¹»
find: /home/bliu/.ssh: ȨÏÞ²»¹»
stu@debian:/home$ cat /home/bliu/.bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples # If not running interactively, don't do anything:
[ -z "$PS1" ] && return # don't put duplicate lines in the history. See bash(1) for more options
#export HISTCONTROL=ignoredups # check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize # enable color support of ls and also add handy aliases
if [ "$TERM" != "dumb" ]; then
eval "`dircolors -b`"
alias ls='ls --color=auto'
#alias dir='ls --color=auto --format=vertical'
#alias vdir='ls --color=auto --format=long'
fi # some more ls aliases
#alias ll='ls -l'
#alias la='ls -A'
#alias l='ls -CF' # set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" -a -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi # set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color)
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
;;
*)
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
;;
esac # Comment in the above and uncomment this below for a color prompt
#PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' # If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
;;
*)
;;
esac # enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profiles
# sources /etc/bash.bashrc).
#if [ -f /etc/bash_completion ]; then
# . /etc/bash_completion
#fi PATH=$PATH:/usr/local/jdk1.5.0_06/bin
export PATH
JAVA_HOME=/usr/local/jdk1.5.0_06/
export JAVA_HOME
stu@debian:/home$ stu@debian:/home$ find /home -name .bashrc
find: /home/bliu/.scim: ȨÏÞ²»¹»
-bash: stu@debian:/home$: ûÓÐÄǸöÎļþ»òĿ¼
find: /home/bliu/.gconf: ȨÏÞ²»¹»
find: /home/bliu/.gconfd: ȨÏÞ²»¹»
find: /home/bliu/.gnome: ȨÏÞ²»¹»
find: /home/bliu/.gnome2: ȨÏÞ²»¹»
stu@debian:/home$ /home/bliu/.bashrc
# don't put duplicate lines in the history. See bash(1) for more options
#export HISTCONTROL=ignoredups -bash: /home/bliu/.bashrc: ȨÏÞ²»¹»
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize # enable color support of ls and also add handy aliases
if [ "$TERM" != "dumb" ]; then
eval "`dircolors -b`"
alias ls='ls --color=auto'
#alias dir='ls --color=auto --format=vertical'
#alias vdir='ls --color=auto --format=long'
fi stu@debian:/home$ find: /home/bliu/.scim: ȨÏÞ²»¹»
;;
-bash: find:: command not found
stu@debian:/home$ find: /home/bliu/.gconf: ȨÏÞ²»¹»
-bash: find:: command not found
export JAVA_HOME
stu@debian:/home$stu@debian:/home$ find: /home/bliu/.gconfd: ȨÏÞ²»¹»
-bash: find:: command not found
stu@debian:/home$ find: /home/bliu/.gnome: ȨÏÞ²»¹»
-bash: find:: command not found
stu@debian:/home$ find: /home/bliu/.gnome2: ȨÏÞ²»¹»
-bash: find:: command not found
stu@debian:/home$ find: /home/bliu/.gnome2_private: ȨÏÞ²»¹»
-bash: find:: command not found
stu@debian:/home$ find: /home/bliu/.metacity: ȨÏÞ²»¹»
-bash: find:: command not found
stu@debian:/home$ find: /home/bliu/.nautilus/metafiles: ȨÏÞ²»¹»
-bash: find:: command not found
stu@debian:/home$ find: /home/bliu/.mozilla: ȨÏÞ²»¹»
-bash: find:: command not found
stu@debian:/home$ find: /home/bliu/.thumbnails: ȨÏÞ²»¹»
-bash: find:: command not found
stu@debian:/home$ find: /home/bliu/.Trash: ȨÏÞ²»¹»
-bash: find:: command not found
stu@debian:/home$ find: /home/bliu/.kde: ȨÏÞ²»¹»
-bash: find:: command not found
stu@debian:/home$ find: /home/bliu/.ssh: ȨÏÞ²»¹»
-bash: find:: command not found
stu@debian:/home$ stu@debian:/home$ cat /home/bliu/.bashrc
-bash: stu@debian:/home$: ûÓÐÄǸöÎļþ»òĿ¼
stu@debian:/home$ # ~/.bashrc: executed by bash(1) for non-login shells.
stu@debian:/home$ # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
stu@debian:/home$ # for examples
stu@debian:/home$
stu@debian:/home$ # If not running interactively, don't do anything:
stu@debian:/home$ [ -z "$PS1" ] && return
stu@debian:/home$
stu@debian:/home$ # don't put duplicate lines in the history. See bash(1) for more options
stu@debian:/home$ #export HISTCONTROL=ignoredups
stu@debian:/home$
stu@debian:/home$ # check the window size after each command and, if necessary,
stu@debian:/home$ # update the values of LINES and COLUMNS.
stu@debian:/home$ shopt -s checkwinsize
stu@debian:/home$
stu@debian:/home$ # enable color support of ls and also add handy aliases
stu@debian:/home$ if [ "$TERM" != "dumb" ]; then
> eval "`dircolors -b`"
> alias ls='ls --color=auto'
> #alias dir='ls --color=auto --format=vertical'
> #alias vdir='ls --color=auto --format=long'
> fi
stu@debian:/home$
stu@debian:/home$ # some more ls aliases
stu@debian:/home$ #alias ll='ls -l'
stu@debian:/home$ #alias la='ls -A'
stu@debian:/home$ #alias l='ls -CF'
stu@debian:/home$
stu@debian:/home$ # set variable identifying the chroot you work in (used in the prompt below)
stu@debian:/home$ if [ -z "$debian_chroot" -a -r /etc/debian_chroot ]; then
> debian_chroot=$(cat /etc/debian_chroot)
> fi
stu@debian:/home$
stu@debian:/home$ # set a fancy prompt (non-color, unless we know we "want" color)
stu@debian:/home$ case "$TERM" in
> xterm-color)
> PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
> ;;
> *)
> PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
> ;;
> esac
stu@debian:/home$
stu@debian:/home$ # Comment in the above and uncomment this below for a color prompt
stu@debian:/home$ #PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
stu@debian:/home$
stu@debian:/home$ # If this is an xterm set the title to user@host:dir
stu@debian:/home$ case "$TERM" in
> xterm*|rxvt*)
> PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
> ;;
> *)
> ;;
> esac
stu@debian:/home$
stu@debian:/home$ # enable programmable completion features (you don't need to enable
stu@debian:/home$ # this, if it's already enabled in /etc/bash.bashrc and /etc/profiles
stu@debian:/home$ # sources /etc/bash.bashrc).
stu@debian:/home$ #if [ -f /etc/bash_completion ]; then
stu@debian:/home$ # . /etc/bash_completion
stu@debian:/home$ #fi
stu@debian:/home$
stu@debian:/home$ PATH=$PATH:/usr/local/jdk1.5.0_06/bin
stu@debian:/home$ export PATH
stu@debian:/home$ JAVA_HOME=/usr/local/jdk1.5.0_06/
stu@debian:/home$ export JAVA_HOME
stu@debian:/home$ export JAVA_HOME ////////////////////////////////////////////////////////////////////////////////////////
相关阅读 更多 +