Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to create .sh_history file Post 5719 by b5fnpct on Tuesday 21st of August 2001 09:11:37 AM
Old 08-21-2001
Yes, I know it has different name comes with different shell. My question is how this file was created? I have to manually create it or it was created when I create the user's account? Because in one machine I saw this file under my directory in another machine it doesn't exist. It should have some place to make this happen(define in a system file?)

My another question is: Is it possible to check the user's history if the user doesn't have a history file? where can I go to check?

Thanks!
 

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
MAKEHISTORY(8)						      System Manager's Manual						    MAKEHISTORY(8)

NAME
makehistory - tools to recover Usenet history database. SYNOPSIS
makehistory [ -A oldtmp ] [ -a active ] [ -b ] [ -f filename ] [ -i ] [ -n ] [ -o ] [ -r ] [ -s size ] [ -T tmpdir ] [ -u [ -v ] ] DESCRIPTION
Makehistory rebuilds the history(5) text file and the associated dbz(3) database. The default name of the text file is /var/lib/news/his- tory; to specify a different name, use the ``-f'' flag. Makehistory scans the active(5) file to determine which newsgroup directories within the spool directory, /var/spool/news, should be scanned. (If a group is removed, but its spool directory still exists, makehistory will ignore it.) The program reads each file found and writes a history line for it. After the text file is written, makehistory will build the dbz database. OPTIONS
-A If the ``-A'' flag is used then the argument given is the pathname makehistory can use to store a copy of the history file as it's being built. It will be appended to, so existing data will not be lost (and so should be valid history entries). -a If the ``-a'' flag is given then the argument is the active file to use rather than the default one of /var/lib/news/active. -b If the ``-b'' flag is used, then makehistory will remove any articles that do not have valid Message-ID headers in them. -f If the ``-f'' flag is used, then the database files are named file.dir and file.pag. If the ``-f'' flag is not used, then a tempo- rary link to the name history.n is made and the database files are written as history.n.pag and history.n.dir. -o If the ``-o'' flag is used, then the link is not made and any existing history files are overwritten. If the old database exists, makehistory will use it to determine the size of the new database. -i To ignore the old database use the ``-i'' flag. Using the ``-o'' flag implies the ``-i'' flag. -s The program will also ignore any old database if the ``-s'' flag is used to specify the approximate number of entries in the new database. Accurately specifying the size is an optimization that will create a more efficient database. (The size should be the estimated eventual size of the file, typically the size of the old file.) For more information, see the discussion of dbzfresh and dbzsize in dbz(3). -u If the ``-u'' flag is given, then makehistory assumes that innd is running. It will pause the server while scanning, and then send ``addhist'' commands (see ctlinnd(8)) to the server for any article that is not found in the dbz database. The command ``makehis- tory -bu'' is useful after a system crash, to delete any mangled articles and bring the article database back into a more consistent state. -v If the ``-v'' flag is used with the ``-u'' flag, then makehistory will put a copy of all added lines on its standard output. -n To scan the spool directory without rebuilding the dbz files, use the ``-n'' flag. If used with ``-u'', the server will not be paused while scanning. -r To just build the dbz files from an existing text file, use the ``-r'' flag. The ``-i'' or ``-s'' flags can be useful if there are no valid dbz files to use. -T Makehistory needs to create a temporary file that contains one line for each article it finds, which can become very large. This file is created in the /var/spool/news/in.coming/tmp directory. The ``TMPDIR'' environment variable may be used to specify a dif- ferent directory. Alternatively, the ``-T'' flag may be used to specify a temporary directory. In addition, the sort(1) that is invoked during the build writes large temporary files (often to /var/tmp but see your system manpages). If the ``-T'' flag is used, then the flag and its value will be passed to sort. On most systems this will change the temporary directory that sort uses. if used, this flag and its value will be passed on to the sort(1) command that is invoked during the build. EXAMPLES
A typical way to use this program is with the following /bin/sh commands: ctlinnd throttle "Rebuilding history file" cd /var/lib/news if makehistory -n -f history.n ; then : else echo Error creating history file! exit 1 fi # The following line can be used to retain expired history # It is not necessary for the history file to be sorted. # awk 'NF==2 { print; }' <history >>history.n # View history file for mistakes. if makehistory -r -s `wc -l <history` -f history.n; then mv history.n history mv history.n.dir history.dir mv history.n.pag history.pag fi ctlinnd go '' BUGS AND LIMITATIONS
Makehistory does not handle symbolic links. If the news spool area is split across multiple partitions, the following commands should probably be run before the database is regenerated: cd /var/spool/news find . -type l -name '[1-9]*' -print | xargs -t rm Make sure to run the command on all the appropriate partitions! HISTORY
Written by Rich $alz <rsalz@uunet.uu.net> for InterNetNews. This is revision 1.3, dated 1996/11/26. SEE ALSO
active(5), ctlinnd(8), dbz(3), filechan(8), history(5), innd(8), newsfeeds(5), makeactive(8), newsrequeue(8). MAKEHISTORY(8)
All times are GMT -4. The time now is 06:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy