I am trying to make dos shell which displayes a unix/linux promt. The code is: I want it to display directory name like in unix/linux but it displays a ~. What is wrong in my code? Can you please help me improve it? Answer Probably not quite on the ball with the prompts specific situational substring modifica…
Execute binary file inside C code (No system())
I am trying to execute a binary executable file inside C code without using system since it has security and resource management issues. The system used here is Debian Buster with kernel 5.4.0-2-amd64 and gcc 9.2.1. I used the method in this question: execute binary machine code from C which is to convert exe…
How does Windows/Linux x64 determine the last time a memory page was accessed?
When virtual memory systems decide to evict a memory page out to disk, it’s sometimes mentioned that the last time of access of that memory page is used to help decide which page is evicted. But what mechanism is used to track the last time of access of a memory page? I believe the TLB only stores infor…
UIO and msync: Why does msync return “invalid argument” even though the address is a multiple of PAGESIZE
Linux version: 4.19 Platform: Xilinx Ultrascale+ Zynq In the programmable logic I’ve created a memory mapped device located at physical address 0xA0001000. I’m using uio_pdrv_genirq as my device driver. The device shows up as uio0 and I’m ready to read and write to it, using mmap. I want to …
Diolan DLN-2 SPI controller on x86_64 platform
I am attempting to utilize the DLN-2 in an x86_64 Linux environment (kernel version 4.18) to provide SPI and I2C bus controllers to the userspace, in a similar manner you would using an ARM platform with DTS/DTB file modifications. I am having trouble identifying the proper method to attach a SPI slave device…
Amazon EC2 Linux – Azure devops Agent installation throws an error while run config file
./config.sh: line 85: ./bin/Agent.Listener: cannot execute binary file Answer Update: The build agent does not support x64 based ARM (aarch64, arm64). More details please take a look at this similar issue: ARM agent fails to configure The agent is based on .NET Core 2.1. You can run this agent on several Linu…
How to run remote script on multiple host simultaneously
I have a great amount of Linux servers to maintain. Frequently I need to run a script (script.sh) on all of them to get the health status, this script usually takes about 30-40 seconds to give an output. To facilitate maintenance tasks, I’m writing a shell script that uses SSH to loop through all remote…
Docker overlay2 resource is busy
I need some help with docker! 😀 When I have to deploy my application, sometimes I have this error OR This is my docker info output: Everytime that the resource is busy error appears, I move the HASH’s directory in /var/lib/docker/(containers OR overlay2) to HASH_old directory and retry to deploy the app…
Loop Never Ends in Assembly?
Basically, I have below assembly code: I am trying to loop through 0-50 and print the variable pas or probably buf from input box. But this loop keeps printing pas endlessly. I Presume the issue is the re-assignment of ecx, but otherwise without putting my string into ecx how would I print it? or even execute…
How to jq to copy array inside the dictionary?
I have the following json I want to convert it to How do I do this with jq? Answer The solution is the following: In the Command line: See:https://jqplay.org/s/MJ-GoLOBX2 There is more documentation available at: https://programminghistorian.org/en/lessons/json-and-jq#the-dot- Also see the hints below jqplay …