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

Содержание

Журнал

Понедельник (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