tr ' ' '\n' < jsonfile | grep '"Dev_'
perl -lne 'print for /"Dev_\d+"/g' jsonfile
while read -ra A; do for a in "${A[@]}"; do case $a in '"Dev_'* ) echo "$a" ;; esac; done; done < jsonfile
Как ни странно, попытка бега
sudo systemctl --force reboot
Это выскочило из пары поисков, которые я сделал. Это может быть связано с проблемами при перезапуске службы DBus.
Невозможно перезагрузить. Медленно и тайм-аут. Не удалось запустить reboot.target :Время ожидания подключения истекло
Если ответ Зака Санчеса не работает (Я получил Failed to start reboot.target: Connection timed out
для моего systemctl --force reboot
в странной ситуации под CentOS 7 )что приводит к сбою ядра, перезагрузка может быть выполнена через SSH как root, как это:
# echo s > /proc/sysrq-trigger
# echo u > /proc/sysrq-trigger
# echo b > /proc/sysrq-trigger
После последней команды ответ не принимается, так как ядро немедленно перезагружает машину. Подробнее здесь
Как отметили @LunarShaddow и другие, вторая буква «s» перед буквой «b» не нужна.
Поскольку я не могу комментировать ответ Павла, я пишу свои комментарии здесь.
reboot(b) is good when you’re unable to shut down. But you should also sync(s) and umount(u) first. reboot(b) is good when you’re unable to shut down. But you should also sync(s) and umount(u) first.
sync(s) is great when your system is locked up, it allows you to sync your disks and will certainly lessen the chance of data loss and fscking. Note that the sync hasn’t taken place until you see the “OK” and “Done” appear on the screen. (If the kernel is really in strife, you may not ever get the OK or Done message...)
umount(u) is basically useful in the same ways as sync(s). I generally sync(s), umount(u), then reboot(b) when my system locks. It’s saved me many a fsck. Again, the unmount (remount read-only) hasn’t taken place until you see the “OK” and “Done” message appear on the screen.
Итак, FMHO, ответ Пола можно упростить до 's' 'u' 'b', и вы можете немного подождать после каждого ввода.