CS 497C – Introduction to UNIX Lecture 5: Understanding the UNIX Command Chin-Chih Chang

Slides:



Advertisements
Similar presentations
RH030 Linux Computing Essentials
Advertisements

CS 497C – Introduction to UNIX Lecture 8: The vi/vim Editor Chin-Chih Chang
By: Tony Andrews.  Linux directory ordering system  Navigating and creating directories ◦ Listing directories and files ◦ Creating directories ◦ Changing.
Jump to first page Unix Commands Monica Stoica Jump to first page Introduction to Unix n Unix was born in 1969 at Bell Laboratories, a research subdivision.
Cosc 4750 Getting Started in UNIX Don’t be afraid of the prompt, in linux it can be your best friend. In some cases, the only way to do certain things.
Appendix A. Man Pages man whatis whatis(1) Typical Man Page Sections SectionContents User commands System calls C library functions.
Chapter 4 Getting Help. Using CDE Help Help Manager – primary help tool SunSolve Online – Web-based online help from Sun Solaris Support – Web-based Sun.
Linux+ Guide to Linux Certification, Second Edition
1 Using Editors Editors let you create and edit ASCII files UNIX normally includes two editors: vi and Emacs Vi and Emacs are screen editors: they display.
CS 497C – Introduction to UNIX Lecture 23: - Simple Filters Chin-Chih Chang
UNIX Chapter 00 A “ Quick Start ” into UNIX Operating System Mr. Mohammad Smirat.
Guide To UNIX Using Linux Third Edition
Lecture 01CS311 – Operating Systems 1 1 CS311 – Lecture 01 Outline Course introduction Setting up your system Logging onto the servers at OSU with ssh.
Very Quick & Basic Unix Steven Newhouse Unix is user-friendly. It's just very selective about who its friends are.
CS 497C – Introduction to UNIX Lecture 19: - The GNU emacs Editor Chin-Chih Chang
Introduction to Unix – CS 21 Lecture 5. Lecture Overview Lab Review Useful commands that will illustrate today’s lecture Streams of input and output File.
2 $ command Command Line Options ls –a –l hello hi Command Arguments.
1 SEEM3460 Tutorial Unix Introduction. 2 Introduction What is Unix? An operation system (OS), similar to Windows, MacOS X Why learn Unix? Greatest Software.
7/17/2009 rwjBROOKDALE COMMUNITY COLLEGE1 Unix Comp-145 C HAPTER 2.
Linux Installation and Administration Lesson 2 Tutor: George Papamarkos.
Unix Primer. Unix Shell The shell is a command programming language that provides an interface to the UNIX operating system. The shell is a “regular”
Chapter 9 Part II Linux Command Line Access to Linux Authenticated login using a Linux account is required to access a Linux system. The Linux prompt will.
Linux environment ● Graphical interface – X-window + window manager ● Text interface – terminal + shell.
Chapter 3: Command Line Utilities Doin’ stuff. In this chapter … Special characters Redirection More utilities than you shake a stick at.
CENT 305 Information Systems Security Linux Introduction.
CS 497C – Introduction to UNIX Lecture 7: General-Purpose Utilities Chin-Chih Chang
Agenda Chapter 1: Linux (Unix) Features Commands (Chapters 2 & 3) Command Structure / Command line editing man, passwd, cal, date, whereis, which Working.
Introduction to Linux ( I ) Sidney Fong 4 th Feb 2006.
Isecur1ty training center Presented by : Eng. Mohammad Khreesha.
UNIX and Shell Programming (06CS36) Unit 1 Continued… Shrinivas R. Mangalwede Department of Computer Science and Engineering K.L.S. Gogte Institute of.
Chapter Eight Exploring the UNIX Utilities. 2 Lesson A Using the UNIX Utilities.
Linux+ Guide to Linux Certification, Third Edition
Linux Operations and Administration
UNIX Commands. Why UNIX Commands Are Noninteractive Command may take input from the output of another command (filters). May be scheduled to run at specific.
COMP1070/2002/lec4/H.Melikian COMP1070 Lecture #4  Unix software architecture  Correcting mistakes  System setups  Useful commands for the beginner.
Chapter 0 A “Quick-Start” into the UNIX Operating System.
Lesson 2-Touring Essential Programs. Overview Development of UNIX and Linux. Commands to execute utilities. Communicating instructions to the shell. Navigating.
Guide To UNIX Using Linux Third Edition Chapter 8: Exploring the UNIX/Linux Utilities.
BIF713 Basic Unix/Linux Commands Getting Help with Commands.
Introduction to UNIX Geraint Vaughan. What is UNIX? Command-line operating system (not point- and click) Designed for ‘experts’ Lots of different variants.
Text Editing February 2 nd, 2004 Class Meeting 3.
1 of 47 Chapter 4: The vi Editor – First Look Copyright ©2008 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved.
Agenda Basic Unix Commands (Chapters 2 & 3) Miscellaneous Commands: whereis, which, whoami, finger, passwd, cal, date Working with Files: cat, more, less.
Chapter 2 part #1 C++ Program Structure
Introduction to Unix (CA263) File Editing By Tariq Ibn Aziz.
Introduction to UNIX. 2 History of Unix  1960 Software based on Hardware Limits  1969 Ken Thompson Develop a Better Programming Environment  1971 New.
Agenda Basic Unix Commands (Chapters 2 & 3) Miscellaneous Commands: which, passwd, date, ps / kill Working with Files: file, touch, cat, more, less, grep,
CSE 374 Programming Concepts & Tools Hal Perkins Fall 2015 Lecture 2a – A Unix Command Sampler (Courtesy of David Notkin, CSE 303)
1 © 2001 John Urrutia. All rights reserved. Chapter 2 Getting Started.
Linux+ Guide to Linux Certification, Second Edition Chapter 4 Exploring Linux Filesystems.
Linux A practical introduction. 1)Background and Getting Started Linux is an operating system with multiple providers Red Hat/CentOS (our version) Ubuntu.
1 CS3695 – Network Vulnerability Assessment & Risk Mitigation – Introduction to Unix & Linux.
Unix Fundamentals CS 127. File navigation cd - change directory cd /var/log cd /etc/apache2 cd ~/Desktop ~ is a shortcut for the home directory.
EMT 2390L Lecture 3 Dr. Reyes Reference: The Linux Command Line, W.E. Shotts.
Learning basic Unix command It 325 operating system.
Chapter Eight Exploring the UNIX Utilities. 2 Lesson A Using the UNIX Utilities.
Linux Tutorial Lesson Two *Getting Help in Linux *Data movement and manipulation *Relative and Absolute path *Processes Note: see chapter 1,2,3 from Linux.
Learning Unix/Linux Based on slides from: Eric Bishop.
UNIX To do work for the class, you will be using the Unix operating system. Once connected to the system, you will be presented with a login screen. Once.
Unix Shells.
Useful Linux Commands.
Agenda Basic Unix Commands (Chapters 2 & 3) Miscellaneous Commands:
CSE 374 Programming Concepts & Tools
Basic UNIX OLC Training.
Module 5 Getting Help.
UNIX and Shell Programming (06CS36)
UNIX and Shell Programming (06CS36)
The Linux Command Line Chapter 5
Module 06 Getting Help.
Presentation transcript:

