LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   USB device history (https://www.linuxquestions.org/questions/linux-newbie-8/usb-device-history-4175547887/)

Cacara 07-13-2015 02:32 PM

USB device history
 
Hello,

Can anyone tell me how to view messages showing
Dates and times when a USB device was used in RHEL 6.6?

I have seen comments to delete the dmesg file.
Can someone tell me how to view it? Thanks

suicidaleggroll 07-13-2015 02:38 PM

Quote:

Originally Posted by Cacara (Post 5390936)
I have seen comments to delete the dmesg file.
Can someone tell me how to view it? Thanks

Run "dmesg"

You may also find the information in /var/log/messages useful.

ardvark71 07-13-2015 02:46 PM

Quote:

Originally Posted by Cacara (Post 5390936)
Can anyone tell me how to view messages showing
Dates and times when a USB device was used in RHEL 6.6?

Hi...

Welcome to the forum :)

If not located in "/var/log/messages," you can also try "/var/log/syslog." Please see answer "0" here. :)

Regards...

Cacara 07-13-2015 02:59 PM

Quote:

Originally Posted by suicidaleggroll (Post 5390939)
Run "dmesg"

You may also find the information in /var/log/messages useful.

Ok I was able to view dmesg.
I tried to run the /var/log/messages it comes back as..
"Permission denied". I am logged in as root (Super User)#
So I tried to this option: cat /var/log/messages
And I only see messages today July 13.
So we're the earlier messages cleared? Thanks

suicidaleggroll 07-13-2015 03:04 PM

/var/log/messages is a file, not a command, so you need to use cat, less, more, vi, or some other text editor to open it and read it. It's also rotated on a regular basis, if you run "ls /var/log/messages*" you should see older versions, eg:
messages
messages-20150621
messages-20150628
messages-20150705
messages-20150712

By default, CentOS 6 rotates /var/log/messages on Sunday, which is why the current one only has information for today.

Just open up the one you're interested in.


All times are GMT -5. The time now is 10:16 AM.