4
votes
2answers
7k views

tar compression without directory structure

Under my current directory, I have two sub-directories: dir_1/ - file1.png - file2.png ... - fileN.png dir_2/ - fileA.txt - ... - fileZ.txt When I tar compress the two ...
1
vote
1answer
167 views

Bash array declared in a function is not available outside the function

on bash (v4.3.11) terminal type this: function FUNCtst() { declare -A astr; astr=([a]="1k" [b]="2k" ); declare -p astr; };FUNCtst;declare -p astr (same thing below, just to be easier to read here) ...
2
votes
1answer
121 views

updatedb for a beginner

The updatedb command, as I understand it, is basically the utility that keeps the mlocate.db database file updated. And it's a good idea to keep it updated regularly. For that matter, I've kept a ...
2
votes
3answers
173 views

Append a column

I've trawled through here and a few other places to try and find an answer to this, but it seems so stupidly simple that no one has answered it. All I need to do is add a single value in a new column ...
1
vote
2answers
5k views

How can I add an external CD/DVD writer ?

I want to add an external CD/DVD writer to my Ubuntu 14.04 system (System 76 Ratel): the writers in my local electronics store have USB interfaces, and the drives are advertised as windows and mac ...
2
votes
4answers
428 views

Recover GUI window after minimizing in ratpoison

I'm running ratpoison. I was running emacs started through a keybinding (hence no xterm). Then I hit Ctrl-Z by mistake and emacs disappeared (emacs iconify-or-deiconify-frame). I know it is still ...
3
votes
2answers
2k views

Dell Laptop is overheating and shutting down

I recently updated from Linux Mint 16 to Linux Mint 17 on my Dell Inspiron 5420 with NVIDIA graphics card. After upgrading, the laptop is overheating seriously with temperature going above 90. ...
1
vote
2answers
111 views

Hardcoded /usr/bin/env in configure scripts

I'm building a Linux system that doesn't have a /usr directory. Getting the toolchain to work was surprisingly easy, but I'm hitting this irritation with a lot of auto* scripts: configure, etc. often ...
1
vote
2answers
159 views

Get command PID and send to another [duplicate]

I wanted to know if I can execute a command from the terminal and right after the command started I send its PID to another command to be monitored. I need to do something like this, dd if=/path/of/...
2
votes
2answers
846 views

How to print top five highest numbers from a column?

I have a text file with four columns. I need to read till end of file and print the highest number from column3 (top 5 values) along with column 1. input.txt xm|340034177|ref|RT_235820.1| 139697 ...
3
votes
2answers
15k views

MaxStartups and MaxSessions configurations parameter for ssh connections?

I am copying the files from machineB and machineC into machineA as I am running my below shell script on machineA. If the files is not there in machineB then it should be there in machineC for sure ...
11
votes
3answers
3k views

How can I substitute lsof inside a Docker (native, not LXC-based)

I'm somewhat baffled that inside a Docker container lsof -i doesn't yield any output. Example (all commands/output from inside the container): [1] root@ec016481cf5f:/# lsof -i [1] root@ec016481cf5f:/...
2
votes
0answers
113 views

Git and Puppet Master Lifecycle

I'm looking to setup a Puppet Master which hosts its configuration in a Git repository. I assume that I'd host my Puppet Configuration in a Git repository centrally organized on a Git hosting ...
14
votes
2answers
35k views

Why are some ports reported by nmap filtered and not the others?

I'm scanning a server which should have a pretty simple firewall using iptables: by default everything is DROPped besides RELATED and ESTABLISHED packets. The only type of NEW packets allowed are TCP ...
5
votes
1answer
4k views

ssh into an account which has no home directory

As a follow up to my previous question, I have decided to create the local user accounts as below. adduser --system --no-create-home USERNAME Now, I would like the local users to be able to access ...
4
votes
1answer
19k views

“sudo: sorry, you must have a tty to run sudo” when using sudo in a remote script

I want to run a series of sudo-elevated commands on a remote machine from an embedded script. To simplify the question, I'm just trying to run sudo id and get it to tell me that it's root. I am ...
7
votes
3answers
750 views

How to use shell to derive an IPv6 address from a MAC address?

We know that we can use the MAC address to create an interface identifier, e.g. for a link-local IPv6 address which should be unique in the Network. The image shows the way to do this: My ...
1
vote
1answer
222 views

