Lpi 101-500日本語認定ガイドPDFは100%カバー率でリアル試験問題 [Q36-Q51]

Share

Lpi 101-500日本語認定ガイドPDFは100%カバー率でリアル試験問題

合格させる101-500日本語試験にはリアル問題解答

質問 # 36
現在のファイルをfilea.txtとして保存するには、viを終了する前にどのコマンドを入力する必要がありますか?

  • A. :save filea.txt
  • B. %s filea.txt
  • C. %w filea.txt
  • D. :s filea.txt
  • E. :w filea.txt

正解:E

解説:
Explanation
The correct answer is D, :w filea.txt. This command will save the current file as filea.txt before exiting vi. The syntax of the command is:
w [filename]
The colon (:) begins command-input mode, which allows the user to enter commands at the bottom of the screen. The w stands for write, which means to save the file. The filename is the name of the file to be saved.
If no filename is given, the command will save the file with the same name as the original file.
Therefore, the command :w filea.txt will save the current file as filea.txt and return to command mode. To exit vi, the user can then enter :q, which stands for quit.
The other commands are incorrect for the following reasons:
* A, %s filea.txt: This command will not save the file, but it will try to substitute the string filea.txt in the file. The syntax of the command is:
%s/pattern/replacement/
The % symbol means to apply the command to the whole file. The s stands for substitute, which means to replace a pattern with another pattern. The pattern is the string to be matched, and the replacement is the string to replace the matched string. However, this command is incomplete, because it does not have a replacement or a delimiter. The command will cause an error and will not save the file.
* B, %w filea.txt: This command will not save the file, but it will try to write the file to a filter. The syntax of the command is:
%w !command
The % symbol means to apply the command to the whole file. The w stands for write, which means to save the file. The ! symbol means to execute an external command. The command is the name of the filter to which the file is written. However, this command is incomplete, because it does not have a ! symbol or a filter name. The command will cause an error and will not save the file.
* C, :save filea.txt: This command will not save the file, but it will try to save the file under a new name and switch to the new file. The syntax of the command is:
saveas filename
The saveas command is similar to the write command, but it also changes the current file name to the new file name. However, this command is incorrect, because it does not have the as keyword after save. The command will cause an error and will not save the file.
* E, :s filea.txt: This command will not save the file, but it will try to substitute the string filea.txt in the current line. The syntax of the command is:
s/pattern/replacement/
The s stands for substitute, which means to replace a pattern with another pattern. The pattern is the string to be matched, and the replacement is the string to replace the matched string. However, this command is incomplete, because it does not have a replacement or a delimiter. The command will cause an error and will not save the file.
References:
* How to Save a File in Vi / Vim Editor & Quit - phoenixNAP
* How to Save a File in Vim / Vi and Quit the Editor | Linuxize
* How to Save a File in Linux After Using the Vi Command - Computer Hope
* How to Save a File in Vi / Vim Editor in Linux - Tecmint
* How to Save a File in Vi / Vim Editor & Quit - GeeksforGeeks


質問 # 37

  • A. Option D
  • B. Option C
  • C. Option E
  • D. Option A
  • E. Option B

正解:A、B


質問 # 38
中断されたコマンドのバックグラウンド実行を継続するために使用されるシェルコマンド

  • A. exec
  • B. &
  • C. cont
  • D. :&
  • E. bg

正解:E

解説:
Explanation
The bg command is used to resume a suspended command in the background, allowing it to run without user interaction. The command takes a job ID as an argument, which can be obtained by using the jobs command.
Alternatively, if no job ID is specified, bg will resume the most recently suspended job. The bg command is part of the job control features of the Linux shell, which allow users to manage multiple processes running in the same terminal. References:
* LPI Linux Essentials: 1.3.2 Job Control
* LPI Linux Administrator: 103.1 Work on the command line


質問 # 39
次のコマンドのうち、クォータ設定の変更に使用されるのはどれですか? (2つ選択してください。)

  • A. editquota
  • B. quotaset
  • C. quotaedit
  • D. setquota
  • E. edquota

正解:E


質問 # 40

  • A. Option D
  • B. Option C
  • C. Option A
  • D. Option B
  • E. Option E

正解:E


質問 # 41
コマンドfooが呼び出されたときに実行される実行可能ファイルへのパスを表示するコマンドは次のうちどれですか?

  • A. locate foo
  • B. apropos foo
  • C. lsattr foo
  • D. whatis foo
  • E. which foo

