LPI 101 - Comandos GNU/Linux 3- 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: 278 | Questions: 100
Please wait...
Question 1 / 100
0 %
0/100
Score 0/100
1. O comando find, por padrão, percorre toda a árvore de diretórios de forma recursiva. No entanto, a profundidade da pesquisa pode ser especificada. Por exemplo, nós não queremos ir mais de 2 ou 3 níveis para baixo nos sub-diretórios. Isso é feito usando a opção maxdepth. Ex: find ./test -maxdepth 2 -name *.php

Explanation

The statement is explaining that the "find" command, by default, searches through the entire directory tree recursively. However, it can be limited to a specific depth by using the "maxdepth" option. In this example, it states that the command "find ./test -maxdepth 2 -name *.php" will only search up to 2 levels deep in the sub-directories. Therefore, the statement is true.

Submit
Please wait...
About This Quiz
LPI 101 - Comandos GNU/Linux 3- Marcus Vinicius Braga Alcantara - Quiz

.

Tell us your name to personalize your report, certificate & get on the leaderboard!
2. Qual o comando que exibe o total e o consumo de memória ram e swap de um Sistema GNU/Linux ?

Explanation

The "free" command is used to display the total and the usage of RAM and swap memory in a GNU/Linux system.

Submit
3. Sobre as opções de conversões do comando dd. Associe:
Submit
4. Qual comando "xz" completo irá testar a integridade do arquivo "arquivo.pdf.xz" ?

Explanation

The command "xz -t arquivo.pdf.xz" is used to test the integrity of the file "arquivo.pdf.xz" using the xz compression algorithm. This command checks if the compressed file is intact and can be successfully decompressed without any errors.

Submit
5. Qual comando irá listar todos os processos, exibindo o nome dos usuários que os iniciaram ?

Explanation

The correct answer is "ps aux". This command will list all processes and display the usernames of the users who started them.

Submit
6. Como você faria para pesquisar em seu diretório corrente por todos os subdiretórios com permissão 777?

Explanation

The correct answer is "find . -perm 0777 -type d -exec ls -l {} \;". This command uses the "find" command to search in the current directory (.) for all subdirectories (-type d) with permission 777 (-perm 0777). The "-exec ls -l {} \;" part is used to list the found directories with detailed information.

Submit
7. Qual dos comandos abaixo irá listar todos o ficheiros maiores que 100 MB em seu diretório corrente ?

Explanation

The correct answer is "find . -size +100M -exec ls -s {} \;". This command uses the "find" command to search for files in the current directory with a size larger than 100MB. The "-size +100M" flag specifies that the size should be greater than 100MB. The "-exec ls -s {} \;" part of the command executes the "ls -s" command on each file found, displaying the file size in blocks.

Submit
8. Qual das alternativas abaixo pode ser utilizada para otimizar (compress better) a compactação dos arquivos no diretório /home/MYFILES?

Explanation

The correct answer is "gzip -9rv /home/MYFILES". This command will use the gzip utility with the highest compression level (-9) and recursively (-r) compress all files and directories in the /home/MYFILES directory. The "v" option will display the progress and details of the compression process. This combination of options will optimize the compression of the files in the specified directory.

Submit
9. Para lê e escrever o mesmo número de bytes com o comando dd, podemos ao invés de especificar o ibs e obs, especificar somente a opção bs.

Explanation

By specifying only the option "bs" instead of "ibs" and "obs" in the dd command, we can read and write the same number of bytes. This means that the input and output block sizes will be the same, resulting in a more efficient and streamlined process.

Submit
10. Sobre os comando nice e renice. Assinale as afirmativas corretas. (Selecione 2 respostas).

Explanation

The correct answer states that the "nice" command can be used to start an application with the desired priority, and the "renice" command can be used to change the priority of an already running application. This means that "nice" can be used to set the priority of a new application, while "renice" can be used to adjust the priority of an application that is already running.

Submit
11. Qual das alternativas abaixo pode ser utilizada para extrair o arquivo "arquivo.pdf.bz2" ?
 

Explanation

The correct answer is "bzip2 -d arquivo.pdf.bz2". This command is used to extract or decompress a file that has been compressed using the bzip2 algorithm. In this case, it is specifically used to extract the file "arquivo.pdf.bz2" and restore it to its original form. The "-d" flag stands for "decompress" and tells the bzip2 program to decompress the specified file.

Submit
12. Estou no meu diretório home, e crio um diretório chamado teste. Agora, quero que, todos os arquivos de extensão .tgz, e que sejam menores que 10 Kilobytes sejam copiados para dentro deste diretório. Suponhamos que eu tenha mais de 3.000 arquivos .tgz no meu home, e apenas os menores que 10K colocarei dentro do diretório teste.....como irei realizar tal tarefa utilizando o comando find?

Explanation

This command will search for all files with the extension .tgz in the current directory and its subdirectories. It will then check the size of each file and select only the ones that are smaller than 10 kilobytes. Finally, it will copy these selected files to the directory called "teste".

