Search code examples
bashcommand-linedirectorymv

How to browse directories while issuing a mv command?


Currently, I'm trying to move a file that I mistakenly saved to my home directory, and to do that I'm using a mv command. However, after I typed out the first part of my mv command:

mv lab2prog.c 111/lab/...

I forgot what directory I wanted to move the file in. Usually, I would just backspace the command and go directory exploring, but I recall a co-worker of mine browsing the directories of his system while issuing the command without having to delete the already typed command.

Is there a way to do that, or am I just imagining things...?


Solution

  • Press tab twice to get a list of possible autocompletions in each step. This means you can also see a list of paths starting with, e.g., do by issuing: mv lab2prog.c 111/lab/dotabtab