I’m looking at a very old C based project. It adds the -D_LARGEFILE_SOURCE define when building. Is that preprocessor macro still needed on modern Linux (and if so, why)? Answer I checked the headers. If you are compiling for 64 bit, _LARGEFILE_SOURCE will be defined for you every time. This only does anything for 32 bit. And yes this is
Tag: linux
Guake terminal displays incorrect colors (insufficient contrast)
I use two dropdown terminals in parallel: Yakuake and Guake. When using Guake, the colors are way too dark, which makes much of the colored text unreadable because of insufficient contrast. The problem is most severe when displaying color #4 (dark blue) on black background (which is the default color ls displays directories with) or in Midnight Commander (default theme,
Split/Slice large JSON using jq
Would like to SLICE a huge json file ~20GB into smaller chunk of data based on array size (10000/50000 etc).. Input: Currently running in a loop to get the desire output by incrementing x/y value, but performance is very slow and takes very 8-20 seconds for a iteration depends on size of the file to complete the split process. Currently
Unable to open ‘/boot/vmlinuz-5.x.x.x-generic.dpkg-new’: Operation not permitted [Need solution without removing antivirus from system]
In the last couple of days, I have gone through some unmet dependencies issues while upgrading. I tried installing those packages separately but couldn’t find a solution. I know one solution that is to remove the antivirus from the system. But I’m not permitted to remove it. I am looking for another solution without removing the anti-virus from the system.
Export variable containing special characters(args)
I want to export CELERY_ARGS CELERY_ARGS=”–prefetch-multiplier=1 –loglevel=info –concurrency=1″ But when I export, I get the following issue. Any suggestions. Thanks Answer Exporting isn’t something you do with a value; it’s something you do to a name. adds CELERY_ARGS to a list of variable names (if it isn’t already there) whose values should be added to the environment of a child
centos 8, firewalld error `COMMAND_FAILED: ‘python-nftables’ failed`
when I try to reload firewalld, it tells me I don’t know why this is, after Google, it still hasn’t been resolved Answer I had the same error message. I enabled verbose debugs on firewalld and tailed the logs to file for a deeper dive. In my case the exception was originally happening in “nftables.py” on line “361”. Exception: 2022-01-23
Azure Batch Service: Passing Arguments via Command Line into Application Package on Linux/Ubuntu
Given the following C#/.NET console application running on my Azure Batch Pool/Task: How can I pass the args when adding a command line to my tasks in a Linux/Ubuntu VM. I have tried the following with no success: /bin/sh -c $AZ_BATCH_APP_PACKAGE_Program_1_0/Program -args ‘arg1’ ‘arg2’ /bin/sh -c $AZ_BATCH_APP_PACKAGE_Program_1_0/Program -args ‘arg1’, ‘arg2’ /bin/sh -c $AZ_BATCH_APP_PACKAGE_Program_1_0/Program ‘arg1’ ‘arg2’ /bin/sh -c $AZ_BATCH_APP_PACKAGE_Program_1_0/Program ‘arg1’, ‘arg2’
C program prints to terminal instead of file even after using dup2/dup
I’m in an operating systems course and doing assignments with C on Linux. In one of the assignments I was supposed to redirect and output to a file, but for some reason, I keep getting the output in the terminal instead. I tried writing a simple program to do just that and it still didn’t work: other things I tried
What kind of software/app is the Google Nest Hub or Amazon Echo Show interface and what is it made with?
I know that The Google Nest Hub is running on Fuchsia OS and The Amazon Echo Show on Fire OS but what I want to know is what app they are running on there. Like what did they use to create the interface that you can naviagte through with touch? React? React Native? Native Android (Java/Kotlin)? Flutter? Linux program? Chromium?
fork() giving wrong output in linux (reverse output)
I have written code in C as follows Output as shown in ubuntu 20 OS I am expecting that child process should be written first as after fork() is called child process’s printf() will be printed on screen and after that parent’s printf() will be printed but reverse is printed actually. Please help me why child process’s printf() is not