Centos 7 THUMB drive log?
Hey all,
which/where log file does cantos 7 log when you plug in a writable USB drive into it? I mainly want to see what it says in the log file when you plug in a Thumb drive. Writable thumb drive. not plugging in a mouse or key board usb cables but thumb drives. Thanks a mill! Also, to the admins of this page. I am sorry if i have created this thread in the wrong place. I am a newbie. I am trying to do better :D Thanks for your patience. |
systemd use journalctl - but you can still just use dmesg and parse that if you wish.
|
Thanks for the reply! :D
I am actually trying to find a script or write one that shows a thumb drive. When i inserted a Thumb drive it lists it in dmesg and also /var/log/message. When i view the devices listed using the command dmesg | grep usb, it gives a lot of info to the connected device. would you happen to know a script that tells me a thumb drive is inserted using the log from /var/log/message? |
You could probably use https://linux.die.net/man/1/inotifywatch or possibly https://linux.die.net/man/8/logwatch or write your own...
In very crude terms: Code:
tail -f somelog.log |grep <blah>| do-something_here HTH |
Should be as simple as being more specific with your grep. Maybe look at the context controls to ensure you have sufficient info - only you can decide if that is also required.
|
All times are GMT -5. The time now is 06:56 PM. |