/l3/users/My-Debian-Work/adm.prombez/ol14 :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 :15 :16 :17 :18 :19 :20 :21 :22 :23 :24 |
|
$ping 192.168.0.31
PING 192.168.0.31 (192.168.0.31) 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=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 ^Z [1]+ Stopped ping 192.168.0.31 |
$ping 192.168.0.240
200 rdesktop -uol14 -p13r@7t -g1024x768 -a16 -k en-us.fixed 192.168.0.2 WARNING: No translation for (keysym 0xfe0a, ISO_Prev_Group) WARNING: No translation for (keysym 0x6fc, Cyrillic_E) WARNING: No translation for (keysym 0x6dc, Cyrillic_e) WARNING: No translation for (keysym 0x6cb, Cyrillic_ka) WARNING: No translation for (keysym 0x6cb, Cyrillic_ka) WARNING: No translation for (keysym 0x6cf, Cyrillic_o) WARNING: No translation for (keysym 0x6cf, Cyrillic_o) WARNING: No translation for (keysym 0x6c8, Cyrillic_ha) WARNING: No translation for (keysym 0x6c8, Cyrillic_ha) ... WARNING: No translation for (keysym 0x6cf, Cyrillic_o) WARNING: No translation for (keysym 0x6cf, Cyrillic_o) WARNING: No translation for (keysym 0x6cd, Cyrillic_em) WARNING: No translation for (keysym 0x6cd, Cyrillic_em) WARNING: No translation for (keysym 0x6fc, Cyrillic_E) WARNING: No translation for (keysym 0x6dc, Cyrillic_e) WARNING: No translation for (keysym 0x6f0, Cyrillic_PE) WARNING: No translation for (keysym 0x6f0, Cyrillic_PE) WARNING: No translation for (keysym 0x6e6, Cyrillic_EF) WARNING: No translation for (keysym 0x6e6, Cyrillic_EF) |
$ping 192.168.0.240
200 rdesktop -uol14 -p13r@7t -g1024x768 -a16 -k en-us.fixed 192.168.0.2 WARNING: No translation for (keysym 0xfe0a, ISO_Prev_Group) WARNING: No translation for (keysym 0x6e3, Cyrillic_TSE) WARNING: No translation for (keysym 0x6c3, Cyrillic_tse) WARNING: No translation for (keysym 0x6c5, Cyrillic_ie) WARNING: No translation for (keysym 0x6c5, Cyrillic_ie) WARNING: No translation for (keysym 0x6ce, Cyrillic_en) WARNING: No translation for (keysym 0x6ce, Cyrillic_en) WARNING: No translation for (keysym 0x6d4, Cyrillic_te) WARNING: No translation for (keysym 0x6d4, Cyrillic_te) ... WARNING: No translation for (keysym 0x6e3, Cyrillic_TSE) WARNING: No translation for (keysym 0x6e3, Cyrillic_TSE) WARNING: No translation for (keysym 0x6c5, Cyrillic_ie) WARNING: No translation for (keysym 0x6c5, Cyrillic_ie) WARNING: No translation for (keysym 0x6ce, Cyrillic_en) WARNING: No translation for (keysym 0x6ce, Cyrillic_en) WARNING: No translation for (keysym 0x6d4, Cyrillic_te) WARNING: No translation for (keysym 0x6d4, Cyrillic_te) WARNING: No translation for (keysym 0x6d2, Cyrillic_er) WARNING: No translation for (keysym 0x6d2, Cyrillic_er) |
$cat /usr/include/utmp.h
/* Copyright (C) 1993, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. ... #ifdef __USE_MISC /* Reentrant versions of the file for handling utmp files. */ extern int getutent_r (struct utmp *__buffer, struct utmp **__result) __THROW; extern int getutid_r (__const struct utmp *__id, struct utmp *__buffer, struct utmp **__result) __THROW; extern int getutline_r (__const struct utmp *__line, struct utmp *__buffer, struct utmp **__result) __THROW; #endif /* Use misc. */ __END_DECLS #endif /* utmp.h */ |
$cat /usr/include/sys/types.h
/* Copyright (C) 1991,1992,1994,1995,1996,1997,1998,1999,2000,2001,2002,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ... typedef __blkcnt64_t blkcnt64_t; /* Type to count number of disk blocks. */ typedef __fsblkcnt64_t fsblkcnt64_t; /* Type to count file system blocks. */ typedef __fsfilcnt64_t fsfilcnt64_t; /* Type to count file system inodes. */ #endif /* Now add the thread types. */ #if defined __USE_POSIX199506 || defined __USE_UNIX98 # include <bits/pthreadtypes.h> #endif __END_DECLS #endif /* sys/types.h */ |
$cat /usr/include/utmp.h
/* Copyright (C) 1993, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. ... #ifdef __USE_MISC /* Reentrant versions of the file for handling utmp files. */ extern int getutent_r (struct utmp *__buffer, struct utmp **__result) __THROW; extern int getutid_r (__const struct utmp *__id, struct utmp *__buffer, struct utmp **__result) __THROW; extern int getutline_r (__const struct utmp *__line, struct utmp *__buffer, struct utmp **__result) __THROW; #endif /* Use misc. */ __END_DECLS #endif /* utmp.h */ |
$cat /usr/include/utmp.h |grep _PATH_UTMP
#define UTMP_FILE _PATH_UTMP #define UTMP_FILENAME _PATH_UTMP |
$cat /usr/include/bits/utmp.h |grep _PATH_UTMP
|
$cat /usr/include/bits/utmp.h
/* The `struct utmp' type, describing entries in the utmp file. GNU version. Copyright (C) 1993, 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of ... #define ACCOUNTING 9 /* Old Linux name for the EMPTY type. */ #define UT_UNKNOWN EMPTY /* Tell the user that we have a modern system with UT_HOST, UT_PID, UT_TYPE, UT_ID and UT_TV fields. */ #define _HAVE_UT_TYPE 1 #define _HAVE_UT_PID 1 #define _HAVE_UT_ID 1 #define _HAVE_UT_TV 1 #define _HAVE_UT_HOST 1 |
$cat /usr/include/utmp.h
/* Copyright (C) 1993, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. ... #ifdef __USE_MISC /* Reentrant versions of the file for handling utmp files. */ extern int getutent_r (struct utmp *__buffer, struct utmp **__result) __THROW; extern int getutid_r (__const struct utmp *__id, struct utmp *__buffer, struct utmp **__result) __THROW; extern int getutline_r (__const struct utmp *__line, struct utmp *__buffer, struct utmp **__result) __THROW; #endif /* Use misc. */ __END_DECLS #endif /* utmp.h */ |
$man more
|
$Press `Q' to quit, `H' for help, and SPACE to scroll.
__malloc_hook (3) - malloc debugging variables bzmore (1) - file perusal filter for crt viewing of bzip2 compressed text convert (1) - convert between image formats as well as resize an image, blur, crop, despeckle, dither, draw on, flip, join, re-sample, and much more. Date::Manip::TZ::paport00 (3pm) - Support for the Pacific/Port_Moresby time zone git-merge (1) - Join two or more development histories together identify (1) - describes the format and characteristics of one or more image files. less (1) - opposite of more Log::Dispatch (3pm) - Dispatches messages to one or more outputs mergecap (1) - Merges two or more capture files into one mogrify (1) - resize an image, blur, crop, despeckle, dither, draw on, flip, join, re-sample, and much more. Mogrify overwrites the original image file, whereas, convert(1) writes to a ... ... XkbGetIndicatorMap (3) - Gets the map for one or more indicators, using a mask to specify the indicators XkbGetKeyboard (3) - Retrieves one or more components of a keyboard device description XkbGetKeyModifierMap (3) - Update the modifier map for one or more of the keys in a keyboard description XkbGetNameChanges (3) - Update the local copy of the keyboard description with the actual values of the results of one or more calls to XkbNoteNameChanges XkbListComponents (3) - List of components for one or more component types XkbSelectEvents (3) - Selects and / or deselects for delivery of one or more Xkb events and has them delivered under all conditions XkbSetIndicatorMap (3) - Downloads the changes to the server based on modifications to a local copy of the keyboard description which will update the maps for one or more indicators xmore (1) - plain text display program for the X Window System xzmore (1) - view xz or lzma compressed (text) files zmore (1) - file perusal filter for crt viewing of compressed text |
$man -k file
|
$man -k file | grep read
__freadable (3) - interfaces to stdio FILE structure __freading (3) - interfaces to stdio FILE structure _llseek (2) - reposition read/write file offset BIO_read_filename (3ssl) - FILE bio Config::IniFiles (3pm) - A module for reading .ini-style configuration files. eventfd_read (3) - create a file descriptor for event notification fc-cat (1) - read font information cache files fgetwc (3) - read a wide character from a FILE stream fgetws (3) - read a wide-character string from a FILE stream Font::FreeType (3pm) - read font files and render glyphs from Perl using FreeType2 ... pwrite (2) - read from or write to a file descriptor at a given offset pwrite64 (2) - read from or write to a file descriptor at a given offset pyexcelerator (1) - a module for reading/writing Excel spreadsheet files read (2) - read from a file descriptor readahead (2) - perform file readahead into page cache readelf (1) - Displays information about ELF files. readlink (1) - print value of a symbolic link or canonical file name readlinkat (2) - read value of a symbolic link relative to a directory file descriptor readprofile (1) - a tool to read kernel profiling information tee (1) - read from standard input and write to standard output and files |
$man 2 read
|
$ping 192.168.0.160
PING 192.168.0.160 (192.168.0.160) 56(84) bytes of data. 64 bytes from 192.168.0.160: icmp_req=1 ttl=128 time=0.254 ms 64 bytes from 192.168.0.160: icmp_req=2 ttl=128 time=0.254 ms 64 bytes from 192.168.0.160: icmp_req=3 ttl=128 time=0.249 ms ^X64 bytes from 192.168.0.160: icmp_req=4 ttl=128 time=0.275 ms 64 bytes from 192.168.0.160: icmp_req=5 ttl=128 time=0.255 ms ^Z [1]+ Stopped ping 192.168.0.160 |
$pto8 -p -g1024x768 -a16 -k en-us.fixed 192.168.0.21
|
$ ÑÑÑÑойÑÑвом ÑеÑминала, Ñо Ñлаг O_TRUNC игноÑиÑÑеÑÑÑ. Ð
ÐÐ ÐТÐÐÐ ÐÐÐСÐÐÐÐ ssize_t read(int fd, void *buf, size_t count); read() пÑÑаеÑÑÑ ÑиÑаÑÑ Ð¸Ð· Ñайлового деÑкÑипÑоÑа fd байÑÑ Ð² колиÑеÑÑве ÐÐÐÐcount в бÑÑеÑ, наÑинаÑÑийÑÑ Ð¿Ð¾ адÑеÑÑ buf. ÐÑли count Ñавен нÑлÑ, Ñо read() возвÑаÑÐ°ÐµÑ Ð½Ð¾Ð»Ñ Ð¸ ниÑего не делаеÑ. ÐÑли count болÑÑе, Ñем SSIZE_MAX, Ñо ÑезÑлÑÑÐ°Ñ Ð½ÐµÐ¾Ð¿Ñеделен. ÐÑи ÑÑпеÑном завеÑÑении возвÑаÑаеÑÑÑ ÐºÐ¾Ð»Ð¸ÑеÑÑво байÑ, коÑоÑÑе бÑли ÐÐÐÐпÑоÑиÑÐ°Ð½Ñ (Ð½Ð¾Ð»Ñ Ð¾Ð·Ð½Ð°ÑÐ°ÐµÑ ÐºÐ¾Ð½ÐµÑ Ñайла), а позиÑÐ¸Ñ Ð² Ñайле ÑвелиÑиваеÑÑÑ Ð½Ð° ÑÑо знаÑение. ÐÑли колиÑеÑÑво пÑоÑиÑаннÑÑ Ð±Ð°Ð¹Ñ Ð¼ÐµÐ½ÑÑе, Ñем колиÑеÑÑво запÑоÑеннÑÑ , Ñо ÑÑо не ÑÑиÑаеÑÑÑ Ð¾Ñибкой: напÑимеÑ, Ð¼Ñ Ð¼Ð¾Ð³Ð»Ð¸ ... read() бÑл пÑеÑван Ñигналом. Ð ÑлÑÑае оÑибки возвÑаÑаеÑÑÑ -1, а errno ÑÑÑанавливаеÑÑÑ Ð´Ð¾Ð»Ð¶Ð½Ñм обÑазом. Ð ÑÑом ÑлÑÑае позиÑÐ¸Ñ Ñайла неопÑеделена. пÑоÑиÑÐ°Ð½Ñ (Ð½Ð¾Ð»Ñ Ð¾Ð·Ð½Ð°ÑаеÑ$ на ÑÑо знаÑение. ÐÑ$ колиÑеÑÑво запÑоÑеннÑÑ , $ ÑиÑаÑÑ Ð²Ð±Ð»Ð¸Ð·Ð¸ конÑа Ñ$ read() бÑл пÑеÑван Ñигна$ ÑÑÑанавливаеÑÑÑ Ð´Ð¾Ð»Ð¶Ð½Ñ$ неопÑеделена. |
$ls
who1.c |
$./who1
|
$gcc -o who1 who1.c
who1.c: In function ‘main’: who1.c:15: error: ‘current_record’ undeclared (first use in this function) who1.c:15: error: (Each undeclared identifier is reported only once who1.c:15: error: for each function it appears in.) |
$man -k utmp
|
$man 5 utmp
|
$Press `Q' to quit, `H' for help, and SPACE to scroll.
utmp, wtmp - login records NAME SYNOPSIS #include <utmp.h> The utmp file allows one to discover information about who is cur‐ DESCRIPTIONly using the system. There may be more users currently using the system, because not all programs use utmp logging. Warning: utmp must not be writable by the user class "other", because many system programs (foolishly) depend on its integrity. You risk faked system logfiles and modifications of system files if you leave ... #define LOGIN_PROCESS 6 /* Session leader process for user login */ #define USER_PROCESS 7 /* Normal process */ #define DEAD_PROCESS 8 /* Terminated process */ #define ACCOUNTING 9 /* Not implemented */ #define UT_LINESIZE 32 #define UT_NAMESIZE 32 #define UT_HOSTSIZE 256 struct exit_status { /* Type for ut_exit, below */ Reading... 6,1) 1% Press `Q' to quit, `H' for help, and SPACE to scroll. |
$mlocate utmp.h
/usr/include/utmp.h /usr/include/bits/utmp.h |
$gcc -o who1 who1.c
who1.c: In function ‘main’: who1.c:13: error: stray ‘\321’ in program who1.c:13: error: stray ‘\201’ in program who1.c:15: error: ‘current_record’ undeclared (first use in this function) who1.c:15: error: (Each undeclared identifier is reported only once who1.c:15: error: for each function it appears in.) |
$gcc -o who1 who1.c
who1.c: In function ‘main’: who1.c:13: error: stray ‘\321’ in program who1.c:13: error: stray ‘\201’ in program |
$gcc -o who1 who1.c
|
$gcc -o who1 who1.c
|
$gcc -o who1 who1.c
|
$gcc -o who1 who1.c
|
$gcc -o who1 who1.c
|
$gcc -o who1 who1.c
|
$gcc -o who1 who1.c
who1.c:12:31: error: fctnl: Нет такого файла или каталога who1.c: In function ‘main’: who1.c:19: error: ‘O_RONLY’ undeclared (first use in this function) who1.c:19: error: (Each undeclared identifier is reported only once who1.c:19: error: for each function it appears in.) who1.c:21: warning: incompatible implicit declaration of built-in function ‘exit’ |
$define INIT_PROCESS 5 /* Process spawned by init(8) */
read - читает из файлового дескриптора КРАТКОЕ ОПИСАНИЕ #include <unistd.h> ssize_t read(int fd, void *buf, size_t count); ОПИСАНИЕ read() пытается читать из файлового дескриптора fd байты в количестве count в буфер, Если count равен нулю, то read() возвращает ноль и ничего не делает. Если count больше, чем SSIZE_MAX, то результат неопределен. При успешном завершении возвращается количество байт, которые были прочитаны (ноль означает конец файла), а позиция в файле увеличивается на это значение. Если ... 4,1) 1 запрошенных данных, вернуть -1 (устанавливая errno в EINTR) или количество уже прочитанных байт. Reading... 6,1) 3 СООТВЕТСТВИЕ СТАНДАРТАМ SVr4, SVID, AT&T, POSIX, X/OPEN, BSD 4.3 ОГРАНИЧЕНИЯ Reading... 11,1) 8% Reading... 4,1) 2 Reading... |
$man -k sizeof
|
$man -k sizeof()
|
$man 2 open
|
$gcc -o who1 who1.c
who1.c:12:31: error: fctnl: Нет такого файла или каталога who1.c: In function ‘main’: who1.c:19: error: ‘O_RDONLY’ undeclared (first use in this function) who1.c:19: error: (Each undeclared identifier is reported only once who1.c:19: error: for each function it appears in.) who1.c:21: warning: incompatible implicit declaration of built-in function ‘exit’ |
$gcc -o who1 who1.c
who1.c:12:33: error: fctnl.h: Нет такого файла или каталога who1.c: In function ‘main’: who1.c:19: error: ‘O_RONLY’ undeclared (first use in this function) who1.c:19: error: (Each undeclared identifier is reported only once who1.c:19: error: for each function it appears in.) who1.c:21: warning: incompatible implicit declaration of built-in function ‘exit’ |
$mlocate fcntl.h
/home/ol14/Desktop/Разное/с рабочего стола/syslin/com32/include/fcntl.h /home/ol14/Desktop/Разное/с рабочего стола/syslin386/syslinux-3.86/com32/include/fcntl.h /usr/include/fcntl.h /usr/include/asm/fcntl.h /usr/include/asm-generic/fcntl.h /usr/include/bits/fcntl.h /usr/include/linux/fcntl.h /usr/include/sys/fcntl.h /usr/lib/syslinux/com32/include/fcntl.h /usr/share/syslinux/com32/include/fcntl.h /usr/src/linux-headers-2.6.26-2-686/include/asm-x86/fcntl.h /usr/src/linux-headers-2.6.26-2-686/include/linux/fcntl.h /usr/src/linux-headers-2.6.26-2-common/include/asm-generic/fcntl.h /usr/src/linux-headers-2.6.26-2-common/include/asm-x86/fcntl.h /usr/src/linux-headers-2.6.26-2-common/include/linux/fcntl.h /usr/src/linux-headers-3.2.0-0.bpo.2-common/arch/x86/include/asm/fcntl.h /usr/src/linux-headers-3.2.0-0.bpo.2-common/include/asm-generic/fcntl.h /usr/src/linux-headers-3.2.0-0.bpo.2-common/include/linux/fcntl.h |
$cat /usr/include/fcntl.h
/* Copyright (C) 1991,1992,1994-2001,2003,2004,2005,2006,2007,2009,2010,2011 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ... extern int posix_fallocate64 (int __fd, __off64_t __offset, __off64_t __len); # endif #endif /* Define some inlines helping to catch common problems. */ #if __USE_FORTIFY_LEVEL > 0 && defined __extern_always_inline \ && defined __va_arg_pack_len # include <bits/fcntl2.h> #endif __END_DECLS #endif /* fcntl.h */ |
$cat /usr/include/fcntl.h
/* Copyright (C) 1991,1992,1994-2001,2003,2004,2005,2006,2007,2009,2010,2011 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ... extern int posix_fallocate64 (int __fd, __off64_t __offset, __off64_t __len); # endif #endif /* Define some inlines helping to catch common problems. */ #if __USE_FORTIFY_LEVEL > 0 && defined __extern_always_inline \ && defined __va_arg_pack_len # include <bits/fcntl2.h> #endif __END_DECLS #endif /* fcntl.h */ |
$gcc -o who1 who1.c
who1.c: In function ‘main’: who1.c:21: warning: incompatible implicit declaration of built-in function ‘exit’ |
$gcc -o who1 who1.c
|
$НАЗВАНИЕ
_Exit (2) - завершает текущий процесс _exit (2) - завершает текущий процесс undocumented (2) - недокументированные системные вызовы atexit (3) - register a function to be called at normal process termination exit (2) - terminate the calling process exit (3) - cause normal process termination ggCleanupForceExit (3) - Cleanup callback facilities ggExit (3) - Initialize and uninitialize LibGG giiExit (3) - Initialize and uninitialize LibGII giiPanic (3) - Exit LibGII programs for fatal errors on_exit (3) - register a function to be called at normal process termination pthread_exit (3) - terminate calling thread |
$man 2 exit
|
$gcc -o who1 who1.c
|
$NAME
assert_perror (3) - test errnum and abort clnt_perror (3) - library routines for remote procedure calls clnt_sperror (3) - library routines for remote procedure calls perror (1) - explain error codes perror (3) - print a system error message |
$Press `Q' to quit, `H' for help, and SPACE to scroll.
perror - explain error codes NAME perror [options] errorcode ... SYNOPSIS For most system errors, MySQL displays, in addition to an internal text message, the DESCRIPsystem error code in one of the following styles: message ... (errno: #) message ... (Errcode: #) You can find out what the error code means by examining the documentation for your system or by using the perror utility. ... To obtain the error message for a MySQL Cluster error code, invoke perror with the --ndb option: shell> perror --ndb errorcode Note that the meaning of system error messages may be dependent on your operating system. A given error code may mean different things on different operating systems. perror supports the following options: · --help, --info, -I, -? Display a help message and exit. Reading... -- MOST: *stdin* (1,1) 0% |
$Press `Q' to quit, `H' for help, and SPACE to scroll.
read - ÑиÑÐ°ÐµÑ Ð¸Ð· Ñайлового деÑкÑипÑоÑа ÐÐÐÐÐÐÐÐ #include <unistd.h> ÐÐ ÐТÐÐÐ ÐÐÐСÐÐÐÐ ssize_t read(int fd, void *buf, size_t count); read() пÑÑаеÑÑÑ ÑиÑаÑÑ Ð¸Ð· Ñайлового деÑкÑипÑоÑа fd байÑÑ Ð² колиÑеÑÑве count в бÑÑеÑ, ÐÐÐÐнаÑинаÑÑийÑÑ Ð¿Ð¾ адÑеÑÑ buf. ÐÑли count Ñавен нÑлÑ, Ñо read() возвÑаÑÐ°ÐµÑ Ð½Ð¾Ð»Ñ Ð¸ ниÑего не делаеÑ. ÐÑли count болÑÑе, Ñем SSIZE_MAX, Ñо ÑезÑлÑÑÐ°Ñ Ð½ÐµÐ¾Ð¿Ñеделен. ÐÑи ÑÑпеÑном завеÑÑении возвÑаÑаеÑÑÑ ÐºÐ¾Ð»Ð¸ÑеÑÑво байÑ, коÑоÑÑе бÑли пÑоÑиÑÐ°Ð½Ñ (Ð½Ð¾Ð»Ñ ... EIO ÐÑибка ввода-вÑвода. ÐÑо Ð¼Ð¾Ð¶ÐµÑ Ð¿ÑоизойÑи, напÑимеÑ, еÑли пÑоÑеÑÑ, Ð½Ð°Ñ Ð¾Ð´ÑÑийÑÑ Ð² Ñоновой гÑÑппе пÑоÑеÑÑов, пÑÑаеÑÑÑ ÑиÑаÑÑ Ñ ÐºÐ¾Ð½ÑÑолиÑÑÑÑего ÑеÑминала, и игноÑиÑÑÐµÑ Ð¸Ð»Ð¸ блокиÑÑÐµÑ Ñигнал SIGTTIN, или же его гÑÑппа пÑоÑеÑÑов оÑÑалаÑÑ Ð±ÐµÐ· ÑодиÑелÑ. ÐÑо Ð¼Ð¾Ð¶ÐµÑ Ñакже ÑлÑÑиÑÑÑÑ, еÑли пÑоизоÑла низкоÑÑÐ¾Ð²Ð½ÐµÐ²Ð°Ñ Ð¾Ñибка ввода-вÑвода пÑи ÑÑÐµÐ½Ð¸Ñ Ñ Ð´Ð¸Ñка или ленÑÑ. EISDIR fd ÑÑÑлаеÑÑÑ Ð½Ð° каÑалог. EBADF fd не ÑвлÑеÑÑÑ Ð´Ð¾Ð¿ÑÑÑимÑм деÑкÑипÑоÑом Ñайлов или не оÑкÑÑÑ Ð´Ð»Ñ ÑÑениÑ. EINVAL fd ÑвÑзан Ñ Ð¾Ð±ÑекÑом, непÑиÑпоÑобленнÑм Ð´Ð»Ñ ÑÑениÑ. EFAULT buf ÑказÑÐ²Ð°ÐµÑ Ð·Ð° пÑÐµÐ´ÐµÐ»Ñ Ð´Ð¾ÑÑÑпного адÑеÑного пÑоÑÑÑанÑÑва. -- MOST: *stdin* (1,1) 0% |
$gcc -o who1 who1.c
/tmp/cczWaUkJ.o: In function `main': who1.c:(.text+0x5c): undefined reference to `show_info' collect2: ld returned 1 exit status |
$gcc -o who1 who1.c
/tmp/ccfRdwPw.o: In function `main': who1.c:(.text+0x5c): undefined reference to `show_info' collect2: ld returned 1 exit status |
$gcc -o who1 who1.c
who1.c:16: warning: data definition has no type or storage class who1.c: In function ‘main’: who1.c:28: error: incompatible type for argument 1 of ‘show_info’ who1.c:16: note: expected ‘struct utmp’ but argument is of type ‘struct utmp *’ who1.c: In function ‘show_info’: who1.c:32: error: parameter name omitted |
$gcc -o who1 who1.c
who1.c: In function ‘main’: who1.c:28: error: incompatible type for argument 1 of ‘show_info’ who1.c:16: note: expected ‘struct utmp’ but argument is of type ‘struct utmp *’ who1.c: At top level: who1.c:32: warning: conflicting types for ‘show_info’ who1.c:16: note: previous declaration of ‘show_info’ was here who1.c: In function ‘show_info’: who1.c:32: error: parameter name omitted |
$gcc -o who1 who1.c
|
$gcc -o who1 who1.c
who1.c: In function ‘main’: who1.c:28: error: incompatible type for argument 1 of ‘show_info’ who1.c:16: note: expected ‘struct utmp’ but argument is of type ‘struct utmp *’ who1.c: At top level: who1.c:32: warning: conflicting types for ‘show_info’ who1.c:16: note: previous declaration of ‘show_info’ was here |
$gcc -o who1 who1.c
who1.c:32: warning: conflicting types for ‘show_info’ who1.c:16: note: previous declaration of ‘show_info’ was here |
$gcc -o who1 who1.c
who1.c:16: warning: data definition has no type or storage class |
$gcc -o who1 who1.c
|
$Press `Q' to quit, `H' for help, and SPACE to scroll.
utmp, wtmp - login records NAME #include <utmp.h> SYNOPSIS The utmp file allows one to discover information about who is currently using the sys‐ DESCRIPtem. There may be more users currently using the system, because not all programs use utmp logging. Warning: utmp must not be writable by the user class "other", because many system pro‐ grams (foolishly) depend on its integrity. You risk faked system logfiles and modifi‐ cations of system files if you leave utmp writable to any user other than the owner and ... #define USER_PROCESS 7 /* Normal process */ #define DEAD_PROCESS 8 /* Terminated process */ #define ACCOUNTING 9 /* Not implemented */ #define UT_LINESIZE 32 #define UT_NAMESIZE 32 #define UT_HOSTSIZE 256 struct exit_status { /* Type for ut_exit, below */ short int e_termination; /* Process termination status */ short int e_exit; /* Process exit status */ -- MOST: *stdin* (1,1) 0% |
$who
ol14 tty7 2012-08-13 08:48 (:0) ol14 pts/2 2012-08-13 09:14 (:0.0) ol14 pts/4 2012-08-13 09:53 (:0.0) ol14 pts/6 2012-08-13 10:04 (:0.0) ol14 pts/10 2012-08-13 10:24 (:0.0) ol14 pts/12 2012-08-13 10:24 (:0.0) ol14 pts/14 2012-08-13 11:01 (:0.0) |
$who -a
2012-08-11 19:59 417 id=si терминал=0 выход=0 cистемная загрузка 2012-08-11 19:59 уровень выполнения 2 2012-08-11 19:59 предыдущий=S 2012-08-11 20:01 1250 id=l2 терминал=0 выход=0 ВХОД tty6 2012-08-11 20:01 2630 id=6 ВХОД tty4 2012-08-11 20:01 2628 id=4 ВХОД tty2 2012-08-11 20:01 2626 id=2 ВХОД tty5 2012-08-11 20:01 2629 id=5 ВХОД tty3 2012-08-11 20:01 2627 id=3 ВХОД tty1 2012-08-11 20:01 2625 id=1 ol14 - tty7 2012-08-13 08:48 дав 19511 (:0) pts/0 2012-08-13 11:29 0 id=/0 терминал=0 выход=0 ol14 + pts/2 2012-08-13 09:14 00:27 22255 (:0.0) ol14 + pts/4 2012-08-13 09:53 03:26 25791 (:0.0) ol14 + pts/6 2012-08-13 10:04 . 25791 (:0.0) ol14 + pts/10 2012-08-13 10:24 03:26 25791 (:0.0) ol14 + pts/12 2012-08-13 10:24 00:02 25791 (:0.0) ol14 + pts/14 2012-08-13 11:01 02:09 25791 (:0.0) |
$who
ol14 tty7 2012-08-13 08:48 (:0) ol14 pts/2 2012-08-13 09:14 (:0.0) ol14 pts/4 2012-08-13 09:53 (:0.0) ol14 pts/6 2012-08-13 10:04 (:0.0) ol14 pts/10 2012-08-13 10:24 (:0.0) ol14 pts/12 2012-08-13 10:24 (:0.0) ol14 pts/14 2012-08-13 11:01 (:0.0) |
$gcc -o who1 who1.c
who1.c: In function ‘show_info’: who1.c:41: error: too few arguments to function ‘printf’ |
$gcc -o who1 who1.c
|
$./who1
Ошибка сегментирования |
$gcc -o who1 who1.c
|
$./who1
Ошибка сегментирования |
$./who1
Ошибка сегментирования |
$gcc -o who1 who1.c
|
$./who1
|
$gcc -o who1 who1.c
|
$./who1
|
$./who1
|
$gcc -o who1 who1.c
|
$./who1
|
$gcc -o who1 who1.c
|
$./who1
|
$gcc -o who1 who1.c
|
$./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 ol14 pts/0 1344844891 ol14 pts/2 1344827648 ol14 pts/4 1344829989 ol14 pts/6 1344830680 ol14 pts/10 1344831878 ol14 pts/12 1344831884 ol14 pts/14 1344834060 |
$gcc -o who1 who1.c
|
$./who1
Ошибка сегментирования |
$gcc -o who1 who1.c
|
$./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 |
/* The `struct utmp' type, describing entries in the utmp file. GNU version. Copyright (C) 1993, 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #ifndef _UTMP_H # error "Never include <bits/utmp.h> directly; use <utmp.h> instead." #endif #include <paths.h> #include <sys/time.h> #include <sys/types.h> #include <bits/wordsize.h> #define UT_LINESIZE 32 #define UT_NAMESIZE 32 #define UT_HOSTSIZE 256 /* The structure describing an entry in the database of previous logins. */ struct lastlog { #if __WORDSIZE == 64 && defined __WORDSIZE_COMPAT32 int32_t ll_time; #else __time_t ll_time; #endif char ll_line[UT_LINESIZE]; char ll_host[UT_HOSTSIZE]; }; /* The structure describing the status of a terminated process. This type is used in `struct utmp' below. */ struct exit_status { short int e_termination; /* Process termination status. */ short int e_exit; /* Process exit status. */ }; /* The structure describing an entry in the user accounting database. */ struct utmp { short int ut_type; /* Type of login. */ pid_t ut_pid; /* Process ID of login process. */ char ut_line[UT_LINESIZE]; /* Devicename. */ char ut_id[4]; /* Inittab ID. */ char ut_user[UT_NAMESIZE]; /* Username. */ char ut_host[UT_HOSTSIZE]; /* Hostname for remote login. */ struct exit_status ut_exit; /* Exit status of a process marked as DEAD_PROCESS. */ /* The ut_session and ut_tv fields must be the same size when compiled 32- and 64-bit. This allows data files and shared memory to be shared between 32- and 64-bit applications. */ #if __WORDSIZE == 64 && defined __WORDSIZE_COMPAT32 int32_t ut_session; /* Session ID, used for windowing. */ struct { int32_t tv_sec; /* Seconds. */ int32_t tv_usec; /* Microseconds. */ } ut_tv; /* Time entry was made. */ #else long int ut_session; /* Session ID, used for windowing. */ struct timeval ut_tv; /* Time entry was made. */ #endif int32_t ut_addr_v6[4]; /* Internet address of remote host. */ char __unused[20]; /* Reserved for future use. */ }; /* Backwards compatibility hacks. */ #define ut_name ut_user #ifndef _NO_UT_TIME /* We have a problem here: `ut_time' is also used otherwise. Define _NO_UT_TIME if the compiler complains. */ # define ut_time ut_tv.tv_sec #endif #define ut_xtime ut_tv.tv_sec #define ut_addr ut_addr_v6[0] /* Values for the `ut_type' field of a `struct utmp'. */ #define EMPTY 0 /* No valid user accounting information. */ #define RUN_LVL 1 /* The system's runlevel. */ #define BOOT_TIME 2 /* Time of system boot. */ #define NEW_TIME 3 /* Time after system clock changed. */ #define OLD_TIME 4 /* Time when system clock changed. */ #define INIT_PROCESS 5 /* Process spawned by the init process. */ #define LOGIN_PROCESS 6 /* Session leader of a logged in user. */ #define USER_PROCESS 7 /* Normal process. */ #define DEAD_PROCESS 8 /* Terminated process. */ #define ACCOUNTING 9 /* Old Linux name for the EMPTY type. */ #define UT_UNKNOWN EMPTY /* Tell the user that we have a modern system with UT_HOST, UT_PID, UT_TYPE, UT_ID and UT_TV fields. */ #define _HAVE_UT_TYPE 1 #define _HAVE_UT_PID 1 #define _HAVE_UT_ID 1 #define _HAVE_UT_TV 1 #define _HAVE_UT_HOST 1
/* Copyright (C) 1991,1992,1994-2001,2003,2004,2005,2006,2007,2009,2010,2011 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ /* * POSIX Standard: 6.5 File Control Operations <fcntl.h> */ #ifndef _FCNTL_H #define _FCNTL_H 1 #include <features.h> /* This must be early so <bits/fcntl.h> can define types winningly. */ __BEGIN_DECLS /* Get the definitions of O_*, F_*, FD_*: all the numbers and flag bits for `open', `fcntl', et al. */ #include <bits/fcntl.h> /* For XPG all symbols from <sys/stat.h> should also be available. */ #ifdef __USE_XOPEN # include <sys/stat.h> #endif #ifdef __USE_MISC # ifndef R_OK /* Verbatim from <unistd.h>. Ugh. */ /* Values for the second argument to access. These may be OR'd together. */ # define R_OK 4 /* Test for read permission. */ # define W_OK 2 /* Test for write permission. */ # define X_OK 1 /* Test for execute permission. */ # define F_OK 0 /* Test for existence. */ # endif #endif /* Use misc. */ /* XPG wants the following symbols. */ #ifdef __USE_XOPEN /* <stdio.h> has the same definitions. */ # define SEEK_SET 0 /* Seek from beginning of file. */ # define SEEK_CUR 1 /* Seek from current position. */ # define SEEK_END 2 /* Seek from end of file. */ #endif /* XPG */ /* Do the file control operation described by CMD on FD. The remaining arguments are interpreted depending on CMD. This function is a cancellation point and therefore not marked with __THROW. */ extern int fcntl (int __fd, int __cmd, ...); /* Open FILE and return a new file descriptor for it, or -1 on error. OFLAG determines the type of access used. If O_CREAT is on OFLAG, the third argument is taken as a `mode_t', the mode of the created file. This function is a cancellation point and therefore not marked with __THROW. */ #ifndef __USE_FILE_OFFSET64 extern int open (__const char *__file, int __oflag, ...) __nonnull ((1)); #else # ifdef __REDIRECT extern int __REDIRECT (open, (__const char *__file, int __oflag, ...), open64) __nonnull ((1)); # else # define open open64 # endif #endif #ifdef __USE_LARGEFILE64 extern int open64 (__const char *__file, int __oflag, ...) __nonnull ((1)); #endif #ifdef __USE_ATFILE /* Similar to `open' but a relative path name is interpreted relative to the directory for which FD is a descriptor. NOTE: some other `openat' implementation support additional functionality through this interface, especially using the O_XATTR flag. This is not yet supported here. This function is a cancellation point and therefore not marked with __THROW. */ # ifndef __USE_FILE_OFFSET64 extern int openat (int __fd, __const char *__file, int __oflag, ...) __nonnull ((2)); # else # ifdef __REDIRECT extern int __REDIRECT (openat, (int __fd, __const char *__file, int __oflag, ...), openat64) __nonnull ((2)); # else # define openat openat64 # endif # endif extern int openat64 (int __fd, __const char *__file, int __oflag, ...) __nonnull ((2)); #endif /* Create and open FILE, with mode MODE. This takes an `int' MODE argument because that is what `mode_t' will be widened to. This function is a cancellation point and therefore not marked with __THROW. */ #ifndef __USE_FILE_OFFSET64 extern int creat (__const char *__file, __mode_t __mode) __nonnull ((1)); #else # ifdef __REDIRECT extern int __REDIRECT (creat, (__const char *__file, __mode_t __mode), creat64) __nonnull ((1)); # else # define creat creat64 # endif #endif #ifdef __USE_LARGEFILE64 extern int creat64 (__const char *__file, __mode_t __mode) __nonnull ((1)); #endif #if !defined F_LOCK && (defined __USE_MISC || (defined __USE_XOPEN_EXTENDED \ && !defined __USE_POSIX)) /* NOTE: These declarations also appear in <unistd.h>; be sure to keep both files consistent. Some systems have them there and some here, and some software depends on the macros being defined without including both. */ /* `lockf' is a simpler interface to the locking facilities of `fcntl'. LEN is always relative to the current file position. The CMD argument is one of the following. */ # define F_ULOCK 0 /* Unlock a previously locked region. */ # define F_LOCK 1 /* Lock a region for exclusive use. */ # define F_TLOCK 2 /* Test and lock a region for exclusive use. */ # define F_TEST 3 /* Test a region for other processes locks. */ # ifndef __USE_FILE_OFFSET64 extern int lockf (int __fd, int __cmd, __off_t __len); # else # ifdef __REDIRECT extern int __REDIRECT (lockf, (int __fd, int __cmd, __off64_t __len), lockf64); # else # define lockf lockf64 # endif # endif # ifdef __USE_LARGEFILE64 extern int lockf64 (int __fd, int __cmd, __off64_t __len); # endif #endif #ifdef __USE_XOPEN2K /* Advice the system about the expected behaviour of the application with respect to the file associated with FD. */ # ifndef __USE_FILE_OFFSET64 extern int posix_fadvise (int __fd, __off_t __offset, __off_t __len, int __advise) __THROW; # else # ifdef __REDIRECT_NTH extern int __REDIRECT_NTH (posix_fadvise, (int __fd, __off64_t __offset, __off64_t __len, int __advise), posix_fadvise64); # else # define posix_fadvise posix_fadvise64 # endif # endif # ifdef __USE_LARGEFILE64 extern int posix_fadvise64 (int __fd, __off64_t __offset, __off64_t __len, int __advise) __THROW; # endif /* Reserve storage for the data of the file associated with FD. This function is a possible cancellation points and therefore not marked with __THROW. */ # ifndef __USE_FILE_OFFSET64 extern int posix_fallocate (int __fd, __off_t __offset, __off_t __len); # else # ifdef __REDIRECT extern int __REDIRECT (posix_fallocate, (int __fd, __off64_t __offset, __off64_t __len), posix_fallocate64); # else # define posix_fallocate posix_fallocate64 # endif # endif # ifdef __USE_LARGEFILE64 extern int posix_fallocate64 (int __fd, __off64_t __offset, __off64_t __len); # endif #endif /* Define some inlines helping to catch common problems. */ #if __USE_FORTIFY_LEVEL > 0 && defined __extern_always_inline \ && defined __va_arg_pack_len # include <bits/fcntl2.h> #endif __END_DECLS #endif /* fcntl.h */
/* Copyright (C) 1991,1992,1994,1995,1996,1997,1998,1999,2000,2001,2002,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ /* * POSIX Standard: 2.6 Primitive System Data Types <sys/types.h> */ #ifndef _SYS_TYPES_H #define _SYS_TYPES_H 1 #include <features.h> __BEGIN_DECLS #include <bits/types.h> #ifdef __USE_BSD # ifndef __u_char_defined typedef __u_char u_char; typedef __u_short u_short; typedef __u_int u_int; typedef __u_long u_long; typedef __quad_t quad_t; typedef __u_quad_t u_quad_t; typedef __fsid_t fsid_t; # define __u_char_defined # endif #endif typedef __loff_t loff_t; #ifndef __ino_t_defined # ifndef __USE_FILE_OFFSET64 typedef __ino_t ino_t; # else typedef __ino64_t ino_t; # endif # define __ino_t_defined #endif #if defined __USE_LARGEFILE64 && !defined __ino64_t_defined typedef __ino64_t ino64_t; # define __ino64_t_defined #endif #ifndef __dev_t_defined typedef __dev_t dev_t; # define __dev_t_defined #endif #ifndef __gid_t_defined typedef __gid_t gid_t; # define __gid_t_defined #endif #ifndef __mode_t_defined typedef __mode_t mode_t; # define __mode_t_defined #endif #ifndef __nlink_t_defined typedef __nlink_t nlink_t; # define __nlink_t_defined #endif #ifndef __uid_t_defined typedef __uid_t uid_t; # define __uid_t_defined #endif #ifndef __off_t_defined # ifndef __USE_FILE_OFFSET64 typedef __off_t off_t; # else typedef __off64_t off_t; # endif # define __off_t_defined #endif #if defined __USE_LARGEFILE64 && !defined __off64_t_defined typedef __off64_t off64_t; # define __off64_t_defined #endif #ifndef __pid_t_defined typedef __pid_t pid_t; # define __pid_t_defined #endif #if (defined __USE_SVID || defined __USE_XOPEN) && !defined __id_t_defined typedef __id_t id_t; # define __id_t_defined #endif #ifndef __ssize_t_defined typedef __ssize_t ssize_t; # define __ssize_t_defined #endif #ifdef __USE_BSD # ifndef __daddr_t_defined typedef __daddr_t daddr_t; typedef __caddr_t caddr_t; # define __daddr_t_defined # endif #endif #if (defined __USE_SVID || defined __USE_XOPEN) && !defined __key_t_defined typedef __key_t key_t; # define __key_t_defined #endif #ifdef __USE_XOPEN # define __need_clock_t #endif #define __need_time_t #define __need_timer_t #define __need_clockid_t #include <time.h> #ifdef __USE_XOPEN # ifndef __useconds_t_defined typedef __useconds_t useconds_t; # define __useconds_t_defined # endif # ifndef __suseconds_t_defined typedef __suseconds_t suseconds_t; # define __suseconds_t_defined # endif #endif #define __need_size_t #include <stddef.h> #ifdef __USE_MISC /* Old compatibility names for C types. */ typedef unsigned long int ulong; typedef unsigned short int ushort; typedef unsigned int uint; #endif /* These size-specific names are used by some of the inet code. */ #if !__GNUC_PREREQ (2, 7) /* These types are defined by the ISO C99 header <inttypes.h>. */ # ifndef __int8_t_defined # define __int8_t_defined typedef char int8_t; typedef short int int16_t; typedef int int32_t; # if __WORDSIZE == 64 typedef long int int64_t; # elif __GLIBC_HAVE_LONG_LONG __extension__ typedef long long int int64_t; # endif # endif /* But these were defined by ISO C without the first `_'. */ typedef unsigned char u_int8_t; typedef unsigned short int u_int16_t; typedef unsigned int u_int32_t; # if __WORDSIZE == 64 typedef unsigned long int u_int64_t; # elif __GLIBC_HAVE_LONG_LONG __extension__ typedef unsigned long long int u_int64_t; # endif typedef int register_t; #else /* For GCC 2.7 and later, we can use specific type-size attributes. */ # define __intN_t(N, MODE) \ typedef int int##N##_t __attribute__ ((__mode__ (MODE))) # define __u_intN_t(N, MODE) \ typedef unsigned int u_int##N##_t __attribute__ ((__mode__ (MODE))) # ifndef __int8_t_defined # define __int8_t_defined __intN_t (8, __QI__); __intN_t (16, __HI__); __intN_t (32, __SI__); __intN_t (64, __DI__); # endif __u_intN_t (8, __QI__); __u_intN_t (16, __HI__); __u_intN_t (32, __SI__); __u_intN_t (64, __DI__); typedef int register_t __attribute__ ((__mode__ (__word__))); /* Some code from BIND tests this macro to see if the types above are defined. */ #endif #define __BIT_TYPES_DEFINED__ 1 #ifdef __USE_BSD /* In BSD <sys/types.h> is expected to define BYTE_ORDER. */ # include <endian.h> /* It also defines `fd_set' and the FD_* macros for `select'. */ # include <sys/select.h> /* BSD defines these symbols, so we follow. */ # include <sys/sysmacros.h> #endif /* Use BSD. */ #if defined __USE_UNIX98 && !defined __blksize_t_defined typedef __blksize_t blksize_t; # define __blksize_t_defined #endif /* Types from the Large File Support interface. */ #ifndef __USE_FILE_OFFSET64 # ifndef __blkcnt_t_defined typedef __blkcnt_t blkcnt_t; /* Type to count number of disk blocks. */ # define __blkcnt_t_defined # endif # ifndef __fsblkcnt_t_defined typedef __fsblkcnt_t fsblkcnt_t; /* Type to count file system blocks. */ # define __fsblkcnt_t_defined # endif # ifndef __fsfilcnt_t_defined typedef __fsfilcnt_t fsfilcnt_t; /* Type to count file system inodes. */ # define __fsfilcnt_t_defined # endif #else # ifndef __blkcnt_t_defined typedef __blkcnt64_t blkcnt_t; /* Type to count number of disk blocks. */ # define __blkcnt_t_defined # endif # ifndef __fsblkcnt_t_defined typedef __fsblkcnt64_t fsblkcnt_t; /* Type to count file system blocks. */ # define __fsblkcnt_t_defined # endif # ifndef __fsfilcnt_t_defined typedef __fsfilcnt64_t fsfilcnt_t; /* Type to count file system inodes. */ # define __fsfilcnt_t_defined # endif #endif #ifdef __USE_LARGEFILE64 typedef __blkcnt64_t blkcnt64_t; /* Type to count number of disk blocks. */ typedef __fsblkcnt64_t fsblkcnt64_t; /* Type to count file system blocks. */ typedef __fsfilcnt64_t fsfilcnt64_t; /* Type to count file system inodes. */ #endif /* Now add the thread types. */ #if defined __USE_POSIX199506 || defined __USE_UNIX98 # include <bits/pthreadtypes.h> #endif __END_DECLS #endif /* sys/types.h */
/* Copyright (C) 1993, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #ifndef _UTMP_H #define _UTMP_H 1 #include <features.h> #include <sys/types.h> __BEGIN_DECLS /* Get system dependent values and data structures. */ #include <bits/utmp.h> /* Compatibility names for the strings of the canonical file names. */ #define UTMP_FILE _PATH_UTMP #define UTMP_FILENAME _PATH_UTMP #define WTMP_FILE _PATH_WTMP #define WTMP_FILENAME _PATH_WTMP /* Make FD be the controlling terminal, stdin, stdout, and stderr; then close FD. Returns 0 on success, nonzero on error. */ extern int login_tty (int __fd) __THROW; /* Write the given entry into utmp and wtmp. */ extern void login (__const struct utmp *__entry) __THROW; /* Write the utmp entry to say the user on UT_LINE has logged out. */ extern int logout (__const char *__ut_line) __THROW; /* Append to wtmp an entry for the current time and the given info. */ extern void logwtmp (__const char *__ut_line, __const char *__ut_name, __const char *__ut_host) __THROW; /* Append entry UTMP to the wtmp-like file WTMP_FILE. */ extern void updwtmp (__const char *__wtmp_file, __const struct utmp *__utmp) __THROW; /* Change name of the utmp file to be examined. */ extern int utmpname (__const char *__file) __THROW; /* Read next entry from a utmp-like file. */ extern struct utmp *getutent (void) __THROW; /* Reset the input stream to the beginning of the file. */ extern void setutent (void) __THROW; /* Close the current open file. */ extern void endutent (void) __THROW; /* Search forward from the current point in the utmp file until the next entry with a ut_type matching ID->ut_type. */ extern struct utmp *getutid (__const struct utmp *__id) __THROW; /* Search forward from the current point in the utmp file until the next entry with a ut_line matching LINE->ut_line. */ extern struct utmp *getutline (__const struct utmp *__line) __THROW; /* Write out entry pointed to by UTMP_PTR into the utmp file. */ extern struct utmp *pututline (__const struct utmp *__utmp_ptr) __THROW; #ifdef __USE_MISC /* Reentrant versions of the file for handling utmp files. */ extern int getutent_r (struct utmp *__buffer, struct utmp **__result) __THROW; extern int getutid_r (__const struct utmp *__id, struct utmp *__buffer, struct utmp **__result) __THROW; extern int getutline_r (__const struct utmp *__line, struct utmp *__buffer, struct utmp **__result) __THROW; #endif /* Use misc. */ __END_DECLS #endif /* utmp.h */
Время первой команды журнала | 07:23:58 2012- 8- 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 10:05:50 2012- 8-13 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 20.79 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 2.66 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.63 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.
Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
$ l s-l bash: l: command not found |
Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
$ test 5 -lt 4 |
Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
$ 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 |
Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
# id uid=0(root) gid=0(root) Gruppen=0(root) |
Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
$ vi ~/.bashrc
|
Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
$ patch ~/.bashrc |
Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.
Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.
Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.
Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора
Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.
Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.
Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:
$ whoami
user
$ #^ Интересно, кто я?в журнале это будет выглядеть так:
$ whoami
user
Интересно, кто я? |
Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:
$ whoami
user
$ cat > /dev/null #^ Интересно, кто я?
Программа whoami выводит имя пользователя, под которым мы зарегистрировались в системе. - Она не может ответить на вопрос о нашем назначении в этом мире.В журнале это будет выглядеть так:
$ whoami user
|
Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=
1 2 3 4Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.
LiLaLo (L3) расшифровывается как Live Lab Log.
Программа разработана для повышения эффективности обучения Unix/Linux-системам.
(c) Игорь Чубин, 2004-2008