Skip to content

Tag: linux

Search string in file via bash but only work match

Find the only string name based on the sub string name in a file. Command used: What works: File content: Output (desired output): What does not work: File content: Output: Need output SomeApi-CURRENT.war Answer It appears, you are interested in the docBase attribute of your xml elements. Specifically those w…

Install cron without mail and sql dependencies

I want to install crontab in Raspberry Pi without mail and sql dependencies ? I used apt-get install cron command to install ,installation was successful, but it also installed mail and sql dependencies. followed How to install cron to get installation steps. I need to install crontab only for minimal require…

How to copy certain range of files in single command?

I have a folder which has files range from 20190501 to 20190530, so i want to copy files range from 20190503 to 20190517 by single command. Is there any such copy command in linux? I tried scp -r 201905* /destination, but this copies everything file range from 20190501 to 20190530, is there other way to copy …

fixing the path so python can recognize z3 modules

I have successfully installed z3 on a remote server where I am not root. when I try to run my python code I get : I understand that I have to add it to PYTHONPATH in order to work and so I went ahead and done that like this: export PYTHONPATH=$HOME/usr/lib/python-2.7/site-packages:$PYTHONPATH I still get the …

can’t access my inherited class attributes

I am working on a project for my job to encode/decode into buffers DNS Records objects in C++. Some records have the same infos, so I created a class Dns message with theses basic infos: The DnsClass and DnsTypes are enum with the differents class/types I use. Then I have my sub-classes for each record, I wil…

How to install R and RMySQL in RedHat Linux 8?

How do I install R and RMYSQL on RedHat Linux 8? Cannot get the epel working. Trying to install R gives dependency errors. Answer Followed the instructions here: https://linuxconfig.org/install-r-on-linux-redhat-8 (Assuming that you have already installed the MySQL) Untar the downloaded R : Now install the fo…

How can I pass a python script as an argument?

I’m working on a program that I need to brute force with a 4 pin number in order to get a flag. This is for some Cybersecurity challenges. I was able to create a python script that will print every combination of 4 digits number. However, I don’t know how can I pass that as an argument to the prog…

How to link C language libraries?

I am interested in executing a function which is written in C language:- I want to call this fun() through assembly language which i have written:- (NASM 64bit) I have created object file by using these commands nasm -f elf64 MyAsm.asm and gcc -c CLang.c. When I merge these two file with gcc gcc MyASM.o CLang…

Multiple ip on same interface in Docker container

Is that possible to have multiple IPs on eth0 in a Docker container? I would like having 5 IPs on eth0 in a Docker container interface. I am using “ip” utility. Executing ip address add 172.20.0.200/16 dev eth0 in the container give “Operation not permited. I tried manually log to the contai…