Can I view the history of connected usb?
You can get something by using the dmesg
command and filter it to only keep USB events.
dmesg | grep usb
Related videos on Youtube
Stallman
Familiar only with C currently. Not abundant experiences in JAVA and C++. New beginner to Html V(Javascript+CSS+HTML)/Python and Bash. However, I have great interest in computer science knowledge like programming language, image processing, networking, software engineering... Since I don't study in computer science department, hoping experienced programmer can give me advice that how to become stronger in this domain.
Updated on September 18, 2022Comments
-
Stallman over 1 year
I don't know Ubuntu or other linux distribution would record the connected USB
information or not. I mean does Ubuntu record the USB information as I plug it into the PC,
when I plug it out, does the record remains in system? If yes, where is the log?
If not, can I do this?
-
Rémi almost 10 years'dmesg' displays the buffer of messages from the kernel (not only about usb). You can clear the buffer with 'dmesg -c'. But if you plan to do this from a program, you can also memorize the timestamp of the last message and only keep what is after.
-
Stallman almost 10 yearsHow to clean msg after certain timestamp? I want to know the command, and could you also provide me the doc(relevant sites) about the usage of this command? Thanks!!
-
desgua almost 8 yearsFor future reference: you can see "older" dmesg files at /var/log/