正解:E

解説:
Explanation
This command will display the path to the executable file that would be executed when the command foo is invoked. The syntax of the command is:
which [options] command
The which command is a utility that searches the directories listed in the PATH environment variable for the executable file that matches the given command. The options can modify the behavior of the which command, such as displaying all matches, ignoring aliases, or showing the version. The command is the name of the command to be located.
Therefore, the command which foo will search the PATH directories for the executable file named foo and print its full path on the standard output. If there are multiple matches, the command will print the first one found. If there is no match, the command will print nothing and return an exit status of 1.
The other commands are incorrect for the following reasons:
* A, lsattr foo: This command will not display the path to the executable file, but it will display the file attributes of the file named foo in the current directory. The syntax of the command is:
lsattr [options] [file]
The lsattr command is a utility that lists the file attributes on a Linux second extended file system. The options can modify the behavior of the lsattr command, such as displaying the output in long format, recursing into subdirectories, or suppressing errors. The file is the name of the file whose attributes are to be listed. If no file is given, the command will list the attributes of all files in the current directory.
Therefore, the command lsattr foo will list the file attributes of the file named foo in the current directory, if it exists. If it does not exist, the command will report an error and return an exit status of 1.
* B, apropos foo: This command will not display the path to the executable file, but it will display a list of manual page names and descriptions that contain the keyword foo. The syntax of the command is:
apropos [options] keyword
The apropos command is a utility that searches the whatis database for the keyword and prints the manual page names and descriptions that match. The whatis database is a set of files containing short descriptions of system commands and programs. The options can modify the behavior of the apropos command, such as using regular expressions, ignoring case, or displaying the section numbers. The keyword is the word to be searched in the whatis database.
Therefore, the command apropos foo will search the whatis database for the word foo and print the manual page names and descriptions that contain it. If there are no matches, the command will print nothing and return an exit status of 1.
* C, locate foo: This command will not display the path to the executable file, but it will display a list of file names that contain the string foo. The syntax of the command is:
locate [options] pattern
The locate command is a utility that searches a database of file names and prints the file names that match the given pattern. The database is updated periodically by the updatedb command and may not reflect the current state of the file system. The options can modify the behavior of the locate command, such as using regular expressions, ignoring case, or limiting the number of results. The pattern is the string to be matched in the file names.
Therefore, the command locate foo will search the database of file names and print the file names that contain the string foo. If there are no matches, the command will print nothing and return an exit status of 1.
* D, whatis foo: This command will not display the path to the executable file, but it will display a short description of the command or program named foo. The syntax of the command is:
whatis [options] name
The whatis command is a utility that searches the whatis database for the name and prints the manual page name and description that match. The whatis database is a set of files containing short descriptions of system commands and programs. The options can modify the behavior of the whatis command, such as displaying the section numbers, using wildcards, or searching in a specific section. The name is the name of the command or program to be described.
Therefore, the command whatis foo will search the whatis database for the name foo and print the manual page name and description that match. If there are no matches, the command will print nothing and return an exit status of 1.
References:
* Which Command in Linux [Explained with Examples]
* How to Use the which Command on Linux - How-To Geek
* which command in Linux with examples - GeeksforGeeks
* How to Use the which Command in Linux - phoenixNAP


質問 # 42

  • A. Option D
  • B. Option B
  • C. Option E
  • D. Option C
  • E. Option A

正解:B


質問 # 43
RPM --verifyを使用してRPMパッケージのインストール中に作成されたファイルをチェックする場合、次の情報のうちどれが考慮されますか? (3つの正解を選択してください。)

  • A. タイムスタンプ
  • B. ファイルサイズ
  • C. iノード
  • D. GnuPG署名
  • E. MD5チェックサム

正解:A、B、E


質問 # 44
_______という名前のシステム構成ファイルは、通常、デフォルトのランレベルを設定するために使用されます。
(ファイル名にフルパス情報を入力してください)

正解:

