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

Содержание

Журнал

Вторник (10/21/14)

/dev/pts/2
15:50:39
#A=1

15:50:51
#B=2

15:50:53
#echo ((A+$B))
l3script: syntax error near unexpected token `('
15:51:03
#echo (($A+$B))
l3script: syntax error near unexpected token `('
15:51:22
#cd /

15:52:17
#cd

15:52:19
#cat /etc/passwd > newfile

15:52:33
#ls
1.txt  2.txt  3.txt  backup  d1  d2  f6  f7  install  newfile  proj  student_con  test  wget.txt
15:52:35
#cat newfile | less
15:52:48
#sort < /etc/passwd
backup:x:34:34:backup:/var/backups:/bin/sh
bin:x:2:2:bin:/bin:/bin/sh
daemon:x:1:1:daemon:/usr/sbin:/bin/sh
Debian-exim:x:101:103::/var/spool/exim4:/bin/false
games:x:5:60:games:/usr/games:/bin/sh
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
irc:x:39:39:ircd:/var/run/ircd:/bin/sh
libuuid:x:100:101::/var/lib/libuuid:/bin/sh
list:x:38:38:Mailing List Manager:/var/list:/bin/sh
lp:x:7:7:lp:/var/spool/lpd:/bin/sh
...
nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
proxy:x:13:13:proxy:/bin:/bin/sh
root:x:0:0:root:/root:/bin/bash
sshd:x:102:65534::/var/run/sshd:/usr/sbin/nologin
student:x:1001:1001::/home/student:/bin/bash
sync:x:4:65534:sync:/bin:/bin/sync
sys:x:3:3:sys:/dev:/bin/sh
user:x:1000:1000:user,,,:/home/user:/bin/bash
uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
www-data:x:33:33:www-data:/var/www:/bin/sh
15:53:23
#cat >> unsorted
^C
прошло 13 минут
16:07:21
#cat 1.txt 2.txt 3.txt > letter

16:09:41
#cat letter
Пнд Окт 20 11:53:38 EEST 2014
/root
Пнд Окт 20 11:53:38 EEST 2014
/root
Пнд Окт 20 11:53:38 EEST 2014
/root
16:09:47
#date > 2.txt

16:10:08
#cat 2.txt
Втр Окт 21 17:10:08 EEST 2014
16:10:14
#$(expr `date +%m` +1) `date %d%Y%HM`
expr: синтаксическая ошибка
date: неверная дата «%d%Y%HM»
16:15:45
#$(expr `date +%m` +1) `date %dYHM`
expr: синтаксическая ошибка
date: неверная дата «%dYHM»
16:16:13
#$(expr `date +%m` +1) `date %d%Y%H%M`
expr: синтаксическая ошибка
date: неверная дата «%d%Y%H%M»
16:16:27
#$(expr `date +%m` +1) `date %d %Y %H %M`
expr: синтаксическая ошибка
date: лишний операнд «%Y»
Попробуйте «date --help» для получения более подробного описания.
16:16:36
#$(expr `date +%m` +1) `date %d`
expr: синтаксическая ошибка
date: неверная дата «%d»
16:17:40
#$(expr `date +%m` +1) `date +%d%Y%H%M`
expr: синтаксическая ошибка
l3script: 2120141718: команда не найдена
16:18:03
#$(expr `date +%m` +1) `date +%d +%Y +%H +%M`
expr: синтаксическая ошибка
date: лишний операнд «+%Y»
Попробуйте «date --help» для получения более подробного описания.
16:18:24
#$(expr `date +%m` +1) `date +%d` `date +%Y` `date +%H` `date +%M`
expr: синтаксическая ошибка
l3script: 21: команда не найдена

Среда (10/22/14)

/dev/pts/2
08:21:33
#сфе цпуеÑc
c2ph                  cfdisk                chrt                  compgen               cpgr
c89                   c++filt               chsh                  complete              cpio
c89-gcc               chage                 chvt                  compopt               cpp
c99                   chardet               ckbcomp               compose               cpp-4.7
c99-gcc               chattr                cksum                 config_data           cppw
cal                   chcon                 clear                 config_data.diverted  c_rehash
calendar              checkint              clear_console         continue              cron
caller                chfn                  cmp                   coproc                crontab
captoinfo             chgpasswd             codepage              corelist              csplit
case                  chgrp                 col                   cp                    ctrlaltdel
cat                   chkdupexe             colcrt                cpan                  ctstat
catchsegv             chmod                 colrm                 cpan2dist             cut
catman                chown                 column                cpanp                 cyr
cc                    chpasswd              comm                  cpanp-run-perl        cytune
cd                    chroot                command               cpansign
08:21:33
#cat wget.txt | grep -E Ñi 'Fl..r'
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
прошло 25 минут
08:46:37
#cat wget.txt | grep -E 'fl..r'

08:47:27
#cat wget.txt | grep -Ev 'fl..r'
                                                          -*- text -*-
GNU Wget
========
                  Current Web home: http://www.gnu.org/software/wget/
GNU Wget is a free utility for non-interactive download of files from
the Web.  It supports HTTP, HTTPS, and FTP protocols, as well as
retrieval through HTTP proxies.
It can follow links in HTML pages and create local versions of remote
web sites, fully recreating the directory structure of the original
site.  This is sometimes referred to as "recursive downloading."
...
USA.
Additional permission under GNU GPL version 3 section 7
If you modify this program, or any covered work, by linking or
combining it with the OpenSSL project's OpenSSL library (or a
modified version of that library), containing parts covered by the
terms of the OpenSSL or SSLeay licenses, the Free Software Foundation
grants you additional permission to convey the resulting work.
Corresponding Source for a non-source form of such a combination
shall include the source code for the parts of OpenSSL used as well
as that of the covered work.
08:47:35
#cat wget.txt | grep -Ev 'Fl..r'
                                                          -*- text -*-
