Compare commits
2 Commits
8fd941d5cf
...
5b15b0ffc2
Author | SHA1 | Date | |
---|---|---|---|
5b15b0ffc2 | |||
7df45bbed1 |
@ -1,34 +1,10 @@
|
||||
#set text(font: "FreeSans")
|
||||
#set page(margin: 1cm)
|
||||
#align(center)[#text(size: 1.3em)[= CS 3424 Quiz - Week 2]]
|
||||
|
||||
#show link: item => [
|
||||
#text(blue)[#item]
|
||||
]
|
||||
|
||||
#show raw.where(block: true): item => [
|
||||
#text(size: 0.8em)[#block(
|
||||
inset: 4pt,
|
||||
stroke: luma(60%) + .5pt,
|
||||
fill: luma(95%),
|
||||
radius: 3pt,
|
||||
)[#item]]
|
||||
]
|
||||
|
||||
#let comment(com) = {
|
||||
text(size: 0.75em, style: "italic", fill: rgb(64, 90, 95))[#com]
|
||||
}
|
||||
|
||||
|
||||
#let answer(ans) = {
|
||||
align(center)[#block(
|
||||
inset: 4pt,
|
||||
stroke: blue + .5pt,
|
||||
fill: rgb(0, 149, 255, 5%),
|
||||
radius: 3pt,
|
||||
)[#ans]]
|
||||
}
|
||||
|
||||
#align(center)[#text(size: 1.3em)[= CS 3424 Quiz - Week 2]]
|
||||
#align(center)[
|
||||
#("Price Hiller", "zfp106", "Quiz 1", "CS 3424").join(" ⋄ ")
|
||||
#v(-.5em)
|
||||
@ -45,49 +21,44 @@
|
||||
#v(-.5em)
|
||||
]
|
||||
|
||||
#let answer(ans) = {
|
||||
align(center)[#block(
|
||||
inset: 5pt,
|
||||
stroke: blue + .5pt,
|
||||
fill: rgb(0, 149, 255, 5%),
|
||||
radius: 4pt,
|
||||
)[#ans]]
|
||||
}
|
||||
|
||||
1. Show a command to list all files beginning with 'A' and ending with a .zip extension
|
||||
|
||||
#answer[
|
||||
#comment[Only for the files in the current directory:]
|
||||
```bash
|
||||
echo A*.zip
|
||||
```
|
||||
#comment[For all the files on the system that the user has access to:]
|
||||
|
||||
```bash
|
||||
# Searching for all files on the system that the current user has access
|
||||
# to, VERY SLOW
|
||||
find / -type f -name "A*.zip"
|
||||
```
|
||||
]
|
||||
|
||||
|
||||
2. Create an alias, `systems`, to change your current directory to *courses/cs3424/assignments* within your home directory.
|
||||
|
||||
#answer[
|
||||
```bash
|
||||
alias systems="cd ${HOME}/courses/cs3424/assignments"
|
||||
```
|
||||
|
||||
|
||||
#comment[This assumes the `${HOME}/courses/cs3424/assignments` directory already exists.]
|
||||
]
|
||||
|
||||
3. Use symbolic modes to change the permissions of `output.txt` to remove execution rights from the group and other.
|
||||
3. Use symbolic modes to change the permissions of `output`.txt to remove execution rights from the group and other.
|
||||
|
||||
#answer[
|
||||
```bash
|
||||
chmod "g-x,o-x" output.txt
|
||||
```
|
||||
|
||||
#comment[Assuming the `output.txt` file exists.]
|
||||
]
|
||||
|
||||
4. Use symbolic modes to change the permissions of all `.c` files in the current directory so the owner has read and execute access only, add read and write access to the group, and give everyone else reading access only.
|
||||
|
||||
#answer[
|
||||
```bash
|
||||
chmod "u=rx,g+rw,o=r" *.c
|
||||
chmod "u=rwx,g+rw,o=r" *.c
|
||||
```
|
||||
]
|
||||
|
||||
@ -112,9 +83,9 @@
|
||||
chmod 000000000000000000000000000000000000000000000000000000000000000000764 file1
|
||||
```
|
||||
|
||||
#comment[The above is, in fact, a valid octal value to pass to `chmod`.]
|
||||
#text(size: 0.75em)[_The above is, in fact, a valid octal value to pass to chmod._]
|
||||
|
||||
#comment[See below for what I assume is the "expected" answer:]
|
||||
#text(size: 0.75em)[_See below for what I assume is the "expected" answer:_]
|
||||
|
||||
```bash
|
||||
chmod 0764 file1
|
||||
|
Loading…
x
Reference in New Issue
Block a user