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

Содержание

Журнал

Вторник (06/12/12)

/dev/pts/1
19:18:01
#kill -9 `ps aux | grep screen | awk '{print $2}'`
l3script: kill: (2242) - Нет такого процесса
19:18:16
#screen -wipe
19:18:44
#kill -9 `ps aux | grep screen | awk '{print $2}'`
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
/dev/pts/2
19:19:35
#ls -l /usr/s
sbin/  share/ src/
19:19:35
#ls -l /usr/share/doc
итого 2
drwxr-xr-x 3 root root 160 Июн 11 10:02 adduser
drwxr-xr-x 3 root root 168 Июн 11 10:02 apt
drwxr-xr-x 3 root root 312 Июн 11 10:02 aptitude
drwxr-xr-x 3 root root 168 Июн 11 10:02 apt-utils
drwxr-xr-x 2 root root 192 Июн 11 10:02 base-files
drwxr-xr-x 2 root root 216 Июн 11 10:02 base-passwd
drwxr-xr-x 2 root root 464 Июн 11 18:56 bash
drwxr-xr-x 2 root root 232 Июн 11 18:56 bash-completion
drwxr-xr-x 6 root root 336 Июн 11 16:35 binutils
...
drwxr-xr-x 3 root root 424 Июн 11 10:02 util-linux
lrwxrwxrwx 1 root root  10 Июн 11 17:08 vim -> vim-common
drwxr-xr-x 2 root root 184 Июн 11 10:03 vim-common
drwxr-xr-x 2 root root 152 Июн 11 17:08 vim-runtime
lrwxrwxrwx 1 root root  10 Июн 11 10:03 vim-tiny -> vim-common
drwxr-xr-x 2 root root 296 Июн 11 10:03 wget
drwxr-xr-x 2 root root 184 Июн 11 10:03 whiptail
drwxr-xr-x 2 root root 152 Июн 11 12:57 xauth
drwxr-xr-x 3 root root 408 Июн 11 10:02 xz-utils
drwxr-xr-x 2 root root 152 Июн 11 10:02 zlib1g
19:22:26
#ddu -sh
l3script: ddu: команда не найдена
19:22:38
#du -sh /usr/share/doc
16M     /usr/share/doc
/dev/pts/2
19:30:08
#top
top - 17:30:16 up 20:12,  1 user,  load average: 1.02, 1.33, 1.07
Tasks:  85 total,   1 running,  84 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.2%us,  0.2%sy,  0.0%ni,  0.0%id, 99.7%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:    201364k total,   114452k used,    86912k free,    13556k buffers
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
Swap:        0k total,        0k used,        0k free,    50448k cached
 2417 root      20   0  7152 2300  956 S  0.3  1.1   0:02.47 screen
 2754 root      20   0  2436 1140  892 R  0.3  0.6   0:00.02 top
    1 root      20   0  2036  700  600 S  0.0  0.3   0:01.05 init
    2 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kthreadd
...
    6 root      20   0     0    0    0 S  0.0  0.0   0:03.12 events/0
    7 root      20   0     0    0    0 S  0.0  0.0   0:00.00 cpuset
    8 root      20   0     0    0    0 S  0.0  0.0   0:00.00 khelper
    9 root      20   0     0    0    0 S  0.0  0.0   0:00.00 netns
   10 root      20   0     0    0    0 S  0.0  0.0   0:00.00 async/mgr
   11 root      20   0     0    0    0 S  0.0  0.0   0:00.00 pm
   12 root      20   0     0    0    0 S  0.0  0.0   0:00.00 xenwatch
   13 root      20   0     0    0    0 S  0.0  0.0   0:00.00 xenbus
   14 root      20   0     0    0    0 D  0.0  0.0   0:01.01 sync_supers
   15 root      20   0     0    0    0 S  0.0  0.0   0:00.16 bdi-default
