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

Содержание

Журнал

Вторник (05/18/10)

/dev/pts/0
09:26:13
$vim /etc/bash
09:26:13
$vim /etc/bash
09:26:13
$vim /etc/profile
09:26:33
$ else

09:26:34
$vim .vimrc
--- /dev/null	2010-05-14 20:22:43.633692287 +0300
+++ .vimrc	2010-05-18 10:26:55.000000000 +0300
@@ -0,0 +1,3 @@
+syn on
+set number
+
09:26:55
$vim /etc/profile
09:27:23
$ 22 else

09:27:33
$test 10 -lt 9

09:27:48
$test 10 -lt 9

09:27:50
$test 10 -lt 9 ; echo $?
1
09:27:53
$test 9 -lt 9 ; echo $?
1
09:28:00
$test 8 -lt 9 ; echo $?
0
09:28:04
$[ 8 -lt 9 ] ; echo $?
0
09:29:35
$vim /etc/profile
09:32:08
$"/etc/profile" [только для чтения] 28 стр. --100%--

09:32:37
$vim ~/.profile
09:32:53
$ 22 fi
TEST(1)                          User Commands                         TEST(1)
NAME
       test - check file types and compare values
SYNOPSIS
       test EXPRESSION
       test
       [ EXPRESSION ]
       [ ]
       [ OPTION
DESCRIPTION
...
              EXPRESSION is false
       EXPRESSION1 -a EXPRESSION2
              both EXPRESSION1 and EXPRESSION2 are true
       EXPRESSION1 -o EXPRESSION2
              either EXPRESSION1 or EXPRESSION2 is true
       -n STRING
              the length of STRING is nonzero
       STRING equivalent to -n STRING
       -z STRING
              the length of STRING is zero
09:33:02
$vim ~/.profile
09:33:50
$ 22 fi
bash.bashrc        bash_completion.d/
09:33:50
$vim /etc/bash.bashrc
09:35:19
$ 5
 71 # See /usr/share/doc/bash-doc/examples in the bash-doc package.
 72
 73 #if [ -f ~/.bash_aliases ]; then
 74 #    . ~/.bash_aliases
 76
 77 # enable color support of ls and also add handy aliases
 78 if [ -x /usr/bin/dircolors ]; then
 79     test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dd
    ircolors -b)"
 80     alias ls='ls --color=auto'
 81     #alias dir='dir --color=auto'
 75 #fi if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; t81,31         75%
09:37:07
$eval "$(dircolors -b)"

09:37:14
$dircolors -b
LS_COLORS='rs=0:di=01;34:ln=01;36:hl=44;37: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:ca=30;41: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:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;
export LS_COLORS
09:38:37
$0 == l3script ] && . /home/user/.lilalo/l3bashrc && _l3_start
 40         ps waux | awk '{print $2" "$11 }' | grep -q ^$PPID" "script
 41         return $?
 42
 43 # Check if ^^^^ run on Linux
 44 # and del  vvvv this if it does
 45
 46     export L3_TTY=`/usr/bin/tty`
 47     uname -a | grep -qi bsd && bsd=yes
 48     proc_on_the_term=`w | grep "${L3_TTY##/dev/}" | awk '{print $8;}'`
 49     # freeBSD:
