Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ls command not working 8

Status
Not open for further replies.

northgrum

IS-IT--Management
Aug 4, 2003
24
US
On an IBM RS6000 F50 running AIX 4.3, I am getting the following error when using the "ls" and "ps" commands:
$ ls
sh: /usr/share/lpp/.index/old/ls: not found.
$ ps
sh: /usr/share/lpp/.index/old/ps: not found.

This just started happening and I cannot figure out why now certain commands aren't working.
Thanks for your help!
 
bamasea,
Don't know, but if you haven't tried already, check your PATH and any aliases for weird/missing entries:
1) echo $PATH
2) alias

-Hallux
 
Why your MSG is not 'ksh: XXX: not found.' ?
Did you change your shell and made $PATH changed in your shell ?
 

Try 'cat `which ls`'

Cheers

Henrik Morsing
Certified AIX 4.3 Systems Administration
& p690 Technical Support
 
I would recommend you check your path
maybe try the command "wich ls", that would tell you if ls in on your path.
if it's not you can try to locate it on the usual places and if it's not there, try with "find / -name ls" (this could take quite a while and slow the system down)

Cheers
 
I'm definitely stumped. Here's my path and which commands. They in no way show the path of the error I'm getting.
Confused. Even when I go to the directory where it exists to run it, I get the same error message.
Help?

# which ls
/usr/bin/ls
# echo $PATH
/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin
#
 
Was a new maintenance level or patch applied to this system recently? What is the time stamp and size of /usr/bin/ls? Could you post the results of lslpp -l bos.rte.commands (which is where ls is) and lslpp -l bos.rte.control (which is where ps is)?
 
hi,

which user are you running the ls command as ?

becuase the first entry you have a $ prompt
second you have a # prompt

if you run env and post this what entries do you have listed?
 
run full name: /usr/bin/ls

this should work. then you can figure out why your path is broken.

IBM Certified -- AIX 4.3 Obfuscation
 
Here are my env results. Nothing has worked thus far...

ksh: dir: not found.
aixbama:/usr/bin#>env
_=/usr/bin/env
LANG=en_US
LOGIN=root
IMQCONFIGCL=/etc/IMNSearch/dbcshelp
NLSPATH=/usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/%L/%N.cat
PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin
LC__FASTMSG=true
IMQCONFIGSRV=/etc/IMNSearch
LOGNAME=root
AGBASEDATE=1950
MAIL=/usr/spool/mail/root
LOCPATH=/usr/lib/nls/loc
USER=root
AUTHSTATE=compat
SHELL=/bin/ksh
ODMDIR=/etc/objrepos
HOME=/
TERM=vt220
MAILMSG=[YOU HAVE NEW MAIL]
PWD=/usr/bin
TZ=EST5EDT
A__z=! LOGNAME

Any more ideas everyone? I really appreciate all the help thus far.
 
Shot in the dark....

Try: chmod 777 /bin/ls


 
Should be
-r-xr-xr-x

Owned by user bin, group bin
 
Tried the chmod, didn't work. Tried running it from it's exact path, that didn't work either. I am logged in as root, and the results to "bi's" suggestion are:
# lslpp -l bos.rte.control
Fileset Level State Description
----------------------------------------------------------------------------
Path: /usr/lib/objrepos
bos.rte.control 4.3.2.1 COMMITTED System Control Commands

Path: /etc/objrepos
bos.rte.control 4.3.2.0 COMMITTED System Control Commands

I also have not added any patched or any upgrades recently. This started happening when one of the volumes got completely full and I had to clear out queue temp files.
A "df" command gets this:
# df
Filesystem 512-blocks Free %Used Iused %Iused Mounted on
/dev/hd4 196608 10896 95% 2331 5% /
/dev/hd2 6782976 1891760 73% 48112 6% /usr
/dev/hd9var 65536 48288 27% 1110 14% /var
/dev/hd3 65536 63056 4% 70 1% /tmp
/dev/hd1 32768 30536 7% 388 10% /home
/dev/lv00 98304 15088 85% 566 5% /usr/welcome_arcade
/dev/lv01 65536 20640 69% 405 5% /usr/welcome
/dev/fslv00 14680064 6489976 56% 19795 2% /bama

the "/" volume has always been almost full. i use the /bama vol for our primary app.
 
What files are in /usr/share/lpp ?

EG.
339 1 (libquartz lprd) lprd /usr/share/lpp>ls
bos.adt bos.txt save.config
bos.terminfo devices.common.IBM.modemcfg
 
rzs0502 - I couldn't get that command to work. Can you break it down for me?
 
Sorry, I forgot your problem is that you cannot use ls so you won't be able to see what's there.

You can try running : inurecv snaserv

The inurecv command recovers files and archive constituent files saved from a previous inusave command. It uses the update.list and archive.list files from the directory specified by the INUSAVEDIR environment variable. The inurecv command recovers files saved by program-provided installation or update procedures.

 
I don't know if this means anything, but when i do a DOS FTP session to the box - I can do an ls and it works.
UGH
 
well, that's something.

I suspect ls (and the other commands) may be corrupted for some reason. Can you ftp in, do an ls -l on /usr/bin/ls and post the results?

Have you booted this box since the filesystem got full?
 
hi,
a trivial test: get a copy of ls from another box

cp /usr/bin/ls /home/ls.xxx
cp /theotherls /usr/bin/ls

if it goes or not, reinstall bos.rte.commands
or an higer ML.

bye
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top