View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

directory names with spaces

Tom Duvall wrote on Oct 18, 2016


If I have a directory name with spaces, I can't seem to cd to it:

(in a shell)

mkdir "test 2"

ls

test 2

cd "test 2"

(ok)

(in iraf)

dir

test 2

cd "test 2"

ERROR: Cannot change directory to 'test 2'

called as ...

This seems to happen on both linux iraf and also on my mac. It's a particular problem on the mac

as I have an external disk with name "Seagate HD" which I can't seem to rename and have been

unable to get at in iraf. Any thoughts?


Mike Fitzpatrick wrote on Oct 18, 2016


Spaces in directory names aren't supported in IRAF. The usual workaround is to create a symlink without spaces (e.g. 'Seagate_HD' in your case) and use that in the path name.

Last post on Oct 18, 2016