backup user accounts without giving a home directory to them

I am reinstalling the older Ubuntu machines with the latest RHEL 6.0 in servers. I have /etc/passwd and /etc/group and /etc/shadow file backed up for the list of user accounts that I need to create ...
0
votes
1answer
164 views

gnome-session error on rhel (canberra-gtk-module error)

When starting cppeclipse in gnome-session via vnc it appears following error on rh6 canberra-gtk-module not found, module is present in /usr/lib/x64/ also fails when LD_LIBRARY_PATH=/usr/lib/x64/ is ...
22
votes
3answers
2k views

How can we know who's at the other end of a pseudo-terminal device?

If I do a: echo foo > /dev/pts/12 Some process will read that foo\n from its file descriptor to the master side. Is there a way to find out what that(those) process(es) is(are)? Or in other ...
1
vote
0answers
107 views

How do I assign the controlling terminal to other process?

I use TIOCSCTTY to forcibly take over the controlling terminal in other "remote" application. But after the application finishes running, controlling terminal gets orphaned and bash stops reacting to ...
2
votes
3answers
2k views

How to get a string between two special characters using Shell?

I want to get a string between two special characters. For example, /home/oracle/ggs/text.ext I want oracle/ggs in the above string. How can I do this using bash?
0
votes
0answers
142 views

Use FindBugs in Eclipse from terminal on Ubuntu

Is there any way I could use Findbugs from terminal to get all the bugs in my Java code and print it out to a text file? I want to write a script that goes through 100 java files ( this is already ...
-1
votes
3answers
200 views

AWK: Nested Conditional Subset of Rows without Headers [duplicate]

I have a pretty specific question, and have been able to find lots on conditional subsetting using awk but none that lends enough explicit code for me to generalize to my situation. I have a file '...
6
votes
1answer
3k views

What is type 'none' for mount points and why are mount points of the same type below /run?

In Ubuntu 14.04 when executing command mount I get following excerpt tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755) none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880) ...
11
votes
2answers
23k views

How to make a TCP socket time out

For network catastrophe simulations of our server environment, we are looking for a way to intentionally timeout a TCP socket. Are there any simple ways for existing sockets? Also, little C test-case ...
0
votes
2answers
79 views

Trim last chars from a line

I have a csv file and the lines have different length. But all of them ends with a number surrounded by a pair of braces. For example, ........{5} ........{16} I'd like to remove the number and the ...
65
votes
6answers
17k views

Why do we need to fork to create new processes?

In Unix whenever we want to create a new process, we fork the current process, creating a new child process which is exactly the same as the parent process; then we do an exec system call to replace ...
5
votes
2answers
1k views

How to switch directly to a pane in Tmux?

I'd like to switch directly to a pane in Tmux, by pane #. How can I do this? I know how to cycle between panes, and move to panes that are beside the current pane. I'd like to be able to run the ...
9
votes
5answers
4k views

bash script [ x$1 = x ]

I am reading bash script I do not understand what is going there. #!/bin/sh [ x$1 = x ] What is going on the second line and what [ x$1 = x ] mean?
4
votes
1answer
1k views

Compile pdf file from multiple images scanned in by scanimage --batch

Say I'm scanning in images of documents with something like: scanimage --mode Gray --resolution 300 -x 215 -y 280 --format=tiff \ --batch=document-p%d.tiff --batch-prompt (In the example I've ...
5
votes
2answers
6k views

How does grub2 load the kernel from an LVM volume?

Grub2 is able to load the kernel even if /boot is placed on an LVM volume. To use this feature one needs to add insmod lvm (the module can be on the grub bios partition that is not on an LVM volume) ...
1
vote
2answers
430 views

What live linux smaller 2GB and with pre-installed `wpa_supplicant` is suited best for Gentoo installation?

I have a mid-old laptop that I want to use for learning more details about Linux, so I decided for a first-time Gentoo installation. I can only connect via WLAN to internet with this laptop. My router ...
3
votes
1answer
208 views

Collapse line vertically so that every word is on a new line

Given a string like: "Hello World, how are you today?" Is there a way in Vim to collapse this line vertically such that every word appears on a new line, i.e.: "Hello World, how are ...
1
vote
1answer
443 views

