Tail User

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Tail User
# 1  
Old 03-16-2002
Tail User

Ok i looked through quite a few posts but could not find what i was looking for so forgive me if this post can be found elese where...

I would like to use a command like tail view what users are doing in the system i have quite a few dba's that come come to my office and do work on the system and i would like to see exactly what they are doing, and if at all posible dump everything to a log so that if they are doing somthing that they should not be doing i will be able to find out, somthing that would go into so much detail that you would be able to see what command that they execute....
Would be so much help i might be able to point the finger at the correct person...
Thanks in advance
# 2  
Old 03-18-2002
Here's a thought, which will work the best if you have root access.

You could check the .sh_history file under the user's home directory as to what was happening with that account in the shell recently.

This type of logging is present on our AIX, PTX, and HP-UX systems, but I'm not sure if it's a feature with all unix flavors.

I'm not positive, but I think there are ways to retain more or less days worth of history in that file.

Hope this helps...
# 3  
Old 03-18-2002

Try the 'script' command, this will store the executed commands, and keeps a record of everything printed on ur screen. but only problem is this can be terminated by a ctrl+d.
# 4  
Old 03-19-2002
script, .sh_history

both of these methods work great thanks alot... saves me a lot of headaces....
# 5  
Old 03-20-2002
I see it on my hp-ux version as sh_history but I am unable to bring show anything ? I cant' "cd" to it nor, cat, tail, more or vi ?

so how do you access this file ?

# 6  
Old 03-20-2002
Tail user

well i found this file in user's home directory
/home/%username% .sh_history
In any case i would do the following

more /home/%username%/.sh_history
cd /home/%username%
more .sh_history
and its .sh_history not sh_history
# 7  
Old 03-20-2002

Oh and i just wanted to let everyone know i am thankfull that i can give the answer to my own post, and i owe that thanks to THEKID, AND SHIBZ... and to everyone that has ever come up with and answer to a question on this forum...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Tail +

because the tail +2 on the first line gives me the file name pomga I do not want anything like what I miss tail +2 ejemplo.txt ouput ==> ejemplo.txt <== 1 2 3 4 5 6 7 8 9 10 (2 Replies)
Discussion started by: tricampeon81
2 Replies

2. Shell Programming and Scripting

Joining multiple files tail on tail

I have 250 files that have 16 columns each - all numbered as follows stat.1000, stat.1001, stat.1002, stat.1003....stat.1250. I would like to join all 250 of them together tail by tail as follows. For example stat.1000 a b c d e f stat.1001 g h i j k l So that my output... (2 Replies)
Discussion started by: kayak
2 Replies

3. Shell Programming and Scripting

Help On tail script

Hi Guys, I would like to create a script which tails the content of a log file in real time, looks for a specific string , like "ERROR" and captures in a text file the previous 10.000 lines that were existing before this string. Any help is appreciated. (12 Replies)
Discussion started by: liviusbr
12 Replies

4. Shell Programming and Scripting

tail for 15 mins

Hi, I want to write a script which will tail a particular file for 15 mins and then sleep for 10 mins and again tail for 15 mins. This cycle will go on for a limited period of time. How can i ensure that tail command will run for 15 mins before calling sleep command Thanks (6 Replies)
Discussion started by: @bhi
6 Replies

5. Shell Programming and Scripting

Help with tail command

Hi All, My query seems to be silly but Iam unable to find where the exact problem lies. I have a script to unzip set of files here is the script #!/bin/ksh Count=`cat /home/gaddamja/Tempfile | wc -l` while do Filename=`cat /home/gaddamja/Tempfile |tail -$Count | head -1` cd... (7 Replies)
Discussion started by: jagadish_gaddam
7 Replies

6. Shell Programming and Scripting

Help with cut and tail

Hey!! I'm having a hard time getting this to work! I need to input a name and compare that name to a file in the file the name has a code on the same line as it, what i need is to compare the input name with the file and then output the code to a other file. Ex: ... (16 Replies)
Discussion started by: nogame11
16 Replies

7. Shell Programming and Scripting

tail -f

I am trying to extract a particular line from a.log which keeps appending every sec and output that into a newfile b.log which should append itself with filtered data received from a.log I tried tail -f a.log |grep fail| tee -a b.log nothing in b.log tail -f a.log |grep fail >>b.log ... (4 Replies)
Discussion started by: wannalearn
4 Replies

8. Shell Programming and Scripting


Hello all, I have search the forum and could not find an answer...Here is what I am trying to do. Every 15 minutes, a script send uptime output to a logfile (dailylog.log), that file contains lines like the one below: 11:21am up 44 days, 19:15, 1 user, load average: 0.00, 0.02, 0.03 ... (7 Replies)
Discussion started by: qfwfq
7 Replies

9. UNIX for Dummies Questions & Answers

Output from tail to a user

Hi all I've read through a few of these lists but can't find a right combination of answers (I can create VPN's but can't send an email!) Ok - I'm using taper as backup software which generates a log file called taper_log I want the last eight lines of this log file to be sent to a specified... (3 Replies)
Discussion started by: ifan
3 Replies

10. Shell Programming and Scripting

using tail -f

Working in HP-UX 10.20. I eventually want to write a bourne shell script to handle the following problem, but for now I am just toying with it at the command line. Here's what I am basically trying to do: tail -f log_X | grep n > log_Y I am doing a tail -f on log_X . Once it sees "n", I... (6 Replies)
Discussion started by: cdunavent
6 Replies
Login or Register to Ask a Question