title: Does yum's --enablerepo option only enable a repo for the current command?

text: Does yum's `\--enablerepo` option only enable a repository for the duration of the current command? For example if the `enabled` setting in `/etc/yum.repos.d/remi.repo` file is set to `0` (disabled) and I run:               yum --enablerepo remi,remi-php55 install php      Are the repositories specified (`remi` and `remi-php55`) only enabled for the duration of the `install` command? Is there a way to persist the `enabled` setting using `yum` instead of editing a `.repo` file directly?


How can I install the Epel repository on 64-bit Fedora 17 machine? I tried:               sudo rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-5.noarch.rpm      and               sudo rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-5-4.noarch.rpm      but I get a error:               Retrieving http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-5.noarch.rpm     curl: (7) couldn't connect to host     error: skipping http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-5.noarch.rpm - transfer failed      Any clues?


title: Apache 403 Forbidden on sub folders?

text: I can view all files in the root directory (/var/www) but as soon as i enter a sub directory (eg /var/www/test) i get a 403 Forbidden error. I'm running Ubuntu 12.04.01. Have tried searching for similar problems but found no solution. Any suggestions? I need to fix this urgently so any suggestions are very appreciated! **Update:** Checked error log in /var/log/apache2/error.log and it contains:               client denied by server configuration: /var/www/test/      **Update:** If i su into www-data and try to cd into any of the sub- directories it gives me the error:               cd test     sh: 4: cd: can't cd to test      **Update:** By doing ls -l in /var/www i get:               drwx------ 3 nicklas nicklas 4096 Sep 13 18:35 test      Could that be the issue? **Update: I fixed it!** I ran the following command, and it seems to be working fine now.               cd /var/www     chown -R www-data:www-data *


title: Colors not rendered correctly in oh-my-zsh themes

text: I'm trying to use colors in oh-my-zsh themes. It works fine on my home computer (ubuntu), but in a work computer (Scientific Linux i.e. Enterprise linux) the prompt colors are actually spelled out. For example, my prompt using the blinks theme looks like this (note this ISN'T the code, this is what appears as my prompt, except for my username and computername which I've replaced).               {black}{green}USRENAME{blue}@{cyan}COMPUTERNAME{green}     {yellow}{black}~{green} {black}{blue}±{black} %                            !{cyan}1128      To see what the blinks prompt should look like, you can look at the oh-my-zsh themes page. (I can't attach images yet with my current reputation).


title: How do I backup via rsync to a remote machine, preserving permissions and ownership?

text: Drive `A` is 2TB in a closet at home. Drive `B` is 2TB in my office at work. I'd like drive `A` to be the one I use regularly and to have rsync mirror `A` to `B` nightly/weekly. The problem I have with this is that multiple users have stuff on `A`. I have root run `rsync -avz` from `A` to `$MYNAME:B` Root can certainly read everything on `A`, but doesn't have permission to write non-`$MYNAME` stuff on `B`. How am I supposed to be doing this? Should I have a passwordless private key on `A` that logs into _root_ on `B`? That seem's super dangerous. Also, I'd prefer to use rsnapshot but it looks like they demand that I draw from `B` to `A` using the passwordless private key to root's account that I'm so frightened by.


title: When we use mv command, what changes take place in HDD?

text: Under following conditions-   1. `mv` within the same HDD partition   2. `mv` to a different partition in the same HDD   3. `mv` to a different device (e.g. USB HDD) Is the complete file moved or is it a very small change like some pointer reassignment ?


title: Which graphics board my OS is using?

text: Is there any way to specify which graphics chipset our OS should use? on machines with discrete GPU, when graphics driver installed linux will by default use GPU for UI but I want OS to use on-board graphics. Is there any way to do this? through BIOS?Xorg.conf? Machine conf: Linux 32bit GPU: NVIDIA Tesla


title: Can ssh_config's ProxyCommand run a local command before connecting to a remote machine?

text: Before I can to connect to a particular remote machine I have to run a certain local command. So instead of `ssh me@remote.machine` I have to do               local_command     ssh me@remote.machine      I would like to automate this so that I only have to do `ssh remote.machine`. I know that I can achieve this at the shell level by creating my own `ssh` script that calls `/usr/bin/ssh`, but can I do it using the ProxyCommand option of `ssh_config`? As far as I understand it, I need something like               Host remote.machine         ProxyCommand local_command; ssh me@remote.machine      in my `~/.ssh/config` file, but not exactly this of course because it's circular!


title: Can I break display devices with the xrandr command?

text: If use the `xrandr` command and set a wrong resolution/freq/..., can a break my display devices? For instance, by setting a very high refresh freq that one of the video devices involved (video card, monitor, ...) does not support.


title: Video player that uses multiple CPU/GPU cores in Linux?

text: I've got a relative with a four-cour AMD Phenom II 3.0 gHz CPU (can't remember exact specs) and ATI 5750 1GB graphics card, running Ubuntu 10.04. Right now I am aware of VLC and Mplayer for playing video files. But when playing 1080p mkv files, etc., the video stutters and lags pretty badly. Are these media players taking full advantage of the multi-core CPU and graphics hardware? Is there a software tweak, or just another video player that I could try? Thanks.


title: Print a line only if the next line does NOT contain a particular match

text: I am trying to search a log file for logged activities that did not complete. For example, I log a "Starting activity for ID 1234..." and if successful, the next line will be "Activity 1234 Completed." I'm trying to get the "Starting..." lines that are NOT followed by their corresponding "Completed" lines. **Example Log File**               Starting activity for ID 1234     ID 1234 completed successfully     Starting activity for ID 3423     ID 3423 completed successfully     Starting activity for ID 9876     ID 9876 completed successfully     Starting activity for ID 99889     ID 99889 completed successfully     Starting activity for ID 10011     ID 10011 completed successfully     Starting activity for ID 33367     Starting activity for ID 936819     ID 936819 completed successfully      In this example, I would be looking for the output to be:               Starting activity for ID 33367      ...because it's not followed by a "completed" line. I've tried doing this with `grep` and `awk`, but have not had much success. I'm assuming it can be done with one of those tools, but my `grep` and `awk` chops are not advanced. Looking for a quick and reliable `grep` or `awk` pattern to give the results I need here.


title: What's up with the metadata in the source? Are there tools for it?

text: I'm comparing two different kernel versions (one official, one from a manufacturer); there are thousands of file whose only difference is in metadata in the files. The metadata looks like '$:Key: value$'. Is there a set of tools that modify this stuff? What generates this data? Is there any way to do a diff without this polluting it without running the entire source through sed? An example:                   --- ./drivers/atm/idt77252.h  2010-10-05 14:53:01.787778390 -0400     +++ ../linux-2.6.21.x/drivers/atm/idt77252.h 2010-03-26 03:08:26.000000000 -0400     @@ -1,8 +1,8 @@      /*******************************************************************     - * ident "$Id: idt77252.h,v 1.2 2001/11/11 08:13:54 ecd Exp $"     + * ident "$Id: idt77252.h,v 1.1.1.1 2007-05-25 06:50:05 bruce Exp $"       *     - * $Author: ecd $     - * $Date: 2001/11/11 08:13:54 $     + * $Author: bruce $     + * $Date: 2007-05-25 06:50:05 $       *       * Copyright (c) 2000 ATecoM GmbH       *


title: UDEV rule when USB flash drive is unplugged

text: I wrote a rule to automount my USB stick to certain folder but when I unplug it the folder still mounted and when I `ls` there I see a lot of errors like: `Directory bread (block: NNNN) failed` I tried to use               SUBSYSTEM=="block", ACTION=="remove", RUN+="/bin/umount /media/disk"      it's not working. My mount rule looks like               SUBSYSTEM=="block", ACTION=="add", RUN+="/bin/mount -t vfat <options> /dev/%k /media/disk"


title: Changing privoxy configuration depending on time

text: I'm trying to use privoxy for parental control. What I want is blocking sites (blacklisting) depending on what time it currently is. I.e. No youtube videos from 5:00 am to 8:00 am. As far as I've seen, the privoxy configuration doesn't allow this kind of rules. I am willing to hack it with a cron-jobs. The question would then be: What is the recommended way to do this?   * Is there a API?   * Should I use curl to the rescue?   * Hack the config-files and force-reload the service? I'm sure I'm not the first one trying this, but I struggle finding anything useful.


title: Understanding udev rules and permissions in libusb

text: I had a problem with my scanner. Xsane worked only as root. Using it as normal user it didn't find any devices. Adding the user to the groups `saned` or `scanner` didn't help. Finally I solved the problem by changing               # 'libusb' device nodes     SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0664"      to               # 'libusb' device nodes     SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0666"      in `/lib/udev/rules.d/50-udev-default.rules` However I do not understand why this works and if it has any negative side effects. I guess that this gives write permissions to all users on any usb device, but I don't know if and why this is correct and why this solves the scanner problem. Could anyone explain in detail why this works and wether it has any side effects. My system is: `ubuntu 12.04`, the scanner is a `HP PSC 1200 all in one` device `hplip` is installed from the repository.


title: Methods of pasting X11 primary selection contents?

text: I like having a keyboard shortcut to paste contents of X11 clipboard. Right now, I have the following in my `.Xresources` file:               XTerm*VT100*translations: #override \n\         <Key>F2: insert-selection(PRIMARY,CUT_BUFFER0)      That makes the function key into a keyboard paste in an xterm window of whatever I've highlighted in some other xterm window. I like having keyboard paste a special key on my left hand, because that means I can move the mouse around with my right hand, and I don't have to move from mouse-to-keyboard- and-back with my right hand all the time. Does some more general method of doing this exist? I'm stuck using explicit copy-n-paste (control-C, control-V) in Firefox, and I'd like to use to paste everywhere.


title: How can I check GMail messages with prompt for password from a script?

text: I'm using zsh on Ubuntu 14.04 over SSH using Putty and I'm setting up the key bindings for my keyboard. Because zsh doesn't seem to make use of my function keys I thought I'd setup scripts to do operations similar to what the pictures on the keys represent. I'm working on the email button and I have it working pretty well but I would like it to be better. This is what I have in `~/.zshrc`:               # Ensure we are in emacs mode     bindkey -e          # This requires you to enable the ATOM feed in Gmail. If you don't know what that is then     # go ahead and try this and let it fail. There will then be a message in your inbox you     # can read with instruction on how to enable it. Username below should be replaced with      # your email id (the portion of your email before the @ sign).     _check-gmail() {         echo         curl -u username:password --silent "https://mail.google.com/mail/feed/atom" | tr -d '\n' | awk -F '<entry>' '{for (i=2; i<=NF; i++) {print $i}}' | sed -n "s/<title>\(.*\)<\/title.*name>\(.*\)<\/name>.*/\2 - \1/p"         echo         exit     }     zle -N _check-gmail               # F2 - Display Unread Email     bindkey "^[[12~" _check-gmail      When used like above it works. I'm having two problems. First and foremost, I would rather have it ask me for a password instead of leaving it in the script like this. This can easily be done by removing `:password` from the curl command at the command line but when used within this file it causes problems. Specifically, it appears to accept the first key press but the rest drop out to another shell which is not the password input. Second, the first time I run this in a shell it works perfect. After that it doesn't return to the prompt correctly. I need to press `Enter` to get another prompt. Is there a way to fix that? I've put the complete key bindings section of my `.zshrc` file on GitHub.


title: Cannot connect to WPA2, but connecting to WEP is fine

