Question
Display the complete command that will accomplish the following actions. (ie. If you were asked which command would allow you to navigate to the /var
Display the
complete command
that will accomplish the following actions. (ie. If you were
asked which command would allow you to navigate to the
/var
directory you would display the
following:
cd /va
r
(
NOT
just the
command cd
)
)
1.
Which command allows you to see a list of
only
the previous three commands
that you
executed
?
For example, if the
last three commands I exec
uted were cal, date, and ls this
would be the output of the command:
2.
The command history is kept in a BASH shell variable called HISTSIZE. At the
command prompt enter the following commend:
ec
ho $HISTSIZE
What was the output of this command
?
3.
What command would you use to modify the command history so it only retains your last
250
commands?
In other words, instead of remembering your last 1000 commands in the
history buffer, it will only remember you
r last 250 commands.
4.
What command will
add the
/home/sysadmin/Documents
directory to the PATH
variable?
If y
ou do this correctly, you will see the following output from the echo
$PATH command:
5.
Assuming you do not know the full path to the
cal
command, w
hat command
would you
use to display the full path to
that
command? The output of the command should return
the following:
6.
When I want to get a
detailed
directory listing
I have to type the command
ls
l
but I
want to be more efficient and change this command so I only have to type
lsl
to get the
same output as the
ls
l
command. What command would you use to make this change?
T
h
e
res
ult of this command would produce the following
output
:
7.
What command can you use to find out the name of the
computer you are currently
executing commands on
?
For example, if my computer were named
localhost
I would
see the following output:
8.
What command would you use to display all the files in your current directory that start
with the uppercase letter
V
?
See the example output below:
9.
What command would you use to display
all the
files in your current directory
that are
exactly
6
characters in length?
The output would similar to the following:
10.
What
single
command would you use to display all the files in your current directory that
start with
either a
n uppercase
V
or
M
?
See the example output below:
11.
You would like to run both the
cal
command and the
date
command on the same line so
that both execute but you only need to press the enter key once. How would you do
this
?
See the example output below:
12.
What command would you type to execute the 3
rd
command in your command history list
without
having to r
etype the entire command
?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started