Skip to content

Commit

Permalink
docs: change the cmd 'tar -czf home.tar.gz .' to 'ls -lRr / 2>1 >/dev…
Browse files Browse the repository at this point in the history
…/null'
  • Loading branch information
amin authored and zanninso committed May 20, 2024
1 parent 9ef1f00 commit 7accc01
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions subjects/0-shell/job-control/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@ This project will help you learn about:

```
student$ ./0-shell
$ tar -czf home.tar.gz . &
$ ls -lRr / 2>1 >/dev/null &
[1] 8287
$ sleep 50 &
[2] 8870
$ jobs
[1]- Running tar -czf home.tar.gz . &
[1]- Running ls -lRr / 2>1 >/dev/null &
[2]+ Running sleep 50 &
$ jobs -l
[1]- 8287 Running tar -czf home.tar.gz . &
[1]- 8287 Running ls -lRr / 2>1 >/dev/null &
[2]+ 8870 Running sleep 50 &
$ kill 8287
[1]+ Terminated tar -czf home.tar.gz .
[1]+ Terminated ls -lRr / 2>1 >/dev/null
$ jobs
[2]+ Running sleep 50 &
$ exit
Expand Down
14 changes: 7 additions & 7 deletions subjects/0-shell/job-control/audit.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@

#### Functional

##### Try to run the command `"tar -czf home.tar.gz . &"` then run the command `"jobs"`.
##### Try to run the command `"ls -lRr / 2>1 >/dev/null &"` then run the command `"jobs"`.

```
[1]+ Running tar -czf home.tar.gz . &
[1]+ Running ls -lRr / 2>1 >/dev/null &
```

###### Can you confirm that the program displayed a list with the status of all jobs like in the example above?

##### Try to run the command `"jobs -l"`.

```
[1]+ 13612 Running tar -czf home.tar.gz . &
[1]+ 13612 Running ls -lRr / 2>1 >/dev/null &
```

###### Can you confirm that the program added the process ID to the normal information given in the command `"jobs"` like in the example above?
Expand All @@ -31,7 +31,7 @@
##### Try to run the command `"sleep 50000 &"` then run `"python &"` and press enter without any input in the last command.

```
[1] Running tar -czf home.tar.gz . &
[1] Running ls -lRr / 2>1 >/dev/null &
[2]- Running sleep 50000 &
[3]+ Stopped python
```
Expand All @@ -41,7 +41,7 @@
##### Try to run the command `"jobs -r"`.

```
[1] Running tar -czf home.tar.gz . &
[1] Running ls -lRr / 2>1 >/dev/null &
[2]- Running sleep 50000 &
```

Expand All @@ -66,12 +66,12 @@
##### Try to run the command `"kill %1"`.

```
[1] Terminated tar -czf home.tar.gz
[1] Terminated ls -lRr / 2>1 >/dev/null
```

###### Can you confirm that the program killed and displayed the first process like in the example above?

##### Close the program and run it again. Try to run the commands `"tar -czf home.tar.gz . &"`, `"sleep 50000 &"` and then run `"fg"`.
##### Close the program and run it again. Try to run the commands `"ls -lRr / 2>1 >/dev/null &"`, `"sleep 50000 &"` and then run `"fg"`.

```
sleep 50000
Expand Down

0 comments on commit 7accc01

Please sign in to comment.