so I set up my terminal banner with figlet and I really like it. But it will only be displayed after opening a new terminal. My question is: Can I somehow display a banner after I hit “clear”? Answer You’ll have to edit your .bashrc file and add the following line: Then it will start up ever…
results of ls in one line when the output goes to a file
ls returns files in a line when it connects to stdout. when it redirects to a file I realize the option -C However, when a list of files has many, ls puts carriage returns in the list. like How can I have Answer I don’t know if ls provides an option for that and I haven’t looked it up. Since
Relocation addend in ELF files – Elf64_Rel vs Elf64_Rela?
ELF files contain two structures to handle relocations: Elf64_Rel: and Elf64_Rela: I want to take peek at the relocation entries but I’m not sure which one to use. The manual pages are quite cryptic about this. Is there a specific usage for each? Answer This depends on the target. Most targets use only …
Is it safe to change web server root directory to owners root:www-data with 775 rights?
I had a problem with the PHP fwrite function not writing anything and I figured it was because of rights. One apache process is run by root and several others by www-data: $ ps -aux |grep apache root 21239 0.0 0.3 222104 26524 ? Ss 02:31 0:00 /usr/sbin/apache2 -k start www-data 21240 0.0 0.1 222316 13736 ? S …
timer using timerfd_create() and timerfd_settime() continually expires even though interval is set to zero
Here is the stripped-down code. The timer expires(reported by epoll_wait) in time but even though interval is set to zero, epoll_wait continually triggers a ready-to-read event (EPOLLIN) for the timer fd. Should it not be triggered just once as interval is set to 0? Answer epoll, poll(), select(), etc. will t…
gunicorn command not found, but it’s in my requirements.txt
I am deploying a Django app on Heroku , which is successfully deploying, but I am getting the following error when I want to view the app on the provided http link. gunicorn is in my requirements.txt file. Here is my requirements.txt file: I also have Pipfile and Pipfile.lock files. Answer I also have Pipfile…
Unable to use SED command [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 2 years ago. Improve this question i want to call a shell scripts which has sed command in it to format the xyz.csv generated b…
BUILD_BUG_ON_ZERO not working in a simple user space application
I tried to use BUILD_BUG_ON_ZERO in a simple user space application and it is failed to compile Can anyone please provide me hints on the error. Answer The macro BUILD_BUG_ON_ZERO is intended to be used with a constant expression as defined in 6.6 constant expression. i isn’t a constant expression ̵…
kubectl exec behaving strangely, stating command not found even though the binary is there in the pod
So have an OpenShift cluster and running a pod in the mongodb-test namespace. The pod is running fine When I exec into the pod and run the mongo command, I dont get any issue and the command works as expected. Now the problem is when I try to run the same command using below syntax I get mongo not found
x86_64-conda_cos6-linux-gnu-cc: Command not found with postgres function makefile
I am trying to do this tutorial: https://linuxgazette.net/139/peterson.html so I can learn to write postgres functions. It says to use this makefile, which fails: Errors: I have tried several things, including updating conda and anaconda, as per the answers to similar questions. Nothing has worked yet. How do…