Submit
13. Qual das alternativas abaixo iria criar uma imagem ISO a partir de um CD/DVD-ROM para um HD externo montado em /mnt/HD utilizando o comando dd, sendo especificado uma taxa de leitura e gravação de 4096 bytes, evitando a parada do processamento em caso de erros e habilitando o padding em blocos parciais de entrada com nulos ?

Explanation

The correct answer is "dd if=/dev/cdrom of=/mnt/HD/imagem.iso bs=4096 conv=noerror,sync". This command uses the "dd" command to create an ISO image from a CD/DVD-ROM. The "if=/dev/cdrom" specifies the input file as the CD/DVD-ROM, and the "of=/mnt/HD/imagem.iso" specifies the output file as the image file to be created in the /mnt/HD directory. The "bs=4096" sets the block size to 4096 bytes, and the "conv=noerror,sync" options ensure that the command continues processing even in case of errors and enables padding with nulls in partial input blocks.

Submit
14. Qual comando kill irá listar as opções dos sinais (Nome/Número) que podem ser emitidos pelo comando kill?

Explanation

The correct command to list the options of signals (Name/Number) that can be emitted by the kill command is "kill -l". This command will display a list of signal names and their corresponding numbers, which can be used to send specific signals to processes.

Submit
15. Acabamos de instalar um novo software no diretório /opt. Sabemos que suas páginas de manuais estão localizadas em /opt/novosoft/man porém o programa man não as encontra. Como posso tornar disponível de forma temporária a visualização das páginas de manuais ?

Explanation

The correct answer is "export MANPATH=$MANPATH:/opt/novosoft/man". This command adds the directory /opt/novosoft/man to the MANPATH environment variable, which is used by the man command to locate manual pages. By exporting this variable, the man command will be able to find the manual pages in the specified directory.

Submit
16. Sobre o editor de texto vi. Associe:
Submit
17. Especifique o comando "xz" completo que irá listar informações sobre o arquivo "arquivo.pdf.xz" ?

Explanation

The command "xz -l arquivo.pdf.xz" is used to list information about the file "arquivo.pdf.xz".

Submit
18. Qual das seguintes expressões regulares irá retornar as palavras dig e dug, mas não dog?

Explanation

The regular expression "d[iu]g" will return the words "dig" and "dug" but not "dog". This is because the expression matches any character that comes after "d" and before "g", as long as it is either "i" or "u". Therefore, it will match "dig" and "dug" but not "dog" since the character between "d" and "g" in "dog" is "o" and it is not included in the options provided in the regular expression.

Submit
19. Qual das opções da ferramenta gzip pode ser utilizada para otimizar (compress better) a compactação de arquivos ?

Explanation

The option "-9" can be used to optimize the compression of files with the gzip tool. This option sets the compression level to the highest level, resulting in better compression but also taking more time to process.

Submit
20. Qual comando top irá listar apenas os processos do usuário vinicius?

Explanation

The correct answer is "top -u vinicius". The "-u" option in the "top" command is used to specify a specific user whose processes should be displayed. In this case, "top -u vinicius" will list only the processes belonging to the user "vinicius".

Submit
21. Supondo que em um diretório corrente "ao qual você se localiza" contenha 10 arquivos no formato "txt", como você faria para comprimir tais arquivos utilizando o formato bzip2 para um arquivo chamado my-txt.tar.bz2 ? (Selecione 2 respostas).

Explanation

The correct answer is "tar -cjf my-txt.tar.bz2 *.txt" and "tar cjvf my-txt.tar.bz2 *.txt". These options use the "tar" command to create a compressed archive file named "my-txt.tar.bz2" from all the files in the current directory with the ".txt" extension. The "-c" flag is used to create a new archive, the "-j" flag is used to compress the archive using bzip2, and the "-f" flag is used to specify the filename for the archive. The "v" flag is optional and is used to display the progress of the compression process.

Submit
22. Qual dos seguintes comandos é implementado como um comando interno do bash ?

Explanation

The command "echo" is implemented as an internal command of the bash shell. This means that it is built-in to the shell itself and does not require an external program or utility to execute. The "echo" command is used to display text or variables as output, making it a fundamental tool for printing information in the bash shell.

Submit
23. Qual dos seguintes comandos irá imprimir as linhas do arquivo world.txt que contenham as plavras; changes e changed ?

Explanation

The correct answer is "grep change[ds] world.txt". This command will search for the words "changes" and "changed" in the file "world.txt" and print the lines that contain these words. The square brackets in the command indicate that either "d" or "s" can be used in place of the "e" in the word "change".

Submit
24. Qual das opções ("Opção interna do comando top") abaixo pode ser utilizada para alterar a prioridade de um processo já em execução ?

Explanation

The option "-r" can be used to change the priority of a process that is already running.

