Skip to content

Tag: linux

How to stop ‘echo’ from caching

I run the following: I then make a change to the apache2.conf file and run the command again, expecting a different hash, however it is the same hash which leads me to believe that echo is caching the file in that shell memory. When I open new shell and take a hash of the now-modified file it shows new hash.

Strtok behaviour with delimiter

Below is the code snippet. This works fine. But, when the “line” argument is “Front Board Memory status:Correctable ECC / other correctable memory error detected ; sensor (70, Memory)” The output will be 70 SENSOR_SPECIFIC MEMORY STATE_00 True 8543 Front Board Memory status where the s…

Linux terminal installation yes/no error

I want to set up something, example: phpmyadmin; Terminal CODE: When I enter this code a yes or no question is seen. I answer ‘yes’ ‘y’ but it is cancelled. Answer It asks you: Note the capital “Y”, which means it’s selected by default, so pressing “enter”…

Screen, process kill on disconnect?

Am hoping this can be cleared up : Given, screen session running, and open (attached) in a terminal. Question. If the terminal session is terminated, without being detached from the screen session, would the active process running in the screen session be killed/halted/stopped etc. Thanks Answer It is in the …

Linux whiptail or dialog with menu and input together

I want to use the ‘whiptail’ package to generate a menu box and input box simultaneously on screen. Is this possible? Or maybe with dialog? I can’t find any example of this. I want something like this: Menu item 1 Menu item 2 menu item 3 if none of the above, type your own: Inputbox: The use…

Modification of file names

I have a list of more than 1000 files on the following format. I am on Linux and want to change them as follows Using rename and awk I managed to get The remaining task is now to remove the last field that holds the year. Answer A solution that uses sed to generate the new names and the rename

Getting digit instead of Ascii in nasm assembly intel x86

I’m trying to learn the basics of assembly but can’t get across on how to display results stored in memory. What I’m trying to do is get the dot product of the two list of numbers and display it on the screen. However, I keep getting random letters which I believe are hex representations of …

how to execute init scripts from the command line using ssh

Above mentioned code works fine and displays all the contents of the test directory folder but this code fails It does not start the mysql server, I have login in to server and use the same command to start the mysql server Can any one explain this behaviour ? what I am doing wrong bit puzzled 🙁 Answer Do som…