19:30:27
#grep -r fuck /usr/share/doc/
/usr/share/doc/netcat-traditional/examples/scripts/websearch:# OLD lycos: used to work until they fucking BROKE it...
/usr/share/doc/netcat-traditional/examples/scripts/probe:# this gets pretty intrusive, but what the fuck.  Probe for portmap first
/usr/share/doc/netcat-traditional/examples/scripts/webproxy:  test -f "$CFILE" && echo "  and connection fuckups to $CFILE"
19:31:29
#grep -r fuck /usr/share/doc/ -l
/usr/share/doc/netcat-traditional/examples/scripts/websearch
/usr/share/doc/netcat-traditional/examples/scripts/probe
/usr/share/doc/netcat-traditional/examples/scripts/webproxy
19:32:54
#grep -r fuck /usr/share/doc/ -c
/usr/share/doc/g++/README.Debian:0
/usr/share/doc/g++/README.Bugs:0
/usr/share/doc/g++/copyright:0
/usr/share/doc/g++/changelog.Debian.gz:0
/usr/share/doc/libalgorithm-merge-perl/copyright:0
/usr/share/doc/libalgorithm-merge-perl/changelog.gz:0
/usr/share/doc/libalgorithm-merge-perl/changelog.Debian.gz:0
/usr/share/doc/apt/NEWS.Debian.gz:0
/usr/share/doc/apt/copyright:0
/usr/share/doc/apt/examples/sources.list:0
...
/usr/share/doc/libblkid1/copyright:0
/usr/share/doc/libblkid1/changelog.gz:0
/usr/share/doc/libblkid1/changelog.Debian.gz:0
/usr/share/doc/vim-tiny/README.Debian:0
/usr/share/doc/vim-tiny/NEWS.Debian.gz:0
/usr/share/doc/vim-tiny/copyright:0
/usr/share/doc/vim-tiny/changelog.Debian.gz:0
/usr/share/doc/libregexp-common-perl/copyright:0
/usr/share/doc/libregexp-common-perl/changelog.gz:0
/usr/share/doc/libregexp-common-perl/changelog.Debian.gz:0
19:33:41
#^C

19:35:32
#[root@debian0:~]# whatis intro
l3script: [root@debian0:~]#: команда не найдена
intro (2)            - Introduction to system calls
intro (3)            - Introduction to library functions
intro (4)            - Introduction to special files
intro (5)            - Introduction to file formats
intro (6)            - Introduction to games
intro (7)            - Introduction to overview, conventions, and miscellany ...
intro (8)            - Introduction to administration and privileged commands
19:35:59
#intro (1) - Introduction to user commands
l3script: syntax error near unexpected token `1'
19:35:59
#intro (2) - Introduction to system calls
l3script: syntax error near unexpected token `2'
19:36:00
#intro (3) - Introduction to library functions
l3script: syntax error near unexpected token `3'
19:36:00
#intro (4) - Introduction to special files
l3script: syntax error near unexpected token `4'
19:36:00
#intro (5) - Introduction to file formats
l3script: syntax error near unexpected token `5'
19:36:00
#intro (6) - Introduction to games
l3script: syntax error near unexpected token `6'
19:36:01
#[root@debian0:~]#
l3script: [root@debian0:~]#: команда не найдена
19:36:01
#^C

