When I try to run the history command from the prompt i get the following error:
$ history
ksh: cd: 0403-011 The specified substitution is not valid for this command.
ON running history with a parameter I get the following
$ history -10
ksh: cd: 0403-008 The number of parameters specified is not correct.
I have not defined history in my .profile
also runnning which command returns following:
$ which history
which: 0652-141 There is no history /usr/bin /usr/local/bin etc..
that means the history command is not found..
Other users are able to run the same command . I just don't understand where is my shell picking the history command from?
It shows "ksh: cd:" which means cd command is getting executed...
Thanks for reply allanwang77, but i think you have not followed my problem. The history command is working for other users on the same machine and giving problems to me..
$ history
ksh: cd: 0403-011 The specified substitution is not valid for this command.
which clearly shows its picking the script from somewhere where there is a 'cd' command involved....
even running 'which' command doesn't show this history script anywhere in the path..
My server can run history as well, but the check working same with you:
-bash-3.00$ man history
Manual entry for history not found or not installed.
-bash-3.00$ which history
which: 0652-141 There is no history in /usr/linux/bin /usr/bin /etc /usr/sbin /usr/ucb /usr/bin/X11 /sbin /usr/java14/jre/bin /usr/java14/bin /usr/python/bin.
-bash-3.00$ whereis history
history:
The only different is I used bash.
---------- Post updated at 09:06 AM ---------- Previous update was at 09:04 AM ----------
Do you think that is the problem?
And if you login server used the same userid as others'?
Thank you all so very much.
I had an alias set for fc='cd /home/user/src/bin' in my .profile
Guess thats the reason why history didn't work for me as clearly pointed by cero and methyl, its an alias for 'fc -l'.
I renamed the alias fc as fc1 and everything started working for me again..