linux 노트 셸

#man bash

#shell    /bin/bash   C  

chsh -l

[root@station198   ]# echo $SHELL
/bin/bash


[root@station198   ]# chsh -l
/bin/sh
/bin/bash
/sbin/nologin
/bin/tcsh
/bin/csh

[root@station198   ]# set

#  :
#     :   		export   :export var = 2
#     :   			   :var = 2
#     : shell  

[root@station198   ]# ps aux | grep bash
root      1711  0.0  0.0 108192   776 ?        S    09:35   0:00 /bin/bash /usr/sbin/ksmtuned
root      2810  0.0  0.0 108324  1704 pts/0    Ss+  09:36   0:00 /bin/bash -l
root      3172  0.0  0.0 108324  1840 pts/3    Ss   09:47   0:00 /bin/bash -l
root      3276  0.0  0.0 103248   864 pts/3    S+   09:54   0:00 grep bash

[root@station198   ]# ps -o pid,ppid,comm   :     ID
  PID  PPID COMMAND
 3172  2808 bash
 3296  3172 bash
 3314  3296 ps

#ppid:   
#  shell

-rw-r--r--. 1 root root 56 12  18 10:07 1.sh
[root@station198 shell]# ./1.sh
bash: ./1.sh:     
[root@station198 shell]# chmod u+x 1.sh
[root@station198 shell]# ls
1.sh
[root@station198 shell]# ls -l
    4
-rwxr--r--. 1 root root 56 12  18 10:07 1.sh
[root@station198 shell]# ./1.sh &             #    
[1] 3524

[root@station198 shell]# kill  -9 3524
[root@station198 shell]# jobs
[1]+                    ./1.sh


#./(   )
#source 

[root@station198 shell]# source 1.sh 
[root@station198 shell]# echo $var
100

[root@station198 shell]# which sh
/bin/sh

#set -X :      
[root@station198 ftp]# set -o nounset

#man bash 
#/PS1     【n】         

#   
[root@station198 sysconfig]# vim /etc/rc.sysinit(     ) 
[root@station198 sysconfig]# vim /etc/profile(PATH)
[root@station198 sysconfig]# vim /etc/bashrc(PS1)

    :Special Parameters
$0 $1 $2 $3 .... $255

【ESC】     ->【YY】->【P】     【U】:  

ls /etc/tt # $?              
$#       
$* = "$1 $2 $3 $.....  $254"
$@ = "$1" "$2" "$3" "$4" ....

$ :       pid --       pid #ps -o pid,comm | grep bash
        yum install if*


$! :       pid 


[root@station198 bak]# find /etc/ -name "*.conf" -exec cp {} /shell/bak \;

  :

if [ -f /etc/vsftpd/vsftpd.conf ]; then

else

fi

ps axo pid,comm | grep ftp


[root@station198 bak]#id test












좋은 웹페이지 즐겨찾기