LPI 102 - Shells, Scripting And Data Management 2- Marcus Vinicius Braga Alcantara

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Viniciusalcantar
V
Viniciusalcantar
Community Contributor
Quizzes Created: 11 | Total Attempts: 7,534
| Attempts: 241 | Questions: 72 | Updated: Jul 22, 2024
Please wait...
Question 1 / 72
0 %
0/100
Score 0/100
1. O comando alias permite que sejam criados aliases de comando no sistema enquanto o comando unalias remove aliases do sistema?

Explanation

The statement is true. The "alias" command allows users to create aliases for commands in the system, which means they can create shortcuts or alternative names for commands. On the other hand, the "unalias" command is used to remove aliases from the system. So, the "alias" command creates aliases, while the "unalias" command removes them. Therefore, the statement is correct.

Submit
Please wait...
About This Quiz
LPI 102 - Shells, Scripting And Data Management 2- Marcus Vinicius Braga Alcantara - Quiz

.

2.
We’ll put your name on your report, certificate, and leaderboard.
2. Ao encerrar a sessão do shell, o bash executa as instruções contidas no arquivo ~/.bash_logout, se o mesmo existir.

Explanation

When closing the shell, the bash executes the instructions contained in the file ~/.bash_logout, if it exists.

Submit
3. Qual o benefício que proporciona um alias?

Explanation

An alias provides the benefit of avoiding the need to type long commands. By creating a shorter alias for a command, users can save time and effort by simply using the alias instead of typing out the entire command. This can be particularly useful for frequently used or complex commands, as it allows for quicker and more efficient execution.

Submit
4. O que a seguinte linha de comando irá retornar: echo "eu sou o usuário: $USER" ?

Explanation

The given correct answer states that the command "echo "eu sou o usuário: $USER"" will return the text "eu sou o usuário:" followed by the name of the current user. This is because "$USER" is a special variable that holds the name of the current user in Unix-like operating systems. Therefore, when the command is executed, it will replace "$USER" with the actual username and display the complete sentence.

Submit
5. Qual diretório /etc é usado para manter uma cópia de amostra de arquivos e diretórios para quando um novo usuário tem um diretório HOME criado ? (Por favor, forneça o caminho completo).

Explanation

The correct answer is /etc/skel or /etc/skel/. The directory /etc/skel is used to keep a sample copy of files and directories that will be automatically copied to a new user's home directory when it is created. This allows the new user to have a pre-defined set of files and directories already in place.

Submit
6. Por padrão, o conteúdo de qual diretório será copiado para o diretório home de um novo usuário quando a conta é criada passando a opção -m para o comando useradd? (Especifique o caminho completo para o diretório).

Explanation

The correct answer is /etc/skel or /etc/skel/. When creating a new user account using the useradd command with the -m option, the content of the /etc/skel directory will be copied to the new user's home directory. The /etc/skel directory contains default files and configurations that will be available to the new user upon account creation.

Submit
7. Você está usando uma aplicação que você deseja que apareça na tela de outro computador. Qual variável de ambiente você deveria definir ou editar para conseguir isso?

Explanation

To display an application on another computer's screen, you need to set or edit the "DISPLAY" environment variable. This variable specifies the display server's address where the application should be shown. By setting the "DISPLAY" variable to the appropriate value (e.g., IP address or hostname of the remote computer), the application will be able to appear on the desired screen.

Submit
8. Qual palavra está faltando a seguinte instrução SQL? __________ count(*) from tablename;

Explanation

The given SQL instruction is missing the keyword "SELECT" before the count(*) function. In SQL, the SELECT keyword is used to retrieve data from a database table, and it should be included before the count(*) function to specify which columns or data we want to retrieve.

Submit
9. Que palavra irá completar uma condicional "se" no bash, como o seguinte: if [ -x "$file" ]; then echo $file________(Por favor, forneça apenas a palavra em falta).

Explanation

The missing word to complete the conditional statement in bash is "fi". In bash scripting, "fi" is used to close the "if" statement. It indicates the end of the block of code that should be executed if the condition specified in the "if" statement is true.

