$PATH error (possibly)

Upon opening Terminal I get the following message:

-bash: /usr/bin/manpath: No such file or directory
-bash: /usr/bin/perl: No such file or directory
-bash: grep: command not found
-bash: grep: command not found
-bash: grep: command not found
-bash: grep: command not found

I searched other threads for similar problems and I think I have a $PATH issue

I enter

echo $PATH 

and get

/sw/bin:/sw/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/X11R6/bin

could someone please help?

Is this correct path you are getting..?

what exact path you are working and how you get this PATH..?

/sw/bin:/sw/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/X11R6/bin

How can I tell if it is correct? I assume it's is incorrect because the grep and man commands are not working.

I'm not sure how to answer your second question.

Hi SartreSmartre,

From the path itself it clears that your getting wrong path, just check how you are getting this path then you will get answer.

Put some more details about this...

I was editing two files in emacs, in my home folder. My computer slowed to a crawl for no obvious reason. I ran Disk Utility from my Snow Leopard install drive. I selected the Verify Disk Permissions, and Verify Disk options. There were a ton of errors, which the Disk Utility repaired. Now, when I begin a Terminal session there's the above error message and commands like man, grep, and emacs yield only "command not found."

Thanks for responding by the way.

Beginnig a bash terminal session implies running ~/.profile and/or ~/.bashrc. Setting the -v and/or -x option in those helps you to find out where and how the errors occur.
You may want to use whereis grep, ... man, ...emacs to verify they exist. And, seeing you had a major "disk repair", are you sure your directory srtucture is intact? Try an ls /bin or ls /usr/bin to see what is there.

whereis grep, ... man, ...emacs gives me nothing, just returns me to the regular prompt.

ls /bin gives me:

[        dd        kill        mv        sh        wait4path
bash        df        ksh        pax        sleep        zsh
cat        domainname    launchctl    ps        stty
chmod    echo        link        pwd        sync
cp        ed        ln        rcp        tcsh
csh        expr        ls        rm        test
date        hostname    mkdir        rmdir        unlink

and ls /usr/bin gives me:

2to3                defaults            spfquery5.10.0
2to32.6            desdp                spfquery5.8.9
BuildStrings            diff                splain
CpMac            diff3                splain5.10.0
DeRez            diffpp                splain5.8.9
SetFile            diffstat            split
SplitForks            dig                sqlite3
UnRezWack            dirname                srm
WSMakeStubs        diskhits            ssh
a2p                dispqlen.d            ssh-add
a2p5.10.0            distcc                ssh-agent
a2p5.8.9            distccd                ssh-keygen
aaf_install            distccmon-text            ssh-keyscan
aclocal                ditto                stat
aclocal-1.10            dns-sd                states
addftinfo            dprofpp                strings
afconvert            dprofpp5.10.0            strip
afinfo                dprofpp5.8.9            su
afmtodit            drutil                sudo
afplay                dscacheutil            sum
afscexpand            dscl                svk
agvtool                dserr                svn
alias                dsexport            svnadmin
allmemory            dsimport            svndumpfilter
amavisd                dsmemberutil            svnlook
amavisd-agent            dsperfmonitor            svnserve
amavisd-nanny            dsymutil            svnsync
amavisd-release            dtruss                svnversion
amlint                du                sw_vers
ant                dwarfdump            swig
applesingle            dyldinfo            syscallbypid.d
appletviewer            easy_install            syscallbyproc.d
apply                easy_install-2.5        syscallbysysc.d
apr-1-config            easy_install-2.6        syslog
apropos                efax                tab2space
apt                efix                tabs
apu-1-config            iotop                tail
ar                ipcount                talk
arch                ipcount5.10.0            tar
as                ipcount5.8.9            tbl
asa                ipcrm                tclsh
at                ipcs                tclsh8.4
atos                iptab                tclsh8.5
atq                iptab5.10.0            tconf
atrm                iptab5.8.9            tdbbackup
atsutil                irb                tdbdump
autoconf            isc-config.sh            tdbtool
autoheader            jar                tee
autom4te            jarsigner            telnet
automake            java                testparm
automake-1.10            javac                testrb
automator            javaconfig            texi2dvi
autoreconf            javadoc                texi2html
autoscan            javah                texi2pdf
autoupdate            javap                texindex
auval                javatool            textutil
auvaltool            javaws                tfmtodit
awk                jcmd                tftp
banner                jconsole            tic
basename            jdb                tidy
bashbug                jhat                tiff2icns
batch                jinfo                tiffutil
bc                jmap                time
bg                jobs                tkcon
biff                join                tkmib
binhex                jot                tnameserv
bison                jps                toe
bitesize.d            jrunscript            top
bsdmake                jsadebugd            tops
bsdtar                jstack                topsyscall
bspatch                jstat                topsysproc
bunzip2                jstatd                touch
bzcat                jvisualvm            tput
bzcmp                kdestroy            tr
bzdiff                kextutil            traptoemail
bzegrep                keytool                trial
bzfgrep                kill.d                troff
bzgrep                killall                true
bzip2                kinit                tset
bzip2recover            klist                tsort
bzless                kpasswd                tty
bzmore                krb5-config            twistd
c++                kswitch                type
c++-4.0                kvno                ul
c++-4.2                lam                ulimit
c++filt                last                umask
c2ph                lastcomm            unalias
c2ph5.10.0            lastwords            uname
c2ph5.8.9            latency                uncompress
c89                ld                unexpand
c99                ld_classic            unifdef
c_rehash            ldapadd                unifdefall
cal                ldapcompare            uniq
calendar            ldapdelete            units
cancel                ldapexop            unpack200
cap                ldapmodify            unvis
cap_mkdb            perl5.10.0            unwinddump
capify                perl5.8.9            unzip
captoinfo            perlbug                unzipsfx
cc                perlbug5.10.0            update_dyld_shared_cache
cd                perlbug5.8.9            uptime
certtool            perlcc                users
checknr                perlcc5.8.9            uucp
chflags                perldoc                uudecode
chfn                perldoc5.10.0            uuencode
chgrp                perldoc5.8.9            uuidgen
chpass                perlivp                uulog
chsh                perlivp5.10.0            uuname
chudRemoteCtrl            perlivp5.8.9            uupick
chumAddRights            perlthanks            uustat
ci                perlthanks5.8.9            uuto
cksum                sample                uux
clang                sampleproc            vers_string
clear                sandbox-exec            vgrind
cmp                sandbox-simplify        vi
cmpdylib            sar                view
co                say                vim
codesign            sc_usage            vimdiff
codesign_allocate        schemagen            vimtutor
col                scp                vis
colcrt                screen                vm_stat
colldef                script                vmmap
colrm                sdef                w
column                sdiff                wait
comm                sdp                wall
command                security            wbinfo
compileHelp            sed                wc
compile_et            seeksize.d            weblatency.d
compress            segedit                what
config                serialver            whatis
config_data            servertool            whereis
config_data5.10.0        setregion            which
config_data5.8.9        setuids.d            who
corelist            sftp                whoami
corelist5.10.0            shar                whois
corelist5.8.9            shark                wish
cpan                shasum                wish8.4
cpan2dist            shasum5.10.0            wish8.5
cpan2dist5.10.0            shlock                write
cpan5.10.0            showmount            wsgen
cpan5.8.9            sigdist.d            wsimport
cpanp                sips                wx-config
cpanp-run-perl            size                wxPerl
cpanp-run-perl5.10.0        sliceprint            wxPerl5.10.0
cpanp5.10.0            slogin                wxPerl5.8.9
cpio                smbcacls            wxperl_demo.pl
cpp                smbclient            wxperl_demo5.10.0.pl
cpp-4.0                smbcontrol            wxperl_demo5.8.9.pl
cpp-4.2                smbcquotas            wxperl_overload
cpuwalk.d            smbget                wxperl_overload5.10.0
crc32                smbpasswd            wxperl_overload5.8.9
crc325.10.0            smbspool            wxperl_xspp
crc325.8.9            smbstatus            wxperl_xspp5.10.0
creatbyproc.d            smbtar                wxperl_xspp5.8.9
crlrefresh            smbtree                wxrc
crontab                smbutil                wxrc-2.8
csplit                smtpd.py            xar
csreq                smtpd2.5.py            xargs
ctags                smtpd2.6.py            xattr
ctf_insert            snmpbulkget            xattr-2.5
cu                snmpbulkwalk            xattr-2.6
cups-calibrate            snmpconf            xcman
cups-config            snmpdelta            xcode-select
cupstestdsc            snmpdf                xcodebuild
cupstestppd            snmpget                xcodeindex
curl                snmpgetnext            xcrun
curl-config            snmpinform            xed
cut                snmpnetstat            xgettext.pl
cvs                snmpset                xgettext5.10.0.pl
cvsbug                snmpstatus            xgettext5.8.9.pl
dappprof            snmptable            xgrid
dapptrace            snmptest            xjc
db_codegen            snmptranslate            xml2-config
db_hotbackup            snmptrap            xml2man
dbilogstrip            snmpusm                xmlcatalog
dbilogstrip5.10.0        snmpvacm            xmllint
dbilogstrip5.8.9        snmpwalk            xmlwf
dbiprof                sntp                xpath
dbiprof5.10.0            soelim                xpath5.10.0
dbiprof5.8.9            sort                xpath5.8.9
dbiproxy            spfd                xslt-config
dbiproxy5.10.0            spfd5.10.0            xsltproc
dbiproxy5.8.9            spfd5.8.9            xsubpp
dc                spfquery            xsubpp5.10.0

I hope you did not run whereis grep, ... man, ...emacs as one single command. Run

whereis man; whereis grep; whereis emacs

What puzzles me is that in your above listing there are NO commands starting with f, g, n, and o. This is a bit strange. Can you find commands like e.g. mount, mkdir, more on your system?

I ran them separately.

mount, mkdir are there but more is not.

You are missing multiple binary files in /usr/bin/. I would back up your user data and your fink installation. If you have compiled anything in /usr/local/ then backup /usr/local/. Run fsck_hfs like this for a live verification of the file system.

diskutil verifyVolume /

If the file system is clean then you will have re-install over your present installation.