Archbang can't connect to wireless

Last week I tried Crunchbang 11, it couldn't connect to wireless. Yesterday I removed it and installed Archbang from CD (final 2012 version). Everything was working perfectly, when I did `pacman -Syu` and rebooted, Archbang stopped detecting my wireless card so I bet that the new Linux drivers aren't compatible with my HP Pavillion G. It's not the first time that I've seen drivers incompatible with my laptop, I've seen it last week with Crunchbang, and I've had graphics issues with every Linux that i've used on this laptop. What I would like to do is simple. I want to downgrade the Archbang wireless drivers, I want my original drivers back, the ones installed in the final 2012 version (I have the CD, can I use it?), and then I don't want to allow pacman to upgrade my wireless drivers, so next time I run `pacman -Syu`, I want everything to be upgraded except my wireless drivers, and if possible my graphic card drivers. You see Ubuntu 12.04 works great, 12.10 doesn't work at all, I don't even see the login screen, even with `nomodeset`. I don't want that to happen, and Archbang is a rolling release so I don't know if the next time I upgrade my packages I'll face some issues, I want to allow pacman to upgrade everything, just don't mess with my graphics and my wireless, that's it.


Why is vimdiff so slow?

Whenever I'm in `vimdiff` mode, my PuTTY session slows down considerably. This is especially noticeable when I try to scroll down many lines by keeping `j` pressed.   1. Why is it so slow in comparison to regular Vim running under `vsplit`? I realize it matches across lines and color-highlights the differences, but does that account for all the speed differences?   2. What can I do about it? I would like to keep line matches across files (and color highlighting as well). What settings can I change to help speed up the performance of my `vimdiff` utility?


Terminal emulator for Android that supports viewing images?

I am planning on logging into my unix desktop via an Anroid tablet. Is there a terminal emulator that will allow me to view images, such as making plots in ipython, via X11 protocol?


Why does a disk clone using dd take up more space on the target than the source image?

I'm doing some Android development on Ubuntu 11.10. I'm building a set of SD card and eMMC card Android images using a Bash script. Due to Android's idiosyncrasies, I have several file system images that need to be copied to the target card. There are several lines in my script to copy over the images that look like this:               image_dir=/some/directory     node=/dev/some/block/device     dd if=${image_dir}/data.img of=${node}; sync      Here's where things get weird. After partitioning the card and copying over`data.img` using this `dd` command, there is a vast inconsistency between the size of the `data.img` on my dev machine and the amount of space taken up on the target SD card partition. For instance, the `data.img` file on my disk takes up 128 **megabytes** of space, roughly, but takes up almost 2.5 **gigabytes** on the partition of the SD card. For obvious reasons, this is a serious problem. I've tried modifying the number of blocks `dd` reads and writes, but that didn't seem to change the amount of space required. I've done a fair bit of googling, but I can't seem to find any references to problems like this. What can I do to fix this issue so the image doesn't take up so much space? Could there be something wrong with the `data.img` file? Am I using `dd` wrong? I've been tearing my hair out over this for a week, help me StackExchange, you're my only hope. EDIT: Question clarified above: It's not that the **file system** takes up a lot of space on the partition, it's that the partition is filled almost completely with data after running `dd`, despite the file system image being substantially smaller than said partition.


How do I add and cancel print jobs in debian wheezy?

So I have a Canon MP150 printer running in debian wheezy, which I've added using the CUPS print manager (going to `http://localhost:631/jobs/`). I tried to print with not enough paper in the printer and it came up with an error (ie. the printer showed `E2` on the display and then failed to print). I added paper and nothing happened, so I thought I'd just delete the print job. Deleting it in the print manager (clicking on the job and pressing the `stop` icon) had no effect, so I went into the `CUPS` server and clicked `Administration->Manage Jobs`. I see the jobs there, but when I click `Cancel Job` I get a page like this: > Request Entity Too Large I tried restarting my computer but the print job is still there, and I am unable to print. I looked online and found some solutions that suggest deleting the printer driver and reinstalling, but judging by my linux printer experience thus far I'm guessing this is a problem I'll be encountering frequently, so a quicker solution would be helpful!


Force installation of doc packages

I often find myself missing documentation when I happen to be offline. For this reason, I would like to force `aptitude` to install the corresponding doc packages whenever I install a package. Is there a way of doing that more elegant than putting an alias that goes through arguments and add the `*-doc` that exist before forwarding the arguments to `aptitude`?


No installation steps when Installing CentOS 6.4 on VMware Fusion

This is my first real day on using linux. I'm following a book guide. I installed CentOS 6.4 on my mac using VMWare Fusion. However, during the installation, it did not guide me through the installation steps (e.g., choosing software selection like Server, Server-GUI, Desktop-KDE, or choosing `/home`, `/tmp`, `/var` and other stuff). I just directly, got my CentOS up and running. Any one know how can I get this installation steps?


What makes OSX programs not runnable on Linux?

I know there are many differences between OSX and Linux, but what makes them so totally different, that makes them fundamentally incompatible?


How to run a command inside screen such that you can get back to the command's parent shell?

What's the best way to run a command inside a screen session such that its parent shell can be accessed? I want to be able to restart it from within the same screen session. The best I've managed to come up with is the following:               $ cat mr-t.sh      #!/bin/bash          top     exec /bin/bash      and then:               screen -e'^\\\' -S top-in-screen ./mr-t.sh      Then, if top stops running, I'll at least get a new shell within the same screen session I can work with. This isn't very elegant, though, and I can't quite convince myself that the signal will reliably be sent to the right process if I hit C-c. Moreover, C-z doesn't work at all. I'm using bash 3.2.48 on OSX and 3.2.39 on Linux. Both are probably patched by OS vendors. There's nothing special about the `top` command here, of course. [As an aside, `-e'^\\\\\'` reassigns the Magick Screen Key from C-a (a bad default if there ever was one) to C-\.]


I'm running Arch with 3.6.10 kernel, When vboxpci module is loaded, it tells me `vboxpci: IOMMU not found (not registered)`, But I checked my kernel config, I have the INTEL_IOMMU set already (I uses a Thinkpad X220)               CONFIG_GART_IOMMU=y     # CONFIG_CALGARY_IOMMU is not set     CONFIG_IOMMU_HELPER=y     CONFIG_IOMMU_API=y     CONFIG_IOMMU_SUPPORT=y     # CONFIG_AMD_IOMMU is not set     CONFIG_INTEL_IOMMU=y     CONFIG_INTEL_IOMMU_DEFAULT_ON=y     CONFIG_INTEL_IOMMU_FLOPPY_WA=y     # CONFIG_IOMMU_STRESS is not set      Kernel command: > BOOT_IMAGE=/boot/vmlinuz-linux root=/XX processor.ignore_ppc=1 apparmor=1 > security=apparmor intel_iommu=on Any suggestions? Althrough VBox starts, but still wondering why.


How to find which Process is causing High CPU usage

Is there any way to find out from terminal which process is causing high CPU Usage ? It would also be useful to order processes in descending order of cpu Usage


How Do I Block Read Access to a Symbolic Link?

I have this file structure:               > APPLICATION 1     >> CONTROLLER (@JuniorProgrammers)     >> MODELS (symlink to SHARED/MODELS)     >> VIEWS (@Designers)     > APPLICATION 2     >> CONTROLLER (@JuniorProgrammers)     >> MODELS (symlink to SHARED/MODELS)     >> VIEWS (@Designers)     > SHARED     >> MODELS (@SeniorProgrammers)      I need php to be able to read Folder 1.1 contents, but programmers who FTP into Folder 1 won't be able to read the symlink (they CAN see the symlink, but not FOLLOW it including all reads, and writes). The @ is the groups of users that have read/write access of each layer.


enable IST timezone in puppet

I'm trying to run below Puppet manifest to set 'IST' timezone.               class { 'timezone':       timezone => 'IST',     }      When I run Puppet apply `timezone.pp`, it installs properly. But when I check the system date, It's the same as before. I don't see any change in timezone. Also when I change IST to PST or some other timezone, it works properly. Only IST is not working for me. I had installed timezone Puppet module and kept it in `/etc/puppet/module` directory. What am I missing?


Using `kill -s 0 $pid` vs `[[ -e /proc/$pid ]]` to detect if PID is running

One of the idioms often used to check if process is running is to use `kill -s 0 $pid`. My question is, does it have any upsides over using `[[ -e /proc/$pid ]]` construct? The script I'm writing is both Linux and bash specific.


Why is yum trying to go through a proxy and other strange behaviors?

I occasionally setup an SSH tunnel proxy to make it seem like I'm using the internet from another location. I set it up with:               ssh -D 8080 <remote host>      and the use the gnome shell Network settings dialog to set the proxy to `http://localhost:8080`. Currently the proxy is set to None, and my `ssh` connection is disconnected. My internet browsing is working fine. However **I cannot use`yum`**:               [root@Eiger yum.repos.d]# yum update     Loaded plugins: langpacks, refresh-packagekit     http://linuxdownload.adobe.com/linux/x86_64/repodata/repomd.xml: [Errno 14] curl     #7 - "Failed connect to localhost:8080; Connection refused"     Trying other mirror.        <repeated 9 more times>           One of the configured repositories failed (Adobe Systems Incorporated),      and yum doesn't have enough cached data to continue. At this point the only      safe thing yum can do is fail. There are a few ways to work "fix" this:               1. Contact the upstream for the repository and get them to fix the problem.               2. Reconfigure the baseurl/etc. for the repository, to point to a working             upstream. This is most often useful if you are using a newer             distribution release than is supported by the repository (and the             packages for the previous distribution release still work).               3. Disable the repository, so yum won't use it by default. Yum will then             just ignore the repository until you permanently enable it again or use             --enablerepo for temporary usage:                      yum-config-manager --disable adobe-linux-x86_64               4. Configure the failing repository to be skipped, if it is unavailable.             Note that yum will try to contact the repo. when it runs most commands,             so will have to try and fail each time (and thus. yum will be be much             slower). If it is a very temporary problem though, this is often a nice             compromise:                      yum-config-manager --save --setopt=adobe-linux-x86_64.skip_if_unavailable=true          failure: repodata/repomd.xml from adobe-linux-x86_64: [Errno 256] No more mirrors to try.     http://linuxdownload.adobe.com/linux/x86_64/repodata/repomd.xml: [Errno 14] curl     #7 - "Failed connect to localhost:8080; Connection refused"        <repeated 9 more times>      If I disable the `adobe-linux` repo, then it simply says:               [root@Eiger yum.repos.d]# yum update     Loaded plugins: langpacks, refresh-packagekit                One of the configured repositories failed (Unknown),      and yum doesn't have enough cached data to continue. At this point the only      safe thing yum can do is fail. There are a few ways to work "fix" this:               1. Contact the upstream for the repository and get them to fix the problem.               2. Reconfigure the baseurl/etc. for the repository, to point to a working             upstream. This is most often useful if you are using a newer             distribution release than is supported by the repository (and the             packages for the previous distribution release still work).               3. Disable the repository, so yum won't use it by default. Yum will then             just ignore the repository until you permanently enable it again or use             --enablerepo for temporary usage:                      yum-config-manager --disable <repoid>               4. Configure the failing repository to be skipped, if it is unavailable.             Note that yum will try to contact the repo. when it runs most commands,             so will have to try and fail each time (and thus. yum will be be much             slower). If it is a very temporary problem though, this is often a nice             compromise:                      yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true          Cannot retrieve metalink for repository: fedora/19/x86_64. Please verify its path and try again      It's weird that **it doesn't know the name of the repository that is failing** the second time. It's also weird that **it doesn't try any of the other repositories that I have configured** (fedora, fedora-updates, google-chrome, google-talkplugin, insync, intellinuxgraphics, rpmfusion-free, rpmfusion-free- updates, rpmfusion-nonfree, rpmfusion-nonfree-updates). This has been working for over a year and I haven't touched `/etc/yum*`. * * * I put my computer to sleep and woke it up a day later. **Now everything is working as normal.** I have no explanation for the behavior seen yesterday but I can no longer reproduce it.


Disable RAID auto detect at runtime

In Linux, I'm partitioning two disks for RAID1 with fdisk. The first disk partitioning succedes, but the second fail because the raid starts automatically and occupy also the second disk (why? it should have a different UUID). How to temporary disable RAID autodetect? I guess there's a switch under `/proc/sys` filesystem. I know it's possible to solve the problem in other ways, like removing RAID information from the disks with `mdadm --zero-superblock` but I want to know if it's possible to disable RAID autodetect without rebooting the system with `raid=noautodetect nomdadm` in kernel parameters.


Finding a specific file in several sub-directories

I've the following problem : I have to write something to copy a file contained in directory A. The file is unique, and has a specific extension (.jil). Only problem, directory A can contains a sub-directory B (which can contain a sub-directory C, ...) and then my file won't be located in the directory A, but in one of his sub- directories. What command can I use to find this file without exploring all my directoties ?


Are packages cryptographically signed in Fedora 14?

I am installing Fedora 14 and I am wondering if   1. the Fedora packages are cryptographically signed   2. package signatures are checked by the installer by default   3. package signatures are checked by yum when installing additional packages or doing upgrades


Function to evaluate variables in BASH

Given a variable name is there a function that will print its value? Often times I pass the name of a variable to a bash function and instead of doing the expansion while passing it I would like to expand it inside the function. Of course when I do this I end up having to create the string with the variable name then running exec. It would be much more succinct if I could just run a command that echoed the output!


unrecognized inateck hdd enclosure with linux Mint

I have put in a Hitachi 2.5 inch hdd inside a Inateck hdd enclosure. I have connected the enclosure to a Toshiba R630-156 using a usb2 cable on a usb3 enclosure port. I can hear and feel the hard drive is powered but I cannot see any messages in dmesg. i cannot see any related output in lsusb. I have enabled usb_storage kernel module but it does not seem to make any difference. I am not experienced with trouble shooting hardware issues so please refer to some documentation if you are using very specific terms in your explanation. please ask if you need anymore debug information. thanks.               $ cat /etc/lsb-release     DISTRIB_ID=LinuxMint     DISTRIB_RELEASE=17     DISTRIB_CODENAME=qiana     DISTRIB_DESCRIPTION="Linux Mint 17 Qiana"          $ uname -a     Linux rag-tos-laptop 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux          $ lsmod | grep usb     usb_storage            62209  0      btusb                  32412  0      bluetooth             395423  12 bnep,btusb,rfcomm     usbhid                 52616  0      hid                   106148  2 hid_generic,usbhid          $ lsusb     Bus 002 Device 004: ID 0930:0214 Toshiba Corp.      Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub     Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub     Bus 001 Device 003: ID 0bda:58f5 Realtek Semiconductor Corp.      Bus 001 Device 004: ID 046d:c52e Logitech, Inc.     Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub     Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub          BIOS Information             Vendor: TOSHIBA             Version: Version 1.90               Release Date: 02/24/2011             ROM Size: 2048 kB             Characteristics:                     ISA is supported                     PCI is supported                     PNP is supported                     BIOS is upgradeable                     BIOS shadowing is allowed                     VLB is supported                     Boot from CD is supported                     Selectable boot is supported                     EDD is supported                     Japanese floppy for Toshiba 1.2 MB is supported (int 13h)                     3.5"/720 kB floppy services are supported (int 13h)                     Print screen service is supported (int 5h)                     8042 keyboard services are supported (int 9h)                     Serial services are supported (int 14h)                     Printer services are supported (int 17h)                     ACPI is supported                     USB legacy is supported                     BIOS boot specification is supported                     Function key-initiated network boot is supported                     Targeted content distribution is supported             BIOS Revision: 1.90             Firmware Revision: 1.40


Increasing serial baud rate within Ubuntu under VirtualBox

I'm debugging a kernel module under VirtualBox with a guest and host OS as Ubuntu 10.10. I'm using the virtualbox serial port but I'm maxing out at the baudrate 115200. My grub config looks like this... console=ttyS0,115200 Is there a way for me to change that setting in the guest OS so that the virtual serial port works at a faster baudrate? I've tried to use setserial. That didn't give me an error, but when I recompiled with a faster baudrate for the console I didn't see a change. Thanks!


Copyed mysql files from previous system now error while connect, what to do?

Fist of all I have the files but the old system is gone. I took the folders in `/var/lib/mysql/` and gave then the permissions the mysql folder that was in there had. user mysql group root only accessible my user. Now when I want to access my localhost sites I get a mysql database error. But I think everything is as it was before. What do I need to do to make this work?               Cannot find or open table blabla/wp_options from     the internal data dictionary of InnoDB though the .frm file for the     table exists. Maybe you have deleted and recreated InnoDB data     files but have forgotten to delete the corresponding .frm files     of InnoDB tables, or you have moved .frm files to another database?     or, the table contains indexes that this version of the engine     doesn't support.     See http://dev.mysql.com/doc/refman/5.5/en/innodb-troubleshooting.html     how you can resolve the problem.      the logfile shows me a hell of a lot errors like this. Should I delete this .frm files now?


copying from a remote server to my hdd with alias or reducing long file paths

I want to copy files from a remote server to my desktop and vice versa. However, the issue is, my files to be copied from the server have quite long file paths with at least 7-8 subfolders which are more or less constant. It's hectic to use the entire file path all the time to perform simple copy actions. for eg, if I wanted to copy `filex` from the remote server I would have to type in:               scp -r username@remotesrvr.com:/fldr1/fldr2/fldr3/fldr4/..../myfile ./mydesktop      Is there a way to overcome this?


PHP mail() and Debian Wheezy Not Working

I am currently running my on debian wheezy with php5 installed. I was trying use the mail() function, and I realised that I will require a MTA/exim installed before it will be possible because the default installation does not come with any. I was looking at a solution at: https://wiki.debian.org/GmailAndExim4 However, it says that This setting is for a typical desktop PC which has no resolvable host name. Are there any good references for the settings I can use for a hosting server?


which shell will sudo use to execute a shell script without the shebang line

My environment is Ubuntu 12.04 LTS, and the `sudo` version is 1.8.3p1. First I login as a normal user:               $ whoami     fin          $ cat /etc/passwd | grep -i "root\|fin"     root:x:0:0:root:/root:/bin/bash     fin:x:1000:1000:This is a normal user:/home/fin:/bin/bash          $ ls -l /bin/sh     lrwxrwxrwx 1 root root 4 Mar 30  2012 /bin/sh -> dash          $ ls -l /bin/bash     -rwxr-xr-x 1 root root 920788 Apr  3  2012 /bin/bash          $ echo $SHELL     /bin/bash          $ ps | grep "$$" | awk '{ print $4 }'     bash          $ ls -l ./test.sh     -rwxr-xr-x 1 fin fin 37 Sep 27 16:46 test.sh          $ cat ./test.sh     ps | grep "$$" | awk '{ print $4 }'          $ ./test.sh     bash          $ sudo ./test.sh     sh      I suppose the last output should also be `bash` because `/etc/passwd` shows that root uses `bash`, am I missing any points about `sudo`?


Replace string containing newline in huge file

**Anyone know of a non-line-based tool to "binary" search/replace strings in a somewhat memory-efficient way?** See this question too. I have a +2GB text file that I would like to process similar to what this appears to do:               sed -e 's/>\n/>/g'      That means, I want to remove all newlines that occur after a `>`, but not anywhere else, so that rules out `tr -d`. This command (that I got from the answer of a similar question) fails with `couldn't re-allocate memory` :               sed --unbuffered ':a;N;$!ba;s/>\n/>/g'      So, are there any other methods without resorting to C? I hate perl, but am willing to make an exception in this case :-) I don't know for sure of any character that does not occur in the data, so temporary replacing `\n` with another character is something I'd like to avoid if possible. Any good ideas, anyone?


Sony runs which operating system? Oracle Linux or Crestron Extron or Minix or OS X?

Sony has TV, PlayStation, Camera random hardware's. Where many of those have GUI available too. I want to run my BASH script there with ncurses. But how do they drive there devices? Which operating system is used inside? Or they just use micro-controllers or is it open-solaris?   * Xperia by Sony Ericsson http://developer.sonymobile.com/wportal/devworld/search- downloads/opensource?cc=gb&lc=en


Can I remove files in /var/log/jounal and /var/cache/abrt-di/usr?

I use Fedora and these directories contains a large amount of files, I wonder whether I can delete them? The system is running low on space.


How do I make a usb thumbdrive persistent?

I have Linux Mint Petra (Mate 64 Bit) installed on a HP Pavilion dv7-3008tx laptop. I want to make a 32GB thumbdrive, with an ISO disk image on it, persistent without fully installing the system on the computer itself. In other words I want to have a bootable system on one partition and data on another one, while the latter is always mounted when the system from the USB is booted. Is this possible somehow?


What to do when ubuntu-vm-builder completed?

I already have the VM (Xen based) installed, but the Xen config used specified "Linux kernel" as "None". The exact command line was: `ubuntu-vm-builder xen precise -v --debug --addpkg openssh-server` Two images and a xen VM config was generated in /etc/xen/ubuntu-xen , I'll provide more info later , i'm at the other computer now. How should I start the VM? **UPDATE** I got a xen.conf :               # Configuration file for the Xen instance ubuntu, created     # by VMBuilder     kernel = 'None'     ramdisk = 'None'     memory = 128          root = '/dev/xvda1 ro'     disk = [     'tap:aio:/root/ubuntu-xen/tmpZV_BzU,xvda1,w',     'tap:aio:/root/ubuntu-xen/tmpeUm7XN,xvda2,w'     ]          name = 'ubuntu'          dhcp    = 'dhcp'     vif = ['']          on_poweroff = 'destroy'     on_reboot   = 'restart'     on_crash    = 'restart'          extra = 'xencons=tty console=tty1 console=hvc0'


grep string from contents of file command then delete file

I have a peculiar problem I need help with. I have a large batch of .docx files where a certain number of them are junk. I know how to identify these files from the file command, as they contain the phrase "Number of Words: 161" from the output of file cmd. I need to delete these files. I have the following so far,               file * | grep "Number of Words: 161"      which gives an output similar to               19028409: CDF V2 Document, Little Endian, Os: Windows, Version 5.1, Code page: 1252, Author: author, Template: Normal, Last Saved By:  , Revision Number: 2, Name of Creating Application: Microsoft Office Word, Last Printed: Mon Dec 13 13:21:00 2010, Create Time/Date: Wed Dec 12 22:39:00 2012, Last Saved Time/Date: Wed Dec 12 22:38:00 2012, Number of Pages: 1, Number of Words: 161, Number of Characters: 923, Security: 0      where the filename is 19028409 How can I delete all instances of these files? I should also add that I am running this from the MAC OS X terminal, but I suppose the solution will be similar to a Unix/Linux based problem


Extended monitor - scroll right to access left screen

