Check These Out
This command is primarily going to work on linux boxes.
and needs to be changed, for example
IP=10\.194\.194\.2
PORT=389
Using this command you can track a moment when usb device was attached.
Converting your PDF file to JPEG images. You can set resolution by -r option (default: 72dpi).
I learned a few things reading this command. But I did run into a few issues:
1. On systems that don't use GNU echo (e.g. macOS 10.14.5 Mojave), the e option may not be supported. In this case ANSI escape codes will echoed as text and the terminal will not flash, like this:
\e[?5h\e[38;5;1m A L E R T Thu Jun 20 16:31:29 PDT 2019
2. Since the read command strips\ignores leading backslashes, if a user types the backslash character once in the loop, it will not break. Typing backslash twice in a loop will break as expected.
3. The foreground color is set to red (\e[38;5;1m) on every loop. This could be set once before we call while, and then reset once when the loop breaks.
4. Instead of resetting the foreground color when it breaks, the video mode is set back to normal (\e[?5l). This has the effect of leaving the terminal text red until it is manually reset.
The alternative I'm proposing here addresses these issues. I tested it on macOS and Arch Linux.
Using this command you can track a moment when usb device was attached.
This will cause your machine to INSTANTLY reboot. No un-mounting of drives or anything.
Very handy when something has gone horribly wrong with your server in that co-location facility miles away with no remote hands!
Suspect this works with all 2.2, 2.4 and 2.6 Linux kernels compiled with magic-syskey-request support.
Run as root. Path may vary depending on laptop model and video card (this was tested on an Acer laptop with ATI HD3200 video).
$ cat /proc/acpi/video/VGA/LCD/brightness
to discover the possible values for your display.
I modify 4077 and marssi commandline to simplify it and skip an error when parsing the first line of lsmod (4077). Also, it's more concise and small now. I skip using xargs ( not required here ). This is only for GNU sed.
For thoses without GNU sed, use that :
$ modinfo $(lsmod | awk 'NR>1 {print $1}') | sed -e '/^dep/s/$/\n/g' -e '/^file/b' -e '/^desc/b' -e '/^dep/b' -e d
You can view the man pages from section five by passing the section number as an argument to the man command