Submit
25. Qual comando dd irá criar uma imagem do setor de inicialização do sistema (MBR)?

Explanation

The correct answer is "dd if=/dev/sda of=/mnt/HD/MBR.img bs=512 count=1". This command will create an image of the system's boot sector (MBR) by using the dd command. The "if=/dev/sda" specifies the input file as the /dev/sda device, which represents the entire disk. The "of=/mnt/HD/MBR.img" specifies the output file as MBR.img in the /mnt/HD directory. The "bs=512" sets the block size to 512 bytes, and the "count=1" specifies to copy only one block, which is the size of the MBR.

Submit
26. Supondo que você queira encontrar o arquivo "articles.jpg" a partir da partição raiz do sistema, sendo que logo após a sua localização seja definida a permissão 644 para tal arquivo, assim, qual das alternativas abaixo irá realizar tal tarefa?

Explanation

The correct answer is "find / -name "articles.jpg" -exec chmod 644 {} \;". This command uses the "find" utility to search for the file "articles.jpg" starting from the root partition of the system. Once the file is found, the "chmod" command is executed with the argument "644" to set the file permissions to 644. The "{} \;" at the end of the command is used to pass the file name as an argument to the "chmod" command.

Submit
27. Como você faria para pesquisar em seu diretório corrente por todos os arquivos com prmissão 777?

Explanation

The correct answer is "find . -perm 0777 -type f -exec ls -l {} \;". This command uses the "find" utility to search for files in the current directory with permission 777. The "-perm 0777" option specifies the desired permission, the "-type f" option restricts the search to only files, and the "-exec ls -l {} \;" option executes the "ls -l" command on each found file to display detailed information about it.

Submit
28. Qual dos comandos a seguir não pode ser usado para sair do vi quando este estiver no modo de comando?

Explanation

The command ":bye" cannot be used to exit vi when it is in command mode. This is because ":bye" is not a valid command in vi. The correct commands to exit vi in command mode are "ZZ", ":x", ":q", and ":q!".

Submit
29. Qual comando "xz" completo irá descompactar o arquivo "arquivo.pdf.xz" ?

Explanation

The correct command to decompress the file "arquivo.pdf.xz" is "xz -d arquivo.pdf.xz". The "-d" option specifies that the file should be decompressed.

Submit
30. Qual comando "top" irá ignorar processos ociosos ?

Explanation

The correct answer is "top -i". The "-i" option in the "top" command stands for "ignore idle processes". By using this option, the "top" command will exclude any idle or inactive processes from its output, providing a more focused view of the active processes running on the system.

Submit
31. Sobre os comando kill e killall. Assinale as afirmativas corretas. (Selecione 2 respostas).

Explanation

The correct answer is that "Killall envia sinais para os aplicativos pelo seu nome" (Killall sends signals to applications by their name) and "Kill envia sinais para os aplicativos pelo número do processo" (Kill sends signals to applications by the process number).

Submit
32. Qual comando "tar" deve ser utilizado para descompactar o arquivo "my-txt.tar.bz2" ?
 

Explanation

The correct command to use for unpacking the file "my-txt.tar.bz2" is "tar -xjf my-txt.tar.bz2". This command uses the options "-xjf" to extract ("-x") the file, interpret it as a bzip2 compressed archive ("-j"), and display the file names and extraction progress ("-v") while unpacking.

Submit
33. Qual comando irá atualizar a saída padrão do comando top 4 vezes e depois sair do programa?

Explanation

The correct answer is "top -n 4". The "-n" option in the "top" command is used to specify the number of iterations the command should run before exiting. In this case, "-n 4" means that the command will run 4 times before exiting.

Submit
34. Qual comando "tar" deve ser utilizado para desempacotar o arquivo "arquivos-pdf.tar" ?

Explanation

All of the given options are correct commands to unpack the file "arquivos-pdf.tar" using the "tar" command. The "x" flag is used to extract the contents of the archive, the "f" flag is used to specify the archive file, and the "v" flag is used to display the progress of the extraction. Therefore, any of the provided commands can be used to successfully unpack the file.

Submit
35. Qual dos comandos abaixo poderia ser utilizado para visualizar os arquivos comprimidos no "my-txt.tar.gz" ?

Explanation

The command "tar -tzf my-txt.tar.gz" can be used to view the files compressed in the "my-txt.tar.gz" archive.

Submit
36. Qual dos comandos abaixo irá retornar uma lista dos processos que estão em execução no terminal atual ?

Explanation

The correct answer is "ps". The "ps" command is used to display information about the processes that are currently running on the system. It provides a snapshot of the current processes, including their process IDs (PIDs), CPU usage, memory usage, and other details. By running the "ps" command in the terminal, a list of the processes running in the current terminal session will be displayed.

Submit
37. Qual comando jobs irá listar além do número do trabalho de uma tarefa o PID do seu processo?

Explanation

The command "jobs -l" is used to list all the active jobs along with their respective process IDs (PIDs). This command provides additional information about the jobs, including the job number and the PID of each job's process.

