1

I've been struggling with this since I've installed Ubuntu:
How do I copy a directory location?

For example:

/home/user/downloads/game/game.sh 

Do I have to type every single letter on terminal?
The problem is that there are some paths which are too long to see the entire directory.
So this isn't possible...

Anyway, again, I'm sorry, but someone, please help me out with this.

zx485
  • 2,426
  • 1
    Copy a directory location to where? – zx485 Nov 17 '18 at 22:33
  • 1
    Do you mean copy the path into the clipboard? In the terminal you need Ctrl+Shift+C to copy with shortcut key. Or if you mean you want to copy the directory to a new location, can you give an example? BTW, the Downloads directory usually has a capital letter - downloads is a different directory. I also wonder where the path is too long to be seen in full. Are you looking in the file browser? Which file manager/desktop environment? Which view? – Zanna Nov 18 '18 at 07:23
  • The question is different. Copy the file or directory and paste on terminal. It will past the path and not the file or directory . – Vijay Nov 18 '18 at 13:32

1 Answers1

0

If you cant use mouse, start typing directory name and press Tab. In this case bash suggest you autocomplete for directories and files inside your location in File System: https://iridakos.com/tutorials/2018/03/01/bash-programmable-completion-tutorial.html

If you talk about terminal emulator, and can use mouse.. Just copy path to buffer (Ctrl+C or Ctrl+Insert) and paste it in terminal command to cursor location using Shift+Insert

waltinator
  • 36,399
slava
  • 3,887