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

Содержание

Журнал

Вторник (09/13/16)

/dev/pts/2
13:33:19
$ls -a
.          acpi        ._bash   bjon     group          .j_bash  .passwd
..         alloca.H    .._bash  core.c   -hello         _kik_my  Regexp.H
_1_2_3     __asterisk  bjan     fcntl.h  _hrypun        modules  s_tol_
1cdesktop  .bash       bjen     -file1   isdn_ttyfax.c  passwd   term.h
13:34:12
$ls .[^.]*
.bash  ._bash  .j_bash  .passwd
13:35:45
$ls .*
.bash  ._bash  .._bash  .j_bash  .passwd
.:
_1_2_3     alloca.H    bjen    fcntl.h  -hello         _kik_my  Regexp.H
1cdesktop  __asterisk  bjon    -file1   _hrypun        modules  s_tol_
acpi       bjan        core.c  group    isdn_ttyfax.c  passwd   term.h
..:
backup                                 lpi 2                          proj
bigfile                                man_smb_conf                   sh
bin                                    matrix.jpg                     source
freebsd.jpg                            names                          text
granata.jpg                            ogo.jpg                        touchlist
Light_Alloy_4.4.784_RC2_by_FAFNIR.exe  pamyatka.pdf
lpi 1                                  press_any_key_to_continue.jpg
13:36:22
$touch "file with spaces at the name"

13:39:09
$ls
_1_2_3      bjan     -file1                        isdn_ttyfax.c  s_tol_
1cdesktop   bjen     file with spaces at the name  _kik_my        term.h
acpi        bjon     group                         modules
alloca.H    core.c   -hello                        passwd
__asterisk  fcntl.h  _hrypun                       Regexp.H
13:39:11
$touch 'another very long file name'

13:39:35
$touch one\ space

13:39:49
$ls
_1_2_3                       bjan     file with spaces at the name  modules
1cdesktop                    bjen     group                         one space
acpi                         bjon     -hello                        passwd
alloca.H                     core.c   _hrypun                       Regexp.H
another very long file name  fcntl.h  isdn_ttyfax.c                 s_tol_
__asterisk                   -file1   _kik_my                       term.h
13:39:51
$touch "O'Reilly"

13:40:15
$ls
_1_2_3                       core.c                        modules
1cdesktop                    fcntl.h                       one space
acpi                         -file1                        O'Reilly
alloca.H                     file with spaces at the name  passwd
another very long file name  group                         Regexp.H
__asterisk                   -hello                        s_tol_
bjan                         _hrypun                       term.h
bjen                         isdn_ttyfax.c
bjon                         _kik_my
13:40:16
$touch 'A:\WINDOWS\SYSTEM32'

13:40:40
$touch "Queen \"Live at Wembley '86\""

13:41:32
$echo *
_1_2_3 1cdesktop acpi alloca.H another very long file name __asterisk A:\WINDOWS\SYSTEM32 bjan bjen bjon core.c fcntl.h -file1 file with spaces at the name group -hello _hrypun isdn_ttyfax.c _kik_my modules one space O'Reilly passwd Queen "Live at Wembley '86" Regexp.H s_tol_ term.h
13:41:50
$touch -bad-name-
touch: неверный ключ -- b
Попробуйте «touch --help» для получения более подробного описания.
13:42:50
$touch "-bad-name-"
touch: неверный ключ -- b
Попробуйте «touch --help» для получения более подробного описания.
13:42:57
$touch --bad--name--
touch: ключ --bad--name-- не распознан
Попробуйте «touch --help» для получения более подробного описания.
13:43:21
$touch ./-bad./-name./-
touch: невозможно выполнить touch для «./-bad./-name./-»: Нет такого файла или каталога
13:43:42
$cd

13:44:07
$ls
backup                                 lpi 2                          proj
bigfile                                man_smb_conf                   sh
bin                                    matrix.jpg                     source
freebsd.jpg                            names                          text
granata.jpg                            ogo.jpg                        touchlist
Light_Alloy_4.4.784_RC2_by_FAFNIR.exe  pamyatka.pdf
lpi 1                                  press_any_key_to_continue.jpg
13:44:09
$cat touchlist
file1
file2
file3
directory1
directory2
directory3
aba
abb
abc
abd
killall
13:44:28
$cd names/

13:44:51
$touch 'cat ~/touchlist'
touch: невозможно выполнить touch для «cat ~/touchlist»: Нет такого файла или каталога
13:45:15
$touch `cat ~/touchlist`

13:45:30
$cd

13:45:38
$cd names/

13:46:01
$ls
_1_2_3                       file1
1cdesktop                    -file1
aba                          file2
abb                          file3
abc                          file with spaces at the name
abd                          group
acpi                         -hello
alloca.H                     _hrypun
another very long file name  isdn_ttyfax.c
__asterisk                   _kik_my
A:\WINDOWS\SYSTEM32          killall
bjan                         modules
bjen                         one space
bjon                         O'Reilly
core.c                       passwd
directory1                   Queen "Live at Wembley '86"
directory2                   Regexp.H
directory3                   s_tol_
fcntl.h                      term.h
13:46:02
$echo date
date
13:46:19
$echo $date

13:46:24
$echo `date`
Втр Сен 13 14:46:35 EEST 2016
13:46:35
$echo `date +%Y`
2016
13:46:56
$echo `date +%Y+1`
2016+1
13:47:16
$echo $(expr `date +%Y+1`)
2016+1
13:47:44
$echo $(expr `date +%Y + 1`)
date: лишний операнд «+»
Попробуйте «date --help» для получения более подробного описания.
expr: пропущен операнд
Попробуйте «expr --help» для получения более подробного описания.
13:47:55
$echo $(expr `date +%Y +1`)
date: лишний операнд «+1»
Попробуйте «date --help» для получения более подробного описания.
expr: пропущен операнд
Попробуйте «expr --help» для получения более подробного описания.
13:47:59
$echo $(expr `date +%Y+1`)
2016+1
13:48:02
$echo $(expr `date +%Y`+1)
2016+1
13:49:42