The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
bash telnet session logging ramnet Shell Programming and Scripting 2 06-01-2009 12:32 AM
Unix shell with history features like in bash vipin_jss High Level Programming 1 05-24-2009 11:12 AM
History for custom BASH function inquen Shell Programming and Scripting 0 05-06-2009 12:12 PM
starting a bash session as child process to another bash session from a process alirezan Shell Programming and Scripting 5 03-13-2009 09:03 PM
Mimic bash history behavior sysera Shell Programming and Scripting 0 10-13-2005 04:48 PM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-03-2009
vikus vikus is offline
Registered User
  
 

Join Date: Feb 2009
Posts: 5
bash history - each session in different file

Hello
How to configure, or where to have each session history in different file

Example: someone is connecting as root and at this time is creating file in which we have history of executed command
to server is connecting another user and is created another file with command executed by second user.
  #2 (permalink)  
Old 07-03-2009
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,749
HISTFILE is readonly - it controls the file used.
Bash Reference Manual: Bash History Facilities

I would consider setting HISTFILE to something during login, like
Code:
HISTFILE=/history_files/$USER.$(date +%Y%m%d:%H:%M)
readonly HISTFILE
The /history_files directory will need to be setup like /var/tmp - allow users to read & write & own files.

Code:
$ ls -ld /var/tmp
drwxrwxrwt 16 root sys 8192 Jul  3 17:54 /var/tmp
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:38 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0