I execute the command

ls /home/user/folder 

After that, go to the same folder. That is to do

 cd /home/user/folder 

Now I click twice on the path to the previous command, and then click the wheel to copy the path. Is there a convenient way to do this without a mouse?

    2 answers 2

    In this particular case, the easiest way is to use the! $ Special character.

     > echo 123456789123456789> echo !$echo 123456789123456789 

    !$ will repeat the last argument entered by the previous command.

      I still have to edit the line, I recommend using Ctrl-A, Ctrl-E, etc.