shell basics Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

ls

A

lists directory contents

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

ls -l

A

uses long listing format

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

ls -v

A

explains what is being done

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

mkdir -p

A

makes parents

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

rmdir -p

A

removes dir and its ancestors

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

mkdir

A

makes dir

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

rmdir

A

removes empty dir

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

rm

A

removes files and dir

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

rm -r

A

removes dir and their contents recursively

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

rm -i

A

checks before every removal

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

cp

A

copies files and dir

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

cp -r

A

copies recursively

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

cp -v

A

explains what is being done

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

mv

A

moves(renames) files

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

mv -v

A

explains what is being done

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

touch

A

changes file timestamps; creates new file if it doesn’t exist

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

touch -c

A

doesn’t create new files

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

touch -a

A

only changes access time

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

touch -m

A

only changes modificiation time

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

touch -t

A

changes time to [[CC]MMDDhhmm[.ss] instead of current time

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

cat

A

concatenates files and prints on the standard output

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

cat

A

prints on the standard output

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

cat -n

A

numbers all output lines

24
Q

cat -s

A

suppresses repeated empty output lines

25
Q

cat -T

A

displays TAB char as ^I

26
Q

wc

A

prints newline, word and byte count

27
Q

wc -c

A

bytes

28
Q

wc -l

A

lines

29
Q

wc -w

A

words

30
Q

grep

A

matches patterns

31
Q

cut

A

removes sections from each line of files

32
Q

sort

A

sorts lines

33
Q

sort -v

A

explains what is being done

34
Q

sort -u

A

uniq

35
Q

sort -r

A

reverse

36
Q

sort -n

A

numeric sort

37
Q

cut -d

A

delimiter

38
Q

cut -f

A

field

39
Q

cut -c

A

only these chaarcters

40
Q

tr

A

translate or delete char

41
Q

tr -d

A

delete char in SET1

42
Q

tr -c

A

use the complement of SET1

43
Q

tr -t

A

first truncate SET1 to length of SET2

44
Q

echo

A

displays a line of text

45
Q

echo -n

A

suppresses trailing newline

46
Q

echo -e

A

enable interpretation of backslash escapes

47
Q

echo -E

A

disable interpretation of backslash escapes (default)

48
Q

> -

A

save

49
Q

<-

A

read

50
Q

> >

A

append

51
Q

«

A

here-doc

52
Q

«<

A

here-string

53
Q

sort -t “”

A

field separator

54
Q

uniq -d

A

display only the duplicate lines

55
Q

uniq -c

A