Submit
10. Você emitiu o comando: export CFLAGS="-march-i586". Você pode remover esta variável de ambiente usando o comando: ________CFLAGS

Explanation

The correct answer is "unset". This command is used to remove or unset a variable from the environment. In this case, the variable "CFLAGS" is being removed from the environment by using the "unset" command.

Submit
11. Qual palavra está faltando a seguinte instrução SQL ? select count(*) _________ table name;

Explanation

The missing word in the SQL instruction is "from". The "from" keyword is used to specify the table from which the data is being selected in the SQL query.

Submit
12. Qual dos comandos a seguir aplicam direitos e restrições respectivamente quando do uso da linguagem SQL padrão?

Explanation

The correct answer is "grant e revoque". In SQL, the "grant" command is used to apply rights and permissions to database objects, allowing users to perform certain actions on them. On the other hand, the "revoque" command is used to revoke or remove those rights and permissions from users. So, these two commands are used to grant and revoke rights and restrictions in the standard SQL language.

Submit
13. Este shell script irá retornar qual dos valores abaixo?

Explanation

The given shell script will return the value "O resultado é: 30".

Submit
14. Que palavra-chave está em falta a partir deste exemplo de código de um shell script?

Explanation

The missing keyword in this shell script example is "for". It is used to create a loop that will iterate a specific number of times, based on a given condition or range of values. The "for" loop is commonly used when you know the exact number of iterations you want to perform.

Submit
15. Existe um problema ao se realizar operações matemáticas com o shell bash: Seus operadores só suportam aritmética de números inteiros. Segue um exemplo de um shell script que realiza uma operação de divisão, onde o valor correto a ser retornado seria 4,5, porém o bash irá retonar o valor de número 4. Uma alternativa a ser utilizada para tal problema seria utilizar a calculadora interna do bash (bc).

Explanation

The given statement is true. The explanation states that there is a problem when performing mathematical operations with the bash shell because its operators only support arithmetic with integers. It provides an example of a shell script that performs a division operation, where the correct value to be returned would be 4.5, but the bash shell will return the integer value of 4 instead. The explanation suggests using the internal calculator of bash (bc) as an alternative solution to this problem.

Submit
16. Você percebe que executa uma série de comandos com certa frequência. Você deseja que esta série de comandos esteja disponível em seu login para executar no shell atual.

Explanation

The correct answer is to create a function. By creating a function, you can define a series of commands that can be easily executed whenever needed. This allows you to have the series of commands available in your login and execute them in the current shell.

Submit
17. Que saída produzirá o seguinte comando seq 10?

Explanation

The command "seq 10" will produce the numbers from 1 to 10, with each number on a separate line.

Submit
18. Qual dos seguintes arquivos, quando existentes, afetam o comportamento do shell Bash ? (Escolha duas respostas corretas.)

Explanation

The correct answer is ~/.bashrc and ~/.bash_profile. These two files affect the behavior of the Bash shell. The ~/.bashrc file contains the individual user configurations for the Bash shell, such as aliases, functions, and settings. It is executed for each new interactive shell session. On the other hand, the ~/.bash_profile file is executed only for login shells and is commonly used to set environment variables and execute commands that should be run once when the user logs in.

Submit
19. Qual é a diferença entre os comandos test -e path e test -f path ?

Explanation

The correct answer explains that both options (-e and -f) check for the existence of the path. However, the -f option also confirms that the path is a regular file.

Submit
20. O que irá realizar o seguinte comando: "export PATH = $PATH: $APPLICATIONS"

Explanation

This command will update the PATH variable by adding the value of $APPLICATIONS to it. The $PATH represents the current value of the PATH variable, and the $APPLICATIONS represents the value of the APPLICATIONS variable. By using the command "export PATH=$PATH:$APPLICATIONS", the PATH variable will be updated to include the value of $APPLICATIONS, allowing the system to search for executables in that directory.

Submit
21. Os colchetes "[ ]" utilizados após o comando if, poderiam ser substituídos pelo comando _______.

Explanation

The brackets "[ ]" used after the if statement can be replaced by the command "test". This means that the condition being tested in the if statement is being evaluated using the "test" command.

