1
vote
2answers
40 views

Backup server users creation

I have a RHEL server which acts as the web server for all the users (around 1000 users). Now, I have a backup script which backs up the data (all data inside /home folder) into an external HDD. This ...
4
votes
1answer
3k views

Accounting for /proc/net/dev reported traffic

I noticed that according to /proc/net/dev I am constantly receiving around 6Kb/s on my wireless usb interface. But I can't account for anything even close to that with the individual connections that ...
1
vote
4answers
437 views

How many lines of code are in this file?

I'm trying to figure out how many lines of code I have for files that end in *.pp find . -name *.pp -type f | wc -l 39 I know that I have 39 files, how can I figure out how many lines of code ...
2
votes
4answers
1k views

Add multiple subdirectories under the same parent directory to PATH

I have installed some tools and put it under $HOME/tools/ and each tool has its own /bin directory that contains the executable program. I now have the path to each individual /bin in my $HOME/.bashrc ...
1
vote
2answers
563 views

Adding useraccount as root using “usermod -G root useraccount”?

I'm on CentOS. I try to add an useraccount as root using "usermod -G root useraccount". But this does not seem to work. Any way to fix this without having to use visudo?
3
votes
1answer
155 views

How do I see what logical volumes are on a physical volume?

I have a volume group composed of dissimilar drives - an HDD and an SSD. I'd like certain LVs to live on the SSD. I can suggest this to lvcreate when creating new LVs, and I can move things around ...
0
votes
1answer
148 views

Need to grep for specific lines from ongoing log and save it in some file

So, let me start with the overall outcome that i want to achieve. There is just one log, which will have info on certain devices, that i am upgrading. I use "tailf log" to monitor the log. Now, say,...
1
vote
0answers
427 views

Pentesting from a virtual machine, hiding the host

I want to install Kali Linux as a virtual machine in VirtualBox for pentesting wireless routers and network hosts. I want to hide my host OS, which is Windows 8, so that other machines see my computer ...
1
vote
1answer
30 views

Giving OVZ containers their own IP

Is it possible to give an OVZ container its own external IPv4 address? Say I hire a dedicated server and purchase extra IP addresses. Can I assign those extra IPs to the containers? If so how would ...
5
votes
2answers
1k views

Why isn't sed using the extended regex mode by default?

I am using sed. I was using a regex that was correct as far as I could see but sed did not do anything. Turns out that I was using \s+ which sed can not understand (?) and when I switched to [ ]+ it ...
1
vote
2answers
162 views

How can I substitute one command for another temporarily?

I'd like to alias sed to gsed, but only while a particular script is running. I have a script that invokes sed. On the Mac, BSD sed doesn't support the required features, but I don't want to replace ...
3
votes
2answers
868 views

Bad Substition how to force /bin/bash as a shell?

I have a script that is getting run by a third party environment which is running the script with "/bin/sh". Is there a way from within the script that I can force bash to be used instead, for ...
0
votes
1answer
612 views

Is the crunchbang openbox autostart script simply a bash script

Is the crunchbang openbox autostart script simply a bash script, thus concluding I can put anything bashy in there?? And when is the script executed (e.g. login after rc.local)? System: Crunchbang ...
2
votes
1answer
458 views

pcregrep fails due to segmentation fault

I am extracting the HTML source of a web page using the below command. curl http://www.linkedin.com/pub/ramesh-venkataraman/63/621/b42 -s | w3m -dump -T text/html > foo.txt The foo.txt has the ...
2
votes
0answers
301 views

tcpdump hello server certificate

On a device located between my local network and a router, (all the traffic pass through) I need to read the common name from Hello Server Certificate packet. So I'm trying to figure out how to get ...
1
vote
1answer
645 views

Can Not Install JStock on Ubuntu (zorin 7)

Trying to install Jstock on a Linux Ubuntu Box. As a new user trying to install this product. I have received this error after following instruction - on to a Ubuntu (Zorin7) system. Instructions ...
5
votes
2answers
31k views

How to specify username and password in ftp command?

I want to automate a call to ftp in a shell script. If I type $ftp somehost.domain.com I am prompted for a username and password. I want to give that username and password as part of the call to ...
1
vote
1answer
1k views

