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

Содержание

Журнал

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

/dev/pts/0
18:27:15
#echo $1

18:27:26
#echo $2

18:27:28
#cd tmp
l3script: cd: tmp: No such file or directory
18:27:58
#cd tmp
l3script: cd: tmp: No such file or directory
18:28:13
#touch file

18:28:25
#ln file file2

18:28:58
#ls
file  file2
18:29:00
#ls -l
total 0
-rw-r--r-- 2 root root 0 Jun 19 16:28 file
-rw-r--r-- 2 root root 0 Jun 19 16:28 file2
18:29:04
#ls -li
total 0
23556 -rw-r--r-- 2 root root 0 Jun 19 16:28 file
23556 -rw-r--r-- 2 root root 0 Jun 19 16:28 file2
18:29:06
#ln -s file file3

18:29:26
#ls -l
total 0
-rw-r--r-- 2 root root 0 Jun 19 16:28 file
-rw-r--r-- 2 root root 0 Jun 19 16:28 file2
lrwxrwxrwx 1 root root 4 Jun 19 16:29 file3 -> file
18:29:31
#ls -li
total 0
23556 -rw-r--r-- 2 root root 0 Jun 19 16:28 file
23556 -rw-r--r-- 2 root root 0 Jun 19 16:28 file2
23660 lrwxrwxrwx 1 root root 4 Jun 19 16:29 file3 -> file
18:29:35
#echo file > file

18:30:12
#cat file
file
18:30:19
#cat file2
file
18:30:22
#cat file4
cat: file4: No such file or directory
18:30:25
#cat file3
file
18:30:27
#touch new

18:30:41
#ln -s new sym_ne

18:30:58
#echo new > new

18:31:09
#echo new > sym_ne

18:31:16
#echo new0 > sym_ne

18:31:26
#cat new
new0
18:31:30
#ls -li
total 12
23556 -rw-r--r-- 2 root root 5 Jun 19 16:30 file
23556 -rw-r--r-- 2 root root 5 Jun 19 16:30 file2
23660 lrwxrwxrwx 1 root root 4 Jun 19 16:29 file3 -> file
24128 -rw-r--r-- 1 root root 5 Jun 19 16:31 new
24140 lrwxrwxrwx 1 root root 3 Jun 19 16:30 sym_ne -> new
18:31:47
#bdf
l3script: bdf: command not found
18:32:08
#apt-get install bdf
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package bdf
18:32:27
#ls -lh
total 12K
-rw-r--r-- 2 root root 5 Jun 19 16:30 file
-rw-r--r-- 2 root root 5 Jun 19 16:30 file2
lrwxrwxrwx 1 root root 4 Jun 19 16:29 file3 -> file
-rw-r--r-- 1 root root 5 Jun 19 16:31 new
lrwxrwxrwx 1 root root 3 Jun 19 16:30 sym_ne -> new
18:32:43
#ls -li
total 12
23556 -rw-r--r-- 2 root root 5 Jun 19 16:30 file
23556 -rw-r--r-- 2 root root 5 Jun 19 16:30 file2
23660 lrwxrwxrwx 1 root root 4 Jun 19 16:29 file3 -> file
24128 -rw-r--r-- 1 root root 5 Jun 19 16:31 new
24140 lrwxrwxrwx 1 root root 3 Jun 19 16:30 sym_ne -> new
18:35:46
#ln /root/
.bash_history  .bashrc        .lilalo/       .ssh/          200[0-9]/      2012/          2014/          install
.bash_profile  .l3rc          .profile       .viminfo       2011/          2013/          2015/
18:35:46
#ln /root/2012/1\{0
1{01/ 1{02/ 1{03/ 1{04/ 1{05/
18:35:46
#ln /root/2012/1\{0
1{01/ 1{02/ 1{03/ 1{04/ 1{05/
18:35:46
#ln /root/2012/1\{02/ folder
ln: `/root/2012/1{02/': hard link not allowed for directory
18:37:48
#ls -ls
total 12
4 -rw-r--r-- 2 root root 5 Jun 19 16:30 file
4 -rw-r--r-- 2 root root 5 Jun 19 16:30 file2
0 lrwxrwxrwx 1 root root 4 Jun 19 16:29 file3 -> file
4 -rw-r--r-- 1 root root 5 Jun 19 16:31 new
0 lrwxrwxrwx 1 root root 3 Jun 19 16:30 sym_ne -> new
18:37:57
#ls -li
total 12
23556 -rw-r--r-- 2 root root 5 Jun 19 16:30 file
23556 -rw-r--r-- 2 root root 5 Jun 19 16:30 file2
23660 lrwxrwxrwx 1 root root 4 Jun 19 16:29 file3 -> file
24128 -rw-r--r-- 1 root root 5 Jun 19 16:31 new
24140 lrwxrwxrwx 1 root root 3 Jun 19 16:30 sym_ne -> new
18:38:07
#ln file /root/file3

18:38:27
#ls -li
total 12
23556 -rw-r--r-- 3 root root 5 Jun 19 16:30 file
23556 -rw-r--r-- 3 root root 5 Jun 19 16:30 file2
23660 lrwxrwxrwx 1 root root 4 Jun 19 16:29 file3 -> file
24128 -rw-r--r-- 1 root root 5 Jun 19 16:31 new
24140 lrwxrwxrwx 1 root root 3 Jun 19 16:30 sym_ne -> new
18:38:30
#rm file

18:38:46
#ls -l
total 8
-rw-r--r-- 2 root root 5 Jun 19 16:30 file2
lrwxrwxrwx 1 root root 4 Jun 19 16:29 file3 -> file
-rw-r--r-- 1 root root 5 Jun 19 16:31 new
lrwxrwxrwx 1 root root 3 Jun 19 16:30 sym_ne -> new
18:38:49
#cat file3
cat: file3: No such file or directory
18:39:11
#echo qwe > file3

18:39:28
#cat file3
qwe
18:39:31
#ls
file  file2  file3  new  sym_ne
18:39:33
#ls -l
total 12
-rw-r--r-- 1 root root 4 Jun 19 16:39 file
-rw-r--r-- 2 root root 5 Jun 19 16:30 file2
lrwxrwxrwx 1 root root 4 Jun 19 16:29 file3 -> file
-rw-r--r-- 1 root root 5 Jun 19 16:31 new
lrwxrwxrwx 1 root root 3 Jun 19 16:30 sym_ne -> new
18:39:35
#ln -s /root/2012/ dira

18:41:23
#ls -
ls: cannot access -: No such file or directory
18:41:26
#ls -l
total 12
lrwxrwxrwx 1 root root 11 Jun 19 16:41 dira -> /root/2012/
-rw-r--r-- 1 root root  4 Jun 19 16:39 file
-rw-r--r-- 2 root root  5 Jun 19 16:30 file2
lrwxrwxrwx 1 root root  4 Jun 19 16:29 file3 -> file
-rw-r--r-- 1 root root  5 Jun 19 16:31 new
lrwxrwxrwx 1 root root  3 Jun 19 16:30 sym_ne -> new
/dev/pts/1
18:51:16
#ssh root@192.168.7.10
root@debian0:~#
root@debian0:~# l3script

Четверг (06/21/12)

/dev/pts/0
18:06:31
#$LANG=C
l3script: ru_RU.UTF-8=C: команда не найдена
/dev/pts/2
18:07:40
#qwerwe
l3script: qwerwe: команда не найдена
/dev/pts/0
18:08:04
#LANG=C

18:08:12
#qwedqw
l3script: qwedqw: command not found
/dev/pts/2
18:08:17
#LANG=C

18:08:45
#vim .bashrc
--- /tmp/l3-saved-704.951.6456	2012-06-21 16:08:50.000000000 +0000
+++ .bashrc	2012-06-21 16:09:37.000000000 +0000
@@ -16,4 +16,7 @@
 # alias rm='rm -i'
 # alias cp='cp -i'
 # alias mv='mv -i'
+LANG=C
+
+
 [ $0 == l3script ] && . /root/.lilalo/l3bashrc && _l3_start
18:09:37
#ifconfig
eth0      Link encap:Ethernet  HWaddr 00:16:3e:0e:00:10
          inet addr:192.168.7.20  Bcast:192.168.7.255  Mask:255.255.255.0
          inet6 addr: fe80::216:3eff:fe0e:10/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:931 errors:0 dropped:0 overruns:0 frame:0
          TX packets:717 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:68932 (67.3 KiB)  TX bytes:122038 (119.1 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)
/dev/pts/0
18:10:43
#ls
200[0-9]  2011  2012  2013  2014  2015  file3  install
18:10:44
#rm -rf 20*

18:11:11
#ls
file3  install
18:11:19
#ls
file3  install
18:11:21
#ls -l
total 12
-rw-r--r-- 1 root root    5 Jun 19 16:30 file3
-rwxr-xr-x 1 root root 5342 Jun 11 18:50 install
18:11:24
#vim
18:15:21
#base
base64    basename
18:15:21
#base
base64    basename
18:15:21
#basename /usr/bin/bas
base64    basename  bashbug
18:15:21
#basename /usr/bin/bas
base64    basename  bashbug
18:15:21
#basename /usr/bin/bashbug
bashbug
18:15:54
#basename /bin/bash
bash
18:16:04
#man basename
18:16:19
#basename /home/user/
user
18:16:33
#wich cd
l3script: wich: command not found
/dev/pts/2
18:16:43
#ssh 192.168.7.10
root@192.168.7.10's password:
Linux debian0 2.6.32-5-xen-686 #1 SMP Wed Mar 9 01:27:54 UTC 2011 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.
Last login: Thu Jun 21 16:16:55 2012 from 192.168.7.254
l3-agent is already running: pid=583; pidfile=/root/.lilalo/l3-agent.pid
root@debian0:~#
...
There is no screen to be attached.
root@debian0:~# screen -x
There are several suitable screens on:
        800.pts-2.debian0       (21.06.2012 16:17:34)   (Attached)
        760.pts-8.debian0       (21.06.2012 16:17:26)   (Attached)
Type "screen [-d] -r [pid.]tty.host" to resume one of them.
root@debian0:~#
root@debian0:~# ^C
root@debian0:~# logout
Connection to 192.168.7.10 closed.
18:17:58
#ssh 192.168.7.10
root@debian0:~#
root@debian0:~#
root@debian0:~#
root@debian0:~#
root@debian0:~#
root@debian0:~#
root@debian0:~#
root@debian0:~#
root@debian0:~#
root@debian0:~#
root@debian0:~#
root@debian0:~#
root@debian0:~#
root@debian0:~#
root@debian0:~#
root@debian0:~# l3script
[root@debian0:~]#
--------------------------------------------------------------------------------------------------------------------------
/dev/pts/0
18:23:40
#which cd

18:23:48
#echo $0
l3script
18:31:58
#echo $1

18:32:04
#man fork
18:34:28
#mesg n

прошло 35 минут
19:10:05
#man mesgn
19:10:11
#man mesg
прошло 10 минут
19:20:24
#man jobs
19:20:29
#top &
[1] 1270
19:23:26
#top &
[2] 1278
[1]-  Stopped                 top
[2]+  Stopped                 top
19:23:29
#top &
[3] 1286
[3]+  Stopped                 top
19:23:31
#which jobs

19:24:15
#echo $H
$HISTCMD       $HISTFILE      $HISTFILESIZE  $HISTSIZE      $HOME          $HOSTNAME      $HOSTTYPE
19:24:15
#echo $HIST
$HISTCMD       $HISTFILE      $HISTFILESIZE  $HISTSIZE
19:24:15
#echo $HISTCMD
417
прошло 14 минут
19:38:15
#man history
19:38:30
#lasst
l3script: lasst: command not found
19:43:08
#last
root     pts/2        195.238.93.36    Thu Jun 21 17:04   still logged in
root     pts/2        195.238.93.36    Thu Jun 21 16:07 - 17:03  (00:56)
root     pts/0        195.238.93.36    Thu Jun 21 16:06   still logged in
reboot   system boot  2.6.32-5-xen-686 Thu Jun 21 10:41 - 17:43  (07:02)
root     pts/1        195.238.93.36    Tue Jun 19 16:00 - crash (1+18:40)
root     pts/0        195.238.93.36    Tue Jun 19 15:59 - crash (1+18:41)
reboot   system boot  2.6.32-5-xen-686 Tue Jun 19 11:06 - 17:43 (2+06:36)
root     pts/1        195.238.93.36    Thu Jun 14 16:07 - 18:04  (01:57)
root     pts/0        195.238.93.36    Thu Jun 14 16:03 - 18:04  (02:00)
reboot   system boot  2.6.32-5-xen-686 Thu Jun 14 11:12 - 17:43 (7+06:30)
...
root     pts/0        192.168.7.254    Mon Jun 11 14:00 - 14:01  (00:01)
root     hvc0                          Mon Jun 11 13:54 - 13:54  (00:00)
root     hvc0                          Mon Jun 11 13:54 - 13:54  (00:00)
root     pts/0        192.168.7.254    Mon Jun 11 12:59 - 12:59  (00:00)
root     hvc0                          Mon Jun 11 12:40 - 12:59  (00:18)
root     hvc0                          Mon Jun 11 12:40 - 12:40  (00:00)
reboot   system boot  2.6.32-5-xen-686 Mon Jun 11 12:39 - 16:40  (04:00)
reboot   system boot  2.6.32-5-xen-686 Mon Jun 11 12:36 - 12:37  (00:01)
reboot   system boot  2.6.18-5-xen-686 Mon Jun 11 12:26 - 12:27  (00:00)
wtmp begins Mon Jun 11 12:26:40 2012
19:43:11
#whatis last
last (1)             - show listing of last logged in users
19:43:29
#whereis last
last: /usr/bin/last /usr/share/man/man1/last.1.gz
19:43:36
#vim /usr/share/man/man1/last.1.gz
19:43:55
#.RI [ tty... ]
  8                                                                        @^@^E^@^@^@û A                                                                ^@^@@
    1h^@^@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