examples Flashcards

1
Q

cd /

A

change to root directory

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

cd ~

A

change to home directory

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

ls /

A

show files and dir in root

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

ls /*ot

A

show all files in root that end with ot

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

mkdir ~/cli-tmp

A

make a directory in your home directory called cli-tmp

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

cd cli-tmp

touch in-cli-tmp

A

navigate to cli-tmp and create a file called in-cli-tmp

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

rm -r cli-tmp

A

remove directory

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

mkdir -p ~/cli-tmp/parent/child/grandchild

A

create a nest of directories in the home directory

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

mv bob grandchildren

A

move bob file to grandchildren directory

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

cp -r grandchildren ../nephews

A

copy and rename grandchildren into nephews one directory up

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

PS1=”\u@\w$ “

A

change prompt

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

echo ‘export PS1=”this is a test$ “’&raquo_space; ~/.bashrc

A

export prompt

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

nano ~/.bashrc
^o + enter
^x

A

open bashrc in nano to edit file
save file
exit

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

source ~/.bashrc

A

rerun bashrc

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q
\h
\u
\w
\W
\d
\n
A
hostname
username
current directory
basename of current directory
current date
newline
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

$PATH

A

determines which files can be executed without specifying their path explicitly.

17
Q

what two types of permissions are there

and what types are there of those specific permissions

A

ownership:user,group,other and access:read,write,execute