Skip to content
Advertisement

Tag: linux

Is -D_LARGEFILE_SOURCE needed on modern Linux

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

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

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’

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

Advertisement