...
121 {
122     PS1='[\u@\h:\W]\$ '
123     [ $UID = 0 ] \
124         && PS1='\[\033[0;31m\]'$PS1'\[\033[0m\]' \
125         || PS1='\[\033[0;32m\]'$PS1'\[\033[0m\]' \
126     export PS1
127 }
128
129 l3_fix_prompt()
130 {
прошло 43 минуты
10:21:58
$man test
10:22:02
$vim ~/.profile
10:22:06
$ 22 fi
  5
  6 # If not running interactively, don't do anything
  7 [ -z "$PS1" ] && return
  8
 14 if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
  9 # check the window size after each command and, if necessary,
 15     debian_chroot=$(cat /etc/debian_chroot)
 10 # update the values of LINES and COLUMNS.
 16 fi
 11 shopt -s checkwinsize
 17
 12 c/bash.bashrc" [только для чтения] 47L, 1474C
 18 # set a fancy prompt (non-color, overwrite the one in /etc/profile)
 13 # set variable identifying the chroot you work in (used in the prompt below)
 19 PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
 20
10:22:09
$Commented out, don't overwrite xterm -T "title" -n "icontitle" by default.

10:22:11
$bind -p | less
10:30:14
$apt-get
2007/             .dmrc             .gnome2/          .profile
.bash_history     .esd_auth         .gnome2_private/  .screenrc
.bash_logout      .fluxbox/         .gvfs/            .ssh/
.bash_profile     .fontconfig/      .l3rc             .viminfo
.bashrc           .gconf/           .lesshst          .vimrc
.cache/           .gconfd/          .lilalo/          .Xauthority
.dbus/            .gnome/           .mozilla/         .xsession-errors
10:30:14
$. /etc/bash_completion.d/^C

10:30:37
$sudo apt-get install bash_completion
[sudo] password for user:
Чтение списков пакетов... Готово
Построение дерева зависимостей
Чтение информации о состоянии... Готово
E: Не удалось найти пакет bash_completion
10:30:47
$apt-cache search bash_completion

10:30:58
$apt-cache search bash completion
apparix - console-based bookmark tool for fast file system navigation
bash-completion - programmable completion for the bash shell
bash - The GNU Bourne Again SHell
ddd - The Data Display Debugger, a graphical debugger frontend
emacs-goodies-el - Miscellaneous add-ons for Emacs
jedit - A plugin-based editor for programmers
kdesdk-scripts - scripts and data files for KDE 4 development
moap - Swiss army knife for project maintainers and developers
mpc - A command-line tool to interface MPD
python-optcomplete - provide bash-completion for Python programs
rlwrap - readline feature command line wrapper
viewglob - A graphical display of directories referenced at the shell prompt
10:31:04
$apt-cache search bash-completion
bash-completion - programmable completion for the bash shell
bash - The GNU Bourne Again SHell
python-optcomplete - provide bash-completion for Python programs
10:31:14
$sudo apt-get install bash-completion
Чтение списков пакетов... Готово
Построение дерева зависимостей
Чтение информации о состоянии... Готово
НОВЫЕ пакеты, которые будут установлены:
  bash-completion
обновлено 0, установлено 1 новых пакетов, для удаления отмечено 0 пакетов, и 287 пакетов не обновлено.
Необходимо скачать 127kБ архивов.
После данной операции, объём занятого дискового пространства возрастёт на 958kB.
Получено:1 http://debian.org.ua squeeze/main bash-completion 1:1.1-3 [127kB]
Получено 127kБ за 0с (536kБ/c)
Выбор ранее не выбранного пакета bash-completion.
(Чтение базы данных ... на данный момент установлено 55574 файлов и каталогов.)
Распаковывается пакет bash-completion (из файла .../bash-completion_1%3a1.1-3_all.deb)...
Обрабатываются триггеры для man-db ...
Настраивается пакет bash-completion (1:1.1-3) ...
10:31:28
$. /etc/bash_completion
bash_completion    bash_completion.d/
10:31:28
$. /etc/bash_completion

10:31:46
$apt-get
autoclean        clean            purge            upgrade
autoremove       dist-upgrade     remove
build-dep        dselect-upgrade  source
check            install          update
10:31:46
$apt-get install a
Display all 967 possibilities? (y or n)
a12k12                            apt-forktracer
a2ps                              aptfs
a2ps-ja                           apt-howto-fr
a2ps-perl-ja                      apt-howto-uk
a52dec                            apticron
a52dec-dev                        apt-index-watcher
a56                               aptitude
a7xpg                             aptitude-dbg
a7xpg-data                        aptitude-doc
...
aalib1-dev                        aptitude-doc-fi
aalib-bin                         aptitude-doc-fr
aap                               aptitude-doc-ja
aap-doc                           aptitude-gtk
aaphoto                           aptlinex
aatv                              apt-listbugs
abakus                            apt-listchanges
abby                              apt-mirror
abcde                             apt-move
abcm2ps                           apt-offline
10:31:46
$vim .bashrc
10:32:57
$~ [ ]

10:33:07
$ssh 192.168.16.23
Password:
Last login: Tue May 18 11:28:22 2010 from debian4.net.nt
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
        The Regents of the University of California.  All rights reserved.
FreeBSD 6.3-RELEASE (SMP) #0: Wed Jan 16 04:45:45 UTC 2008
Welcome to FreeBSD!
Before seeking technical support, please use the following resources:
o  Security advisories and updated errata information for all releases are
   at http://www.FreeBSD.org/releases/ - always consult the ERRATA section
   for your release first as it's updated frequently.
...
   http://www.FreeBSD.org/search/.  If the doc distribution has
   been installed, they're also available formatted in /usr/share/doc.
If you still have a question or problem, please take the output of
`uname -a', along with any relevant error messages, and email it
as a question to the questions@FreeBSD.org mailing list.  If you are
unfamiliar with FreeBSD's directory layout, please refer to the hier(7)
manual page.  If you are not familiar with manual pages, type `man man'.
You may also use sysinstall(8) to re-enter the installation and
configuration utility.  Edit /etc/motd to change this login announcement.
l3-agent is already running: pid=10679; pidfile=/home/user/.lilalo/l3-agent.pid
прошло 34 минуты
11:07:34
$-
bash: -: command not found
11:09:04
$exit
exit
Connection to 192.168.16.23 closed.
11:09:05
$ls
2007
прошло 14 минут
11:23:32
$touch \-1
touch: неверный ключ -- «1»
Попробуйте `touch --help' для получения более подробного описания.
11:28:27
$sudo apt-get install gvim
[sudo] password for user:
Чтение списков пакетов... Готово
Построение дерева зависимостей
Чтение информации о состоянии... Готово
Пакет gvim - виртуальный, его функции предоставляются пакетами:
  vim-lesstif 2:7.2.330-1
  vim-gtk 2:7.2.330-1
  vim-gnome 2:7.2.330-1
Вы должны явно указать, какой именно вы хотите установить.
E: Для пакета gvim не найдены кандидаты на установку
11:28:36
$sudo apt-get install vim-gnome
Чтение списков пакетов... Готово
Построение дерева зависимостей
Чтение информации о состоянии... Готово
Будут установлены следующие дополнительные пакеты:
  libperl5.10 libruby1.8 perl perl-base perl-modules tcl8.4 vim-gui-common
Предлагаемые пакеты:
  perl-doc libterm-readline-gnu-perl libterm-readline-perl-perl tclreadline
  cscope vim-doc
НОВЫЕ пакеты, которые будут установлены:
  libperl5.10 libruby1.8 tcl8.4 vim-gnome vim-gui-common
...
update-alternatives: используется `/usr/bin/vim.gnome' для предоставления `/usr/bin/gview' (gview) в автоматический режим.
update-alternatives: используется `/usr/bin/vim.gnome' для предоставления `/usr/bin/rgview' (rgview) в автоматический режим.
update-alternatives: используется `/usr/bin/vim.gnome' для предоставления `/usr/bin/rgvim' (rgvim) в автоматический режим.
update-alternatives: используется `/usr/bin/vim.gnome' для предоставления `/usr/bin/evim' (evim) в автоматический режим.
update-alternatives: используется `/usr/bin/vim.gnome' для предоставления `/usr/bin/eview' (eview) в автоматический режим.
update-alternatives: используется `/usr/bin/vim.gnome' для предоставления `/usr/bin/gvimdiff' (gvimdiff) в автоматический режим.
update-alternatives: используется `/usr/bin/vim.gnome' для предоставления `/usr/bin/gnome-text-editor' (gnome-text-editor) в автоматический режим.
Настраивается пакет perl-modules (5.10.1-12) ...
Настраивается пакет perl (5.10.1-12) ...
Обрабатываются триггеры для menu ...
11:29:29
$ping 10.0.35.1
PING 10.0.35.1 (10.0.35.1) 56(84) bytes of data.
From 10.0.17.1 icmp_seq=1 Destination Host Unreachable
From 10.0.17.1 icmp_seq=2 Destination Host Unreachable
From 10.0.17.1 icmp_seq=3 Destination Host Unreachable
^C
--- 10.0.35.1 ping statistics ---
4 packets transmitted, 0 received, +3 errors, 100% packet loss, time 3013ms
, pipe 3
прошло 24 минуты
11:53:59
$ping 10.0.35.9
PING 10.0.35.9 (10.0.35.9) 56(84) bytes of data.
64 bytes from 10.0.35.9: icmp_seq=1 ttl=63 time=2.24 ms
64 bytes from 10.0.35.9: icmp_seq=2 ttl=63 time=0.217 ms
^C
--- 10.0.35.9 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1005ms
rtt min/avg/max/mdev = 0.217/1.232/2.248/1.016 ms
11:54:02
$ping 10.0.35.1
PING 10.0.35.1 (10.0.35.1) 56(84) bytes of data.
64 bytes from 10.0.35.1: icmp_seq