Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [gnu]

GNU Project is a free software, mass collaboration project. 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.

1
vote
1answer
33 views

what used to lead /bin being full and creation of /usr/bin?

I am and was reading https://lwn.net/Articles/773342/ where the current move of migrating whole lot of filesystem from /usr/$something to simply /usr . Some of the comments again and again comment on ...
0
votes
2answers
42 views

Gnu Sed: Space Character class not matching for end of line character

Pattern: abc followed by space or is the last character in a line. orig="abc[[:space:]]+"; new=Hello sed -i -r -e "s|${orig}|${new}|g" ./file ; File: abc abcd abc abc d After executing: abc abcd ...
0
votes
0answers
16 views

Symbol lookup error on ubuntu 16.04

When I try to run octave on my ubuntu 16.04 pc I get this error. Similar event happened when I tried to run virtual box on my pc. How to fix it? lelmil@newbit:~$ octave /usr/lib/x86_64-linux-gnu/...
-1
votes
1answer
26 views

Bash Conditional String and Integer together

I am trying to do both integer and string comparison in a statement as follows: $ TimeHr=$(date +%_H) $ Time=Night $ echo TimeHr 1 $ if ((TimeHr>18 || TimeHr<5 )) && [ Time == "Night" ]...
1
vote
2answers
46 views

Awk or Sed: If pattern is found: delete line && export variable

In my bashscript I want Sed to find debug: Debug in a file ${SourceP} and if found delete that line and export to the environment Debug=Debug sed -i '/debug: Debug/,+0 d' ${SourceP} && export ...
1
vote
1answer
30 views

Why does `xargs -n ` on SmartOS (SunOS) behave differently than other implementations?

It seems the -n option on the xargs found in SmartOS (and I assume Solaris) does not behave like any other version of xargs I've encountered. Take this example: Builtin /usr/bin/xargs (odd behavoir):...
0
votes
1answer
18 views

Array inside an Array: Different syntax for Array in bash

I found the following example from here. But I can't understand how is array arr is being defined. a='domain.de;de;https' $ arr=(${a//;/ }) What is the advantage of defining it like this? Actually, ...
0
votes
0answers
42 views

Void: Annoying grey dots on boot

I have these dots on a grey background at boot that I can't disable. Tried a couple of things (including stdout redirection) but none of them worked. I asked the same question on reddit, and someone ...
0
votes
1answer
38 views

What is the predefined order in which man searches sections? [duplicate]

