Ubuntu/bash: how to know if disk present and writeable.

#Use udisks utility #sudo apt-get install udisks $> udisks --show-info /dev/sr0 | grep -c "blank: *1" #this will return 0:if not blank/present; or 1:blank disk present
Command line to detect if disk in cd/dvd drive is present and writeable. It uses udisks utility.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.