text: I'm trying to set up a connection to a WPA2-Personal network on a barebones Debian install. I've installed the firmware for my wireless adapter just fine (ipw2200) and can connect to open wireless networks perfectly. I've run through Debian's WiFi/HowToUse documentation a few times now, and each time it doesn't work. Here's my current configuration files: `/etc/network/interfaces`:               auto MyOpenNetwork inet dhcp         wireless-ssid MyOpenNetworkSSID          auto MyWPANetwork inet dhcp         wpa-conf /etc/wpa_supplicant/MyWPANetwork.conf      `/etc/wpa_supplicant/MyWPANetwork.conf`:               network={         ssid="MyWPASSID"         psk=LotsOfHexGeneratedBywpa_passphrase     }      Also, running `ifup eth1=MyNetwork` throws:               ioctl[SIOCSIWENCODEEXT]: Invalid argument     ioctl[SIOCSIWENCODEEXT]: Invalid argument      And `wpa_supplicant -D wext -i eth1 -c /etc/wpa_supplicant/MyWPANetwork.conf` throws:               ioctl[SIOCSIWENCODEEXT]: Invalid argument     ioctl[SIOCSIWENCODEEXT]: Invalid argument     eth1: Trying to associate with XX:XX:XX:XX:XX:XX (SSID='MyWPASSID' freq=XXXX MHz)     eth1: Association request to the driver failed      Any help would be much appreciated, thanks!


title: Canon network printer: Unable to open the initial device, quitting

text: I have a up-to-date Arch Linux and Canon drivers installed from the AUR (cndrvcups-lb). At work I have a Canon iR-ADV C5235 printer, that I want to get working. I added the printer via the cups webinterface, selected the correct driver and all, but on every print I only get               **** Unable to open the initial device, quitting      After some research I found that the error is related to Ghostscript, but I have no idea how to fix this. I also tried the ppd files from the Canon website - but then nothing prints at all.


title: Can't login as root even after resetting the password

text: We're running a small Centos 5 server in a virtual machine for a class assignment. For reasons unknown, starting about a week ago a number of services started failing. When we tried to investigate we discovered that we could no longer login as root. We booted into single user mode and reset the root password, but even after doing so, still got an error message of "Login incorrect" when logging in. We can login in as other users. At first we were not able to run the command su root. We would recieve the error message "cannot set groups operation not permitted." However we resolved that error by running the command chmod u+s /bin/su in single user mode. We still cannot log directly into root. Any thoughts on how to get root access back. It's problematic because we still can't get some services like ssh running with the setup we've got. The screen also locks up whenever we try to boot into the gui with run level 5, instead of the command line with level 3


title: OpenSwan - Cannot Reach Subnets other than my own

text: I have replicated a working VPN server hosted on AWS, it's has practically almost the same configuration but for the range of IP's delivered. I'm connecting to it through a MacBook (created a VPN connection), i get the IP but i whenever i try to login to anything but the same subnet i get a "connection timeout". The right side is setup to %any and there is no port issue that i can see, is there something i can check to figure out where to start troubleshooting this issue? Regards


title: Finding Writeable Remaining Space

text: I work for an organization where we employees are alloted separate space on a remote server. I SSH to that server, and the using **du** I get to know that free space shown is around 2 GB. But not all can be written by me. Is there any way by which I can know the **writeable** free space ? I am a linux newbie. Appreciate you guys help.


title: POSIX find all local files

text: I'm trying to write a cross-platform command line that will find all local files on a file system. My intention is to use the `find` command, using only POSIX parameters. Is there a way to skip files on remote filesystems, while restricted to only POSIX commands, and no programming? My current command line is               find -type f -print      but that obviously lists every regular file, not just local ones. I am aware of the `-local` flag, but as far as I can tell, it's not POSIX or otherwise part of a cross-platform standard. `locate` doesn't appear to be cross-platform either. I don't think the `-xdev` flag is what I'm looking for, either, as I want to search across all locally mounted file systems - if `/` and `/home` are both local, and I run `find / -xdev -print`, `find` should skip `/home` (unless I'm misunderstanding stuff). For what it's worth, the following URLs have been useful resources...   * http://www.unix.com/man-page/posix/1/find/   * http://content.hccfl.edu/pollock/Unix/FindCmd.htm


title: Regexp in .ssh/config

text: At work, I often have to log into hosts which follow a common naming scheme, e.g. `qc01` - `qc12`, `hc01` - `hc10`, and so on. All of these need to get the same config values in my laptop's `.ssh/config`. Of course, I could use entries for the hosts `qc*` and `hc*`, but I'm wondering if instead it is somehow possible to use regular expressions?


title: Why do programs run with sudo not have system theme applied?

