What's up with bash shell and spaces in filenames?

Alan Evans ame.fedora at gmail.com
Mon May 10 16:03:21 UTC 2010


On Mon, May 10, 2010 at 8:54 AM, Fennix <cn.stefan at gmail.com> wrote:
> I made the directory My Book and tested before replying and it worked here.
> You can also try cd /media/My* which also should work.

I believe you. And like I said, it usually works for me. But sometimes
bash gets in a mood and won't let me express a file name with spaces
in it. It's very frustrating since it usually happens when I can't
access the file any way but through a shell. (Like our company file
server, which has many nodes with spaces in them due to the
proliferation of Windows users.) I'd always assumed it had something
to do with the Samba share, but this time is interesting because it's
the first time I recall it happening exclusively on my local machine
with no shares involved at all.

By the way:

[alan at agena ~]$ cd /media/My*
bash: cd: /media/My: No such file or directory

Thanks, anyway.


More information about the users mailing list