I am running Crunchbang (debian based) and I'm trying to extend my desktop, I've ran the following command:               xrandr --output DVI-I-2 --auto --output DVI-I-1 --primary --auto      This has extended the desktop but my second monitor is to the left of my main monitor but I have to move the mouse to the right to access the left monitor, how can I fix this? Output of `xrandr -q`               Screen 0: minimum 320 x 200, current 3360 x 1050, maximum 8192 x 8192     DVI-I-1 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 473mm x 296mm        1680x1050      59.9*+        1280x1024      75.0     60.0          1152x864       75.0          1024x768       75.1     60.0          800x600        75.0     60.3          640x480        75.0     60.0          720x400        70.1       DVI-I-2 connected 1680x1050+1680+0 (normal left inverted right x axis y axis) 473mm x 296mm        1680x1050      60.0*+        1280x1024      75.0     60.0          1152x864       75.0          1024x768       75.1     60.0          800x600        75.0     60.3          640x480        75.0     60.0          720x400        70.1


Installing mono on open suse

I'm trying to install mono on my open suse linux. I downloaded the latest rpm packages from the mono page and tried to install the mono-core package with the --test attribute               rpm -ivh --test /home/martin/Downloads/mono-core-3.2.3-0.x86_64.rpm      but got an error saying:               error: Failed dependencies:             mono(System.ComponentModel.Composition) = 4.0.0.0 is needed by mono-core-3.2.3-0.x86_64             mono(System.ComponentModel.DataAnnotations) = 4.0.0.0 is needed by mono-core-3.2.3-0.x86_64             mono(System.Data) = 4.0.0.0 is needed by mono-core-3.2.3-0.x86_64             mono(System.Runtime.Serialization) = 4.0.0.0 is needed by mono-core-3.2.3-0.x86_64             mono(System.ServiceModel) = 4.0.0.0 is needed by mono-core-3.2.3-0.x86_64      I understand that these dependencies should be installed first, but there isn't any just 'mono' package. Am I missing something here ?


Need a script that generates files from words within a single text files

I have the following scenario and my lack of linux knowledge doesn't help a lot. I have a text file that contains YML values, in the following matters:               coolregion:       min: {z: -99613.0, y: 45.0, x: -99805.0}       flags: {vehicle-place: allow}       max: {z: 100387.0, y: 127.0, x: 100195.0}       priority: 0       type: cuboid       owners:         groups: [jacob, eithan, michael]       members:         groups: [jack, noah]     niceregion:           min: {z: 544.0, y: 6.0, x: 184.0}       flags: {}       max: {z: 556.0, y: 13.0, x: 197.0}       priority: 0       type: cuboid       owners:         groups: [noah]       members:         groups: [logan, lucas, jack]      I want to generate files for each name with the regions that he belongs to. For example `noah.txt` will contain `coolregion, niceregion` while `jacob.txt` will contain `coolregion` only. I know regex pretty well so I'd be also pleased if you only point me to the right direction (i.e. a script that only needs the regex to complete). If it matters, my linux version is "Debian GNU/Linux 5.0".


Extract particular words from Rsyslog %msg% facility

After lot of search on Google and reading all manuals available on man page and internet, I finally ask here. In my scenario, I have one `rsyslog` server working with `mysql` and a custom template written which take logs, filter them and write them to `mysql` database My tmeplate is :               $template db_k,"insert into       sensitive_logs(ID,TIME,message)      values('%HOSTNAME%','%timegenerated:::date-mysql%','%msg%' )", sql      Output:               Security | 20140401182028  |  Failed password for root from 192.168.1.113 port 34290 ssh2       I'd like to extract some words from the %msg% Example:               Failed,root,IP       from this message part How can I do this?


Custom Linux Distro that runs just one program, nothing else

I am wondering how I could go about creating my own "custom" Linux distro that will run just one program, pretty much exactly the same way as XBMCbuntu. I'm not asking for a step by step guide, just maybe a link to something that can help me on my way.


How to format the output of free/sar/such commands?

I need to get some specific columns from the output of `free` command. The way I'm following doesn't seem good, could anyone please suggest me a better way?               bash-3.2$ free -gotsi                  total       used       free     shared    buffers     cached     Mem:            56         29         27          0          0         29     Swap:           11          0         11     Total:          67         29         38     bash-3.2$          bash-3.2$ free -gotsi | cut -c-40,64-                  total       used       free    cached     Mem:            56         29         27        29     Swap:           11          0         11     Total:          67         29         38


Change Owner of Folder in SCO

How can I change the Owner/group of a folder in SCO? I did:               ls -l      and got the following:               ...     drwxr-xr-x 9 root root 512 Jul 2 10:09 opt     ...      I have tried:               chown /opt      But that hasn't worked. The user I am wanting to use is: test I have asked another question (different thread) about how to change the folder permissions, but realized I still won't be able to create folders in the /opt folder with root being the owner and group - if test is not part of the root group. Gaining root privileges in SCO


How to apply org-todo to multiple items

Consider an emacs org-mode file like this:               ** item 1     ** item 2     ** item 3     ** item 4      Now I can apply `org-todo` to every item separately (bound to `C-c C-t`). But how can I apply it to every item in region at once? Just selecting the region and doing it doesnt't work, it just adds the TODO keyword to the item below the region.


Can't resize a partition using resize2fs

I recently resized the hard drive of a VM from 150 GB to 500 GB in VMWare ESXi. After doing this, I used Gparted to effectively resize the partition of this image. Now all I have to do is to resize the file system, since it still shows the old value (as you can see from the output of `df -h`):               Filesystem                     Size  Used Avail Use% Mounted on     /dev/mapper/owncloud--vg-root  157G   37G  112G  25% /     udev                           488M  4.0K  488M   1% /dev     tmpfs                          100M  240K  100M   1% /run     none                           5.0M     0  5.0M   0% /run/lock     none                           497M     0  497M   0% /run/shm     /dev/sda1                      236M   32M  192M  14% /boot      However, running `sudo resize2fs /dev/mapper/owncloud--vg-root` returns this:               resize2fs 1.42 (29-Nov-2011)     The filesystem is already 41608192 blocks long.  Nothing to do!      Since Gparted says that my partition is `/dev/sda5`, I also tried running `sudo resize2fs /dev/sda5`, but in this case I got this:               resize2fs 1.42 (29-Nov-2011)     resize2fs: Device or resource busy while trying to open /dev/sda5     Couldn't find valid filesystem superblock.      Finally, this is the output of `pvs`:               PV         VG          Fmt  Attr PSize   PFree     /dev/sda5  owncloud-vg lvm2 a-   499.76g 340.04g      `fdisk -l /dev/sda` shows the correct amount of space. How can I resize the partition so that I can finally make the OS see 500 GB of hard drive?


How do I prevent time drift in a Debian guest on a CentOS KVM host?

I know I can install `ntp` in the guest, but my confused understanding of what I've Googled so far suggests this shouldn't be necessary. The Host is CentOS 6.3 and guest is Debian Wheezy, which seems to be using the kvm clock as a time source:               # cat /sys/devices/system/clocksource/clocksource0/current_clocksource     kvm-clock      Is there something special I need to do to make the guest use the host clock?


emacs fonts from ssh not as good as locally installed

How can I have the same emacs fonts and antialiasing configuration that I have in my local Ubuntu 12.04 also working when I open an emacs session via ssh to a CentOS 5 system? EDIT: I didn't get an answer for this and it's still bothering me. I have emacs 24 installed, so I thought it should have been easy to have good quality fonts with antialiasing enabled...


How to get permission number by string : -rw-r--r--

I need to set the same chmod, how to get number for **-rw-r--r--** ?


How to prevent prompt that ask to restart services when installing libpq-dev

I want to install `libpq-dev` on my Vagrant machine. I install it with               $ apt-get install -y libpq-dev      During installation a prompt appears which asks if it's allowed to restart some services automatically. This prompt breaks my Vagrant provision. How can disable this prompt? ![prompt](http://i.imgur.com/U4Czr11.png) ****EDIT **** Thanks to Patrick's answer and this question I fixed it. Now my Vagrantfile contains:                sudo DEBIAN_FRONTEND=noninteractive apt-get install -y libpq-dev


Port monitoring on GNU/Linux based NAT router

I am using a Ubuntu machine as a NAT router. How can I find out the following:   * the ports on which the LAN machines are listening or communicating (both tcp and udp);   * which local machines have established connections with which WAN ip's on those ports;   * and the size of data that has been transfered on those ports.


Measurement of free ram through /proc/meminfo with ramdisk (initrd)

I am booting a disk image via PXE, it is a full system on an `initrd` ramdisk. I would like to measure the actual free memory of the system (not including buffers and file system caching). I was told this is done by adding the MemFree, Buffers and Cached values from `/proc/meminfo`. For a regular system this gives accurate results. However with my ramdisk setup it does not give accurate results. I assume that the memory that is used by the ramdisk is added to the "Cached" value:               [root@node1 ~]# cat /proc/meminfo     MemTotal:        8173700 kB     MemFree:         7443696 kB     Buffers:               0 kB     Cached:           650236 kB     SwapCached:            0 kB     MemCommitted:          0 kB     VirtualSwap:           0 kB     Active:            27156 kB     Inactive:         632204 kB     Active(anon):       4636 kB     Inactive(anon):     4616 kB     Active(file):      22520 kB     Inactive(file):   627588 kB     Unevictable:           0 kB     Mlocked:               0 kB     SwapTotal:             0 kB     SwapFree:              0 kB     Dirty:                 0 kB     Writeback:             0 kB     AnonPages:          9156 kB     Mapped:             8712 kB     Shmem:               128 kB     Slab:              38548 kB     SReclaimable:      29420 kB     SUnreclaim:         9128 kB     KernelStack:         536 kB     PageTables:         1268 kB     NFS_Unstable:          0 kB     Bounce:                0 kB     WritebackTmp:          0 kB     CommitLimit:     4086848 kB     Committed_AS:      51216 kB     VmallocTotal:   34359738367 kB     VmallocUsed:      288032 kB     VmallocChunk:   34359448036 kB     HardwareCorrupted:     0 kB     AnonHugePages:         0 kB     HugePages_Total:       0     HugePages_Free:        0     HugePages_Rsvd:        0     HugePages_Surp:        0     Hugepagesize:       2048 kB     DirectMap4k:       10240 kB      DirectMap2M:     8378368 kB      Now this unfortunately gives me incorrect values for two metrics I would like to calculate: %MemUsed and AmountMemFreeActual. With a Ramdisk the "Cached" value is at least in part unreclaimable, and therefore cannot be used to calculate the actual Free memory. To calculate both correctly, I would need to know the memory usage of the ramdisk, and i do not think I can simply take the "Cached" value, since this might also include other Cached Filesystem data. Preferably I would like to take the ramdisk memory use out of the picture for both metrics, since it is unreclaimable memory AFAIK. Any ideas where to look? Edit: "free" (@answer1) does provide the same wrong values. The "free" value from the "free" output is misleading anyways. "Free" memory is usually "Free"+"Buffers"+"Cached". My problem is that the ramdisk as non reclaimable memory (unlike usually cached filesystem data) cannot be reclaimed.


Adding Sleep command to shell script?

How can I add a 10sec sleep to my loop after each page is processed?               #!/bin/sh          for page in {1..50}     do         wget -q -U Mozilla "http://admin.domain.com/products_search/?p=$page" -O - \         | tr '"' '\n' | grep "^Product photo for " | cut -d ' ' -f 3 > bproduct.txt     done


Sed to reverse two words

echo "AXIS2C_HOME=/usr/local/Axis2C" | sed 's/\(^AXIS2C_HOME=\) \(.*\)/ \2 \1/'      The output I am expecting is `/usr/local/Axis2C AXIS2C_HOME=`. I can't figure out what I am doing wrong. :(


escaping a single dot with double backslash - awk

"effective awk programming" book has an example on Field-Splitting. here is the example: > If you want fields to be separated by a literal period followed by any > single character, use `‘FS = "\\\\.."’`. Why it is double backslash? shouldn’t it be `\\..`?


How to install fonts for X?

I would like to setup a Linux system with ScrotWM as the window manager, but I noticed that X is aware of only a few fonts. I would like to have UTF-8 fonts that support multiple languages, including Asian languages like Japanese and Traditional Chinese. How do I install fonts so that X can show them? What kind of fonts would they be? And will the fonts be universally available to other programs like Firefox or OpenOffice once I install them? Or will applications maintain separate groups of fonts for their own use? Thanks.


How to change/remove blue panel glow in KDE4.6?

After a system (as well as KDE) update, I got this blue panel glow which appears on hover. ![enter image description here](http://i.stack.imgur.com/ZoeFZ.jpg) I browsed through system settings, panel settings, desktop settings, but couldn't find an option to change/remove this blue glow. Did anyone else encounter this problem? Where should I look? I also tried this, but it didn't help. I use Arch, but don't think it matters much in this case... Thank you.


Faster delayed execution than 1 minute?

I am working on a program that can "upgrade itself" by install a new package. In order to accomplish this, I am using the `at` command to specify that a shell script should be run one minute in the future and the shell script, in turn, will install the package. I would really like this to execute sooner than one minute into the future but that appears to be the best that I can do based upon what I have read in the man page for at. Is there a way to do this with tighter resolution?


Redirecting output to file

I am looking forward to run commands and log their output in a temporary log file to be read later on by different processes. So, for example: `rc.d start ntpd > progress.txt` Returns: **`::`**`Daemon script` **`ntpd`**`does not exist or is not executable.` I assume, that since it's an error it doesn't get redirected, but, is there a way to force redirect everything to file?


How to hardcopy to multiple pages per sheet?

Let's suppose I have a single sheet of `text` to print (8.5''x11''). Can I create multiple hardcopies of said text and scale them so that I can fit 4 copies per print sheet using VIM? ex.               ___________         ___________      text                text  text                   ->                            ->    text  text          ___________         ___________


How to avoid the need to issue "y" several times when removing protected file

I'm looking for a solution to be used as a response to "rm: remove write- protected regular file [x] ?" I was thinking of issuing a character followed by carriage return for several amount of times, in bashrc. How do we do that?


Why does xargs strip quotes from input?

Why does xargs strip quotes from input text? Here is a simplified example:               echo "/Place/='http://www.google.com'" | xargs echo      outputs               /Place/=http://www.google.com      Is there any way to work-around this? (xargs -0 doesn't help me)


Drive disappears from dev during ddrescue copy or testdisk recovery

I have been trying to recover data from a Seagate 7200.11 1.5TB drive (2 ext4 partitions_ for 3 days now, predominantly with ddrescue and testdisk, but because of some critical error on the disk (probably SA damage or something similar?), it gets dropped off /dev when the system accesses some specific sector(s). The closest I have come, I think, is with ddrescue. But the image it created was incomplete and I could not mount it as it gave "bad geometry: block count xxx exceeds size of device.." error among others. Last night I again fired up ddrescue, this time on the second partition, and after waiting for 3 hours, went to sleep. At that time, it had copied ~150GB from the ~700GB partition. Command used:               ddrescue -n -v -T 30 --skip-size=1M,10M --min-read-rate=50k /dev/sdc2 /media/rescue/Drive2.img /media/rescue/Drive2.log      I was pretty disappointed when I woke up and saw that the drive had disappeared from /dev/ and consequently ddrescue showed "error size" in 200GB+ range. The /var/log/messages contained repeating lines :               2014-06-13T10:54:08.526490+05:00 suse kernel: [ 6693.096125] Read(10): 28 00 5a 79 55 88 00 00 08 00     2014-06-13T10:54:08.526491+05:00 suse kernel: [ 6693.096174] sd 2:0:0:0: [sdc] Unhandled error code     2014-06-13T10:54:08.526491+05:00 suse kernel: [ 6693.096176] sd 2:0:0:0: [sdc]       2014-06-13T10:54:08.526492+05:00 suse kernel: [ 6693.096176] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK     2014-06-13T10:54:08.526493+05:00 suse kernel: [ 6693.096177] sd 2:0:0:0: [sdc] CDB:      2014-06-13T10:54:08.526494+05:00 suse kernel: [ 6693.096178] Read(10): 28 00 5a 79 4d e8 00 00 08 00     2014-06-13T10:54:08.526494+05:00 suse kernel: [ 6693.096226] sd 2:0:0:0: [sdc] Unhandled error code      and these around the time it disappeared from /dev (I think):               2014-06-13T07:34:30.290574+05:00 suse kernel: [ 6743.832817] ata3: EH complete     2014-06-13T07:34:33.892459+05:00 suse kernel: [ 6747.432198] ata3.00: exception Emask 0x0 SAct 0x1 SErr 0x0 action 0x0     2014-06-13T07:34:33.892486+05:00 suse kernel: [ 6747.432203] ata3.00: irq_stat 0x40000008     2014-06-13T07:34:33.892489+05:00 suse kernel: [ 6747.432206] ata3.00: failed command: READ FPDMA QUEUED     2014-06-13T07:34:33.892502+05:00 suse kernel: [ 6747.432212] ata3.00: cmd 60/08:00:10:50:08/00:00:5c:00:00/40 tag 0 ncq 4096 in     2014-06-13T07:34:33.892511+05:00 suse kernel: [ 6747.432212]          res 41/40:08:17:50:08/00:00:5c:00:00/00 Emask 0x409 (media error) <F>     2014-06-13T07:34:33.892517+05:00 suse kernel: [ 6747.432215] ata3.00: status: { DRDY ERR }     2014-06-13T07:34:33.892519+05:00 suse kernel: [ 6747.432217] ata3.00: error: { UNC }     2014-06-13T07:34:34.003455+05:00 suse kernel: [ 6747.543056] ata3.00: configured for UDMA/133     2014-06-13T07:34:34.003476+05:00 suse kernel: [ 6747.543074] sd 2:0:0:0: [sdc] Unhandled sense code     2014-06-13T07:34:34.003480+05:00 suse kernel: [ 6747.543076] sd 2:0:0:0: [sdc]       2014-06-13T07:34:34.003483+05:00 suse kernel: [ 6747.543078] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE     2014-06-13T07:34:34.003486+05:00 suse kernel: [ 6747.543080] sd 2:0:0:0: [sdc]       2014-06-13T07:34:34.003488+05:00 suse kernel: [ 6747.543082] Sense Key : Medium Error [current] [descriptor]     2014-06-13T07:34:34.003491+05:00 suse kernel: [ 6747.543085] Descriptor sense data with sense descriptors (in hex):     2014-06-13T07:34:34.003502+05:00 suse kernel: [ 6747.543086]         72 03 11 04 00 00 00 0c 00 0a 80 00 00 00 00 00      2014-06-13T07:34:34.003503+05:00 suse kernel: [ 6747.543095]         5c 08 50 17      2014-06-13T07:34:34.003504+05:00 suse kernel: [ 6747.543099] sd 2:0:0:0: [sdc]       2014-06-13T07:34:34.003505+05:00 suse kernel: [ 6747.543110] Add. Sense: Unrecovered read error - auto reallocate failed     2014-06-13T07:34:34.003505+05:00 suse kernel: [ 6747.543111] sd 2:0:0:0: [sdc] CDB:      2014-06-13T07:34:34.003506+05:00 suse kernel: [ 6747.543112] Read(10): 28 00 5c 08 50 10 00 00 08 00     2014-06-13T07:34:34.003507+05:00 suse kernel: [ 6747.543116] end_request: I/O error, dev sdc, sector 1544048663     2014-06-13T07:34:34.003508+05:00 suse kernel: [ 6747.543118] Buffer I/O error on device sdc2, logical block 3270402     2014-06-13T07:34:34.003509+05:00 suse kernel: [ 6747.543127] ata3: EH complete     2014-06-13T07:34:36.758454+05:00 suse kernel: [ 6750.295735] ata3.00: exception Emask 0x0 SAct 0x1 SErr 0x0 action 0x0     2014-06-13T07:34:36.758484+05:00 suse kernel: [ 6750.295740] ata3.00: irq_stat 0x40000008     2014-06-13T07:34:36.758488+05:00 suse kernel: [ 6750.295743] ata3.00: failed command: READ FPDMA QUEUED     2014-06-13T07:34:36.758492+05:00 suse kernel: [ 6750.295750] ata3.00: cmd 60/08:00:10:50:08/00:00:5c:00:00/40 tag 0 ncq 4096 in     2014-06-13T07:34:36.758496+05:00 suse kernel: [ 6750.295750]          res 41/40:08:17:50:08/00:00:5c:00:00/00 Emask 0x409 (media error) <F>     2014-06-13T07:34:36.758499+05:00 suse kernel: [ 6750.295752] ata3.00: status: { DRDY ERR }     2014-06-13T07:34:36.758502+05:00 suse kernel: [ 6750.295754] ata3.00: error: { UNC }     2014-06-13T07:34:36.932467+05:00 suse kernel: [ 6750.469333] ata3.00: configured for UDMA/133     2014-06-13T07:34:36.932495+05:00 suse kernel: [ 6750.469351] sd 2:0:0:0: [sdc] Unhandled sense code     2014-06-13T07:34:36.932501+05:00 suse kernel: [ 6750.469354] sd 2:0:0:0: [sdc]       2014-06-13T07:34:36.932504+05:00 suse kernel: [ 6750.469355] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE     2014-06-13T07:34:36.932507+05:00 suse kernel: [ 6750.469357] sd 2:0:0:0: [sdc]       2014-06-13T07:34:36.932510+05:00 suse kernel: [ 6750.469359] Sense Key : Medium Error [current] [descriptor]     2014-06-13T07:34:36.932514+05:00 suse kernel: [ 6750.469362] Descriptor sense data with sense descriptors (in hex):     2014-06-13T07:34:36.932534+05:00 suse kernel: [ 6750.469364]         72 03 11 04 00 00 00 0c 00 0a 80 00 00 00 00 00      2014-06-13T07:34:36.932546+05:00 suse kernel: [ 6750.469372]         5c 08 50 17      2014-06-13T07:34:36.932551+05:00 suse kernel: [ 6750.469376] sd 2:0:0:0: [sdc]       2014-06-13T07:34:36.932556+05:00 suse kernel: [ 6750.469379] Add. Sense: Unrecovered read error - auto reallocate failed     2014-06-13T07:34:36.932560+05:00 suse kernel: [ 6750.469381] sd 2:0:0:0: [sdc] CDB:      2014-06-13T07:34:36.932564+05:00 suse kernel: [ 6750.469382] Read(10): 28 00 5c 08 50 10 00 00 08 00     2014-06-13T07:34:36.932567+05:00 suse kernel: [ 6750.469390] end_request: I/O error, dev sdc, sector 1544048663     2014-06-13T07:34:36.932572+05:00 suse kernel: [ 6750.469394] Buffer I/O error on device sdc2, logical block 3270402     2014-06-13T07:34:36.932576+05:00 suse kernel: [ 6750.469420] ata3: EH complete     2014-06-13T07:36:15.441806+05:00 suse su: (to root) procyon on /dev/pts/5     2014-06-13T07:53:20.731456+05:00 suse kernel: [ 7873.286421] ata3: failed to read log page 10h (errno=-5)     2014-06-13T07:53:20.731483+05:00 suse kernel: [ 7873.286429] ata3.00: exception Emask 0x1 SAct 0x1 SErr 0x0 action 0x0     2014-06-13T07:53:20.731487+05:00 suse kernel: [ 7873.286431] ata3.00: irq_stat 0x40000008     2014-06-13T07:53:20.731488+05:00 suse kernel: [ 7873.286434] ata3.00: failed command: READ FPDMA QUEUED     2014-06-13T07:53:20.731490+05:00 suse kernel: [ 7873.286440] ata3.00: cmd 60/08:00:10:59:6d/00:00:60:00:00/40 tag 0 ncq 4096 in     2014-06-13T07:53:20.731493+05:00 suse kernel: [ 7873.286440]          res 40/00:00:10:59:6d/00:00:60:00:00/40 Emask 0x1 (device error)     2014-06-13T07:53:20.731495+05:00 suse kernel: [ 7873.286443] ata3.00: status: { DRDY }     2014-06-13T07:53:20.740442+05:00 suse kernel: [ 7873.296009] ata3.00: both IDENTIFYs aborted, assuming NODEV     2014-06-13T07:53:20.740462+05:00 suse kernel: [ 7873.296013] ata3.00: revalidation failed (errno=-2)     2014-06-13T07:53:20.740464+05:00 suse kernel: [ 7873.296018] ata3: hard resetting link     2014-06-13T07:53:21.045453+05:00 suse kernel: [ 7873.599792] ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300)     2014-06-13T07:53:21.065444+05:00 suse kernel: [ 7873.620355] ata3.00: both IDENTIFYs aborted, assuming NODEV     2014-06-13T07:53:21.065467+05:00 suse kernel: [ 7873.620359] ata3.00: revalidation failed (errno=-2)     2014-06-13T07:53:26.045451+05:00 suse kernel: [ 7878.595494] ata3: hard resetting link     2014-06-13T07:53:26.350457+05:00 suse kernel: [ 7878.900156] ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300)     2014-06-13T07:53:26.395504+05:00 suse kernel: [ 7878.945713] ata3.00: both IDENTIFYs aborted, assuming NODEV     2014-06-13T07:53:26.395516+05:00 suse kernel: [ 7878.945717] ata3.00: revalidation failed (errno=-2)     2014-06-13T07:53:26.395518+05:00 suse kernel: [ 7878.945719] ata3.00: disabled     2014-06-13T07:53:26.395520+05:00 suse kernel: [ 7878.945752] ata3: EH complete     2014-06-13T07:53:26.395522+05:00 suse kernel: [ 7878.945774] sd 2:0:0:0: [sdc] Unhandled error code     2014-06-13T07:53:26.395523+05:00 suse kernel: [ 7878.945775] sd 2:0:0:0: [sdc]       2014-06-13T07:53:26.395525+05:00 suse kernel: [ 7878.945776] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK     2014-06-13T07:53:26.395528+05:00 suse kernel: [ 7878.945777] sd 2:0:0:0: [sdc] CDB:      2014-06-13T07:53:26.395529+05:00 suse kernel: [ 7878.945778] Read(10): 28 00 60 6d 59 10 00 00 08 00     2014-06-13T07:53:26.395531+05:00 suse kernel: [ 7878.945782] end_request: I/O error, dev sdc, sector 1617778960     2014-06-13T07:53:26.395532+05:00 suse kernel: [ 7878.945784] Buffer I/O error on device sdc2, logical block 12486690     2014-06-13T07:53:26.395534+05:00 suse kernel: [ 7878.945863] sd 2:0:0:0: [sdc] Unhandled error code     2014-06-13T07:53:26.395535+05:00 suse kernel: [ 7878.945868] sd 2:0:0:0: [sdc]       2014-06-13T07:53:26.395537+05:00 suse kernel: [ 7878.945869] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK     2014-06-13T07:53:26.395538+05:00 suse kernel: [ 7878.945872] sd 2:0:0:0: [sdc] CDB:      2014-06-13T07:53:26.395540+05:00 suse kernel: [ 7878.945873] Read(10): 28 00 60 6d 59 10 00 00 08 00     2014-06-13T07:53:26.395541+05:00 suse kernel: [ 7878.945882] end_request: I/O error, dev sdc, sector 1617778960     2014-06-13T07:53:26.395543+05:00 suse kernel: [ 7878.945885] Buffer I/O error on device sdc2, logical block 12486690     2014-06-13T07:53:26.395544+05:00 suse kernel: [ 7878.945997] sd 2:0:0:0: [sdc] Unhandled error code     2014-06-13T07:53:26.395546+05:00 suse kernel: [ 7878.946000] sd 2:0:0:0: [sdc]       2014-06-13T07:53:26.395547+05:00 suse kernel: [ 7878.946002] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK     2014-06-13T07:53:26.395548+05:00 suse kernel: [ 7878.946004] sd 2:0:0:0: [sdc] CDB:      2014-06-13T07:53:26.395550+05:00 suse kernel: [ 7878.946005] Read(10): 28 00 60 6d 59 80 00 00 08 00     2014-06-13T07:53:26.395551+05:00 suse kernel: [ 7878.946012] end_request: I/O error, dev sdc, sector 1617779072     2014-06-13T07:53:26.395552+05:00 suse kernel: [ 7878.946015] Buffer I/O error on device sdc2, logical block 12486704     2014-06-13T07:53:26.395554+05:00 suse kernel: [ 7878.946076] sd 2:0:0:0: [sdc] Unhandled error code     2014-06-13T07:53:26.395555+05:00 suse kernel: [ 7878.946080] sd 2:0:0:0: [sdc]       2014-06-13T07:53:26.395557+05:00 suse kernel: [ 7878.946082] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK     2014-06-13T07:53:26.395558+05:00 suse kernel: [ 7878.946085] sd 2:0:0:0: [sdc] CDB:      2014-06-13T07:53:26.395560+05:00 suse kernel: [ 7878.946100] Read(10): 28 00 60 6d 5a 00 00 00 08 00     2014-06-13T07:53:26.395562+05:00 suse kernel: [ 7878.946141] end_request: I/O error, dev sdc, sector 1617779200     2014-06-13T07:53:26.395563+05:00 suse kernel: [ 7878.946152] Buffer I/O error on device sdc2, logical block 12486720     2014-06-13T07:53:26.395580+05:00 suse kernel: [ 7878.946192] sd 2:0:0:0: [sdc] Unhandled error code     2014-06-13T07:53:26.395582+05:00 suse kernel: [ 7878.946194] sd 2:0:0:0: [sdc]       2014-06-13T07:53:26.395584+05:00 suse kernel: [ 7878.946195] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK     2014-06-13T07:53:26.395585+05:00 suse kernel: [ 7878.946196] sd 2:0:0:0: [sdc] CDB:      2014-06-13T07:53:26.395587+05:00 suse kernel: [ 7878.946197] Read(10): 28 00 60 6d 5b 00 00 00 08 00     2014-06-13T07:53:26.395588+05:00 suse kernel: [ 7878.946202] end_request: I/O error, dev sdc, sector 1617779456     2014-06-13T07:53:26.395590+05:00 suse kernel: [ 7878.946203] Buffer I/O error on device sdc2, logical block 12486752     2014-06-13T07:53:26.395592+05:00 suse kernel: [ 7878.946221] sd 2:0:0:0: [sdc] Unhandled error code     2014-06-13T07:53:26.395593+05:00 suse kernel: [ 7878.946223] sd 2:0:0:0: [sdc]       2014-06-13T07:53:26.395595+05:00 suse kernel: [ 7878.946224] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK     2014-06-13T07:53:26.395596+05:00 suse kernel: [ 7878.946224] sd 2:0:0:0: [sdc] CDB:      2014-06-13T07:53:26.395598+05:00 suse kernel: [ 7878.946227] Read(10): 28 00 60 6d 5d 00 00 00 08 00     2014-06-13T07:53:26.395599+05:00 suse kernel: [ 7878.946228] end_request: I/O error, dev sdc, sector 1617779968     2014-06-13T07:53:26.395601+05:00 suse kernel: [ 7878.946229] Buffer I/O error on device sdc2, logical block 12486816     2014-06-13T07:53:26.395602+05:00 suse kernel: [ 7878.946245] sd 2:0:0:0: [sdc] Unhandled error code     2014-06-13T07:53:26.395608+05:00 suse kernel: [ 7878.946254] sd 2:0:0:0: [sdc]       2014-06-13T07:53:26.395611+05:00 suse kernel: [ 7878.946254] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK     2014-06-13T07:53:26.395612+05:00 suse kernel: [ 7878.946255] sd 2:0:0:0: [sdc] CDB:      2014-06-13T07:53:26.395615+05:00 suse kernel: [ 7878.946258] Read(10): 28 00 60 6d 61 00 00 00 08 00     2014-06-13T07:53:26.395616+05:00 suse kernel: [ 7878.946259] end_request: I/O error, dev sdc, sector 1617780992     2014-06-13T07:53:26.395618+05:00 suse kernel: [ 7878.946260] Buffer I/O error on device sdc2, logical block 12486944     2014-06-13T07:53:26.395624+05:00 suse kernel: [ 7878.946281] sd 2:0:0:0: [sdc] Unhandled error code     2014-06-13T07:53:26.395626+05:00 suse kernel: [ 7878.946282] sd 2:0:0:0: [sdc]       2014-06-13T07:53:26.395628+05:00 suse kernel: [ 7878.946284] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK     2014-06-13T07:53:26.395629+05:00 suse kernel: [ 7878.946285] sd 2:0:0:0: [sdc] CDB:      2014-06-13T07:53:26.395634+05:00 suse kernel: [ 7878.946286] Read(10): 28 00 60 6d 69 00 00 00 08 00     2014-06-13T07:53:26.395636+05:00 suse kernel: [ 7878.946295] end_request: I/O error, dev sdc, sector 1617783040     2014-06-13T07:53:26.395637+05:00 suse kernel: [ 7878.946297] Buffer I/O error on device sdc2, logical block 12487200     2014-06-13T07:53:26.396515+05:00 suse kernel: [ 7878.946314] sd 2:0:0:0: [sdc] Unhandled error code     2014-06-13T07:53:26.396522+05:00 suse kernel: [ 7878.946315] sd 2:0:0:0: [sdc]       2014-06-13T07:53:26.396524+05:00 suse kernel: [ 7878.946316] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK     2014-06-13T07:53:26.396527+05:00 suse kernel: [ 7878.946318] sd 2:0:0:0: [sdc] CDB:      2014-06-13T07:53:26.396529+05:00 suse kernel: [ 7878.946319] Read(10): 28 00 60 6d 79 00 00 00 08 00     2014-06-13T07:53:26.396531+05:00 suse kernel: [ 7878.946323] end_request: I/O error, dev sdc, sector 1617787136     2014-06-13T07:53:26.396533+05:00 suse kernel: [ 7878.946325] Buffer I/O error on device sdc2, logical block 12487712     2014-06-13T07:53:26.396534+05:00 suse kernel: [ 7878.946344] sd 2:0:0:0: [sdc] Unhandled error code     2014-06-13T07:53:26.396536+05:00 suse kernel: [ 7878.946346] sd 2:0:0:0: [sdc]       2014-06-13T07:53:26.396538+05:00 suse kernel: [ 7878.946347] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK     2014-06-13T07:53:26.396540+05:00 suse kernel: [ 7878.946348] sd 2:0:0:0: [sdc] CDB:      2014-06-13T07:53:26.396542+05:00 suse kernel: [ 7878.946349] Read(10): 28 00 60 6d 99 00 00 00 08 00     2014-06-13T07:53:26.396544+05:00 suse kernel: [ 7878.946354] end_request: I/O error, dev sdc, sector 1617795328     2014-06-13T07:53:26.396546+05:00 suse kernel: [ 7878.946356] Buffer I/O error on device sdc2, logical block 12488736     2014-06-13T07:53:26.396548+05:00 suse kernel: [ 7878.946374] sd 2:0:0:0: [sdc] Unhandled error code     2014-06-13T07:53:26.396550+05:00 suse kernel: [ 7878.946376] sd 2:0:0:0: [sdc]       2014-06-13T07:53:26.396552+05:00 suse kernel: [ 7878.946377] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK     2014-06-13T07:53:26.396554+05:00 suse kernel: [ 7878.946379] sd 2:0:0:0: [sdc] CDB:      2014-06-13T07:53:26.396556+05:00 suse kernel: [ 7878.946379] Read(10): 28 00 60 6d d9 08 00 00 08 00     2014-06-13T07:53:26.396557+05:00 suse kernel: [ 7878.946401] sd 2:0:0:0: [sdc] Unhandled error code     2014-06-13T07:53:26.396560+05:00 suse kernel: [ 7878.946403] sd 2:0:0:0: [sdc]       2014-06-13T07:53:26.396561+05:00 suse kernel: [ 7878.946404] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK      Unfortunately, I can't figure out at which block/sector did the issue occur, so I can restart ddrescue from that point on, skipping the troublesome area. For now, The same was the case with testdisk when I tried to list the files for recovery; after I had painstakingly selected all the files to copy, testdisk failed to copy a single one of them because the drive had disappeared during the scanning I think. For now, I have restarted ddrescue with this :               ddrescue -n -v -T 30 -A --retrim -d -i 150G --skip-size=500k,10M --min-read-rate=50k /dev/sdc2 /media/rescue/Drive2.img /media/rescue/Drive2.log      But as it is bound to repeat the disappearing drive phenomenon again and producing an incomplete/almost-useless image, I really need some help in figuring out a way to skip the sectors that are causing this problem, or any other tips to recover the data.


