Created
October 24, 2025 07:41
-
-
Save zhangyoufu/6a30db9673683df5307faed7fb599fac to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| shopt -s nullglob | |
| cd /sys/class/nvme | |
| for CTRL in *; do | |
| echo "removing ${CTRL}" | |
| echo 1 >"${CTRL}/device/remove" | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment