You've already forked devops-exercises
Add Terraform and Linux questions and exercises
Also updated the script that counts questions to actually update the number in README.md
This commit is contained in:
15
topics/linux/exercises/copy/README.md
Normal file
15
topics/linux/exercises/copy/README.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# Copy Time
|
||||
|
||||
## Objectives
|
||||
|
||||
1. Create an empty file called `x` in `/tmp`
|
||||
2. Copy the `x` file you created to your home directory
|
||||
3. Create a copy of `x` file called `y`
|
||||
4. Create a directory called `files` and move `x` and `y` there
|
||||
5. Copy the directory "files" and name the copy `copy_of_files`
|
||||
6. Rename `copy_of_files` directory to `files2`
|
||||
7. Remove `files` and `files2` directories
|
||||
|
||||
## Solution
|
||||
|
||||
Click [here](solution.md) to view the solution.
|
||||
25
topics/linux/exercises/copy/solution.md
Normal file
25
topics/linux/exercises/copy/solution.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# Copy Time
|
||||
|
||||
## Objectives
|
||||
|
||||
1. Create an empty file called `x` in `/tmp`
|
||||
2. Copy the `x` file you created to your home directory
|
||||
3. Create a copy of `x` file called `y`
|
||||
4. Create a directory called `files` and move `x` and `y` there
|
||||
5. Copy the directory "files" and name the copy `copy_of_files`
|
||||
6. Rename `copy_of_files` directory to `files2`
|
||||
7. Remove `files` and `files2` directories
|
||||
|
||||
## Solution
|
||||
|
||||
```
|
||||
touch /tmp/x
|
||||
cp x ~/
|
||||
cp x y
|
||||
mkdir files
|
||||
cp x files
|
||||
cp y files
|
||||
cp -r files copy_of_files
|
||||
mv copy_of_files files2
|
||||
rm -rf files files2
|
||||
```
|
||||
Reference in New Issue
Block a user