So I’ve been having a problem with some cli programs. Sometimes when I kill the running process with Ctrl+C, it leaves the terminal in a weird state (e.g. echo is turned off). Now that is to be expected for many cases, as killing a process does not give it a chance to restore the terminal’s state.…
Tag: linux
How to properly install Erlang, Elixir and mix on a server?
In order to deploy Elixir/Phoenix app I need to install Erlang, Elixir and mix on a server, correct? I haven’t found any straightforward way to do that, especially the laterst versions. How can I do it? In Ubuntu or CentOS. Answer Have you done any research?
Attach to a GNU screen and then execute commands
I have seen some similar questions asked but the solutions don’t seem to work in my case. I am trying to SSH into a specific screen instance on a Node machine and then execute some commands My current process is this: On the remote machine I create a screen instance: screen -dmS “my_screen” …
how to return a phys_addr_t type value to user space
I need my driver to return phys_addr_t type value through an ioctl call. I need to return this value through a struct which is passed through arg. The question is what type do I use in this struct? For example, say the following struct is passed through an arg virt_to_phys returns a phys_addr_t, however this …
Security concerns around KSM
When using KSM (Kernel Same-page Mapping), if two completely identical pages of memory are owned by two completely isolated processes, for example, two virtual machines, will those pages be merged? Or will they remain separate due to the fact that each process is isolated from each other? I’m confused b…
meaning of p in %pa[p] in the printk formats
The question is with regard to the printk formats. The documentation that I’m reading is located here Here is an excerpt that I’m asking about: What does [p] in %pa[p] stand for? What does it mean? Answer The p in [p] stands for phys_addr_t when used in %pap. This is analogous to the d in %pad sta…
javac error: “Cannot find symbol”
I’m trying to compile java files on an EC2 instance, and am having trouble. I have several JAR files as well that are included in the classpath. The example would be a StockTrade.java (which is a stock trade object), which compiles completely without issue. In the same directory, there is the StockTrade…
Linux dd create multiple iso files
I want to create an iso from an external hard drive. I used this command: sudo dd if=/dev/sdb of=usb-image.iso It works, however, the disk is large (700 GB), and i dont have space on my laptop to store that much. I was thinking about creating multiple iso files (each file 5 GB for example), this way, I can ma…
Execute GIT command from PHP and get error message back
When I try to execute something legitimate – it works, like returns me a list of available tags. But when I do something that should return error, like it returns me NULL, but not message fatal: could not create work tree dir ”.: No such file or directory that I would see in the console. How can I…
Prevent accidental history editing in bash
I recently switched from tcsh to bash, and one thing that keeps tripping me up is how bash handles history. I regularly bring up a previous history command and begin to edit it, but realize I need to run a different command first. In bash, this edits the original command, and I cannot see what I originally ty…