Skip to content

Commit 09ae157

Browse files
committed
adding outline of second command line tuts
1 parent 4c3236a commit 09ae157

2 files changed

Lines changed: 48 additions & 1 deletion

File tree

command-line/advanced-command-line/tutorial.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ layout: page
33
title: Advanced command line
44
---
55

6+
flags
7+
wildcards

command-line/command-line/tutorial.md

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,49 @@ layout: page
33
title: More command line
44
---
55

6-
In the previous lesson we have learnt how to navigate the directories (folders) of our computer using the command line, and how to create directories and files.
6+
In the previous lesson we have learnt how to navigate the directories (folders) of our computer using the command line, and how to create directories and files. In this lesson we'll look at more command line commands that will allow us to manipualte the directories and files on our computer even further.
7+
8+
## Example 1: copying, moving and removing directories and files
9+
10+
### `cp` or copying files and directories
11+
12+
```bash
13+
$ cp something.txt something_else.txt
14+
```
15+
16+
```bash
17+
$ cp folder/something.txt other_folder/
18+
```
19+
20+
```bash
21+
$ cp folder/something.txt folder/other_something.txt other_folder/
22+
```
23+
24+
### `mv` or moving files
25+
26+
```bash
27+
$ mv something.txt other_folder/
28+
```
29+
30+
```bash
31+
$ mv something.txt something_else.txt other_folder/
32+
```
33+
34+
```bash
35+
$ mv something.txt something_else.txt
36+
```
37+
38+
above command renames somethingtxt to something_else.txt
39+
40+
### `rm` or removing files
41+
42+
```bash
43+
$ rm something.txt
44+
```
45+
46+
rm -r command?
47+
48+
49+
### `rmdir` or removing directoris (only works on empty directories)
50+
51+
to delete folders with files in them use rm -r command

0 commit comments

Comments
 (0)