adds test
This commit is contained in:
parent
9958b5a185
commit
a371f5f045
|
@ -221,13 +221,13 @@
|
||||||
* E) `touch newfile.txt afile.txt`
|
* E) `touch newfile.txt afile.txt`
|
||||||
2. You want to copy a directory, `MyFiles`, to a USB flash drive that uses the FAT filesystem. The contents of `MyFiles` are as follows:
|
2. You want to copy a directory, `MyFiles`, to a USB flash drive that uses the FAT filesystem. The contents of `MyFiles` are as follows:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ ls -l MyFiles/
|
$ ls -l MyFiles/
|
||||||
total 276
|
total 276
|
||||||
-rw-r--r-- 1 jen users 129840 Nov 8 15:13 contract.odt
|
-rw-r--r-- 1 jen users 129840 Nov 8 15:13 contract.odt
|
||||||
-rw-r--r-- 1 rod users 42667 Nov 8 15:12 outline.pdf
|
-rw-r--r-- 1 rod users 42667 Nov 8 15:12 outline.pdf
|
||||||
-rw-r--r-- 1 sam users 105979 Nov 8 15:12 Outline.PDF
|
-rw-r--r-- 1 sam users 105979 Nov 8 15:12 Outline.PDF
|
||||||
```
|
```
|
||||||
|
|
||||||
The USB flash drive is mounted at `/media/usb`, and so you type `cp -a MyFiles /media/`. What problem will occur when you attempt to copy these files?
|
The USB flash drive is mounted at `/media/usb`, and so you type `cp -a MyFiles /media/`. What problem will occur when you attempt to copy these files?
|
||||||
* A) The command will fail because it tries to create links.
|
* A) The command will fail because it tries to create links.
|
||||||
|
@ -410,10 +410,10 @@ The USB flash drive is mounted at `/media/usb`, and so you type `cp -a MyFiles /
|
||||||
* E) Run a spell checker on the script to ensure it contains no bugs.
|
* E) Run a spell checker on the script to ensure it contains no bugs.
|
||||||
2. Describe the effect of the following short script, `cp1`, if it's called as `cp1 big.c big.cc`:
|
2. Describe the effect of the following short script, `cp1`, if it's called as `cp1 big.c big.cc`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
cp $2 $1
|
cp $2 $1
|
||||||
```
|
```
|
||||||
|
|
||||||
* A) It has the same effect as the `cp` command, copying the contents of `big.c` to `big.cc`.
|
* A) It has the same effect as the `cp` command, copying the contents of `big.c` to `big.cc`.
|
||||||
* B) It compiles the C program `big.c` and calls the result `big.cc`.
|
* B) It compiles the C program `big.c` and calls the result `big.cc`.
|
||||||
|
@ -430,12 +430,12 @@ The USB flash drive is mounted at `/media/usb`, and so you type `cp -a MyFiles /
|
||||||
5. True or false: Valid looping statements in Bash include `for`, `while`, and `until`.
|
5. True or false: Valid looping statements in Bash include `for`, `while`, and `until`.
|
||||||
6. True or false: The following script launches three simultaneous instances of the `terminal` program.
|
6. True or false: The following script launches three simultaneous instances of the `terminal` program.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
terminal
|
terminal
|
||||||
terminal
|
terminal
|
||||||
terminal
|
terminal
|
||||||
```
|
```
|
||||||
|
|
||||||
7. You've written a simple shell script that does nothing but launch programs. In order to ensure that the script works with most user shells, what should its first line read?
|
7. You've written a simple shell script that does nothing but launch programs. In order to ensure that the script works with most user shells, what should its first line read?
|
||||||
8. What command can you use to display prompts for a user in a shell script?
|
8. What command can you use to display prompts for a user in a shell script?
|
||||||
|
|
Loading…
Reference in New Issue