Unix Flashcards

(49 cards)

1
Q

command for: list contents of current directory

A

ls

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

command for: make a directory

A

mkdir

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

command for move:

A

mv

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

command for rename:

A

mv

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

what would the command be to move text1 into directory files

A

mv text1 files

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

command for changing to a directory:

A

cd

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

command for printing current directory to the terminal:

A

pwd

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

command to move to previous directory:

A

cd ..

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

command to show contents of a file:

A

more

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

command to copy:

A

cp

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

command to remove:

A

rm

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

command to remove a directory:

A

rmdir

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

command to change security permissions:

A

chmod

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

command to do a long list of files:

A

ls -l

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

addition to ls if we want to see details of files and direcetories:

A

ls -l

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

wildcard to match anything (to be read by shell):

A

*

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

in file permissions what are u,g,o?

A

u = user
g = groups
o = the rest

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

how would you see what permission groups you’re in?

A

groups

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

in file permissions, what are r,w,x?

A

r = read
w = write
x = execute

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

what symbol can be used for home directory?

21
Q

how can the home directory symbol be used to mean someone else’s home directory?

22
Q

what does man -k do?

A

search manual for a following word

23
Q

what is the command to find someones username?

24
Q

what is the quick way to write current directory in a pathname?

25
what is the command for printing two files together?
cat
26
what does > do?
replaces the following file with the content before the symbol
27
what does '>>' do?
appends the content before the symbol to the file that follows
28
command to copy a directory?
cp -r
29
command to see how much disk space is free?
df
30
command to remove a directory and everything in it?
rm -r
31
command to list all processes?
ps aux
32
meaning of |?
'pipes' the result of a previous command into another
33
command to end a process?
kill
34
what does -9 do to the kill command?
tells the process to die immediately and not 'tidy up'
35
how do you exit a more command?
q
36
what does it mean for a file to begin with a .
hidden file
37
what does -r do to ls?
lists things recursively from a directory
38
how would you create an empty text file from the terminal?
touch
39
what does the command du do?
it shows the disk usage for the current directory and its subdirectories.
40
how does -s change the result of du?
summary - shows disk usage of current directory without splitting it up for each subdirectory
41
how does -s* affect the result of du?
shows summarised disk usage information for each subdirectory of the directory
42
what does -alg do to ls?
a = show all l = long listing g = omit owner column
43
what does grep do?
search for a particular string or pattern in a file
44
what needs to be used with grep if we want to search for a string of several words?
" " quote marks otherwise the shell tries to interpret the space
45
how would you redirect the errors of a command somewhere?
command > (where you want normal results) > (where you want errors)
46
what would grep interpret "st." as?
st followed by any single character
47
whta does \ do inside quotes for grep?
the next character is read literally rather than as a regular expression
48
how do you get a \ to be read literally?
with another backslash \\
49
what's the difference between ls -r and ls -R ?
ls -r lists recursively from the bottom up whereas ls -R lists more typically from top down