Linux Flashcards

1
Q

How do you use list command?

A

ls

ls /applications

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

How to change directory:

A

cd / (change to root dir)
cd .. (Change up one directory)
cd ~ (change to user home directory)

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

How to move file to another directory:

A

mv /folder1/file /folder2

Can also use it to rename.

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

How to get manual for command? How to exit?

A

man mv

Exit using q

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

How to make a directory? How to remove directory?

A

mkdir

rmdir

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

How to make file? How to remove file?

A

touch testfile.txt
rm testfile.txt

rm will remove files and directories with files.

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

How to find a file?

A

locate -i *test

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

How to clear terminal screen

A

clear

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

How to copy?

A

cp origfile newfile

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

What is grep command?

A

Searches text for match to given string.

grep ‘word’ filename

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

Name two options?

A
  • i means ignore case

- r means recursively

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