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

Содержание

Журнал

Понедельник (08/13/12)

/dev/pts/6
10:05:50
$./who1
                  1344693553
reboot   ~        1344693553
runlevel ~        1344693553
                  1344693683
LOGIN    tty6     1344693683
LOGIN    tty4     1344693683
LOGIN    tty2     1344693683
LOGIN    tty5     1344693683
LOGIN    tty3     1344693683
LOGIN    tty1     1344693683
ol14     tty7     1344826101 :0
ol14     pts/0    1344844891 :0.0
ol14     pts/2    1344827648 :0.0
ol14     pts/4    1344829989 :0.0
ol14     pts/6    1344830680 :0.0
ol14     pts/10   1344831878 :0.0
ol14     pts/12   1344831884 :0.0
ol14     pts/14   1344834060 :0.0
10:05:52
$cd ~/C/who2

10:08:51
$gcc -o who1 who1.c
who1.c: In function ‘show_info’:
who1.c:36: error: ‘utbofp’ undeclared (first use in this function)
who1.c:36: error: (Each undeclared identifier is reported only once
who1.c:36: error: for each function it appears in.)
10:15:40
$gcc -o who1 who1.c

10:16:03
$./who1
ol14     tty7     1344826101 :0
ol14     pts/0    1344844891 :0.0
ol14     pts/2    1344827648 :0.0
ol14     pts/4    1344829989 :0.0
ol14     pts/6    1344830680 :0.0
ol14     pts/10   1344831878 :0.0
ol14     pts/12   1344831884 :0.0
ol14     pts/14   1344834060 :0.0
10:16:07
$gcc -o who1 who1.c
who1.c:35: warning: conflicting types for ‘show_info’
who1.c:19: note: previous declaration of ‘show_info’ was here
/dev/pts/12
10:17:24
$man -k time |grep transform
asctime (3)          - transform date and time to broken-down time or ASCII
asctime_r (3)        - transform date and time to broken-down time or ASCII
ctime (3)            - transform date and time to broken-down time or ASCII
ctime_r (3)          - transform date and time to broken-down time or ASCII
gmtime (3)           - transform date and time to broken-down time or ASCII
gmtime_r (3)         - transform date and time to broken-down time or ASCII
localtime (3)        - transform date and time to broken-down time or ASCII
localtime_r (3)      - transform date and time to broken-down time or ASCII
mktime (3)           - transform date and time to broken-down time or ASCII
10:17:39
$man 3 ctime
прошло 10 минут
/dev/pts/6
10:28:19
$gcc -o who1 who1.c

10:28:40
$./who1
ol14     tty7     1344826101 :0
ol14     pts/0    1344844891 :0.0
ol14     pts/2    1344827648 :0.0
ol14     pts/4    1344829989 :0.0
ol14     pts/6    1344830680 :0.0
ol14     pts/10   1344831878 :0.0
ol14     pts/12   1344831884 :0.0
ol14     pts/14   1344834060 :0.0
10:28:49
$gcc -o who1 who1.c
who1.c: In function ‘showtime’:
who1.c:51: error: parameter name omitted
who1.c:54: error: ‘timeval’ undeclared (first use in this function)
who1.c:54: error: (Each undeclared identifier is reported only once
who1.c:54: error: for each function it appears in.)
10:35:07
$gcc -o who1 who1.c

10:35:46
$gcc -o who1 who1.c
who1.c: In function ‘show_info’:
who1.c:47: error: ‘upbufp’ undeclared (first use in this function)
who1.c:47: error: (Each undeclared identifier is reported only once
who1.c:47: error: for each function it appears in.)
10:37:52
$gcc -o who1 who1.c

10:38:15
$./who1
ol14     tty7     1344826101 :0
ol14     pts/0    1344844891 :0.0
ol14     pts/2    1344827648 :0.0
ol14     pts/4    1344829989 :0.0
ol14     pts/6    1344830680 :0.0
ol14     pts/10   1344831878 :0.0
ol14     pts/12   1344831884 :0.0
ol14     pts/14   1344834060 :0.0
10:38:18
$gcc -o who1 who1.c

10:39:58
$./who1
ol14     tty7     Aug 13 08:48:0
ol14     pts/0    Aug 13 14:01:0.0
ol14     pts/2    Aug 13 09:14:0.0
ol14     pts/4    Aug 13 09:53:0.0
ol14     pts/6    Aug 13 10:04:0.0
ol14     pts/10   Aug 13 10:24:0.0
ol14     pts/12   Aug 13 10:24:0.0
ol14     pts/14   Aug 13 11:01:0.0
10:40:00
$./who1
ol14     tty7     Aug 13 08:48:0
ol14     pts/0    Aug 13 14:01:0.0
ol14     pts/2    Aug 13 09:14:0.0
ol14     pts/4    Aug 13 09:53:0.0
ol14     pts/6    Aug 13 10:04:0.0
ol14     pts/10   Aug 13 10:24:0.0
ol14     pts/12   Aug 13 10:24:0.0
ol14     pts/14   Aug 13 11:01:0.0
root     pts/17   Aug 13 14:40:0.0
10:40:29
$cd ~/C/cp

10:48:53
$gcc -o cp1 cp.c

10:49:03
$./cp1

10:49:14
$./cp1

прошло 11 минут
11:00:18
$gcc -o cp1 cp.c
cp.c: In function ‘main’:
cp.c:15: warning: comparison between pointer and integer
11:00:20
$gcc -o cp1 cp.c

11:02:50
$gcc -o cp1 cp.c
cp.c: In function ‘main’:
cp.c:21: warning: assignment makes integer from pointer without a cast
11:05:30
$gcc -o cp1 cp.c

11:05:45
$gcc -o cp1 cp.c

11:07:02
$./cp1 www rrr
Ошибка сегментирования
11:07:10
$gcc -o cp1 cp.c

11:08:14
$./cp1 www rrr
Ошибка сегментирования
11:08:16
$./cp1 www
Ошибка сегментирования
11:08:21
$gcc -o cp1 cp.c

11:08:38
$./cp1 www rrr

11:08:40
$gcc -o cp1 cp.c

11:11:33
$./cp1 www rrr

11:11:34
$./cp1 www rrr

11:11:42
$gcc -o cp1 cp.c

11:12:00
$./cp1 www rrr

11:12:01
$gcc -o cp1 cp.c

11:16:38
$./cp1 www rrr

11:16:39
$./cp1 www rrr

11:17:33
$gcc -o cp1 cp.c
cp.c: In function ‘main’:
cp.c:17: error: array size missing in ‘copyfile’
cp.c:18: error: array size missing in ‘tocopyfile’
cp.c:21: error: incompatible types when assigning to type ‘char[1]’ from type ‘char’
cp.c:22: error: incompatible types when assigning to type ‘char[1]’ from type ‘char’
cp.c:24: error: ‘copyfile1’ undeclared (first use in this function)
cp.c:24: error: (Each undeclared identifier is reported only once
cp.c:24: error: for each function it appears in.)
11:17:34
$gcc -o cp1 cp.c
cp.c: In function ‘main’:
cp.c:17: error: array size missing in ‘copyfile’
cp.c:18: error: array size missing in ‘tocopyfile’
11:17:57
$gcc -o cp1 cp.c
cp.c: In function ‘main’:
cp.c:24: error: ‘copyfile1’ undeclared (first use in this function)
cp.c:24: error: (Each undeclared identifier is reported only once
cp.c:24: error: for each function it appears in.)
11:24:58
$./cp1 www rrr

11:25:08
$gcc -o cp1 cp.c

11:25:10
$./cp1 www rrr

11:25:11
$gcc -o cp1 cp.c

прошло 47 минут
/dev/pts/18
12:12:42
$ping sec
ping: unknown host sec
12:12:48
$ping 192.168.0.28
PING 192.168.0.28 (192.168.0.28) 56(84) bytes of data.
From 192.168.0.127 icmp_seq=9 Destination Host Unreachable
From 192.168.0.127 icmp_seq=10 Destination Host Unreachable
From 192.168.0.127 icmp_seq=11 Destination Host Unreachable
From 192.168.0.127 icmp_seq=12 Destination Host Unreachable
From 192.168.0.127 icmp_seq=13 Destination Host Unreachable
From 192.168.0.127 icmp_seq=14 Destination Host Unreachable
From 192.168.0.127 icmp_seq=15 Destination Host Unreachable
From 192.168.0.127 icmp_seq=16 Destination Host Unreachable
From 192.168.0.127 icmp_seq=17 Destination Host Unreachable
^Z
[1]+  Stopped                 ping 192.168.0.28

Вторник (08/14/12)

/dev/pts/6
05:29:34
$./cp1 www rrr
Ошибка сегментирования
05:29:35
$gcc -o cp1 cp.c

05:30:44
$./cp1 www rrr
Ошибка сегментирования
05:30:45
$gcc -o cp1 cp.c

05:30:59
$./cp1 www rrr

05:31:01
$gcc -o cp1 cp.c

05:32:47
$./cp1 www rrr

05:32:49
$gcc -o cp1 cp.c

05:33:34
$./cp1 www rrr

05:33:53
$gcc -o cp1 cp.c

05:35:26
$./cp1 www rrr

05:35:29
$./cp1

05:35:38
$ls
cp1  cp.c
05:35:39
$gcc -o cp1 cp.c

05:37:01
$./cp1

05:37:04
$./cp1 www rrr

05:38:17
$cd ~/C/K&R/Helloworld
[1] 18791
bash: cd: /home/ol14/C/K: Нет такого файла или каталога
bash: R/Helloworld: Нет такого файла или каталога
[1]+  Exit 1                  cd ~/C/K
05:45:10
$cd ~/C/

05:45:30
$ls
1.deb  C.zip  l1        more    more01.zip  RT-N13U.RB_9.2.5.4.trx  who2
cp     K&R    Makefile  more01  more02      who1
05:45:32
$cd ~/C/K&R/
[1] 18881
bash: R/: Нет такого файла или каталога
bash: cd: /home/ol14/C/K: Нет такого файла или каталога
[1]+  Exit 1                  cd ~/C/K
05:45:46
$cd ~/C/KandR/Helloworld

05:46:42
$ls
hello.c
05:46:46
$gcc -o hello hello.c
/usr/lib/gcc/i486-linux-gnu/4.4.5/../../../../lib/crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'
collect2: ld returned 1 exit status
05:47:06
$gcc -o hello hello.c

05:50:26
$./hello

05:50:35
$cd ~/C/KandR/Helloworld

05:51:30
$gcc -o hello hello.c

05:51:34
$./hello

05:51:3