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.

Filter by
Sorted by
Tagged with
-1
votes
6answers
134 views

Sed delete empty lines after a particular line number [duplicate]

I am trying to delete all empty lines after line number 3, till the end of the file: cat ${File} 1 2 3 4 5 5 6 7 8 9 sed -e '3,${s~^$~~g}' ${File} 1 2 3 4 5 5 6 7 8 9 Observation: No ...
-1
votes
0answers
52 views

AWK :string not found to be printed if pattern doesn't match in file

When the file doesn't contain searched strings, my awk program should print "Not Found". Below is the code, error, and input file. Kindly help me in resolving this. code awk 'if match($0,/...
1
vote
1answer
69 views

What is %z useful for in GNU date?

I'm in the UK running these 2 commands (using gdate as I'm on a Mac with date (GNU coreutils) 8.32 installed): # A UK winter date, timezone in UK at this time is GMT = UTC $ gdate '--date=TZ="...
0
votes
1answer
76 views

POSIX alternative to GNU find's -print0

GNU find has a -print0 option to terminate filenames with null characters. However, this option is not available in POSIX find. In the GNU man page for find, under the -print flag, it says: If you ...
0
votes
1answer
55 views

How to grep on files less than a size and limit to extension [duplicate]

I want to recursively grep on all files in subdirectories with extension csv but select only those files that are less than 4M in size. Is this correct way to do? find . -type f -size -4M | grep --...
1
vote
1answer
36 views

Why does gnu `sort` ignore non-alpha charectars?

I was expecting @'s to be sorted together, but they interleaved with the non-@ versions. Does sort have an option for ASCII sorting? I didn't see something obvious in the man page. $ echo '@x > @...
1
vote
1answer
68 views

grep flag to NOT ignore case

I have a simple script to search patterns in my code sources, named prgrep #!/usr/bin/bash grep -irnI --exclude-dir={.git,obj} --exclude=tags --color=auto "$@" (The fact that it is a script ...
2
votes
2answers
279 views

Difference between GNU find -not and GNU find -prune -o -print

This answer on opening all files in vim except [condition]: https://unix.stackexchange.com/a/149356/98426 gives an answer similar to this: find . \( -name '.?*' -prune \) -o -type f -print (I adapted ...
0
votes
0answers
19 views

man -k . is not working in gnu/linux [duplicate]

I am using manjaro and when i try command man -k . or apropos . or man -k . -s 2 to see all man pages it's giving me error like .: nothing appropriate. is it man different because i gnu coreutils ? ...
1
vote
2answers
135 views

Guix System Problem with GNOME Boxes

To build a virtual machine with GNOME Boxes, I have this problem: "virtualization extensions are unavailable on your system. Check your bios settings to enable them." what's the solution?
0
votes
0answers
35 views

How do I remove the GNU GRUB screen?

I have a laptop with Win 10 and I had a spare external SSD, so I burned Ubuntu.iso into a USB-Drive and installed Ubuntu in my SSD. So far so good. When I have my SSD connected and power on my laptop ...
3
votes
1answer
84 views

Black screen in Guix System installation

I have this problem to install Guix System: After this, the screen turns black and nothing is displayed. I first downloaded the Guix System, extracted the iso with this command: "unxz" and ...
0
votes
3answers
34 views

Sort while neglecting regex pattern

I want to sort a list of url (1 url/line) in a file, such that if the url begins with www. or m., the sort is done assuming that, that part doesn't exists (or is irrelevant for sorting). Any ...
2
votes
2answers
145 views

sed: how to insert a newline into a regular expression?

I'm trying to format a text file. Right now it generally looks like this: s ApartCD Compact DiscCD-ROM Compact Disc-Read-Only MemoryCD-RW Compact Disc-RewritableCDFS Compact Disc File SystemCERT ...
0
votes
1answer
28 views

How to block IP Address using Firewalld after $N Times

I want to know how I could block IP Address using firewalld based on number of times ? For example: I've a running ssh and i want to set a rule if an ip address tried to connect to my ssh server and ...
0
votes
2answers
45 views

Cheatsheat of all standard utilities [closed]

On a fresh installation pressing double tab prints Display all X possibilities? (y or n). X seems to always be above 1000, on my Arch it's 3003. So the do one thing and do it well philosophy. But how ...
12
votes
2answers
477 views

Is it possible to save `bc` command line history?

bash has a handy file .bash_history in which it saves the history of commands and on the next execution of bash the history is populated with saved commands. Is it possible to save bc command history ...
2
votes
4answers
64 views

how many command invocations with find -exec command {} +

find manpage states: -exec command {} + This variant of the -exec action runs the specified command on the selected files, but the command line is built by appending each ...
-2
votes
2answers
173 views

The meaning of the \< and \> regex symbols in GNU grep

The following regex example is from pg 22 of "Mastering Regular Expressions". '\<([a-z]+) +\1\>' I'm a novice in regular expressions, but my impression, though the book does not make ...
0
votes
0answers
44 views

Executable does not work if run outside its folder

I have an already structured SDK folder where I have my project. Program works as expected if I do: cd /home/user/Documents/Camera/ProjectCamera/linux64/proj make cd /home/user/Documents/Camera/...
1
vote
2answers
31 views

Replace specific values with sed

I have a file containing hundreds of values that start with $. $ cat /tmp/file $one $t $three $one $t $three $t $three I'm trying to use sed to replace only the values that start with $t. $ sed &...
0
votes
0answers
158 views

Not works touchpad in Lenovo with Manjaro

I have the following problem. I installed Manjaro, updated it and everything works fine except the touchpad doesn't work. If I connect an external mouse, it works fine. I have Windows as a Dual Boot ...
5
votes
1answer
228 views

Why is `-r` seemingly ignored when used with `-0` in GNU xargs?

The regular case with linefeeds, xargs calls printf and something is printed: >>printf "foo\n" | xargs -r printf "->%s\n" ->foo >> With an empty input instead, -...
-1
votes
3answers
64 views

Is GNU make extension to shell?

GNU make and makefile syntax resemble Linux shell and bash, but is not the same. For example, usage of bracet is not the same as in shell or bash. Yet, many other commands from shell can be used AS-IS,...
1
vote
1answer
493 views

Fails at Fixing Unmet Dependencies

I am trying to set up samba on my pi, but it fails due to unmet dependencies and outputs this: pi@octopi:~ $ sudo apt-get install samba samba-common-bin Reading package lists... Done Building ...
0
votes
3answers
33 views

How to reboot with only few services?