19:36:08
#whatis intro
intro (1)            - Introduction to user commands
intro (2)            - Introduction to system calls
intro (3)            - Introduction to library functions
intro (4)            - Introduction to special files
intro (5)            - Introduction to file formats
intro (6)            - Introduction to games
intro (7)            - Introduction to overview, conventions, and miscellany ...
intro (8)            - Introduction to administration and privileged commands
19:36:21
#id
uid=0(root) gid=0(root) группы=0(root)
19:37:23
#whoami
root
19:37:33
#ls -l /usr/share/man
итого 98
drwxr-xr-x 5 root root   120 Фев 15  2011 cs
drwxr-xr-x 5 root root   120 Фев 15  2011 de
drwxr-xr-x 5 root root   120 Ноя 10  2011 es
drwxr-xr-x 4 root root    96 Июн 11 10:02 fi
drwxr-xr-x 5 root root   120 Фев 15  2011 fr
drwxr-xr-x 3 root root    72 Июн 11 10:02 gl
drwxr-xr-x 5 root root   120 Фев 15  2011 hu
drwxr-xr-x 5 root root   120 Июн 11 10:03 id
drwxr-xr-x 5 root root   120 Фев 15  2011 it
...
drwxr-xr-x 2 root root  9288 Июн 11 17:52 man8
drwxr-xr-x 3 root root    72 Июн 11 16:50 nl
drwxr-xr-x 5 root root   120 Фев 15  2011 pl
drwxr-xr-x 5 root root   120 Июн 11 10:02 pt
drwxr-xr-x 5 root root   120 Фев 15  2011 pt_BR
drwxr-xr-x 5 root root   120 Фев 15  2011 ru
drwxr-xr-x 5 root root   120 Фев 15  2011 sv
drwxr-xr-x 5 root root   120 Фев 15  2011 tr
drwxr-xr-x 5 root root   120 Фев 15  2011 zh_CN
drwxr-xr-x 5 root root   120 Фев 15  2011 zh_TW
19:37:54
#ls -l /usr/share/man1/
ls: невозможно получить доступ к /usr/share/man1/: Нет такого файла или каталога
19:39:14
#ls -l /usr/share/man1
ls: невозможно получить доступ к /usr/share/man1: Нет такого файла или каталога
19:39:23
#ls -l /usr/share/man/man1
итого 2248
lrwxrwxrwx 1 root root     9 Июн 11 10:02 [.1.gz -> test.1.gz
-rw-r--r-- 1 root root  4656 Дек 20 20:40 a2p.1.gz
-rw-r--r-- 1 root root  3675 Янв 25  2011 addr2line.1.gz
-rw-r--r-- 1 root root  2786 Янв  3  2011 apropos.1.gz
-rw-r--r-- 1 root root  1548 Апр 15  2011 apt-extracttemplates.1.gz
-rw-r--r-- 1 root root  6131 Апр 15  2011 apt-ftparchive.1.gz
-rw-r--r-- 1 root root  1651 Авг 12  2011 aptitude-create-state-bundle.1.gz
-rw-r--r-- 1 root root  1737 Авг 12  2011 aptitude-run-state-bundle.1.gz
-rw-r--r-- 1 root root  1429 Апр 15  2011 apt-sortpkgs.1.gz
...
-rw-r--r-- 1 root root   427 Янв 20  2010 zdiff.1.gz
-rw-r--r-- 1 root root   526 Фев 13 05:44 zdump.1.gz
lrwxrwxrwx 1 root root    10 Июн 11 10:02 zegrep.1.gz -> zgrep.1.gz
lrwxrwxrwx 1 root root    10 Июн 11 10:02 zfgrep.1.gz -> zgrep.1.gz
-rw-r--r-- 1 root root   378 Янв 20  2010 zforce.1.gz
-rw-r--r-- 1 root root   435 Янв 20  2010 zgrep.1.gz
-rw-r--r-- 1 root root   994 Янв 20  2010 zless.1.gz
-rw-r--r-- 1 root root  1749 Янв 20  2010 zmore.1.gz
-rw-r--r-- 1 root root   545 Янв 20  2010 znew.1.gz
-rw-r--r-- 1 root root  1032 Янв  3  2011 zsoelim.1.gz
19:40:50
#. /etc/bash_completion

19:40:59
#apt-cache s
search   show     showpkg  showsrc  stats
19:40:59
#apt-cache s
search   show     showpkg  showsrc  stats
19:40:59
#apt-cache search file
2vcard - perl script to convert an addressbook to VCARD file format
a2ps - GNU a2ps - 'Anything to PostScript' converter and pretty-printer
liba52-0.7.4-dev - library for decoding ATSC A/52 streams (development)
libaa1-dev - ascii art library, development kit
abcde - A Better CD Encoder
abcm2ps - Translates ABC music description files to PostScript
abcmidi - converter from ABC to MIDI format and back
abe-data - Side-scrolling game named "Abe's Amazing Adventure"
abe - Side-scrolling game named "Abe's Amazing Adventure"
abi-compliance-checker - tool to compare ABI compatibility of shared C/C++ library versions
...
ftpgrab - file mirroring utility
libghc6-ftphs-dev - FTP Client and Server Library for Haskell, GHC package
libghc6-ftphs-doc - FTP Client and Server Library for Haskell, documentation
ftplib-dev - Library of callable ftp routines (development)
ftplib3 - Library of callable ftp routines
ftpwatch - Notifies you of changes on remote ftp servers
funcoeszz - script with 65 useful mini applications
furiusisomount - An ISO, IMG, BIN, MDF and NRG image management utility
fuse-convmvfs - mirrors a whole filesystem tree from one charset to another
fuse-posixovl - FUSE file system that provides POSIX functionality
19:41:24
#ssh clint@192.168.7.254 'dpkg -S /usr/bin/file'
clint@192.168.7.254's password:
file: /usr/bin/file
19:43:00
#apt-cache search file
2vcard - perl script to convert an addressbook to VCARD file format
a2ps - GNU a2ps - 'Anything to PostScript' converter and pretty-printer
liba52-0.7.4-dev - library for decoding ATSC A/52 streams (development)
libaa1-dev - ascii art library, development kit
abcde - A Better CD Encoder
abcm2ps - Translates ABC music description files to PostScript
abcmidi - converter from ABC to MIDI format and back
abe-data - Side-scrolling game named "Abe's Amazing Adventure"
abe - Side-scrolling game named "Abe's Amazing Adventure"
abi-compliance-checker - tool to compare ABI compatibility of shared C/C++ library versions
...
changetrack - monitor changes to (configuration) files
chaosreader - trace network sessions and export it to html format
chase - Follow a symlink and print out its target file
chasen - a Japanese Morphological Analysis System
checkinstall - installation tracker
checkpw - checks password which is stored in ~/Maildir/.password
checksecurity - basic system security checks
checkstyle - checks Java source against a coding standard
cheese-common - Common files for the Cheese tool to take pictures and videos
^C
19:43:16
#^C

19:43:24
#file /usr/share/man/man1/zsoelim.1.gz
l3script: file: команда не найдена
19:43:54
#apt-get install file
Чтение списков пакетов... Готово
Построение дерева зависимостей
Чтение информации о состоянии... Готово
Будут установлены следующие дополнительные пакеты:
  libmagic1
НОВЫЕ пакеты, которые будут установлены:
  file libmagic1
обновлено 0, установлено 2 новых пакетов, для удаления отмечено 0 пакетов, и 0 пакетов не обновлено.
Необходимо скачать 284 kБ архивов.
После данной операции, объём занятого дискового пространства возрастёт на 2 232 kB.
...
Получено:2 http://debian.org.ua/debian/ squeeze/main file i386 5.04-5+squeeze2 [49,5 kB]
Получено 284 kБ за 0с (568 kБ/c)
Выбор ранее не выбранного пакета libmagic1.
(Чтение базы данных ... на данный момент установлено 17563 файла и каталога.)
Распаковывается пакет libmagic1 (из файла .../libmagic1_5.04-5+squeeze2_i386.deb)...
Выбор ранее не выбранного пакета file.
Распаковывается пакет file (из файла .../file_5.04-5+squeeze2_i386.deb)...
Обрабатываются триггеры для man-db ...
Настраивается пакет libmagic1 (5.04-5+squeeze2) ...
Настраивается пакет file (5.04-5+squeeze2) ...
19:46:09
# 6) - Introduction to games
                  whatis intro
intro (1)            - Introduction to user commands
intro (2)            - Introduction to system calls
intro (3)            - Introduction to library functions
intro (4)            - Introduction to special files
intro (5)            - Introduction to file formats
intro (6)            - Introduction to games
intro (7)            - Introduction to overview, conventions, and miscellany ...
intro (8)            - Introduction to administration and privileged commands
19:46:52
#whatis passwd
passwd (1)           - изменяет пароль пользователя
passwd (5)           - файл паролей
19:47:51
#man passwd
19:50:01
#^C

19:50:03
#LANG=C

19:50:09
#man passwd
19:51:31
#q!
l3script: q!: command not found
19:51:32
#whatis passwd
passwd (1)           - change user password
passwd (5)           - the password file
19:51:50
#echo $PAGER

19:52:30
#PAGER=cat man passwd
PASSWD(1)                        User Commands                       PASSWD(1)
NAME
       passwd - change user password
SYNOPSIS
       passwd [options] [LOGIN]
DESCRIPTION
       The passwd command changes passwords for user accounts. A normal user
       may only change the password for his/her own account, while the
       superuser may change the password for any account.  passwd also changes
       the account or associated password validity period.
...
           unexpected failure, nothing done
       4
           unexpected failure, passwd file missing
       5
           passwd file busy, try again
       6
           invalid argument to option
SEE ALSO
       passwd(5), shadow(5), usermod(8).
User Commands                     02/15/2011                         PASSWD(1)
19:53:01
#whatis passwd
passwd (1)           - change user password
passwd (5)           - the password file
19:54:48
#man passwd
19:54:57
#man 1 passwd
19:55:14
#man 5 passwd
19:55:31
#man -a passwd
19:55:47
#whatis passwd
passwd (1)           - change user password
passwd (5)           - the password file
19:56:02
#apropos password
chage (1)            - change user password expiry information
chgpasswd (8)        - update group passwords in batch mode
chpasswd (8)         - update passwords in batch mode
cpgr (8)             - copy with locking the given file to the password or gr...
cppw (8)             - copy with locking the given file to the password or gr...
crypt (3)            - password and data encryption
crypt_r (3)          - password and data encryption
endpwent (3)         - get password file entry
endspent (3)         - get shadow password file entry
expiry (1)           - check and enforce password expiration policy
...
shadow (5)           - shadowed password file
shadowconfig (8)     - toggle shadow passwords on and off
ulckpwdf (3)         - get shadow password file entry
unix_chkpwd (8)      - Helper binary that verifies the password of the curren...
unix_update (8)      - Helper binary that updates the password of a given user
vigr (8)             - edit the password, group, shadow-password or shadow-gr...
vipw (8)             - edit the password, group, shadow-password or shadow-gr...
xcrypt (3)           - RFS password encryption
xdecrypt (3)         - RFS password encryption
xencrypt (3)         - RFS password encryption
19:56:37
#apropos password | wc -l
52
19:57:24
#whatis passwd | wc -l
2
19:57:33
#whatis passwd
passwd (1)           - change user password
passwd (5)           - the password file
19:57:38
#apropos password
chage (1)            - change user password expiry information
chgpasswd (8)        - update group passwords in batch mode
chpasswd (8)         - update passwords in batch mode
cpgr (8)             - copy with locking the given file to the password or gr...
cppw (8)             - copy with locking the given file to the password or gr...
crypt (3)            - password and data encryption
crypt_r (3)          - password and data encryption
endpwent (3)         - get password file entry
endspent (3)         - get shadow password file entry
expiry (1)           - check and enforce password expiration policy
...
shadow (5)           - shadowed password file
shadowconfig (8)     - toggle shadow passwords on and off
ulckpwdf (3)         - get shadow password file entry
unix_chkpwd (8)      - Helper binary that verifies the password of the curren...
unix_update (8)      - Helper binary that updates the password of a given user
vigr (8)             - edit the password, group, shadow-password or shadow-gr...
vipw (8)             - edit the password, group, shadow-password or shadow-gr...
xcrypt (3)           - RFS password encryption
xdecrypt (3)         - RFS password encryption
xencrypt (3)         - RFS password encryption
19:57:42
#man passwd
19:59:53
#man -k password
20:01:05
#man -f password
20:01:12
#man -f passwd
20:01:20
#wherei apropos
l3script: wherei: command not found
20:01:30
#whereis apropos
apropos: /usr/bin/apropos /usr/share/man/man1/apropos.1.gz
20:01:37
#ls -l /usr/bin/apropos
lrwxrwxrwx 1 root root 6 Jun 11 10:03 /usr/bin/apropos -> whatis
20:01:55
#info
20:03:52
#Basic Info command keys
File: coreutils.info,  Node: Mode Structure,  Next: Symbolic Modes,  Up: File p\
ermissions
27.1 Structure of File Mode Bits
================================
The file mode bits have two parts: the "file permission bits", which
control ordinary access to the file, and "special mode bits", which
affect only some files.
   There are three kinds of permissions that a user can have for a file:
  1. permission to read the file.  For directories, this means
     permission to list the contents of the directory.
  2. permission to write to (change) the file.  For directories, this
     means permission to create and remove files in the directory.
  3. permission to execute the file (run it as a program).  For
     directories, this means permission to access files in the
     directory.
--zz-Info: (coreutils.info.gz)Mode Structure, 90 lines --Top--------------------
20:04:47
#info
20:07:22
#* I/O redirection:: I/O redirection
l3script: qqq\\: command not found

Вторник (06/19/12)

/dev/pts/0
18:13:47
#apt-get install tree
Чтение списков пакетов... Готово
Построение дерева зависимостей
Чтение информации о состоянии... Готово
НОВЫЕ пакеты, которые будут установлены:
  tree
обновлено 0, установлено 1 новых пакетов, для удаления отмечено 0 пакетов, и 0 пакетов не обновлено.
Необходимо скачать 31,2 kБ архивов.
После данной операции, объём занятого дискового пространства возрастёт на 94,2 kB.
Получено:1 http://debian.org.ua/debian/ squeeze/main tree i386 1.5.3-1 [31,2 kB]
Получено 31,2 kБ за 2с (12,7 kБ/c)
Выбор ранее не выбранного пакета tree.
(Чтение базы данных ... на данный момент установлено 17592 файла и каталога.)
Распаковывается пакет tree (из файла .../archives/tree_1.5.3-1_i386.deb)...
Обрабатываются триггеры для man-db ...
Настраивается пакет tree (1.5.3-1) ...
18:14:42
#/ pwd
l3script: /: является директорией
прошло 36 минут
18:50:47
#pwd
/tmp
18:50:52
#ls

18:50:55
#touch 123

18:50:58
#vi 123
18:51:04
#~
eth0      Link encap:Ethernet  HWaddr 00:16:3e:0e:00:01
          inet addr:192.168.7.10  Bcast:192.168.7.255  Mask:255.255.255.0
          inet6 addr: fe80::216:3eff:fe0e:1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:995 errors:0 dropped:0 overruns:0 frame:0
          TX packets:546 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:100751 (98.3 KiB)  TX bytes:429851 (419.7 KiB)
          Interrupt:247
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
18:51:33
#cd

/dev/pts/1
18:52:08
#ls -l
итого 8
-rwxr-xr-x 1 root root 5342 Июн 11 18:50 install
18:52:11
#w
 16:52:13 up  5:48,  4 users,  load average: 0,06, 0,01, 0,00
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
root     pts/1    195.238.93.36:S. 16:51    0.00s  0.03s  0.00s script -f -c l3script -q /root/.lilalo//2742924414180941622-1340124728.script
root     pts/6    192.168.7.254    16:52    7.00s  0.52s  0.52s -bash
root     pts/8    192.168.7.254    16:52    2.00s  0.30s  0.30s -bash
root     pts/9    192.168.7.254    16:52    0.00s  0.29s  0.29s -bash
18:52:13
#w
 16:52:14 up  5:48,  4 users,  load average: 0,13, 0,03, 0,01
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
root     pts/1    195.238.93.36:S. 16:51    0.00s  0.03s  0.00s script -f -c l3script -q /root/.lilalo//2742924414180941622-1340124728.script
root     pts/6    192.168.7.254    16:52    8.00s  0.52s  0.52s -bash
root     pts/8    192.168.7.254    16:52    3.00s  0.30s  0.30s -bash
root     pts/9    192.168.7.254    16:52    0.00s  0.29s  0.29s -bash
18:52:14
#w
 16:52:15 up  5:48,  3 users,  load average: 0,13, 0,03, 0,01
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
root     pts/1    195.238.93.36:S. 16:51    0.00s  0.03s  0.00s script -f -c l3script -q /root/.lilalo//2742924414180941622-1340124728.script
root     pts/6    192.168.7.254    16:52    9.00s  0.52s  0.52s -bash
root     pts/8    192.168.7.254    16:52    4.00s  0.30s  0.30s -bash
18:52:15
#w
 16:52:16 up  5:48,  3 users,  load average: 0,13, 0,03, 0,01
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
root     pts/1    195.238.93.36:S. 16:51    0.00s  0.03s  0.00s script -f -c l3script -q /root/.lilalo//2742924414180941622-1340124728.script
root     pts/6    192.168.7.254    16:52   10.00s  0.52s  0.52s -bash
root     pts/8    192.168.7.254    16:52    5.00s  0.30s  0.30s -bash
18:52:16
#LANG=C

18:52:20
#ls -l
total 8
-rwxr-xr-x 1 root root 5342 Jun 11 18:50 install
18:54:41
## here

18:54:47
#vim
18:55:57
#~

прошло 10 минут
19:06:03
#~

19:06:04
#vim
19:10:07
#[ ]

19:12:56
#~

19:12:57
#vim /etc/sudoers
19:13:21
#~
-r--r----- 1 root root 491 Jun 11 17:52 /etc/sudoers
19:13:29
#vim /etc/sudoers
19:14:26
#~
# See the man page for details on how to write a sudoers file.
#
Defaults        env_reset
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root    ALL=(ALL) ALL
# Allow members of group sudo to execute any command
# (Note that later entries override this, so you might need to move
# it further down)adonly] 24L, 491C
%sudo ALL=(ALL) ALL
#
#includedir /etc/sudoers.d
19:18:24
#vim
19:18:43
#~
l3script: q!: command not found
19:18:46
#ifconfig
eth0      Link encap:Ethernet  HWaddr 00:16:3e:0e:00:01
          inet addr:192.168.7.10  Bcast:192.168.7.255  Mask:255.255.255.0
          inet6 addr: fe80::216:3eff:fe0e:1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8949 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7983 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:575789 (562.2 KiB)  TX bytes:2502262 (2.3 MiB)
          Interrupt:247
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
19:18:50
#vim
прошло 25 минут
19:44:39
#[ 0.203767] PNP: No PS/2 controller found. Probing ports directly.
                                                                                   |
~                                                                                  |
                                                                                   |
~                                                                                  |
                                                                                   |
~                                                                                  |
/tmp/123 [+]                                                                       |                                                                1,1            All
~                                                                                  |
                                                                                   |
~                                                                                  |
...
                                                                                   |
/tmp/123 [+]                                                                                                                                        2,1            All
# Short-Description: Raise network interfaces.
### END INIT INFO
PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin"
[ -x /sbin/ifup ] || exit 0
. /lib/lsb/init-functions
process_options() {
/etc/init.d/networking                                                                                                                              3,1            Top
"/tmp/2344" [New File]
19:49:37
#~ k
[    0.206694] /build/buildd-linux-2.6_2.6.32-31-i386-qYaaJr/linux-2.6-2.6.32/debian/build/source_i386_xen/drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[    0.206730] Initalizing network drop monitor service
[    0.206800] Freeing unused kernel memory: 404k freed
[            ]
[    0.208249] Write protecting the kernel text: 2636k
[            ]
[    0.208656] XENBUS: Device with no driver: device/vbd/51713
[      ui    ] XsNBUS: Device with no driver: device/vif/0
[    0.312673] : Device with no driver: device/console/0
[            ] XENBUS: Device with no driver: device/console/0
...
n    1.246543] REISERFS (device xvda1): Using r5 hash to sort names                                                                                                  aa
[            ]
[    2.115442] udev[158]: starting version 164l params: device xvda1, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max traa
[            ]
[    2.573564] input: PC Speaker as /devices/platform/pcspkr/input/input0
[            ]
[    2.859488] Error: Driver 'pcspkr' is already registered, aborting...
[            ]
3 changes; before #2  21 seconds ago                                                                                                                188,62        Bot
[1]+  Stopped                 /usr/bin/vim "$@"

Статистика

Время первой команды журнала19:18:01 2012- 6-12
Время последней команды журнала19:49:37 2012- 6-19
Количество командных строк в журнале101
Процент команд с ненулевым кодом завершения, %17.82
Процент синтаксически неверно набранных команд, % 7.92
Суммарное время работы с терминалом *, час 1.82
Количество командных строк в единицу времени, команда/мин 0.93
Частота использования команд
man10|=========| 9.35%
ls10|=========| 9.35%
~8|=======| 7.48%
whatis7|======| 6.54%
intro6|=====| 5.61%
vim6|=====| 5.61%
grep5|====| 4.67%
w4|===| 3.74%
^C4|===| 3.74%
apt-cache4|===| 3.74%
apropos3|==| 2.80%
awk2|=| 1.87%
info2|=| 1.87%
wc2|=| 1.87%
[2|=| 1.87%
apt-get2|=| 1.87%
[root@debian0:~]#2|=| 1.87%
kill2|=| 1.87%
LANG=C2|=| 1.87%
ifconfig1|| 0.93%
screen1|| 0.93%
#1|| 0.93%
whereis1|| 0.93%
cd1|| 0.93%
wherei1|| 0.93%
echo1|| 0.93%
whoami1|| 0.93%
.1|| 0.93%
6)1|| 0.93%
*1|| 0.93%
q!1|| 0.93%
touch1|| 0.93%
Basic1|| 0.93%
top1|| 0.93%
ddu1|| 0.93%
pwd1|| 0.93%
PAGER=cat1|| 0.93%
id1|| 0.93%
vi1|| 0.93%
ssh1|| 0.93%
file1|| 0.93%
du1|| 0.93%
/1|| 0.93%
____
*) Интервалы неактивности длительностью 30 минут и более не учитываются

