Module 1 Flashcards

1
Q

ls /
ls -l

A

list contents of directory
- list -l = gives more details of directory items

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

cd

A

change directory

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

tab

A

autofill command or name

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

pwd

A

Print Name of Working Directory

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

mkdir

A

make new directory

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

mkdir -p

A

create necessary parent directories
- eg. mkdir -p testparent/testkid = testkid within testparent directory

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

cd ../

A

move up one directory per ../

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

rm /
rm -r

A
  • rm = remove file
  • rm -r = remove directory (recursive)

CANNOT BE UNDONE

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

rwx

A

read (read only)
write (write only)
execute (run the file)

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

rwx
octal permission values

A
  • none = 0
  • read = 4
  • write= 2
  • execute = 1
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

touch

A

create new file

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

head /
head -n integer

A

outputs first 10 lines of text
- option -n : specify number of lines to output
- eg. head -n 5 = first 5 lines

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

tail /
tail -n integer

A

outputs last 10 lines of text

  • option -n: specify number of lines to output
  • eg. tail -n 5 = last 5 lines
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

grep

A

searches files for matching patterns
- eg. grep “the” poems.txt

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

cd ~/directory name

A

changes to named directory from home directory

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

chmod

A

changes permission mode string (eg. rwx)