Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I just don't know if it's possible and how to cd for example in a dir that is not named with latin characters.

Example: $ cd άλφα or $ cd альфа

Update: In a terminal it is ok, but in a CLI environment not.

share|improve this question
add comment

3 Answers 3

up vote 1 down vote accepted

Yes, of course it's possible as long as directories with these names exists.

The simple way:

terminal

How I made:

  • I ran ls command in the parent directory where a directory what is named with non-latin characters.
  • With the mouse, I selected the name of the directory (nothing more).
  • I typed cd followed by a Space then I pressed Shift+Insert and, of course Enter(again, nothing more).

If you can't use the mouse, see this quick tutorial.

The right way:

  • Add the new keyboard layouts that you need (greek, russian,...)

    • Go in System settingsPersonalKeyboard Layout and add a new layout:

      add new keyboard layout

  • When you type in terminal, switch between layouts to type in what language do you wish.


For tty1 (where you can go with Ctrl+Alt+F1) - and not only - I found another trick:

~ $ ls 
bin         Desktop    file.gif  nohup.out  Sent to Ubuntu One  ttyrecord  άλφα
Descărcări  Documente  Muzică    Poze       tmp.txt             Video
~ $ ls > tmp.txt # redirect the output of 'ls' command to 'tmp.txt' file
~ $ cat tmp.txt
bin
Descărcări
Desktop
Documente
file.gif
Muzică
nohup.out
Poze
Sent to Ubuntu One
tmp.txt
ttyrecord
Video
άλφα
~ $ # our directory is on line 13 (in my case); we will use this number in next command
~ $ cat tmp.txt | sed -n 13p
άλφα
~ $ cd $(cat tmp.txt | sed -n 13p)
~/άλφα $ # voila
~/άλφα > rm -v ../tmp.txt
removed ‘../tmp.txt’
~/άλφα $
share|improve this answer
    
Radu Radeanu , I have one question about. I made that, but now i dont know how to change the language to use , i need to use two different languages , spanish and russian. Ihave been instaled , but i need an easy way to change each time. thanks –  user193173 Sep 15 '13 at 17:57
    
What about when I use CLI (Alt+Ctrl+[F1-F6]) and not a terminal? Every non-latin named dir appears like "WTF"! –  Nikos Gr Sep 15 '13 at 19:22
    
@NikosGr I mentioned about this in the answer: If you can't use the mouse, see this quick tutorial.. In my tty, each greek character appear normally. –  Radu Rădeanu Sep 15 '13 at 19:25
    
But what's the point to use the mouse if after the $ ls command every greek named dir appears like chinese? Will it work? (That's happening only when I am in tty1-6) –  Nikos Gr Sep 15 '13 at 19:29
    
@NikosGr See my new edits. –  Radu Rădeanu Sep 15 '13 at 19:53
show 2 more comments

A possibility to avoid having to do that at all: sudo apt-get install nautilus-open-terminal

This adds an "Open in Terminal" item to the File menu and the right-click context menu (when no file is selected) in Nautilus. i.e.: Navigate to the offending folder in Nautilus and then File,Open in Terminal.

share|improve this answer
add comment

You could use zsh as your default terminal (if you do, I'd suggest getting oh-my-zsh as well for extra goodies). zsh tab-complete allows you 'scroll' through the contents of a directory by pressing tab. You can see a what I'm talking about at 0:53 in this video: http://www.youtube.com/watch?v=fE3tYK_wUj8

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.