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,124
| Attempts: 258
SettingsSettings
Please wait...
  • 1/100 Questions

    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

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

.


Quiz Preview

  • 2. 

    Qual o comando que exibe o total e o consumo de memória ram e swap de um Sistema GNU/Linux ?

    • man

    • ps

    • df

    • free

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

    Rate this question:

  • 3. 

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

    • bzip2 -d arquivo.pdf.bz2

    • bzip2 -t arquivo.pdf.bz2

    • bzip2 -z arquivo.pdf.bz2

    • N.D.A

    Correct Answer
    A. bzip2 -d 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.

    Rate this question:

  • 4. 

    Qual comando "xz" completo irá testar a integridade do arquivo "arquivo.pdf.xz" ?

    Correct Answer
    xz -t 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.

    Rate this question:

  • 5. 

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

    • gzip -f /home/MYFILES

    • gzip -r /home/MYFILES

    • gzip -9rv /home/MYFILES

    • N.D.A

    Correct Answer
    A. gzip -9rv /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.

    Rate this question:

  • 6. 

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

    • ps a

    • ps ag

    • ps aux

    • ps ac

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

    Rate this question:

  • 7. 

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

    • find . -perm 0777 -type d -exec ls -l {} \;

    • find . -perm 0777 -type f -exec ls -l {} \;

    • find / -perm 0777 -type l -exec ls -l {} \;

    • N.D.A

    Correct Answer
    A. find . -perm 0777 -type d -exec ls -l {} \;
    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.

    Rate this question:

  • 8. 

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

    • find . -size -100M -exec ls -s {} \;

    • find . -size +100M -exec ls -s {} \;

    • find . -size 100M -exec ls -s {} \;

    • N.D.A

    Correct Answer
    A. find . -size +100M -exec ls -s {} \;
    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.

    Rate this question:

  • 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.

    • Verdadeiro

    • Falso

    Correct Answer
    A. Verdadeiro
    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.

    Rate this question:

  • 10. 

    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 ?

    • dd if=/dev/cdrom of=/mnt/HD/ bs=4096 conv=noerror

    • dd if=/dev/cdrom of=/mnt/HD/imagem.iso bs=4096b conv=sync

    • dd if=/dev/cdrom of=/mnt/HD/imagem.iso bs=4096 conv=noerror,sync

    • N.D.A

    Correct Answer
    A. dd if=/dev/cdrom of=/mnt/HD/imagem.iso bs=4096 conv=noerror,sync
    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.

    Rate this question:

  • 11. 

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

    • nice – Inicia um aplicativo com a prioridade desejada

    • nice – Muda a prioridade de um aplicativo já em execução

    • renice – Inicia um aplicativo com a prioridade desejada

    • renice – Muda a prioridade de um aplicativo já em execução

    Correct Answer(s)
    A. nice – Inicia um aplicativo com a prioridade desejada
    A. renice – Muda a prioridade de um aplicativo já em execução
    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.

    Rate this question:

  • 12. 

    Especifique o comando "xz" completo que irá listar informações sobre o arquivo "arquivo.pdf.xz" ?

    Correct Answer(s)
    xz -l arquivo.pdf.xz
    Explanation
    The command "xz -l arquivo.pdf.xz" is used to list information about the file "arquivo.pdf.xz".

    Rate this question:

  • 13. 

    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?

    • find . -name "*.tgz" -size +10k -exec cp {} teste/ \;

    • find . -name "*.tgz" -size 10k -exec mv {} teste/ \;

    • find . -name "*.tgz" -size -10k -exec cp {} teste/ \;

    • find . -iname "*.tgz" -size -10k -exec mv {} teste/ \;

    Correct Answer
    A. find . -name "*.tgz" -size -10k -exec cp {} teste/ \;
    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".

    Rate this question:

  • 14. 

    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).

    • tar -czf my-txt.tar.bz2 *.txt

    • tar czf my-txt.tar.bz2 *.txt

    • tar -cjf my-txt.tar.bz2 *.txt

    • tar cjvf my-txt.tar.bz2 *.txt

    Correct Answer(s)
    A. tar -cjf my-txt.tar.bz2 *.txt
    A. tar cjvf my-txt.tar.bz2 *.txt
    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.

    Rate this question:

  • 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 ?

    • updateman /opt/novosoft/man

    • updatedb /opt/novosoft/man

    • export MANPATH=$MANPATH:/opt/novosoft/man

    • makewhatis /opt/novosoft/man

    Correct Answer
    A. export MANPATH=$MANPATH:/opt/novosoft/man
    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.

    Rate this question:

  • 16. 

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

    • -c

    • -f

    • -l

    • -9

    Correct Answer
    A. -9
    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.

    Rate this question:

  • 17. 

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

    Correct Answer
    kill -l
    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.

    Rate this question:

  • 18. 

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

    • top -L vinicius

    • top -u vinicius

    • top -l vinicius

    • N.D.A

    Correct Answer
    A. top -u 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".

    Rate this question:

  • 19. 

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

    • cat

    • echo

    • tee

    • sed

    Correct Answer
    A. echo
    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.

    Rate this question:

  • 20. 

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

    • d.g

    • d[iu]g

    • d[i-u]g

    • di*g

    Correct Answer
    A. d[iu]g
    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.

    Rate this question:

  • 21. 

    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 ?

    • -t

    • -d

    • -b

    • -r

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

    Rate this question:

  • 22. 

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

    • grep change[ds] world.txt

    • sed change[d-s] world.txt

    • od “change’d|s’“ world.txt

    • cat world.txt changes changed

    Correct Answer
    A. grep change[ds] world.txt
    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".

    Rate this question:

  • 23. 

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

    • ZZ

    • :x

    • :q

    • :q!

    • :bye

    Correct Answer
    A. :bye
    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!".

    Rate this question:

  • 24. 

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

    Correct Answer
    tar -xjf my-txt.tar.bz2
    tar xjf my-txt.tar.bz2
    tar -xjvf my-txt.tar.bz2
    tar xjvf 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.

    Rate this question:

  • 25. 

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

    • dd if=/dev/sda of=/mnt/HD/MBR.img bs=512 count=1

    • dd if=/dev/sda of=/mnt/HD/MBR.img bs=512

    • dd if=/dev/sda of=/mnt/HD/MBR.img bs=1024

    • N.D.A

    Correct Answer
    A. dd if=/dev/sda of=/mnt/HD/MBR.img bs=512 count=1
    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.

    Rate this question:

  • 26. 

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

    • Killall envia sinais para os aplicativos pelo PID do processo

    • Killall envia sinais para os aplicativos pelo seu nome

    • Kill envia sinais para os aplicativos pelo nome do processo

    • Kill envia sinais para os aplicativos pelo número do processo

    Correct Answer(s)
    A. Killall envia sinais para os aplicativos pelo seu nome
    A. Kill envia sinais para os aplicativos pelo número do processo
    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).

    Rate this question:

  • 27. 

    Qual comando "top" irá ignorar processos ociosos ?

    • top -b

    • top -i

    • top -d

    • N.D.A

    Correct Answer
    A. top -i
    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.

    Rate this question:

  • 28. 

    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?

    • find / -name "articles.jpg" -exec chmod 644 {} \;

    • find / -iname "articles.jpg" -perm 644

    • find / -name "articles.jpg" -exec -perm chmod 644 {} \;

    • N.D.A

    Correct Answer
    A. find / -name "articles.jpg" -exec chmod 644 {} \;
    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.

    Rate this question:

  • 29. 

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

    Correct Answer
    tar -xf arquivos-pdf.tar
    tar xf arquivos-pdf.tar
    tar -xvf arquivos-pdf.tar
    tar xvf 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.

    Rate this question:

  • 30. 

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

    Correct Answer
    xz -d 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.

    Rate this question:

  • 31. 

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

    • find / -type l -exec ls -l {} \;

    • find . -type d -exec chmod 777 {} \;

    • find . -perm 0777 -type f -exec ls -l {} \;

    • N.D.A

    Correct Answer
    A. find . -perm 0777 -type f -exec ls -l {} \;
    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.

    Rate this question:

  • 32. 

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

    • tar -tzf my-txt.tar.gz

    • tar -tjvf my-txt.tar.gz

    • tar -txvf my-txt.tar.gz

    • N.D.A

    Correct Answer
    A. tar -tzf 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.

    Rate this question:

  • 33. 

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

    • gzip -d arquivo.gz

    • gzip -l arquivo.gz

    • gzip -t arqivo.gz

    • gunzip arquivo.gz

    Correct Answer(s)
    A. gzip -d arquivo.gz
    A. gunzip arquivo.gz
    Explanation
    Both "gzip -d arquivo.gz" and "gunzip arquivo.gz" can be used to decompress the file "arquivo.gz".

    Rate this question:

  • 34. 

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

    • cpio -iv < empacotados.pdf.cpio

    • cpio -idv empacotados.pdf.cpio

    • cpio -i > empacotados.pdf.cpio

    • N.D.A

    Correct Answer
    A. cpio -iv < empacotados.pdf.cpio
    Explanation
    The correct answer is "cpio -iv < empacotados.pdf.cpio" because the "-i" flag is used to extract files from an archive, the "-v" flag is used to display verbose output, and the "

    Rate this question:

  • 35. 

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

    • top -d 4

    • top -i 4

    • top -n 4

    • N.D.A

    Correct Answer
    A. top -n 4
    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.

    Rate this question:

  • 36. 

    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?

    • find . -name "articles.jpg"

    • find . -name --sensitive "articles.jpg"

    • find . -iname "articles.jpg"

    • find . -cname "articles.jpg"

    Correct Answer
    A. find . -iname "articles.jpg"
    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.

    Rate this question:

  • 37. 

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

    • bzip2 -d arquivo.pdf

    • bzip2 -c arquivo.pdf

    • bzip2 arquivo.pdf

    • bzip2 -l arquivo.pdf

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

    Rate this question:

  • 38. 

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

    • tar -czvf my-txt.tar.bz2

    • tar -tzf my-txt.tar.bz2

    • tar -tf my-txt.tar.bz2

    • tar -tjf my-txt.tar.bz2

    Correct Answer
    A. tar -tjf 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.

    Rate this question:

  • 39. 

    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 ?

    • tar -xzvf my-pdf.tar.gz -C /home/user/myfiles

    • tar -xzvf my-pdf.tar.gz -c /home/user/myfiles

    • tar -xzvf my-pdf.tar.gz -Z /home/user/myfiles

    • N.D.A

    Correct Answer
    A. tar -xzvf my-pdf.tar.gz -C /home/user/myfiles
    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".

    Rate this question:

  • 40. 

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

    • top

    • ps

    • htop

    • kill

    Correct Answer
    A. ps
    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.

    Rate this question:

  • 41. 

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

    Correct Answer
    jobs -l
    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.

    Rate this question:

  • 42. 

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

    • Valor 0 se o último comando foi executado com sucesso e 1 caso contrário.

    • Valor PID do shell atual.

    • Contém a versão do shell Bash corrente.

    • Contém a última linha do histórico Bash executada com sucesso.

    Correct Answer
    A. Valor PID do shell atual.
    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).

    Rate this question:

  • 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 ? 

    • tar -cjvf my-txt.tar.gz *.txt

    • tar -czvf *.txt my-txt.tar.gz

    • tar -czvf my-txt.tar.gz *.txt

    • tar -tzvf my-txt.tar.gz *.txt

    Correct Answer
    A. tar -czvf my-txt.tar.gz *.txt
    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.

    Rate this question:

  • 44. 

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

    Correct Answer
    gzip -t 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.

    Rate this question:

  • 45. 

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

    • ps

    • top

    • jobs

    • htop

    Correct Answer(s)
    A. top
    A. htop
    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.

    Rate this question:

  • 46. 

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

    • Pressionaria a tecla "r" e depois "c"

    • Pressionaria a tecla "x" e depois "c"

    • Pressionaria a tecla "i" e depois "c"

    • N.D.A

    Correct Answer
    A. Pressionaria a tecla "r" e depois "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".

    Rate this question:

  • 47. 

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

    • gzip -t arquivo.pdf.gz

    • gzip -l arquivo.pdf.gz

    • gzip -c arquivo.pdf.gz

    • N.D.A

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

    Rate this question:

  • 48. 

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

    • bzip2 -9 arquivo.pdf

    • bzip2 -z arquivo.pdf

    • bzip2 -c arquivo.pdf

    • bzip2 -t arqivo.pdf

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

    Rate this question:

  • 49. 

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

    Correct Answer
    ps -a
    ps a
    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.

    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 14, 2017
    Quiz Created by
    Viniciusalcantar
Back to Top Back to top
Advertisement