Skip to content

Commit

Permalink
add new questions + formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Ebazhanov committed Feb 12, 2022
1 parent 73cbe79 commit 364ddd3
Showing 3 changed files with 136 additions and 236 deletions.
34 changes: 20 additions & 14 deletions linux/linux-assesment.md
Original file line number Diff line number Diff line change
@@ -144,12 +144,12 @@ echo \$myNumber | sed -e 's/^[[:digit:]][[:digit:]][[:digit:]]/(&)/g'

#### Q19. What character class is equal to this set?

[0-9]
`[0-9]`

- [ ] [[:alnum:]]
- [x] [[:digit:]]
- [ ] [[:alpha:]]
- [ ] [[:num:]]
- [ ] `[[:alnum:]]`
- [x] `[[:digit:]]`
- [ ] `[[:alpha:]]`
- [ ] `[[:num:]]`

#### Q20. When archiving files, which command will preserve all file attributes including ACLs and SELinux security context?

@@ -174,7 +174,7 @@ echo \$myNumber | sed -e 's/^[[:digit:]][[:digit:]][[:digit:]]/(&)/g'

#### Q23. When would this system cron job run its task?

0 1 \* \* \*
`0 1 \* \* \*`

- [ ] every minute of the hour
- [ ] every hour of every day
@@ -329,10 +329,10 @@ date | mail -s "This is a remote test" user1@rhhost1.localnet.com

#### Q41. To search from the current cursor position up to the beginning of the file using VIM, type \_ and then the search criteria.

- [x] ?
- [ ] \
- [ ] /
- [ ] /search
- [x] `?`
- [ ] `\`
- [ ] `/`
- [ ] `/search`

#### Q42. What is the job of the NetworkManager daemon?

@@ -433,8 +433,7 @@ find / -size -10K -exec ls -l {} \;
- [ ] enter the sudo user's password
- [ ] change to the root group

**Reference:**
From docs: [A Cloud Guru's Blog](https://acloudguru.com/blog/engineering/linux-commands-for-beginners-sudo#:~:text=Sudo%20asks%20for%20your%20user%20password.%C2%A0%20Note%20that%20it%20is%20asking%20for%20your%20password%2C%20not%20the%20root%20password.)
[A Cloud Guru's Blog](https://acloudguru.com/blog/engineering/linux-commands-for-beginners-sudo#:~:text=Sudo%20asks%20for%20your%20user%20password.%C2%A0%20Note%20that%20it%20is%20asking%20for%20your%20password%2C%20not%20the%20root%20password.)

#### Q55. When would this system cron job run its task?

@@ -503,7 +502,7 @@ fi
- [ ] There are no issues with referring to partitions by their partition path.
- [ ] It is more difficult identifying mounted devices by partition path.

isse letter drift problem, mentionned here https://access.redhat.com/discussions/6004221
[Reference](https://access.redhat.com/discussions/6004221)

#### Q62. Which option would you choose to force grep to use a basic regular expression (BRE)?

@@ -512,7 +511,7 @@ isse letter drift problem, mentionned here https://access.redhat.com/discussions
- [ ] grep -e
- [x] grep -G

[Reference] Man page of grep command.
**Explanation**: Man page of grep command.

#### Q63. An rsyslogd filter determines which items in a log file to act on. What is it made up of?

@@ -663,3 +662,10 @@ if [[ $FILE == $GLOB ]] ;then
- [ ] EREs support occurrence operators.
- [ ] ERE's support alternation.
- [ ] only the syntax differs.

### Q81. What is the difference between reading the list of disk partitions from `/proc/partitions` and getting it using `fdisk -l`?

- [ ] `/proc/partitions` represents the disk partition table more accurately than `fdisk -l`
- [ ] `/proc/partitions` shows only mounted drives. `fdisk -l` shows all drivers.
- [ ] There is no difference between the two, and both lists contain the same data.
- [ ] `/proc/partitions` is the kernel's list of partitions held in ram. `fdisk -l` reads the partition table from the drive itself.
8 changes: 4 additions & 4 deletions mongodb/mongodb-quiz.md
Original file line number Diff line number Diff line change
@@ -512,14 +512,14 @@ Note: count() works with find(...) but length works with distinct

[Section blog](https://www.section.io/engineering-education/handling-json-in-mongodb/)

### Q73. From the MongoDB shell, how do you display all of a database's memory usage?
#### Q73. From the MongoDB shell, how do you display all of a database's memory usage?

- [ ] db.size()
- [ ] db.info()
- [ ] db.memory()
- [ ] db.stats()

### Q74. How do you create a new MongoDB user?
#### Q74. How do you create a new MongoDB user?

- [x] db.createUser({})
- [ ] db.insert({user: 1})
@@ -528,7 +528,7 @@ Note: count() works with find(...) but length works with distinct

[MongoDB documentation](https://docs.mongodb.com/manual/tutorial/create-users/)

### Q75. What is the internal data structure of a MongoDB document?
#### Q75. What is the internal data structure of a MongoDB document?

- [x] JSON (JavaScript Object Notation)
- [ ] BSON (Binary JSON)
@@ -537,7 +537,7 @@ Note: count() works with find(...) but length works with distinct

[MongoDB documentation](https://docs.mongodb.com/guides/server/introduction/)

### Q76. Which projection shows only the FirstName and lastName fields of a document in the customers collection?
#### Q76. Which projection shows only the FirstName and lastName fields of a document in the customers collection?

- [ ] `db.customers.find({}, {firstName: 1, lastName: 1})`
- [x] `db.customers.find({}, {_id:0, firstName: 1, lastName: 1})`
Loading

0 comments on commit 364ddd3

Please sign in to comment.