summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authormo <mo.khan@gmail.com>2019-05-22 21:16:20 -0600
committermo <mo.khan@gmail.com>2019-05-22 21:16:20 -0600
commitf26ef828213641af79f769e28b1dcd081a50d7c3 (patch)
tree3b07048cce2670f71ea42fc5bc3d32d4cc9c62ce /README.md
parent5a2913e7e7fa2ea2db99110cd965dc06f5f6b0db (diff)
answer questions
Diffstat (limited to 'README.md')
-rw-r--r--README.md23
1 files changed, 23 insertions, 0 deletions
diff --git a/README.md b/README.md
index 65b4b63..cd3cdce 100644
--- a/README.md
+++ b/README.md
@@ -324,38 +324,61 @@ See `exercises/chapter-8.13`.
What do the following commands do?
+Force copy `sample` to `sample.bak`.
+
```bash
$ cp -f sample sample.bak
```
+Force copy `sample` to `sample.bak` and preserve the mode, ownership and timestamps from the original file.
+
```bash
$ cp -fp sample sample.bak
```
+Remove all files from `$HOME/personal/` that start with `memo` and have
+a `.doc` file extension. Prompt for deletion before each file.
+
```bash
$ rm -i ∼/personal/memo*.doc
```
+Remove all files from `$HOME/unixbook/finals/` that start with `ch`, is followed by 2 characters and has
+a `.prn` file extension. Prompt for deletion before each file.
+
```bash
$ rm -i ∼/unixbook/final/ch??.prn
```
+Fore delete all files from `$HOME/unixbook/finals/` that ends with a `.o` file extension.
+
```bash
$ rm -f ∼/unixbook/final/*.o
```
+Force delete all files that start with `lab` followed by any # from 1-6
+and has a file extension of `.c` or `.C` from the directory
+`$HOME/courses/ece446/`.
+
```bash
$ rm -f ∼/courses/ece446/lab[1-6].[cC]
```
+Recursively delete the directory `$HOME/NotNeededDirectory`.
+
```bash
$ rm -r ∼/NotNeededDirectory
```
+Recursively force delete the directory `$HOME/NotNeededDirectory`.
+
```bash
$ rm -rf ∼/NotNeededDirectory
```
+Recursively delete the directory `$HOME/NotNeededDirectory`, prompting
+before each item to delete.
+
```bash
$ rm -ri ∼/NotNeededDirectory
```