shell basics 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
cat -T
displays TAB char as ^I
26
wc
prints newline, word and byte count
27
wc -c
bytes
28
wc -l
lines
29
wc -w
words
30
grep
matches patterns
31
cut
removes sections from each line of files
32
sort
sorts lines
33
sort -v
explains what is being done
34
sort -u
uniq
35
sort -r
reverse
36
sort -n
numeric sort
37
cut -d
delimiter
38
cut -f
field
39
cut -c
only these chaarcters
40
tr
translate or delete char
41
tr -d
delete char in SET1
42
tr -c
use the complement of SET1
43
tr -t
first truncate SET1 to length of SET2
44
echo
displays a line of text
45
echo -n
suppresses trailing newline
46
echo -e
enable interpretation of backslash escapes
47
echo -E
disable interpretation of backslash escapes (default)
48
>-
save
49
<-
read
50
>>
append
51
<<
here-doc
52
<<<
here-string
53
sort -t ""
field separator
54
uniq -d
display only the duplicate lines
55
uniq -c