GNU Wget
========
                  Current Web home: http://www.gnu.org/software/wget/
GNU Wget is a free utility for non-interactive download of files from
the Web.  It supports HTTP, HTTPS, and FTP protocols, as well as
retrieval through HTTP proxies.
It can follow links in HTML pages and create local versions of remote
web sites, fully recreating the directory structure of the original
site.  This is sometimes referred to as "recursive downloading."
...
USA.
Additional permission under GNU GPL version 3 section 7
If you modify this program, or any covered work, by linking or
combining it with the OpenSSL project's OpenSSL library (or a
modified version of that library), containing parts covered by the
terms of the OpenSSL or SSLeay licenses, the Free Software Foundation
grants you additional permission to convey the resulting work.
Corresponding Source for a non-source form of such a combination
shall include the source code for the parts of OpenSSL used as well
as that of the covered work.
08:48:39
#пкcat wget.txt | grep -E '.$'
                                                          -*- text -*-
GNU Wget
========
                  Current Web home: http://www.gnu.org/software/wget/
GNU Wget is a free utility for non-interactive download of files from
the Web.  It supports HTTP, HTTPS, and FTP protocols, as well as
retrieval through HTTP proxies.
It can follow links in HTML pages and create local versions of remote
web sites, fully recreating the directory structure of the original
site.  This is sometimes referred to as "recursive downloading."
...
USA.
Additional permission under GNU GPL version 3 section 7
If you modify this program, or any covered work, by linking or
combining it with the OpenSSL project's OpenSSL library (or a
modified version of that library), containing parts covered by the
terms of the OpenSSL or SSLeay licenses, the Free Software Foundation
grants you additional permission to convey the resulting work.
Corresponding Source for a non-source form of such a combination
shall include the source code for the parts of OpenSSL used as well
as that of the covered work.
08:50:38
#cat wget.txt | grep -E ':$'

08:51:17
#cat wget.txt | grep -E '^$'

