DumpsFiles
 Request Exam  Contact
  • Home
  • PRACTICE EXAMS
    Oracle
    Fortinet
    Juniper
    Microsoft
    Cisco
    Citrix
    CompTIA
    VMware
    SAP
    EMC
    PMI
    HP
    Salesforce
    Other
  • View All Exams
  • New Dumps Files
  • Upload
  • Oracle
    Oracle
  • Fortinet
    Fortinet
  • Juniper
    Juniper
  • Microsoft
    Microsoft
  • Cisco
    Cisco
  • Citrix
    Citrix
  • CompTIA
    CompTIA
  • VMware
    VMware
  • SAP
    SAP
  • EMC
    EMC
  • PMI
    PMI
  • HP
    HP
  • Salesforce
    Salesforce
  1. Home
  2. Lpi
  3. LPIC-1 Exam 101, Part 1 of 2, version 5.0
  4. Lpi.101-500.v2024-04-12.q100
  5. Question 1

Join the discussion

Question 1/100

Which of the following vi commands deletes two lines, the current and the following line?

Correct Answer: C
Explanation
The correct answer is C, 2dd. This command will delete two lines, the current and the following line, in vi editor. The syntax of the command is:
[number]dd
The number specifies how many lines to delete, starting from the current line. The dd command deletes the lines and puts them in a buffer, which can be pasted later with the p command. If no number is given, the command will delete only the current line.
The other commands are incorrect for the following reasons:
* A, d2: This command will delete two characters, not two lines. The syntax of the command is:
d[motion]
The motion specifies how many characters to delete, starting from the current cursor position. The 2 motion means two characters to the right. The d command deletes the characters and puts them in a buffer, which can be pasted later with the p command.
* B, 2d: This command is incomplete and will not work. The d command requires a motion argument to specify how many characters to delete. The 2 argument is only a number, not a motion. The command will wait for another keystroke to complete the motion.
* D, dd2: This command will delete the current line and then move the cursor two lines down. The syntax of the command is:
dd[number]
The dd command deletes the current line and puts it in a buffer, which can be pasted later with the p command.
The number specifies how many lines to move the cursor down, after deleting the current line. If no number is given, the command will move the cursor to the next line.
* E, de12: This command will delete from the current cursor position to the end of the word, and then move the cursor to the 12th line. The syntax of the command is:
d[motion][number]
The d command deletes the characters specified by the motion and puts them in a buffer, which can be pasted later with the p command. The e motion means the end of the word. The number specifies the line number to move the cursor to, after deleting the characters.
References:
* vi/vim delete commands and examples | alvinalexander.com
* How to Delete Lines in Vim / Vi | Linuxize
* How can I delete multiple lines in vi? - Stack Overflow

Add Comments

Your email address will not be published. Required fields are marked *

