Журнал лабораторных работ

Содержание

Журнал

Вторник (09/08/09)

/dev/ttyp5
15:17:05
$find /usr -name a1 -ok rm {}\;
find: отсутствует аргумент у `-ok'
15:17:15
$man find
15:18:34
$find /usr -name a1 -ok rm
find: отсутствует аргумент у `-ok'
15:18:40
$find /usr -name a1 -exec ls {}\;
find: отсутствует аргумент у `-exec'
15:18:52
$find /usr -name a1 -exec ls '
/usr/a1
/usr/share/screen/utf8encodings/a1
15:19:25
$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
15:19:29
$find /usr -name a1

15:21:03
$pwd
/home/user
15:21:09
$cd /tmp/day2/

15:21:14
$ls
12:37:46  8     names         Вто                            Сен
2009      EEST  sorted_names  Вто Сен  8 12:38:13 EEST 2009
15:21:15
$touch xorg.conf

15:21:23
$touch xorg.c

15:21:24
$touch xorg.config

15:21:28
$find /tmp/ -regex \(conf\|cnf\|conf

15:22:49
$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
15:23:39
$find /tmp/day
find: /tmp/day: No such file or directory
15:23:47
$find /tmp/day2
/tmp/day2/xorg.cnf
/tmp/day2/xorg.config
/tmp/day2/xorg.conf
15:23:53
$touch -1
touch: invalid option -- 1
Попробуйте `touch --help' для получения более подробного описания.
15:24:19
$touch --

15:24:27
$ls
-1        8      sorted_names  xorg.config                    Сен
12:37:46  EEST   xorg.cnf      Вто
2009      names  xorg.conf     Вто Сен  8 12:38:13 EEST 2009
15:24:29
$ls -1
-1
12:37:46
2009
8
EEST
names
sorted_names
xorg.cnf
xorg.conf
xorg.config
Вто
Вто Сен  8 12:38:13 EEST 2009
Сен
15:24:32
$ls --
-1
15:24:48
$ls ./
./-1
15:24:57
$ls -1]\
>
15:25:06
$ls -1
-1
12:37:46
2009
8
EEST
names
sorted_names
xorg.cnf
xorg.conf
xorg.config
Вто
Вто Сен  8 12:38:13 EEST 2009
Сен
15:25:08
$ls ./-1
./-1
15:25:17
$ls
-1
15:25:32
$find /tmp/day2 -regex '.*\(conf\|cnf\|config\)'
/tmp/day2/xorg.cnf
/tmp/day2/xorg.config
/tmp/day2/xorg.conf
15:25:41
$find /tmp/day2 -regex '.*\(conf|cnf|config\

15:26:00
$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
15:28:00
$touch xorg.configure

15:28:10
$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
15:29:43
$grep -r . ^LINUX$
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
"file" [Новый] 1L, 6C записано                                    сь
grep: ^LINUX$: No such file or directory
15:30:00
$grep -r ^LINUX$ .
./file:LINUX
15:30:05
$vim file
15:30:49
$grep -r ^LINUX$
LINUX
LINUX
прошло >2 часов
/dev/ttyp3
17:37:05
$screen -x
/dev/ttyp5
17:37:14
$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
прошло 47 минут
18:24:48
$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
18:24:52
$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
18:26:14
$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
18:27:03
$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

Среда (09/09/09)

08:33:13
$screen -x
/dev/ttyp6
08:34:19
$screen -x
08:37:02
$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
08:37:10
$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
08:37:22
$pkill screen

08:37:36
$ps aux | grep screen
user     21930  0.0  0.1   4620   740 ttyp7    R+   09:37   0:00 grep screen
08:37:39
$screen
/dev/ttyp2
08:38:17
$screen -x
/dev/ttyp3
08:38:18
$ls
123  hello  ug-ladm.pdf  ug-lnet.pdf
/dev/ttyp0
08:38:42
$screen -x
/dev/ttyp3
08:38:44
$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
08:38:44
$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
08:38:44
$echo $
$
/dev/ttyp8
08:46:03
$screen -x
/dev/ttyp3
08:48:58
$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
08:48:58
$echo $MAIL
/var/mail/user
08:49:09
$set | less
08:51:09
$set B=1

08:53:33
$echo $B

08:53:37
$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
08:53:49
$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
08:53:49
$echo $

08:55:07
$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
08:55:13
$echo $A

08:55:18
$set --help
bash: set: --: invalid option
set: usage: set [--abefhkmnptuvxBCHP] [-o option] [arg ...]
08:57:38
$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,
08:57:46
$echo $A

08:57:49
$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
08:57:49
$echo $
$
08:57:54
$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
08:57:57
$set | less
08:58:28
$C=1

08:58:32
$declare F=1

08:58:39
$echo $$
[user@debian1:~]$ echo $
$_                    $GROUPS               $OPTERR
$B                    $HISTCMD              $OPTIND
$BASH                 $HISTCONTROL          $OSTYPE
$bash205              $HISTFILE             $PATH
$bash205b             $HISTFILESIZE         $PIPESTATUS
$bash3                $