I have many large binary files with source code under git version control. I want to only push the source files to github for repo initialization. So I used git rm -r –cached to remove the large binary files from the index. After checking git ls-tree -r –names-only mybranch, I confirmed there are …
Return the ls -l output in docker container
So I have a docker container running which has a couple of folder/files inside. When I go inside the container I can see that they are: hostmachine$> docker exec -it testContainer bash testContainer@testContainer:~$ ls -l My question is: What script, how can I use it on my hostmachine that will: 1) Echo ba…
Print the two matched variables of awk in same line
This is the script which i wrote. The logs.txt consists of : In this the expected output is : But the output i am getting is : Can anyone rectify what is the error ? Answer I thinks this problem should be separated multiple problems. How do you think about below code? You can see what these code actually do
Issue with HH date time format
Need help to identify where is the issue, whether it is a java issue or linux box or something else. My app is running on linux weblogic, app is generating some kind of .tar files on linux with datetimestamp in filename. I am using below snippet to get current time to prepare filename: File format: SA_PART_YY…
Invoke Python as Executable
I have a Python script, a simple Hello, World. I need to invoke it as I would an executable and take piped input: How do I generate the command python3 myprogram.py and handle the piped input? Answer If you’re on a *Nix system, you’ll need to follow 3 steps: Make sure your script has executable pe…
Can a single peer run 2 different chaincode
I am trying to chaincode something so just have a question that can a single peer run 2 different chaincodes? So need your help here. Answer Yes, peer can have more than one chaincode installed and instantiated. Moreover for some case this is actually vital, for example if you would like to have a chaincode f…
python3 import error: while running with sudo -u python3
For my python script I need to change the user. Therefore I start the script with: sudo -u eval python3 run_aufgabe2.pythere is no problem running the script until I import modules from the same directory, then I get an import-error: Running the script without sudo -u eval, the import is working and the scrip…
what is the . (dot) and + (plus) after the lock name in the kernel crash (task hung)?
I’ve found that there are dot and plus signs in the kernel crash when the kernel detected task hung. Showing all locks held in the system: 2 locks held by khungtaskd/737: #0: (rcu_read_lock){….}, at: [<00000000eaa2e968>] check_hung_uninterruptible_tasks kernel/hung_task.c:175 [inline] #0: (r…
‘Feeding’ a Netty 4 pipeline without a socket
I have a set of Netty 4 handlers that I normally chain on top of a ServerBootstrap using EpollEventLoopGroups. However the source of the data will not be a socket; instead I will read from / write to two in-memory buffers. Solution can be Linux-specific. For now I add a ServerBootstrap to listen to a loopback…
How to run commands on CentOS reboot
I want to run the following commands one after the other upon reboot of the server after I do shutdown -r now but not sure how to do it: getenforce setenforce 0 systemctl start httpd.service I’m running CentOS 7.x Answer Technically you can crontab it and add the line and put the 3 commands in the myscr…