insert code
Type the characters from the picture.
Rating:
Other Question (100q)
Q1. Which of the following vi commands deletes two lines, the current and the following line?...
Q2. Which of the following commands determines a file's format by using a definition database ...
Q3. Which file from the /proc file system contains a list of all currently mounted devices? (S...
Q4. Which of the following commands show how the shell handles a specific command?...
Q5. Which of the following shell redirections will write standard output and standard error ou...
Q6. In the vi editor, how can commands such as moving the cursor or copying lines into the buf...
Q7. During a system boot cycle, what program is executed after the BIOS completes its tasks?...
Q8. Which command uninstalls a package but keeps its configuration files in case the package i...
Q9. Which of the following commands changes the ownership of file.txt to the user dan and the ...
Q10. Which of the following commands will write a message to the terminals of all logged in use...
Q11. Which of the following commands overwrites the bootloader located on /dev/sda without over...
Q12. Which of the following commands brings a system running SysV init into a state in which it...
Q13. Which of the following commands can be used to determine how long the system has been runn...
Q14. Which of the following are valid stream redirection operators within Bash? (Choose two.)...
Q15. Which of the following commands displays the contents of a gzip compressed tar archive?...
Q16. Which of the following tools can show the complete path of an executable file that the cur...
Q17. Which of the following files exist in a standard GRUB 2 installation? (Choose two.)...
Q18. Which of the following files exist in a standard GRUB 2 installation? (Choose two.)...
Q19. Which of the following commands changes all CR-LF line breaks in the text file userlist.tx...
Q20. Which of the following commands list all files and directories within the /tmp/directory a...
Q21. You suspect that a new ethernet card might be conflicting with another device. Which file ...
Q22. Which of the following apt-get subcommands installs the newest versions of all currently i...
Q23. What is the purpose of the xargs command?
Q24. Which of the following files, located in a user's home directory, contains the Bash histor...
Q25. When redirecting the output of find to the xargs command, what option to find is useful if...
Q26. FILL BLANK Which command is used to start another command with a given nice level? (Specif...
Q27. Which of the following commands will display the inode usage of each mounted filesystem?...
Q28. What is the default action of the split command on an input file?...
Q29. Which file in /proc describes the IRQs that are used by various kernel drivers? (Specify t...
Q30. Which command will display messages from the kernel that were output during the normal boo...
Q31. Which wildcards will match the following filenames? (Choose two.) ttyS0 ttyS1 ttyS2...
Q32. Consider the following output from the command ls -i: (Exhibit) How would a new file named...
Q33. When removing a package on a system using dpkg package management, which dpkgoption ensure...
Q34. What is contained on the EFI System Partition?...
Q35. Which of the following commands will produce the following output? (Exhibit)...
Q36. Which of the following commands will load a kernel module along with any required dependen...
Q37. Which of the following commands replaces each occurrence of 'bob' in the file letter with ...
Q38. What is contained on the EFI System Partition?...
Q39. Which signal is missing from the following command that is commonly used to instruct a dae...
Q40. A user accidentally created the subdirectory \dir in his home directory. Which of the foll...
Q41. When redirecting the output of findto the xargscommand, what option to findis useful if th...
Q42. Where is the bootloader stored on the hard disk of a UEFI system?...
Q43. Which of the following commands converts spaces in a file to tab characters and prints the...
Q44. Which of the following commands can be used to search for the executable file foo when it ...
Q45. Which of the following sequences in the vi editor saves the opened document and exits the ...
Q46. The installation of a local Debian package failed due to unsatisfied dependencies. Which o...
Q47. Which of the following pieces of information of an existing file is changed when a hard li...
Q48. Which Bash environment variable defines in which file the user history is stored when exit...
Q49. From a Bash shell, which of the following commands directly executes the instruction from ...
Q50. What is the correct way to set the default systemd boot target to multi-user?...
Q51. What is the correct way to set the default systemd boot target to multi-user? systemctl is...
Q52. To what environment variable will you assign or append a value if you need to tell the dyn...
Q53. Which of the following file permissions belong to a symbolic link?...
Q54. After running the command umount /mnt, the following error message is displayed: umount: /...
Q55. Which of the following commands can perform searches on file contents using regular expres...
Q56. Which of the following apt-getsubcommands installs the newest versions of all currently in...
Q57. How many fields are in a syntactically correct line of /etc/fstab?...
Q58. Which of the following commands can be used to download the RPM package kernel without ins...
Q59. Which of the following commands changes all CR-LF line breaks in the text file userlist.tx...
Q60. What is the purpose of the Filesystem Hierarchy Standard?...
Q61. Which of the following commands lists the dependencies of the RPM package file foo.rpm? rp...
Q62. When booting from the hard disk, a computer successfully loads the Linux kernel and initra...
Q63. What is the purpose of the Filesystem Hierarchy Standard?...
Q64. Which command is used to query information about the available packages on a Debian system...
Q65. Which of the following commands displays the contents of a gzip compressed tar archive?...
Q66. Which of the following commands installs GRUB 2 into the master boot record on the third h...
Q67. Creating a hard link to an ordinary file returns an error. What could be the reason for th...
Q68. Which file should be edited to select the network locations from which Debian installation...
Q69. When using regular expressions, which of the following characters match the beginning of a...
Q70. Which of the following settings for umask ensures that new files have the default permissi...
Q71. While editing a file in vi, the file changes due to another process. Without exiting vi, h...
Q72. Which of the following Linux filesystems preallocates a fixed number of inodes at the file...
Q73. When redirecting the output of findto the xargscommand, what option to findis useful if th...
Q74. Which of the following commands list all files and directories within the /tmp/ directory ...
Q75. A faulty kernel module is causing issues with a network interface card. Which of the follo...
Q76. Which type of filesystem is created by mkfs when it is executed with the block device name...
Q77. Which of the following commands is used to change options and positional parameters within...
Q78. Which command must be entered before exiting vi to save the current file as filea.txt? %s ...
Q79. Which of the following command lines creates or, in case it already exists, overwrites a f...
Q80. What output will be displayed when the user fred executes the following command? echo 'fre...
Q81. Which of the following options is used in a GRUB Legacy configuration file to define the a...
Q82. Which of the following commands can be used to create a USB storage media from a disk imag...
Q83. Which command is used in a Linux environment to create a new directory? (Specify ONLY the ...
Q84. Given the following input stream: txt1.txt atxt.txt txtB.txt Which of the following regula...
Q85. Which program updates the database that is used by the locate command?...
Q86. Which of the following commands lists the dependencies of the RPM package file foo.rpm?...
Q87. A Debian package creates several files during its installation. Which of the following com...
Q88. The /etc/_______ file lists currently mounted devices....
Q89. When using rpm --verify to check files created during the installation of RPM packages, wh...
Q90. Consider the following output from the command ls -i: (Exhibit) How would a new file named...
Q91. Which of the following commands list all files and directories within the /tmp/directory a...
Q92. Which of the following statements is correct for a command line ending with a & charac...
Q93. Instead of supplying an explicit device in /etc/fstab for mounting, what other options may...
Q94. A user accidentally created the subdirectory \dirin his home directory. Which of the follo...
Q95. A user accidentally created the subdirectory \dirin his home directory. Which of the follo...
Q96. Which of the following command sets the Bash variable named TEST with the content FOO?...
Q97. In a nested directory structure, which find command line option would be used to restrict ...
Q98. Which of the following command lines creates or, in case it already exists, overwrites a f...
Q99. Which of the following commands is used to change metadata and options for ext3 filesystem...
Q100. The command dbmaint & was used to run dbmaintin the background. However, dbmaintis ter...
[×]

Download PDF File

Enter your email address to download Lpi.101-500.v2024-04-12.q100.pdf

Email:

DumpsFiles

Our website provides the Largest and the most Latest vendors Certification Exam materials around the world.

Using dumps we provide to Pass the Exam, we has the Valid Dumps with passing guranteed just which you need.

  • DMCA
  • About
  • Contact Us
  • Privacy Policy
  • Terms & Conditions
©2025 DumpsFiles

www.dumpsfiles.com materials do not contain actual questions and answers from Cisco's certification exams.