Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

( 1 5 Minutes ) Learning Objectives and Outcomes In this lab you will learn about the terminology, structure, and processing of the command line

(15 Minutes)
Learning Objectives and Outcomes
In this lab you will learn about the terminology, structure, and processing of the command line including arguments, options, built-ins,
corrections, and pathname expansion.
Reading
Read "The Command Line" starting in Sobell, up to the section titled "Simple Commands"..
Procedure
In comments (#), answer the following questions
On a command line, what is a token?
What is an argument?
What is an option?
How can you usually distinguish an argument from an option?
Review the previous labs for help on identifying the following commands.
Display one or more command lines in each of the following categories:
A command line with zero arguments
A command line with one argument
A command line with two arguments
A command line with one option and one argument
Most utilities have many options. You can read the man page to learn which options a utility accepts.
Use the Is -r(reverse) option
Use Is -r and combine it with the -l option.
Use the cp-r(recursive) option to copy a directory hierarchy.
Use the head -n(substitute a number for n) option to display the first n lines of a file instead of the default 10
Use the same option with tail.
In comments (#), answer the following questions
What is a builtin (Sobell)?
How does a builtin differ from a utility?
Use the builtins man page (front part only)
Choose and use a builtin command.
The echo builtin copies its arguments to the screen.
Use the following command line:
$ echo hi there
Use the repeat previous line capability (up arrow) to repeat the command line without retyping it (Sobell)?
Edit the previous command (use arrows) to replace hi with hello (Sobell)
Using pathname expansion (Sobell), list the files in the /usr/bin directory that have the characters ab anywhere in their names.
List the files in the /usr/bin directory that begin with the letter u.
List the files in the /usr/bin directory that begin with un.
List the files in the /usr/bin that have names that are one character long.
List the files in your home directory that begin with a period followed by the letters bash (.bash).
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Essentials of Database Management

Authors: Jeffrey A. Hoffer, Heikki Topi, Ramesh Venkataraman

1st edition

133405680, 9780133547702 , 978-0133405682

More Books

Students also viewed these Databases questions