I need to Unzipped a list of zip archives. These archives are not empty, in each one there are a lot of file. In my directory I have a lot of file zip archive and all have the the name in the same format: batch-download-ccd-1610959358275.zip but change only the numeric part. I can extract each archive with un…
How to search /var/log/dpkg.log for monthly install/upgrade logs and output to text file
I would like to output a file with install/upgrade logs limited to the past month by looking in /var/log/dpkg.log. I do not know bash, I know that the grep command could make it, but I still need some help. Answer Sample output:
Docker nginx php permissions issue
I’m just learning Docker and took on a little pet project and wondering if something is possible permission wise with docker/nginx/php. I’m attempting to convert an old IIS-Windows/php/MySql project of mine to Docker/nginx/php/mysql I’m most of the way there and have the 3 containers linked …
Why doesn’t defining `__cxa_throw` cause a link error?
Why doesn’t the following C++ program have a link conflict with the system-provided __cxa_throw ? Is there something magical about that symbol? For a normal function this would be an ODR violation wouldn’t it? Answer As @Igor pointed out, you need to add extern “C” to prevent name mang…
install opencv on centos for java
I’m trying to install opencv on my centos 8 server to be used by java program. I followed the instructions here. after configuring opencv, I get the following result: I have already installed java on my server (by using sudo dnf install java-11-openjdk-devel, but I have not installed ant). in order to m…
How do I send my CLion’s output to the Gnome Terminal on Debian?
I’m trying to use ncurses in my C program, but it doesn’t work with CLion’s built-in console. From what I’ve gathered, in order to make the output appear in the gnome terminal, I have to select it in the Configure Debug screen, but I can’t seem to find the gnome-terminal file any…
getcwd() vs get_current_dir_name()?
Is it better to use getcwd(NULL, 0) or get_current_dir_name() ? What is common practice ? My uninformed guess is that a call to getcwd(NULL, 0) may be a better idea since it is possible that the PWD variable is not set… Answer Is it better to use getcwd(NULL, 0) or get_current_dir_name() ? What is commo…
Run tensorflow on linux by python3 pip
I have installed python and tensorflow on my linux, This is my all step that I done: This version of tensorflow and keras is installed: And: I create a simple code on vscode : But when I run it by vscode I got : What is my mistake? Answer This problem may refer to the instruction set that the binary
Finding Duplicate rows based on a column in Unix File
I have a file of about 1 Million records. I need to extract the records which have different FName and LName for id. Input File The result that I want to see Any AWK or Sed command or script can help? Thanks Answer Using GNU awk for arrays of arrays: or if your input file is sorted by “id” as
Bash script : problem with my substraction
I would like to make a script that will calculate the difference of download time between two curl. For example with this command : My curl command will be run each day and I would like to make a substraction between the value of the day and the value of the previous day. For that, I will save the time_total