command logs


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers command logs
# 1  
Old 06-23-2008
command logs

Is there a place were the system stores logs of command's? like does it log whatever changes I made?

I'm using a Centos 5.x box

Thank you
# 2  
Old 06-23-2008
Not normally. UNIX does keep a history file of your recent commands. The fc command for your system can recall commands recently issued. The file itself is indentifed in the environment variable HISTFILE

Code:
echo $HISTFILE

All of this is predicated on you using a modern, POSIX shell. If your shell is ancient, I cannnot tell you what to do. I'm guessing you are using bash, which is POSIX-compliant, since CentOS 5.1 is the current release.
# 3  
Old 06-23-2008
ok right I was able to use this to bring up previous commands.
what i was trying to do was find an ip address that i had pinged yesterday. but im guessing if the server is rebooted that that history is lost.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

If I ran perl script again,old logs should move with today date and new logs should generate.

Appreciate help for the below issue. Im using below code.....I dont want to attach the logs when I ran the perl twice...I just want to take backup with today date and generate new logs...What I need to do for the below scirpt.............. 1)if logs exist it should move the logs with extention... (1 Reply)
Discussion started by: Sanjeev G
1 Replies

2. Red Hat

Collecting logs by running command

Hi, i am a general user of linux but we work mostly on windows next i am moving full time on linux. here is my question: We have product which consist or several subsystem each subsystem has one module to create logs file dump. and i am going to write that support dump tool. we need to... (3 Replies)
Discussion started by: ajayyadavmca
3 Replies

3. Shell Programming and Scripting

Run command on each and every logs of dir

HI i have below command and i want to run it on each logs of each and every Dir. /home/Laco/Al I have sub dir in this folder /home/Laco/Al/04092012/LP/X/*.logs /home/Laco/Al/04092012/LP/Y/*.logs /home/Laco/Al/04092012/LP/Z/*.logs /home/Laco/Al/04092012/LP/P/*.logs I want to run... (5 Replies)
Discussion started by: asavaliya
5 Replies

4. UNIX Desktop Questions & Answers

regarding logs

Hi , I am running an application on my windows and it logs are generated at /var/logs and for this i have to go this location and then do tail -f , Is there any command you can advise me so that when I execute this command at this location that logs get displayed fully and as the application... (3 Replies)
Discussion started by: KAREENA18
3 Replies

5. Shell Programming and Scripting

Retrieve logs generated in last 10 mins from a log file using 'grep' command

HI All, I have a log file where the logs will be in the format as given below: 2011-05-25 02:32:51 INFO PROCESS STARTING 2011-05-25 02:32:52 INFO PROCESS STARTED . . . I want to retrieve only the logs which are less than 5 mins older than current time using grep... (3 Replies)
Discussion started by: rvhg16
3 Replies

6. Shell Programming and Scripting

Command to clear logs for every 6 hours in solaris

Hi Folks, I need to remove log files for six hours on Solaris. before i used to do for every 24 hours below is the code for 1 day older log files, now i tried using -mmin +360 but it says command not found. Can someone please help me out!!! part of the code: LOG_FILE=`find /home/Logdir... (1 Reply)
Discussion started by: Sendhil.Kumaran
1 Replies

7. Shell Programming and Scripting

Grep yesterday logs from weblogic logs

Hi, I am trying to write a script which would go search and get the info from the logs based on yesterday timestamp and write yesterday logs in new file. The log file format is as follows: """"""""""""""""""""""""""... (3 Replies)
Discussion started by: harish.parker
3 Replies

8. Solaris

Where we can get the logs for a command execution successfully?

Hi, How to get the logs for successfully executing of a solaris command? Where the logs will be stored? How to know that the commands is executed successfully or not? Thanks, Susi. (4 Replies)
Discussion started by: susinthaa
4 Replies

9. Shell Programming and Scripting

Logs

Hey Guys, i am new into shell programming and i have to do one script which have to record all the commands entered by a specific user. Example of that, i have a system running on unix, several users are using this system, i have to create like a databse which will record every user entered that... (5 Replies)
Discussion started by: charbel
5 Replies
Login or Register to Ask a Question