0
votes
0answers
4 views

Regex matching on awk in command line.

I'm trying to get the filename from unrar command verbose and deleting them all through command line. The unrar command output is similar to this: Extracting BucketSort.cpp ...
0
votes
2answers
10 views

sed + add comment to IP - only if IP is matched exactly

my target is to add "#" to the IP's with sed, But Only if IP is matched exactly!!! for example: sed 's/72.16.90.12/#72.16.90.12/g' /etc/hosts more /etc/hosts 72.16.90.121 host1 ...
0
votes
0answers
23 views

When does parameter expansion work and when does it not work? [duplicate]

When does parameter expansion work and when does it not work? Does the Bash's Manual mention this somewhere? I'd appreciate if you could help me to locate where it is mentioned there. This is an ...
0
votes
0answers
5 views

Can't install updated Ruby deb package: ruby1.9.1 conflicts with ruby

I have a .deb package containing a specific version of Ruby I'm trying to install using dpkg, but I'm getting the following error: $ sudo dpkg -i /tmp/chef-solo/ruby-2.1.2_amd64.deb dpkg: regarding ...
0
votes
0answers
12 views

Reading file using shell script, format of the line has changed

I am reading a file using the following code: displayLine(){ echo $line } filename="SampleFile" while read line do displayLine $line done < "$filename" The format of the file that I am ...
-1
votes
0answers
11 views

Do a bash script and `bash -c <command>` run in a subshell environment? [duplicate]

In Bash Manual Command substitution, commands grouped with parentheses, and asynchronous commands are invoked in a subshell environment that is a duplicate of the shell environment, except that ...
0
votes
0answers
27 views

cp doesn't work in a script but does from the command line

I have this script for automating a simple process where I scan a number into the command line, grep that number out of a catalog file which gives me a path, and then copy the DVD which the above ...
0
votes
4answers
27 views

Grep for a string and then echo a string back from a record

I have the following record: MiraServ.log.10:2016/02/07 15:25:13 3 All stations busy!! MiraServ.log.10:2016/02/07 15:25:13 1 TranHasError (3627,-2) ...
0
votes
0answers
6 views

How to bind image deleting to a key in feh?

I have a problem in feh. When I hit 'CTRL+DELETE' the file is not deleted. Nothing happens at all (according to the manual it should remove the file from disk and from the filelist). If I hit just ...
0
votes
1answer
10 views

Remove forced line breaks from fortune output while preserving them for the author line

Recently I encountered the great fortune command and use it now to send a nightly quote to a persistent chat. Now I wonder how to remove the forced line breaks for the quote part, but preserve them ...
0
votes
0answers
7 views

Location of interrupt vector table in Linux kernel v4.4

I'm trying to find where the vector table is set inside of the kernel, but I haven't had any luck locating it. I have a feeling it is located under arch and is one of the architecture dependent ...
0
votes
1answer
7 views

Vim color scheme not being applied

I'm trying to use this color scheme: https://github.com/Konstruktionist/vim/blob/master/colors/Kafka.vim Here is my ~/.vim/colors: xxx@xxx:~/.vim/colors$ ls -l total 16 -rw-rw-r-- 1 xxx xxx 15245 ...
1
vote
2answers
18 views

sed + update 4 different IP's in hosts file in one sed command

how to run the follwoing sed command in one command line? sed -i s'/12.1.0.11/#12.1.0.11/g' /etc/hosts sed -i s'/12.1.0.12/#12.1.0.12/g' /etc/hosts sed -i s'/12.1.0.21/#12.1.0.21/g' /etc/hosts ...
1
vote
2answers
93 views

Does a user have permissions to write outside /home/userDir?

Does a normal* user have permissions to write anywhere else than his own home dir? (no sudo and those privilege escalation tools) I say normal because I do not know more categories than root and ...
0
votes
1answer
25 views

get IP address who modified a file

I am looking a way to to get the history of a file, like the modification date, who modified this file (ip address or username), the changed lines Is there a way to get the IP address or username of ...
0
votes
0answers
7 views

RAPL PMU detected, API unit is 2^-32, 4 fixed counters 655360 ms ovfl timer

I compiled my own kernel (version 4.1.5) using the commands: #emerge --ask sys-kernel/genkernel #genkernel all And then I installed grub2 using these commands: #emerge --ask sys-boot/grub ...
0
votes
0answers
5 views

Only crackling instead of sound when using USB headset on Linux mint

I have installed Linux Mint 17.3 'Rosa' Cinnamon 64-bit on my PC but I also tried with Kubuntu 15.10. I have a Jabra GN2000 headset connected via a Jabra Link 280 that does not output sound but only ...
1
vote
1answer
29 views

Bash: Default variable with command substitution

Is there any way to accomplish the following in one stroke using Bash? my_var=${$(grep -E '^setting_1' /settings.conf):-default_setting1} As opposed to: my_var=$(grep -E '^setting_1' ...
0
votes
0answers
5 views

how to use debtags in conjuction with when a package arrived in the debian repository?

Is there a way to use debtags and search within a specific time-frame ? For instance/example, let's say I want to know which game packages came in since 2016 till date. Now AFAIK the debtag for ...
1
vote
0answers
6 views

Makikng Alt + h switch to the left pane in tmux

I'm trying to make Alt-h switch to the left pane in tmux. The following does not work: bind -n M-h select-pane -L Pressing Alt-h in cat generates the following in my terminal: $ cat ^[h That is, ...
0
votes
0answers
6 views

Is it a good idea to use zlogin's “safe” login mode to shutdown a zone?

This question refers to Solaris 10, which does not have a zoneadm option to cleanly shutdown a non-global zone. We have sometimes problems to shutdown non-global zones using zlogin init 5. While ...
0
votes
1answer
23 views

Is there a difference between init 0 and 5 in a non-global zone?

Does it make any difference if I shut down a non-global zone with init 0 or init 5? Should one of them be preferred?
1
vote
1answer
12 views

How to fix/setup routing from host to guest on VirtualBox?

I am using Debian stretch to run Debian jessie guest. I have the guest setup with a NAT and a Host-only adapter. When I try to ping my guest from my host, my ping gets routed to my wireless Internet ...
0
votes
0answers
7 views

RPC Authentication Error when mounting NFS

I'm trying to mount an NFS drive, but I am getting an RPC Authentication Error, with the reason given as that the credentials are too weak. On the server side (192.168.100.109), it looks like the NFS ...
1
vote
0answers
11 views

history shows only current session

This is what I see in my terminal in a fresh session: Agent pid 6847 Identity added: /home/eric/.ssh/id_rsa (/home/eric/.ssh/id_rsa) ➜ ~ history 1 history ➜ ~ I'm using Linux Mint 17.3 ...
1
vote
0answers
12 views

fsf and bfs showing different output

I am using mt utility to write a data on LTO 5,Data stored at sequentially on the tape and file will be identified by File 1, 2 ,3 I want to read the file 3 for that I am using fsf and bsf but I am ...
-1
votes
2answers
22 views

How to set properly a DNS for a specific IP?

After reading tutorials on the internet, I don't succeded to set a domain name to an IP adress in debian. here is my /etc/resolv.conf: but it doesn't works when for example I try : ssh ...
1
vote
0answers
5 views

wvdial and ppp connection drop out issues

I am using a serial port based 3G modem to connect to the internet on my system running on ubuntu 12.0.4 LTS. One issue that I am facing is that after some time (like 3-4 hrs of connection ...
6
votes
4answers
198 views

How to send output from one terminal to another without making any new pipe or file

I am just fooling around on my terminal (Gnome terminal). I was wondering is there a way to send output of one terminal to another without having to make a new file or pipe. for example: on first ...
0
votes
1answer
10 views

unable to detect newly added lun in rhel4

Unable to detect newly added lun in RHEL4 running with 2.6.9-103.ELsmp..Tried LIP protocol but that didn't helped echo "1" > /sys/class/fc_host/hostx/issue_lip Any help is appreaciated
0
votes
0answers
23 views

Sed command for performance improvement or tr command for the same

I have a command to replace the non printable characters and single quotes from a file but its taking more time to execute as I am replacing these characters for multiple files and the files size is ...
0
votes
1answer
15 views

Split a large file into unique files [duplicate]

I have huge file 100M, that has the text (few lines below,) stack of lines are unique scaffold1_, scaffold2_ and on. I would like to have a new file that is specific to each scaffold.1...txt tried ...
1
vote
0answers
25 views

Please explain “kobject”

Hey I'm new into Linux and just started reading Linux Kernel Architecture by Wolfgang Maurer. Right in the beginning of the book he makes a note and tries to explain what kobjects are and their ...
2
votes
1answer
23 views

Inside a bash script doing an ssh, automatically add the host only for certain known RSA keys

I have a Chron job running a bash script that then SSH's to a my server. But my server's IP address changes from time to time (my bash script has a way of finding looking up the new IP address). But ...
0
votes
0answers
7 views

How to engage with Fedora 23 error message in dnf install error of dnspython?

I am not sure whether this constitutes a bug - so, I dare to try it here... When attempting to install (with dnf) versions of the package python-dns, I get the following error: unpacking of ...
0
votes
1answer
17 views

Remove file name when recursively counting number of occurrences of a pattern

When I run my grep command: grep -rc 'PATTERN' . it prints out the number of lines that the pattern occurs, but it looks like this: ./hotel_232424.dat:234 and so on... How would I remove the ...
1
vote
1answer
21 views

Unsupported package installation, the Arch Way [on hold]

No AUR, no PKG. I want to install Bro, listed in Arch's "List of applications". But I can't find it in AUR, and it doesn't have a PKGBUILD file. To make, or to makepkg? It does however have a ...
-1
votes
1answer
36 views

How can I mount a disk without formatting it?

I have a disk filled with my precious data which was mounted in a machine. I want to mount this disk into another machine and read the data in it. It seems I have to set the disk partition and format ...
2
votes
1answer
10 views

BTRFS, RAID5 and the minimum number of drives required

It's been my understanding that in order to have a RAID5 setup, one would need to incorporate a minimum of three drives. Basically (and probably poor paraphrasing) two blocks of data and a block of ...
1
vote
2answers
42 views

How to replace multiple blank lines with a specific non-blank line?

The sample input is 1 2 3 4 5 6 7 8 9 The expected output is 1 2 3 --- 4 5 --- 6 7 8 --- 9
1
vote
0answers
4 views

Barebone Linux Bluetooth pairing

I have a small embedded ARM box, without any KVM, just a serial console, Net and a Bluetooth USB dongle. System is autocompiled using Buildroot framework and reasonably working. I can access the box ...
0
votes
0answers
22 views

How to execute a command after ssh login via batch file

I want to execute a set of commands at once I login to a ssh session everytime via a batch file. Eg: start putty.lnk -load "session" -ssh username -pw password -m <commands> Here I am using ...
1
vote
2answers
29 views

security issues from installing from source code as root

I had a question arise about being in root account when going through the steps to install from source as root user. I was told it presents security issues. Therefore only use root su and sudo for the ...
2
votes
0answers
22 views

How to fix file name encoding

I scrapped a site with wget. That site is in German and some of that pages had Ü,ü,Ö,ö,Ä,ä,ß in the URL. Now some files have a very weird name. For example one file is called ...
2
votes
1answer
12 views

How to dump the dmesg AKA Kernel logs to a single .txt file from the kernel boot?

I am trying to understand the SATA Host-Device Communication and for that I have put a lot of debug messages in the kernel driver code. Now messages are in such a huge amount that I am not able to see ...
0
votes
1answer
17 views

Update 'changing' variables every time PS1 is called, i.e. every new prompt

The reason I need to be able to do this, is to have 'updating' variables in my PS1. I'd like to have my prompt span across the entire width of the terminal, not wrapping around or going down to a new ...
-1
votes
0answers
26 views

bash shell scripting - How do I check the values stored in a variable? [on hold]

I ran the code below that returns the number of results as 14 which is correct. NUMBERRESULTS=$(curl -s "privateserver:3000/devices/restful_api_device/… jq '.[]|length') echo ...
0
votes
0answers
5 views

Archlinux Raid Setup

So I want to setup a raid setup with 2 drives but I want to have the possibility to upgrade along the line. I watched a video on Linus Tech Tips today and saw he used a Raid card with 2 SAS ...
0
votes
0answers
17 views

Linux equivalent of Powershell get-process to find ProductVersion

Is there a Linux equivalent to the powershell get-process -id 1234 | select * In Powershell I can do this and get a hold load of information about a process. The one I'm particularly interested in ...
0
votes
1answer
20 views

Delete swap partition and merge it with home partition

When I installed Arch linux I created a 24G swap partition. Now I want to delete it and merge it with home partition. How to do it? Device Start End Sectors Size Type /dev/sda1 ...

15 30 50 per page