How to find the newly added disk using a bash script?

How to implement in a script the process of finding just that added hard drive with the withdrawal of his name, serial number and logical name?
June 10th 19 at 14:43
2 answers
June 10th 19 at 14:45
The logic goes like this:

1. Keep in a file the output of the last df
2. To run the script that contains the df command every 5 minutes (the cron - crontab-e)
3. If there are differences in the output file - show variations.

The differences can be found using the diff command, if you write all files
/proc/diskstats, do not pull once again df - Gregg_Kovac commented on June 10th 19 at 14:48
it is better to start the daemon in supervisor
cron is not reliable (if the error can stop working) - buck53 commented on June 10th 19 at 14:51
I need a script that when run will detect the connected screws and displays them in a list sorted by date of connection to the system - Carey commented on June 10th 19 at 14:54
well, this is not.
In the best case just in bootlogo you will be able in turn to see but the date was not specified. - Jeff28 commented on June 10th 19 at 14:57
June 10th 19 at 14:47
you can start with this:
dmesg -T | grep mounted

Find more questions by tags Ubuntubash