- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- recording a session
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2005 05:20 PM
09-17-2005 05:20 PM
Is there any command or way to record the command line session and its output in some file ?
Thanks,
Shiv
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2005 05:43 PM
09-17-2005 05:43 PM
Solutionscript
After you complete, simply type exit.
never cat that file or vi during session, which will make a loop!!
Regds
TT
Note: Only echoed charactors are stored here, no need to worry about passwords entered during the session.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2005 09:03 PM
09-17-2005 09:03 PM
Re: recording a session
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2005 09:20 PM
09-17-2005 09:20 PM
Re: recording a session
u can use KT , Xterm or even hyper terminal or any other external software to save your session it u are doing telnet from outside .
If u r doing it from a terminal then u can use script XYZ command to write all your command & output to XYZ file .
Hope this should solve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2005 01:34 AM
09-18-2005 01:34 AM
Re: recording a session
1.
You can use Putty , a ssh client , which is a very good tool , and you can save entire session to a logfile , Just only thing needs to do is to enable logging , and provide a file name :
Example: Enable logging and provide logfile name: server3.log And all will be there , including your command output.
Here it is :
http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe
2. $HOME/.sh_history you can set the history size to big enough.
Cheeers,
Raj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2005 04:23 AM
09-18-2005 04:23 AM
Re: recording a session
The simplest way would be to export history of all users to seperate files. It can be achived by adding this line to /etc/profile for all users or .profile of indivisual users for which you intend to do this.
export HISTFILE="/var/log/history/$LOGNAME"
export HISTSIZE=1000
Also create the directory /var/log/history and seperate files for all users under it with write permissions for them.
HTH,
Devender
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2005 02:34 PM
09-18-2005 02:34 PM
Re: recording a session
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2005 04:46 PM
09-18-2005 04:46 PM
Re: recording a session
regards!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2005 04:49 PM
09-18-2005 04:49 PM
Re: recording a session
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2005 04:55 PM
09-18-2005 04:55 PM
Re: recording a session
i can only think of script command for your requirement.
man script for more detail.
from the client, i use secure shell which log session of commands and outputs.
http://www.ssh.com
regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2005 05:17 PM
09-18-2005 05:17 PM
Re: recording a session
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2005 06:19 PM
09-18-2005 06:19 PM
Re: recording a session
--- /etc/profile ---
set -o vi
export HISTFILE=/tmp/history_${LOGNAME}_$(date +'%d-%m-%y')
export HISTSIZE=2000
If you want to log all command execution and results then,
--- /etc/profile ---
script -a
You can also enable logging with putty and login client tools also.
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2005 06:50 PM
09-18-2005 06:50 PM
Re: recording a session
i think We have some different solutions
through your Q.
if you want this permanently then history&histfile as the other members mentioned would be solution...
Also you have chance to record your session
as using your telnet software like crt&putty
etc...
there is also "script" on unix so when you
open session before starting just write
script so system records your executed commands into a file and when you exit the file closed and you can also put this command any user's profile and get these records...
Goos Luck,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2005 06:52 PM
09-18-2005 06:52 PM
Re: recording a session
Good Luck,