Recently I did an experiment. First, I booted my computer normally and launched the game. Then I stopped gdm.service (I'm using GNOME), executed xinit command and launched game again. I didn't measure ...
7
votes
4answers
1k views

Measuring disk usage of specific file types per each directory (recursively, as a demo for 'du --include')

This is my working code, but I believe it's not optimized - there must be a way to complete the job much faster than this: find . -type f -iname '*.py' -printf '%h\0' | sort -z -u | xargs -r -0 -I{...
2
votes
1answer
22 views

How can I supply a numeric argument to a Readline function e.g. `glob-expand-word`?

How can I supply an argument to a Readline function, e.g. glob-expand-word that is bound to C-x * by default? In this case, I want to supply a numeric argument to make append an asterisk to the word ...
0
votes
0answers
72 views

Updatedb include the path pointed by symbolic link

I have created mlocate database with the contents of a particular folder. I see that the updatebd doesn't include the path pointed by the symbolic links in the database. How can I include the path ...
0
votes
0answers
49 views

linking .so file to newer GLIBC on SLES 11

I want to use the rocksdbjni.so on SLES 11 but I noticed that it is dependent to GLIBC_2.12: librocksdbjni.so: /lib64/libpthread.so.0: version `GLIBC_2.12' not found (required by librocksdb.so) The ...
-1
votes
1answer
256 views

gmake: *** [Makefile:228: ../game] Error 1

I am triying to compile on FreeBsd 12.1 .. and game and database source from Metin2 game . I am using gcc+6.5 and gnu gmake -j20 comand Like all the files are getting compiled but in the last ...
0
votes
0answers
28 views

Undefined reference to SDL functions in c for Conways Game of Life

I'm writing GameOfLife game in c with SDL2 but while compiling the files with CMake, it appears as an undefined reference to SDL functions: What can be the problem and how can I fix it? my ...
0
votes
0answers
182 views

macOSx / what is the kernel variable os_refcnt counting and what might be causing it to overflow?

Trying to figure out why running some software that I am developing causes my Mac to do a panic restart every 16 h or so always with an "os_refcnt" kernel variable overflow when running tcsh scripts. ...
0
votes
0answers
29 views

grep --null-data outputs wrong --byte-offset

grep (GNU grep) 3.4 (also tested 3.3) running on Debian bullseye/sid with Linux 5.5.17 Without --null-data: $ for I in {0..9}; do \ dd if=/dev/zero bs=1 count="9830${I}" of=sample status=none; \ ...
2
votes
2answers
367 views

How are shared libraries really versioned on Linux?

I am getting so much conflicting information about this, both on SE and other tutorials. Most people seem to think the so version is a semantic version. Then others correct them saying it must conform ...
0
votes
3answers
109 views

Use $1 from .sh in regex pattern in order to replace content in a file

I have been trying but without much success with capture a word between two words and Get Word Between two underscores among many many others... I want to find the newline before "##", this "##' is ...
1
vote
0answers
56 views

On MacOS, what character does `Esc+` or `+Esc` correspond to in Bash, when using iTerm2 terminal?

I've read that mapping Left Option key to Esc+ should fix many of the issues users of Bash, on MacOS, have with GNU Readline key-bindings. However, I've never encountered Esc+ or +Esc before, so does ...
0
votes
1answer
41 views

Problem with resizing partition in ubuntu

I have enlarged my partition with GNU Parted but when checking with df -h and (parted) print I see that the sizes are different. How can I make df -h reflect the actual size of the partition? Thank ...
1
vote
1answer
183 views

System boots into GRUB when no Ubuntu is present

I've installed Ubuntu on dualboot a few months ago but decided that today I'd uninstall it due to some problems. I foolishly just went into Windows and deleted the partition Ubuntu was in, then ...
3
votes
2answers
182 views

Why doesn't this sed command replace the 3rd-to-last “and”?

Update 5/26/2020 It seemed like this was a bug, so I filed a bug. Its ID is #41558. I was just messing around with sed and I came up with this exercise: to replace the 3rd-to-last occurrence of "and"...
0
votes
0answers
59 views

Is the macOS terminal app open source?

I was wondering the terminal app on macOS is open-source because they use Bash and other open-source software.
0
votes
0answers
26 views

Weird result when piping text into sed replacement [duplicate]

I make a network call (using curl), and filter the result (using grep) to get HTTP/1.1 200 OK. Then I want to transform it to a JSON hash (so I can use it in jq). I want this transform: HTTP/1.1 200 ...
0
votes
2answers
68 views

How to insert an entire command from history into the current command in Bash?

How to insert an entire command from history into the current command in Bash? I've done some research and identified two GNU Readline key-bindings that would insert the first and last words of the ...
4
votes
3answers
819 views

find: regular expression in name

suppose I write: find . -regex "[0-9]{4}-[0-9]{2}-[0-9]{2}-(foo|bar).csv.gz" -printf "%f\n" This command looks to me like it should work. I have iterated through the various regextype options and ...
2
votes
1answer
491 views

Makefile get list of targets

I use the following code to get a makefile targets list which works OK for most cases, however when you use makefile like this you get only two targets and not all. The another command doesn't show ...
0
votes
0answers
49 views

How to make a proxy shared library that replaces some symbols and forwards the original ones, without preloading it?

I'm developing a library that acts as a proxy for a system-provided library. My proxy replaces some functions from the system library with its own version of them, and others are simply wrapped to ...
-1
votes
1answer
29 views

Setting Debian and Windows [duplicate]

I have Debian. I want to run Windows on the same hard drive, but in separate partitions. I don't want to start my computer "DualBoot" (DualBoot is causing problems for the computer). what should I do? ...
-3
votes
1answer
47 views

Launch Debian and Windows

I have Debian. I want to run Windows on the same hard drive, but in separate partitions. I don't want to start my computer "DualBoot" (DualBoot is causing problems for the computer). what should I do? ...
0
votes
1answer
18 views

Is it possible to authenticate a Server by using its public Key in Client?

Our existing mechanism, for password less authentication in GNU/Linux, is to create the ssh-keygen in the client and copy the public key of client to server and the server can be authenticated from ...
23
votes
3answers
4k views

Why is cp's option not to overwrite files called --no-clobber?

cp is a massively popular Linux tool maintained by the coreutils team of the GNU foundation. By default, files with the same name will be overwritten, if the user wants to change this behaviour they ...

1
2 3 4 5
7