Операционная система Linux





date Вск Сен 12


[methody@localhost methody]$ data -bash: data: command not found [methody@localhost methody]$ date Вск Сен 12 13:59:36 MSD 2004
Пример 2.1. Сообщение об ошибке
Закрыть окно

[methody@localhost methody]$ cat Any Text Any Text ^C
[methody@localhost methody]$ cat Any Text agaim^[[Dn Any Text again ^D [methody@localhost methody]$
Пример 2.2. Как завершить работу cat?
Закрыть окно

[methody@localhost methody]$ cal Сентября 2004 Вс Пн Вт Ср Чт Пт Сб 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 [methody@localhost methody]$ echo Hello, world! Hello, world!
Пример 2.3. Команды echo и cal
Закрыть окно

[methody@localhost methody]$ cal 3 2005 Марта 2005 Вс Пн Вт Ср Чт Пт Сб 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
Пример 2.4. Команда cal с параметрами
Закрыть окно



[methody@localhost methody]$ man cal CAL(1) BSD General Commands Manual CAL(1) NAME cal - displays a calendar SYNOPSIS cal [-smjy13] [[month] year] DESCRIPTION Cal displays a simple calendar. If arguments are not specified, the current month is displayed. The options are as follows: . . .
Пример 2.5. Просмотр страницы руководства
Закрыть окно

[methody@localhost methody]$ man man . . . SEE ALSO apropos(1), whatis(1), less(1), groff(1), man.conf(5). . . .
Пример 2.6. Поле SEE ALSO руководства
Закрыть окно

[methody@localhost methody]$ whatis apropos apropos (1) - search the whatis database for strings [methody@localhost methody]$ man apropos apropos(1) apropos(1) NAME apropos - search the whatis database for strings . . .
Пример 2.7. Вызов whatis
Закрыть окно

[methody@localhost methody]$ whatis passwd passwd (1) - update a user's authentication tokens(s) passwd (5) - password file passwd (8) - manual page for passwd wrapper version 1.0.5
Пример 2.8. Руководства с одинаковыми именами
Закрыть окно

george@localhost:~> whatis intro intro (1) - Introduction to user commands intro (2) - Introduction to system calls intro (3) - Introduction to library functions intro (4) - Introduction to special files intro (5) - Introduction to file formats intro (6) - Introduction to games intro (7) - Introduction to conventions and miscellany section intro (8) - Introduction to administration and privileged commands intro (9) - Introduction to kernel interface
Пример 2.9. Руководства intro
Закрыть окно

[methody@localhost methody]$ man 8 passwd PASSWD(8) System Administration Utilities PASSWD(8) . . . [methody@localhost methody]$ man -a passwd PASSWD(1) Some Linux PASSWD(1) . . . PASSWD(8) System Administration Utilities PASSWD(8) . . . PASSWD(5) Linux Programmer's Manual PASSWD(5) . . .
Пример 2.10. Выбор среди страниц руководства с одинаковым именем
Закрыть окно

[methody@localhost methody]$ info info File: info.info, Node: Top, Next: Getting Started, Up: (dir)
Info: An Introduction . . . * Menu:
* Getting Started:: Getting started using an Info reader. * Expert Info:: Info commands for experts. * Creating an Info File:: How to make your own Info file. * Index:: An index of topics, commands, and variables. . . . --zz-Info: (info.info.bz2)Top, строк: 24 --All------------ Welcome to Info version 4.6. Type ? for help, m for menu item.
Пример 2.11. Просмотр info-документа
Закрыть окно

[methody@localhost methody]$ info info "Getting Started" Help-Q File: info.info, Node: Help-Q, Prev: Help-Int, Up: Getting Started
Quitting Info . . .
Пример 2.12. Просмотр определенного узла info-документа
Закрыть окно

[methody@localhost methody]$ date Вск Сен 19 23:01:17 MSD 2004 [methody@localhost methody]$ date -u Вск Сен 19 19:01:19 UTC 2004
Пример 2.13. Команда date с ключом
Закрыть окно

[methody@localhost methody]$ who - m methody tty1 Sep 20 13:56 (localhost) [methody@localhost methody]$ cal -m Сентября 2004 Пн Вт Ср Чт Пт Сб Вс 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
Пример 2.14. Использование ключа "-m" в разных командах
Закрыть окно

[methody@localhost methody]$ info info "Expert info" Cross-refs Help-Cross - o text info: Запись ноды (info.info.bz2)Help-Cross... info: Завершено. [methody@localhost methody]$ cat text -n 1 File: info.info, Node: Help-Cross, Up: Cross-refs 2 3 The node reached by the cross reference in Info 4 ------------------------------------------------ . . .
Пример 2.15. Использование info -o
Закрыть окно

[methody@localhost methody]$ info -o -filename-with- info: Запись ноды (dir)Top... info: Завершено. [methody@localhost methody]$ head -1 -filename-with- head: invalid option -- f Попробуйте `head --help' для получения более подробного описания. [methody@localhost methody]$ head -1 -- -filename-with- File: dir Node: Top This is the top of the INFO tree
Пример 2.16. Параметр-не ключ, начинающийся на "-"
Закрыть окно

[methody@localhost methody]$ head --help Использование: head [КЛЮЧ]... [ФАЙЛ]... Print the first 10 lines of each FILE to standard output. With more than one FILE, precede each with a header giving the file name. With no FILE, or when FILE is -, read standard input.
Аргументы, обязательные для длинных ключей, обязательны и для коротких. -c, --bytes=[-]N print the first N bytes of each file; with the leading '-', print all but the last N bytes of each file -n, --lines=[-]N print the first N lines instead of the first 10; the leading '-', print all but the last N lines of each file -q, --quiet, --silent не печатать заголовки с именами файлов -v, --verbose всегда печатать заголовки с именами файлов --help показать эту справку и выйти --version показать информацию о версии и выйти N may have a multiplier suffix: b 512, k 1024, m 1024*1024. Об ошибках сообщайте по адресу.
Пример 2.17. Ключ -help
Закрыть окно

[methody@localhost methody]$ apropos s . . . (четыре с половиной тысячи строк!)
Пример 2.18. Бессмысленная команда
Закрыть окно

[methody@localhost methody]$ type info info is /usr/bin/info [methody@localhost methody]$ type echo echo is a shell builtin [methody@localhost methody]$ type -a echo echo is a shell builtin echo is /bin/echo [methody@localhost methody]$ type -a -t echo builtin file [methody@localhost methody]$ type -a -t date file [methody@localhost methody]$ type -at cat file
Пример 2.19. Определение типа команды
Закрыть окно

[methody@localhost methody]$ echo One Two Three One Two Three [methody@localhost methody]$ echo One "Two Three" One Two Three [methody@localhost methody]$ echo 'One > > Ой. И что дальше? > А, кавычки забыл!' One Ой. И что дальше? А, кавычки забыл! [methody@localhost methody]$
Пример 2.20. Закавычивание в командной строке
Закрыть окно
Содержание раздела


69945074