Submit
22. Quando nós logamos em um sistema linux, o shell bash é iniciado com um shell de login. Este shell procura por quatro arquivos de inicialização para processar seus comandos na seguinte orden:

Explanation

When we log in to a Linux system, the bash shell is started with a login shell. This shell looks for four initialization files to process its commands in the following order: /etc/profile, ~/.bash_profile, ~/.bash_login, and ~/.profile. The answer provided lists the correct order of these files for the shell to process.

Submit
23. Quando o comando "echo $?" retorna a saída igual a 1, qual das seguintes afirmações é verdadeira ?

Explanation

When the command "echo $?" returns an output equal to 1, it indicates that the command executed immediately before the echo command had an exit status of 1. The exit status is a value returned by a command to the shell, indicating whether the command executed successfully or encountered an error. Therefore, in this case, the correct answer is that it is the exit value of the command executed immediately before the echo command.

Submit
24. A saída do comando 'seq 0 7 30' é:

Explanation

not-available-via-ai

Submit
25. Qual dos comandos abaixo pode ser utilizado em uma instrução SQL para combinar um resultado entre duas tabelas distintas através de um relacionamento existente entre elas?

Explanation

JOIN is the correct answer because it is the command used in SQL to combine the result of a query from two different tables based on a common relationship between them. It allows for the retrieval of data from multiple tables in a single query by matching rows with the same values in specified columns. This helps in creating a connection between related data and obtaining a comprehensive result set.

Submit
26. Um usuário reclamou que programas iniciados a partir de HOME não define a utilização de seu editor de texto favorito. Qual dos seguintes arquivos você deve editar para alterar isso?

Explanation

The correct answer is ".bashrc". This file is a script that is executed whenever a new interactive shell is started. By editing this file, the user can customize their shell environment, including setting the default editor for programs started from the home directory.

Submit
27. Observe o script abaixo e assinale a alternativa que irá apresentar uma saída similar a do script.

Explanation

The correct answer is "ls *.mp3" because this command will list all files in the current directory that have the .mp3 extension, which is the same output as the given script.

Submit
28. A instrução ________ executa um ação em loop até que uma afirmação não seja mais verdadeira.

Explanation

The given question is asking for the instruction that executes an action in a loop until a condition is no longer true. The correct answer is "while" because the "while" loop continues to execute the code block as long as the specified condition is true. Once the condition becomes false, the loop stops executing.

Submit
29. Qual das seguintes alternativas são operadores usados ​​para comparações pelo comando teste? (Escolha duas correta respostas).

Explanation

The correct answer is = and -eq. These are operators used in the test command for comparisons. The = operator is used for string comparisons, while the -eq operator is used for numeric comparisons.

Submit
30. De acordo com o diagrama ER abaixo, Assinale a alternativa correta. Qual das alternativas abaixo irá retornar a quantidade de registros na tabela tbl_Livro?

Explanation

A opção correta é "select count(*) from tbl_Livro;". Essa consulta irá retornar a quantidade de registros na tabela "tbl_Livro". O comando "count(*)" conta o número de linhas na tabela. As outras opções não retornarão a quantidade de registros, mas sim outros tipos de informações, como todos os registros da tabela ("select * from tbl_Livro;"), o valor máximo de uma coluna ("select max(*) from tbl_Livro;") e a média de uma coluna ("select avg(*) from tbl_Livro;").

Submit
31. Qual dos seguintes é a melhor maneira para listar todas as variáveis de shell definidas?

Explanation

The "set" command is the best way to list all the shell variables defined. It displays all the variables, including environment variables, local variables, and shell functions. The "env" command lists only the environment variables, while "env -a" lists all variables, including environment variables and shell variables, but it is not the best option as it includes unnecessary information. The "echo $ENV" command only displays the value of the "ENV" environment variable, not all variables.

Submit
32. Qual será o resultado produzido pelo seguinte comando: "seq 1 5 20" ?

Explanation

not-available-via-ai

Submit
33. Bash, o shell padrão, usa o script de inicialização _________ para shells "interativos", e o _________ para shells de "login".

Explanation

The correct answer is "/etc/bash.bashrc e /etc/profile". In Bash, the "/etc/bash.bashrc" file is used for "interactive" shells, while the "/etc/profile" file is used for "login" shells. These files contain initialization scripts that are executed when a shell is started, providing settings and configurations for the shell environment.

Submit
34. Depois de emitir: "function myfunction { echo $1 $2; }" em seu bash. A saída no stdout ao executar: "myfunction A B C" será:

Explanation

After defining the function "myfunction { echo $1 $2; }" in the bash, the output on stdout when executing "myfunction A B C" will be "A B". This is because the function is defined to only echo the first two arguments passed to it, which in this case are "A" and "B". The third argument "C" is not included in the output.

Submit
35. Estou criando um shell script e necessito redirecionar a saída de um comando à uma variável. Qual das alternativas é verdadeira para realizar tal procedimento?

Explanation

The correct answer is "O comando deve está entre crases. Ex: PROCESSOS_ATUAIS=`ps aux`". This is because using backticks or crases around a command in shell scripting allows the output of that command to be assigned to a variable. In this case, the command "ps aux" will be executed and the output will be stored in the variable PROCESSOS_ATUAIS.

Submit
36. Supondo que você criou uma tabela chamada "Clientes" e depois de um certo tempo decidiu alterar o nome desta tabela para "Meus_Clientes", qual instrução SQL iria realizar esta tarefa?

Explanation

To rename a table in SQL, the correct syntax is "rename table Clientes to Meus_Clientes;". This statement will change the name of the table "Clientes" to "Meus_Clientes".

Submit
37. Qual dos comandos a seguir permite que o usuário smith seja removido quando do uso da linguagem SQL padrão?

Explanation

The correct answer is "drop user smith". In SQL, the "drop user" command is used to remove a user from the database. By specifying the username "smith" after the command, it indicates that the user named "smith" should be removed. The other options ("delete user smith", "cancel user smith", and "remove user smith") are not valid SQL commands for removing a user.

Submit
38. Qual dos seguintes comandos atribui a saída do comando date à variável shell chamada mydate?

Explanation

The correct answer is mydate="$(date)". This command assigns the output of the "date" command to the shell variable called "mydate". The "$()" syntax is used to capture the output of a command and assign it to a variable.

Submit
39. Analise o comando abaixo e marque a opção correta:

Explanation

The correct answer states that the order of the fields is not important when inserting data into the table, as long as the order of the values matches the order of the fields. This means that when inserting data, the values must be provided in the same order as the fields in the table, but the fields themselves can be in any order.

Submit
40. Qual dos seguintes comandos cria uma função Bash que gera a soma de dois números?

Explanation

The correct answer is "function sumitup { echo $(($1 + $2)) ; }". This is the correct command to create a Bash function that generates the sum of two numbers. The function is named "sumitup" and it uses the echo command to output the result of the addition of the two input numbers, which are represented by $1 and $2. The $(()) syntax is used to perform the arithmetic addition operation.

Submit
41. Os usuários geralmente querem configurar seu login e shell interativo de maneira similar. Para fazer isso, eles escolhem interpretar (ou "fonte") o contéudo de ~/.bashrc no arquivo ~/.bash_profile. É possível fazer a mesma coisa com arquivos comuns a todos os usuários (referenciando _________ a partir de _________).

Explanation

Os usuários geralmente querem configurar seu login e shell interativo de maneira similar. Para fazer isso, eles escolhem interpretar (ou "fonte") o conteúdo de ~/.bashrc no arquivo ~/.bash_profile. É possível fazer a mesma coisa com arquivos comuns a todos os usuários referenciando /etc/bash.bashrc a partir de /etc/profile.

Submit
42. Estou escrevendo um shell script onde necessito realizar uma operação matemática e atribuir seu resultado à uma variável. Qual das alternativas corresponde a sintaxe correta desta tarefa? (Selecione 2 respostas).

Explanation

The correct answer is "RESULT=$[2+6], RESULT=$((2+6))". The first option "RESULT=$[2+6]" uses the square brackets syntax to perform the mathematical operation and assign the result to the variable RESULT. The second option "RESULT=$((2+6))" uses double parentheses to perform the mathematical operation and assign the result to the variable RESULT.