How to restart KDE window decorations without loosing the running X session

For graphics editing of some special graphics formats I am using a java program called imagej. This has the annoying bug that one special function tends to kill KDE's window decorations if it has too many images open. At the moment I solve this by switching to a `tty` and restarting the `kdm` service. The downside of this solution is that I am kicked out of my running X session which may result in some lost work if there were still unsaved files open. Is there another way to restart my window decorations without getting logged out of my current X session? As it may be of importance:   * Kubuntu 12.04   * KDE 4.10 from the `kubuntu-ppa/backports` repo. Same problem already occurred with the stock KDE 4.8.5 from kubuntu 12.04


Can I use and install Ubuntu packages in Debian?

I'm looking to install Linux Mint on my main work computer. Presently, I'm running Ubuntu 10.04 on it after upgrading from 9.10 (both 64bit). Previously, I have always backed up and formatted my hard disks, installing from scratch, as the distribution upgrades typically screw things up and slow things down. The problem is that usually, doing this kind of upgrade takes a long time, about a whole man-day, from backing up to installing the new system to installing and configuring all of my software, etc. I don't really have this kind of time laying around to spend 8-12 hours every four months to upgrade things. I'm pretty much ready to convert over to Linux Mint, my main decision is between the Ubuntu based version or the Debian one. My main question is if I can install Ubuntu packages and packages from Launchpad on LMDE (Linux Mint Debian Edition). I want a rolling version, I like living on the bleeding edge. Is it possible to essentially use Debian like Ubuntu, except keep it rolling?


