Question
pls check if my unix answers are correct and provide corrections if necessary (commas separate the commands) Move cursor to the last line of the
pls check if my unix answers are correct and provide corrections if necessary(commas separate the commands)
Move cursor to the last line of the file with one key: G
Use one key to move cursor to bottom line of screen: L
Move cursor to line 32 with three keys: <32>G
Turn on/off line numbers: :set nu , :set nonu
Forward/backward one page: ctrl-f , ctrl-b
Join the current line with next line: J
Replace the whole current line with abc with five keys:
Append text abc at the end of current line: A
You just deleted one line by accident. Undo this with one key: u
Delete next six lines including current line with three keys: 6dw
Delete from cursor to the rest of current line with one key: D
Save your changes without quitting vi: :w
Delete next five lines from current line and paste them back at the end of the file: 5dd, p
Delete next seven characters from cursor with two keys: 7x
Swap current char with the next one with just two keys: r
Temporarily leave vi as a background process and then come back to vi: ctrl-z
You are in vi with file science.txt, turn on search highlight and find all strings of child: :set hlsearch , /
You are in vi with file science.txt, replace all thes with abc without prompt: :n,m s/
Clear the highlights from last search: :set hlsearch!
Read a file a.cpp into vi below the current line: :r
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started