Skip to content

Tag: linux

How to perform memory dump to docker container from outside

I’m trying to find a way to perform a memory dump on a docker container in order to perform memory forensics (to detect malware exploits for example). I would like to be able to perform the same methods I use on a virtual machine. The problem is that docker containers (and any kind of linux containers) …

bash: Possible to require double Ctrl-c to to exit a script?

End-goal: BASH script that is waiting for background jobs to finish does not abort on first Ctrl-c; instead, it requires a second Ctrl-c to quit. I’m well aware of how the BASH-builtin trap works. You can either: Use it to ignore a signal altogether (e.g., trap ” 2) … or Use it to have arbit…

How can I make a hybrid bash/tcsh script on Linux?

I have one script which runs in Bash and and other which runs in tcsh. I need to run them both from the same script. How can I create a script that can run both bash and tcsh commands? Answer Most shells have an argument which allow you to pass them a string to run as a command, for example,

ImageMagick using convert and rename output

I a directory I have several files name like 13992.jpg 13993.jpg 13994.jpg 13995.jpg … How do I rename these files using convert? I have tried but it is not working… Any suggestions? Answer you probably want to run convert in a loop, like consider also this little “trick” for renaming:

Execute a command in another terminal via /dev/pts

I have a terminal that uses STDIN 3 (/proc/xxxx/fd/0 -> /dev/pts/3) So if (in another terminal) I do: The command is shown in my first (pts/3) terminal, but the command is not executed. And if (in this terminal pts/3) I’m in a program waiting for some data from stdin, the data is written on screen bu…

Check if a condition is false

It is seems to be an easy question, I wonder why googling didn’t give anything helpful — nor in StackOverflow, nor in tutorials. I just need to check using bash that a condition is false. Of what I found I tried and none of them print Hello. I found only two similar questions, but the end answer i…