Command line Flashcards

1
Q

How to go back one directory

A

To navigate up one directory level, use “cd ..”

To navigate to the previous directory (or back), use “cd -“

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

What does “cp” means?

A

The cp command will make a copy of a file for you. Example: “cp file foo” will make an exact copy of “file” and name it “foo”, but the file “file” will still be there. If you are copying a directory, you must use “cp -r directory foo” (copy recursively). (To understand what “recursively” means, think of it this way: to copy the directory and all its files and subdirectories and all their files and subdirectories of the subdirectories and all their files, and on and on, “recursively”)

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

How to check all the command lines you have enter?

A

enter “history”

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

What is the use of Ctrl + R?

A

Searches for commands you’ve already typed. When you have entered a very long, complex command and need to repeat it, using this key combination and then typing a portion of the command will search through your command history. When you find it, simply press Enter.

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

List the directories and files, including the hidden files

A

ls -Force

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

How to create a file ?

How to creatre a folder?

A

echo $null > filename

mkdir directory-name

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