diff options
| author | mo <mo.khan@gmail.com> | 2019-05-22 21:16:20 -0600 |
|---|---|---|
| committer | mo <mo.khan@gmail.com> | 2019-05-22 21:16:20 -0600 |
| commit | f26ef828213641af79f769e28b1dcd081a50d7c3 (patch) | |
| tree | 3b07048cce2670f71ea42fc5bc3d32d4cc9c62ce | |
| parent | 5a2913e7e7fa2ea2db99110cd965dc06f5f6b0db (diff) | |
answer questions
| -rw-r--r-- | README.md | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -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 ``` |
