Question:
How to navigate to a folder with a Russian name in Ubuntu in console mode (English only)?
Answer:
options without reconfiguring input means:
- run (by pre-installing, if not installed, and there is such a possibility) any file manager:
mc
,lfm
,vifm
,ranger
, etc. -
if
vim
installed (notvi
!) and you need to edit a file, then you can use it as a file manager:vim .
– the program will run in netrw mode (by default, this script seems to be installed in ubuntu ), where you can "go" to any file / directory.hitting enter will be interpreted as
cd
for a directory, and opening it for editing for a file. -
if
emacs
installed, you can use its dired – directory editor package. -
in the most extreme (but absolutely universal) case, you can use the
cd "$(...)"
construction, where instead of...
should be a command that returns the name of the required directory (quotes are needed for those cases when the directory name contains spaces).this can be, for example, the command
ls | sed -n 2p
, where2
is the desired directory number in thels
output.you can see the numbered output of
ls
, for example, like this:$ ls | nl 1 bin 2 boot 3 dev 4 etc ...
i.e., to go to the
boot
directory, you need to run:$ cd "$(ls | sed -n 2p)"