Im being unsuccessful to enable command history logging in csh shells on a Sun machine running Solaris 9, I know csh doesnt log commands history by itself,
here under is my /.cshrc file:
I also dded the following lines to my /etc/profile:
Location: Saint Paul, MN USA / BSD, CentOS, Debian, OS X, Solaris
Posts: 2,288
Thanks Given: 430
Thanked 480 Times in 395 Posts
Hi.
The /etc/profile is for Bourne-family shells, sh, bash, etc. If you placed those set commands in that file, you would effectively set the first argument to "history=200".
The shells are conceptually simple, they read in lines of text, usually interpret the first token as a command, run it, and wait for the next command to run. I am not aware of any connection to a daemon that would be necessary for the shells to run.
I have a very simple .cshrc file on Solaris 10:
and the history mechanism works for me.
First things first: how do you know that you are running csh? ... cheers, drl
I tried also commenting the two lines in /etc/profile but still same result.
as for knowing the shell, emmm. actually Im using "ps" command, and "echo $$", is that right???
but it is still not running, I will post any solution might work.
Location: Saint Paul, MN USA / BSD, CentOS, Debian, OS X, Solaris
Posts: 2,288
Thanks Given: 430
Thanked 480 Times in 395 Posts
Hi.
Here is how I quickly check to see what shell I am using:
If you were actually using bash, it would look like this:
We need to refine the question a bit. Are you getting any output what you enter:
or are you concerned about the lack of a command history across a login -- that is, when you login again, there is no history? If that is true then you probably need something like:
in .cshrc ... cheers, drl
I am pleased to announce this new video in 1080 HD for UNIX lovers honoring thirty years of UNIX history spanning from 1969 to 1999 presented in 150 seconds (two and a half minutes) in 1080 HD, celebrating the 50th anniversary of UNIX.
The Great History of UNIX (1969-1999) | 30 Years of UNIX... (8 Replies)
Hi all,
My need is :
1. To know who , when , which command used.
2. Local user should not delete this information.
I mean , with an example , i can say
i have a user user1
i need to give all the following permissions to user1, :
a. A specific directory other than his home... (1 Reply)
Can anyone tell this:
If two users are logged into the same server from different locations. Is there a way to see the history command of the other user? I tried the history command, but it is showing me only the commands I used.
Thanks in advance for your help.
Iamnew2solaris (1 Reply)
Hi all,
My need is :
1. To know who , when , which command used.
2. Local user should not delete this information.
I mean , with an example , i can say
i have a user user1
i need to give all the following permissions to user1, :
a. A specific directory other than his home... (3 Replies)
Hello every body,
Kindly inform me How Do i find out the time I executed a command previously on UNIX Solaris??
To be more specific and more clear about what i want to know is that I want a command the enables me to know the history and which command i run at this history/time.
FYI I used... (5 Replies)
I have an extraordinary problem with a csh script.....(feel free to berate the use of this but I'm modifying an existing bunch of them)
Anyway, I have a master csh script which in turn calls a second csh script. This second csh script is below. Within this second script are two compiled C++... (1 Reply)
Hi ,
'history' command shows the previous commands used. Is there any command to get the timings at which those commands were entered.
I am using Ksh.
Thanks. (2 Replies)