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

Содержание

Журнал

Среда (10/17/12)

/dev/pts/0
11:36:59
$mycp
bash: mycp: команда не найдена
11:37:06
$./mycp
./mycp: пропущен операнд, задающий файл
Попробуйте `cp --help' для получения более подробного описания../mycp: пропущен операнд задающий целевой файл
11:37:10
$./mycp
./mycp: пропущен операнд, задающий файл
Попробуйте `cp --help' для получения более подробного описания../mycp: пропущен операнд задающий целевой файл
11:37:50
$./mycp
./mycp: пропущен операнд, задающий файл
11:39:35
$./mycp

11:39:59
$./mycp

11:40:23
$./mycp

11:40:26
$./mycp eee
./mycp: пропущен операнд задающий целевой файл
11:41:31
$./mycp eee
./mycp: пропущен операнд задающий целевой файл
11:42:39
$./mycp eee
./mycp: пропущен операнд задающий целевой файл
11:43:12
$./mycp eee
./mycp: пропущен операнд задающий целевой файл
11:43:18
$./mycp

11:44:11
$./mycp

11:44:14
$./mycp

11:45:33
$./mycp

11:45:34
$./mycp trt
./mycp: пропущен операнд задающий целевой файл
11:45:37
$./mycp trt

11:47:06
$./mycp

11:47:13
$man -k printf
11:49:08
$man 1 printf
11:49:40
$Top of buffer.
   Format of the format string
       The format string is a character string, beginning and ending in its initial shift state, if any.  The format string is composed of zero or more directives: ordinary  char‐
       acters  (not  %), which are copied unchanged to the output stream; and conversion specifications, each of which results in fetching zero or more subsequent arguments.  Each
       conversion specification is introduced by the character %, and ends with a conversion specifier.  In between there may be (in this order) zero or more  flags,  an  optional
       minimum field width, an optional precision and an optional length modifier.
       The arguments must correspond properly (after type promotion) with the conversion specifier.  By default, the arguments are used in the order given, where each '*' and each
       conversion specifier asks for the next argument (and it is an error if insufficiently many arguments are given).  One can also specify explicitly which argument  is  taken,
       at each place where an argument is required, by writing "%m$" instead of '%' and "*m$" instead of '*', where the decimal integer m denotes the position in the argument list
       of the desired argument, indexed starting from 1.  Thus,
           printf("%*d", width, num);
...
Reading...
       Many countries use the day-month-year order.  Hence, an internationalized version must be able to print the arguments in an order specified by the format:
           #include <stdio.h>
           fprintf(stdout, format,
                   weekday, month, day, hour, min);
       where format depends on locale, and may permute the arguments.  With the value:
           "%1$s, %3$d. %2$s, %4$d:%5$.2d\n"
       one might obtain "Sonntag, 3. Juli, 10:02".
       To allocate a sufficiently large string and print into it (code correct for both glibc 2.0 and glibc 2.1):
       #include <stdio.h>
11:51:51
$-- MOST: *stdin* (265,1) 91%
       printf, fprintf, sprintf, snprintf, vprintf, vfprintf, vsprintf, vsnprintf - formatted output conversion
NAME
       #include <stdio.h>
SYNOPSIS
       int printf(const char *format, ...);
       int fprintf(FILE *stream, const char *format, ...);
       int sprintf(char *str, const char *format, ...);
       int snprintf(char *str, size_t size, const char *format, ...);
       #include <stdarg.h>
       int vprintf(const char *format, va_list ap);
-- MOST: *stdin*                                                                                                                                                            (1,1) 0%
11:52:23
$Press `Q' to quit, `H' for help, and SPACE to scroll.

11:52:26
$./mycp

11:52:59
$./mycp

11:53:01
$./mycp rr

11:53:03
$./mycp rr

11:54:32
$ls
inputfile  mycp  mycp.c  mycp.o  ruscheckers  ruscheckers.c  ruscheckers.o
11:55:53
$./mycp

11:56:02
$ls -al
итого 48
drwx------ 2 ol14 ol14 4096 Окт 17 15:54 .
drwxr-xr-x 5 ol14 ol14 4096 Сен 24 10:58 ..
-rw-r--r-- 1 ol14 ol14   35 Окт 17 15:16 inputfile
-rwxr-xr-x 1 ol14 ol14 4496 Окт 17 15:54 mycp
-rw-r--r-- 1 ol14 ol14  148 Окт 17 15:54 mycp.c
-rw-r--r-- 1 ol14 ol14  840 Окт 17 15:54 mycp.o
-rwxr-xr-x 1 ol14 ol14 6152 Сен 21 14:29 ruscheckers
-rw-r--r-- 1 ol14 ol14 4359 Сен 21 14:28 ruscheckers.c
-rw-r--r-- 1 ol14 ol14 2492 Сен 21 14:29 ruscheckers.o

Четверг (10/18/12)

/dev/pts/0
06:07:34
$nslookup ya.ru
;; connection timed out; no servers could be reached
06:07:59
$ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
From 192.168.0.127 icmp_seq=1 Destination Host Unreachable
From 192.168.0.127 icmp_seq=2 Destination Host Unreachable
From 192.168.0.127 icmp_seq=3 Destination Host Unreachable
From 192.168.0.127 icmp_seq=4 Destination Host Unreachable
From 192.168.0.127 icmp_seq=5 Destination Host Unreachable
From 192.168.0.127 icmp_seq=6 Destination Host Unreachable
From 192.168.0.127 icmp_seq=7 Destination Host Unreachable
From 192.168.0.127 icmp_seq=8 Destination Host Unreachable
From 192.168.0.127 icmp_seq=9 Destination Host Unreachable
...
From 192.168.0.127 icmp_seq=80 Destination Host Unreachable
From 192.168.0.127 icmp_seq=81 Destination Host Unreachable
From 192.168.0.127 icmp_seq=82 Destination Host Unreachable
From 192.168.0.127 icmp_seq=83 Destination Host Unreachable
From 192.168.0.127 icmp_seq=84 Destination Host Unreachable
From 192.168.0.127 icmp_seq=85 Destination Host Unreachable
From 192.168.0.127 icmp_seq=86 Destination Host Unreachable
From 192.168.0.127 icmp_seq=87 Destination Host Unreachable
^Z
[1]+  Stopped                 ping 192.168.0.1
06:11:25
$ping ya.ru
ping: unknown host ya.ru
06:11:53
$ping ya.ru
^Z
[2]+  Stopped                 ping ya.ru
06:14:56
$ifconfig -a
bash: ifconfig: команда не найдена
06:15:13
$ipconfig -a
bash: ipconfig: команда не найдена
прошло >6 часов
/dev/pts/4
12:17:15
$cd progect/KiR
bash: cd: progect/KiR: Нет такого файла или каталога
12:17:28
$cd project/KiR

12:17:45
$ls
chapter1-9  chapter1-9.geany  checkers  checkers.geany  GTK1  GTK1.geany
12:17:47
$cd checkers

12:17:59
$ls
inputfile  mycp  mycp.c  mycp.o  ruscheckers  ruscheckers.c  ruscheckers.o
12:18:21
$cp
cp: пропущен операнд, задающий файл
Попробуйте `cp --help' для получения более подробного описания.
12:18:55
$./mycp

12:23:44
$./mycp

12:23:54