08:51:26
#cat wget.txt | grep -E '^$' | wc -l
20
08:51:36
#cat wget.txt | grep -E '\.$' | wc -l
21
08:51:56
#cat wget.txt | grep -E '\.$'
retrieval through HTTP proxies.
downloaded HTML files to the local files for offline viewing.
hierarchy of directories and files.
newer files.
download from where it left off.
for socks.
site settings.
Autoconf, it is easily built on and ported to new Unix-like systems.
The installation procedure is described in the INSTALL file.
resides at <ftp://ftp.gnu.org/pub/gnu/wget/>.
Please report bugs in Wget to <bug-wget@gnu.org>.
See the file `MAILING-LIST' for information about Wget mailing lists.
Wget's home page is at <http://www.gnu.org/software/wget/>.
http://wget.addictivecode.org/PatchGuidelines.
for a detailed listing of all contributions.
2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
(at your option) any later version.
GNU General Public License for more details.
USA.
grants you additional permission to convey the resulting work.
as that of the covered work.
08:52:00
#cat wget.txt | grep -E '^[]'
grep: Непарная [ или [^
08:52:38
#cat wget.txt | grep -E '^[a-l]'
downloaded HTML files to the local files for offline viewing.
hierarchy of directories and files.
changed on the server since the previous run, and only download the
connections; if a download fails due to a network problem, it will
keep retrying until the whole file has been retrieved.  If the server
download from where it left off.
gateway, you can get the socks library and compile wget with support
for socks.
install a global startup file (/usr/local/etc/wgetrc by default) for
it does work with, such as OpenSSL, is optional.  As Wget uses the GNU
http://wget.addictivecode.org/PatchGuidelines.
for a detailed listing of all contributions.
it under the terms of the GNU General Public License as published by
but WITHOUT ANY WARRANTY; without even the implied warranty of
along with this program; if not, write to the Free Software
combining it with the OpenSSL project's OpenSSL library (or a
grants you additional permission to convey the resulting work.
as that of the covered work.
08:52:51
#cat wget.txt | grep -E '[a-l]$'
It can follow links in HTML pages and create local versions of remote
web sites, fully recreating the directory structure of the original
While doing that, Wget respects the Robot Exclusion Standard
Recursive downloading also works with FTP, where Wget can retrieves a
changed on the server since the previous run, and only download the
Wget has been designed for robustness over slow or unstable network
connections; if a download fails due to a network problem, it will
supports regetting, it will instruct the server to continue the
If you are behind a firewall that requires the use of a socks style
Most of the features are configurable, either through command-line
Wget works under almost all Unix variants in use today and, unlike
requiring no additional software, such as Perl.  The external software
If you would like to contribute code for Wget, please read
Wget was originally written and mainained by Hrvoje Niksic.  Please see
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
combining it with the OpenSSL project's OpenSSL library (or a
modified version of that library), containing parts covered by the
shall include the source code for the parts of OpenSSL used as well
08:53:04
#cat wget.txt | grep -E '^a-l]$'

08:53:11
#cat wget.txt | grep -E '^[a-l]$'

08:53:17
#cat wget.txt | grep -E '^[a-lp]'
downloaded HTML files to the local files for offline viewing.
hierarchy of directories and files.
changed on the server since the previous run, and only download the
connections; if a download fails due to a network problem, it will
keep retrying until the whole file has been retrieved.  If the server
download from where it left off.
gateway, you can get the socks library and compile wget with support
for socks.
install a global startup file (/usr/local/etc/wgetrc by default) for
it does work with, such as OpenSSL, is optional.  As Wget uses the GNU
http://wget.addictivecode.org/PatchGuidelines.
for a detailed listing of all contributions.
it under the terms of the GNU General Public License as published by
but WITHOUT ANY WARRANTY; without even the implied warranty of
along with this program; if not, write to the Free Software
combining it with the OpenSSL project's OpenSSL library (or a
grants you additional permission to convey the resulting work.
as that of the covered work.
08:53:35
#cat wget.txt | grep -E '^[a-zA-Z]'
GNU Wget
GNU Wget is a free utility for non-interactive download of files from
the Web.  It supports HTTP, HTTPS, and FTP protocols, as well as
retrieval through HTTP proxies.
It can follow links in HTML pages and create local versions of remote
web sites, fully recreating the directory structure of the original
site.  This is sometimes referred to as "recursive downloading."
While doing that, Wget respects the Robot Exclusion Standard
downloaded HTML files to the local files for offline viewing.
Recursive downloading also works with FTP, where Wget can retrieves a
...
USA.
Additional permission under GNU GPL version 3 section 7
If you modify this program, or any covered work, by linking or
combining it with the OpenSSL project's OpenSSL library (or a
modified version of that library), containing parts covered by the
terms of the OpenSSL or SSLeay licenses, the Free Software Foundation
grants you additional permission to convey the resulting work.
Corresponding Source for a non-source form of such a combination
shall include the source code for the parts of OpenSSL used as well
as that of the covered work.
08:54:24
#cat wget.txt | grep -E '^[[:alpha:]]'
GNU Wget
GNU Wget is a free utility for non-interactive download of files from
the Web.  It supports HTTP, HTTPS, and FTP protocols, as well as
retrieval through HTTP proxies.
It can follow links in HTML pages and create local versions of remote
web sites, fully recreating the directory structure of the original
site.  This is sometimes referred to as "recursive downloading."
While doing that, Wget respects the Robot Exclusion Standard
downloaded HTML files to the local files for offline viewing.
Recursive downloading also works with FTP, where Wget can retrieves a
...
USA.
Additional permission under GNU GPL version 3 section 7
If you modify this program, or any covered work, by linking or
combining it with the OpenSSL project's OpenSSL library (or a
modified version of that library), containing parts covered by the
terms of the OpenSSL or SSLeay licenses, the Free Software Foundation
grants you additional permission to convey the resulting work.
Corresponding Source for a non-source form of such a combination
shall include the source code for the parts of OpenSSL used as well
as that of the covered work.
08:55:10
#cat wget.txt | grep -E '^([[:alpha:Ñ]]|$)'
GNU Wget
GNU Wget is a free utility for non-interactive download of files from
the Web.  It supports HTTP, HTTPS, and FTP protocols, as well as
retrieval through HTTP proxies.
It can follow links in HTML pages and create local versions of remote
web sites, fully recreating the directory structure of the original
site.  This is sometimes referred to as "recursive downloading."
While doing that, Wget respects the Robot Exclusion Standard
downloaded HTML files to the local files for offline viewing.
Recursive downloading also works with FTP, where Wget can retrieves a
...
USA.
Additional permission under GNU GPL version 3 section 7
If you modify this program, or any covered work, by linking or
combining it with the OpenSSL project's OpenSSL library (or a
modified version of that library), containing parts covered by the
terms of the OpenSSL or SSLeay licenses, the Free Software Foundation
grants you additional permission to convey the resulting work.
Corresponding Source for a non-source form of such a combination
shall include the source code for the parts of OpenSSL used as well
as that of the covered work.
08:59:13
#cat wget.txt | grep -E 'OpenS*'
it does work with, such as OpenSSL, is optional.  As Wget uses the GNU
combining it with the OpenSSL project's OpenSSL library (or a
terms of the OpenSSL or SSLeay licenses, the Free Software Foundation
shall include the source code for the parts of OpenSSL used as well
09:00:38
#cat wget.txt | grep -E 'OpenS'
it does work with, such as OpenSSL, is optional.  As Wget uses the GNU
combining it with the OpenSSL project's OpenSSL library (or a
terms of the OpenSSL or SSLeay licenses, the Free Software Foundation
shall include the source code for the parts of OpenSSL used as well
09:01:55
#find -path '.vimrc'

09:02:01
#find -path 'vimrc'

09:04:23
#vim wget.txt
--- /tmp/l3-saved-12750.24357.7834	2014-10-22 10:06:56.673047864 +0300
+++ wget.txt	2014-10-22 10:08:19.885049688 +0300
@@ -14,6 +14,8 @@
 (/robots.txt).  Wget can be instructed to convert the links in
 downloaded HTML files to the local files for offline viewing.
 
+HTML	Pages
+
 Recursive downloading also works with FTP, where Wget can retrieves a
 hierarchy of directories and files.
 
09:08:59
#cat wget.txt | grep -E 'HTML\ ?pages'
It can follow links in HTML pages and create local versions of remote
09:09:02
#cat wget.txt | grep -E 'HTML\ ?.ages'
It can follow links in HTML pages and create local versions of remote
09:09:10
#cat wget.txt | grep -E 'HTML\ ?.ages'
It can follow links in HTML pages and create local versions of remote
09:10:52
#cat wget.txt | grep -E 'HTML[[:space:]]*[pP]ages'
It can follow links in HTML pages and create local versions of remote
HTML    Pages
09:11:42
#cat wget.txt | grep -E 'HTML (афмщкшеfavorite )?pages'
It can follow links in HTML pages and create local versions of remote
09:15:32
#vi words
--- /dev/null	2014-10-17 18:43:16.803999996 +0300
+++ words	2014-10-22 10:17:55.713055337 +0300
@@ -0,0 +1,7 @@
+house
+rotor
+motor
+village
+lemon
+apple
+class
09:17:55
#grep -E '(.)(.).\2\1$' words
rotor
09:22:20
#grep -E '^([[:alpha:]]+):.+\1$' /etc/passwd
sync:x:4:65534:sync:/bin:/bin/sync
09:24:58
#grep -Ev 'sh$'
^[[A^C
09:27:23
#grep -Ev 'sh$' /etc/passwd
sync:x:4:65534:sync:/bin:/bin/sync
Debian-exim:x:101:103::/var/spool/exim4:/bin/false
sshd:x:102:65534::/var/run/sshd:/usr/sbin/nologin
09:27:28
#мшь шз
l3script: $'\320\274\321\210\321\214': команда не найдена
09:36:30
#vi.ip
l3script: vi.ip: команда не найдена
09:36:36
#vim ip
--- /dev/null	2014-10-17 18:43:16.803999996 +0300
+++ ip	2014-10-22 10:38:12.893049657 +0300
@@ -0,0 +1,11 @@
+3.4.5.7
+12435 43242 234532 4235243
+555.666.435.3534.43
+125.5.34234.334
+192.168.5.4
+172.165.3.7
+TExt
+My IP
+0.0.0.500
+1.2.3.7
+
09:38:12
#пкÑgrep -E '(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]])\.)
> ^C
09:40:42
#grep -E '(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]])\.) IP
> ^C
09:40:49
#grep -E '(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]]) (\){4}' IP
grep: Непарная ( или \(
09:42:01
#grep -E '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]]) (\){4}' IP
grep: Непарная ( или \(
09:42:17
#grep -E '(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]]) (\.|$)){4}' IP
grep: IP: Нет такого файла или каталога
09:42:54
#ls
1.txt  3.txt   d1  f6  install  letter   proj         test      wget.txt
2.txt  backup  d2  f7  ip       newfile  student_con  unsorted  words
09:43:00
#grep -E '(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]]) (\.|$)){4}' ip

09:43:16
#vim ip
--- /tmp/l3-saved-12750.30048.1722	2014-10-22 10:43:28.629051619 +0300
+++ ip	2014-10-22 10:44:13.805049120 +0300
@@ -8,4 +8,5 @@
 My IP
 0.0.0.500
 1.2.3.7
-
+172.16.8.8
+44.66.55.33
09:44:13
#grep -E '(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]]) (\.|$)){4}' ip

09:45:07
#grep -E '(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]) (\.|$)){4}' ip

09:45:20
#grep -E '(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\.|$)){4}' ip
3.4.5.7
192.168.5.4
172.165.3.7
1.2.3.7
172.16.8.8
44.66.55.33
09:46:14
#grep -rE '(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\.|$)){4}' /etc
/etc/exim4/conf.d/router/200_exim4-config_primary:                      255.255.255.255
/etc/exim4/exim4.conf.template:                 255.255.255.255
/etc/dhcp/dhclient-exit-hooks.d/rfc3442-classless-routes:#   192.168.10.0/24 via 192.168.1.1
/etc/dhcp/dhclient-exit-hooks.d/rfc3442-classless-routes:#   10.0.0.0/8 via 10.10.17.66.41
/etc/security/access.conf:#+ : root : 192.168.200.1 192.168.200.4 192.168.200.9
/etc/security/access.conf:#+ : root : 127.0.0.1
/etc/security/access.conf:#          The same is 192.168.201.0/24 or 192.168.201.0/255.255.255.0
/etc/ssl/openssl.cnf:# testoid1=1.2.3.4
/etc/ssl/openssl.cnf:tsa_policy1 = 1.2.3.4.1
/etc/ssl/openssl.cnf:tsa_policy2 = 1.2.3.4.5.6
/etc/ssl/openssl.cnf:tsa_policy3 = 1.2.3.4.5.7
/etc/ssh/sshd_config:#ListenAddress 0.0.0.0
/etc/network/interfaces:      address 192.168.13.4
/etc/network/interfaces:      netmask 255.255.255.0
/etc/network/interfaces:      gateway 192.168.13.253
/etc/resolv.conf:nameserver 192.168.13.253
/etc/networks:default           0.0.0.0
/etc/networks:loopback  127.0.0.0
/etc/networks:link-local        169.254.0.0
09:51:57
#grep -rсÑУ(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\.|$)){4}' /etc
grep: неверный параметр «Ñ»
Использование: grep [ПАРАМЕТР]… ШАБÐФАЙÐ
rep --help» для получения более подробного описания.
09:52:06
#grep -сcrE '(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\.|$)){4}' /etc
/etc/exim4/passwd.client:0
/etc/exim4/conf.d/router/100_exim4-config_domain_literal:0
/etc/exim4/conf.d/router/850_exim4-config_lowuid:0
/etc/exim4/conf.d/router/150_exim4-config_hubbed_hosts:0
/etc/exim4/conf.d/router/200_exim4-config_primary:1
/etc/exim4/conf.d/router/300_exim4-config_real_local:0
/etc/exim4/conf.d/router/600_exim4-config_userforward:0
/etc/exim4/conf.d/router/800_exim4-config_maildrop:0
/etc/exim4/conf.d/router/00_exim4-config_header:0
/etc/exim4/conf.d/router/700_exim4-config_procmail:0
...
/etc/console-setup/compose.GEORGIAN-ACADEMY.inc:0
/etc/console-setup/compose.ISO-8859-8.inc:0
/etc/console-setup/compose.CP1251.inc:0
/etc/console-setup/compose.ISO-8859-3.inc:0
/etc/console-setup/compose.VISCII.inc:0
/etc/console-setup/cached_UTF-8_del.kmap.gz:0
/etc/console-setup/compose.ISO-8859-11.inc:0
/etc/trafshow:0
/etc/rc3.d/README:0
/etc/ucf.conf:0
09:52:17
#grep -crE '(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\.|$)){4}' /etc | grep -E '[^0]$'
/etc/exim4/conf.d/router/200_exim4-config_primary:1
/etc/exim4/exim4.conf.template:1
/etc/dhcp/dhclient-exit-hooks.d/rfc3442-classless-routes:2
/etc/security/access.conf:3
/etc/ssl/openssl.cnf:4
/etc/ssh/sshd_config:1
/etc/network/interfaces:3
/etc/resolv.conf:1
/etc/networks:3
09:53:41
#сфcat wget.txt | ек хЖРtr [:lower:] [:upper:]
                                                          -*- TEXT -*-
GNU WGET
========
                  CURRENT WEB HOME: HTTP://WWW.GNU.ORG/SOFTWARE/WGET/
GNU WGET IS A FREE UTILITY FOR NON-INTERACTIVE DOWNLOAD OF FILES FROM
THE WEB.  IT SUPPORTS HTTP, HTTPS, AND FTP PROTOCOLS, AS WELL AS
RETRIEVAL THROUGH HTTP PROXIES.
IT CAN FOLLOW LINKS IN HTML PAGES AND CREATE LOCAL VERSIONS OF REMOTE
WEB SITES, FULLY RECREATING THE DIRECTORY STRUCTURE OF THE ORIGINAL
SITE.  THIS IS SOMETIMES REFERRED TO AS "RECURSIVE DOWNLOADING."
...
USA.
ADDITIONAL PERMISSION UNDER GNU GPL VERSION 3 SECTION 7
IF YOU MODIFY THIS PROGRAM, OR ANY COVERED WORK, BY LINKING OR
COMBINING IT WITH THE OPENSSL PROJECT'S OPENSSL LIBRARY (OR A
MODIFIED VERSION OF THAT LIBRARY), CONTAINING PARTS COVERED BY THE
TERMS OF THE OPENSSL OR SSLEAY LICENSES, THE FREE SOFTWARE FOUNDATION
GRANTS YOU ADDITIONAL PERMISSION TO CONVEY THE RESULTING WORK.
CORRESPONDING SOURCE FOR A NON-SOURCE FORM OF SUCH A COMBINATION
SHALL INCLUDE THE SOURCE CODE FOR THE PARTS OF OPENSSL USED AS WELL
AS THAT OF THE COVERED WORK.
09:58:49
#cat wget.txt | tr [:abc:] [:upper:]
tr: неверный класс символов «abc»
09:59:25
#cat wget.txt | tr [:abc:] [:ABC:]
tr: неверный класс символов «abc»
09:59:33
#cat wget.txt | tr [abc] [ABC]
                                                          -*- text -*-
GNU Wget
========
                  Current WeB home: http://www.gnu.org/softwAre/wget/
GNU Wget is A free utility for non-interACtive downloAd of files from
the WeB.  It supports HTTP, HTTPS, And FTP protoCols, As well As
retrievAl through HTTP proxies.
It CAn follow links in HTML pAges And CreAte loCAl versions of remote
weB sites, fully reCreAting the direCtory struCture of the originAl
site.  This is sometimes referred to As "reCursive downloAding."
...
USA.
AdditionAl permission under GNU GPL version 3 seCtion 7
If you modify this progrAm, or Any Covered work, By linking or
ComBining it with the OpenSSL projeCt's OpenSSL liBrAry (or A
modified version of thAt liBrAry), ContAining pArts Covered By the
terms of the OpenSSL or SSLeAy liCenses, the Free SoftwAre FoundAtion
grAnts you AdditionAl permission to Convey the resulting work.
Corresponding SourCe for A non-sourCe form of suCh A ComBinAtion
shAll inClude the sourCe Code for the pArts of OpenSSL used As well
As thAt of the Covered work.
09:59:46
#cat wget.txt | tr -d [:punct:]
                                                           text
GNU Wget
                  Current Web home httpwwwgnuorgsoftwarewget
GNU Wget is a free utility for noninteractive download of files from
the Web  It supports HTTP HTTPS and FTP protocols as well as
retrieval through HTTP proxies
It can follow links in HTML pages and create local versions of remote
web sites fully recreating the directory structure of the original
site  This is sometimes referred to as recursive downloading
While doing that Wget respects the Robot Exclusion Standard
...
USA
Additional permission under GNU GPL version 3 section 7
If you modify this program or any covered work by linking or
combining it with the OpenSSL projects OpenSSL library or a
modified version of that library containing parts covered by the
terms of the OpenSSL or SSLeay licenses the Free Software Foundation
grants you additional permission to convey the resulting work
Corresponding Source for a nonsource form of such a combination
shall include the source code for the parts of OpenSSL used as well
as that of the covered work
10:00:57
#cat wget.txt | tr -d [:alpha:]
                                                          -*-  -*-
========
                    : ://..///
       -
 .    , ,   ,
   .
 ,
.        " ."
  ,
(/.).
...
, ., 51  ,  , ,  02110-1301
.
      3  7
    ,    ,
     '   (
    ),
      ,
        .
    -
     .
10:01:15
#cat wget.txt | tr [:punct:][:space:]
tr: пропущен операнд после «[:punct:][:space:]»
При преобразовании необходимо задать две строки.
Попробуйте «tr --help» для получения более подробного описания.
10:02:36
#cat wget.txt | tr [:punct:] [:space:]
tr: при преобразовании, в ТАБÐ
классы upper и lower
10:02:42
#cat wget.txt | tr -cd :

10:03:05
#cat etc/passwd | tr -cd :
cat: etc/passwd: Нет такого файла или каталога
10:03:32
#cat /etc/passwd | tr -cd : | wc -c
138
10:03:39
#cat wget.txt | tr -d [:punct:][:digit:]
                                                           text
GNU Wget
                  Current Web home httpwwwgnuorgsoftwarewget
GNU Wget is a free utility for noninteractive download of files from
the Web  It supports HTTP HTTPS and FTP protocols as well as
retrieval through HTTP proxies
It can follow links in HTML pages and create local versions of remote
web sites fully recreating the directory structure of the original
site  This is sometimes referred to as recursive downloading
While doing that Wget respects the Robot Exclusion Standard
...
USA
Additional permission under GNU GPL version  section
If you modify this program or any covered work by linking or
combining it with the OpenSSL projects OpenSSL library or a
modified version of that library containing parts covered by the
terms of the OpenSSL or SSLeay licenses the Free Software Foundation
grants you additional permission to convey the resulting work
Corresponding Source for a nonsource form of such a combination
shall include the source code for the parts of OpenSSL used as well
as that of the covered work
10:05:52
#cat wget.txt | tr -d [:punct:][:digit:] | tr [:upper:][:lower:]
tr: пропущен операнд после «[:upper:][:lower:]»
При преобразовании необходимо задать две строки.
Попробуйте «tr --help» для получения более подробного описания.
10:06:35
#cat wget.txt | tr -d [:punct:][:digit:] | tr [:upper:] [:lower:]
                                                           text
gnu wget
                  current web home httpwwwgnuorgsoftwarewget
gnu wget is a free utility for noninteractive download of files from
the web  it supports http https and ftp protocols as well as
retrieval through http proxies
it can follow links in html pages and create local versions of remote
web sites fully recreating the directory structure of the original
site  this is sometimes referred to as recursive downloading
while doing that wget respects the robot exclusion standard
...
usa
additional permission under gnu gpl version  section
if you modify this program or any covered work by linking or
combining it with the openssl projects openssl library or a
modified version of that library containing parts covered by the
terms of the openssl or ssleay licenses the free software foundation
grants you additional permission to convey the resulting work
corresponding source for a nonsource form of such a combination
shall include the source code for the parts of openssl used as well
as that of the covered work
10:06:41
#cat wget.txt | tr -d [:punct:][:digit:] | tr [:upper:] [:lower:] | tr " " "\n"
text
gnu
wget
current
web
home
httpwwwgnuorgsoftwarewget
gnu
wget
is
...
openssl
used
as
well
as
that
of
the
covered
work
10:08:15
#cat wget.txt | tr -d [:punct:][:digit:] | tr [:upper:] [:lower:] | tr " " "\n" | egrep -v '^$'
text
gnu
wget
current
web
home
httpwwwgnuorgsoftwarewget
gnu
wget
is
...
openssl
used
as
well
as
that
of
the
covered
work
10:08:58
#cat wget.txt | tr -d [:punct:][:digit:] | tr [:upper:] [:lower:] | tr " " "\n" | egrep -v '^$' | sort
a
a
a
a
a
a
a
a
a
a
...
written
you
you
you
you
you
you
you
you
your
10:10:53
#фÑawk --help
awk: not an option: --help
прошло 28 минут
10:39:30
#man awk
10:41:58
#cat /etc/passwd | awk -F: '$3>=1000' ?? ;3!=65534
awk: read error (Is a directory)
l3script: 3!=65534: команда не найдена
10:42:56
#cat /etc/passwd | awk -F: '$3>=1000 && $3!=65534'
user:x:1000:1000:user,,,:/home/user:/bin/bash
student:x:1001:1001::/home/student:/bin/bash
10:44:13
#cat /etc/passwd | awk -F: '$3>=1000 && $3!=65534{print $1}'
user
student
10:44:27
#sed 's/:/ /g' /etc/passwd | cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/bin/sh
bin:x:2:2:bin:/bin:/bin/sh
sys:x:3:3:sys:/dev:/bin/sh
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/bin/sh
man:x:6:12:man:/var/cache/man:/bin/sh
lp:x:7:7:lp:/var/spool/lpd:/bin/sh
mail:x:8:8:mail:/var/mail:/bin/sh
news:x:9:9:news:/var/spool/news:/bin/sh
...
backup:x:34:34:backup:/var/backups:/bin/sh
list:x:38:38:Mailing List Manager:/var/list:/bin/sh
irc:x:39:39:ircd:/var/run/ircd:/bin/sh
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
libuuid:x:100:101::/var/lib/libuuid:/bin/sh
Debian-exim:x:101:103::/var/spool/exim4:/bin/false
user:x:1000:1000:user,,,:/home/user:/bin/bash
sshd:x:102:65534::/var/run/sshd:/usr/sbin/nologin
student:x:1001:1001::/home/student:/bin/bash
10:47:46
#cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/bin/sh
bin:x:2:2:bin:/bin:/bin/sh
sys:x:3:3:sys:/dev:/bin/sh
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/bin/sh
man:x:6:12:man:/var/cache/man:/bin/sh
lp:x:7:7:lp:/var/spool/lpd:/bin/sh
mail:x:8:8:mail:/var/mail:/bin/sh
news:x:9:9:news:/var/spool/news:/bin/sh
...
backup:x:34:34:backup:/var/backups:/bin/sh
list:x:38:38:Mailing List Manager:/var/list:/bin/sh
irc:x:39:39:ircd:/var/run/ircd:/bin/sh
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
libuuid:x:100:101::/var/lib/libuuid:/bin/sh
Debian-exim:x:101:103::/var/spool/exim4:/bin/false
user:x:1000:1000:user,,,:/home/user:/bin/bash
sshd:x:102:65534::/var/run/sshd:/usr/sbin/nologin
student:x:1001:1001::/home/student:/bin/bash
10:48:16
#sed 's/:/ /g' /etc/passwd
root x 0 0 root /root /bin/bash
daemon x 1 1 daemon /usr/sbin /bin/sh
bin x 2 2 bin /bin /bin/sh
sys x 3 3 sys /dev /bin/sh
sync x 4 65534 sync /bin /bin/sync
games x 5 60 games /usr/games /bin/sh
man x 6 12 man /var/cache/man /bin/sh
lp x 7 7 lp /var/spool/lpd /bin/sh
mail x 8 8 mail /var/mail /bin/sh
news x 9 9 news /var/spool/news /bin/sh
...
backup x 34 34 backup /var/backups /bin/sh
list x 38 38 Mailing List Manager /var/list /bin/sh
irc x 39 39 ircd /var/run/ircd /bin/sh
gnats x 41 41 Gnats Bug-Reporting System (admin) /var/lib/gnats /bin/sh
nobody x 65534 65534 nobody /nonexistent /bin/sh
libuuid x 100 101  /var/lib/libuuid /bin/sh
Debian-exim x 101 103  /var/spool/exim4 /bin/false
user x 1000 1000 user,,, /home/user /bin/bash
sshd x 102 65534  /var/run/sshd /usr/sbin/nologin
student x 1001 1001  /home/student /bin/bash

Файлы

  • /etc/passwd
  • 2.txt
  • letter
  • newfile
  • /etc/passwd
    >
    root:x:0:0:root:/root:/bin/bash
    daemon:x:1:1:daemon:/usr/sbin:/bin/sh
    bin:x:2:2:bin:/bin:/bin/sh
    sys:x:3:3:sys:/dev:/bin/sh
    sync:x:4:65534:sync:/bin:/bin/sync
    games:x:5:60:games:/usr/games:/bin/sh
    man:x:6:12:man:/var/cache/man:/bin/sh
    lp:x:7:7:lp:/var/spool/lpd:/bin/sh
    mail:x:8:8:mail:/var/mail:/bin/sh
    news:x:9:9:news:/var/spool/news:/bin/sh
    uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
    proxy:x:13:13:proxy:/bin:/bin/sh
    www-data:x:33:33:www-data:/var/www:/bin/sh
    backup:x:34:34:backup:/var/backups:/bin/sh
    list:x:38:38:Mailing List Manager:/var/list:/bin/sh
    irc:x:39:39:ircd:/var/run/ircd:/bin/sh
    gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
    nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
    libuuid:x:100:101::/var/lib/libuuid:/bin/sh
    Debian-exim:x:101:103::/var/spool/exim4:/bin/false
    user:x:1000:1000:user,,,:/home/user:/bin/bash
    sshd:x:102:65534::/var/run/sshd:/usr/sbin/nologin
    student:x:1001:1001::/home/student:/bin/bash
    
    2.txt
    >
    Втр Окт 21 17:10:08 EEST 2014
    
    letter
    >
    Пнд Окт 20 11:53:38 EEST 2014
    /root
    Пнд Окт 20 11:53:38 EEST 2014
    /root
    Пнд Окт 20 11:53:38 EEST 2014
    /root
    
    newfile
    >

    Статистика

    Время первой команды журнала15:50:39 2014-10-21
    Время последней команды журнала10:48:16 2014-10-22
    Количество командных строк в журнале101
    Процент команд с ненулевым кодом завершения, %27.72
    Процент синтаксически неверно набранных команд, % 4.95
    Суммарное время работы с терминалом *, час 2.91
    Количество командных строк в единицу времени, команда/мин 0.58
    Частота использования команд
    cat52|======================| 22.51%
    grep42|==================| 18.18%
    tr16|======| 6.93%
    1[0-9]{2}13|=====| 5.63%
    [1-9][0-9]13|=====| 5.63%
    2[0-4][0-9]13|=====| 5.63%
    $)){4}'9|===| 3.90%
    $(expr8|===| 3.46%
    25[0-5])(\.5|==| 2.16%
    25[0-5]])5|==| 2.16%
    awk3|=| 1.30%
    wc3|=| 1.30%
    vim3|=| 1.30%
    egrep2|| 0.87%
    &2|| 0.87%
    sort2|| 0.87%
    25[0-5]])\.)2|| 0.87%
    cd2|| 0.87%
    echo2|| 0.87%
    sed2|| 0.87%
    find2|| 0.87%
    ls2|| 0.87%
    =10002|| 0.87%
    Частота использования этих команд < 0.5%2.txt1 , unsorted1 , man1 , $3!=65534{print1 , фÑawk1 , сфе1 , сфcat1 , =1000'1 , пкÑgrep1 , 25[0-5])1 , $3!=65534'1 , vi.ip1 , пкcat1 , >1 , letter1 , newfile1 , 3!=655341 , B=21 , ек1 , vi1 , less1 , $)'1 , /etc/passwd1 , мшь1 , date1 , A=11
    ____
    *) Интервалы неактивности длительностью 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$