Link to home
Start Free TrialLog in
Avatar of gordonmann
gordonmannFlag for United States of America

asked on

History and locate commands not working

I am working on a new installation of AIX V 5.3 and the locate command does not wrok from root or any user and the history command only lists the last 10 commands.
Avatar of omarfarid
omarfarid
Flag of United Arab Emirates image

If you are using csh,  then use

set history=100

history
Avatar of gordonmann

ASKER

That is a help but why will locate not function from root.  Specifically it will not take the locate -u to update the db.
here is what i see when I enter locate:
ksh: locate:  not found
SOLUTION
Avatar of sjm_ee
sjm_ee
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This indicates that either locate is not available on your system, or it's parent dir is not in PATH.

To find if locate is available on your system, run

which locate

OR

whereis locate

OR

Find / -name locate


/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/etc:/usr/bin/X11://opt/informix/bin:/opt/informix:/usr/byrams:/usr/byrams/source:/usr/lib:/usr/fourgen:/usr/fourgen/bin:/usr/local/samba/bin:/usr/byrams/sh:/usr/byrams/perl:.
Never mind "locate" is not on the system.  I still can only see 10 lines of the history.  I would like this to be infinate as most are in lunux.
Did you try from csh

set history=100

What do you get?

Any chance to use ksh or bash instead of csh?

For ksh you may include set -o vi in your .profile and you can edit previous commands with vi like commands, while in bash you may use command history immediately.

Both ksh and bash store previous commands and can use commands across logins
How do I change this or know my ability to use them?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial