Reputation
1,327
Top tag
Next privilege 2,000 Rep.
Edit questions and answers
Badges
5 18 28
Impact
~154k people reached

Feb
23
answered Using process substitution to trick programs expecting files, with specific extensions as argument?
Feb
5
comment “Last resort” Linux terminal command to reboot (over ssh) in case of a kernel bug?
Just a note: I just tested several times with sudo reboot -f from ssh (both typed manually and in a script), and realized late that actually there are several instances of reboot -f shown in ps axf with status D which is uninterruptible sleep (usually IO); probably the kernel bug freezes the reboot commands as well...
Feb
5
revised Running a “scheduled”/delayed script as sudo on server, via ssh - and right before ssh exit
fix title
Feb
5
comment Running a “scheduled”/delayed script as sudo on server, via ssh - and right before ssh exit
Many thanks for that, @StephenKitt, that seems to work great! Just a note: if I forget to do say sudo ls before I execute the command, so that my password is asked for and temporarily remembered, then I might get [1]+ Stopped sudo bash /home/user/testsleep.sh from_end ; logout ; There are stopped jobs., so I had to do fg until I saw and answered the password prompt. Btw, in syslog I get mypc user: Pre sleep: root...but mypc logger: Post sleep: root... - any idea why "pre sleep" has user and "post sleep" has logger as username?
Feb
5
accepted Running a “scheduled”/delayed script as sudo on server, via ssh - and right before ssh exit
Feb
5
comment Running a “scheduled”/delayed script as sudo on server, via ssh - and right before ssh exit
Thanks, @StephenKitt - well spotted, fixed in OP now; unfortunately the sudo bash /home/user/testsleep.sh from_end & exit still doesn't print anything in syslog even with this change (I guess I didn't notice the mistake since I invoke bash explicitly here, which will ignore the shebang). Cheers!
Feb
5
revised Running a “scheduled”/delayed script as sudo on server, via ssh - and right before ssh exit
fix
Feb
5
asked Running a “scheduled”/delayed script as sudo on server, via ssh - and right before ssh exit
Feb
5
comment “Last resort” Linux terminal command to reboot (over ssh) in case of a kernel bug?
Thanks, @Gert; I checked with cat /proc/sys/kernel/sysrq and it was already 1, so that was already active, I guess... I think this has something to do with the fact that I'm running this via ssh remote shell, but cannot tell what
Feb
5
comment “Last resort” Linux terminal command to reboot (over ssh) in case of a kernel bug?
Thanks for that, @wurtel - I tried from my ssh shell: sudo bash -c "( echo a ; sleep 5; echo s > /proc/sysrq-trigger ; echo u > /proc/sysrq-trigger ; echo s > /proc/sysrq-trigger ; echo b > /proc/sysrq-trigger )" & exit; however, this doesn't seem to force the server into reboot... Is there a specific way I should format these commands, if I want to run them while I'm connected through a remote ssh shell?
Feb
5
comment “Last resort” Linux terminal command to reboot (over ssh) in case of a kernel bug?
Many thanks for that, @orion - I tried from ssh in the controlling terminal this: sudo bash -c "( echo a; sleep 5; reboot -f )" & exit but nothing happens on the server PC... I guess if I issue it manually on the server PC itself it would work, but here I need to issue it from a remote ssh shell, and immediately exit from the shell before the reboot takes place (and the at command doesn't recognize seconds.). Cheers!
Feb
5
asked “Last resort” Linux terminal command to reboot (over ssh) in case of a kernel bug?
Jan
28
comment Using process substitution to trick programs expecting files, with specific extensions as argument?
Thanks again, @Costas - unfortunately, that doesn't work either, at least not on my version of melt (MLT melt 0.6.2; "standard input" is not mentioned in this version's man melt), since for that command, again I get Usage: melt [options] [producer [name=value]* ]+ and a dump. Cheers!
Jan
28
comment Using process substitution to trick programs expecting files, with specific extensions as argument?
Thanks @Costas - tried that, but apparently melt doesn't care about commands piped through stdin, since I get: Usage: melt [options] [producer [name=value]* ]+ and a dump of program options. Cheers!
Jan
28
asked Using process substitution to trick programs expecting files, with specific extensions as argument?
Jan
28
awarded  Notable Question
Jan
26
asked Start command and stop command in terminal on keyboard (hotkey) shortcut press?
Jan
26
answered A standard tool to convert a byte-count into human KiB MiB etc; like du, ls1
Jan
25
revised Resolving the location/registration of an executable in the system?
clarification
Jan
25
revised Resolving the location/registration of an executable in the system?
damn it