Friday, April 26, 2024
 Popular · Latest · Hot · Upcoming
28
rated 0 times [  28] [ 0]  / answers: 1 / hits: 45422  / 2 Years ago, mon, october 17, 2022, 11:22:26

When I connect a USB drive to an Ubuntu OS, would there be a text file which contains details of that connection and if so, where is that file located ? What is the name of that file?


More From » usb

 Answers
0

Does Ubuntu log when USB devices are connected?


Yes, Ubuntu logs when a USB device is connected. The file is /var/log/syslog. You can also view it by issuing the command dmesg (with optional -c argument to clear the log) or graphically using Log file viewer.


Is this file deleted upon shutdown?


No, This log does not get wiped upon shutdown. After a size limit is reached the logs are rotated, meaning new logs are continually written to /var/log/syslog while older records are pushed to compressed files named /var/log/syslog.1.gz, syslog.2.gz, ... in the same /var/log directory.


You can view the /var/log directory with rotated log files below:


enter image description here


[#38118] Tuesday, October 18, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
urnaetted

Total Points: 10
Total Questions: 113
Total Answers: 117

Location: Burundi
Member since Sat, Aug 21, 2021
3 Years ago
;