Class 20 Quiz Flashcards

1
Q

What command would you run to see the last 20 commands you ran at the command line?

A

history 20

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the pathname of the file that, by default, stores the commands you have run in a file so that they will be remembered for the next time you log in?

A

~/.bash_history

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What command would you use to edit the last command to run, change it and run it again?

A

fc

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the name of the library of procedures that allows you to edit the command line?

A

the Readline library

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Name the three things that can be completed at the command line by hitting Tab.

A

pathnames, commands, shell variables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What kind of quotes should you use when defining an alias?

A

single quotes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What would you write at the command line to create the alias ghdir which changed directory to my home directory?

A

alias ghdir=’cd ~ghoffman’

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Can you write a function on a single command line?

A

yes if every command is followed by a ;, including the last

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Can aliases be made global?

A

no

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Can functions be made global?

A

no

How well did you know this?
1
Not at all
2
3
4
5
Perfectly