解説:
/etc/inittab
Explanation
The system configuration file named /etc/inittab is commonly used to set the default runlevel. This file contains information about the initialization process of the system, and it defines the default runlevel, the available runlevels, and the actions to be taken when entering or leaving a runlevel. The default runlevel is the mode of operation that the system starts up into, and it determines which services and processes are running.
The default runlevel is specified by a line similar to the following in the /etc/inittab file:
id:5:initdefault:
The number after the first colon indicates the default runlevel, which can range from 0 to 6. The meaning of each runlevel is:
* 0 - Halt
* 1 - Single-user text mode
* 2 - Not used (user-definable)
* 3 - Full multi-user text mode
* 4 - Not used (user-definable)
* 5 - Full multi-user graphical mode (with an X-based login screen)
* 6 - Reboot
To change the default runlevel, edit the /etc/inittab file as root and change the number to the desired runlevel.
For example, to change the default runlevel to 3, use the following command:
sudo nano /etc/inittab
And change the line to:
id:3:initdefault:
Then save and exit the file. The changes will take effect on the next reboot.
References:
* SysV Init Runlevels - Red Hat Customer Portal
* init - How can I see or change default run level? - Ask Ubuntu


質問 # 45
コマンドがフォアグラウンドで実行されているときにキーボードのCtrl-Cの組み合わせを押すと、次の信号コードのどれが送信されますか?

  • A. 15(SIGTERM)
  • B. 1(SIGHUP)
  • C. 2(SIGINT)
  • D. 3(SIGQUIT)
  • E. 9(SIGKILL)

正解:C


質問 # 46
どのコマンドがブロックデバイスまたはファイルにスワップスペースを作成しますか? (パスまたはパラメーターなしでコマンドのみを指定します。)

正解:

解説:
mkswap


質問 # 47
通常のファイルfooへのbarと呼ばれるハードリンクを正常に作成した後、fooはファイルシステムから削除されます。
結果の状況を説明するのは次のうちどれですか?

  • A. fooは削除されますが、barはアクセス可能なままです。
  • B. fooは削除されます。 barはまだ存在しますが、使用できません。
  • C. ユーザーは、バーも削除するかどうかを尋ねられます。
  • D. fooとbarは両方とも削除されます。
  • E. fooとbarはどちらもアクセス可能なままです。

正解:A


質問 # 48
GNU GRUB のメイン設定ファイルの名前は何ですか? (パスを指定せずにファイル名のみを指定します。)

  • A. menu.lst
  • B. grub.cfg
  • C. grub.conf

正解:B

解説:
Explanation
The main configuration file for GNU GRUB is grub.cfg, which is usually located in /boot/grub/ or /boot/grub2/ depending on the distribution. This file contains the menu entries for the boot loader, each with a title, a kernel image, an initrd image, and optional parameters. The grub.cfg file is not meant to be edited manually, as it is generated by the grub-mkconfig command, which reads the settings from /etc/default/grub and the scripts in /etc/grub.d/. The /etc/default/grub file contains the global options for GRUB, such as the default menu entry, the timeout, the theme, etc. The /etc/grub.d/ directory contains executable scripts that are run by grub-mkconfig to generate the menu entries for each operating system or kernel found on the system.
For example, the script 10_linux generates the entries for the Linux kernels installed by the package manager, while the script 30_os-prober generates the entries for other operating systems detected on the system, such as Windows. To make changes to the GRUB configuration, one should edit the /etc/default/grub file and/or the scripts in /etc/grub.d/, and then run grub-mkconfig -o /boot/grub/grub.cfg to update the grub.cfg file.
References:
* 2, 102.2 Install a boot manager
* 4, 102.2 Install a boot manager
* man grub-mkconfig


質問 # 49
通常、システムの実行中に定期的に変更され、リブート間で保持されるファイルおよびデータに使用される最上位のシステムディレクトリはどれですか? (最上位ディレクトリのみを指定します)

正解:

解説:
/var, /var/, var, var/


質問 # 50
指定されたナイスレベルで別のコマンドを開始するために使用されるコマンド(パスまたはパラメーターなしでコマンドのみを指定します。)

正解:

解説:
nice
Explanation
The nice command is used to start another command with a given nice level. The nice level is a value that affects the scheduling priority of a process. A lower nice level means a higher priority, and a higher nice level means a lower priority. The default nice level is 0, and the range is from -20 to 19. Only the superusercan assign a negative nice level to a process. The nice command can also be used to display the current nice level of a process by using the -n option. References:
* LPI 101-500 Exam Objectives, Topic 103.3, Weight 3
* LPI Learning Materials, Chapter 3.3, Process Management
* Web Search Results, 1


質問 # 51
......

100%無料101-500日本語日常練習試験には246問があります:https://www.goshiken.com/Lpi/101-500J-mondaishu.html