Skip to content

Commit e0bc73d

Browse files
committed
Editorial changes to Intro to Command Line
1 parent a55953b commit e0bc73d

1 file changed

Lines changed: 27 additions & 17 deletions

File tree

intro_to_command_line/README.md

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22

33

44
## Introduction
5-
Hey girls, the following steps will show you how to use the black window. This window is also called the "command line", "cmd", "prompt" and "terminal".
5+
Hey girls, the following steps will show you how to use the black window all hackers use. It might look a bit scary at first, but really, it is just a prompt, waiting for commands from you.
66

7-
Each operating system has a set of commands for the command line.
8-
Here is a summary of some useful commands:
7+
The window is usually called the *command line*, but you can also hear the following names: *cmd*, *prompt*, *console* or *terminal*.
8+
9+
Each operating system has a slightly different set of commands for the command line. Here is a summary of some useful commands:
910

1011
| Command (Windows) | Command (Mac OS / Linux) | Description | Example|
1112
| ------------- |-----------|-------------| -----|
@@ -16,46 +17,55 @@ Here is a summary of some useful commands:
1617
| move | mv | move file | **move c:\test\test.txt c:\windows\test.txt** |
1718
| mkdir | mkdir | create a new folder | **mkdir testfolder** |
1819
|del | rm | delete a folder/file | **del c:\test\test.txt**
19-
For more about the above commands, check out the Further Information section below.
20+
To learn more about the above commands, check out the Further Information section below.
2021

2122
These are just a very few of the possible black window commands.
2223
[ss64.com](http://ss64.com) contains a complete reference of commands for all operating systems.
2324

2425
## Useful shortcuts
2526

26-
* Up arrow - rerun previous commands. You can avoid typing the same commands again by using the up arrow key to rerun recently used commands.
27+
* **Up arrow** - rerun previous commands. You can avoid typing the same commands again by using the up arrow key to rerun recently used commands.
2728

2829

29-
* Tab key - the tab key will autocomplete folder and file names. For example, typing **dir t ** + Tab will autocomplete to all directories starting with t in the current directory (such as task, test, tutorial).
30+
* **Tab key** - the tab key will autocomplete folder and file names. For example, typing `dir t` + `Tab` will autocomplete to all directories starting with `t` in the current directory (such as task, test, tutorial).
3031

3132

3233
## Further information about the commands above
3334

34-
* The **exit** commmand - this will cause the window to close; it makes sense, right? No need to explain too much ...
35+
* **exit** - it closes the black window; it makes sense, right? No need to explain too much...
36+
37+
38+
* **cd** - it allows you to change your current directory. To use it type `cd [directoryname]` and press enter.
39+
40+
**For example:** let's say you are in a directory called `c:\test` with three sub-directories: `documents`, `photos`, and `music`.
3541

42+
c
43+
└───test
44+
documents
45+
photos
46+
music
3647

37-
* The **cd** command - this command allows you to change your current directory. To use the cd command you type cd directoryname and press enter.
38-
For example if you are in a directory called c:\test, and there were three directories in that the test directory called A, B, and C, you could just type **cd A** and press enter. You would then be in the c:\test\A.
48+
To go to the `documents` directory, simply type `cd documents` and press enter. You are now in `c:\test\A`. To move back to the `c:\test` directory, type `cd ..`.
3949

4050

41-
* The **cd ..** command - this will take you to the next folder up.
51+
* **dir** (Windows) / **ls** (others) - it lists files and directories located in your current directory. If you type `dir \test` or `ls test`, you will see the content of the `c:\test` directory.
52+
Note that for many commands you can use the `*` symbol which stands for *all* or *wildcard*. With this in mind, try typing `dir *.txt` for Windows or `ls *.txt` for other OS. It will list only files that end with `.txt`.
4253

4354

44-
* The **dir** (Windows) and **ls** (others) command - this will list the files and directories contained in your current directory. If I typed **dir \test** or **ls test** I would see the contents of the c:\test directory.
45-
Also note for many commands you can use the \* symbol which stands for wildcard. With this in mind, typing **dir *.txt** on WIN or **ls *.txt** on other OS will only list those files that end with .txt.
55+
* **copy** (Windows) / **cp** (others) - it allows you to copy files from one location to another. To use this command, type `copy [sourcefile] [targetfile]`.
4656

57+
**For example**: if you have the file `c:\test\test.txt` and you would like to copy it to `c:\windows\test.txt`, type:
4758

48-
* The **copy** (Windows) or **cp** (others) command - this allows you to copy files from one location to another. To use this command you would type **copy *sourcefile targetfile***. For example if you have the file c:\test\test.txt and would like to copy it to c:\windows\test.txt you would type
49-
**copy c:\test\test.txt c:\windows\test.txt** and press enter.
59+
copy c:\test\test.txt c:\windows\test.txt
5060

5161

52-
* The **move** (Windows) or **mv** (others) command - this allows you to move files from one location to another. The syntax you use is the same as for the **copy** command.
62+
* **move** (Windows) / **mv** (others) - it allows you to move files from one location to another. The syntax you use is the same as for the `copy` command.
5363

5464

55-
* The **mkdir** command - this allows you to create a new directory. For example **mkdir temp** creates a new folder called temp in the current directory.
65+
* **mkdir** - it allows you to create a new directory. For example, `mkdir temp` creates a new folder called `temp` in the current directory.
5666

5767

58-
* The **del** (Windows) or **rm** command (others) - this allows you to delete the specified file. For example, **del test.txt** deletes the test.txt file from the current directory.
68+
* **del** (Windows) / **rm** (others) - it allows you to delete the specified file. For example, `del test.txt` deletes the `test.txt` file from the current directory.
5969

6070

6171

0 commit comments

Comments
 (0)