0

image

if i want to go to ObliqueShock I need to write: cd ObliqueShock so every time i need to go in a specific folder i have to copy and paste the directory where i want to go, is it possible to write for example only cd and the first letter of the folder and the system will read automatically the directory where i want to go without write every single time the folder?

2 Answers2

0

First suggestion: Tab completion. You can type a few letters of a filename and press tab for autocompletion.

$ cd O # press tab here, it will be autocompleted to the following
$ cd ObliqueShock

Second suggestion: Some shells, such as fish and Zsh have an autocomplete feature. While typing, you see one suggestion, which you can execute without typing the whole command

0

If you start to type the directory, hit tab and bash will autocomplete if there is only one option.

So if, in you your current working directory, there is only one folder beginning with O, then once you’ve typed cd O you can hit tab and it’ll autocomplete the rest of the name.

Will
  • 2,483
  • 5
  • 20
  • 34