MIT Shared Memory Extension or MIT-SHM over ssh

I successfully created a privileged lxc archlinux container on an archlinux host with lxc. I set up a static ip via dnsmasq and ssh into it and I use xauth to forward X11. I then call programs like ...
1
vote
1answer
182 views

Using a laptop as a bridge between Internet and LAN for SSH connections.

We have a lan and a server running HPUX that isn't connected to the Internet. I have a server and a laptop on the same network. When I plug in the laptop via ethernet cable, its Internet connection ...
24
votes
10answers
5k views

Run two commands on one argument (without scripting)

How can I perform two commands on one input, without typing that input twice? For example, the stat command tells a lot about a file, but doesn't indicate its file type: stat fileName The file ...
1
vote
1answer
2k views

How to install nvidia driver (gt 755m) on Fedora 20?

I am trying to install nvidia drivers for my Geforce GT755M on Fedora 20. I tried installing kmod, akmod and compiled from source. None of them seem to work. I always end up at a black screen. After ...
1
vote
2answers
1k views

Aix grep wildcard not working

I have a file called message that has the line CSC/UT/USA/WBIMB/SAP/orders05:orders05/ORDERS05/NONE/ORDRSP/758 I am doing a grep (Platform is AIX 6.1) grep CSC/UT/USA/WBIMB/SAP/orders05:orders05/...
2
votes
1answer
384 views

Is there are any documentation about user-defined menu in midnight-commander?

I'd like to create my own user-defined menu for mc (menu file). I see some lines like + t r & ! t t or + t t What does it mean?
0
votes
2answers
400 views

How can I grep for broken HTML tags?

I want to grep through all my HTML files and see if I have any bad tags there, example <br> , <hr> and so on, that is the I want to see what tags are not closed in the HTML file. for ...
4
votes
1answer
3k views

Why would alsa sound pop, crackle and be generally too distorted to listen to?

I've been having a weird issue with Alsa recently. For some reason all sounds are really distorted and no matter what application I use, I won't get anything clear out of it. I've tried Tomahawk, ...
1
vote
1answer
5k views

Which device to install the bootloader should I choose?

I have an Acer Aspire E1 with Windows 8.1 installed from factory. I need to install in dualboot the Linux Mint without formatting the computer and safely. I kept the UEFI and deactivated the ...
1
vote
1answer
4k views

Mint 17 boots to Welcome screen, but desktop is blank

I'm running Mint 17 Qiana MATE on a HP250 G laptop with 4GB of RAM and Intel on-board graphics. The host OS is Mint and Windows XP runs as guest using VirtualBox with 1GB RAM and 20GB reserved hard ...
1
vote
1answer
38 views

How can I start an application at start up as a different user?

I am trying to start an application in Linux at start up with a different user (like alpha). I want it to run it in the background and it has to be started with with parameters. One is a file system ...
3
votes
3answers
100 views

emacs: in terminal selected string gets lost on ctrl-k

I select an absolute file name with the mouse in a terminal I want to open this file in a running emacs: ctrl+x ctrl+f Emacs mini buffer: contains "~/...." I enter ctrl-a ctrl-k to delete "~/...." I ...
2
votes
1answer
3k views

Why beep does not work in Ubuntu?

I've tried the below shell, but nothing happened. #! /bin/sh beep -f 500 -l 700 beep -f 480 -l 400 beep -f 470 -l 250 beep -f 530 -l 300 -D 100 beep -f 500 -l 300 -D 100 beep -f 500 -l 300 ...
0
votes
1answer
495 views

PHPStorm Only runs on Gnome or KDE

Does anyone know why it is so? I was using unity... then i switched to LXDE and it wont run. I checked the requirements and it turned out that it requires either GNOME or KDE. So what exactly is it ...
4
votes
1answer
1k views

GNOME keyring manager and gnupg

I get this gpg: WARNING: The GNOME keyring manager hijacked the GnuPG agent. gpg: WARNING: GnuPG will not work proberly - please configure that tool to not interfere with the GnuPG system! when I ...
1
vote
3answers
103 views

end of line in linux and mac

I am analyzing a text file looking for a path that is written after a line that starts with "output". The line is something like output xyz/mypath/ and I want to extract xyz/mypath without the ...

15 30 50 per page