Submit
38. Quais das alternativas abaixo pode ser utilizada para descompactar o arquivo "arquivo.gz" ?

Explanation

Both "gzip -d arquivo.gz" and "gunzip arquivo.gz" can be used to decompress the file "arquivo.gz".

Submit
39. Qual dos comandos abaixo irá pesquisar em seu diretório corrente pelo arquivo "articles.jpg" ignorando a difrenciação entres letras maiúsculas e minúsculas?

Explanation

The correct answer is "find . -iname "articles.jpg"". This command uses the "find" command to search for a file named "articles.jpg" in the current directory, ignoring the case sensitivity. The "-iname" option is used to perform a case-insensitive search, allowing for the possibility of the file name being written in different cases.

Submit
40. Como você faria para compactar o arquivo "arquivo.pdf" com a ferramenta bzip2 ?

Explanation

The correct answer is "bzip2 arquivo.pdf". This command uses the bzip2 tool to compress the file "arquivo.pdf".

Submit
41. Qual das alternativas abaixo você utilizaria para desempacotar o arquivo "empacotados.pdf.cpio" ?

Explanation

The correct answer is "cpio -iv

Submit
42. Supondo que você queira descompactar o arquivo "my-pdf.tar.gz" localizado em seu diretório corrente para o diretório "/home/user/myfiles", qual das alternativas abaixo realizaria tal tarefa ?

Explanation

The correct answer is "tar -xzvf my-pdf.tar.gz -C /home/user/myfiles". This command uses the "tar" utility to extract the contents of the "my-pdf.tar.gz" file. The options "-x" and "-z" specify that the file should be extracted and decompressed, while the option "-v" enables verbose output. The option "-f" is used to specify the input file, and "-C" is used to specify the directory where the extracted files should be placed, in this case, "/home/user/myfiles".

Submit
43. Supondo que em um diretório corrente "ao qual você se localiza" contenha 10 arquivos no formato "txt", como você faria para comprimir tais arquivos utilizando o formato gzip para um arquivo chamado my-txt.tar.gz ? 

Explanation

The correct answer is "tar -czvf my-txt.tar.gz *.txt". This command uses the tar utility to create a tar archive named "my-txt.tar.gz" and compresses the files with the "*.txt" extension in the current directory using gzip compression. The "-c" flag is used to create a new archive, the "-z" flag is used to compress the files using gzip, the "-v" flag is used to display the progress and details of the compression process, and the "my-txt.tar.gz" specifies the name of the output archive file. Finally, "*.txt" specifies the files to be included in the archive.

Submit
44. Qual dos comandos abaixo poderia ser utilizado para visualizar os arquivos compactados no "my-txt.tar.bz2" ?

Explanation

The correct answer is "tar -tjf my-txt.tar.bz2". This command uses the "t" option to list the contents of the compressed file, the "j" option to specify that the file is compressed with bzip2, and the "f" option to specify the file name.

Submit
45. A variável $$ embutida no shell Bash possui qual valor ?

Explanation

The correct answer is "Valor PID do shell atual." This is because the variable $$ in the Bash shell holds the value of the current shell's process ID (PID).

Submit
46. Qual comando pode ser utilizado para testar a integridade do arquivo "arquivo.pdf.gz" ?

Explanation

O comando "gzip -t arquivo.pdf.gz" pode ser utilizado para testar a integridade do arquivo "arquivo.pdf.gz". O parâmetro "-t" é usado para testar se o arquivo está corrompido ou não.

Submit
47. Supondo que você queira adicionar o arquivo "LPI.pdf" ao arquivo "Estudo-LPI.tar", qual das alternativas seria aplicável ?

Explanation

The correct answer is "tar -rf Estudo-LPI.tar LPI.pdf". This is because the "-r" flag is used to append files to an existing tar archive, and the "f" flag specifies the name of the tar archive file. Therefore, the command "tar -rf Estudo-LPI.tar LPI.pdf" would add the file "LPI.pdf" to the existing tar archive "Estudo-LPI.tar".

Submit
48. Quais das alternativas abaixo pode ser utilizada para listar o arquivo "arquivo.pdf" dentro do arquivo "arquivo.pdf.gz"?

Explanation

The option "gzip -l arquivo.pdf.gz" can be used to list the contents of the file "arquivo.pdf.gz".

Submit
49. Quais comandos exibem detalhes sobre os processos que estão sendo executados em tempo real no servidor ? (Selecione 2 respostas).

Explanation

The commands "top" and "htop" display details about the processes that are currently being executed in real-time on the server. These commands provide information such as the CPU and memory usage, process IDs, and the amount of time the processes have been running. By using these commands, users can monitor and manage the processes running on the server efficiently.

Submit
50. Que seção do manual do usuário on-line contém os comandos administrativos? Selecione uma opção.

Explanation