The description of man in its own man page contains the statement, The default action is to search in all of the available sections following a pre-defined order ("1 n l 8 3 0 2 5 4 ...
0
votes
1answer
62 views

GNU coreutils and GNU Bash [closed]

I confused with GNU coreutils and GNU Bash, I have installed Bash GNU Project - Free Software Foundation, Should I install Coreutils - GNU core utilities How could I distinguish them?
0
votes
0answers
21 views

Update Reference to GNU/Bash manual in place on Macos

I installed GNU/bash on MacOs and set it as default: $ bash --version GNU bash, version 4.4.23(1)-release (x86_64-apple-darwin18.0.0) Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: ...
0
votes
0answers
41 views

My Debian install gives me black screen on start up - it's a quick fix but it happens every time

My issue is a bit strange. I am running Debian GNU/Linux Testing Buster, and I'm very happy with it. However, it has one minor but persistent issue that I can't seem to figure out. Each and every time ...
5
votes
2answers
311 views

Makefile and .ONESHELL

When .ONESHELL is not used Makefile executes each shell commands in a separate shell. What is the benefit of this? Why doesn't makefile uses the same shell?
0
votes
1answer
41 views

GNU coreutils need suggestions [closed]

Can anyone please suggest me some book or website from where I can learn about gnu coreutils to get more knowledge about terminal commands. An interactive book or website would be a nice start.
3
votes
2answers
580 views

The difference between find and GNU find

Consider some common *nix systems (say Debian, Ubuntu, Fedora, CentOS, Arch and Kali). I use Linux since 2014 but always used find. I don't recall personally using GNU find, but from one example I've ...
1
vote
2answers
69 views

Find a list of files that contains a set of consecutive lines defined in another file

I have a Reference file that contains a b c d I have to check all files in a subfolder recursively that contains all the lines of Reference file consecutively and delete those files. For example, ...
2
votes
0answers
49 views

Ulimit not respected in GNU bash OSX

I am seeing a strange issue with gnu bash in OSX. The value of ulimit -f is being changed by the bash itself. Small reproducible code: #!/usr/local/bin/bash ulimit -f 1 echo "Value: $(ulimit -f)" ...
0
votes
2answers
46 views

Sed with Character class [^[:space:]] not getting recognized

I used following sed with character class [^[:space:]] as follows: orig="(\`\`\`)([^[:space:]]*)"; new="\1{.\2 .numberLines startFrom=\"1\" .lineAnchors}"; sed -i -r -e "s|${orig}|${new}|g" ${...
0
votes
1answer
30 views

Makefile: Copy using make variables --> error; Not so without variables!

In the following makefile InputLocation:=./Test OutputLocation:=$(InputLocation)/Output Input:=$(wildcard $(InputLocation)/*.md) Output:=$(patsubst $(InputLocation)/%, $(OutputLocation)/%, $(Input:...
0
votes
1answer
25 views

Pass a Make variable to Bashscript that is invoked from inside Make

In a pattern rule I would like to export make variable like $(TargetLocation), $@. I tried the following but It didn't get exported. The bash script is executable. export $(TargetLocation); \ export ...
2
votes
3answers
79 views

Find command that excludes paths listed in a file

I need to exclude a bunch of paths from a find command. For example: find "$(pwd)" -not \( \ -path "*/.git"\ -o -path "*/.git/*"\ -o -path "*/.vscode"\ -o -path "*/.vscode/*"\ -o -path "*/...
0
votes
3answers
31 views

How to search for a match, then a non-match on that line, but include context lines for matched line?

Say I have a file containing: ⟫ cat schema.rb create_table "things", id: :serial, force: :cascade do |t| t.string "other_column" # ... t.datetime "created_at" end create_table "...
2
votes
2answers
208 views

Are there any successful forks or refactors of the Linux Kernel?

A google search reveals this slashdot story yielding this github repository that hasn't had a commit since 2016. There are 22,602 forks listed on github.com but these are going to be mostly (if not ...
0
votes
1answer
34 views

Can chmod on a directory without --recursive change who can read a file within that directory? [duplicate]

Based on the suggested duplicate, let me reformulate my question: If chmod 0660 path/to/folder is run, and user A isn't in the relevant group, could user A still read /path/to/folder/file.txt if that ...
1
vote
1answer
248 views

Why is ddrescue slow when it could be faster on error free areas?

This question addresses the first pass of ddrescue on the device to be rescued. I had to rescue a 1.5TB hard disk. The command I used is: # ddrescue /dev/sdc1 my-part-img my-part-map When the ...
-5
votes
2answers
89 views

Signal the end of option arguments: double dashes `--` vs single dash `-`? [duplicate]

I notice in https://unix.stackexchange.com/a/459007/674, that single dash - is used to signal the end of option arguments. Is it correct that double dashes -- can also signal the end of option ...
1
vote
1answer
85 views

Is sort -k1,2 equivalent to sort -k1,1 -k2,2?

I'm experimenting with GNU sort and LC_COLLATE="en_US.UTF-8". I have a file called 'test': 1,0 1 10 2 1,0 3 10 4 With sort -k1,2 as well as with simple sort test the order doesn't change: $ sort -...
0
votes
0answers
21 views

Changing a partition size without affecting the booting

I have Kali linux installed with dd on a couple of drives, they all have live persistence enabled with one acting as LUKS encrypted one (sdb3) (the one I'm using) and the other one is without ...
0
votes
2answers
56 views

Split file into 4 chunks using macOS version of split package

In GNU/Linux in order to split file into 4 equal chunks we can do something like: split temp -n 4 PREFIX_ But seems like the macOS' BSD version of split utility doesn't have -n option. What would be ...
0
votes
0answers
18 views

Prepend or append to substrings while expanding associative array in GNU Bash

This question was partly inspired by http://mywiki.wooledge.org/BashFAQ/073 , although that page is currently about indexed arrays rather than associative arrays. GNU Bash provides a syntax that ...
4
votes
1answer
110 views

Safely define an environment variable

AFAICT, neither GNU Bash, nor any other relevant package (e.g. GNU coreutils) that is commonly available in GNU/Linux distros, has a ready-made way to define an environment variable such that the ...
2
votes
1answer
75 views

Where is “gcc_tooldir”

Under Cross-Compiler-Specific Options, it says: The default value, in case --with-sysroot is not given an argument, is ${gcc_tooldir}/sys-root. but it appears that gcc_tooldir is not defined. Is ...
4
votes
3answers
537 views

How can I partially serialize with GNU make

When I have a make task where a specific target needs to be made before another, while in parallel mode, this is simple when using SunPro Make (dmake). The following makefile: install: dir dir/file ...
1
vote
1answer
210 views

GNU Pattern Match and replace exact number of characters

This question may have been listed but I was not able to find one exact hit. I am trying to skim through a file, match a pattern and replace it with something else. However there are other ...
3
votes
0answers
74 views

Why BSD grep is not returning all the results, but GNU does? [duplicate]

Given the file with numbers from 1 to 100 (seq 1 100 > dataset.txt), and the pattern file with numbers from 1 to 20 (seq 1 20 > patterns.txt), I would like to to print all exact matches from ...
0
votes
0answers
39 views

Solar time in gcal (GNU calendar)

How to display solar time (real time, sundial time) in gcal? gcal has option -c which displays fixed date events from ~/.gcalrc where you can use % macros. There are several astronomical macros ...
0
votes
0answers
5k views

GNU Samba server: check SMB version of exported and mounted shares

I have a NAS Zyxel NAS326 running on Linux acting as Samba server. I can't exactly say which Linux distribution, this is all I get from "uname -a": root@nas326:~# uname -a Linux nas326 3.10.39 #1 Fri ...
0
votes
2answers
50 views

What's $(MAKE) or ${MAKE} actually supposed to mean in make scripting language

What's $(MAKE) or ${MAKE} actually performing in entire make building process. is it invoking a process which is similar to sub-routine i.e. in simplest terms 'call a function', or is it starting a ...
5
votes
1answer
180 views

Problem using xargs --max-args --replace with default delimiter

This works as expected: $ echo a b c | xargs --replace="{}" echo x "{}" y x a b c y This does too: $ echo a b c | xargs --max-args=1 echo x x a x b x c But this doesn't work as expected: $ echo a ...
1
vote
1answer
150 views

Are Unix's extended regex compatible?

Are Unix's tool regex fully compatible ? For instance, if I grep -oE "\$text *\( *([^)]) *\)", am I garanteed to replace the exact portion I got if I use sed -E "s/\$text *\( *([^)]) *\)/replacement/...
1
vote
1answer
63 views

Does the search tracking and Amazon information sharing attributed to Ubuntu part of Debian?

I understand from Richard Stallman in this video, made probably in 2012/2013, that Ubuntu isn't 100% free by the GNU organization definition of Free Software, as according to Stallman there, it "spies"...
0
votes
1answer
222 views

A strange problem when trying to install GNU MPFR

I'm trying to install GNU MPFR. I've downloaded the source, cd'd into it and typed ./configure, which goes through a load of checks (which are all okay, as far as I can see.) The problem occurs when ...
3
votes
1answer
383 views

How do I prevent gpg from including SHA1?

apt-get is complaining that signatures are invalid and that the InRelease file is not signed (see Using Centos to sign .deb packages for background). On the server, I have verified using gpg that ...
-3
votes
2answers
95 views

Is tty like a OS without DE?

Can I use tty to call Media Player and watch a video? Or run a browser in it? Since tty is just a virtual terminal.
1
vote
1answer
111 views

Freebsd 11.1 issues with gnu m4 eval test fail

I am pretty new Freebsd user. As I am trying to install gnu m4-1.4.18, I get eval fail on eval test section: Checking ./189.eval @ ../doc/m4.texi:6405: Origin of test ./189.eval: stdout mismatch --- ...
-1
votes
1answer
639 views

What does exactly does GNU make dep do?

I am trying to understand GNU Make and trying to understand some c code and GNU autotools. There's a folder let's say lib, with three subfolders and a makefile. lib ...libA ...---compile.sh ...---...
24
votes
1answer
2k views

Since when do the POSIX and GNU rm not delete /?

For several years now, the GNU rm utility won't delete / unless it is called with the --no-preserve-root option. However, the command rm -rf / has been lodged in the collective subconscious as ...
1
vote
0answers
31 views

macOS (BSD) vs GNU grep multiple pattern inconsistency [duplicate]

I am on macOS Sierra 10.12.6 $ grep --version grep (BSD grep) 2.5.1-FreeBSD $ ggrep --version ggrep (GNU grep) 3.1 Packaged by Homebrew Copyright (C) 2017 Free Software Foundation, Inc. License ...
4
votes
0answers
121 views

How can I add core GNU commands to a pre-existing AIX system?

In another thread (What's the easiest way to sort a list like this) someone asked if we had "GNU ls" on the system because it would provide a solution. We do NOT have GNU ls installed but it got ...
1
vote
1answer
93 views

bsdtar: How to avoid overwriting existing file info?

bsdtar has a -k (Do not overwrite existing files) option, which avoids changing the contents of any existing files, but it still overwrites the file info (e.g. permissions) with what is in the archive....