Stack Exchange Network

Stack Exchange network consists of 175 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 [linux]

These questions are about Linux in general -- NOT specific to a particular distribution. If the question just happens to be in a Linux environment, please specify your Linux distribution in the body of your question, but do NOT use the /linux tag.

0
votes
1answer
8 views

make headers_install not working as expected

I have Ubuntu 16.04 LTS installed and have installed linux-headers. I am in the middle of trying to build uClibc and it needs the linux headers. So when I run the following command from the linux-...
-1
votes
1answer
11 views

What '\t' mean with 'tab' delimiter with 'cut' in BASH [duplicate]

in this command : cut -f2 -d$'\t' ('\t') what is it mean ? i saw it another question, i got the idea about 'tap' delimiter but still want to know '\t' shortcut or sign or command for something How ...
0
votes
0answers
8 views

Send Shift PgUp to the console

With a little help from an answer found here I was able to use below script to send keystrokes to the VGA console /dev/tty1 #!/usr/bin/perl use warnings; use strict; open( my $TTY1 , '>' , '/dev/...
5
votes
1answer
32 views

What are nvme namespaces? How do they work?

I've recently begun supporting Linux installed on devices with built-in nvme ssds. I noticed the device files had an extra number, beyond a number identifying the drive number and the partition number....
3
votes
0answers
16 views

Hybrid RAID (SDD+HDD) gives unexpected results