Sed: search and replace a patten with special characters which has a arbitrary string in between

I have a load of nfo files which I want to make some global substitutions for some values within each file e.g. a.nfo has the value <set>Tonight&apos;s Menu ( June 2012 )</set> ...
1
vote
2answers
356 views

Run shell script based on IPTABLES port access attempt

Is there a way in Linux (RHEL 5-6) using IPTABLES, that if someone tried to access port 21, as an FTP user, to log what the user name they are trying to authenticate as and additionally run a shell ...
0
votes
2answers
159 views

Increment Daily Config Value

I have a configuration file that contains a lookback value, which I need to increment by +1 each day. IE: 60, 61, 62 etc.... It doesn't look like awk will work because of the formatting of the ...
5
votes
2answers
2k views

Can VirtualBox run under Xen Dom0?

I'd like to turn my Linux Mint desktop into Xen host. Will I be able to use VirtualBox inside Dom0, just like without Xen? What the limitations would be (if any)? I believe, that this might not be ...
4
votes
4answers
20k views

extract only the substring after double quotes - grep

I have a file which is as below. <a href="http://firstlink.com" title="title1"> <a href="http://secondlink.com" title="title2"> <a href="http://thirdlink.com" title="title3"> <a ...
2
votes
3answers
2k views

obsoleted package breaks yum install of older JBoss

I need to install an older version of JBoss. 6.1.0 EAP is what has been approved and supported for my application. So when I try to force install the correct version of the jbossas packages the ...
4
votes
0answers
699 views

graph TCP connection performance based on `ss -i`

A nearby question has brought to my attention the ss utility on Linux, another utility to investigate sockets. It would appear that it may be a great tool to monitor the performance of, say, an ssh ...
0
votes
1answer
859 views

xe sr-create type=ext results in backend failure

I'm trying to create an ext based storage repository: xe sr-create content-type="local SR" \ host-uuid=c7030a1f-15e3-7e7d-2932-b30200a15917 type=ext \ device-config-device=/dev/sdb1 \ shared=...
1
vote
1answer
116 views

Resize Disk on Linux

df Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/vg_cloud-lv_root 51606140 9985252 38999448 21% / tmpfs 515252 0 ...
1
vote
1answer
886 views

service killed at ssh hangup [duplicate]

If I use ssh to run some command in background, that command gets killed as soon an ssh hangs up: ssh localhost -t "bash -c '(for i in 1 2 3 4 5; do sleep \$i;done)&'"; ps x|grep sleep This ...
6
votes
3answers
2k views

adding an empty first line inside csv file

I input data into a csv by 'echo'-ing some values into another csv. I tried echo "" and in the next line echo "values" but i get intermittent empty lines.. I need empty line only at the start....
4
votes
3answers
7k views

Can logging be enabled in FirewallD

I'm running Fedora 20 and would like to see what my firewall is doing in the background. Is it possible to view a log of the traffic blocked by FirewallD?
3
votes
1answer
268 views

What does the search flag 'z' do in VIM?

I was looking for a way to show a bit of context around my searches when doing g/mysearchtext/p When I stumbled across this page Search-a-pattern-and-provide-a-context-few-lines-above-and-below ...
1
vote
1answer
71 views

Pressing tab after sourcing script file prints script related output

I have a script file in a directory. Its contents are as follows : #!/bin/bash ...
0
votes
0answers
253 views

Shortcuts for sakura

How can I configure shortcuts for a sakura terminal? I know about the question Configuring shortcuts for Sakura but since I am quite a newbie I did not success. In the end I would like to have ...
1
vote
1answer
1k views

How to pull dependencies for package/testing from testing

Trying to install a newer version of libav-tools from testing to my otherwise debian-stable installation. I have testing in my sources.list and my preferences look like: Package: * Pin: release a=...
0
votes
1answer
686 views

how to run a script on ubuntu shutdown when it needs network on

I have an upstart script that needs to run on reboot or shutdown, but it needs to access the network to post an http requests and wait for the replies, I tried start on starting rc and start on ...
5
votes
1answer
1k views

counting multiple patterns in a single pass with grep?

