LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-24-2003, 01:02 PM   #1
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Rep: Reputation: 52
tcsh history log


hello everyone,

I think I have a very simple question. How do I check what commands are used for a specific user on my system that is using tcsh. I know how to check if a user is in bash (./bash_history) but my system doesn't have a .tcsh_history. Any ideas? Thanks...


-twantrd
 
Old 06-24-2003, 05:54 PM   #2
vladkrack
Member
 
Registered: Oct 2002
Location: Curitiba - Brazil
Distribution: Conectiva
Posts: 334

Rep: Reputation: 30
To check the commands used (in the session), just type 'history'. Usually the tcsh does not make an history file like .bash_history, but you can set some shell variables to start to create then:

set savehist = (max number of commands storage)
set histfile = ~/.tcsh_history

The usual history value is 1000, if you want to modify it use:
set history = (max number)
 
Old 06-25-2003, 03:12 AM   #3
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Original Poster
Rep: Reputation: 52
Thanx for the help, but i just tried doing that and tcsh_history still does not exist in my system. After doing what you suggested, i tried doing "cat ~/.tcsh_history" and it spits out as "No such file or directory"

-twantrd
 
Old 06-25-2003, 06:57 AM   #4
vladkrack
Member
 
Registered: Oct 2002
Location: Curitiba - Brazil
Distribution: Conectiva
Posts: 334

Rep: Reputation: 30
My version of tcsh is 6.11.00, I don't know if older versions have this feature or not, but here is how I did it:
Code:
[vladimir@gothic vladimir]$ su - user
Password: 
[user@gothic ~]$ echo $shell
/bin/tcsh
[user@gothic ~]$ l .tcsh_history
/bin/ls: .tcsh_history: No such file or directory
[user@gothic ~]$ set savehist = 100
[user@gothic ~]$ set histfile = ~/.tcsh_history
[user@gothic ~]$ l .tcsh_history
/bin/ls: .tcsh_history: No such file or directory
[user@gothic ~]$ rpm -q tcsh
tcsh-6.11.00-13761cl
[user@gothic ~]$ logout
[vladimir@gothic vladimir]$ su - user
Password: 
[user@gothic ~]$ l .tcsh_history 
-rw-------    1 user     user          184 Jun 25 08:49 .tcsh_history
[user@gothic ~]$ 
[user@gothic ~]$ cat .tcsh_history 
#+1056541696
echo $shell
#+1056541706
l .tcsh_history
#+1056541729
set savehist = 100
#+1056541751
set histfile = ~/.tcsh_history
#+1056541756
l .tcsh_history
#+1056541769
rpm -q tcsh
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Internet Log / History netpicker9 Linux - Software 1 06-07-2005 08:39 AM
Need to log users command history FatSteve Linux - Security 2 07-22-2004 06:25 PM
How to find back "history" database after "history -c" ? san_lss Linux - Newbie 1 01-07-2004 11:53 AM
tcsh history display format k4zau Linux - Software 1 10-12-2003 10:42 PM
command history log??? granny Linux - Newbie 3 02-11-2003 04:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration