LPI 101 - Comandos GNU/Linux 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,124
| Attempts: 316
SettingsSettings
Please wait...
Please wait...
LPI 101 - Comandos GNU/Linux 2- Marcus Vinicius Braga Alcantara - Quiz
About This Quiz

.


Quiz Preview

  • 2. 

    Qual comando é utilizado para criar um novo arquivo de texto vazio?

    Explanation
    The command "touch" is used to create a new empty text file.

    Rate this question:

  • 3. 

    Para modificar a palavra “teste” pela palavra “testes” em um arquivo denominado arq1, podemos usar o comando _______ 's/teste/testes/g' arq1

    • sed

    • tr

    • od

    • pr

    Correct Answer
    A. sed
    Explanation
    The correct answer is "sed". The sed command is used for text manipulation and stands for "stream editor". In this case, the command 's/teste/testes/g' is used to substitute the word "teste" with "testes" in the file named "arq1". The 's' indicates a substitution, the 'g' stands for global (replacing all occurrences), and the forward slashes are used to delimit the search and replacement strings.

    Rate this question:

  • 4. 

    Qual comando no modo de navegação do editor vi é usado para apagar toda uma linha ? 

    • dl

    • ll

    • dd

    • r

    Correct Answer
    A. dd
    Explanation
    The command "dd" in vi's navigation mode is used to delete an entire line.

    Rate this question:

  • 5. 

    Quais os dois comandos que exibirão o estado de processos em um sistema Linux?  Selecione uma opção.

    • ls e df

    • ps e top

    • ps e df

    • df e top

    • du e df

    Correct Answer
    A. ps e top
    Explanation
    The correct answer is "ps e top". The "ps" command is used to display information about active processes in a Linux system, while the "top" command provides real-time monitoring of system processes, including CPU usage, memory usage, and more. These two commands are commonly used to check the state of processes in a Linux system.

    Rate this question:

  • 6. 

    Quais comandos podem ser usados para paginar a saída de um resultado emitido por um determinado comando ? (Selecione 2 respostas).

    • tac

    • more

    • less

    • xargs

    Correct Answer(s)
    A. more
    A. less
    Explanation
    The commands "more" and "less" can be used to paginate the output of a command. These commands allow the user to view the output one page at a time, making it easier to read and navigate through large amounts of information. "More" displays one page of output at a time and waits for the user to press the Enter key to view the next page, while "less" provides similar functionality but also allows for backward scrolling and searching within the output.

    Rate this question:

  • 7. 

    Ao realizar o comando cat /etc/passwd | _____ [:lower:] [:upper:], todo o conteúdo do arquivo será mostrado em caixa alta.

    • ls

    • od

    • more

    • tr

    Correct Answer
    A. tr
    Explanation
    By using the "tr" command with the options [:lower:] [:upper:], all the content of the "/etc/passwd" file will be displayed in uppercase. The "tr" command is used for translating or deleting characters, and in this case, it is translating lowercase letters to uppercase letters.

    Rate this question:

  • 8. 

    Para modificar a palavra “teste” pela palavra “testes” em um arquivo denominado arq1, podemos usar o comando _______ 's/teste/testes/g' arq1

    • sed

    • tr

    • od

    • pr

    Correct Answer
    A. sed
    Explanation
    The correct answer is "sed". Sed is a command-line utility for editing text files. In this context, the sed command is being used with the 's/teste/testes/g' pattern, which means to substitute all occurrences of the word "teste" with "testes" in the file named "arq1".

    Rate this question:

  • 9. 

    Qual dos comandos abaixo irá retornar o status de saída do comando anterior (1 ou 0)?

    • echo $?

    • echo $1

    • echo $EXIT

    • exitstatus

    Correct Answer
    A. echo $?
    Explanation
    The correct answer is "echo $?" because the "$?" is a special variable in Unix-like operating systems that holds the exit status of the previously executed command. By using the "echo" command with "$?", it will display the exit status (either 1 or 0) of the previous command.

    Rate this question:

  • 10. 

    Um processo com PID 1048 está atrapalhando seu sistema.  Como root, você entra com o seguinte comando: "kill 1048".  Contudo, você não obtém resultado.  O que você pode fazer para terminar o processo?  Selecione a opção correta:

    • kill -9 1048

    • kill -1 1048

    • kill +9 1048

    • kill 1048

    • kill --die 1048

    Correct Answer
    A. kill -9 1048
    Explanation
    The correct answer is "kill -9 1048". The "-9" option in the kill command sends a SIGKILL signal to the process with the specified PID, forcing it to terminate immediately. This signal cannot be ignored or caught by the process, making it a surefire way to end a stubborn process.

    Rate this question:

  • 11. 

    O comando; "find -type -l" irá procurar quais tipos de arquivos ?

    • Links simbólicos

    • Arquivos regulares

    • Arquivos executáveis

    • Diretórios

    Correct Answer
    A. Links simbólicos
    Explanation
    The command "find -type -l" is used to search for symbolic links. The "-type -l" option specifies that only symbolic links should be searched for.

    Rate this question:

  • 12. 

    Quais dos comandos abaixo podem ser utilizados para visualizar o PID de um programa que acabamos de iniciar ? (Selecione 2 respostas).

    • kill

    • ps

    • fg

    • top

    Correct Answer(s)
    A. ps
    A. top
    Explanation
    The commands "ps" and "top" can be used to view the PID of a program that has just been started. The "ps" command displays information about active processes, including their PIDs, while the "top" command provides a real-time overview of system processes, including their PIDs. Therefore, both commands can be used to identify the PID of a recently started program.

    Rate this question:

  • 13. 

    Qual dos seguintes comandos é equivalente a matar 1234?

    • kill -15 1234 or kill -s SIGTERM 1234

    • kill -9 1234 or kill -s SIGKILL 1234

    • kill -1 1234 or kill -s SIGHUP 1234

    • kill -2 1234 or kill -s SIGINT 1234

    • kill -3 1234 or kill -s SIGQUIT 1234

    Correct Answer
    A. kill -9 1234 or kill -s SIGKILL 1234
    Explanation
    The correct answer is "kill -9 1234" or "kill -s SIGKILL 1234". This is because the "-9" option or "SIGKILL" signal is used to forcefully terminate a process. It is the most aggressive way to kill a process and cannot be ignored or handled by the process. Therefore, using this command will ensure that the process with ID 1234 is immediately terminated.

    Rate this question:

  • 14. 

    O comando expand -t N irá especificar o valor a ser substituído para o tamanho da tabulação.

    • Verdadeiro

    • Falso

    Correct Answer
    A. Verdadeiro
    Explanation
    The given statement is true. The command "expand -t N" is used to specify the value to be substituted for the tab size. By using this command, the tab characters in a file can be replaced with spaces. The "N" in the command represents the desired tab size.

    Rate this question:

  • 15. 

    Você criou uma longa carta e depois percebeu que usou o nome "bob" muitas vezes, mas você esqueceu de capitalizá-lo em muitos casos. Qual comando iria substituir "bob" por "Bob" em todas as instâncias e gerar uma nova carta para impressão?

    • sed '/bob/Bob' carta.txt > nova_carta.txt

    • sed s/bob/Bob/ carta.txt > nova_carta.txt

    • sed 's/bob/Bob/g' carta.txt > nova_carta.txt

    • sed 's/bob, Bob/' carta.txt > nova_carta.txt

    Correct Answer
    A. sed 's/bob/Bob/g' carta.txt > nova_carta.txt
    Explanation
    The correct answer is "sed 's/bob/Bob/g' carta.txt > nova_carta.txt". This is because the sed command is used for text manipulation and the 's' option stands for substitute. The pattern 'bob' is being replaced with 'Bob' using the 'g' flag, which means globally (i.e., all instances of 'bob' in the file will be replaced). The output of the command is redirected to a new file called "nova_carta.txt".

    Rate this question:

  • 16. 

    Qual comando irá imprimir uma lista de nomes de usuário (primeira coluna) e seu user id (uid, terceira coluna) correspondente no arquivo /etc/passwd ?

    • chop -c 1,3 /etc/passwd

    • tac 1-3 /etc/passwd

    • cut -d: -f 1,3 /etc/passwd

    • fmt -u /etc/passwd

    Correct Answer
    A. cut -d: -f 1,3 /etc/passwd
    Explanation
    The correct answer is "cut -d: -f 1,3 /etc/passwd". This command uses the "cut" utility to extract specific columns from the "/etc/passwd" file. The "-d:" option specifies that the fields in the file are separated by colons, and the "-f 1,3" option indicates that we want to extract the first and third fields (username and uid). This command will print a list of usernames and their corresponding user ids.

    Rate this question:

  • 17. 

    Supondo que você possui dois arquivos, eles são: arq1.txt e arq2.txt. Como você faria para imprimir o conteúdo do arq1.txt ao final do conteúdo do arq2.txt sem sobrescrever o conteúdo do arq2.txt ? (Utilze o comando cat).

    Correct Answer
    cat arq1.txt >> arq2.txt
    Explanation
    The command "cat arq1.txt >> arq2.txt" is used to append the content of arq1.txt to the end of arq2.txt without overwriting the existing content in arq2.txt. The ">>" operator is used for appending, while the "cat" command is used to concatenate and display the contents of a file.

    Rate this question:

  • 18. 

    Qual comando irá alterar a prioridade do processo em execução com o ID igual à 12345 para a maior prioridade?

    • /usr/bin/renice -20 12345

    • /usr/bin/renice +20 1234

    • /bin/setpriority +20 12345

    • /bin/setpriority -20 12345

    Correct Answer
    A. /usr/bin/renice -20 12345
    Explanation
    The correct answer is "/usr/bin/renice -20 12345". This command will change the priority of the process with the ID 12345 to the highest priority by setting the nice value to -20. The nice value is a way to adjust the priority of a process, with lower values indicating higher priority.

    Rate this question:

  • 19. 

    Qual comando pode ser utilizado para mostrar as linhas iniciais de um arquivo, onde por padrão as 10 primeiras linhas serão mostradas.

    Correct Answer
    head
    Explanation
    The "head" command is used to display the first few lines of a file. By default, it shows the first 10 lines of the file.

    Rate this question:

  • 20. 

    O comando fmt, por padrão ajusta o texto de um arquivo com 75 caracteres por linha.

    • Verdadeiro

    • Falso

    Correct Answer
    A. Verdadeiro
    Explanation
    The given statement is true. The fmt command, by default, adjusts the text of a file to have 75 characters per line. This means that if a line exceeds 75 characters, the fmt command will automatically break it into multiple lines to maintain the desired line length.

    Rate this question:

  • 21. 

    Qual é o sinal padrão enviado pelo comando kill a um processo quando não é informado nenhum sinal como argumento ?

    • SIGTERM

    • SIGTRAP

    • SIGHUP

    • SIGKILL

    Correct Answer
    A. SIGTERM
    Explanation
    Quando nenhum sinal é informado como argumento para o comando kill, o sinal padrão enviado ao processo é o SIGTERM. Esse sinal é usado para solicitar que o processo encerre sua execução de forma ordenada, permitindo que ele finalize suas tarefas e libere os recursos utilizados antes de encerrar.

    Rate this question:

  • 22. 

    Qual o comando que força a saída do editor vi sem salvar as alterações feitas em determinado arquivo ?

    • :!

    • :wq

    • :q!

    • :!q

    Correct Answer
    A. :q!
    Explanation
    The correct answer is ":q!". This command is used in the vi editor to exit without saving any changes made to a specific file. The "q" stands for quit and the exclamation mark "!" forces the editor to exit without prompting for confirmation.

    Rate this question:

  • 23. 

    Qual é o valor de prioridade padrão do comando nice? (Informe somente o valor).

    Correct Answer
    10
    Explanation
    The default priority value for the "nice" command is 10.

    Rate this question:

  • 24. 

    Qual o comando que podemos usar para recuperar a edição do arquivo /etc/resolv.conf conforme a figura abaixo ?

    • jobs 2

    • fg %2

    • CTRL+Z

    • kill -1 2

    Correct Answer
    A. fg %2
    Explanation
    The correct answer is "fg %2". The "fg" command is used to bring a background job to the foreground. The "%2" specifies the job number, in this case job number 2. So, "fg %2" will bring the job number 2 to the foreground, allowing the user to interact with it.

    Rate this question:

  • 25. 

    O que acontece quando o caractere "&" é adicionado ao término de um comando?  Selecione a opção correta.

    • permite que outro comando seja adicionado na mesma linha.

    • para o processo.

    • reinicia um processo parado.

    • coloca o processo no primeiro plano.

    • coloca o processo em segundo plano

    Correct Answer
    A. coloca o processo em segundo plano
    Explanation
    Quando o caractere "&" é adicionado ao término de um comando, isso coloca o processo em segundo plano. Isso significa que o processo continuará sendo executado em segundo plano, permitindo que o usuário execute outros comandos na mesma linha de comando ou em outra janela do terminal.

    Rate this question:

  • 26. 

    Você precisa exibir todos os arquivos no diretório atual que começam com um "a" e final com um "v", independentemente do seu comprimento, ou a utilização de delimitadores. (Escolha a melhor resposta).

    • ls a*v

    • ls a.v

    • ls a-v

    • ls [a-v]

    Correct Answer
    A. ls a*v
    Explanation
    The correct answer is "ls a*v" because it uses the wildcard character "*" to represent any number of characters between "a" and "v". This will match any file in the current directory that starts with "a" and ends with "v", regardless of the length or the use of delimiters.

    Rate this question:

  • 27. 

    Qual dos comandos abaixo realiza cópia em baixo nível ?

    • cpp

    • dd

    • cpio

    • od

    Correct Answer
    A. dd
    Explanation
    The command "dd" is used to perform low-level copying in Linux. It is commonly used for tasks such as creating disk images, copying data between devices, and backing up data. The "dd" command allows for precise control over the copying process, including specifying the block size and the number of blocks to copy. It is a powerful tool that can be used for various data manipulation tasks.

    Rate this question:

  • 28. 

    Qual é o valor de prioridade para qualquer processo iniciado no Sistema ?

    • 10

    • 5

    • 0

    • 20

    Correct Answer
    A. 0
    Explanation
    The value of priority for any process initiated in the system is 0.

    Rate this question:

  • 29. 

    Que ferramenta você poderia usar para mudar a prioridade de um processo corrente?

    • ps

    • nice

    • renice

    • setpriority

    Correct Answer
    A. renice
    Explanation
    Renice é a resposta correta porque é uma ferramenta do sistema operacional Linux que permite ao usuário alterar a prioridade de um processo em execução. Ao usar o comando "renice", o usuário pode ajustar a prioridade de um processo para torná-lo mais ou menos prioritário em relação a outros processos em execução no sistema. Isso pode ser útil para equilibrar a carga do sistema, dando mais recursos a processos importantes ou reduzindo a prioridade de processos que estão consumindo muitos recursos.

    Rate this question:

  • 30. 

    Qual comando mantém uma tarefa em execução mesmo após realizarmos um logoff do terminal onde o mesmo foi iniciado ?

    • nohup

    • jobs

    • bg

    • &

    Correct Answer
    A. nohup
    Explanation
    The correct answer is "nohup". The "nohup" command is used to run a command or script in the background and ensures that it continues running even after logging off from the terminal. It is often used to prevent a process from being terminated when the terminal session ends.

    Rate this question:

  • 31. 

    Qual o comando digitado no modo de navegação do editor vi adiciona uma linha abaixo do cursor e abre o modo de inserção ?

    • i

    • r

    • 1G

    • o

    Correct Answer
    A. o
    Explanation
    The command "o" is used in vi editor's navigation mode to add a new line below the cursor and switch to the insert mode.

    Rate this question:

  • 32. 

    No editor vi, qual dos seguintes comandos irá apagar a linha atual no cursor e as 16 linhas seguintes (17 Linhas no total) ?

    • 17d

    • 17dd

    • 17x

    • 16d

    • d17d

    Correct Answer
    A. 17dd
    Explanation
    The command "17dd" in vi will delete the current line at the cursor and the 16 lines following it, resulting in a total of 17 lines being deleted.

    Rate this question:

  • 33. 

    Supondo que você possui 2 arquivos de texto (arq1.txt e arq2.txt), onde o arq1.txt possui os seguintes nomes para cada linha do arquivo: fulano, beltrano e cicrano,  e no arq2.txt os seguintes domínios por linha no arquivo; hotmail.com, gmail.com e yahoo.com. Qual o comando completo que irá unir as linhas dos dois arquivos em uma única linha na saída padrão separadas pelo caractre "@" ?

    • join -j "@" arq1.txt arq2.txt

    • paste -d "@" arq1.txt arq2.txt

    • union -d "@" arq1.txt arq2.txt

    • Todas as alternativas se aplicam

    Correct Answer
    A. paste -d "@" arq1.txt arq2.txt
    Explanation
    The correct answer is "paste -d "@" arq1.txt arq2.txt". The "paste" command is used to merge lines from two files side by side. The "-d" option is used to specify the delimiter character to separate the merged lines, which in this case is "@" as stated in the question. Therefore, the command "paste -d "@" arq1.txt arq2.txt" will join the lines from arq1.txt and arq2.txt into a single line with "@" as the delimiter.

    Rate this question:

  • 34. 

    Depois de executar a seguinte linha de comando; echo \"test king\ " | cat > myout.txt. Qual será o conteúdo do arquivo myout.txt ?

    • Test kinG

    • "test king"

    • test king cat

    • O arquivo irá ficar vazio

    Correct Answer
    A. "test king"
    Explanation
    The command "echo "test king" | cat > myout.txt" will redirect the output of the "echo" command, which is "test king", to the file "myout.txt". Therefore, the content of the file "myout.txt" will be "test king".

    Rate this question:

  • 35. 

    Qual dos seguintes comandos GNU seria o comando mais provável que você usaria para encontrar a média de carga do sistema?

    • loadavg

    • nice

    • cpustat

    • top

    • ps

    Correct Answer
    A. top
    Explanation
    The command "top" is the most likely command that you would use to find the system's average load. "top" is a command-line tool that provides real-time information about system processes, including the load average. It displays a list of running processes and their resource usage, including the CPU load average. Therefore, using the "top" command would allow you to easily find the average load of the system.

    Rate this question:

  • 36. 

    Qual é o valor do comando nice quando desejamos executar um novo processo com prioridade máxima ?

    • 20

    • -20

    • 10

    • -19

    Correct Answer
    A. -20
    Explanation
    The correct answer is -20. In the context of the command "nice" in Unix-like operating systems, the value -20 represents the highest priority. By setting the nice value to -20, we are indicating that we want to execute a new process with the highest priority, allowing it to utilize more system resources and CPU time compared to other processes.

    Rate this question:

  • 37. 

     Observe a lista de tarefas em execução abaixo e responda. Qual o comando que torna possível encerrarmos o comando find em execução ? 

    • Killall -u daniel -2

    • ps a | grep vim | xargs kill

    • jobs -x find

    • kill %2

    Correct Answer
    A. kill %2
    Explanation
    The correct answer is "kill %2". This command uses the "kill" command with the argument "%2" to terminate the second job running in the background. The "%" symbol is used to refer to a job number, and "2" specifies the second job. This command is used to stop the execution of the "find" command.

    Rate this question:

  • 38. 

    O que o comando seguinte irá fazer ? cmd > file.out 2>&1

    • Envia o stdout de cmd para file.out

    • Envia a stdout e stderr de cmd para file.out

    • Envia o stderr para o bit bucket e stdout de cmd para file.out

    • N.D.A

    Correct Answer
    A. Envia a stdout e stderr de cmd para file.out
    Explanation
    The given command "cmd > file.out 2>&1" redirects both the standard output (stdout) and the standard error (stderr) of the command "cmd" to the file "file.out". This means that any output or error messages generated by "cmd" will be written to the "file.out" file.

    Rate this question:

  • 39. 

    Qual dos comandos abaixo utiliza a variável de ambiente PATH para buscar um programa fornecido como argumento ?

    • find

    • search

    • which

    • locale

    Correct Answer
    A. which
    Explanation
    The command "which" utilizes the PATH environment variable to search for a program provided as an argument. It helps in locating the executable file associated with a given command by searching through the directories listed in the PATH variable. This command is commonly used in Unix-like operating systems to determine the location of a command that will be executed when it is typed in the terminal.

    Rate this question:

  • 40. 

    Quais dos comandos abaixo podem ser usados para gravar e sair da execução do editor vi ? (Selecione 3 respostas).

    • shift+ZZ

    • :x

    • :wq

    • :e

    Correct Answer(s)
    A. shift+ZZ
    A. :x
    A. :wq
    Explanation
    The given answer is correct because shift+ZZ, :x, and :wq are all valid commands in the vi editor that can be used to save and exit the execution. shift+ZZ saves the changes and exits the editor, :x saves the changes and exits the editor, and :wq saves the changes and exits the editor. :e is not a command for saving and exiting the editor.

    Rate this question:

  • 41. 

    Qual comando concatena registros de dois arquivos de texto baseado em índices comuns ? O comando funciona como um tipo de banco de dados primitivo, permitindo a montagem de novos arquivos de registros a partir de registros existentes em diferentes arquivos.

    Correct Answer(s)
    join
    Explanation
    The command "join" is used to concatenate records from two text files based on common indices. It acts as a primitive database, allowing the assembly of new record files from existing records in different files.

    Rate this question:

  • 42. 

    Supondo que gostaria de listar as 5 primeiras linhas do arquivo /etc/passwd utilizando o comando head. Qual seria o comando completo para realizar tal tarefa ?

    Correct Answer(s)
    head -n 5 /etc/passwd
    Explanation
    The given command "head -n 5 /etc/passwd" is the correct command to list the first 5 lines of the /etc/passwd file using the head command. The "head" command is used to display the beginning of a file, and the "-n" option specifies the number of lines to be displayed. So, in this case, it will display the first 5 lines of the /etc/passwd file.

    Rate this question:

  • 43. 

    Qual dos comandos a seguir é usado para pôr em segundo plano um programa que está prendendo o terminal de modo que ele continue processando ?

    • Ctrl-C

    • Ctrl-B

    • Ctrl-B e então entrar com o comando bg

    • Ctrl-Z

    • Ctrl-Z e então entrar com o comando bg

    Correct Answer
    A. Ctrl-Z e então entrar com o comando bg
    Explanation
    The correct answer is "Ctrl-Z e então entrar com o comando bg". This combination of keys allows you to suspend a program that is running in the foreground and send it to the background, allowing it to continue processing while freeing up the terminal for other commands.

    Rate this question:

  • 44. 

    Qual dos seguintes comandos sed irá substituir todas as ocorrências da string "foo" para "foobar" sem que o arquivo file1.txt seja alterado?

    • sed 's/foo/foobar/g' file1.txt

    • sed 's/foo/foobar/g' file1.txt > file1.txt

    • sed 's/foo/foobar/g' file1.txt | file1.txt

    • sed -i 's/foo/foobar/g' file1.txt

    • sed -i 's/foo/foobar/g' file1.txt > file1.txt

    Correct Answer
    A. sed 's/foo/foobar/g' file1.txt
    Explanation
    The correct answer is "sed 's/foo/foobar/g' file1.txt". This command uses the sed utility to perform a search and replace operation in the file file1.txt. It searches for all occurrences of the string "foo" and replaces them with "foobar". The "g" flag is used to indicate that the replacement should be done globally, meaning all occurrences of "foo" will be replaced. This command does not alter the original file file1.txt.

    Rate this question:

  • 45. 

    Qual comando substitui espaços de tabulação (TABs) por espaços simples, mantendo a mesma distância aparente?

    Correct Answer
    expand
    Explanation
    The command "expand" can be used to replace tab spaces with single spaces while maintaining the same apparent distance.

    Rate this question:

  • 46. 

    Que comando irá mostrar-lhe os valores definidos pelo arquivo /etc/bashrc para todo o sistema ?

    Correct Answer
    set
    Explanation
    The "set" command will display the values defined by the /etc/bashrc file for the entire system.

    Rate this question:

  • 47. 

    O que faz o seguinte comando? cat \$TEST

    • Exibe uma mensagem de erro de sintaxe bash.

    • Exibe o conteúdo do arquivo chamado $TEST se ele existir.

    • Espera que o usuário inseria um texto e, em seguida, ecoa o texto de volta.

    • Exibe o conteúdo do arquivo chamado dentro das aspas para trás.

    • Exibe o conteúdo da variável TEST

    Correct Answer
    A. Exibe o conteúdo do arquivo chamado $TEST se ele existir.
    Explanation
    This command "cat $TEST" is used to display the contents of the file named $TEST, if it exists. The "cat" command is commonly used in Unix-like operating systems to concatenate and display the contents of files. In this case, the variable $TEST is being used to specify the file name, and if the file exists, its contents will be displayed.

    Rate this question:

  • 48. 

    Qual é o resultado do seguinte comando? cat 'echo" $testking

    • Um erro de sintaxe.

    • O valor da variável tesking

    • Cat seguido pelo valor de US $testking

    • Echo seguido por $testking

    Correct Answer
    A. Um erro de sintaxe.
    Explanation
    The given command is cat 'echo" $testking. This command contains a syntax error because it is using both single quotes and double quotes in an incorrect way. The correct way to use quotes in this command would be either to use double quotes around the entire command or to escape the inner double quotes with a backslash. Since the command is incorrect, it will result in a syntax error.

    Rate this question:

  • 49. 

    Qual comando pode ser utilizado para formatar arquivos de texto ?

    Correct Answer
    fmt
    Explanation
    O comando "fmt" pode ser utilizado para formatar arquivos de texto.

    Rate this question:

Quiz Review Timeline (Updated): Jul 22, 2024 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Jul 22, 2024
    Quiz Edited by
    ProProfs Editorial Team
  • Mar 13, 2017
    Quiz Created by
    Viniciusalcantar
Back to Top Back to top
Advertisement