Questão de Sistemas Operacionais — Linux — CESPE / CEBRASPE 2022
Sistemas OperacionaisLinux
- Código
- ce383341
- Banca
- CESPE / CEBRASPE
- Órgão
- ApexBrasil
- Ano
- 2022
- Cargo
- Ana (APEX)
#!/bin/bash for FILE in $ (ls -1 grep arquivo) do FILES=($ FILE) FILE="$ {FILE%.*}" FILE="$ {FILE:7:1}" FILE="$ (($ FILE % 2))" if [ $ FILE -eq 0 ] then chmod 640 $ FILES else chmod 043 $ FILES fi done Assinale a opção que corresponde ao resultado da execução do Shell Script anterior.
- A---------- 1 tomcat tomcat 13 jun 15 16:47 arquivo1.txt ---------- 1 tomcat tomcat 26 jun 15 16:47 arquivo2.txt ---------- 1 tomcat tomcat 39 jun 15 16:47 arquivo3.txt ---------- 1 tomcat tomcat 52 jun 15 16:47 arquivo4.txt
- B-r---wx--- 1 tomcat tomcat 13 jun 15 16:47 arquivo1.txt -r---wx--- 1 tomcat tomcat 26 jun 15 16:47 arquivo2.txt -r---wx--- 1 tomcat tomcat 39 jun 15 16:47 arquivo3.txt -r---wx--- 1 tomcat tomcat 52 jun 15 16:47 arquivo4.txt
- C--w--wx--x 1 tomcat tomcat 13 jun 15 16:47 arquivo1.txt -----wx--x 1 tomcat tomcat 26 jun 15 16:47 arquivo2.txt --w--wx--x 1 tomcat tomcat 39 jun 15 16:47 arquivo3.txt -----wx--x 1 tomcat tomcat 52 jun 15 16:47 arquivo4.txt
- D----r---wx 1 tomcat tomcat 13 jun 15 16:47 arquivo1.txt -rw-r----- 1 tomcat tomcat 26 jun 15 16:47 arquivo2.txt ----r---wx 1 tomcat tomcat 39 jun 15 16:47 arquivo3.txt -rw-r----- 1 tomcat tomcat 52 jun 15 16:47 arquivo4.txt