The correct answer is Section 8 because it is the section of the online user manual that contains the administrative commands.

Submit
51. Utilizando o editor de texto vi. Como você faria para substituir um caractere qualquer ao qual se encontra posicionado o cursor pela letra "c" ?  

Explanation

To replace a character in the vi text editor, you would first press the "r" key to enter the replace mode, and then type the letter "c" to replace the current character with "c".

Submit
52. Sobre o comando dd. Associe:
Submit
53. Qual dos seguintes comandos irá extrair o conteúdo do arquivo myfonts.rpm no diretório atual?

Explanation

The correct answer is "rpm2cpio myfonts.rpm | cpio -i --make-directories". This command uses the rpm2cpio utility to convert the RPM package file "myfonts.rpm" into a cpio archive. The "|" symbol is a pipe operator, which sends the output of the first command to the input of the second command. The "cpio -i --make-directories" command then extracts the contents of the cpio archive and creates any necessary directories.

Submit
54. Qual comando "ps" (Com opção) irá listar os processos que estão em execução em todos os terminais?

Explanation

The "ps -a" and "ps a" commands both list the processes that are currently running in all terminals. The "-a" option in both commands stands for "all" and includes processes from all users. The "ps a" command is an alternative syntax for the same functionality.

Submit
55. Sobre as opções do comando find. Associe:
Submit
56. Qual dos comandos abaixo é possível visualizar todas as variáveis que foram exportadas? (Selecione 2 respostas).

Explanation

The correct answers are "env" and "export". The "env" command displays all the environment variables that have been set. The "export" command is used to set environment variables and can also be used to display the values of all currently defined environment variables.

Submit
57. Como você faria para forçar a compactação do arquivo "arquivo.pdf" com a ferramenta bzip2 ?

Explanation

The correct answer is "bzip2 -z arquivo.pdf". The "-z" option is used to compress the file with bzip2.

Submit
58. Sobre as opções do comando bzip2. Associe:
Submit
59. Qual comando "tar" deve ser utilizado para descompactar o arquivo "my-txt.tar.gz" ?

Explanation

The correct answer is "tar -xzf my-txt.tar.gz" because the "x" flag is used to extract files from the archive, the "z" flag is used to filter the archive through gzip, and the "f" flag is used to specify the file name of the archive. Therefore, "tar -xzf my-txt.tar.gz" is the correct command to extract the contents of the "my-txt.tar.gz" file. Similarly, "tar xzf my-txt.tar.gz", "tar -xzvf my-txt.tar.gz", and "tar xzvf my-txt.tar.gz" are also correct commands with the same functionality.

Submit
60. Qual comando dd irá clonar a partição /dev/sdb1 para /dev/sdc1 especificando uma taxa de leitura e gravação de 1M e evitando a parada do processamento caso ocorra erros ?

Explanation

The correct answer is "dd if=/dev/sdb1 of=/dev/sdc1 bs=1M conv=noerror" and "dd if=/dev/sdb1 of=/dev/sdc1 ibs=1M obs=1M conv=noerror". Both of these commands will clone the partition /dev/sdb1 to /dev/sdc1 with a read and write rate of 1M and will continue processing even if errors occur.

Submit
61. Qual das alternativas abaixo pode ser utilizada para listar o conteúdo do arquivo "empacotados.cpio" ?

Explanation

The correct answer is "cpio -t

Submit
62. Quais comandos abaixo podem ser utilizados para pesquisar ficheiros vazios (0 bytes) ? (Slecione 2 respostas).

Explanation

The correct answers are "find / -empty -exec ls -lh {} \;" and "find / -size 0 -exec ls -lh {} \;". The first command uses the "-empty" option to search for empty files, and the "-exec ls -lh {} \;" part is used to list the files found. The second command uses the "-size 0" option to search for files with a size of 0 bytes, and again the "-exec ls -lh {} \;" part is used to list the files found.

Submit
63. Qual opção do comando top irá obter o resultado na saída padrão de forma não interativa? (Especifique o comando completo).

Explanation

The option "-b" in the "top" command stands for "batch mode". When this option is used, the "top" command will run in non-interactive mode and will send the output directly to the standard output instead of displaying it on the terminal. This is useful when the output of the "top" command needs to be processed or redirected to a file.

Submit
64. Sobre o editor de texto vi. Associe:
Submit
65. Qual das alternativas abaixo irá numerar todas as linhas do arquivo "myfile.txt", incluindo linhas vazias?

Explanation

The correct answer is "nl -ba myfile.txt". The "-ba" option in the "nl" command is used to number all lines in the file, including empty lines.

Submit
66. Sobre o comando mv. Associe:
Submit
67. Como você faria para compactar o arquivo "arquivo.pdf" com a ferramenta gzip ? (Selecione 2 respostas).

Explanation

To compress the file "arquivo.pdf" using the gzip tool, you can use the command "gzip arquivo.pdf" or "gzip -9 arquivo.pdf". The first command will compress the file and replace it with a compressed version, while the second command will compress the file with maximum compression level.

Submit
68. Sobre os sinais que podem ser emitidos pelo comando kill. Associe:
Submit
69. Supondo que você queira empacotar todos arquivos pdf localizados em seu diretório corrente utilizando a ferramenta cpio. Qual das alternativas abaixo você utilizaria?

Explanation

The correct answer is "ls | cpio -ov > empacotados.pdf.cpio". This command uses the "ls" command to list all the files in the current directory, and then pipes the output to the "cpio" command. The "-o" option in the "cpio" command specifies that it should create an archive, and the "-v" option enables verbose output. The ">" symbol is used to redirect the output to a file named "empacotados.pdf.cpio". Therefore, this command will create an archive file named "empacotados.pdf.cpio" containing all the PDF files in the current directory.

Submit
70. Qual dos comandos abaixo irá compactar o arquivo "arquivo.pdf" para arquivo.pdf.xz, porém mantendo o arquivo de entrada (Arquivo original) ?

Explanation

The command "xz -k arquivo.pdf" will compress the file "arquivo.pdf" into "arquivo.pdf.xz" while keeping the original file intact. The "-k" option in the command specifies that the original file should be kept.

Submit
71. Qual dos seguintes comandos cria uma visualização de processos, mostrando o pai/filho relacionamentos através de ligações entre os seus nomes ?

Explanation

The command "ps --forest" creates a visualization of processes by showing the parent/child relationships through links between their names. This command is specifically designed to display the process hierarchy in a tree-like structure, making it easier to understand the relationships between different processes. It provides a clear and organized view of the processes running on the system.

Submit
72. Qual das alternativas abaixo irá definir o tempo de atualização para 2 segundos na saída padrão utilizando o comando top?

Explanation

The correct answer is "top -d 2". The "-d" option in the "top" command is used to specify the delay between screen updates in seconds. By using "top -d 2", the time of update for the standard output will be set to 2 seconds.

Submit
73. Quais das alternativas abaixo irá  numerar todas as linhas do arquivo myfile.txt, com exceção das linhas vazias? (Selecione 2 respostas).

Explanation

The correct answer is "nl myfile.txt" and "nl -bt myfile.txt".

The "nl myfile.txt" command will number all the lines in the file myfile.txt, excluding the empty lines.

The "nl -bt myfile.txt" command will also number all the lines in the file myfile.txt, excluding the empty lines, and will display the line numbers in the body of the text.

Submit
74. Qual a linha de comando (Completa) para gravar a saída do comando ls em um arquivo chamado myfile.txt (Localizado no diretório corrente) e ao mesmo tempo mostrar a saída deste comando no stdout? 

Explanation

The command "ls" lists the files and directories in the current directory. The "|" symbol is a pipe operator, which sends the output of the "ls" command as input to the "tee" command. The "tee" command reads the input and writes it both to the specified file "myfile.txt" and to the standard output (stdout), which is displayed on the screen. Therefore, the command "ls | tee myfile.txt" saves the output of the "ls" command to the file "myfile.txt" and also displays the output on the screen.

Submit
75. Sobre o editor de texto vi. Associe:
Submit
76. Sobre as opções do comando "gzip" Associe:
Submit
77. Sobre as opções fora do top. Associe:
Submit
78. Qual o tempo de atualização padrão em segundos na saída do comando top?

Explanation

The correct answer is 5 because the question is asking for the default update time in seconds for the output of the "top" command. The "top" command is a system monitoring tool in Unix-like operating systems, and it displays real-time information about processes and system performance. By default, the "top" command updates every 5 seconds, providing users with the most up-to-date information about the system's status.

Submit
79. Supondo que você está localizado em seu diretório home "/home/user" e deseja realizar um backup de todos os seus documentos para um HD exeterno localizado em "/media/user/FLASH_HD". Qual comando abaixo "cpio" você poderia utilizar para realizar uma cópia de toda a estrutura de diretórios e arquivos do seu usuário para o HD externo ?

Explanation

The correct answer is "find . -depth | cpio -pdv /media/user/FLASH_HD". This command uses the "find" command to locate all files and directories in the current directory and its subdirectories. The "-depth" option ensures that the directories are processed before their contents. The output of the "find" command is then piped to the "cpio" command, which copies the files and directories to the specified destination "/media/user/FLASH_HD" while preserving their structure and permissions. The "-p" option of "cpio" ensures that the directories are created if they don't exist, and the "-d" option preserves the directories' structure. The "-v" option provides verbose output, displaying the files as they are copied.

Submit
80.  Quais das alternativas abaixo pode ser utilizada para extrair o arquivo "arquivo.pdf.gz" para a saída padrão ?

Explanation

The correct answer is "gzip -c arquivo.pdf.gz". This command will extract the file "arquivo.pdf.gz" and send the output to the standard output.

Submit
81. Como um processo indica ao shell que encerrou com uma condição de erro?

