How do i delete the text from a cursor position to the end of the line in bash?
-
I have the following command recalled on the bash cli.
$ sudo rm -rf /var/lib/foreman /usr/share/foreman /usr/share/foreman-proxy/logs
I only want to remove /var/lib/foreman, to get the cursor to the beginning of /usr/share/foreman, do the following.
UseCtrl-b
to move the cursor over the character forward slash in the beginning of /usr/share/foreman, or just use the back cursor key.
and then
TypeCtrl-w
You should be left with the following.
$ sudo rm -rf /var/lib/foreman
© Lightnetics 2024