Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to create .sh_history file Post 5746 by LivinFree on Tuesday 21st of August 2001 11:54:48 PM
Old 08-22-2001

It should be created automatically by the shell... I may be wrong, though. Also, I think some shells have the ability to turn the shell history recording off - I'm almost sure that at least in some C shells, it can be set by a simple parameter.

If you want to see what they're REALLY doing (.sh_history files can be edited), look into process accounting. It isn't used as often now as it used to, because it can impact the speed of systems with many users / processes, but if it's built into your kernel, you can turn it on or off.

See if the acct command, or something similar exists on your system. If all else fails, try man -k accounting to find it by another name.

HTH
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

.sh_history contains the list of past commands

hi, .sh_history keeps a list of past commands that we entered. but it has a limit and where do we set this limit. thanks. (1 Reply)
Discussion started by: yls177
1 Replies

2. UNIX for Advanced & Expert Users

.sh_history file

Hi Friends, We are currently 5 people using same Unix login-id on different terminals, .sh_history file contains list of commands typed by all 5 peoples(commands history) with the below list : $tail .sh_history ls -ltr pwd cd .. ls -ltr clear cd temp more kk.lst Now my question... (9 Replies)
Discussion started by: krishna
9 Replies

3. UNIX for Dummies Questions & Answers

Clarification on .cshrc,.exrc,.login,.profile,.sh_history files

All, I had a request to delete filed under a directory that was 35 days old . And they asked me to scedule it in CRON . I have done that . I have use find and delete with mtime to perfrom this task . But my script is not deleting this .cshrc,.exrc,.login,.profile,.sh_history file... (1 Reply)
Discussion started by: arunkumar_mca
1 Replies

4. AIX

history .sh_history sh_history

hi what's the difference between .sh_history and sh_history for root user? thanks itik (1 Reply)
Discussion started by: itik
1 Replies

5. AIX

timestamp in .sh_history using ksh shell

Hello Everyone: Does anyone know how I will setup my account to put timestamp in my .sh_history? I do not hold the root account. I am using AIX 5 and ksh shell. I tried every solution I can find in the internet but nothing seems to work OR I am just applying those in the wrong way. Anyone knows... (4 Replies)
Discussion started by: Orbix
4 Replies

6. UNIX for Advanced & Expert Users

Incoherence between finger and .sh_history

Hello, I've a script that verifies users connections. This is the check part do NEVER=$(finger $USER | grep -i Never) if then NAME=$(finger $USER | grep -i "In real life" | sed -e 's/^.*life: //') echo $USER $NAME >> never_logged #" "$NEVER fi done that for a specific... (6 Replies)
Discussion started by: gogol_bordello
6 Replies

7. AIX

Looking at .sh_history file.

I reviewed a couple old post where shockneck posted the use of the EXTENDED_HISTORY=ON variable to place a timestamp in the .sh_history file when using ksh and using the fc -t command to read the .sh_history file. The fc command reads my history file. As an admin I would like to be able to read... (5 Replies)
Discussion started by: juredd1
5 Replies

8. UNIX for Advanced & Expert Users

sh_history file

Hi, I'm on a linux machine. But I see that sh_history is not updated since february 15. How is it possible ? Thank you. uname -a Linux MYSERVER 2.6.18-194.11.3.el5PAE #1 SMP Mon Aug 23 15:57:10 EDT 2010 i686 i686 i386 GNU/Linux ls -al -rw------- 1 oracle dba 3644 fév 15 09:28... (10 Replies)
Discussion started by: big123456
10 Replies

9. AIX

Problem in Emailing all .sh_history entries

Hi, I can't get all the enties of AIX .sh_history in email. only first entry of the history is emailed after executing the below code. mail -s "History `date +%d-%m-%Y`" myemail@xyz.com <$HOME/.sh_history Can anyone help? (3 Replies)
Discussion started by: m_raheelahmed
3 Replies
acct(2) 							System Calls Manual							   acct(2)

NAME
acct() - enable or disable process accounting SYNOPSIS
DESCRIPTION
The system call enables or disables the system's process accounting routine. If the routine is enabled, an accounting record is written on an accounting file for each process that terminates. Termination can be caused by one of two things: an call or a signal (see exit(2) and signal(5)). The calling process must have the privilege to use this call. path points to a path name naming the accounting file. The accounting file format is described in acct(4). The accounting routine is enabled if path is nonzero and no errors occur during the system call. It is disabled if path is zero and no errors occur during the system call. When the amount of free space on the file system containing the accounting file falls below a configurable threshold, the system prints a message on the console and disables process accounting. Another message is printed and the process accounting is re-enabled when the space reaches a second configurable threshold. If the size of the process accounting file reaches a configurable limit, records for processes terminating after that point will be silently lost. However, in that case the command would still sense that process accounting is still enabled. This loss of records can be prevented with the command. and are described in acctsh(1M)). Security Restrictions Some or all of the actions associated with this system call require the privilege. Processes owned by the superuser have this privilege. Processes owned by other users may have this privilege, depending on system configuration. See privileges(5) for more information about privileged access on systems that support fine-grained privileges. RETURN VALUE
returns the following values: Successful completion. Failure. is set to indicate the error. ERRORS
If fails, is set to one of the following values. The file named by path is not an ordinary file. An attempt is being made to enable accounting when it is already enabled. path points to an illegal address. The reliable detection of this error is implementation dependent. Too many symbolic links were encountered in translating the path name. The accounting file path name exceeds bytes, or the length of a component of the path name exceeds bytes while is in effect. One or more components of the accounting file path name do not exist. A component of the path prefix is not a directory. The calling process does not possess the privilege. The named file resides on a read-only file system. path points to a text file which is currently open. SEE ALSO
acct(1M), acctsh(1M), exit(2), acct(4), privileges(5), signal(5). STANDARDS CONFORMANCE
acct(2)
All times are GMT -4. The time now is 04:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy