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
0answers
24 views

bash -c history produces no output [duplicate]

I am trying to parse and edit the output of the bash builtin command "history" in a language such as C++ or Python. The minimal Python 3.5 program I've tried #!/usr/bin/env python3 import ...
1
vote
1answer
18 views

USB : disable and reenable device on linux

I have an USB device that sometimes hangs. Since it is really a pain to unplug/plug it (cables under desk, behind things...), is there a way to virtually unplug/plug the device ? For example by ...
3
votes
1answer
1k views

Possible effects of slurmstepd: error: Exceeded step memory limit at some point?

I have a question for those of you familiar with the scheduler Slurm. Sometimes I get the following error message slurmstepd: error: Exceeded step memory limit at some point. I know it means the ...
0
votes
0answers
22 views

Is there an ssh audit script that's updated?

Is there any useful updated version of the ssh-audit python script (https://github.com/arthepsy/ssh-audit)? There are many forks and there's loads of articles, which all point to the original article....
0
votes
0answers
20 views

xfce on cygwin X not working!

Good evening, I have a big problem, I'm fighting desperately with my PC to launch a session but it spits and my CPU goes up to 100% When I click on exit, the software tells me that I have 13 ...
-2
votes
0answers
21 views

Directory's Data Usage in Ubuntu [closed]

Directory's disk usage list For indicated directory print a list of files and subdirectories in descending order according to their total disk usage. Disk usage of a simple file is equivalent to its ...
4
votes
1answer
57 views

How to set shell to wrap words for long commands?

I connect to a Slackware server. When a command is longer than the size of the putty window, the line continues in the same line, and the start of the command disappears as I continue adding to the ...
1
vote
3answers
77 views

Create archive (tar.gz, …) from file given via stdin

I would like to automatically create a compressed archive from a file given via stdin (or create the archive, if it doesn't exist yet), while specifying the file name that it's going to have inside ...
0
votes
1answer
22 views

Why is my min_free_kbytes larger than the documented calculation (and larger than the documented maximum)?

My machine has roughly 8GB of RAM. Why is min_free_kbytes set to 67584? The kernel code comment says I should expect to see min_free_kbytes set to around 11584. It also says the largest it would ...
0
votes
0answers
15 views

Get thread id by thread name

When I type ps -A -T I can see all threads, and threads name. Is there any way how to get thread id by thread name? When I want to get process name by process name I can use echo $(pidof XXX) , with ...
0
votes
1answer
57 views

How to disable messages from syslogd for my own user?

I am using a Centos Linux OS with ssh tools. I get these messages every minute. Message from syslogd@rakhsh4 at May 6 17:48:34 ... kernel:[Hardware Error]: Corrected error, no action required. ...
26
votes
6answers
14k views

Check ping statistics without stopping

Is there a way to tell ping to show its usual termination statistics without stopping the execution? For instance, I'd like to quickly view: --- 8.8.8.8 ping statistics --- 2410 packets transmitted, ...
1
vote
2answers
27 views

Create file with content, where the content has new line

In linux, how to create a file with content whose single line with \n (or any line separator) is translated into multi-line. fileA.txt: trans_fileA::abcd\ndfghc\n091873\nhhjj trans_fileB::a11d\n11hc\...
0
votes
1answer
33 views

Switch between DHCP server and client on eth0

I am working with a arm micro-controller. Currently the controller is configured as a dhcp client on eth0 (ethernet jack) and as a dhcp server on eth1. I want to configure it to also serve dhcp on ...
0
votes
1answer
16 views

Creating simple WLAN [closed]

I want to create simple Iperf over WiFi test center using two devices (two Ubuntu16.04) For that I did the following device1(aka AP): running command --> sudo create_ap -n WifiInterface factory-...
0
votes
0answers
13 views

How to merge using xsltproc

My question is related to xsltproc. I've two files - one xml and one xsl. My target is to merge between them by using xsltproc command and put the output inside other xml file (shalev.xml). The ...
-1
votes
1answer
30 views

How to make file_get_contents() working?

I am trying to use a basic example from https://www.geeksforgeeks.org/php-file_get_contents-function/ e.g. the following code: <?php // reading contents from the // geeksforgeeks homepage $...
0
votes
0answers
10 views

Which Linux proxy wrapper is based on system policy but not hook?

I have used a CLI tool that using policy to force Linux scripts to use a socks proxy. However, I forget its name. (By force I mean not using environment var. like SOCKS_PROXY.) The tool I remembered ...
0
votes
1answer
1k views

Kernel Panic on CentOS - Google Compute Engine Instance

I'm getting a kernel panic error in a CentOS instance of Google Compute Engine. I'm able to see the error and already figure out how to solve it, but I can't get into the GRUB menu trough the serial ...
0
votes
2answers
28 views

Returning wrong results in perl script [duplicate]

I am running this command on linux shell it works smoothly sed -i 's/\[-.*-]//g' error .txt What it does is it removes patterns like [-any text-] along with the brackets and - sign. but when I try ...
0
votes
0answers
6 views

centos6.5 show `addrconf link is not ready`

My host is centos6.5, and today I found there were 2 network card did not work.the /var/loh/message show the blow information 4 times one minute. kernel: bnx2x 0000:05:00.0: p6p1: using MSI-X ...
0
votes
0answers
15 views

Kernel driver serving multiple virtual file readers

There is a kernel driver that collects data from some external hardware and passes all data to a virtual file if a reader reads this file. Data blocks are appended to a list with the assumption the ...
0
votes
1answer
36 views

Background process killed after terminal closes

I have a pubsub python script. When I run the receiver script and send to the background using nohup and &, and close the ssh session, the process is killed. Is there any way to run receiver all ...
-4
votes
4answers
88 views

Linux Shell: Extract values separated by pipes from a file

I have the following values in a file: line 1: 31915 line 2: Salchipapa|papa|salchicha|aceite|queso I need to get the values papa, salchicha, aceite, queso that means that i have to get the values ...
1
vote
1answer
67 views

Reading filesystem type at boot into BASH variable

I have a /etc/rc.d/S11 link to a /etc/init.d file that is trying to set a bash variable of the file system type of a given blkid entry. root@OpenWrt:/# blkid /dev/mmcblk1p3 /dev/mmcblk1p3: UUID="...
0
votes
0answers
6 views

Batch set MP4 create date metadata from filename

On a Linux system, I have a bunch of MP4 files named like 20190228_155905.mp4 but with no metadata. I've previously had a similar problem with some jpg's which I solved manually with exiv2 -M"set ...
0
votes
0answers
19 views

Is it possible to configure eth0 to be server and client [closed]

Can I configure eth0 (ethernet jack) to be a dhcp server or client whenever I want? If so how do I go about doing that? Any ideas are appreciated. Thanks
0
votes
1answer
920 views

How to Install or Upgrade to Kernel 4.19 in CentOS 6

# lsb_release -a LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch Distributor ID: CentOS ...
3
votes
1answer
2k views

Wrong inode: corrupted f2fs, fsck.f2fs cannot repair

A f2fs partition on my Android phone has recently become corrupted. It will still mount fine; however, I completely lost access to one directory (/data/media/0), which now shows as empty. Yet the disk ...
0
votes
0answers
25 views

Switch GPU from Intel to Nvidia

I try to switch my used graphic card, but I can't. I'm using Linux Mint 19.1 I have the recommended driver. The NVIDIA Prime is enabled. BUT my NVIDIA X Server Settings looks like this. Someone can ...
0
votes
1answer
1k views

Force linker to find stdc++ library in non-standard directory

I've read a lot of guidance that says the LD_LIBRARY_PATH is searched before anything else, but one of my .so libraries is linking with libtdc++.so.6 in /usr/lib64. ldd mylib.so: ... libstdc++.so.6 =&...
3
votes
1answer
2k views

DNSMasq - Different Responses for Specific MAC Addresses

Anyone know of a way for me to setup a separate host file, or send different responses, from DNSMasq to specific PCs on my network? Specifically, if I wanted to block youtube, or facebook, or etc. ...
1
vote
0answers
18 views

Unusually slow response from apps [closed]

I'm on linux ubuntu 18.04 and all of a sudden some of my applications such as IDE, video player etc, are freezing up. I have no idea why everything has gotten so laggy. Is there any way to confirm if ...
1
vote
2answers
68 views

Low disk space on “Filesystem root” 0 bytes disk remaining

I am struggling against disk space, regarding root location. Seems like I have reach 100% usage, and cannot find a way to regain space. I have used apg-get autoremove, apt-get clean, removed old ...
2
votes
0answers
16 views

How to have synchronized samba passwords with local linux accounts where linux account are the leading system/authority?

How to have synchronized samba passwords with local Linux accounts where Linux accounts are the leading system/authority? This seems to be a surprisingly complex request/requirement. Since I already ...
1
vote
0answers
21 views

What is the difference between mode0 and mode2 in network bonding ? Why can mode0 not be added to a bridge?

I am very confused about the difference between mode0 and mode2 in network bonding. Why does mode0 conflict with bridge?
1
vote
2answers
135 views

Remove duplicates in a file [closed]

I have the following file.txt Plummet Cherist the day -- The Transatlatins <-----------duplicate Mysteriosa <-----------duplicate -- Angel City;Lara McAllen ...
0
votes
1answer
83 views

Bash script exercise in Windows environment

I have this exercise Write a script which creates files File.txt numer.txt the first contains the list of script arguments, separated by newline, the second contains your UID, ...
0
votes
0answers
6 views

how get chat command REPORT file

I want to report a file from the chat command This is possible, and in some of the explanations say about this feature of this command : -r Set the file for output of the report strings. If you ...
0
votes
1answer
1k views

Nagios Core Acknowledgement notification (email)

Nagios Core 3.X on RHEL. I want to know how to send an email to the relevant contact group when someone Acks an alert.
0
votes
0answers
32 views

Sustrip <file.su> file.bin

I have downloaded fdelmodc package from https://github.com/JanThorbecke/OpenSource/tree/master/fdelmodc and installed it on Virtual box and Ubuntu desktop 18 and I downloaded and installed seismic ...
1
vote
2answers
2k views

SIGINT handler runs only once

I'm learning about signals and async-signal-unsafe functions. In particular, I learnt that printf is async-signal-unsafe and can cause a deadlock when called from the main program thread and from a ...
1
vote
0answers
28 views

tor fails in systemd, will start in foreground

I am trying to get tor running on a Pi Zero using systemd (start at boot). Tor will start as a foreground #/bin/tor Jun 16 00:53:57.920 [notice] Tor 0.4.0.5 running on Linux with Libevent 2.0.21-...
2
votes
1answer
1k views

How do you route to secondary interface on the same physical port?

INTERNET<->(wan)BRIDGED_DEVICE(lan)<->ETH_ROUTER<->LAN Problem: Need to access web server on BRIDGED_DEVICE's LAN from INTERNET via ROUTER (BRIDGED_DEVICE web server cannot be accessed form ...
0
votes
1answer
2k views

Debugging an unresponsive touchpad on Lenovo Ideapad 320-15ABR

I have a Lenovo Ideapad 320-15ABR, (I found the exact model name with dmidecode). I'm having trouble getting the touchpad to work. It's not showing up in xinput --list or cat /proc/bus/input/devices. ...
0
votes
0answers
41 views

PDF is printing as random ASCII characters

When I open a PDF file online and try to print it, I get random ASCII characters instead of normal text. If I save it to my computer, I can then open it and print normally. Adobe doesn't have an ...
1
vote
0answers
33 views

What is difference between `` and $() for command-substitution in bash scripting? [duplicate]

I'm new to Linux and StackExchange. My English is pretty bad, and I'm sorry for mistakes. What is the differences between `` and $()? Does it matter what to use and when? I'll be grateful for ...
7
votes
3answers
456 views

How does the Linux command “mount -a” work?

After adding a new mount point in /etc/fstab, we usually execute mount -a to reflect the change (if we want to bypass reboot), and df -kh output shows the new mount point. How does mount -a work/...
-2
votes
2answers
47 views

How can I Print output lines of this script uniqely and for every line print how many times is it repeated [closed]

#!/bin/bash who |grep "10\.1\.109" | grep -v berianho | cut -f1 -d " " | sort -n| while read user do grep -a ^$user: /etc/passwd | cut -f5 -d: done
0
votes
0answers
13 views

suddenly wifi internet disconnection [duplicate]

I have sometimes internet disconnection from my wifi connection to my home wifi modem. I have one Linux LMDE OS into my Lenovo IdeaPad 310 laptop, so in regular times I have this: so@notebook:~$ ...