Submit
43. Você deseja executar o comando ls, mas parece ser alias. Qual é a maneira mais fácil de executar o ls original ?

Explanation

The given answer suggests using the backslash (\) before the command "ls" to execute the original version of the command. In this case, the backslash will bypass any alias that may have been set for the "ls" command and directly execute the original command.

Submit
44. Qual das alternativas abaixo contén operadores lógicos utilizados em SQL?

Explanation

The correct answer is "AND, OR e AND NOT". In SQL, the logical operators "AND" and "OR" are used to combine multiple conditions in a query, while "AND NOT" is used to exclude certain conditions from the result set. The other options listed do not contain valid SQL logical operators.

Submit
45. Para testar um script em shell chamado meuscript, a variável de ambiente FOOBAR deve ser removida temporariamente. Como isto pode ser feito?

Explanation

To temporarily remove the environment variable FOOBAR in order to test a shell script called meuscript, the command "env -u FOOBAR meuscript" can be used. This command unsets the value of the FOOBAR variable for the duration of executing the meuscript script.

Submit
46. Qual palavra está faltando a seguinte instrução SQL? insert into tablename ________(909, 'text');

Explanation

not-available-via-ai

Submit
47. A instrução ________ executa um ação em loop até que uma afirmação seja verdadeira.

Explanation

The instruction "until" executes an action in a loop until a certain condition becomes true.

Submit
48. Que saída produzirá a seguinte sequência de comandos? echo '1 2 3 4 5 6' | while read a b c ; do echo resultado: $c $b $a; done

Explanation

The given command "echo '1 2 3 4 5 6' | while read a b c ; do echo resultado: $c $b $a; done" reads the input "1 2 3 4 5 6" and assigns the values to variables a, b, and c. Then, it echoes the result in the format "resultado: $c $b $a". So, the output will be "resultado: 3 4 5 6 2 1".

Submit
49. Quais comandos exibe somente as funções disponíveis em um shell bash? (Selecione 2 respostas)

Explanation

The "declare -f" and "typeset -f" commands are used to display only the available functions in a bash shell. The "set" command displays all shell variables and functions, not just the functions. The "function" command is not a valid command in bash. Therefore, the correct answers are "declare -f" and "typeset -f".

Submit
50. Quando o bash é inicializado em uma sessão como shell interativo, mas não se tratando como uma sessão X), o bash busca instruções dos arquivos ______ e ______ se os mesmos existirem.

Explanation

When bash is initialized in an interactive shell session (excluding an X session), it looks for instructions from the files /etc/bash.bashrc and ~/.bashrc if they exist. The /etc/bash.bashrc file contains system-wide bash initialization instructions, while the ~/.bashrc file contains user-specific bash initialization instructions. By checking these files, bash can execute any commands or configurations specified in them to set up the shell environment correctly for the user.

Submit
51. Qual palavra está faltando a seguinte instrução SQL? update tablename ____ fieldname='value' where id=909; (Por favor, especifique a palavra que falta utilizando apenas letras minúsculas).

Explanation

The missing word in the given SQL instruction is "set". In an SQL update statement, the "set" keyword is used to specify which column or field should be updated with a new value. In this case, the missing word "set" indicates that the "fieldname" should be updated with the value 'value' where the id is equal to 909.

Submit
52. Comandos da categoria "internos" não geram novos processos no sistema?

Explanation

Comandos da categoria "internos" não geram novos processos no sistema. Isso significa que esses comandos são executados dentro do mesmo processo em que foram chamados, sem a necessidade de criar um novo processo. Esses comandos geralmente são utilizados para realizar tarefas internas do sistema operacional, como manipulação de arquivos, gerenciamento de memória e controle de processos.

Submit
53. De acordo com o diagrama ER abaixo, Assinale a alternativa correta. Qual das alternativas abaixo irá remover a coluna/campo "Sobrenome_Autor" da tabela "tbl_Autores"?

Explanation

The correct answer is "alter table tbl_Autores drop column Sobrenome_Autor;". This statement is used to remove a column named "Sobrenome_Autor" from the table "tbl_Autores". The "delete" and "truncate" keywords are not used to remove columns, and the "exclude" keyword is not a valid keyword for removing columns.

Submit
54. Você deseja remover todas as linhas de uma tabela de forma rápida e utilizando o mínimo de recursos para esta tarefa. Quais dos comandos SQL abaixo seria o mais apropriado?

Explanation

TRUNCATE TABLE would be the most appropriate command in this scenario because it quickly removes all the rows from a table and releases the storage space used by the table, while using minimal resources. The DELETE command would also remove all the rows, but it can be slower and use more resources because it logs individual row deletions. The DROP TABLE command is used to completely remove a table and its structure, which is not necessary in this case. N.D.A stands for "No Data Available" and is not a valid SQL command.

Submit
55. Visualize o seguinte comando SQL e marque as respostas corretas:

Explanation

The correct answer states that the output will display all the fields of the table where the id is equal to 13. Additionally, the output will also show the number of occurrences found.

Submit
56. De acordo com o diagrama ER abaixo, Assinale a alternativa correta. Qual das alternativas abaixo irá retornar o nome dos livros que custam entre 100 à 200?

Explanation

The correct answer is "select Nome_Livro from tbl_Livro where Preco_Livro between '100' and '200';". This is the correct SQL query syntax to retrieve the name of books that have a price between 100 and 200. The "between" keyword is used to specify a range, and the values '100' and '200' are included in the range.

Submit
57. O comando source pode ser usado tanto sobre shell script quanto binários (executáveis) no sistema Linux?

Explanation

The explanation for the answer "Falso" is that the "source" command can only be used on shell scripts, not on binaries or executables in the Linux system. The "source" command is used to execute commands from a file within the current shell environment, and it is typically used for sourcing shell scripts to set environment variables or define functions. Binaries or executables, on the other hand, are standalone executable files that can be run directly without the need for sourcing. Therefore, the statement in the question is false.

Submit
58.  Argumentos passados para um script e outras informações úteis podem ser utilizadas na criação de scripts bash através da utilização de algumas variáveis especiais. Com isso, sobre as variáveis especiais abaixo, Associe:
Submit
59. Qual das seguintes consultas SQL conta o número de ocorrências para cada valor do campo ORDER_TYPE na tabela orders?

Explanation

This query selects the order_type column and counts the number of occurrences for each value in the ORDER_TYPE field in the orders table. The GROUP BY clause is used to group the results by order_type, allowing the COUNT(*) function to count the occurrences for each distinct value.

Submit
60. Quando o bash é iniciado interativamente, ele não processa o arquivo /etc/profile, em vez disso ele tenta executar o arquivo _________ no diretório atual do usuário.

Explanation

When the bash is started interactively, it does not process the file /etc/profile. Instead, it tries to execute the file ".bashrc" in the current directory of the user.

Submit
61. De acordo com a tabela abaixo. Qual das alternativas irá retornar o total de vendas das cidades com menos de 2500 produtos vendidos?

Explanation

The correct answer is "select Cidade, sum(Qtd_Produto_Vendido) from Vendas group by Cidade having sum(Qtd_Produto_Vendido)

Submit
62. De acordo com o diagrama ER abaixo, forneça a instrução SQL que irá retornar o maior valor/preço de um livro cadastrado na tabela tbl_Livro.

Explanation

The given SQL statement is correct because it uses the MAX function to retrieve the maximum value of the "Preco_Livro" column from the "tbl_Livro" table. This will return the highest price of a book that is stored in the table.

Submit
63. De acordo com a tabela abaixo. Qual das alternativas irá retornar a quantidade total de Mouses vendidos?

Explanation

The correct answer is "select Produto, sum(Qtd_Produto_Vendido) from Vendas where Produto = 'Mouse' group by Produto;". This query will return the total quantity of Mouses sold by summing up the Qtd_Produto_Vendido column for the 'Mouse' product in the Vendas table, and grouping the result by Produto.

Submit
64. Onde estão localizados os aliases de linha de comando definidos para um usuário? Digite o caminho completo e o nome do arquivo para o usuário atualmente conectado.

Explanation

The aliases for command line defined for a user are located in the file named ".bashrc" in the user's home directory.