Справка

Для того чтобы использовать LiLaLo, не нужно знать ничего особенного: всё происходит само собой. Однако, чтобы ведение и последующее использование журналов было как можно более эффективным, желательно иметь в виду следующее:
  1. В журнал автоматически попадают все команды, данные в любом терминале системы.

  2. Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.

  3. Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
    $ l s-l
    bash: l: command not found
    

  4. Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
    $ test 5 -lt 4
    Обратите внимание на то, что код завершения команды может быть отличен от нуля не только в тех случаях, когда команда была выполнена с ошибкой. Многие команды используют код завершения, например, для того чтобы показать результаты проверки

  5. Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
    $ find / -name abc
    find: /home/devi-orig/.gnome2: Keine Berechtigung
    find: /home/devi-orig/.gnome2_private: Keine Berechtigung
    find: /home/devi-orig/.nautilus/metafiles: Keine Berechtigung
    find: /home/devi-orig/.metacity: Keine Berechtigung
    find: /home/devi-orig/.inkscape: Keine Berechtigung
    ^C
    

  6. Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
    # id
    uid=0(root) gid=0(root) Gruppen=0(root)
    

  7. Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
    $ vi ~/.bashrc
    2a3,5
    >    if [ -f /usr/local/etc/bash_completion ]; then
    >         . /usr/local/etc/bash_completion
    >        fi
    

  8. Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
    $ patch ~/.bashrc
    В данном случае изменения применяются к файлу ~/.bashrc

  9. Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.

    Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.

  10. Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.

  11. Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора

  12. Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.

  13. Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.

  14. Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:

    $ whoami
    
    user
    
    $ #^ Интересно, кто я?
    
    в журнале это будет выглядеть так:
    $ whoami
    
    user
    
    Интересно, кто я?

  15. Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:

    $ whoami
    
    user
    
    $ cat > /dev/null #^ Интересно, кто я?
    
    Программа whoami выводит имя пользователя, под которым 
    мы зарегистрировались в системе.
    -
    Она не может ответить на вопрос о нашем назначении 
    в этом мире.
    
    В журнале это будет выглядеть так:
    $ whoami
    user
    
    Интересно, кто я?
    Программа whoami выводит имя пользователя, под которым
    мы зарегистрировались в системе.

    Она не может ответить на вопрос о нашем назначении
    в этом мире.
    Для разделения нескольких абзацев между собой используйте символ "-", один в строке.

  16. Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=

  17. Содержимое файла может быть показано в журнале. Для этого его нужно вывести с помощью программы cat. Если вывод команды отметить симоволами #!, содержимое файла будет показано в журнале в специально отведённой для этого секции.
  18. Для того чтобы вставить скриншот интересующего вас окна в журнал, нужно воспользоваться командой l3shot. После того как команда вызвана, нужно с помощью мыши выбрать окно, которое должно быть в журнале.
  19. Команды в журнале расположены в хронологическом порядке. Если две команды давались одна за другой, но на разных терминалах, в журнале они будут рядом, даже если они не имеют друг к другу никакого отношения.
    1
        2
    3   
        4
    
    Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.

О программе

LiLaLo (L3) расшифровывается как Live Lab Log.
Программа разработана для повышения эффективности обучения Unix/Linux-системам.
(c) Игорь Чубин, 2004-2008

$Id$