I am doing some experiments with hybrid RAID in Linux. My test consists of the following: 2x256GB SSD in RAID 0 (/dev/md1) 2x256GB HDD in RAID 0 (/dev/md2) Then I made md1 and md2 into a RAID 1 (/...
0
votes
1answer
28 views

Using tree with tar.gz file without extracting contents

I am wondering if it's possible to output the contents of a tar.gz file using tree without having to extract the contents of the file to a temp directory then using tree with that directory. I know ...
0
votes
2answers
31 views

Unix get last field

I am having a requirement where I need to extract couple of fields from a file with last field. structure of file can be different so cannot hardcode the last field. lets take example of two different ...
2
votes
0answers
29 views

Linux Memory Allocation

Why linux is not clearing Cache memory and assigning it to other process which are requesting ? I am getting out of memory error but could see lot of cache .
-2
votes
0answers
10 views

Http proxy - different ports forward to different hosts

I need to create a HTTP proxy to forward requests to 4 different sites. If a request goes to port A, forward to site AA.com (with the same URL and headers) If a request goes to port B, forward to site ...
0
votes
0answers
28 views

How to have Linux wait till my program finishes its SIGTERM action?

How to have Linux wait till my C++ program completes its cleanup routine. The program initially calls function sigaction(2) to register a custom SIGTERM handler. If test the handler by running kill -s ...
0
votes
1answer
29 views

Can't add a child process in the foreground process group

I am trying to add a child process in the foreground process group. After forking I am calling execve() to spawn a new process(In this case the unix echo program). Before calling execve() i am ...
0
votes
0answers
16 views

Unable to connect to docker services

I am on a Fedora 29, and I tried both with fedora upstream package (docker version 1.13.1-67) and with docker-ci repository (version 18.09.6), but the issue is still here. It does not matter if I am ...
0
votes
1answer
25 views

LVM + use the space of the OS in order to increase the partition

from the lsblk I have the following output NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT fd0 2:0 1 4K 0 disk sda 8:0 0 300G 0 disk ├─sda1 ...
0
votes
1answer
34 views

How to change file permission of shell files

I have a directory where a lot of bash scripts or .sh files exist. I want to change their permissions to 770 (rwxrwx---) with the chmod command. How can I accomplish that?
0
votes
0answers
8 views

htaccess: disable pdf caching - is it possible on hosted site?

I would like to know if I can make sure with .htaccess that I can send headers to browsers so that PDF files from that directory are not cached. I do understand what to send, but my question is - ...
-1
votes
2answers
67 views

How come my script won't function properly?

I am trying to use my ./script.sh like so: ./compile.sh -n NAME_ALBUM -f 000 000 000 000 -l 000 000 000 000 where -n is ALBUM_NAME and corresponds to the outputted filename being saved where -...
0
votes
0answers
7 views

Cursor not moving/Touchpad not responding

Recently my touchpad hasn't been working. I tried running the following commands and they fixed the problem but only temporarily: sudo modprobe -r psmouse sudo modprobe psmouse proto=imps sudo apt ...
1
vote
0answers
39 views

82MB of “reserved memory” on 512MB system

I reinstalled a fresh debian 10 on an old x86 system with 512MB RAM (everything works ok). Available memory is 431MB. (No graphic card plugged right now) I don't think that that much memory was "...
0
votes
1answer
18 views

Pivot file values

I have a file where the first column is the key. The rows can have up to 2800 delimiters. I need to pivot the data from rows to columns. Below is the sample input and required output. Source File ...
1
vote
1answer
35 views

Grep: Find 3 consecutive char and then follow another char or end of the line

I want to find 3 consecutive characters and then another character or the end of the line. I tried this: egrep '(.)\1{2}' file but I need less results.
0
votes
0answers
15 views

Gnome-keyring: “Automatically unlock this key whenever I'm logged in”

I don't seem to have the option to "automatically unlock this key whenever I'm logged in" when trying to SSH into another computer. This is a screenshot of my prompt: This is an example I found on ...
0
votes
0answers
19 views

How does linux arbitrate access to devices

I would like to know the different methods linux uses to control access to a peripheral device. e.g. for example you have a spi temperature sensor. And multiple threads are trying to get a reading. ...
-1
votes
2answers
36 views

Specifying the range of the arguments to print in every record line

We have a sample data as below EMP_ID|EMP_NAME|AGE|SALARAy|DepId|DepName 123456|XXXXXXXXX|30|10000000|1234|XYZWE I have used below code to split the data as below awk -F\| ' BEGIN { print "EMP_ID|...
0
votes
0answers
29 views

How to run script via cron and get same results as terminal? (Centos 7.2)

I have a complicated question (I understood that's related to environment variables). I'm running a script via termial as follows: "bash install_version.sh" script contains: #!/bin/bash /root/...
0
votes
1answer
40 views

convert string with hidden characters to normal string

is there anyone has an idea about how to remove hidden characters from a string in shell. this is an exemple : #echo $a; [root@localhost ~]# but when i showw hidden characters : #echo $a | cat -v [...
1
vote
1answer
31 views

how to print column names as well while reading the values for that variable

I have below sample data EMP_ID|EMP_NAME|AGE|SALARAy 123456|XXXXXXXXX|30|10000000 Is there a way I can split the record into multiple records and also get header. Example output should be like ...
0
votes
2answers
28 views

Filesystem show up in `/etc/fstab`, but not using `df -a`?

I don't understand why the following filesystem shows up in /etc/fstab, but not using df -a: /dev/sdb1 /var/log/apache_logs reiserfs user,noauto,rw,exec,suid,user_xattr 0 2 ...
1
vote
2answers
27 views

How to Preserve last most directory structure when copying files using find

Using "parents" command works but it copies complete directory structure, whereas I need to preseve only the last most directory find /tmp/data/ -type f -name "*.txt" -exec cp --parents {} /u01/ABC/ \...
-1
votes
0answers
22 views

CVE mitigation with LSM: Quantitative results?

I'm currently trying to show that Linux Security Modules (LSM) can improve Linux’s security level. Beyond the theoretical aspect, I’d like to motivate my study showing that LSM mitigates some existing ...
0
votes
0answers
6 views

Getting info about particular cgroup

my process is attached to a cgroup /user.slice/lim.scope. How to know how does that cgroup limits my process?
0
votes
1answer
36 views

Get all characters between two double quotes [on hold]

I need to implement the shell script which should return all type of characters between first and last occurrence of double quotes in a variable. Eg: String="The \"hz:"jnz::\\\gb""+₹+_)*s\"hdhz\"...
0
votes
0answers
5 views

Puppy Linux can't start in computer with VIA-based video

My computer, which has a S3 Unichrome video chipset integrated, has problems booting into Tahr Puppy, as it crashes before prompt, as soon as it changes resolution. When acpi=off pfix=nox is used, it ...
0
votes
1answer
20 views

Ubuntu - Can't execute binaries unless they reside in /var/lib/php/session/

I noticed this weird issue in a Ubuntu 18.04 (Bionic Beaver) box and a couple of other Debian-based systems -- I will take statically linked netcat binary (a unix networking tool) for the sake of ...
0
votes
0answers
18 views

BTRFS unknown space usage

I have 1 TB hard drive with btrfs on it used for /home. When moving to new ubuntu (with fresh install), I've moved my @home subvolume to @home-old, installed and configured system, copied needed files ...
1
vote
0answers
29 views

How to deal efficiently with “Address already in use”?

If I attempt to run my own Python program which listens on a particular port, I may get: socket.error: [Errno 98] Address already in use If the program didn't terminate gracefully. While this may ...
0
votes
0answers
15 views

Creating Iptables rules for router in front of several servers

I'm trying to create a test environment for some software I've written and I'm running into issues with creating the right iptable rules. I have a router that the rules are being written too, and I ...
0
votes
1answer
12 views

Remote screen session

This is running me crazy: I want to use 4 screen windows (within the same session) in a remote server (GCloud) to process 4 subjects in a parallel way. Long story short: I first create a detached ...
-1
votes
1answer
37 views

Packet loss on linux but NOT in a vm running on the same machine!

Something seems to be very wrong with my network stack right now. Not sure where to start debugging. I have Ubuntu 18.10 running a windows 10 VM with QEMU/KVM. The network is bridged together so both ...
1
vote
0answers
39 views

3 IP on one ethernet that not exist!

when i run "ip -d addr" show 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 promiscuity 0 inet 127.0.0.1/8 scope host ...
0
votes
1answer
21 views

could not insert 'ip_tables': Operation not permitted

I used the Ubuntu 16.04 system and had problems configuring iptables. How to solve this problem? modprobe: ERROR: could not insert 'ip_tables': Operation not permitted iptables v1.6.0: can't ...
-2
votes
1answer
22 views

Find package (OS distribution) manager for automation [on hold]

I want to automate some installation process. For that, I need to know whether it is a DEB or RPM distribution, Im able to find some scripts for find the OS distribution. I need to write a script to ...
0
votes
0answers
22 views

Use of Ctrl key on Linux via remote access [on hold]

I'm trying to access a Linux 64-bit computer via remote access from my Windows 10 computer. I'm unable to use the Ctrl key on Linux via remote access connection. I use Bomgar for remote access. It ...
-2
votes
0answers
18 views

Create an image of a filesystem's “available” space [on hold]

I want to create a disk image which contains the content of all available space on a filesystem. The hope is to be able to recover deleted files from a large filesystem. Is this possible?
2
votes
1answer
40 views

Repair possible file system corruption in virtual Linux guest OS (Virtualbox)

Background My power went out during some rain recently while I was away from home. When I got back the power was still out and when it came back on, my system seems to have suffered some issues. ...
0
votes
0answers
94 views

Weird behavior of su command

Everytime I run su command on this box, I constantly see the weird messages below. Switching user do eventually continue, but why are these messages showing? <Server>:~ # su - -bash: eval: line ...
0
votes
0answers
41 views

Install private git server on Docker container

I have been trying to install a Git server on a debian Docker container on a virtual machine. I followed a few tutorials about doing it on Linux distributions. Everything is fine until I'm trying to ...
0
votes
0answers
10 views

Could I deal with physical network layer via non-root application without writing networkcard driver? [on hold]

Could I get fast access to physical network layer using GAS or GCC made program running from shell? Are there possibilities to do it without own drivers creation?
1
vote
1answer
36 views

How pressing tab twice listing directories and files

I'm wondering how pressing tab twice is resulting in listening all the files and directories in Linux. I'm specifically interested in where this function is defined.
1
vote
2answers
15 views

Set the password for the first build of openwrt

I want to build an openwrt source and set everything up through the menuconfig section But there are no settings to set the password Which part should I change or which section should I add? I am ...
0
votes
0answers
8 views

Install MX Linux on top Xubuntu and dual boot

How to install MX Linux on top Xubuntu and dual boot Windows 10? $ sudo fdisk -l Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 1126399 1124352 549M 7 ...