exam questions

Exam 200-901 All Questions

View all questions & answers for the 200-901 exam

Exam 200-901 topic 1 question 388 discussion

Actual exam question from Cisco's 200-901
Question #: 388
Topic #: 1
[All 200-901 Questions]



Refer to the exhibit. An engineer must add new users and set privileges for executing a few Python scripts. The engineer prepares a Bash script to automate this task. The script adds a user and a group from the command-line arguments, creates a directory, and copies the Python scripts to it. The script then changes to the directory and lists the scripts. Based on the script workflow, which process is being automated within the loop by using the list of Python scripts?

  • A. assigning execution privileges to the owner, setting the user and group owner to the scripts that were initially created, and storing the script names in a file.
  • B. creating a file with the content of all the files, assigning execution permissions to each script, and then changing ownership to the initially created user and group.
  • C. removing the files that are not Python, listing the Python files, and assigning execution privileges to the initially created user and group.
  • D. assigning execution privileges to everyone and changing the ownership to the initially created user and group.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
brunorpacheco
Highly Voted 1 year, 10 months ago
Selected Answer: A
https://askubuntu.com/questions/29589/chmod-ux-versus-chmod-x Its giving permissions to the owner and listing the names of the files in the new file content.txt
upvoted 6 times
...
herrmann69
Highly Voted 10 months, 1 week ago
Selected Answer: A
Its doing: line 9: append the filename to content.txt line 10: add execution permission for the user (owner) for the file line 11: change the owner to the user created in line 2 and the group created in line 3 So A is correct B is wrong since the content.txt only contains the filenames, not the content of all files. C is wrong since its not removing anything D is wrong since the execution privileges are only added for the owner/user (u) and not for all (a)
upvoted 5 times
Muste
9 months, 2 weeks ago
correct
upvoted 1 times
...
...
kymoni
Most Recent 8 months, 2 weeks ago
Selected Answer: A
"ls *.py | while read $file" will store a file name in the variable "file", not its content. Tested on Arch Linux
upvoted 2 times
...
lmqnam
1 year ago
Selected Answer: B
I choose B.
upvoted 2 times
...
Woonesuf
1 year, 10 months ago
Selected Answer: B
https://www.freecodecamp.org/news/linux-chmod-chown-change-file-permissions/
upvoted 3 times
rtg2123
1 year, 9 months ago
by doing "echo @file >>...." acctually the content of the file is redirected to the .txt file. So B is the correct answer
upvoted 1 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...