CS 497C – Introduction to UNIX Lecture 5: Understanding the UNIX Command Chin-Chih Chang

man: On-Line Help To understand details of commands, you can take on the UNIX documentation. man remains the most complete and authoritative guide to the UNIX system. To view the manual page of the C shell, you use man with csh as argument. man csh

man: On-Line Help The entire man page pertaining to the csh command is dumped on the screen. Man presents the first page and pauses. This is done by sending its output to a pager program, which displays the contents of a file one page (screen) at a time. You press a key ([Spacebar] or [Enter]) to see the next page. To quit the pager, press a q.

man: On-Line Help The pager is actually a UNIX command, and man is always preconfigured to be used with a specific pager. UNIX systems use these pager programs: –more, Berkleys pager now available universally and a superior alternative to the obsolete pg command. –less, the standard pager used by all Linux systems. When man displays a page, it doesnt tell you the pager it uses.

man: On-Line Help A pager has keys defined for viewing the previous and next page and terminating the program. See Table 2.1. Some important mans pager commands are : –Next page – [Spacebar] or f –Previous page – b or p –Quit – q –Search for keyword - /keyword –Repeat search - n

man: On-Line Help You can see the man pages of multiple commands with a single invocation of man. man cp mv rm To know more about man, use the following: man

The man documentation Vendors organize the man documentation differently, but in general youll see eight sections of the UNIX manual. Later enhancements have added subsections (like 1C, 1M, 3N etc.) The basic manual sections for SVR4 and Linux are shown in Table 2.2. Most of the commands you use are availale in Section 1, and man searches the manuals starting from Section 1.

The man documentation We can use a number option to specify the section. man 4 passwd You can specify multiple section numbers and multiple commands to look up. man 2 mount 4 passwd The structure of the man page is divided into a number of compulsory and optional sections where each section is preceded by a header.

Understanding a man Page The command headers are: –NAME – command name and its function –SYNOPSIS – arguments and options –DESCRIPTION – detailed explanation –EXAMPLES – examples of command usage –FILES – related files –SEE ALSO – related commands –DIAGNOSTICS – error messages –BUGS – errors that havent been fixed yet –AUTHOR(S) – author(s) of the command

Info: The Texinfo Document Many systems also support the Textinfo documentation (well call it the info documentation). The info is invoked with the command name: info tar Youll now see an emacs-type interface describing the table of contents.

Info: The Texinfo Document Info document is organized in nodes where one node represents a section of text at a certain level. Multilevel documents resemble the hypertext documents that are found in the World Wide Web. Within a page, you can use the [Page Up] and [Page Down] keys in the normal way for paging.

Info: The Texinfo Document You can take the cursor to any of these lines and press [Enter]. To return to the previous level, press u (up). You can also move using p (previous) and n (next). To quit info, use q. If you get stuck, just quit info with q. When in doubt, press h to see the complete list of key sequences accepted by the info reader.

whatis and apropos To get the short description of the command, use the whatis. whatis cp cp (1) - copy files If you have no idea about the command to use in a given situation, you should use the apropos command with one or more keywords.

whatis and apropos apropos gives you the name and short description from all manual sections that contain the keyword. $ apropos HTTP Both whatis and apropos can be used with multiple arguments. If your keyword contains more than one word, use quotes. $ apropos regular expression

whatis and apropos If you dont have the apropos command on your system, you can use man –k. You can use man –f in place of whatis. Most Linux offer the --help option that displays a compact listing of all options. $ ls --help

Coming Next Labor Day Holiday Do Self-Test of Chapter 2 Turn in Homework 1 (September 5) General-Purpose Utilities