Submit
65. De acordo com o diagrama ER abaixo, forneça a instrução SQL que irá atualizar o nome do livro que tem o ID = 2 para SERVIDORES LINUX.

Explanation

The correct answer is update tbl_Livro set Nome_Livro = 'SERVIDORES LINUX' where ID_Livro = '2';, update tbl_Livro set Nome_Livro = "SERVIDORES LINUX" where ID_Livro = "2";, update tbl_Livro set Nome_Livro='SERVIDORES LINUX' where ID_Livro='2';, update tbl_Livro set Nome_Livro="SERVIDORES LINUX" where ID_Livro="2";, update tbl_Livro set Nome_Livro = 'SERVIDORES LINUX' where ID_Livro = 2;, update tbl_Livro set Nome_Livro = "SERVIDORES LINUX" where ID_Livro = 2;, update tbl_Livro set Nome_Livro='SERVIDORES LINUX' where ID_Livro=2;, update tbl_Livro set Nome_Livro="SERVIDORES LINUX" where ID_Livro=2;.

These SQL statements update the "Nome_Livro" column in the "tbl_Livro" table to "SERVIDORES LINUX" where the "ID_Livro" is equal to 2. The correct answer includes both single quotes and double quotes for the string value, as well as both string and integer values for the ID.

Submit
66. O que faz o comando abaixo?

Explanation

The given correct answer states that the command shows all columns from the tables "clientes" and "compras" where the value corresponding to the "id" column in the "clientes" table is equal to the "id_cliente" column in the "compras" table. This means that the command will display the data that matches the relationship between the two tables based on the corresponding values in the specified columns.

Submit
67. Um usuário deseja modificar sua variável de ambiente PATH. Qual arquivo que você deve dizer-lhe para editar em seu diretório home. (Dê somente o nome, nenhum caminho).

Explanation

The correct answer is ".bash_profile". This file is typically located in the user's home directory and is used to set up the environment for Bash, the default shell in many Unix-like operating systems. By editing this file, the user can add or modify the PATH variable, which is responsible for determining the directories where the shell looks for executable files.

Submit
68. Em qual arquivo você altera as variáveis padrão do shell para todos os usuários?

Explanation

The correct answer is /etc/bashrc. This file is used to set the default variables for the shell for all users on the system. It is a system-wide configuration file that is executed every time a user starts a new shell session. Any changes made to this file will affect all users on the system.

Submit
69. De acordo com o diagrama ER abaixo, forneça a instrução SQL que irá apagar o registro da linha/tupla ao qual o ISBN do livro seja igual à 08888.

Explanation

The correct answer is "delete from tbl_Livro where ISBN = '08888';". This is the correct SQL statement to delete a record from the tbl_Livro table where the ISBN value is equal to '08888'. The other options are incorrect because they either use the wrong syntax for string comparison (missing quotes) or use the wrong data type for comparison (integer instead of string).

Submit
70. De acordo com o diagrama ER abaixo, forneça a instrução SQL que irá retornar todos os livros ao qual seus valores/preços sejam maior que 100 e menor que 300.

Explanation

The correct answer is "select * from tbl_Livro where Preco_Livro > 100 and Preco_Livro

Submit
71. Quais das alternativas abaixo são consideradas funções de agragação na Linguagem SQL? (Selecione todas que se aplicam).

Explanation

The correct answer is AVG, SUM, COUNT, MIN, MAX. These functions are commonly used in SQL for aggregation purposes. AVG calculates the average value of a column, SUM calculates the sum of values, COUNT counts the number of rows, MIN returns the minimum value, and MAX returns the maximum value. IN, OUT, and JOIN are not aggregation functions, and LIKE is used for pattern matching rather than aggregation.

Submit
72. Para o bash, é útil ativar "preenchimento automático" no arquivo _________ (Simplesmente descomentando algumas linhas).

Explanation

The correct answer is "/etc/bash.bashrc". In the given question, it is mentioned that enabling "auto-completion" in the bash is useful by uncommenting some lines in the file "/etc/bash.bashrc". This file is a system-wide configuration file for bash, and uncommenting the necessary lines in this file allows the user to activate the auto-completion feature.

Submit
View My Results
Cancel
  • All
    All (72)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
