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?
asked June 10th 19 at 14:43
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
you can start with this:
dmesg -T | grep mounted
Find more questions by tags Ubuntubash