Questions tagged [gnu]

This tag is for programming questions related to software and tools provided by the GNU ("GNU's Not Unix") project.

The GNU Project is a free software, mass collaboration project, announced on September 27, 1983, by Richard Stallman at MIT. It initiated GNU operating system development in 1984. The founding goal of the project was, in the words of its initial announcement, to develop "a sufficient body of free software [...] to get along without any software that is not free."

To make this happen, the GNU Project began working on an operating system called GNU ("GNU" is a recursive acronym that stands for "GNU's Not Unix"). This goal of making a free software operating system was achieved in 1992 when the last gap in the GNU system, a kernel, was filled by the third-party Linux kernel being released as Free Software, under version 2 of the GNU GPL.

2807 questions
18
votes
3 answers

Are gnu syslog(), openlog() and closelog() thread-safe?

I have been searching for some time and haven't found a definitive answer yet. The only link I found till now which sheds some light on this is here.
Konoha
  • 337
  • 1
  • 4
  • 13
17
votes
2 answers

Gnu time and formatting output

I wanted to use gnu time to measure running time of some little .c programs. In the man it is written that: -f FORMAT, --format FORMAT Use FORMAT as the format string that controls the output of time. See the below more information. Then in…
Andna
  • 6,539
  • 13
  • 71
  • 120
17
votes
4 answers

How does grep work?

I am trying to understand how grep works. When I say grep "hello" *.*, does grep get 2 arguments — (1) string to be searched i.e. "hello" and (2) path *.*? Or does the shell convert *.* into something that grep can understand? Where can I get…
hari
  • 9,439
  • 27
  • 76
  • 110
17
votes
3 answers

How to add a path to LDFLAGS

I'm trying to set up a library called PBC (Pairing-based cryptography). And this library requires another library called GMP -(GNU Multiple-Precision Library). My problem is after installing GMP correctly, PBC gives an error of: gmp library not…
Giuseppe
  • 447
  • 2
  • 5
  • 14
17
votes
5 answers

How to simulate "sort -V" on macOS

I have written a bash script that I need to work identically on linux and macOS that relies on the sort command. I am piping the output of git tag -l to sort, to get a list of all the version tags in the correct semantic order. GNU offers -V which…
sphoid
  • 575
  • 7
  • 18
17
votes
1 answer

Where is gnu lib math (libm) source code

I want to download and compile the source code for libm (GNU's may library). Can someone point me to the correct location / repository?
user1205476
  • 391
  • 1
  • 3
  • 12
17
votes
1 answer

How to use/install GNU binutils (objdump)

I need to use the objdump and readelf commands in my application that runs on windows. I know I can install cygwin in order to use them. The reason why I don't want to use cygwin is because I want to make it essay to deploy. Plus I don't know how to…
Tono Nam
  • 34,064
  • 78
  • 298
  • 470
16
votes
9 answers

How does one go about understanding GNU source code?

I'm really sorry if this sounds kinda dumb. I just finished reading K&R and I worked on some of the exercises. This summer, for my project, I'm thinking of re-implementing a linux utility to expand my understanding of C further so I downloaded the…
Max Dwayne
  • 161
  • 1
  • 3
16
votes
8 answers

How can I record what process or kernel activity is using the disk in GNU/Linux?

On a particular Debian server, iostat (and similar) report an unexpectedly high volume (in bytes) of disk writes going on. I am having trouble working out which process is doing these writes. Two interesting points: Tried turning off system…
Mike
16
votes
1 answer

GNU gdb how to show source file name and lines of a symbol

when use GNU gdb to debug a c process. list command will print the lines but not telling me the file name. set breakpoints can display all the line and file info I want but I don't want to set a breakpoint and have to disable or delete it. (gdb) b…
oyss
  • 662
  • 1
  • 8
  • 20
16
votes
3 answers

How to configure 'less' to show formatted markdown files?

I would like to have less display *.md markdown files with some formatting -- like I know less can, for manpages, etc. I am running Ubuntu 12.04. I am as far as putting a user defined filter into .lessfilter: #!/bin/sh case "$1" in *.md) …
towi
  • 21,587
  • 28
  • 106
  • 187
16
votes
1 answer

gnu linker section of non-contiguous memory region

I'm trying to write a linker script to write one section content into two non-contiguous memory regions. I have found an old thread in this mail list about this: "ld linker script and non-contiguous memory…
dispatcher
  • 223
  • 3
  • 6
16
votes
5 answers

Seeking and reading large files in a Linux C++ application

I am running into integer overflow using the standard ftell and fseek options inside of G++, but I guess I was mistaken because it seems that ftell64 and fseek64 are not available. I have been searching and many websites seem to reference using…
John Bellone
  • 1,351
  • 1
  • 16
  • 29
15
votes
3 answers

Bug in GNU make: target-specific variables are not expanded in implicit rules?

I have been working on designing a multiple configuration Makefile (one that supports separate 'debug' and 'release' targets), and have come across a strange problem which appears to be a bug in GNU make. It seems that GNU make is not expanding…
falken
  • 884
  • 9
  • 21
15
votes
5 answers

How do you tell if the current terminal session is in GNU screen?

I have a command I want to execute in .bashrc only when the current terminal window is managed by GNU screen. How do I do this? Is there an environment variable for it? I used to have if [ -n "$WINDOW" ]; then command fi But from what I can…
OTZ
  • 3,003
  • 4
  • 29
  • 41