FreeBSD and Windows show different times

In a dual-boot system, I usually use FreeBSD 9 but when I boot to Windows 7 my system time in both OS automatically change and show incorrect time. What's the problem and How can I solve it?


How to create a user with given password on SuSE from command line?

I need to create bunch of new users with given password. What I want is a script that I would pass the user name of new user and it will create/add the user and set its password. (the password is the same for all new users - no security issues here.) Any suggestions how to do that on SuSE from command line?


Organizing messy folder based on filetype

I have music lying on my desktop and in my downloads and Music folders. Similarly, I have .odt files lying all over my home folder (mainly desktop). Is there a tool (preferably GUI so my parents can use it later) that sorts all these files into folders (/music, /docs, /others) for some peace of mind?


Linux commands to fetch all files,size and path of files from all directories and subdirectories

Can anyone please guide me, how do I use Linux commands in PHP code to fetch all files names and their size and path of files from all directories and subdirectories. I am running a scan code. where I need to fetch the files and perform a scan. The issue is that when I run on linux server it takes too long to perform the scan. So, i thought of adding linux commands to my php script and check that if server is linux then instead of my function, those coomands can be used and hence increase increase the speed of scan.


Where are the variables stored for mate-calc?

I know that there's no way to delete them by default in the application, but they have to be stored somewhere? I'm pretty handy with the command line, so I can do some such there. I believe that mate-calc is based on gcalctool, so perhaps the solution to one is the same as the other?


Multi Head monitor with Intel HD Graphics - random black screen

I experience some troubles with a 3-head monitors configuration :   * hardware is an Intel NUC Core i5 - HD Graphics 4000 with 3 outputs (1 HDMI, 2 Mini-DP)   * debian wheezy, kernel 3.2 My Xorg configuration works well: one desktop on three screens, with xrandr commands to resize each screen and set position ... but the result is exactly what I need and works fine. Randomly at X start, one of the 3 screens - generally the same but sometimes another - remains black (not really black, more in stand by). And randomly 3 works well. For xrandr and xset q, everything is ok. I can get the black screen back with a:               xset dpms force off && xset dpms force on      (a `chvt 6 && chvt 7` works well too) This command gives me the 3 screens back, or one of these remains black (not always the same), but at 3th or 4th attempt, it's ok. The problem is exactly the same with different monitors and different NUC. The point is I want it working by itself, without any interactions. So I'm searching a way:   * to detect when one monitor is in this "black" mode (to run automaticaly the xset command until all screens are ok). But I have no leads to detect that.   * or to be sure the screens are "waked up", as a regular poke How can I solve this?


Create cron as a apache user and run as root user

I am creating this cron as apache user and want to run this cron as root, below is my code snippet:               # Create a cron job to restart apache     cron_file="/etc/cron.d/restart_apache_crontab"     cron_job="*/1 * * * * root condrestart-apache.sh"     echo "$cron_job" > $cron_file     chmod 777 $cron_file     exit 0      Provided sufficient privileges to cron.d directory (changes directory group to apache user) and script generated a cron file restart_apache_crontab at /etc/cron.d/ using the above script condrestart-apache.sh contains below code and has sufficient access permissions for apache user:               rm -f /etc/cron.d/restart_apache_crontab     /sbin/service httpd restart > restart-apache.log      This will first remove cron and then restart apache (means cron will run only for 1 time) I am able to create cron as apache user but not able to execute it as root user. Please help me on this.. code snippet will be really helpful..


AIX question on cp command

I have come across an issue with cp command. We are using ksh and cp command goes like below               cp -p $PATH/file_name_${VARIABLE}_???.dat $PATH/file_name_to.dat      ??? - is for any three digit numbers. This has been running in a job for long time without any issues. All of a sudden, today this job failed with this error.               **cp -p $PATH/file_name_20140911_942.dat $PATH/file_name_20140911_942.dat $PATH/file_name_to.dat     cp: $PATH/file_name_to.dat: A file or directory in the path name does not exist.**      $PATH was expanded correctly in our job log. Could someone clarify me what could have caused the from file to appear twice in cp command which caused it to fail.


How to add Public IP to Cent OS

I am trying to configure a Public(Static) IP in Cent OS 6.4. For this, I made a copy of eth0(added local IP, so that I can connect the system to Internet) and named it to eth0:0(added Public IP, so that the system can be accessible via SSH). After restarting the network devices, am still not able to get the required result. I want to access this system via SSH with the configured public IP.


Wget images issue from api_key

We have a vendor that sends us xml feeds of new items with the appropriate path and image name. I created script that will strip the web address path for the image, but if I try to obtain these with wget I get a protocol error. I tried using `wget -i list.txt`. If I use other tools similar I do not have an issue. What would be causing the issue and what is best suggested?


How should I prevent data corruption on an NTFS partition shared by Windows and Linux?

I use Linux for most of the things but I still need Windows sometimes. So, I have Linux Mint 14 and Windows 8 installed (dual-booting) on my computer with the following disk setup:   * `sda1`: The 350 MB partition Windows 8 allocates (I still don't know why.)   * `sda2`: Windows installation   * `sda3`: My shared NTFS drive   * `sda5`: Linux Mint 14 installation   * `sda6`: Swap area for Linux Mint Most of my files are in `sda3` which I share between the two OSs (kind of like my backup partition). I can access it from both operating systems. However, sometimes my files get corrupted. Example: I recently downloaded Eclipse and extracted it to a folder in sda3 drive in Linux Mint. It was working fine. Then when I switched to Windows, it asked me to repair my drives because there were some errors. I accepted, Windows did some scanning and restarted. When I switched back to Linux Mint, I noticed that Eclipse wasn't working. When I checked, most of the files in Eclipse folder were corrupted. Similar things happen other way around as well. Sometimes I'm not able to see and/or open files in Windows that I created/downloaded in Linux Mint. I'm tired of losing files like this. Is it a hardware issue? (My computer is kind of old) If not related to hardware, is there a better way to share data between OSes than what I currently have? (a separate NTFS partition for both)


Decrease crypted LVM partition

On a Linux Mint install, I used the option to use whole disk and encrypt it.   Now, I want to install Windows on another partition.   How I can safely decrease size of this encrypted LVM? Of course, partitions created by installer.


Are threads which are executing blocking system calls awoken by interrupts?

I've been reading a bit about threads and interrupts. And there is a sections which says that parallel programing using threads is simpler because we don't have to worry about interrupts. However, what is the mechanism in which signals the release of the blocking system call if not an interrupt? **Example** I read i file in my thread which use a blocking system call to read the file from the disk. During that time, other threads are running. At some point the file is ready to be read from the hard disk. Does it notify the processor of this via a hardware interrupt, so that it can do a context switch ti the thread which asked for the file?


CURL command execution

Can anyone explain me the below curl command and how it works :               STATUS_CODE=`curl –output /dev/null –silent –head –write-out ‘%{http_code}\n’ $next`     # If you want to set a timeout then add –max-time 15, here 15 is 15seconds


Create symbolic links with wildcards

I have multiple hard drives with the same directory hierarchy, for example:               /media/sda/dir1     /media/sda/dir2     ...     /media/sdb/dir1     /media/sdb/dir2      Two hard drives with similar names and similar directory names. I want to create separate symbolic links to dir1 and dir2 on every hard drive. The easiest way I have found is to use `cp -sR`:               cp -sR /media/sd*/dir1 /somedir/dir1     cp -sR /media/sd*/dir2 /somedir/dir2      However, this creates new directories in /somedir which has various side effects, for example, the directory timestamps are useless. How can I create symbolic links named dir1 and dir2 which link to /media/sd*/dir1 and /media/sd*/dir2? Files are regularly added to the hard drives so I would need to run these commands on a regular basis.


What could cause a cron to run twice at the same moment?

I have a cron that is setup to run every Monday at 1 AM               0 1 * * 1 /script/dir/script >> /script/dir/file.log      After two years of running as expected, it ran twice on June 18, with the second call occurring ½ - 1 second after the first. What could cause that to happen? It wasn't run either the first or second time by a human. The script is associated with a website but it is outside of the document root. Is it possible that the clock was synchronized at that same moment, forcing it backwards 1 second and rerunning the cron at 1 AM?


How does "options" in shell scripting work?

I found some code in one of the answers here and accommodated it to my needs but now I have two questions: **Q1:** how can I display the options text after the code in case statement finishes? So the user can see the options again. **Q2:** Can I make it so that every option is displayed on its own line when I run the script? Currently it is not.               options=(             "quit/exit"         "new rational db"         "run php for rational codebase"         "run php for playground codebase"        )          select option in "${options[@]}"; do       case "$REPLY" in            1) break;;            2) sudo -i -u db2inst1 bash -c "db2stop force;";;            3) rm /tmp/createDb2*;;            4)  ;;                      esac     done


32 bit OS memory limitation on NUMA systems

Running 32 bit Rhel 6.5 with kernel 2.6.32-431.el6.i686 on a server with 46 Gb RAM and NUMA support.               CONFIG_X86_PAE=y      Intel(R) Xeon(R) CPU E5-2660 0 @ 2.20GHz OS is not able to see more than 14GB RAM and **lscpu** not showing any NUMA nodes in output. **numastat** complains system as not NUMA aware. **config-2.6.32-431.el6.i686|grep -i numa**               CONFIG_X86_NUMAQ is not set     CONFIG_NUMA is not set      **free -lm**                             total       used     free       shared    buffers     cached     Mem:         14682        697      13985          0         89        408     Low:           242        230         12     High:        14439        466      13972      **numastat**               sysfs not mounted or system not NUMA aware: No such file or directory      **mount|grep sysfs**               sysfs on /sys type sysfs (rw)        * Can there be any limitation for 32 bit OS on NUMA systems?   * Why is OS not able to access 46 GB(2^36 > 46 Gb) even with PAE,is it because of NUMA disabled? **On 64 bit its working fine.**


AIX ftpd - how to set umask for a given user?

I know how can I change the umask settings for all the users using ftpd, but how can I change the umask for a given user using FTPD? AIX/6100-05-02-1034 FTP server (Version 4.2)


Change behaviour of the modifier keys system-wide

I’d want to make modifier keys (control, alt, shift, meta, super, lv3_switch) to act like usual keys, I mean, without holding one of them to perform associated key combination. Say C-x M-1 can by typed like               press Ctrl key — release Ctrl key      press x key — release x key      press Meta key — release Meta key      press 1 key — release 1 key      so that can be performed even with one hand key-by-key!


Make a linux network device a router

I am developing an IPv6 network device driver. It should behaviors like a router, i.e. send router advertisement regularly. But now my device is working like a node, send router solicitation. What should I do to change it to a router? Thanks.


Re-installing Windows 7 on a dual boot system with Fedora

At present I have a dual boot system with Windows 7 and Fedora 14. I want to re-install windows 7 but most probably it will replace Fedora's boot loader. I have a lot of things set up on Fedora. I want to keep these things intact. In other words, I want to make an image of my present Fedora system, re- install Windows 7 and have my Fedora system retain the exact state it had before re-installation of Windows 7. Can any one discuss the procedure to achieve this?


Linux-image-3.2.0.4-amd64 vs linux-image-amd64

Installing Debian I have to choose between the kernels   * `linux-image-3.2.0.4-amd64`   * `linux-image-amd64` What's the difference?


Zip file using tar on linux server

I'm trying to make a zip file out of some files but when I extract the zip I only get 1 file.               tar cfvz test.zip file1.mp3 file2.mp3 file3.jpg      And after I extract test.zip I only get a "test" file.The size of the zip size is ok, I just don't know how to make this work so that on extract I get the same files:"file1.mp3 file2.mp3 file3.jpg"


TAB autocomplete on sudo sh

When I say `sudo sh`, `TAB` stops working as autocomplete signal on my Debian. How can I enable `TAB` key autocomplete after I say `sudo sh` ?


VoIP dialer for SIP

I have some Java, so am biased in that direction, but not overly so. None of the Java suggestions: http://stackoverflow.com/questions/16471795/sip-client-for-java http://stackoverflow.com/questions/498043/what-is-the-currently-popular-java- sip-library jump out as fantastic solution. What's "the" best FOSS dialer? By "best" I mean simplest to deploy. The requirement is preview dialing: > Preview dialing enables agents to first view the available information about > the customer and decide when to place the call. In addition to the > information about the customer, agents may also view all the history of the > customer with the contact center. After viewing the information about the > customer, the agent requests the system to make the call. http://en.wikipedia.org/wiki/Dialer#Preview Currently, hard phones connect with SIP to a hosted Asterisk PBX. The goal is to replace the hard phones with soft phones, such as zoiper, **and** speed up the dialing process. ViciBox looks very interesting, but would, apparently, create a bottleneck with the hosted PBX and is overkill. If I could deploy just the dialer and interface, but use the hosted Asterisk PBX, that would be good. However, it would probably be a bit complex to install. I'm looking for a quick and dirty solution. Down the road, it will probably be ViciBox, but the easiest and quickest to install and configure would best. Of all the FOSS dialers, which can be installed stand-alone easiest, and has a strong community? I suppose it's technically possible to checkout the code for ViciDial, but that's more involved than I would like. Optimally, I would like a FOSS dialer, with a queue, which pops a record from the database, sends it to an agent, the agent dials, edits the file, and updates the record. That's exactly what ViciBox does, except, in this case, Asterisk isn't required.


Dark blue color in vim or ls output in linux

I have a problem with dark-blue color in `vim` or `ls` output. Because I'm using black background color, words colored in dark-blue are almost completely invisible. How can I address this problem?


What could DUP mean when using ping?

What could DUP mean when using ping?


ls for cut -f string not working

I have a problem with feeding `cut` output to `ls`.   This doesn't work:               rep="S1_1000,0000-00-00c,0000-00-00d,0000-00-00e"       ls tab_yeast/{`echo $rep | cut -f2- -d','`}*.tab.gz       ls: cannot access tab_yeast/{0000-00-00c,0000-00-00d,0000-00-00e}*.tab.gz: No such file or directory      while ls over that string works:               ls tab_yeast/{0000-00-00c,0000-00-00d,0000-00-00e}*.tab.gz        Any idea?


Escaping quotes for scp

I needed to write a that behaves correctly with nasty (spaces, braces, etc..) filenames.               scp -rv "$1" shiny:/Volumes/Seagate3To/\"$1\"      This function works, but I don't understand why the quotes need escaping in the second argument of `scp`.


Align text to center with padding on both sides

Is there an easy way to align text to the center with padding on both sides, with the column width being the longest line from the input? For example, this:               aaa     bbbb     c     ddddd     ee      will turn into this (the dots represent spaces):               .aaa.     bbbb.     ..c..     ddddd     .ee..      Any tool is fine. Be it `sed` or `awk` or a bunch of `coreutils` tools. **Edit** : I think some of you misunderstood the output. The output is padded with _spaces_ , not dots. I've used dots here just to make it more clear.


Help improving my AWK skills

This program works as I intended but I feel like I used some clumsy methods to get the out put I desired(especially with my use of print commands and variable declarations)      Could some one improve this script so I can see where I could improve?   Does some one want to show me some crazy bummed version of this?   Is setting variables in the BEGIN block which "runs every line !@#!#@!" how you are supposed to set a variable in AWK?                 #!/usr/bin/awk -f     BEGIN{     FS=",";     recordsCursor=1;     number=0;     #spacer="_";     #copies=3;     }     {         while(number++ <=copies){             while(recordsCursor <= NF){                 if(recordsCursor==1){                 printf($recordsCursor);                 printf(spacer);                 printf("%.3d,",number);                 }else if(NF != recordsCursor){                     printf("%s," , $recordsCursor);                     }else{                     printf("%s" , $recordsCursor);                     }             recordsCursor++;             }         recordsCursor=1;         print "";         }     print "";     number=0;     }      > >     Command: ./test.awk -v copies=3 -v spacer=_ input >   Given input:               madison_Leaderboard_728x90,728x90,Leaderboard ads for Madison,no,,,,,,,_blank,image,web     madison_Bullseye_300x250,300x250,Bullseye ads for Madison,no,,,,,,Bullseye,_blank,image,web     madison_Button_155x155,155x155,Button ads for Madison,no,,,,,,,_blank,image,web      Correct output:               madison_Leaderboard_728x90_001,728x90,Leaderboard ads for Madison,no,,,,,,,_blank,image,web     madison_Leaderboard_728x90_002,728x90,Leaderboard ads for Madison,no,,,,,,,_blank,image,web     madison_Leaderboard_728x90_003,728x90,Leaderboard ads for Madison,no,,,,,,,_blank,image,web     madison_Leaderboard_728x90_004,728x90,Leaderboard ads for Madison,no,,,,,,,_blank,image,web          madison_Bullseye_300x250_001,300x250,Bullseye ads for Madison,no,,,,,,Bullseye,_blank,image,web     madison_Bullseye_300x250_002,300x250,Bullseye ads for Madison,no,,,,,,Bullseye,_blank,image,web     madison_Bullseye_300x250_003,300x250,Bullseye ads for Madison,no,,,,,,Bullseye,_blank,image,web     madison_Bullseye_300x250_004,300x250,Bullseye ads for Madison,no,,,,,,Bullseye,_blank,image,web          madison_Button_155x155_001,155x155,Button ads for Madison,no,,,,,,,_blank,image,web     madison_Button_155x155_002,155x155,Button ads for Madison,no,,,,,,,_blank,image,web     madison_Button_155x155_003,155x155,Button ads for Madison,no,,,,,,,_blank,image,web     madison_Button_155x155_004,155x155,Button ads for Madison,no,,,,,,,_blank,image,web


Avoid mutt sending mail with too many entries in To: or Cc: fields

Frequently, I use `mutt`'s alias functionality, to send a message to larger groups of people (legitimate, not spam!). Normally, I put the alias into the `Bcc:` field, to cancel out spam harvesters, and for privacy reasons (not all recipient know each other). By accident, I sometimes put the alias into the `To:` or `Cc:` field, where it is expanded, revealing all addresses do all recipients. This is very bad, since once sent, the information is leaked, and there's no way back.   * How can I make `mutt` refuse to send a mail, if there is more than, say, 1 entry in the `To:` or 5 entries in the `Cc:` field?   * Improvement: How can I make `mutt` send the mail anyways, if I add a user-defined header, e.g., `X-limit-cc: 50`? Setting up a separate mailing list service is not what I'm asking for, this would rather be a separate solution to the problem.


Emacs ansi-term and term not working well when I ssh into a remote machine

I have the exact same Emacs configuration on a local and remote machine, and when I run `M-x ansi-term` or `M-x term` on each of them individually everything works great. However, if I run any of these term emulators on Emacs on the local machine, and then I ssh into the remote machine, the prompt is not displayed correctly and my input doesn't work well either. Any ideas what may be causing this?


CentOS boot problem

We're using VMware Server which is running on CentOS in our company environment. As you can see,now the only thing holding this up is the CentOS can't boot. Also, I am guessing it sounds like a superblock corrupt. What might be the problem? ![sreenshot](http://i.stack.imgur.com/vCsq1.jpg)


Apostrophe appearing as space

I am trying to insert the following message:               friend's mobile number      from a file over redhat server into sql server 2005.   this message is appearing in the sql server as below:               friend s mobile number      where the apostrophe is appearing as a space, I tried different escape characters but still didn't work. How can I fix this?


How to make data-recovery very-very hard or impossible for Unix -computer before reselling?

I resell my Thinkpad and I want to make sure its old content in the harddrive is not readable. The Thinkpad has now Debian -installed but I sell it as-is so no OS needed. How can I can rewrite the harddrive so many times that it becomes unreadable with any recovery -program?


How to add the RPM Fusion and livna repositories to Fedora?

RPM Fusion and Livna.org are common third party package repositories for Fedora. You need them if you want to install media players, codecs and/or DVD playback libraries that are not part of the primary Fedora repository because of assumed issues like distribution licensing or similar. Thus my question how to enable them in Fedora (>= 17)?


Text-based mail client with usability

I have fond memories to using `pine` and `emacs/rmail` for reading mail in the 90's. At some point I switched over to Gmail plain HTML, but I recently realized I really miss navigating mail with cursor keys, replying with R, etc. And that QUICK, QUICK response to every action that did not involve an HTTP request to some far-off server. With this in mind, I tried `alpine` and `mutt` a year ago, and they were extremely complex things. A million settings, and they insisted on downloading my 100.000 emails from Gmail, which of course took forever, and searching was dead slow, and there were so many ways to get lost. What I suspect, is that UNIX mailers are super-complex, historical beasts trying to cater for every UNIX guru's possible need, with configuration files that require a Ph. D. in astrophysics. What I'm wondering is, has someone who has taken the following approach: Make a lightweight, text-based email client for UNIX terminals, but with great simplicity and usability for everyday tasks such as replying/deleting/forwarding mail, threading, super-fast searches even for huge mailboxes, and simply for getting quickly through your inbox. And yeah, some brilliant, seamless way of viewing attachments (this being a text-based environment). Sort of a "take the best from the minimalism from UNIX and combine it with the usability of the modern Web" kind of approach. I think I would start crying if someone had actually made this.


How to use expandos in backtick shell command

In my `.muttrc` I have `attribution` set to emulate Outlook-style message quoting like this:               set attribution="\n\n-----Original Message-----\nFrom: %f\nSent: %d\n%t\nSubject: %s\n"      However, the `%t` expando evaluates to "To Persons_Name" with no colon after the "To" so I'd like to run it through a shell command to add the colon. I can use backticks to run a shell command but I can't figure out how to get the value of the `%t` expando in the shell command. I've tried this but it doesn't work:               set attribution="\n\n-----Original Message-----\nFrom: %f\nSent: %d\n`echo %t | sed s/^To/To:/`\nSubject: %s\n"


log freeradius ip address with username

i configured a mikrotik with linux(freeradius+rsyslog+mysql) to authenticate and log users activity. now i want to log users visited urls, but only ip addresses of users and visited urls are logged. what should i do if i want to log usernames + visited urls in my database? users ----------> mikrotik -----> Linux_Box (freeradius + rsyslog + mysql) **is there another way rather than assigning ip addresses to usernames?**


Multiple Command List After Shell Conditionals, &&, ||. Shell Script, Dash

I'm trying to do multiple commands after a condition, so for example...               [ $VAR ] || echo "Error msg" ; echo "exit"      and the Inverse               [ -z $VAR ] &&  echo "Error msg" ; echo "exit"      I know that won't work as intended, I actually knew how previously and forgot how to do this. I'm fully aware of the many alternatives, such as using `if`'s or bracketing via `()` and `{}` . Using `()` will create a sub process which wouldn't exit a running script. Using `{}` will work, but I know a more readable alternative exists. I have done this with a `:`, and it was perfect!!! I just can't remember now for the life of me, and I lost that previously written script. If anyone knows how to write this with the `:`'s, I would really appreciate any help!


Why use a pts for xterm or anything

I keep reading on multiple sites that pts device files are used for pseudo- terminals which are "not directly connected to the hardware" (ssh, telnet). _Since xterm running on you machine is directly connected the output on your keyboard and the display on your screen, why does this use a pseudo-terminal device file?_ I read the other question regarding ttys pts, ... and it didn't seem to cover this.. _Also, what is the need for a "pseudo terminal," if it's ultimately a device file with input and output why does it matter what it's coming from?_ Thanks in advance


Dell XPS 15 runs hot on linux

I'm worried about my Dell XPS notebook. When I'm on Linux, its temperature is always higher than on Windows. I was facing some pretty ugly slowdowns earlier today and it shut itself down the first time today too (then I noticed it was really hot). I'm on openSuse 12.1 currently, but on Ubuntu (10.10, 11) and Mint (Lisa, I think) I got worried about the notebook being too hot too. I know there's the Optimus stuff but I'm thinking this is not the answer I need, I'm on linux most of the time because I'm working and browsing and I switch to Windows only when I'll play something so I'm not worried about running Minecraft or anything too graphical on linux. I'm worried about it overheating, slowing down, shutting down and eventually breaking. Lets go to the numbers. `sensors` in openSuse 12.1 running gnome-shell (probably was higher when I had slow downs/shut down)               temp1: +84.0°C (crit = +100.0°C)     temp2: +84.0°C (crit = +100.0°C)          nouveau(GPU)          temp1: +73.0°C (high = +100.0°C, crit = +110.0C      `sensors` in openSuse 12.1 with iceWM (lighter graphical interface)               temp1: +74.0°C (crit = +100.0°C)     temp2: +74.0°C (crit = +100.0°C)          nouveau          temp1: +68.0°C (high = +100.0°C, crit = +110.0°C)      On Windows, CPU stays between 40°C-50°C and GPU in the mid 50°C. I'm guessing 84°C is too high. `lspci`               00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)     00:01.0 PCI bridge: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port (rev 09)     00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)     00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)     00:1a.0 USB Controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 05)     00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 05)     00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b5)     00:1c.1 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 2 (rev b5)     00:1c.3 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 4 (rev b5)     0    0:1c.4 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 5 (rev b5)     00:1c.5 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 6 (rev b5)     00:1d.0 USB Controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 05)     00:1f.0 ISA bridge: Intel Corporation HM67 Express Chipset Family LPC Controller (rev 05)     00:1f.2 SATA controller: Intel Corporation 6 Series/C200 Series Chipset Family 6 port SATA AHCI Controller (rev 05)     00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 05)     01:00.0 VGA compatible controller: nVidia Corporation Device 0df5 (rev a1)     03:00.0 Network controller: Intel Corporation Centrino Wireless-N 1000     04:00.0 USB Controller: NEC Corporation uPD720200 USB 3.0 Host Controller (rev 04)     06:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)      So what to do? Is the GeForce card always running here (Linux) while on Windows it's on the Intel GPU?   If so, can I make it so it will only always on the Intel card? Can this help? Will I lose graphics acceleration (and gnome-shell) in this case? Edit: I had uninstalled Nouveau Nvidia driver in hopes that it would turn the Nvidia card off to see if I had a better luck. I don't know if this is related but just now my notebook was idle, I was watching a movie, and then came back to my laptop to check on it on imdb. I had a terminal open and 2 or 3 tabs of chrome, on gnome-shell, and when I ran `sensor` CPU was at 98.0°C, and GPU at 92.0°C... Edit: @Icarus I'd guess it's the second option, before when it was slowing down I was running top and the 'offending' processes were Chrome and Gnome- shell, but really it was probably the CPU/GPU getting too hot and lagging, it doesn't make much sense because this is a potent notebook, I play Battlefield 3 on 64 person maps without any problems Edit-part-two: I've switched the Nouveau driver to the proprietary Nvidia one, Ive lost graphic acceleration(this has always happened when using Nvidia driver on this notebook) but 'sensors' now is constant on 74.0°C and I can at least feel confortable enough to work here... I'm intrigued because there's got to be more people on this new Dell XPS running linux, but it's being way hard to find any useful info on this...


Checking video card load via command line

Is there a command like `cpustat` or `iostat` or `memstat`, but for the video card? Or some indication in `/proc` or `/sys`?


what is the zsh equivalent of bash's export -f

So I started using `zsh`. I like it all right. It seems very cool and slick, and the fact that the current working directory and actual command line are on different lines is nice, but at the same time, I'm noticing that `zsh` can be a bit slower than `bash`, especially when printing text to the screen. The thing I liked best was the fact that `zsh` was 'backward compatible' with all of the functions I defined in my `.bashrc`. One gripe though. The functions all work perfectly, but I can't figure out how the exporting system works. I had some of those `.bashrc` functions exported so that I could use them elsewhere, such as in scripts and external programs, with `export -f`. In zsh, exporting doesn't seem to even be talked about. Is it autoloading? Are those two things the same? I'm having a seriously hard time figuring that out.


Fast and Small C++ https proxy

I'm looking for a small, fast, and reliable https proxy that I can extend to do the following:   1. Look for https handshake requests.   2. Run a regular expression against the host name being requested.   3. If the expression matches the host name then don't send the request on but respond with a 302 redirect to a different site. So, I guess I have the following questions about this:   1. Is this possible? (I'm pretty sure the handshake request is not encrypted, I know I can do some pattern matching, the real question is...would I be able to send a fake 302 redirect to the client without it complaining about not having completed the handshake?)   2. If it is possible, is there a linux app out there that does some or all of this? (I found this: http://www.kubat.nl/pages/microproxy) I was considering trying to build the remaining features into it but didn't want to try that if something else already does it.   3. Do you have suggestions for other C++ Linux proxies I might be able to build this into? Thanks in advance for your feedback. EV


Debugging bash functions

So here I have a simple function that I wish to debug. However, I am unable to debug the desired function even with `set -o functrace` enabled. Before resorting to asking this question, I had managed to find a possible solution that did not produce the desired results, which is located here. How can I get bash debug my functions?               #!/bin/bash     echo "Hello World"     hello() {         echo "Hello world"     }      output:               user@mac11:53:29~/desktop bash -x debug.sh      + echo 'Hello World'     Hello World     user@mac11:54:55~/desktop


/opt/nvidia-smi from nvidia-drivers pack outputs "failed to load nvidia kernel module"

Actually I have nouveau string in make.conf. "Nvidia-smi has failed because it couldn't communicate with NVIDIA driver. Make sure that latest NVIDIA driver is installed and running."


Securely Deleting A File In Ram

I'm running a live distro in ram. I need to write a password to a file. Later, I need to delete it securely. I don't know how live file systems work, so I'm unsure if I open the file for writing, then write over it with data the length of the password, if it actually will write over that exact memory location or not. The goal is to securely delete the file by writing over it. I don't know if journaling happens in Live Linux distos. If so, is it possible to create a virtual file system in ram? I could then just write the password there and dd will securely write from beginnig to end of the volume. What are my options?


Ubuntu install spanning multiple disks

Having to reinstall the operative system from scratch on an EeePC 901, which has two SSD disks, 4GB and 16GB, is it possible to install it using both disks as if they were one?