I've written a grep loop to iteratively count DNA trinucleotides within a gzipped DNA fasta file containing DNA sequences e.g. declare -a tri=(AAA AAC AAG AAT CAA .. etc) for i in ${tri[@]} do ...
1
vote
3answers
2k views

What makes the files in my home directory appear, when I log in through SSH then run ecryptfs-mount-private?

I'm a bit of a newbie when it comes to using Linux. I've recently installed Ubuntu 12.04 LTS (minimal virtual machine) on a VPS host. I've encrypted the virtual disk and encrypted the home directory ...
1
vote
1answer
2k views

kernel: “echo 0 > /proc/sys/kernel/hung_task_timeout_secs”

I got this errors in syslog. Any idea what does it mean? The system is running on Ubuntu 12.04, kernel: 3.8.0-35-generic #52~precise1 It looks to me like failure when trying to write to disk... [...
1
vote
1answer
169 views

How does handling an interrupt affects a multi-threaded user space process?

Say, I put a breakpoint (int 3 from now on) somewhere in a user space process code. One of the threads hits the breakpoint... And what happens next? My judgement is: this is an interrupt, so it is ...
8
votes
3answers
8k views

How to reduce ClamAV memory usage?

I'm running a Ubuntu based web server (Apache, MySQL) on a 512MB VPS. This is more than sufficient for the website it is running (small forum). As I wanted to add some protection against viruses I ...
2
votes
3answers
109 views

What do the different version elements specify in debian package name?

In Debian, I found many different packet versioning, do you know what they stand for? For example : bind9 1:9.7.3.dfsg-1~squeeze11 What do 9.7.3, dfsg-1 and squeeze11 stand for?
3
votes
1answer
2k views

Program for two-way synchronization of big files (VM disk images)

I heavily use virtual machines in my work and I need an efficient way of synchronizing them between my PCs. I know of bigsync, but this program works well only for one-way synchronizing (like rsync)....
4
votes
1answer
4k views

mdadm - RAID5 array size vs. actual disk size mismatch

I have 4x 3TB WD RED disks that are in mdadm RAID5, which should total an array size of 9TB usable space, however I only have 6TB. I have confirmed all disks are in the array, the only strange thing ...
4
votes
6answers
23k views

NFS Automatic Fail-over or Load-balanced or Clustering?

I've been using NFS (and it is the only one i know well in Network Files) for a few years. But still can not able to find out .. How to make NFS Servers in Clustered Design (or Load-balanced?) Or at ...
1
vote
0answers
21 views

Can i run a program on Linux startup instead of a Desktop Manager like Gnome, KDE, etc.? [duplicate]

I have a rasberry pi running raspbian and i would like it to "boot" into my program instead of starting Lxde. So basically let's say i will write a OpenGL program that will go fullscreen and i would ...
4
votes
2answers
2k views

How to have a newline before bash prompt?

How can I configure my bash prompt to have a newline before it? Instead of: Output1 Output2 kshitiz@ksh$ It should have: Output1 Output2 kshitiz@ksh$
1
vote
2answers
182 views

bash replace part of string based on location [duplicate]

Sorry I've looked around for a one line solution ( as bash offers ) to replace part of filename. Given that a folder has image sequence like ve2_sq021_sc001_v000.0101.jpg ve2_sq021_sc001_v000.0102....
2
votes
1answer
151 views

Monitor setup commands do not work in script

I'm running Arch Linux 64-bit on a Samsung RV511. I often connect external monitors using xrandr. As I run LXDE with Awesome as a window manager, I need to prepare the xrandr-command by killing ...
0
votes
0answers
29 views

How to add color to my command prompt? [duplicate]

On my system: echo $PS1 prints: \[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$ I followed this tutorial here to modify it: PS1="\e[0;38m \u@\h: \w\a\]${debian_chroot:+($...
0
votes
2answers
10k views

CentOS yum install gcc error: glibc-common conflicts with glibc

I met a problem with installing gcc on my CentOS. Outputs of my command sudo yum install gcc: Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * addons: centos.ustc.edu.cn *...
0
votes
1answer
136 views

Will vmstat bi/bo display statistics infor for raw device

I don't have the required setup to try this so I'll just ask. vmstat will show bi/bo for a block device, but will it also be able to show that info for a raw device like some DB partition?

15 30 50 per page