0

My MacBook Pro (Retina, 13-inch, Late 2013) running OS X El Capitan has some weird thing going on with terminal and more specifically when I run the ls, cd or ditto commands.

I have my disk partitioned to keep my web projects separate to the main HD with a partition called MAMP like so:

Machintosh HD
MAMP

When I view files/folders via Finder or any app with a file browser such as Coda I can see everything. When I run the command ls this shows only a few files/folders, ones I've specifically worked on recently or copied across. It's almost as though Terminal has forgotten what is on the disk from anything in the past. This is also happening when I try to cd into a folder I can see via finder but Terminal says:

-bash: cd: magento: No such file or directory

My bash profile is as follows:

export PATH=/usr/local/bin:$PATH:/usr/local/sbin:/Users/me/bin

Which echo's as:

/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:/Users/me/bin

I've also tried a disk repair which came back just fine. I think my bash profile is corrupt or has errors. Weirdly I did play around with the bash profile a few months ago but it's been working fine just in the last few days the ls/cd/ditto commands starting playing up. Any help would be greatly appreciated. Thanks.

0

1 Answer 1

0

Well, you have the core paths to the various POSIX tools that ship on your system by default, including:

/usr/bin
/bin
/usr/sbin
/sbin

However, /usr/local/bin will be checked first, in case you added new ls, cd or ditto commands. More likely is an alias was created that is overriding the default behavior of those commands. Try executing them with a backslash() prepending them like \cd, which will ignore any aliases and executive the native command.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .