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

Jeff Voskamp javoskam at uwaterloo.ca
Mon May 10 16:07:33 UTC 2010


On 05/10/2010 12:03 PM, Alan Evans wrote:
> 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.
>    
Try
cd /media
ls -bl

and send us the results.

Jeff


More information about the users mailing list