text: I am currently running Linux Mint 14 - Mate Version and I have noticed that whenever I run a program with sudo, the system applied GTK theme(applied in "Appearance") does not work properly. Therefore it is unavoidable in programs like synaptic which require admin rights to run. How can I fix this? Here are two images. One of caja without sudo and one with. ![Caja without sudo](http://i.stack.imgur.com/OPk5O.png) ![Caja with sudo](http://i.stack.imgur.com/oJGst.png)


title: fetch data from Incoming mail in postfix

text: I have configured postfix for my kk.com domain successfully. Now I want to add function as described in the following example: If someone mails me at admin@kk.com, one php script will fetch information of sender email inside mail details and also (defined in php script) add and store in some mysql database and automatically forward this msg to another postfix account like rooot@kk.com . I have little information that I need to config main.cf file in postfix and set some called aliases. I have configured postfix first time and I don't have deep knowledge of it.. What is this technique called ? How can I make this possible?


title: How would I mount a linux shared folder on another linux system?

text: What I'm trying to do is to share my VM development web server's /www folder, to make it more convenient to transfer the HTML, PHP and web documents I have made to test on the web server. Would I have to use Samba to do this? Or would there be a simpler solution since I am using Linux-Linux.


title: Extracting SFX files in Linux

text: I am trying to extract an SFX file under Linux Mint 15 (64 bit) but it's not working. I've done chmod +x on the file and tried to run it like a script with no luck (it gives me an error that there's no such file or directory. What's interesting is that this worked for me when I was running Linux Mint 14 (64 bit). I found an article that mentions glibc support and how newer distributions have removed 32 bit glibc binaries but I'm not quite sure if this is accurate in my case since I'm not running RHEL. EDIT: I forgot to mention that I tried the solution posted on that article but it did not fix my problem. I've also tried using 7z, 7za, unzip, and unzipsfx with no success. unzipsfx gives me the error "unzipsfx: cannot find myself! [unzipsfx]" which I find rather strange. A quick note: The sfx relies on six other archives in the rar format. I'm not dealing with zip, 7z, or any other format like that. Am I doing something wrong? Something must have changed between distributions since extracting worked fine for me before...


title: permission denied executing script over ssh

text: When a web page is loaded on server A i want it to run a script on server B. I can do this with a series of commands from server A by logging into server B and executing the script, but it needs to be done all in one statement so that PHP can execute it. This works:               user@A$ sudo -u www-data bash     bash: /home/user/.bashrc: Permission denied      Then:               www-data@A$ ssh -i /etc/ssh/www-data/id_rsa remote@B     Welcome to Ubuntu 12.04.1 LTS (GNU/Linux 3.2.0-32-generic x86_64)      Then:               remote@B$ /home/web/script.php      (no output, but i can see the results in the database) So i can see everyone has access to get the message where it's going. But when i try to combine it into one statement:               user@A$ sudo -u www-data bash     bash: /home/zen/.bashrc: Permission denied      (as apache / php would be)               www-data@A$ ssh -i /etc/ssh/www-data/id_rsa remote@B `/home/remote/script.php`      then I get:               bash: /home/remote/script.php: No such file or directory     Welcome to Ubuntu 12.04.1 LTS (GNU/Linux 3.2.0-32-generic x86_64) ....      It also keeps me logged in to B which is irrelevant but strange. Then just as a sanity test, i continue from there to run the script:               remote@B$ /home/remote/script.php      Thanks in advance for any advice!!


title: When you try to terminate a process for good, which option for "kill" should you use?

text: I am getting a lot of mixed messages from people, and was wondering if it there really is not much of a difference in what you use.               kill 'x'     killall 'x'     kill -9 'x'      These are some options I've been told to use so far, but some people say that kill -9 is just overkill, kill by itself doesn't work, etc. Does anyone have any advice on which one should be used in the most standard case of just terminating a process (and thus its state as well)? [edit] I am looking for what to use when you want to stop the execution of your process so that you can run a new one, fresh from the start


title: Route a particular process over another gateway

text: I have 2 internet connections on differnet interfaces. I have eth0 which is internal ip of 192.168.1.70 and then I have another network connection to a different network which is on wlan0 192.168.43.193. I want to use the 1.70 as my primary interface, however I'd like to have everything except Deluged go out of the eth0 and all connections for deluge go out of wlan0 (43.193) I understand that you can only have one default gateway which currently I have to change depending on what I wish to do. I would prefer to keep my main outbound connections going via eth0 but still able to use wlan0 for specific processes. How can I go about this?


title: How to use networks default gateway dynamically?

text: I want to use specific interface for specific use from different different application. I am using Ethernet, Wi-Fi and 3G modem interfaces in my embedded Linux set-up. Now my set-up is up with Ethernet and ppp0 interface for communication and for both interface different different gateways and name servers are present. Here below I saw a output of **route -n** command:               Kernel IP routing table     Destination     Gateway         Genmask         Flags Metric Ref    Use Iface     10.64.64.64     0.0.0.0         255.255.255.255 UH    0      0        0 ppp0     10.99.8.0       0.0.0.0         255.255.252.0   U     0      0        0 eth0     0.0.0.0         10.99.9.1       0.0.0.0         UG    0      0        0 eth0     0.0.0.0         10.64.64.64     0.0.0.0         UG    0      0        0 ppp0      Now, how can i use specific interface's gateway to communicate?


title: Redmine install on CentOS

text: I'm trying to install Redmine on CentOS 5 following the instructions on the Redmine wiki. I've gotten to the "Configure Apache to host the documents" step without errors. That links to another tutorial, and the fifth step is to edit the Rails path, but I don't have Rails at the specified path. Where can I find it?


title: Is it possible to bind '2M' to a single key in w3m?

text: Pressing `M` in `w3m` launches the 1st external browser, `2``M` the second. While it is easy to bind the built-in command `EXTERN` to another key, is it possible to bind the second to another key?


title: No perldoc for POSIX?

text: On some other systems, like Ubuntu, `perldoc POSIX` works, but on Arch,               %> perldoc POSIX     No documentation found for "POSIX".          %> perldoc /usr/lib/perl5/core_perl/POSIX.pm     No documentation found for "/usr/lib/perl5/core_perl/POSIX.pm".      Did I missed some packages? Other libaries like `LWP::UserAgent` works through.


title: sudo -u git clone

text: I'm on Ubuntu server 14.04. I am using apache web server which runs as the _www-data_. I need to do `git clone` **from a script** (a web hook). This script will run with _www-data_ user privilages. Running `git clone` as a regular user in the `/var/www/html` directory I run in to permission problems which is good since I only want the _www-data_ user to be able to write there. The _www-data_ user has its home set to `/var/www` and it's ssh keys are in `/var/www/.ssh` . If I run:               sudo git clone git@my.git.server:user/repo.git      It works as expected - the ssh public key for my user is listed as in authorized_keys @ my.git.server. However I need to run from a bash script and with normal privileges. So I copied the public ssh key for the _www-data_ user to the authorized_keys file at my.git.server. In theory that should mean the _www-data_ user can initiate git clone over ssh removing the need for passwords and being pretty secure. So to test it I think I need to run something like:               sudo -u www-data -H git clone git@my.git.server:user/repo.git      My understanding is that would let me assume the identity of the _www-data_ user, set my home directory so that `~/.ssh` is in the working directory when the `git clone` over ssh is issued. The issue I have is the following error output when I try to execute that command:               Cloning into 'repo'...     fatal: 'user/repo.git' does not appear to be a git repository     fatal: Could not read from remote repository.      Like I said if I run as sudo - no issue. Only when I try to run as www-data. It feels like there's an issue with the way the command is being interpreted that forces it to read the path / repo name incorrectly ? * * * Following on from l0b0's response, the output is as follows:               james-c@WebHost-1:~$ sudo ssh -v git@my.git.server 2>&1 | grep 'identity file'     debug1: identity file /root/.ssh/id_rsa type -1     debug1: identity file /root/.ssh/id_rsa-cert type -1     debug1: identity file /root/.ssh/id_dsa type -1     debug1: identity file /root/.ssh/id_dsa-cert type -1     debug1: identity file /root/.ssh/id_ecdsa type -1     debug1: identity file /root/.ssh/id_ecdsa-cert type -1     debug1: identity file /root/.ssh/id_ed25519 type -1     debug1: identity file /root/.ssh/id_ed25519-cert type -1     james-c@WebHost-1:~$ sudo -u www-data ssh -v git@my.git.server 2>&1 | grep 'identity file'     debug1: identity file /var/www/.ssh/id_rsa type 1     debug1: identity file /var/www/.ssh/id_rsa-cert type -1     debug1: identity file /var/www/.ssh/id_dsa type -1     debug1: identity file /var/www/.ssh/id_dsa-cert type -1     debug1: identity file /var/www/.ssh/id_ecdsa type -1     debug1: identity file /var/www/.ssh/id_ecdsa-cert type -1     debug1: identity file /var/www/.ssh/id_ed25519 type -1     debug1: identity file /var/www/.ssh/id_ed25519-cert type -1      Not exactly sure what I'm looking for here ?


title: How to find Emacs backup files?

text: Emacs backup files start with `.#` but I can find those in my directory. I've try:               find . -name '^\.#.*'      or               find . -name '.*#.*'      and they are not show up, and I have them. For instance if I create one just for test:               touch '.#test'      and if I try to find it using `find` command it not show up.


title: php --enable-calendar=shared

text: I have on my Arch linux system, php compiled with `\--enable-calendar=shared`, what does that mean? I couldn't find any relevant information on that topic on the web. Problem is, that I have to recompile it with --enable-calendar flag, for some application to work, should I remove `=shared`, as it is not working right now, complaining that I don't have that extension installed?


title: How can I get a total for space used by a group of subdirectories

text: My file system is set up like:               /ftp/data/ProductGroup*/ProductType*/Year*/Day*/ActualProductFile*      ("*"denotes directory names that change) I'd like to find out how much space is being used for 2011 products. Something like               du -ks /ftp/data/*/*/2011      However, I need the sum of all these directories - there are hundreds of them and I don't want to have to add them all up (too error prone!) Would anyone have a suggestion?


title: Error when subtracting two negative numbers in ksh: "assignment requires lvalue"

text: I am trying to debug someone else's script: The code line is:               y=$((${oldvalue[$x]}-${newvalue[$x]}))      `y` gets calculated fine as long as both sides are positive numbers. However, I have a production situation where they are both negative and the error I get is:               DEBUG Old value = -4144290000     DEBUG New value = -4009685000     script.sh: line 123: -4144290000--4009685000: assignment requires lvalue      I never would use `ksh` myself for even the simplest of calculations but I am in a position of production support and have to deal with a big ball of mud, I would use at least Perl/Python. Can anybody tell why this problem is happening and how to fix it?


title: Speed up playback rate of online videos in web browser on Debian Linux

text: Windows and Mac users have Enounce MySpeed to assist with increasing playback speed of online videos. What options do I have for increasing playback rate of online videos in Google Chrome on Debian (Squeeze)? Downloading videos and watching locally won't work; I don't have the time/motivation to do so on a regular basis.


title: How to configure external USB touchpad for a laptop

text: I have a laptop that, obviously, comes with a touchpad and a keyboard. However, I have an USB keyboard with integrated touchpad that better suits my needs. I use Ubuntu 13.10 and I cannot find how to configure the external touchpad sensitivity, or any other options. The default touchpad settings tool from Ubuntu works fine, but it only changes the settings for the laptop's default touchpad. I also tried `gpointing- device-settings`, no luck. Google's search results only mention touchpads from laptops, nothing about a second touchpad input device... How would I achieve this? Here is the output of `xinput`: http://pastebin.ca/2643065


title: Raspberry PI Connect2 Pi not installing required drivers

text: I recently got a RPi with different modules. One of them was a Connect2 Pi wireless dongle from LPRS, used to send 100 Mb data packages over the internet. It's basically an internet dongle. However, it does not work. According to the LPRS staff the drivers required for the dongle should be installed when you plug it in. However it doesn't do that. I wonder what my mistake is and how to fix it (if it is fixable).


title: Computer recognizes wireless network but asks for password repeatedly

text: I have installed Mint 14 Xfce on a Dell XPS 400. I am using a Belkin F5D8010 wireless card. I got the .inf file from the Belkin website and installed it using the graphical ndiswrapper tool. The computer sees my network, and I've entered the correct password, but it won't connect. It asks for the password repeatedly. How can I connect to my network? Here is the output from mintwifi:               -------------------------     * I. scanning WIFI PCI devices...     -------------------------     * II. querying ndiswrapper...     netani : driver installed        device (17CB:0001) present     -------------------------     * III. querying iwconfig...     wlan0     IEEE 802.11g  ESSID:off/any                Mode:Managed  Channel:0  Access Point: Not-Associated                  Bit Rate:108 Mb/s                  Encryption key:off               Power Management:off               Link Quality:0  Signal level:0  Noise level:0               Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0               Tx excessive retries:0  Invalid misc:0   Missed beacon:0          lo        no wireless extensions.          eth0      no wireless extensions.          -------------------------     * IV. querying ifconfig...     eth0      Link encap:Ethernet  HWaddr 00:13:72:0e:df:cb                inet addr:192.168.2.15  Bcast:192.168.2.255  Mask:255.255.255.0               inet6 addr: fe80::213:72ff:fe0e:dfcb/64 Scope:Link               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:535 errors:0 dropped:0 overruns:0 frame:0               TX packets:581 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000               RX bytes:352647 (352.6 KB)  TX bytes:97408 (97.4 KB)               Interrupt:17 Memory:fbee0000-fbf00000          lo        Link encap:Local Loopback                inet addr:127.0.0.1  Mask:255.0.0.0               inet6 addr: ::1/128 Scope:Host               UP LOOPBACK RUNNING  MTU:16436  Metric:1               RX packets:76 errors:0 dropped:0 overruns:0 frame:0               TX packets:76 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:0               RX bytes:5994 (5.9 KB)  TX bytes:5994 (5.9 KB)          wlan0     Link encap:Ethernet  HWaddr 00:11:50:25:06:e7                UP BROADCAST MULTICAST  MTU:1500  Metric:1               RX packets:13 errors:0 dropped:13 overruns:0 frame:0               TX packets:0 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000               RX bytes:2028 (2.0 KB)  TX bytes:0 (0.0 B)               Interrupt:18 Memory:88000000-88080000          -------------------------     * V. querying DHCP...     Rather than invoking init scripts through /etc/init.d, use the service(8)     utility, e.g. service smbd reload          Since the script you are attempting to invoke has been converted to an     Upstart job, you may also use the reload(8) utility, e.g. reload smbd     RTNETLINK answers: File exists     -------------------------     * VI. querying nslookup google.com...     Server:      192.168.2.1     Address:   192.168.2.1#53          Non-authoritative answer:     Name:   google.com     Address: 74.125.140.100     Name:   google.com     Address: 74.125.140.101     Name:   google.com     Address: 74.125.140.139     Name:   google.com     Address: 74.125.140.113     Name:   google.com     Address: 74.125.140.102     Name:   google.com     Address: 74.125.140.138


title: Subtle WM without a numpad

text: I just started using subtle WM on a netbook, and there are keybindings that need a numpad. I'm still not familiar with the terminology, but I think it's for the gravities. Is there a way to configure subtle for a netbook/laptop so it doesn't require a numpad?


title: Linux openssl CN/Hostname verification against SSL certificate

text: How does an Enterprise Linux system with openssl 1.0.1+ verify that the `CN=hostname` value in the cert matches the server it resides on? Does it use a plain old reverse DNS lookup on the IP address of the adapter that is listening for that SSL web application? Does it use some gethostname Library Function? Will it read the /etc/hosts file? Does nsswitch.conf play a part? **Update:** After speaking with someone else, it appears this is all done on the Browser/client side. As long as the host portion of the URL matches the CN value in the cert which is installed for that application, the browser is happy, is that right?


title: Listing specific lines in listed files

text: Find all files in `/tmp` that are ordinary files and print the lines that end with `Programming`. For this problem I know how to list all files in `/tmp`. What I do not know how to do is whether to use `grep` or `find` to print lines that end with `Programming` for these `/tmp` files.


title: find searching in parent directories instead of subdirectories

text: I'm nested deep in a file tree, and I'd like to find which parent directory contains a file. E.g. I'm in a set of nested Git repositories and want to find the .git directory controlling the files I'm currently at. I'd hope for something like find -searchup -iname ".git"


title: Extract values from HTML Files

text:
I have 2 HTML files, where part of the content looks like this: In FILE1:                    mom. Wirkleistung P+ tot.:
     mom. Wirkleistung P+ L1:
     mom. Wirkleistung P+ L2:
     mom. Wirkleistung P+ L3:
     	           	     114,00 W
       2,00 W
     109,00 W
       2,00 W

	      and in File2:               mom. Wirkleistung P- tot.:
     mom. Wirkleistung P- L1:
     mom. Wirkleistung P- L2:
     mom. Wirkleistung P- L3:
     	           	       45,00 W
       0,00 W
       0,00 W
       0,00 W

      Where I want to use for either files the first Watt value (114.00 and 45.00, which of course does change every 5 seconds) and put the SUM together. I'm using a RASPBERRY PI (do Debian Linux), is there a way to extract these values from the two files and add it together, so that it works even if it contains a 5.00 or 66.70 or 1444.24 value. ATTACHED below the FULL FILE....                    <title>FacilityWeb</title>     <meta http-equiv="cache-control" content="no-cache">

     Lingg & Janke

                         [ LEISTUNG P+ ] [ LEISTUNG P- ]     [ LEISTUNG Q+ ] [ LEISTUNG Q- ]
     [ SPANNUNG ] [ STROM ]     [ COS PHI ]
     [ GRENZWERTE P+ tot. ]
[ GRENZWERTE P+ L1 ]     [ GRENZWERTE P+ L2 ] [ GRENZWERTE P+ L3 ]
     [ HOME ]
Wirkleistungen P+ (Bezug)

          mom. Wirkleistung P+ tot.:
     mom. Wirkleistung P+ L1:
     mom. Wirkleistung P+ L2:
     mom. Wirkleistung P+ L3:
     	           	      70,00 W
       2,00 W
      64,00 W
       2,00 W

     HOME


title: Disk filename corruption

text: Using QNX unix filesystem. The files once written with good file names in a good directory and partition get corrupted in their filenames. Some of the files remain in good shape in the same directory. The bad filenames show binary code characters. Some of the filenames get all 0xff chars, like an unterminated string. Directory path remains ok. The disk media also remains good. Once re-initialized the disk space seems fine for reuse. This happens once in a while but does happen within a couple of months time frame. The system is distributed all over the country. Only a few units return with the specific problem. The problem gradually grows over time undetected since the file are archived data and never accessed once written. However, once the corruption of filenames start it keeps happening until the whole disk appears full. No more files can be written or deleted. The system does continuously check and delete the oldest files once it detect the disk partition is %80 full. In the final analysis of the corrupted disk, the partition .nodes and .bitmap files are also found corrupted with all 0xff data in them. All else seems ok.


title: Are bsdutils, coreutils, and busybox all necessary in a Debian install?

text: I first installed Debian with a netinst CD without networking, then edited `/etc/apt/sources.list` to point to the main repository, then ran `dhclient eth0` to set up networking. Then I installed `less`. This is the only package I have installed after setting up the system. When I run `dpkg -l | less -S`, I see `bsdutils`, `busybox`, `coreutils`, all installed. Are they all necessary? If I ran `apt-get --purge remove bsdutils coreutils`, would my system automatically use busybox? In general, is there a way to tell whether your system would break after removing a package, without actually removing the package?


title: DRBD8 and GFS on CentOS5

text: I am trying to combine DRBD8 and GFS2 on CentOS5. Is there any possibility to do this without using a mulicast-cluster underneath? (CentOS seems to use AIS) This is a two-node-cluster, so a simple unicast setup should do.


title: Creating A Bootable Backup Copy Of System Drive

text: I'm in charge of a Linux fileserver at my workplace, and since this fileserver holds the company's accounting data, I've got to make sure that there are backups. Right now, my main solution is based on a couple of external drives (one of which usually lives off-site) and backing up to them with dirvish. However, I'd like to extend this backup scheme further. On my personal computer, a Mac, I use Super Duper for my backups. It's really nice to have a bootable copy of the system drive such as the one Super Duper creates, that can be 'transparently' swapped in to replace a failing drive. Is there a parallel utility for Linux - something that can copy the `/`, `/boot`, and bootloader combination to produce a bootable copy of a given system? I'm aware that `dd` does some of what I want. _Some_ of what I want. If I make a copy of the server's main drive with `dd`, the copy will have a different UUID than the original, and thus various parts of GRUB and `/etc/fstab` that identify drives by UUID will fail. That would be sub-optimal.


Is there kernel patch to prevent load files into RAM for LiveCD? I mean, if I'm use LiveCD with "boot to Ram" option, there is no needs for kernel to load executable binaries to RAM from RAM. It would greatly decrease RAM usage for LiveCD. E.g. modern Linux distributive with even openoffice may be less than 2Gb. Modern Personal Computer with 4Gb may load whole of such distributive into RAM to increase speed in 1000x, but logs and temporary files with some snapshots puts to hard drive.


title: how do I include the qcserial module in the kernel?

text: I need a kernel compiled, featuring the qcserial module to have support for the Huawei EM 680 model (Gobi 3000). I got kernel 3.11.6 and can find the appropriate source file in `./drivers/usb/serial/qcserial.c` but how can I make sure it gets compiled and loaded statically? I can't find it in the kernel config dialog... any ideas? I'm cross compiling this kernel for an arm AT91 CPU and I need support for above cell modem... " _As of linux-3.1.1-1 the device is detected by the qcserial module_ " - is what I found on https://wiki.archlinux.org/index.php/Gobi_Broadband_Modems **edit modem-manager** after installing modem-manager, i tried to launch it but I don't really get anything, see the screen output below:               # modem-manager       modem-manager[2417]: <info>  ModemManager (version 0.5.2.0) starting...     modem-manager[2417]: <info>  Loaded plugin Novatel     modem-manager[2417]: <info>  Loaded plugin ZTE     modem-manager[2417]: <info>  Loaded plugin Option High-Speed     modem-manager[2417]: <info>  Loaded plugin Longcheer     modem-manager[2417]: <info>  Loaded plugin Ericsson MBM     modem-manager[2417]: <info>  Loaded plugin Samsung     modem-manager[2417]: <info>  Loaded plugin Nokia     modem-manager[2417]: <info>  Loaded plugin SimTech     modem-manager[2417]: <info>  Loaded plugin Huawei     modem-manager[2417]: <info>  Loaded plugin MotoC     modem-manager[2417]: <info>  Loaded plugin X22X     modem-manager[2417]: <info>  Loaded plugin Generic     modem-manager[2417]: <info>  Loaded plugin Sierra     modem-manager[2417]: <info>  Loaded plugin Option     modem-manager[2417]: <info>  Loaded plugin Wavecom     modem-manager[2417]: <info>  Loaded plugin Linktop     modem-manager[2417]: <info>  Loaded plugin Gobi     modem-manager[2417]: <info>  Loaded plugin AnyData     modem-manager[2417]: <info>  (ttyUSB0) opening serial port...     modem-manager[2417]: <info>  (ttyUSB1) opening serial port...     modem-manager[2417]: <info>  (ttyUSB2) opening serial port...     modem-manager[2417]: <info>  (ttyS1) opening serial port...     modem-manager[2417]: <info>  (ttyS2) opening serial port...     modem-manager[2417]: <info>  (ttyS3) opening serial port...     modem-manager[2417]: <info>  (ttyS4) opening serial port...     modem-manager[2417]: <info>  (ttyS0) opening serial port...     modem-manager[2417]: <info>  (ttyUSB0) closing serial port...     modem-manager[2417]: <info>  (ttyUSB0) serial port closed     modem-manager[2417]: <info>  (ttyUSB0) opening serial port...     modem-manager[2417]: <info>  (ttyUSB1) closing serial port...     modem-manager[2417]: <info>  (ttyUSB1) serial port closed     modem-manager[2417]: <info>  (ttyUSB1) opening serial port...     modem-manager[2417]: <info>  (ttyUSB2) closing serial port...     modem-manager[2417]: <info>  (ttyUSB2) serial port closed     modem-manager[2417]: <info>  (ttyUSB2) opening serial port...     modem-manager[2417]: <info>  (ttyS1) closing serial port...     modem-manager[2417]: <info>  (ttyS1) serial port closed     modem-manager[2417]: <info>  (ttyS1) opening serial port...     modem-manager[2417]: <info>  (ttyS2) closing serial port...     modem-manager[2417]: <info>  (ttyS2) serial port closed     modem-manager[2417]: <info>  (ttyS2) opening serial port...     modem-manager[2417]: <info>  (ttyS3) closing serial port...     modem-manager[2417]: <info>  (ttyS3) serial port closed     modem-manager[2417]: <info>  (ttyS3) opening serial port...     modem-manager[2417]: <info>  (ttyS4) closing serial port...     modem-manager[2417]: <info>  (ttyS4) serial port closed     modem-manager[2417]: <info>  (ttyS4) opening serial port...     modem-manager[2417]: <info>  (ttyS0) closing serial port...     modem-manager[2417]: <info>  (ttyS0) serial port closed     modem-manager[2417]: <info>  (ttyS0) opening serial port...     modem-manager[2417]: <info>  (ttyUSB0) closing serial port...     modem-manager[2417]: <info>  (ttyUSB0) serial port closed     modem-manager[2417]: <info>  (ttyUSB1) closing serial port...     modem-manager[2417]: <info>  (ttyUSB1) serial port closed     modem-manager[2417]: <info>  (ttyUSB2) closing serial port...     modem-manager[2417]: <info>  (ttyUSB2) serial port closed     modem-manager[2417]: <info>  (ttyS1) closing serial port...     modem-manager[2417]: <info>  (ttyS1) serial port closed     modem-manager[2417]: <info>  (ttyS2) closing serial port...     modem-manager[2417]: <info>  (ttyS2) serial port closed     modem-manager[2417]: <info>  (ttyS3) closing serial port...     modem-manager[2417]: <info>  (ttyS3) serial port closed     modem-manager[2417]: <info>  (ttyS4) closing serial port...     modem-manager[2417]: <info>  (ttyS4) serial port closed     modem-manager[2417]: <info>  (ttyS0) closing serial port...     modem-manager[2417]: <info>  (ttyS0) serial port closed      Which is kind of odd as when I plugin the modem, in dmesg I now get:               usb 1-1: New USB device found, idVendor=12d1, idProduct=14f1     usb 1-1: New USB device strings: Mfr=3, Product=2, SerialNumber=0     usb 1-1: Product: Huawei EM680 w/Gobi Technology     usb 1-1: Manufacturer: HUAWEI Incorporated     qcserial 1-1:1.1: Qualcomm USB modem converter detected     usb 1-1: Qualcomm USB modem converter now attached to ttyUSB0     qcserial 1-1:1.2: Qualcomm USB modem converter detected     usb 1-1: Qualcomm USB modem converter now attached to ttyUSB1     qcserial 1-1:1.3: Qualcomm USB modem converter detected     usb 1-1: Qualcomm USB modem converter now attached to ttyUSB2


title: HP ProLiant DL320e G8 v2 - Install CentOS or Ubuntu Server

text: I just bought a HP ProlLiant DL320e G8 v2 and I am trying to install CentOS or Ubuntu Server on it from a USB. The problem is that I do not have any option for this in Intelligent Provisioning (the only options are Windows, Red Hat Linux, Open Suse Enterprise, VMWare ESXI/vSphere Custom Image and VMWare ESX Custom Image. I changed the boot order in bios and I've put USB first but it does not boot. What can I do now?


title: permission denied for ptrace under GDB

text: I initially posted this question on StackOverflow, as a GDB problem. I didn't find a solution there, but they did help me find that it's a permissions problem, so I'm posting it here. I have set a super simple C program and compiled it with GCC(with the `-g` flag). I've tried running it with `gdb a.out`, set a breakpoint on `main` and run it, but GDB ignored my breakpoint and simply ran the entire program nonstop. On my questions in SO they told me to run it with strace and grep for failed calls to ptrace. I did so and got:               5765 ptrace(PTRACE_TRACEME, 0, 0, 0) = -1 EPERM (Operation not permitted)      When I'm trying to run GDB with sudo it works fine, so it's definitely a permissions problem. I've also tried reinstalling GDB, hoping it'll re-set the permissions, but it didn't help. Here are the groups and permissions for GDB and for the executable I'm trying to debug:               -rwxr-xr-x 1 idanarye users 7797 Dec 28 04:52 ./a.out     -rwxr-xr-x 1 root root 5206304 Aug 31 07:10 /usr/bin/gdb      I tried googling for this problem, but all I could find is another problem where GDB fails to attach to running processes due a to a new security rule that prevents ptracing another process unless it's a child process. This is not the problem here, since I let GDB start the process I want to debug. I've tried the suggested solution(changing `/proc/sys/kernel/yama/ptrace_scope`) anyways and it didn't work. What am I missing here? What permissions do I need to give and to what? I'm running a 64bit ArchLinux. # UPDATE No idea how or why, but it works now. Probably a system update fixed it...


title: How can I load a module at runtime?

text: I just compiled the `qcserial` module which is a driver module for a Gobi USB modem. Now I have a couple of questions.   1. Now I have two files: `drivers/usb/serial/qcserial.ko` and `drivers/usb/serial/qcserial.o` which one is the correct driver?   2. Also, as I understand, it will need to go into `/lib/modules/3.11.6/kernel/drivers/` but how do I know which sub directories from there onwards?   3. Should I just be able to copy the files over and then load with `modprobe qcserial`? What I have tried so far:               root@ariag25:~# mkdir /lib/modules/3.11.6/kernel/drivers/usb/serial     root@ariag25:~# cp drivers/usb/serial/qcserial.ko /lib/modules/3.11.6/kernel/drivers/usb/serial/     root@ariag25:~# ls -l /lib/modules/3.11.6/kernel/drivers/usb/serial     total 20     -rw-r--r-- 1 root root 17921 Jan  1 18:30 qcserial.ko     root@ariag25:~# modprobe qcserial     FATAL: Module qcserial not found.     root@ariag25:~#       What am I missing? Do I also need to copy the `.o` file? From where I compiled it, I have:               ls -l drivers/usb/serial/qc*     -rw-r--r-- 1 reg reg  3776 Oct 18 18:24 drivers/usb/serial/qcaux.c     -rw-r--r-- 1 reg reg  3212 Dec 28 10:14 drivers/usb/serial/qcaux.o     -rw-r--r-- 1 reg reg 12577 Oct 18 18:24 drivers/usb/serial/qcserial.c     -rw-r--r-- 1 reg reg 17921 Dec 28 10:44 drivers/usb/serial/qcserial.ko     -rw-r--r-- 1 reg reg  7743 Dec 28 10:44 drivers/usb/serial/qcserial.mod.c     -rw-r--r-- 1 reg reg 11688 Dec 28 10:44 drivers/usb/serial/qcserial.mod.o     -rw-r--r-- 1 reg reg  6912 Dec 28 10:44 drivers/usb/serial/qcserial.o      **edit for Answer 1** Ok, I copied my `linux-3.11.6-arm.tar` into the target's `/tmp/`. I then executed `tar -C / -tvf linux-3.11.6-arm.tar` to extract it onto `/` but after this, I still would get               # modprobe qcserial     FATAL: Module qcserial not found.      I then wondered if the driver gat even copied:               # tar -C / -tvf linux-3.11.6-arm.tar | grep qcserial     -rw-r--r-- root/root     17921 2013-12-28 13:22 lib/modules/3.11.6/kernel/drivers/usb/serial/qcserial.ko      so that looks fine, but if I want to `ls` it, `# ls /lib/modules/3.11.6/kernel/drivers/usb/` there's no `serial` directory within `usb/` - why not? What happened?


title: Duplex printing without cups

text: Hhow do I print duplex with Berkely lpr? (Other lpd suggestions are welcome) It has no options on simplex/duplex modes, but I guess, that they were somehow able to print duplex back then.


title: List all the ways a block device is in use

text: I want to be sure that a removable hard drive (USB, but this shouldn't matter) is safe to remove. Let's say this drive is `sdb`. Obviously I need to make sure that there is no mounted filesystem on that drive. `grep /dev/sdb /proc/mounts` will tell me. But that's not the whole story. For example, if there is an LVM physical volume on `sdb`, I need to deactivate all volume groups that contain a physical volume located on `sdb` (`lvchange -an my_volume_group/my_logical_volume` then `vgchange -an my_volume_group`). If there is a RAID volume, I may need to deactivate it (`mdadm -S`), or I may want to mark the component as failed (`mdadm -f`). Is there a way to list all the ways a disk is in use? For my use case, I need to be confident that this list is exhaustive, so that I can unplug the device if the list is empty.


title: Up to date Mint and AMD/ATI Radeon 2600 HD Mobility

text: I just installed Linux Mint (3.11 Kernel) on a 2007 Notebook with a Radeon 2600 HD Mobility. Works fine so far, but is there any chance I can use propritary drivers for this GPU? What will happen if I just install `fglrx` with the Synaptics package manager? Will it warn me if my GPU is not supported? I'm asking because Manjaro Linux (based on Arch Linux) has a simple tool to install `catalyst-legacy` (even on Kernel 3.12), so I was wondering how to do this on Mint.


title: Parted output with two free space rows

text: I have a disk with the following partitions:               GNU Parted 2.3     Using /dev/sda     Welcome to GNU Parted! Type 'help' to view a list of commands.     (parted) print free                                                            Model: ATA VBOX HARDDISK (scsi)     Disk /dev/sda: 85.9GB     Sector size (logical/physical): 512B/512B     Partition Table: msdos          Number  Start   End     Size    Type      File system     Flags             0.00B   511B    512B              Free Space      1      512B    4302MB  4302MB  primary   ext3            type=83      2      4302MB  15.0GB  10.7GB  primary   ext3            type=83      3      15.0GB  15.2GB  140MB   primary   linux-swap(v1)  type=82      4      15.2GB  85.9GB  70.7GB  extended                  type=05      5      15.2GB  16.3GB  1078MB  logical                   type=83      6      16.3GB  75.1GB  58.8GB  logical                   type=83      7      75.1GB  85.8GB  10.7GB  logical   ext3            type=83      8      85.8GB  85.9GB  70.3MB  logical                   type=83             85.9GB  85.9GB  3545kB            Free Space             85.9GB  85.9GB  2747kB            Free Space      The question is why there are two "Free Space" rows shown in the parted output? Is this normal or is it some problem related to the initial partitioning of the disk? If it is OK, then how can I merge them into one using parted? Here is the output for `fdisk -l /dev/sda`               Disk /dev/sda: 85.9 GB, 85899345920 bytes     255 heads, 63 sectors/track, 10443 cylinders, total 167772160 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x00002eb8             Device Boot      Start         End      Blocks   Id  System     /dev/sda1               1     8401994     4200997   83  Linux     /dev/sda2         8401995    29382884    10490445   83  Linux     /dev/sda3        29382885    29655989      136552+  82  Linux swap / Solaris     /dev/sda4        29655990   167766794    69055402+   5  Extended     /dev/sda5        29655991    31760504     1052257   83  Linux     /dev/sda6        31760506   146641319    57440407   83  Linux     /dev/sda7       146641321   167622209    10490444+  83  Linux     /dev/sda8       167622656   167759871       68608   83  Linux


title: Registering Ubuntu Client With Spacewalk

text: Right now I'm just testing the process for some desktop machines I'll be managing so I have a fresh install of Ubuntu 12.04.04 LTS. We have a non- satellite spacewalk server that I'd like to have available for the main admins for these machines to use to manage these machines. I'm trying to follow the install guide and I'm running into trouble getting the client to install. The guide says "All core clients packages are already in Debian and Ubuntu." and to run an update followed by an install of two packages. The update works without issue but the install fails. Given how simple the problem is, I'm almost positive it's operator error. I know nothing about Ubuntu (or Debian in general) so it's possible I'm just misinterpreting the guide somehow. Is there something analogous to a `yum` repo that I need to enable to get access?


title: texinfo: Can I write non-english info files? Such as Chinese, and how?

text: Most gnu manual files use `info`, write a `texinfo` then `makeinfo` produces info files, it's great. Can texinfo contain non-English characters then produce non-English infos or pdfs? How can I write Chinese info manuals? What is the best solutions for non- English software manuals, documentations just one source files to info, man, html, and pdf.


title: How to prevent double escaping?

text: I'm trying to put a bunch of images together into a pdf. I ran `gm convert *.jpg out.pdf` and it worked, but the images were not in the right order.   I found that `ls -v` orders them correctly so then I tried `gm convert `ls -v *.jpg` out.pdf`, but that failed because the files have spaces in the names. So I checked the ls options and tried `gm convert `ls -Qv *.jpg` out.pdf` and `gm convert `ls -bv *.jpg` out.pdf` but both failed because, as far as I can tell, the file names got escaped twice (using \" in the first case, and \\ before space in the 2nd case).   Why is this happening, and how can I get the file names escaped correctly, i.e. only once? I'm using zsh if that's relevant.


title: bash - extract filenames from html file containing multiple links

text: I have downloaded an html file autogenerated by a script on a webpage. The file contains multiple links, including links to images I am trying to extract the full names of the images, for example               Image name.jpg      from the above i want to get "Image name.jpg" stored in a file. since there are hundreds of these, I parse the file and store each name as it comes up with the following command:               grep -i -E -o "target=\"_blank\">([[:graph:]]*)\.(jpg|png|gif|webm)" "$thread" | cut -f 2 -d '>' | sed 's/ /_/g' - > "$names"      where "$thread" is the name of the html file, "$names" is the list of filenames as output. I use "cut" to remove the 'target="_blank">' portion, then convert the spaces to underscores. Since there are several other links in the file, I specify the extensions to grab (images and webm). everything else should be ignored. I got it to the point where it is grabbing these links only, but then it misses some. Some files contain spaces and non-alphanumeric characters. If i use [[:print:]] which should cover all these cases i get nothing, or i get a bit of the portion of html and nothing else. If i use [[:graph:][:space:]] i also get nothing. If i just use [[:graph:]] (as above) or [[:alnum:][:punct:]] i can get files with alphanumeric/other characters (like "filenamewith(paranthesis).jpg"), but not spaces, and the reverse is also true, [[:alnum:][:space:]] works but omits the other printable characters ("file name with spaces.jpg" works but not "with(paranthesis,comma or other.jpg"). supposedly [[:print:]] covers all cases but i dont get what i need, which if I'm understanding correctly, grep -E -o should only match (per the case above) : *.jpg *.png *.gif or *.webm I have tried grep with and without -E/-o/-e in different variations. any ideas? using Arch linux, grep 2.20, bash 4.3.18


title: Add a single key to to CA certificates from an automated script

text: I'm doing some automation for a local machine in Vagrant using Puppet. I need to add a CA certificate to the trusted list in Ubuntu Trusty 14.04 LTS. I simply add the file to the right place:               file { 'godaddy-ca-cert':         path   => '/usr/share/ca-certificates/godaddy-ca.crt',         owner  => 'root',         group  => 'root',         mode   => '0644',         source => "puppet:///modules/certificates/godaddy-ca.pem"     }      What I can do to manually add the certificate? Typically I've done the following manually to update certificates:               sudo dpkg-reconfigure ca-certificates      However, this doesn't work as it requires manual input. How can I automate adding root CA authorities without any manual input?


title: Libreoffice document recovery automatization

text: I am wondering if there is a way I can launch libreoffice so it does document recovery or exits. I want this so when my computer boots up and I log in I am immediately prompted with document recovery. I want libreoffice to exit if there are no documents to recover. Is there a command line argument that will achieve this I can add to my gnome session?


title: Selecting rows in a CSV file based on column value

text: I have a CSV file with 4 columns: Itemname,Value,Description and component which is quite huge. I have to generate a template from the above CSV file that displays only the rows of the specified component(say component='abc' which is the search criterion)


title: Why setsebool command of SELINUX taking so long and slow?

text: Hi I am new to the SELINUX and I have noticed the command setsebool take longer time than other linux commands. Such as:               setsebool -P ftp_home_dir ON      Out of curiosity I want to know why "setsebool" command needs such a long time to complete the task?


title: Reading from /etc/environment with sudo

text: Using Ubuntu 14.04 LTS, I'm having a problem trying to read environment variables from `/etc/environment` when using `sudo env`. Basically, they are not being displayed. When I do just `env`, these variables appear like it should. In my other server, which is running Ubuntu 13.04, both `sudo env` and `env` display variables from `/etc/environment`. How do I get `sudo env` to read the environment variables set in `/etc/environment` in Ubuntu 14.04 LTS? **UPDATE - 2014-07-14** I checked `/etc/pam.d/sudo`, and they are exactly the same:-               #%PAM-1.0          auth       required   pam_env.so readenv=1 user_readenv=0     auth       required   pam_env.so readenv=1 envfile=/etc/default/locale user_readenv=0     @include common-auth     @include common-account     @include common-session-noninteractive


title: IP set to block access to exim and dovecot

text: I have created a ipset with a bunch of IPs that I want to block access to dovecot and exim. The ipset is called "bannedIPs" and have been added to iptables using this               iptables -A INPUT -p tcp --dport 25 -m set --set bannedIPs src -j DROP     iptables -A INPUT -p tcp --dport 587 -m set --set bannedIPs src -j DROP     iptables -A INPUT -p tcp --dport 465 -m set --set bannedIPs src -j DROP     iptables -A INPUT -p tcp --dport 110 -m set --set bannedIPs src -j DROP     iptables -A INPUT -p tcp --dport 143 -m set --set bannedIPs src -j DROP     iptables -A INPUT -p tcp --dport 993 -m set --set bannedIPs src -j DROP     iptables -A INPUT -p tcp --dport 995 -m set --set bannedIPs src -j DROP      my question is:   * Are these rules correct? Will they block IPs on the bannedIPs ipset from accessing exim and dovecots on all ports of these services?


title: Grep finding phone numbers in files

text: How would I look for files in the `/etc` directory (but not subdirectories) that contain a standard United States long distance phone number, written using the pattern of `1-###-###-####`, where each `#` is replaced with a numeric digit. Collect the filenames of every file in the `/etc` directory which contains such a pattern of numbers, and place them in the file `~/etcphone.txt`, one file name per line, sorted alphabetically, using absolute references. This is what I have so far               egrep -l "1-[[:digit:]]{3}- " /etc/* 2>/dev/null


title: How to change Firefox icon shown on panel and menus?

text: I installed Firefox on Linux Mint Debian Edition with the Cinnamon desktop. This Firefox package doesn't use the regular Firefox icon, with the fox curled around the world ![enter image description here](http://i.stack.imgur.com/xcvhl.png); it has what I call the "orange eyeball" icon. ![enter image description here](http://i.stack.imgur.com/xSFba.png) Is there a way to have the standard Firefox icon show up on the panel ("taskbar") button and the menus? This "eyeball" icon is so visually unappealing that if I can't change it, I'll uninstall Firefox and use Opera or Chrome instead. (Yes, I really do find it that ugly. I do not want to have to look at this thing.)


title: Regex this question format into LaTeX

text: 1. Lorem ipsun la la la?     1. Sopor     2. Stupor     3. Torpor          2. A patient has Lorem?     1. Sopor     2. Stupor     3. Somnolentia      4. La     5. Coma          3. Doesn't Response to strong external irritants is short. Tendon, pupillary, corneal reflexes are retained. Doesn't Response to strong external irritants is short. Tendon, pupillary, corneal reflexes are retained. What disorder of consciousness does he have?     1. Stupor     2. Sopor     3. Somnolentia      4. Euphoria     5. Coma          ... [777 questions]      which I want to be               l. Lorem ipsun la la la?     \begin{enumerate}     \item Sopor     \item Stupor     \item Torpor     \end{enumerate}              2. A patient has Lorem?     \begin{enumerate}     \item Sopor     \item Stupor     \item Somnolentia      \item La     \item Coma     \end{enumerate}          3. Doesn't Response to strong external irritants is short. Tendon, pupillary, corneal reflexes are retained. Doesn't Response to strong external irritants is short. Tendon, pupillary, corneal reflexes are retained. What disorder of consciousness does he have?     \begin{enumerate}     \item Stupor     \item Sopor     \item Somnolentia      \item Euphoria     \item Coma     \end{enumerate}      Some notes   * There is between 3 and 5 options for answers   * I am not sure which order it is best to do these changes.   * list `1.[ A-Za-z123345679.]*5.\n` should be replaced with `\n\begin{enumerate}[match]\end{enumerate}\n`     * if not successful with `1.[ A-Za-z123345679.]*4.\n` should be replaced with `\n\begin{enumerate}[mathch]\end{enumerate}\n`     * if not successful with `1.[ A-Za-z123345679.]*3.\n` should be replaced with `\n\begin{enumerate}[mathch]\end{enumerate}\n` What command-line tools should I use to do this? Perl comes to my mind, but I'm not sure. * * * I just noticed that catting the file content gives different output than expected and in the viewer. I am using the newest OSX with Perl v5.16.2 at the moment. This is the test file. ### Input, command and output               $ cat questions_copy.tex      1. Lorem ipsun la la la?     1. Sopor     2. Stupor     3. Torpor          2. A patient has Lorem?     1. Sopor     2. Stupor     3. Somnolentia      4. La     5. Coma          % STRANGE cat output here - Not correct!     3. Doesn't Response to strong external irritants is short. Tendon, pupillary, corneal reflexes are retained. Doesn't Response to strong external irritants is short. Tendon, 3. Somnolentia eal reflexes are retained. What disorder of consciousness does he have?     5. Comaoria     % PERL do the same mistakes     $ perl -000pe 's/\n/\n\\begin{enumerate}\n/; s/\n\d./\n\\item /g; s/$/\\end{enumerate}\n/' questions_copy.tex      1. Lorem ipsun la la la?     \begin{enumerate}     \item  Sopor     \item  Stupor     \item  Torpor     \end{enumerate}          2. A patient has Lorem?     \begin{enumerate}     \item  Sopor     \item  Stupor     \item  Somnolentia      \item  La     \item  Coma     \end{enumerate}          3. Doesn't Response to strong external irritants is short. Tendon, pupillary, corneal reflexes are retained. Doesn't Response to strong external irritants is short. Tendon, 3. Somnolentia eal reflexes are retained. What disorder of consciousness does he have?     \begin{enumerate}     5. Coma\end{enumerate}          $


title: redhat vs debian/ubuntu system architecture (& not deb vs rpm)?

text: What are the key areas (except package management) where Fedora/RHEL/CentOS differ from Debian/Ubuntu Linux systems? I'm asking this from a newbie's perspective to the Linux admin world so that I can make a more informed choice. EDIT: Let me rephrase, how does the organization of /etc, /proc, /dev , boot process etc differ in debian and redhat?


title: Replace words in file using sed command

text: I have a file z. I want to replace string in File using sed command:               123: ' ',      to:               123: '456',


title: Update .profile in /etc in UNIX

text: How can i append the following text in .profile in folder /etc/security of UNIX OS? `PS1='hostname -s':$LOGNAME'[$PWD]'` i tried: `print 'export PS1='hostname -s':$LOGNAME'[$PWD]' ' >> profile` my output gives: `export PS1='hostname -s':$LOGNAME[/etc]` with [/etc].


title: File permission mechanism in Unix like systems

text: Can some one please explain with a an example the file permission mechanism in Linux and other Unix like systems ? What are the nine bits for ? Why do we have a group id for a user as well as for a file ? Are these two related ?


title: How to receive emails on CentOS 5 server?

text: I've installed postfix with this nice tutorial http://wiki.centos.org/HowTos/postfix and postfix and dovecot are up and running. I set up user maildir as tutorial suggested. Now I can check my messages by windows email client via POP3. There are none yet. But when I'm trying to send email to this server via other mail service, it don't come. I suspect that I should open SMTP port on my server. When I try to               telnet myserver.com 25      I get nothing.


title: Difference between sdX and vdX

text: When I use Ubuntu and CentOS, I see `/dev/sda` and `/dev/vda`. So I can't understand what is the different between above two?


title: Monit daemon interval setting...global or service-level?

text: I'm configuring monit on Ubuntu 11.04. In `monitrc`, the following setting controls the interval at which the monit daemon monitors services... `set daemon 120` Is this a global setting? If I want to check different services, such as permissions on a directory and an http service, how can I configure monit to check directory permissions every week while pinging the http service every 5 minutes? I understand it's possible to use the `-d interval` option when executing monit, but according to the documentation, this checks services only once, then exits, without repeating; not helpful for my needs since I need it to continuously execute.


title: No logical volume groups found, LVM stuck at boot

text: I'm running Ubuntu 14.04 (64bit). Long story short, I've compiled a custom kernel and now I'm running into some issues with my encrypted hard drive. When I boot my machine and attempt to start the new kernel, it starts loading and reports:               Reading all physical volumes, this may take a while ...        No Logical Volume Groups found        No Logical Volume Groups found      While compiling the new kernel, I've taken my current kernel configuration (from `/boot/config-$(uname-r)` as the base so all modules that were in use during the compilation should also be available with the new kernel. I'm a little stumped at where to start debugging. A colleague suggested I take a look at the `initrd`-images for both kernels. I've unpacked both images but have had little luck in determining what might be wrong. The size is quite different: The new initrd:               emikkva@slartibartfast:/tmp/15$ ll init.img     -rw-rw-r-- 1 emikkva emikkva 18278400 july 18 18:01 init.img      And the old one:               emikkva@slartibartfast:/tmp/15$ ll ../13/init.img      -rw-rw-r-- 1 emikkva emikkva 77744640 heinä 18 18:02 ../13/init.img      But the only differences are (both images unpacked):               emikkva@slartibartfast:/tmp/15$ diff -r . ../13     Binary files ./init.img and ../13/init.img differ     Only in ../13/lib: firmware # This might be a problem?     Only in ../13/lib/modules: 3.13.0-32-generic     Only in ./lib/modules: 3.15.0-rc8+      grub boot parameters are identical for both kernels. Using the old kernel works just fine. I understand I've got little information to offer here but I will of course update the question with anything that might be relevant according to comments and answers. EDIT: lsblk output:               emikkva@slartibartfast:~$ lsblk     NAME                           MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT     sda                              8:0    0 238,5G  0 disk       ├─sda1                           8:1    0   243M  0 part  /boot     ├─sda2                           8:2    0     1K  0 part       └─sda5                           8:5    0 238,2G  0 part         └─sda5_crypt (dm-0)          252:0    0 238,2G  0 crypt          ├─ubuntu--vg-root (dm-1)   252:1    0 222,3G  0 lvm   /         └─ubuntu--vg-swap_1 (dm-2) 252:2    0  15,9G  0 lvm   [SWAP]      pvs:               emikkva@slartibartfast:~$ sudo pvs       PV                     VG        Fmt  Attr PSize   PFree       /dev/mapper/sda5_crypt ubuntu-vg lvm2 a--  238,23g    0       dmsetup ls --tree:               emikkva@slartibartfast:~$ sudo dmsetup ls --tree     ubuntu--vg-swap_1 (252:2)      └─sda5_crypt (252:0)         └─ (8:5)     ubuntu--vg-root (252:1)      └─sda5_crypt (252:0)         └─ (8:5)      EDIT 2: Checking the configuration file as per suggested by @derobert:               emikkva@slartibartfast:~/airlied-linux$ grep -i 'config_crypto_aes\|config_dm_crypt\|config_crypto_xts\|config_crypto_sha256\|config_crypto_sha512' .config     CONFIG_DM_CRYPT=m     CONFIG_CRYPTO_XTS=m     CONFIG_CRYPTO_SHA256_SSSE3=m     CONFIG_CRYPTO_SHA512_SSSE3=m     CONFIG_CRYPTO_SHA256=y     CONFIG_CRYPTO_SHA512=y     CONFIG_CRYPTO_AES=y     CONFIG_CRYPTO_AES_X86_64=m     CONFIG_CRYPTO_AES_NI_INTEL=m      The configuration for the new kernel was identical, except for that `_SSE3` -ending options, they were commented out. Current crypto-algorithm in use seems to be `aes-xts-plain64` according to the output of `dmsetup table sda5_crypt`.


title: Booting a Raspberry Pi from an NFS share

text: I am trying to boot my Raspberry Pi using an NFS share. I have copied the boot partition of the Raspbian Wheezy image to the SD card and copied the root partition to a networked hard drive. I have edited cmdline.txt to boot from the NFS share. This works correctly. The system boots successfully and I can issue commands and read/write files without problems. However, problems arise when I try to use `sudo`.               pi@raspberrypi ~ $ sudo     sudo: unable to stat /etc/sudoers: Permission denied     sudo: no valid sudoers sources found, quitting     sudo: unable to initialize policy plugin      However, I am able to cat the sudoers file.               pi@raspberrypi ~ $ cat /etc/sudoers     #     # This file MUST be edited with the 'visudo' command as root.     #     # Please consider adding local content in /etc/sudoers.d/ instead of     # directly modifying this file.     #     # See the man page for details on how to write a sudoers file.     #     Defaults        env_reset     Defaults        mail_badpass     Defaults        secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"          # Host alias specification          # User alias specification          # Cmnd alias specification          # User privilege specification     root    ALL=(ALL:ALL) ALL          # Allow members of group sudo to execute any command     %sudo   ALL=(ALL:ALL) ALL          # See sudoers(5) for more information on "#include" directives:          #includedir /etc/sudoers.d     pi ALL=(ALL) NOPASSWD: ALL      This is the default sudoers file as included in the Raspbian distro. My /etc/exports on the NFS server:               /DataVolume/shares/rasp *(rw,sync,no_root_squash,no_subtree_check)      Some further information on permissions:               pi@raspberrypi ~ $ ls -la /etc/sudoers     -r--r----- 1 root root 696 Jun 20 06:47 /etc/sudoers          pi@raspberrypi ~ $ ls -la /usr/bin/sudo     -rwsr-xr-x 2 root root 98712 Mar  3  2013 /usr/bin/sudo          pi@raspberrypi ~ $ ls -la /     total 1092     drwxr-xr-x 22 root root 65536 Jul 18 14:12 .     drwxr-xr-x 22 root root 65536 Jul 18 14:12 ..     drwxr-xr-x  2 root root 65536 Jun 20 08:55 bin     drwxr-xr-x  2 root root  4096 Jan  1  1970 boot     drwxr-xr-x 12 root root  3020 Jun 20 09:32 dev     drwxr-xr-x 99 root root 65536 Jul 18 17:14 etc     drwxr-xr-x  3 root root 65536 Jun 20 05:48 home     drwxr-xr-x 12 root root 65536 Jun 20 08:42 lib     drwx------  2 root root 65536 Jun 20 05:34 lost+found     drwxr-xr-x  2 root root 65536 Jun 20 05:36 media     drwxr-xr-x  2 root root 65536 Apr 30 22:48 mnt     drwxr-xr-x  5 root root 65536 Jun 20 09:24 opt     dr-xr-xr-x 69 root root     0 Jan  1  1970 proc     drwx------  2 root root 65536 Jun 20 05:36 root     drwxr-xr-x 10 root root   440 Jun 20 09:32 run     drwxr-xr-x  2 root root 65536 Jun 20 08:55 sbin     drwxr-xr-x  2 root root 65536 Jun 20  2012 selinux     drwxr-xr-x  2 root root 65536 Jun 20 05:36 srv     dr-xr-xr-x 12 root root     0 Jan  1  1970 sys     drwxrwxrwt  4 root root 65536 Jul 18 17:17 tmp     drwxr-xr-x 10 root root 65536 Jun 20 05:36 usr     drwxr-xr-x 11 root root 65536 Jul 18 17:14 var          pi@raspberrypi ~ $ strace /usr/bin/sudo     execve("/usr/bin/sudo", ["/usr/bin/sudo"], [/* 15 vars */]) = 0     brk(0)                                  = 0x1774000     fcntl64(0, F_GETFD)                     = 0     fcntl64(1, F_GETFD)                     = 0     fcntl64(2, F_GETFD)                     = 0     access("/etc/suid-debug", F_OK)         = -1 ENOENT (No such file or directory)     uname({sys="Linux", node="raspberrypi", ...}) = 0     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f9b000     access("/etc/ld.so.preload", R_OK)      = 0     open("/etc/ld.so.preload", O_RDONLY)    = 3     fstat64(3, {st_mode=S_IFREG|0644, st_size=44, ...}) = 0     mmap2(NULL, 44, PROT_READ|PROT_WRITE, MAP_PRIVATE, 3, 0) = 0xb6f9a000     close(3)                                = 0     open("/usr/lib/arm-linux-gnueabihf/libcofi_rpi.so", O_RDONLY) = 3     read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\270\4\0\0004\0\0\0"..., 512) = 512     lseek(3, 7276, SEEK_SET)                = 7276     read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1080) = 1080     lseek(3, 7001, SEEK_SET)                = 7001     read(3, "A.\0\0\0aeabi\0\1$\0\0\0\0056\0\6\6\10\1\t\1\n\2\22\4\24\1\25"..., 47) = 47     fstat64(3, {st_mode=S_IFREG|0755, st_size=10170, ...}) = 0     mmap2(NULL, 39740, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6f6f000     mprotect(0xb6f71000, 28672, PROT_NONE)  = 0     mmap2(0xb6f78000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0xb6f78000     close(3)                                = 0     munmap(0xb6f9a000, 44)                  = 0     open("/etc/ld.so.cache", O_RDONLY)      = 3     fstat64(3, {st_mode=S_IFREG|0644, st_size=42997, ...}) = 0     mmap2(NULL, 42997, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb6f64000     close(3)                                = 0     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     open("/lib/arm-linux-gnueabihf/libselinux.so.1", O_RDONLY) = 3     read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0TM\0\0004\0\0\0"..., 512) = 512     lseek(3, 107532, SEEK_SET)              = 107532     read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1120) = 1120     lseek(3, 107244, SEEK_SET)              = 107244     read(3, "A0\0\0\0aeabi\0\1&\0\0\0\0056\0\6\6\10\1\t\1\n\2\22\4\24\1\25"..., 49) = 49     fstat64(3, {st_mode=S_IFREG|0644, st_size=108652, ...}) = 0     mmap2(NULL, 142424, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6f41000     mprotect(0xb6f5b000, 28672, PROT_NONE)  = 0     mmap2(0xb6f62000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x19) = 0xb6f62000     close(3)                                = 0     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     open("/lib/arm-linux-gnueabihf/libutil.so.1", O_RDONLY) = 3     read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\344\t\0\0004\0\0\0"..., 512) = 512     lseek(3, 8688, SEEK_SET)                = 8688     read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1160) = 1160     lseek(3, 8356, SEEK_SET)                = 8356     read(3, "A0\0\0\0aeabi\0\1&\0\0\0\0056\0\6\6\10\1\t\1\n\2\22\4\24\1\25"..., 49) = 49     fstat64(3, {st_mode=S_IFREG|0644, st_size=9848, ...}) = 0     mmap2(NULL, 41128, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6f36000     mprotect(0xb6f38000, 28672, PROT_NONE)  = 0     mmap2(0xb6f3f000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0xb6f3f000     close(3)                                = 0     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     open("/lib/arm-linux-gnueabihf/libdl.so.2", O_RDONLY) = 3     read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0(\t\0\0004\0\0\0"..., 512) = 512     lseek(3, 8652, SEEK_SET)                = 8652     read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1160) = 1160     lseek(3, 8320, SEEK_SET)                = 8320     read(3, "A0\0\0\0aeabi\0\1&\0\0\0\0056\0\6\6\10\1\t\1\n\2\22\4\24\1\25"..., 49) = 49     fstat64(3, {st_mode=S_IFREG|0644, st_size=9812, ...}) = 0     mmap2(NULL, 41136, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6f2b000     mprotect(0xb6f2d000, 28672, PROT_NONE)  = 0     mmap2(0xb6f34000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0xb6f34000     close(3)                                = 0     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     open("/lib/arm-linux-gnueabihf/libc.so.6", O_RDONLY) = 3     read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\214y\1\0004\0\0\0"..., 512) = 512     lseek(3, 1198880, SEEK_SET)             = 1198880     read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1360) = 1360     lseek(3, 1198444, SEEK_SET)             = 1198444     read(3, "A.\0\0\0aeabi\0\1$\0\0\0\0056\0\6\6\10\1\t\1\n\2\22\4\24\1\25"..., 47) = 47     fstat64(3, {st_mode=S_IFREG|0755, st_size=1200240, ...}) = 0     mmap2(NULL, 1242408, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6dfb000     mprotect(0xb6f1e000, 28672, PROT_NONE)  = 0     mmap2(0xb6f25000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x122) = 0xb6f25000     mmap2(0xb6f28000, 9512, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb6f28000     close(3)                                = 0     mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f9a000     mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f99000     set_tls(0xb6f994c0, 0xb6f99be8, 0xb6f9f048, 0xb6f994c0, 0xb6f9f048) = 0     mprotect(0xb6f25000, 8192, PROT_READ)   = 0     mprotect(0xb6f34000, 4096, PROT_READ)   = 0     mprotect(0xb6f3f000, 4096, PROT_READ)   = 0     mprotect(0xb6f62000, 4096, PROT_READ)   = 0     mprotect(0x26000, 4096, PROT_READ)      = 0     mprotect(0xb6f9e000, 4096, PROT_READ)   = 0     munmap(0xb6f64000, 42997)               = 0     statfs64("/sys/fs/selinux", 88, 0xbebee7b8) = -1 ENOENT (No such file or directory)     statfs64("/selinux", 88, {f_type="NFS_SUPER_MAGIC", f_bsize=4096, f_blocks=485337168, f_bfree=286562224, f_bavail=286562224, f_files=30355200, f_ffree=29689069, f_fsid={0, 0}, f_namelen=255, f_frsize=4096}) = 0     brk(0)                                  = 0x1774000     brk(0x1795000)                          = 0x1795000     open("/proc/filesystems", O_RDONLY|O_LARGEFILE) = 3     fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0     mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f98000     read(3, "nodev\tsysfs\nnodev\trootfs\nnodev\tr"..., 1024) = 287     read(3, "", 1024)                       = 0     close(3)                                = 0     munmap(0xb6f98000, 4096)                = 0     open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3     fstat64(3, {st_mode=S_IFREG|0644, st_size=1534656, ...}) = 0     mmap2(NULL, 1534656, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb6c84000     close(3)                                = 0     geteuid32()                             = 1000     stat64("/usr/bin/sudo", {st_mode=S_IFREG|S_ISUID|0755, st_size=98712, ...}) = 0     open("/usr/share/locale/locale.alias", O_RDONLY) = 3     fstat64(3, {st_mode=S_IFREG|0644, st_size=2570, ...}) = 0     mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f98000     read(3, "# Locale name alias data base.\n#"..., 4096) = 2570     read(3, "", 4096)                       = 0     close(3)                                = 0     munmap(0xb6f98000, 4096)                = 0     open("/usr/share/locale/en_GB.UTF-8/LC_MESSAGES/sudo.mo", O_RDONLY) = -1 ENOENT (No such file or directory)     open("/usr/share/locale/en_GB.utf8/LC_MESSAGES/sudo.mo", O_RDONLY) = -1 ENOENT (No such file or directory)     open("/usr/share/locale/en_GB/LC_MESSAGES/sudo.mo", O_RDONLY) = -1 ENOENT (No such file or directory)     open("/usr/share/locale/en.UTF-8/LC_MESSAGES/sudo.mo", O_RDONLY) = -1 ENOENT (No such file or directory)     open("/usr/share/locale/en.utf8/LC_MESSAGES/sudo.mo", O_RDONLY) = -1 ENOENT (No such file or directory)     open("/usr/share/locale/en/LC_MESSAGES/sudo.mo", O_RDONLY) = -1 ENOENT (No such file or directory)     write(2, "sudo", 4sudo)                     = 4     write(2, ": ", 2: )                       = 2     write(2, "effective uid is not 0, is /usr/"..., 133effective uid is not 0, is /usr/bin/sudo on a file system with the 'nosuid' option set or an NFS file system without root privileges?) = 133     write(2, "\n", 1     )                       = 1     close(0)                                = 0     access("/var/run/utmpx", F_OK)          = -1 ENOENT (No such file or directory)     open("/var/run/utmp", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 0     fcntl64(0, F_GETFD)                     = 0x1 (flags FD_CLOEXEC)     _llseek(0, 0, [0], SEEK_SET)            = 0     setitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={0, 0}}, {it_interval={0, 0}, it_value={0, 0}}) = 0     rt_sigaction(SIGALRM, {0xb6efaa54, [], 0x4000000 /* SA_??? */}, {SIG_DFL, [], 0}, 8) = 0     setitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={10, 0}}, {it_interval={0, 0}, it_value={0, 0}}) = 0     fcntl64(0, F_SETLKW, {type=F_RDLCK, whence=SEEK_SET, start=0, len=0}) = 0     read(0, "\10\0\0\0*\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384     read(0, "\2\0\0\0\0\0\0\0~\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384     read(0, "\1\0\0\0002N\0\0~\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384     read(0, "\10\0\0\0\304\6\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384     read(0, "\6\0\0\0\331\7\0\0tty2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384     read(0, "\6\0\0\0\332\7\0\0tty3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384     read(0, "\6\0\0\0\333\7\0\0tty4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384     read(0, "\7\0\0\0\337\7\0\0tty1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384     read(0, "\6\0\0\0\334\7\0\0tty5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384     read(0, "\6\0\0\0\336\7\0\0ttyAMA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384     read(0, "\6\0\0\0\335\7\0\0tty6\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384     read(0, "\7\0\0\0\363\7\0\0pts/0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384     read(0, "", 384)                        = 0     fcntl64(0, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}) = 0     setitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={0, 0}}, {it_interval={0, 0}, it_value={9, 980558}}) = 0     rt_sigaction(SIGALRM, {SIG_DFL, [], 0x4000000 /* SA_??? */}, NULL, 8) = 0     exit_group(1)                           = ?      Output of /proc/mounts:               pi@raspberrypi ~ $ cat /proc/mounts     rootfs / rootfs rw 0 0     10.0.0.12:/DataVolume/shares/rasp / nfs rw,relatime,vers=3,rsize=4096,wsize=4096,namlen=255,hard,nolock,proto=udp,timeo=11,retrans=3,sec=sys,mountaddr=10.0.0.12,mountvers=3,mountproto=udp,local_lock=all,addr=10.0.0.12 0 0     devtmpfs /dev devtmpfs rw,relatime,size=219832k,nr_inodes=54958,mode=755 0 0     tmpfs /run tmpfs rw,nosuid,noexec,relatime,size=44800k,mode=755 0 0     tmpfs /run/lock tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k 0 0     proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0     sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0     tmpfs /run/shm tmpfs rw,nosuid,nodev,noexec,relatime,size=89580k 0 0     devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620 0 0     /dev/mmcblk0p1 /boot vfat ro,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro 0 0      The permissions seem to be in order. Not sure if the strace is of any use, I have no idea how to interpret it myself. Any idea on fixing this? I do not have the root password as this is a premade Raspbian image so I cannot test whether `su` works.


title: What is the use of ; in a single line command?

text: What does `;` mean in single line scripts like this:               while true; do sudo -n true; sleep 60; kill -0 '$$' || exit; done 2>/dev/null &      Does it mean new line, or "next command"?


title: kernel: Namespaces support

text: I am wondering what exactly the “Namespaces support” feature in the Linux kernel means. I am using kernel 3.11.1 (the newest stable kernel at this time). If I decide to disable it, will I notice any change on my system? And in case somebody decides to make use of namespaces, is it enough to just compile `NAMESPACES=Y` in the kernel, or does he need userspace tools as well?


title: Two commands, one pipeline

text: I need these two commands to be **_one_** (so I can pipe them further):               dig +nottlid -t any bix.hu | egrep -v "^;;|^;|^$" | sort     dig +nottlid -t any www.bix.hu | egrep -v "^;;|^;|^$" | sort      I mean I need the output of these two commands to be in one pipe:               $ dig +nottlid -t any bix.hu | egrep -v "^;;|^;|^$" | sort     bix.hu.         IN  A   193.239.149.1     bix.hu.         IN  MX  10 deneb.iszt.hu.     bix.hu.         IN  NS  ns.iszt.hu.     bix.hu.         IN  NS  ns.iszt.hu.     bix.hu.         IN  NS  ns-s.nic.hu.     bix.hu.         IN  NS  ns-s.nic.hu.     bix.hu.         IN  SOA ns.iszt.hu. hostmaster.iszt.hu. 2011053000 28800 7200 604800 14400      and               dig +nottlid -t any www.bix.hu | egrep -v "^;;|^;|^$" | sort     bix.hu.         IN  NS  ns.iszt.hu.     bix.hu.         IN  NS  ns-s.nic.hu.     www.bix.hu.     IN  A   193.239.149.1      so that I could `sha256sum` them together, without writing the output of the two commands to one file, and `sha256sum` the file. Q: it's like this:               echo hi | echo hi2 | sha256sum      of course this won't work, but are there any solutions for this? So that I need the sha256sum of:               hi     hi2     -->>     697ec886148d94d5b094df14f301f2e5a4abd8098a0e0dc2afb0a97945cea677      but I can only have the outputs from different commands [mentioned above, 2 different domains]. [Just want to write a "DNS checker" script to warn me when DNS records changes for a domain]


title: How to use awk or sed to convert csv diffs into more readable format

text: Can anyone give me the example of how to use awk or sed (not sure which one, as I haven't use either of these much, as I have mostly been using grep and cut to work with csv data) to convert differences between two .csv files into something more readable. e.g. if I have a generated a diff from old and new .csv files, which in a real life could be much more complex because of a large number of columns:               2,3c2,3     < Barbara,1093,19     < Magdaline,2093,20     \ No newline at end of file     ---     > Barbara,1011,19     > Magdaline,12093,20     \ No newline at end of file      how could I convert it to this format:               Barbara  1093 1011      Magdaline 2093 12093      in a new format - a first column of data is a value from first column in both parts of the diff, to identify the line. Second column contains the data from the first csv file (old value) and third column - is the value from the second csv file (new value). How can I perform such text conversion via awk or sed? Thank you.


title: Subtracting dates in unix

text: Is there a way in unix to subtract a month or at least 30 days from a specific date? The date is to be inputted by the user. Example: 2012-11-19 - 1 month = 2013-10-19 This one doesn't work:               date -d '2013-10-13 - 1 month' '+%F'


title: How to deny rdesktop access to others?

text: Someone keeps trying to connect to my Ubuntu machine through remote desktop. Is there any way I can determine who it is, and permanently block access to my machine?


title: tcsh vs zsh. Escape/control characters

text: I am having problems running this command to work in zsh:               my_command -u something -s X:^0        The command works right away on tcsh, but on zsh I get:               zsh: no matches found -s X:^0      This made me wonder if `^` is to blame. As far as I understand `sX:^0` is the value of the argument `-s`, but zsh seems to expand it and not pass it to `my_command` in the same way tcsh would do. Is my understanding correct? If so how can I run the same command in zsh?


title: xming debian can't open display

text: I followed numerous guides for setup and even more "can't open display" error solution, but still can't find what's wrong. First, on VPS Debian Squeeze I installed xserver-xorg-core and xauth. Then on Windows 7 installed xming 6.9.0.31. Then configured putty 2012-11-09:r9690 This is putty config: ![putty config](http://i.stack.imgur.com/0pTjh.png) sshd_config on VPS is set to:               X11Forwarding yes     X11DisplayOffset 10     X11UseLocalhost yes      Xauthority file is created in `~/.Xauthority`. `$DISPLAY` is `localhost:10.0` I first start xming, then connect with putty. When I type `xlogo` I get `Error: Can't open display: localhost:10.0`. I put VPS's IP in x0.hosts in xming folder. Tried to change DISPLAY to my IP, :0, localhost:0... I can't even remember the combinations. Tried to put localhost:0 in putty config. I even changed the order of lines in `/etc/hosts` as I saw in one answer, but nothing works. **Update:** This is putty eventlog:               2013-03-03 15:58:14 Looking up host "IP"     2013-03-03 15:58:14 Connecting to IP port 22     2013-03-03 15:58:14 Server version: SSH-2.0-OpenSSH_5.5p1 Debian-6+squeeze2     2013-03-03 15:58:14 Using SSH protocol version 2     2013-03-03 15:58:14 We claim version: SSH-2.0-PuTTY_Snapshot_2012_11_09:r9690     2013-03-03 15:58:14 Doing Diffie-Hellman group exchange     2013-03-03 15:58:14 Doing Diffie-Hellman key exchange with hash SHA-256     2013-03-03 15:58:15 Host key fingerprint is:     2013-03-03 15:58:15 ssh-rsa 2048 3f:6e:7d:6c:14:6a:3e:18:0d:d4:05:c9:b2:60:d3:00     2013-03-03 15:58:15 Initialised AES-256 SDCTR client->server encryption     2013-03-03 15:58:15 Initialised HMAC-SHA1 client->server MAC algorithm     2013-03-03 15:58:15 Initialised AES-256 SDCTR server->client encryption     2013-03-03 15:58:15 Initialised HMAC-SHA1 server->client MAC algorithm     2013-03-03 15:58:19 Sent password     2013-03-03 15:58:19 Access granted     2013-03-03 15:58:19 Opening session as main channel     2013-03-03 15:58:19 Opened main channel     2013-03-03 15:58:19 Requesting X11 forwarding     2013-03-03 15:58:20 X11 forwarding enabled     2013-03-03 15:58:20 Allocated pty (ospeed 38400bps, ispeed 38400bps)     2013-03-03 15:58:20 Started a shell/command      Where can I check elsewhere? Any solution to this?


title: Check whether two directories and their subdirectories are the same

text: With diff -r I can do this task, however it takes so long because diff checks file's content. I want something that determine that two files are the same regarding of their size, last modified, etc. But no checking bit by bit the file (for example a video takes sooo long) Is there any other way?


title: Compile a program without sudo access

text: I am connected to a linux system with SSH in my college. I found that ctorrent is a console alternative of bitorrent. I have downloaded the tar.gz source but to compile/install it needs sudo access Is there a way to install the program without sudo access? I don't know a lot about linux and cannot make this answer work with ctorrent.