Explanation

When a process terminates with a non-zero exit code, it indicates to the shell that it has ended with an error condition. This allows the shell to determine if the process was successful or encountered an error. By setting the exit code to a value other than zero, the process signals that it did not complete successfully.

Submit
82. Como mudar a prioridade do updatedb (que já está em execução com o PID 1111) para a prioridade 15 positivo ?

Explanation

Both "renice -n +15 1111" and "renice -n 15 1111" are correct answers for changing the priority of the "updatedb" process that is already running with PID 1111 to a positive priority of 15.

Submit
83. Qual das alternativas abaixo irá criar um empacotamento dos arquivos em seu diretório corrente utilizando o formato tar ?

Explanation

The correct answer is "ls | cpio -o -H tar > empacotados.tar". This command uses the "ls" command to list the files in the current directory, pipes the output to the "cpio" command, which creates an archive in the tar format using the "-o" option, and specifies the "-H tar" option to indicate that the archive format should be tar. Finally, the output of the "cpio" command is redirected to a file named "empacotados.tar" using the ">" operator.

Submit
84. Utilizando o editor de texto vi. Como você faria para substituir um caractere qualquer ao qual se encontra posicionado o cursor por 3 letras "c" de forma consecutiva?  

Explanation

To replace a character with three consecutive "c" letters, you need to press the following key sequences: 3rc. This means that you press the number 3, followed by the letter "r", and then the letter "c". This will replace the character under the cursor with three consecutive "c" letters.

Submit
85. Sobre o comando cpio. Associe:
Submit
86. Qual comando completo "tar" apagaria o arquivo "arq3.pdf" a partir do arquivo "arquivos-pdf.tar" ?

Explanation

The given command "tar -f arquivos-pdf.tar --delete arq3.pdf" uses the "tar" command to delete the file "arq3.pdf" from the archive file "arquivos-pdf.tar". The "-f" flag specifies the archive file to be operated on, and the "--delete" option deletes the specified file from the archive.

Submit
87. Sobre as opções do comando "tar" Associe:
Submit
88. Sobre o comando xz. Associe:
Submit
89. Qual comando "ps" (Com opção) irá listar todos processos que estão sendo executados no SO?

Explanation

The command "ps -A" is used to list all processes that are currently running on the operating system. This command displays information such as the process ID (PID), the terminal associated with the process, the CPU usage, and the command that initiated the process. By using the "-A" option, the command includes all processes, regardless of their ownership or terminal association.

Submit
90. Como você faria para compactar o arquivo "arquivo.pdf" com a ferramenta xz ? (Selecione 2 respostas).

Explanation

The correct answers are "xz arquivo.pdf" and "xz -zv arquivo.pdf". The xz command is used to compress files with the xz compression algorithm. The "-z" option is used to specify that the file should be compressed, and the "-v" option is used to display the progress and details of the compression process. Therefore, the correct commands to compress the file "arquivo.pdf" with the xz tool would be "xz arquivo.pdf" and "xz -zv arquivo.pdf".

Submit
91. Sobre o editor de vi. Associe:
Submit
92. Qual comando irá converter a ocorrência de espaços em tabulações em um arquivo de texto qualquer?

Explanation

The "unexpand" command is used to convert occurrences of spaces into tabs in a text file. It replaces spaces with tabs based on predefined tab stops. This command is useful for formatting text files and aligning columns.

Submit
93. Sobre expressões posix. Associe:
Submit
94. Sobre as opções dentro do top. Associe:
Submit
95. Qual comando nl (Com opções) irá listar, mas não numerar as linhas do arquivo "/etc/passwd" ?

Explanation

The command "nl -bn /etc/passwd" will list the lines of the file "/etc/passwd" without numbering them.

Submit
96. Sobre o editor de vi. Associe:
Submit
97. Sobre seleção e interpretação de expressão regular utilizando o comando grep. Associe:
Submit
98. Sobre o comando grep. Associe:
Submit
99. Sobre o editor de texto vi. Associe:
Submit
100. Sobre o comando ps. Associe:
Submit
View My Results

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 14, 2017
    Quiz Created by
    Viniciusalcantar
Cancel
  • All
    All (100)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