O comando alias permite que sejam criados aliases de comando no...
Ao encerrar a sessão do shell, o bash executa as...
Qual o benefício que proporciona um alias?
O que a seguinte linha de comando irá retornar: echo...
Qual diretório /etc é usado para manter uma cópia...
Por padrão, o conteúdo de qual diretório...
Você está usando uma aplicação que você...
Qual palavra está faltando a seguinte instrução SQL?...
Que palavra irá completar uma...
Você emitiu o comando: export CFLAGS="-march-i586"....
Qual palavra está faltando a seguinte instrução SQL ?...
Qual dos comandos a seguir aplicam direitos e restrições...
Este shell script irá retornar qual dos valores abaixo?
Que palavra-chave está em falta a partir deste exemplo de...
Existe um problema ao se realizar operações matemáticas...
Você percebe que executa uma série de comandos com...
Que saída produzirá o seguinte comando seq 10?
Qual dos seguintes arquivos, quando existentes, afetam o comportamento...
Qual é a diferença entre os comandos test -e path e test -f...
O que irá...
Os colchetes "[ ]" utilizados após o comando if, poderiam ser...
Quando nós logamos em um sistema linux, o shell bash é...
Quando o comando "echo $?" retorna a saída igual a 1,...
A saída do comando 'seq 0 7 30' é:
Qual dos comandos abaixo pode ser utilizado em uma instrução...
Um usuário reclamou que programas iniciados a partir de HOME...
Observe o script abaixo e assinale a alternativa que irá...
A instrução ________ executa um ação em loop...
Qual das seguintes alternativas são operadores usados...
De acordo com o diagrama ER abaixo, Assinale a alternativa correta....
Qual dos seguintes é a melhor maneira para listar todas as...
Qual será o resultado produzido pelo seguinte...
Bash, o shell padrão, usa o script de...
Depois de emitir: "function myfunction { echo $1 $2; }" em...
Estou criando um shell script e necessito redirecionar a saída...
Supondo que você criou uma tabela...
Qual dos comandos a seguir permite que o usuário smith seja...
Qual dos seguintes comandos atribui a saída do comando date...
Analise o comando abaixo e marque a opção correta:
Qual dos seguintes comandos cria uma função Bash que gera a...
Os usuários geralmente querem configurar seu login e shell...
Estou escrevendo um shell script onde necessito realizar uma...
Você deseja executar o comando ls, mas parece ser alias. Qual...
Qual das alternativas abaixo contén operadores lógicos...
Para testar um script em shell chamado meuscript, a variável de...
Qual palavra está faltando a seguinte instrução SQL?...
A instrução ________ executa um ação em loop...
Que saída produzirá a seguinte sequência de...
Quais comandos exibe somente as funções disponíveis em...
Quando o bash é inicializado em uma sessão como shell...
Qual palavra está faltando a seguinte instrução SQL?...
Comandos da categoria "internos" não geram novos processos no...
De acordo com o diagrama ER abaixo, Assinale a alternativa correta....
Você deseja remover todas as linhas de uma tabela de forma...
Visualize o seguinte comando SQL e marque as respostas corretas:
De acordo com o diagrama ER abaixo, Assinale a alternativa correta....
O comando source pode ser usado tanto sobre shell script quanto...
 Argumentos passados para um script e outras informações...
Qual das seguintes consultas SQL conta o número de...
Quando o bash é iniciado interativamente, ele não...
De acordo com a tabela abaixo. Qual das alternativas irá...
De acordo com o diagrama ER abaixo, forneça a instrução SQL...
De acordo com a tabela abaixo. Qual das alternativas irá...
Onde estão localizados os aliases de linha de comando definidos...
De acordo com o diagrama ER abaixo, forneça a instrução SQL...
O que faz o comando abaixo?
Um usuário deseja modificar sua variável de ambiente...
Em qual arquivo você altera as variáveis padrão do...
De acordo com o diagrama ER abaixo, forneça a instrução SQL...
De acordo com o diagrama ER abaixo, forneça a instrução SQL...
Quais das alternativas abaixo são consideradas funções...
Para o bash, é útil ativar "preenchimento...
Alert!

Advertisement