nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

Seeking for Shell Logger script!

This is a discussion on Seeking for Shell Logger script! within the Shell scripting forums, part of the Development/Scripting category; hello all,, am seeking for a shell script that logs everything has been logged in the history! for my bad ...


Go Back   nixCraft Linux Forum > Development/Scripting > Shell scripting

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 05-30-2008, 11:43 PM
Member
User
 
Join Date: May 2008
My distro: Debian
Posts: 33
Rep Power: 0
eawedat is on a distinguished road
Default Seeking for Shell Logger script!

hello all,,
am seeking for a shell script that logs everything has been logged in the history!
for my bad luck i did not succeed to do this!

i edited the file ".logout" and i added this line
history -w sys.log

in order to write out what history file contains into sys.log

sys.log is existing! but when i "cat sys.log" after re-connecting
i see nothing has been wrriten in there!

2- is it possible to log each command i insert into the shell? at the real time? and not while exiting from PuTTy?(saving log to another file and not to .history_history)


thanks.
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 05-31-2008, 04:40 PM
rockdalinux's Avatar
Contributors
User
 
Join Date: May 2005
Location: Bangalore
My distro: RHEL, HP-UX, Solaris, FreeBSD, Ubuntu
Posts: 564
Rep Power: 7
rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough
Default

Code:
history -w /tmp/test
cat /tmp/test
Output
Code:
cd
gpass
cd /tmp/
mkdir tw
cd tw
cp /etc/*.conf .
ls
cp /etc/*.txt .
ls
cp ~/*.txt .
ls
ls *.txt
zip
zip ../file.zip *
cd ..
unzip 
unzip file.zip "*.txt"
__________________
Rocky Jr.
You may have my body & soul, but you will never touch my pride!

If you have knowledge, let others light their candles at it.

Certified to work on HP-UX / Sun Solaris / RedHat
Reply With Quote
  #3 (permalink)  
Old 05-31-2008, 08:07 PM
Member
User
 
Join Date: May 2008
My distro: Debian
Posts: 33
Rep Power: 0
eawedat is on a distinguished road
Default thx rockdalinux

thanks rockdalinux
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

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

Similar Threads

Thread Thread Starter Forum Replies Last Post
How to initialize HDD using Shell script? meimei Shell scripting 1 05-13-2008 05:21 PM
Seeking for vhosts tutorial, name-base satimis Web servers 0 02-05-2008 07:40 PM
Seeking advice on webmail software satimis Mail Servers 9 11-30-2007 08:55 PM
writing a shell script to find out my shell name jaymob123 Shell scripting 1 10-08-2007 12:36 AM
Shell Script dought Mahesh Shell scripting 3 02-16-2005 12:13 PM


All times are GMT +5.5. The time now is 08:24 AM.


Powered by vBulletin® Version 3.7.3 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36