O comando find, por padrão, percorre toda a árvore de...
Qual o comando que exibe o total e o consumo de memória ram e...
Sobre as opções de conversões do comando dd. Associe:
Qual comando "xz" completo irá testar a...
Qual comando irá listar todos os processos, exibindo o nome dos...
Como você faria para pesquisar em seu diretório corrente...
Qual dos comandos abaixo irá listar todos o ficheiros maiores...
Qual das alternativas abaixo pode ser utilizada para otimizar...
Para lê e escrever o mesmo número de bytes com o comando...
Sobre os comando nice e renice. Assinale as afirmativas corretas....
Qual das alternativas abaixo pode ser utilizada para extrair o...
Estou no meu diretório home, e crio um diretório chamado...
Qual das alternativas abaixo iria criar uma imagem ISO a partir de um...
Qual comando kill irá listar as opções dos sinais...
Acabamos de instalar um novo software no diretório /opt....
Sobre o editor de texto vi. Associe:
Especifique o comando "xz" completo que irá...
Qual das seguintes expressões regulares irá retornar as...
Qual das opções da ferramenta gzip pode ser utilizada para...
Qual comando top irá listar apenas os processos do...
Supondo que em um diretório corrente "ao qual você...
Qual dos seguintes comandos é implementado como um comando...
Qual dos seguintes comandos irá imprimir as linhas do arquivo...
Qual das opções ("Opção interna do comando...
Qual comando dd irá criar uma imagem do setor de...
Supondo que você queira encontrar o arquivo...
Como você faria para pesquisar em seu diretório corrente...
Qual dos comandos a seguir não pode ser usado para sair do vi...
Qual comando "xz" completo irá descompactar...
Qual comando "top" irá ignorar processos ociosos ?
Sobre os comando kill e killall. Assinale as afirmativas corretas....
Qual comando "tar" deve ser utilizado para...
Qual comando irá atualizar a saída padrão do...
Qual comando "tar" deve ser utilizado para...
Qual dos comandos abaixo poderia ser utilizado para visualizar os...
Qual dos comandos abaixo irá retornar uma lista dos processos...
Qual comando jobs irá listar além do número do...
Quais das alternativas abaixo pode ser utilizada para descompactar o...
Qual dos comandos abaixo irá pesquisar em seu diretório...
Como você faria para compactar o arquivo "arquivo.pdf"...
Qual das alternativas abaixo você utilizaria para desempacotar o...
Supondo que você queira descompactar o arquivo...
Supondo que em um diretório corrente "ao qual você...
Qual dos comandos abaixo poderia ser utilizado para visualizar os...
A variável $$ embutida no shell Bash possui qual valor ?
Qual comando pode ser utilizado para testar a integridade do...
Supondo que você queira adicionar o arquivo "LPI.pdf"...
Quais das alternativas abaixo pode ser utilizada para listar o...
Quais comandos exibem detalhes sobre os processos que estão...
Que seção do manual do usuário on-line contém os...
Utilizando o editor de texto vi. Como você faria para substituir...
Sobre o comando dd. Associe:
Qual dos seguintes comandos irá extrair o conteúdo do...
Qual comando "ps" (Com opção) irá...
Sobre as opções do comando find. Associe:
Qual dos comandos abaixo é possível visualizar todas as...
Como você faria para forçar a compactação do arquivo...
Sobre as opções do comando bzip2. Associe:
Qual comando "tar" deve ser utilizado para...
Qual comando dd irá clonar a partição /dev/sdb1 para...
Qual das alternativas abaixo pode ser utilizada para listar o...
Quais comandos abaixo podem ser utilizados para pesquisar ficheiros...
Qual opção do comando top irá obter o resultado na...
Sobre o editor de texto vi. Associe:
Qual das alternativas abaixo irá numerar todas as linhas do...
Sobre o comando mv. Associe:
Como você faria para compactar o arquivo "arquivo.pdf"...
Sobre os sinais que podem ser emitidos pelo comando kill. Associe:
Supondo que você queira empacotar todos arquivos pdf localizados...
Qual dos comandos abaixo irá compactar o arquivo...
Qual dos seguintes comandos cria uma visualização de...
Qual das alternativas abaixo irá definir o tempo de...
Quais das alternativas abaixo irá  numerar todas as linhas...
Qual a linha de comando (Completa) para gravar a saída do...
Sobre o editor de texto vi. Associe:
Sobre as opções do comando "gzip" Associe:
Sobre as opções fora do top. Associe:
Qual o tempo de atualização padrão em segundos na...
Supondo que você está localizado em seu diretório...
 Quais das alternativas abaixo pode ser utilizada para extrair o...
Como um processo indica ao shell que encerrou com uma condição...
Como mudar a prioridade do updatedb (que já está em...
Qual das alternativas abaixo irá criar um empacotamento dos...
Utilizando o editor de texto vi. Como você faria para substituir...
Sobre o comando cpio. Associe:
Qual comando completo "tar" apagaria o...
Sobre as opções do comando "tar" Associe:
Sobre o comando xz. Associe:
Qual comando "ps" (Com opção) irá...
Como você faria para compactar o arquivo "arquivo.pdf"...
Sobre o editor de vi. Associe:
Qual comando irá converter a ocorrência de espaços em...
Sobre expressões posix. Associe:
Sobre as opções dentro do top. Associe:
Qual comando nl (Com opções) irá listar, mas...
Sobre o editor de vi. Associe:
Sobre seleção e interpretação de expressão...
Sobre o comando grep. Associe:
Sobre o editor de texto vi. Associe:
Sobre o comando ps. Associe:
Alert!

Advertisement