| /l3/users/07-09-2009/nt-ladm/debian1.net.nt/user :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 :15 :16 :17 |
|
|
$man find
|
|
$find /usr -name a1 -ok rm
find: отсутствует аргумент у `-ok' |
|
$find /usr -name a1 -exec ls {}\;
find: отсутствует аргумент у `-exec' |
|
$find /usr -name a1 -exec ls '
/usr/a1 /usr/share/screen/utf8encodings/a1 |
|
$find /usr -name a1 -exec ls -l
-rw-r--r-- 1 user root 0 2009-09-08 16:09 /usr/a1 -rw-r--r-- 1 root root 536 2007-03-07 01:06 /usr/share/screen/utf8encodings/a1 |
|
$find /usr -name a1
|
|
$pwd
/home/user |
|
$cd /tmp/day2/
|
|
$ls
12:37:46 8 names Вто Сен 2009 EEST sorted_names Вто Сен 8 12:38:13 EEST 2009 |
|
$touch xorg.conf
|
|
$touch xorg.c
|
|
$touch xorg.config
|
|
$find /tmp/ -regex \(conf\|cnf\|conf
|
|
$find /tmp/ -regex '.*\(conf\|cnf\|config\)'
/tmp/etc/X11/xorg.conf /tmp/etc/apt/apt.conf.d/70debconf /tmp/etc/gdm/gdm.conf /tmp/etc/gdm/locale.conf /tmp/etc/kbd/config /tmp/etc/ssh/ssh_config /tmp/etc/ssh/sshd_config /tmp/etc/nsswitch.conf /tmp/etc/ldap/ldap.conf /tmp/etc/menu-methods/menu.config ... /tmp/sysctl.conf /tmp/debconf.conf /tmp/ld.so.conf /tmp/adduser.conf /tmp/deluser.conf /tmp/logrotate.conf /tmp/inetd.conf /tmp/host.conf /tmp/resolv.conf /tmp/manpath.config |
|
$find /tmp/day
find: /tmp/day: No such file or directory |
|
$find /tmp/day2
/tmp/day2/xorg.cnf /tmp/day2/xorg.config /tmp/day2/xorg.conf |
|
$touch -1
touch: invalid option -- 1 Попробуйте `touch --help' для получения более подробного описания. |
|
$touch --
|
|
$ls
-1 8 sorted_names xorg.config Сен 12:37:46 EEST xorg.cnf Вто 2009 names xorg.conf Вто Сен 8 12:38:13 EEST 2009 |
|
$ls -1
-1 12:37:46 2009 8 EEST names sorted_names xorg.cnf xorg.conf xorg.config Вто Вто Сен 8 12:38:13 EEST 2009 Сен |
|
$ls --
-1 |
|
$ls ./
./-1 |
|
$ls -1]\
> |
|
$ls -1
-1 12:37:46 2009 8 EEST names sorted_names xorg.cnf xorg.conf xorg.config Вто Вто Сен 8 12:38:13 EEST 2009 Сен |
|
$ls ./-1
./-1 |
|
$ls
-1 |
|
$find /tmp/day2 -regex '.*\(conf\|cnf\|config\)'
/tmp/day2/xorg.cnf /tmp/day2/xorg.config /tmp/day2/xorg.conf |
|
$find /tmp/day2 -regex '.*\(conf|cnf|config\
|
|
$find /tmp/day2 -regex '.*\(conf\|cnf\|config\)'
[user@debian1:day2]$ find /tmp/day2 -regex '.*\(conf\ /tmp/day2/xorg.cnf /tmp/day2/xorg.config /tmp/day2/xorg.conf /tmp/day2/xorg.cnf /tmp/day2/xorg.config /tmp/day2/xorg.conf |
|
$touch xorg.configure
|
|
$find /tmp/day2 -regex '.*\(conf\|cnf\|config\)
[user@debian1:day2]$ find /tmp/day2 -regex '.*\(conf\|cnf\|config\)' /tmp/day2/xorg.cnf /tmp/day2/xorg.config /tmp/day2/xorg.conf |
|
$grep -r . ^LINUX$
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ "file" [Новый] 1L, 6C записано сь grep: ^LINUX$: No such file or directory |
|
$grep -r ^LINUX$ .
./file:LINUX |
|
$vim file
|
|
$grep -r ^LINUX$
LINUX LINUX |
|
$ping ya.ru
PING ya.ru (93.158.134.8) 56(84) bytes of data. --- ya.ru ping statistics --- 3 packets transmitted, 0 received, 100% packet loss, time 2010ms |
|
$ping nt.ua
PING nt.ua (212.40.34.157) 56(84) bytes of data. --- nt.ua ping statistics --- 1 packets transmitted, 0 received, 100% packet loss, time 0ms |
|
$ping mail.ru
PING mail.ru (217.69.128.41) 56(84) bytes of data. --- mail.ru ping statistics --- 77 packets transmitted, 0 received, 100% packet loss, time 76015ms |
|
$ping xgu.ru
PING xgu.ru (212.26.146.51) 56(84) bytes of data. --- xgu.ru ping statistics --- 1 packets transmitted, 0 received, 100% packet loss, time 0ms |
|
$ping xgu.ru
[user@debian1:day2]$ ping xgu.ru PING xgu.ru (212.26.146.51) 56(84) bytes of data. --- xgu.ru ping statistics --- 41 packets transmitted, 0 received, 100% packet loss, time 40012ms PING xgu.ru (212.26.146.51) 56(84) bytes of data. 64 bytes from chub.in (212.26.146.51): icmp_seq=1 ttl=55 time=4.35 ms 64 bytes from chub.in (212.26.146.51): icmp_seq=2 ttl=55 time=4.37 ms --- xgu.ru ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 999ms rtt min/avg/max/mdev = 4.350/4.360/4.371/0.066 ms |
|
$screen -x
|
|
$PS AUX | GREP SCREEN
[user@debian1:day2]$ ping xgu.ru PING xgu.ru (212.26.146.51) 56(84) bytes of data. --- xgu.ru ping statistics --- 1 packets transmitted, 0 received, 100% packet loss, time 0ms bash: GREP: command not found bash: PS: command not found |
|
$ps aux | grep screen
user 5859 0.0 0.1 5564 1020 ttyp4 S+ Sep07 0:00 screen -x user 5987 0.0 0.1 5564 1020 ttyp1 S+ Sep07 0:00 screen -x user 21657 0.0 0.1 5564 1020 ttypa S+ 09:33 0:00 screen -x user 21873 0.0 0.1 4624 744 ttyp7 R+ 09:37 0:00 grep screen |
|
$pkill screen
|
|
$ps aux | grep screen
user 21930 0.0 0.1 4620 740 ttyp7 R+ 09:37 0:00 grep screen |
|
$screen
|
|
$echo $
$_ $HISTCONTROL $OPTIND $BASH $HISTFILE $OSTYPE $bash205 $HISTFILESIZE $PATH $bash205b $HISTSIZE $PIPESTATUS $bash3 $HOME $PPID $BASH_ARGC $HOSTNAME $PS1 $BASH_ARGV $HOSTTYPE $PS2 $BASH_COMMAND $IFS $PS4 $BASH_COMPLETION $L3_HOME $PWD $BASH_COMPLETION_DIR $L3_PARENT_TTY $RANDOM ... $BASH_VERSINFO $LESSCLOSE $SHLVL $BASH_VERSION $LESSOPEN $SSH_CLIENT $COLUMNS $LINENO $SSH_CONNECTION $COMP_WORDBREAKS $LINES $SSH_TTY $DIRSTACK $LOGNAME $STY $editor_file $LS_COLORS $TERM $editor_name $MACHTYPE $TERMCAP $EUID $MAIL $UID $GROUPS $MAILCHECK $USER $HISTCMD $OPTERR $WINDOW |
|
$echo $
[user@debian1:~]$ echo $ $_ $HISTCONTROL $OPTIND $BASH $HISTFILE $OSTYPE $bash205 $HISTFILESIZE $PATH $bash205b $HISTSIZE $PIPESTATUS $bash3 $HOME $PPID $BASH_ARGC $HOSTNAME $PS1 $BASH_ARGV $HOSTTYPE $PS2 $BASH_COMMAND $IFS $PS4 $BASH_COMPLETION $L3_HOME $PWD ... $BASH_VERSINFO $LESSCLOSE $SHLVL $BASH_VERSION $LESSOPEN $SSH_CLIENT $COLUMNS $LINENO $SSH_CONNECTION $COMP_WORDBREAKS $LINES $SSH_TTY $DIRSTACK $LOGNAME $STY $editor_file $LS_COLORS $TERM $editor_name $MACHTYPE $TERMCAP $EUID $MAIL $UID $GROUPS $MAILCHECK $USER $HISTCMD $OPTERR $WINDOW |
|
$echo $
$ |
|
$echo $
$_ $HISTCONTROL $OPTIND $BASH $HISTFILE $OSTYPE $bash205 $HISTFILESIZE $PATH $bash205b $HISTSIZE $PIPESTATUS $bash3 $HOME $PPID $BASH_ARGC $HOSTNAME $PS1 $BASH_ARGV $HOSTTYPE $PS2 $BASH_COMMAND $IFS $PS4 $BASH_COMPLETION $L3_HOME $PWD $BASH_COMPLETION_DIR $L3_PARENT_TTY $RANDOM ... $BASH_VERSINFO $LESSCLOSE $SHLVL $BASH_VERSION $LESSOPEN $SSH_CLIENT $COLUMNS $LINENO $SSH_CONNECTION $COMP_WORDBREAKS $LINES $SSH_TTY $DIRSTACK $LOGNAME $STY $editor_file $LS_COLORS $TERM $editor_name $MACHTYPE $TERMCAP $EUID $MAIL $UID $GROUPS $MAILCHECK $USER $HISTCMD $OPTERR $WINDOW |
|
$echo $MAIL
/var/mail/user |
|
$set | less
|
|
$set B=1
|
|
$echo $B
|
|
$echo $
$_ $HISTCONTROL $OPTIND $BASH $HISTFILE $OSTYPE $bash205 $HISTFILESIZE $PATH $bash205b $HISTSIZE $PIPESTATUS $bash3 $HOME $PPID $BASH_ARGC $HOSTNAME $PS1 $BASH_ARGV $HOSTTYPE $PS2 $BASH_COMMAND $IFS $PS4 $BASH_COMPLETION $L3_HOME $PWD $BASH_COMPLETION_DIR $L3_PARENT_TTY $RANDOM ... $BASH_VERSINFO $LESSCLOSE $SHLVL $BASH_VERSION $LESSOPEN $SSH_CLIENT $COLUMNS $LINENO $SSH_CONNECTION $COMP_WORDBREAKS $LINES $SSH_TTY $DIRSTACK $LOGNAME $STY $editor_file $LS_COLORS $TERM $editor_name $MACHTYPE $TERMCAP $EUID $MAIL $UID $GROUPS $MAILCHECK $USER $HISTCMD $OPTERR $WINDOW |
|
$echo $
$_ $HISTCONTROL $OSTYPE $B $HISTFILE $PATH $BASH $HISTFILESIZE $PIPESTATUS $bash205 $HISTSIZE $PPID $bash205b $HOME $PS1 $bash3 $HOSTNAME $PS2 $BASH_ARGC $HOSTTYPE $PS4 $BASH_ARGV $IFS $PWD $BASH_COMMAND $L3_HOME $RANDOM $BASH_COMPLETION $L3_PARENT_TTY $SECONDS ... $BASH_SUBSHELL $LESSCLOSE $SSH_CLIENT $BASH_VERSINFO $LESSOPEN $SSH_CONNECTION $BASH_VERSION $LINENO $SSH_TTY $COLUMNS $LINES $STY $COMP_WORDBREAKS $LOGNAME $TERM $DIRSTACK $LS_COLORS $TERMCAP $editor_file $MACHTYPE $UID $editor_name $MAIL $USER $EUID $MAILCHECK $WINDOW $GROUPS $OPTERR |
|
$echo $
|
|
$set $A
A double-quoted string preceded by a dollar sign ($) will cause the
string to be translated according to the current locale. If the curâ
rent locale is C or POSIX, the dollar sign is ignored. If the string
is translated and replaced, the replacement is double-quoted.
PARAMETERS
A parameter is an entity that stores values. It can be a name, a numâ
ber, or one of the special characters listed below under Special Paramâ
eters. A variable is a parameter denoted by a name. A variable has a
value and zero or more attributes. Attributes are assigned using the
declare builtin command (see declare below in SHELL BUILTIN COMMANDS).
...
If a command is terminated by the control operator &, the shell exeâ
or POSIX. This implies the -n option; no commands will be
In the context where an assignment statement is assigning a value to a
executed.SIX-conformant by default.
shell variable or array index, the += operator can be used to append to
[-+]O [shopt_option]
or add to the variableâs previous value. When += is applied to a variâ
shopt_option is one of the shell options accepted by the
able for which the integer attribute has been set, value is evaluated
shopt builtin (see SHELL BUILTIN COMMANDS below). If
|
|
$echo $A
|
|
$set --help
bash: set: --: invalid option set: usage: set [--abefhkmnptuvxBCHP] [-o option] [arg ...] |
|
$set
length for printing selection lists. Automatically set upon
receipt of a SIGWINCH.
MAIL If this parameter is set to a file name and the MAILPATH variâ
for name [ in word ] ; do list ; done
The list of words following in is expanded, generating a list of
items. The variable name is set to each element of this list in
turn, and list is executed each time. If the in word is omitâ
ted, the for command executes list once for each positional
[user@debian1:~]$ man bash
BASH(1) BASH(1)
...
the name of the current mailfile. Example:FILE is unset, the
MAILPATH=â/var/mail/bfox?"You have mail":~/shell-mail?"$_ has
mail!"ârnal Field Separator that is used for word splitting
Bash supplies a default value for this variable, but the locaâ
tion of the user mail files that it uses is system dependentnewâ
(e.g., /var/mail/$USER).tion argument processed by the getoptsiâ
OPTERR If set to the value 1, bash displays error messages generated by
The list of words following in is expanded, generating a list of
items. The set of expanded words is printed on the standard
error, each preceded by a number. If the in word is omitted,
|
|
$echo $A
|
|
$echo $
$_ $HISTCONTROL $OSTYPE $B $HISTFILE $PATH $BASH $HISTFILESIZE $PIPESTATUS $bash205 $HISTSIZE $PPID $bash205b $HOME $PS1 $bash3 $HOSTNAME $PS2 $BASH_ARGC $HOSTTYPE $PS4 $BASH_ARGV $IFS $PWD $BASH_COMMAND $L3_HOME $RANDOM $BASH_COMPLETION $L3_PARENT_TTY $SECONDS ... $BASH_SUBSHELL $LESSCLOSE $SSH_CLIENT $BASH_VERSINFO $LESSOPEN $SSH_CONNECTION $BASH_VERSION $LINENO $SSH_TTY $COLUMNS $LINES $STY $COMP_WORDBREAKS $LOGNAME $TERM $DIRSTACK $LS_COLORS $TERMCAP $editor_file $MACHTYPE $UID $editor_name $MAIL $USER $EUID $MAILCHECK $WINDOW $GROUPS $OPTERR |
|
$echo $
$ |
|
$set
B=1 BASH=/bin/bash BASH_ARGC=() BASH_ARGV=() BASH_COMPLETION=/etc/bash_completion BASH_COMPLETION_DIR=/etc/bash_completion.d BASH_LINENO=() BASH_SOURCE=() BASH_VERSINFO=([0]="3" [1]="1" [2]="17" [3]="1" [4]="release" [5]="i486-pc-linux-gnu") BASH_VERSION='3.1.17(1)-release' ... LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga= MACHTYPE=i486-pc-linux-gnu MAIL=/var/mail/user MAILCHECK=60 OPTERR=1 OPTIND=1 OSTYPE=linux-gnu PATH=/usr/local/bin:/usr/bin:/bin:/usr/games PIPESTATUS=([0]="0") PPID=22002 |
|
$set | less
|
|
$C=1
|
|
$declare F=1
|
|
$echo $$
[user@debian1:~]$ echo $ $_ $GROUPS $OPTERR $B $HISTCMD $OPTIND $BASH $HISTCONTROL $OSTYPE $bash205 $HISTFILE $PATH $bash205b $HISTFILESIZE $PIPESTATUS $bash3 $HISTSIZE $PPID $BASH_ARGC $HOME $PS1 $BASH_ARGV $HOSTNAME $PS2 $BASH_COMMAND $HOSTTYPE $PS4 ... $BASH_VERSION $LESSCLOSE $SSH_CLIENT $C $LESSOPEN $SSH_CONNECTION $COLUMNS $LINENO $SSH_TTY $COMP_WORDBREAKS $LINES $STY $DIRSTACK $LOGNAME $TERM $editor_file $LS_COLORS $TERMCAP $editor_name $MACHTYPE $UID $EUID $MAIL $USER $F $MAILCHECK $WINDOW 22003 |
|
$pstree -p | less
|
|
$echo $$
22003 |
|
$sudo
init(1)-+-cron(1216)
|-events/0(4)
|-gdm(1204)---gdm(1205)-+-Xvnc(1215)
| `-fluxbox(20268)-+-ssh-agent(20305)
| `-xterm(20309)---script(20313)-
--script(20361)---bash(20362)---putty(20399)
|-getty(1238)
|-getty(1239)
|-getty(1240)
|-getty(1241)
...
|-klogd(1172)
|-ksoftirqd/0(3)
|-kthread(6)-+-aio/0(58)
| |-kblockd/0(16)
| |-kmirrord(610)
| |-kseriod(18)
| |-kswapd0(57)
| |-pdflush(55)
| |-pdflush(56)
| |-reiserfs/0(708)
|
|
$ps waux | grep 22003
user 22003 0.0 0.4 7028 2816 ttyp5 Ss 09:37 0:00 bash -i user 22477 0.0 0.1 4620 740 ttyp5 R+ 10:03 0:00 grep 22003 |
|
$man pstree
|
|
$sudo pstree -pl
|-l3-agent(1406)
|-migration/0(2)
|-sshd(1189)-+-sshd(2218)---sshd(2253)---script(2254)---script(2364)---b
ash(2365)---screen(22075)
init(1)-+-cron(1216)
|-events/0(4)
|-gdm(1204)---gdm(1205)-+-Xvnc(1215)
| `-fluxbox(20268)-+-ssh-agent(20305)
| `-xterm(20309)---script(20313)-
--script(20361)---bash(20362)---putty(20399)
...
~ |-ksoftirqd/0(3)
~ |-kthread(6)-+-aio/0(58)
~ | |-kblockd/0(16)
~ | |-kmirrord(610)
~ | |-kseriod(18)
~ | |-kswapd0(57)
~ | |-pdflush(55)
~ | |-pdflush(56)
~ | |-reiserfs/0(708)
~
|