/l3/trainings/nt-ladm/2006-08-07/linux1.unix.nt/root :1 :2 :3 :4 :5 :6 :7 :8 |
|
#vi mymotttttd
|
#cp /root/mymotttttd /etc/motd
cp: переписать `/etc/motd'? y |
#vi /etc/motd
|
#icon
![]() icon-slicer icontopbm iconv iconvconfig |
#iconv -f UTF-8 -t KOI8-r /etc/motd > /etc/motd ; cat /etc/motd
|
# cat /etc/motd
|
#vi /etc/motd
|
#echo "Вас приветствует компания Сетевые технологиит" > /etc/mo
d ; cat /etc/motd Вас приветствует компания Сетевые технологиит |
#iconv -f UTF-8 -t KOI8-r /etc/motd
÷ÁÓ ÐÒÉ×ÅÔÓÔ×ÕÅÔ ËÏÍÐÁÎÉÑ óÅÔÅ×ÙÅ ÔÅÈÎÏÌÏÇÉÉÔ |
#iconv -f UTF-8 -t KOI8-r /etc/motd > /etc/motd1
|
# cat /etc/motd1
÷ÁÓ ÐÒÉ×ÅÔÓÔ×ÕÅÔ ËÏÍÐÁÎÉÑ óÅÔÅ×ÙÅ ÔÅÈÎÏÌÏÇÉÉÔ |
#mv /etc/motd1 /etc/motd
mv: переписать `/etc/motd'? yes |
# cat /etc/motd
÷ÁÓ ÐÒÉ×ÅÔÓÔ×ÕÅÔ ËÏÍÐÁÎÉÑ óÅÔÅ×ÙÅ ÔÅÈÎÏÌÏÇÉÉÔ |
#iconv -f UTF-8 -t CP1251 /etc/motd > /etc/motd2
![]() iconv: illegal input sequence at position 0 |
#iconv -f UTF-8 -t CP-1251 /etc/motd > /etc/motd2
![]() iconv: conversion to `CP-1251' is not supported |
#iconv -l
The following list contain all the coded character sets known. This does not necessarily mean that all combinations of these names can be used for the FROM and TO command line parameters. One coded character set can be listed with several different names (aliases). 437, 500, 500V1, 850, 851, 852, 855, 856, 857, 860, 861, 862, 863, 864, 865, 866, 866NAV, 869, 874, 904, 1026, 1046, 1047, 8859_1, 8859_2, 8859_3, 8859_4, 8859_5, 8859_6, 8859_7, 8859_8, 8859_9, 10646-1:1993, 10646-1:1993/UCS4, ANSI_X3.4-1968, ANSI_X3.4-1986, ANSI_X3.4, ANSI_X3.110-1983, ANSI_X3.110, ARABIC, ARABIC7, ARMSCII-8, ASCII, ASMO-708, ASMO_449, BALTIC, BIG-5, BIG-FIVE, BIG5-HKSCS, BIG5, BIG5HKSCS, BIGFIVE, BS_4730, CA, CN-BIG5, CN-GB, ... SHIFT_JIS, SHIFT_JISX0213, SJIS-OPEN, SJIS-WIN, SJIS, SS636127, STRK1048-2002, ST_SEV_358-88, T.61-8BIT, T.61, T.618BIT, TCVN-5712, TCVN, TCVN5712-1, TCVN5712-1:1993, TIS-620, TIS620-0, TIS620.2529-1, TIS620.2533-0, TIS620, TS-5881, TSCII, UCS-2, UCS-2BE, UCS-2LE, UCS-4, UCS-4BE, UCS-4LE, UCS2, UCS4, UHC, UJIS, UK, UNICODE, UNICODEBIG, UNICODELITTLE, US-ASCII, US, UTF-7, UTF-8, UTF-16, UTF-16BE, UTF-16LE, UTF-32, UTF-32BE, UTF-32LE, UTF7, UTF8, UTF16, UTF16BE, UTF16LE, UTF32, UTF32BE, UTF32LE, VISCII, WCHAR_T, WIN-SAMI-2, WINBALTRIM, WINDOWS-31J, WINDOWS-936, WINDOWS-1250, WINDOWS-1251, WINDOWS-1252, WINDOWS-1253, WINDOWS-1254, WINDOWS-1255, WINDOWS-1256, WINDOWS-1257, WINDOWS-1258, WINSAMI2, WS2, YU |
#iconv -f UTF-8 -t WINDOWS1251 /etc/motd > /etc/motd2
![]() iconv: conversion to `WINDOWS1251' is not supported |
#iconv -f UTF-8 -t WINDOWS-1251 /etc/motd > /etc/motd2
![]() iconv: illegal input sequence at position 0 |
#cat /etc/motd
÷ÁÓ ÐÒÉ×ÅÔÓÔ×ÕÅÔ ËÏÍÐÁÎÉÑ óÅÔÅ×ÙÅ ÔÅÈÎÏÌÏÇÉÉÔ |
#ssh 127.0.0.1
The authenticity of host '127.0.0.1 (127.0.0.1)' can't be established. RSA key fingerprint is 4c:41:f5:f3:b2:9d:10:cc:c0:86:3f:9b:97:4c:74:b7. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '127.0.0.1' (RSA) to the list of known hosts. root@127.0.0.1's password: Last login: Thu Aug 10 11:19:18 2006 from linux15.linux.nt ÷ÁÓ ÐÒÉ×ÅÔÓÔ×ÕÅÔ ËÏÍÐÁÎÉÑ óÅÔÅ×ÙÅ ÔÅÈÎÏÌÏÇÉÉÔ l3-agent is already running: pid=5981; pidfile=/root/.lilalo/l3-agent.pid |
#exit
exit Connection to 127.0.0.1 closed. |
#iconv -f KOI8-R -t UTF-8 /etc/motd > /etc/motd1
|
#cat /etc/motd1
Вас приветствует компания Сетевые технологиит |
#mv /etc/motd1 /etc/motd
![]() |
#exit
Connection to 127.0.0.1 closed. |
#iconv -f UTF-8 -t WINDOWS-1251 /etc/motd > /etc/motd2
|
#cat /etc/motd2
Âàñ ïðèâåòñòâóåò êîìïàíèÿ Ñåòåâûå òåõíîëîãèèò |
#mv /etc/motd2 /etc/motd
mv: переписать `/etc/motd'? yes |
#iconv -f iconv -f UTF-8 -t KOI8-r /etc/motd > /etc/motd ;
![]() |
#iconv -f WINDOWS-1251 -t UTF-8 /etc/motd > /etc/motd2
|
#mv /etc/motd2 /etc/motd
mv: переписать `/etc/motd'? yes |
#mv /etc/motd2 /etc/motd
![]() |
#iconv -f UTF-8 -t KOI8-R /etc/motd > /etc/motd2
|
#mv /etc/motd2 /etc/motd
mv: переписать `/etc/motd'? yes |
#iconv -l
The following list contain all the coded character sets known. This does not necessarily mean that all combinations of these names can be used for the FROM and TO command line parameters. One coded character set can be listed with several different names (aliases). 437, 500, 500V1, 850, 851, 852, 855, 856, 857, 860, 861, 862, 863, 864, 865, 866, 866NAV, 869, 874, 904, 1026, 1046, 1047, 8859_1, 8859_2, 8859_3, 8859_4, 8859_5, 8859_6, 8859_7, 8859_8, 8859_9, 10646-1:1993, 10646-1:1993/UCS4, ANSI_X3.4-1968, ANSI_X3.4-1986, ANSI_X3.4, ANSI_X3.110-1983, ANSI_X3.110, ARABIC, ARABIC7, ARMSCII-8, ASCII, ASMO-708, ASMO_449, BALTIC, BIG-5, BIG-FIVE, BIG5-HKSCS, BIG5, BIG5HKSCS, BIGFIVE, BS_4730, CA, CN-BIG5, CN-GB, ... SHIFT_JIS, SHIFT_JISX0213, SJIS-OPEN, SJIS-WIN, SJIS, SS636127, STRK1048-2002, ST_SEV_358-88, T.61-8BIT, T.61, T.618BIT, TCVN-5712, TCVN, TCVN5712-1, TCVN5712-1:1993, TIS-620, TIS620-0, TIS620.2529-1, TIS620.2533-0, TIS620, TS-5881, TSCII, UCS-2, UCS-2BE, UCS-2LE, UCS-4, UCS-4BE, UCS-4LE, UCS2, UCS4, UHC, UJIS, UK, UNICODE, UNICODEBIG, UNICODELITTLE, US-ASCII, US, UTF-7, UTF-8, UTF-16, UTF-16BE, UTF-16LE, UTF-32, UTF-32BE, UTF-32LE, UTF7, UTF8, UTF16, UTF16BE, UTF16LE, UTF32, UTF32BE, UTF32LE, VISCII, WCHAR_T, WIN-SAMI-2, WINBALTRIM, WINDOWS-31J, WINDOWS-936, WINDOWS-1250, WINDOWS-1251, WINDOWS-1252, WINDOWS-1253, WINDOWS-1254, WINDOWS-1255, WINDOWS-1256, WINDOWS-1257, WINDOWS-1258, WINSAMI2, WS2, YU |
#iconv -f KOI8-R -t 866 /etc/motd > /etc/motd2
|
#mv /etc/motd2 /etc/motd
mv: переписать `/etc/motd'? yes |
#scp root@192.168.15.15:/etc/motd /root/othermotd
Password: motd 100% 381 0.4KB/s 00:00 |
#cat /root/othermotd
Linux sergix.tech.inc 2.6.15.2 #1 SMP PREEMPT Fri May 19 14:19:01 EEST 2006 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. eto motd.tail |
#mv othermotd /etc/motd
mv: переписать `/etc/motd'? yes |
#vi /etc/motd
9c9 < eto motd.tail --- > Привет! |
#iconv -f UTF-8 -t CP1251 /etc/motd
Linux sergix.tech.inc 2.6.15.2 #1 SMP PREEMPT Fri May 19 14:19:01 EEST 2006 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Ïðèâåò! |
#iconv -f UTF-8 -t CP1251 /etc/motd > /etc/motd
|
#cat /etc/motd
|
#scp root@192.168.15.15:/etc/motd /root/othermotd
Password: motd 100% 381 0.4KB/s 00:00 |
#mv othermotd /etc/motd
mv: переписать `/etc/motd'? yes |
#cat /etc/motd
Linux sergix.tech.inc 2.6.15.2 #1 SMP PREEMPT Fri May 19 14:19:01 EEST 2006 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. eto motd.tail |
#vi /etc/motd
9c9 < eto motd.tail --- > Привет! |
#iconv -f UTF-8 -t CP1251 /etc/motd > /etc/motd1
|
#mv /etc/motd1 /etc/motd
mv: переписать `/etc/motd'? yes |
#cat /etc/motd
Linux sergix.tech.inc 2.6.15.2 #1 SMP PREEMPT Fri May 19 14:19:01 EEST 2006 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Ïðèâåò! |
#iconv -t CP866 -f CP1251 /etc/motd > /etc/motd1
|
#cat /etc/motd1
Linux sergix.tech.inc 2.6.15.2 #1 SMP PREEMPT Fri May 19 14:19:01 EEST 2006 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. ਢ¥â! |
#mv /etc/motd1 /etc/motd
mv: переписать `/etc/motd'? yes |
#cat /etc/motd
Linux sergix.tech.inc 2.6.15.2 #1 SMP PREEMPT Fri May 19 14:19:01 EEST 2006 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. ਢ¥â! |
#init 3
|
#iconv -f CP866 -t UTF-8 /etc/motd > /etc/motd1
|
#mv /etc/motd1 /etc/motd
mv: переписать `/etc/motd'? yes |
#cat /etc/motd
Linux sergix.tech.inc 2.6.15.2 #1 SMP PREEMPT Fri May 19 14:19:01 EEST 2006 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Привет! |
#iconv -t KOI8-R -f UTF-8 /etc/motd > /etc/motd1
|
#mv /etc/motd1 /etc/motd
mv: переписать `/etc/motd'? yes |
#cat /etc/motd
Linux sergix.tech.inc 2.6.15.2 #1 SMP PREEMPT Fri May 19 14:19:01 EEST 2006 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. ðÒÉ×ÅÔ! |
#iconv -t CP1251 -f KOI8-R /etc/motd > /etc/motd1
|
#mv /etc/motd1 /etc/motd
mv: переписать `/etc/motd'? yes |
#cat /etc/motd
Linux sergix.tech.inc 2.6.15.2 #1 SMP PREEMPT Fri May 19 14:19:01 EEST 2006 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Ïðèâåò! |
#vi /etc/inittab
18c18 < id:5:initdefault: --- > id:3:initdefault: |
#iconv -f CP1251 -t UTF-8 /etc/motd > /etc/motd1
Broadcast message from root (pts/10) (Thu Aug 10 11:42:35 2006): The system is going down for reboot NOW! |
#mv /etc/motd1 /etc/motd
mv: переписать `/etc/motd'? yes |
#cat /etc/motd
Linux sergix.tech.inc 2.6.15.2 #1 SMP PREEMPT Fri May 19 14:19:01 EEST 2006 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Привет! |
#reboot
|
Linux sergix.tech.inc 2.6.15.2 #1 SMP PREEMPT Fri May 19 14:19:01 EEST 2006 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Привет!
Linux sergix.tech.inc 2.6.15.2 #1 SMP PREEMPT Fri May 19 14:19:01 EEST 2006 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. ਢ¥â!
Âàñ ïðèâåòñòâóåò êîìïàíèÿ Ñåòåâûå òåõíîëîãèèò
Linux sergix.tech.inc 2.6.15.2 #1 SMP PREEMPT Fri May 19 14:19:01 EEST 2006 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. eto motd.tail
Время первой команды журнала | 11:20:01 2006- 8-10 | ||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 11:42:31 2006- 8-10 | ||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 71 | ||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 9.86 | ||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.00 | ||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 0.38 | ||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 3.16 | ||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.
Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
$ l s-l bash: l: command not found |
Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
$ test 5 -lt 4 |
Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
$ 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 |
Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
# id uid=0(root) gid=0(root) Gruppen=0(root) |
Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
$ vi ~/.bashrc
|
Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
$ patch ~/.bashrc |
Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.
Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.
Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.
Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора
Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.
Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.
Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:
$ whoami
user
$ #^ Интересно, кто я?в журнале это будет выглядеть так:
$ whoami
user
Интересно, кто я? |
Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:
$ whoami
user
$ cat > /dev/null #^ Интересно, кто я?
Программа whoami выводит имя пользователя, под которым мы зарегистрировались в системе. - Она не может ответить на вопрос о нашем назначении в этом мире.В журнале это будет выглядеть так:
$ whoami user
|
Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=
1 2 3 4Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.
LiLaLo (L3) расшифровывается как Live Lab Log.
Программа разработана для повышения эффективности обучения Unix/Linux-системам.
(c) Игорь Чубин, 2004-2008