I’ve installed 2 php versions on my server (which is managed by ISPconfig 3) using this howto: https://www.howtoforge.com/tutorial/how-to-install-php-5-6-on-ubuntu-16-04/ I’m trying to add pecl ssh2 extension only to my 5.6 installation. Any help will be appreciated! Answer Done by changing the pe…
Tag: linux
bash: Create a ncurses dialog radiolist from a dynamic file and output selection to variable
I am working on building a ncurses/dialog driven interactive shell script to Clonezilla to simplify the creation and restoration of images passed with very specific settings that we use each time. Part of the script asks the user to select an image for restoration and I have hit a wall. I want to use a dialog…
Reading Long Values From Sysfs Path With Escape Characters
I am using C file IO to read value from a sysfs interface in linux. Path and sample value of the register is as follows: Code: Added after intel-rapl to take into account unknown escape sequence The code compiles without any error, but in the output file I am getting value as 0. Is this due to how I
How to add a word at the beginning of each line BUT not when a # is present
Given a file with many ENV variables. Example: DEV.env I know the command sed “s/^/export /g” will add export at the beginning of each line. But I don’t want to do this when the first character is “#”. How can I do with sed? Answer Something like this: Alternatives:
Why can I not read a UTF-16 file longer than 4094 characters?
Some information: I’ve only tried this on Linux I’ve tried both with GCC (7.2.0) and Clang (3.8.1) It requires C++11 or higher to my understanding What happens when I run it I get the expected string “abcd” repeated until it hits the position of 4094 characters. After that all it outpu…
Sed/awk: Aligning words in a file
I have a file with the following structure: I want to add another item to the file, using sed or awk: etc. So my next item looks like this: The column values is jagged. How do I align my values to the left like for previous items? I can see 2 solutions here: To align the values while inserting them
Persisting content across docker restart within an Azure Web App
I’m trying to run a ghost docker image on Azure within a Linux Docker container. This is incredibly easy to get up and running using a custom Docker image for Azure Web App on Linux and pointing it at the official docker hub image for ghost. Unfortunately the official docker image stores all data on the…
Error building Tensorflow on CentOS 7
I am trying to compile Tensorflow (r1.3) on CentOS 7. My environment: gcc (g++) 7.20, bazel 0.5.3, python3 (with all necessary dependencies listed on tensorflow web site), swig 3.0.12, openjdk 8. Everything is installed in the users scope, without root access. Whenever I am trying to build a python package in…
AWS instance not showing the correct free space
I use AWS and I got an EC2 instance. When I run the command du -h –max-depth=1 I get: and When I run the command df -h I get: It look I use only 1GB but it show that I am using 7.1GB. So I run the command lsof +L1 to locate some deleted file that process are still using
How do you move files from one folder to the other?
I am trying to move specific files from one folder to another. Would the below work? Answer I think this can work: