How can I merge root and home in Fedora?

I've installed fedora with default configuration few months back and now I want to arrange the mount points. `/etc/fstab` look like that:               /dev/mapper/fedora_dhcppc4-root /                       ext4    defaults        1 1     UUID=9fb84dcf-739e-4368-8f90-cdd0a252a2a3 /boot                   ext4    defaults        1 2     /dev/mapper/fedora_dhcppc4-home /home                   ext4    defaults        1 2     /dev/mapper/fedora_dhcppc4-swap swap                    swap    defaults        0 0      and               [user@dhcppc4]$ df -h     Filesystem                       Size  Used Avail Use% Mounted on     devtmpfs                         984M     0  984M   0% /dev     tmpfs                           1002M  260M  742M  26% /dev/shm     tmpfs                           1002M  4.1M  998M   1% /run     tmpfs                           1002M     0 1002M   0% /sys/fs/cgroup     /dev/mapper/fedora_dhcppc4-root   47G  5.5G   39G  13% /     /dev/sdc1                        477M  142M  310M  32% /boot     /dev/mapper/fedora_dhcppc4-home   23G   19G  2.8G  88% /home      What I want is to merge the root and home that it all will be on the same fs.


Where is my eth0 configuration on Wheezy

I have a perfectly happy Debian Wheezy 7.4 install that sets up `eth0` as DHCP. But as I want to set a static IP address for it, I navigate to `/etc/network` and open up the `interfaces` file and see the entire contents:               auto lo     iface lo inet loopback      But .. but .. but where is `eth0` being configured? Using the graphical system tools I can set a static IP, but I'd prefer to do this via the command line. But where do I do this?


Linux sound: how does it work and why do I need to chain 3 architectures to use JACK?

Linux newbie: How do I use Jack? How does Linux sound work? I have an app that is trying to output sound through ALSA or JACK, but I am not hearing anything. Here are a couple of articles, from which I learned that ALSA is the kernel- mode sound driver for linux, and libasound is the user-space library to which applications interface. Furthermore PulseAudio and JACK are audio servers/routers to allow multiple applications to control multiple hardware and applications. Here is a nice article how to route `all-applications -> jack -> PulseAudi -> ALSA`. Looks pretty simple, but I do not understand why the need of so many layers. Why not directly jack to alsa?   * How do I list the client applications, using alsa? (I need to find out why am I not hearing anything)   * How do I route jack directly to alsa? Or should I do as the last article points out - route it through PulseAudio?   * After all this is done, how do I list information on all client applications to jack?


Which Debian package does /etc/environment come from?

I know that `/etc/profile` is installed by `base-files`, but it doesn't look like this package installs `/etc/environment`:               $ dpkg -S /etc/environment     dpkg-query: no path found matching pattern /etc/environment      Which package installs it, and how would I revert it to the package's default?


Disable USB drive from sleeping

I am loading fedora20 directly from a SATA drive connected via USB. The problem is that I will be working and all of a sudden the drive seems to have been put to sleep and nothing will work except what is already in RAM. If I restart the computer, the drive is still sleeping and will load windows instead of fedora even though the fedora drive is above the windows one. This is because the drive is connected via an alternate power supply and I suppose it thinks it is still sleeping. The only way to fix this is to disconnect the power from the fedora SATA drive and reboot. I found this article for Ubuntu http://askubuntu.com/questions/80638/how-to- disable-auto-power-off-of-usb-devices-like-usb-mouse How can I disable autosleep for USB on a fedora20 OS?


Activate WiFi on runlevel 3 startup

I am running SL6. During GNOME session, the wifi is connected as soon as I login, however the same does not happen until I login. The situation further worsens in runlevel 3 where the wifi is not connected even after login. I have tried many solutions related to *wpa_suppliant* over the internet but none seem to help. It seems like it is an open bug in Fedora (which, I believe, is near-upstream for RHEL family). Because I use the box in a headless manner and use it as NAT for other devices connected to it through ethernet, I would want it to be connected once it boots without logging in. Is there a solution?


Is it a good idea to use pwsafe - a password manager not updated since 2005?

I'm looking for a command-line Linux password-manager. It appears that pwsafe is the program most commonly used. However, its latest update was in 2005. Is it a good idea to use this? Has it been so stable that no updates are necessary, or am I risking using outdated software for an important task like password management?


Why piping find and grep returns nothing?

I'm trying to have `grep` search inside specified files that are returned by `find`:               find . -type d -name 'mydir*' -exec find '{}' -name '*.java' \; | grep 'MyClass'      This doesn't work. Meanwhile, this works.               grep 'MyClass' $(find . -type d -name 'mydir*' -exec find '{}' -name '*.java' \;)      What's the problem with my first example?


Is there a way to virtually split my monitor (for maximizing windows)

My question is essentially if I can fake the behaviour one gets using usual window managers on linux if one has a dual head setup. That is, if I maximize a window it maximizes only on one part of the desktop, matching the area of one physical display. I have only one screen, but it has a fairly large resolution and most of the time I will want to work on multiple separate windows, horizontally tiled. I have heard about tiling window managers, but all I know are more like corner groups and do not behave like other common window managers (xfwm, compiz). I am currently using xfwm, and would like to stick with it if possible. If this task _requries_ , I'd prefer one which either behaves similar to the common ones out of the box _or_ for which ready configuration is available. The first hack which came into my mind was trying to fake the information xrandr gives about the screen geometry and fool the window manager using that approach, but this seems like a healy hack which should not be neeccessary. I'm using fedora linux, but I'm also fine with building the software myself if its not in the package management.


Preferred mount points for internal HDDs

I am relatively new to Linux and I apologise if this is a silly question. I read the Linux FS Hierarchy document but it didn't answer my question. I would like to know if there is a typical drive mounting scheme for general- use internal HDDs in Linux. I ask because I have two HDDs that were mounted as "E:" and "F:" in Windows, but since they hold various types of files (movies, music, personal documentation, source code) I'm not sure where they fit in the Linux filesystem hierarchy. My instinct was to mount the HDDs in /mnt/hdd{1 | 2} or /media/hdd{1 | 2}, but that goes against what LFSH suggests is the purpose of these two directories. I think mounting in /home would be the most sensible. Thank you.


What are the differences between the current Linux kernel and the Unix SVR4 kernel in terms of device drivers+i/o and virtual files systems?

Yes I realize that Linux supports many more file systems and recognizes more devices than Unix SVR4. I'm interested in what the differences are in the abstraction on top of an actual file system, or the virtual file system as well as differences in how the two handle a device **in general**. Please provide a source.


Restarting Gnome 3 in Debian Wheezy?

What's the correct way to restart Gnome 3 (and Xorg) under Debian 7.0 Wheezy? I've seen older documentation on how to this, but it is outdated. The `ctrl`+`alt`+`backspace` shortcut no longer works by default. Running `sudo /etc/init.d/gdm3 restart` from Gnome terminal just gives me a blank screen with blinking underscore and never properly reboots the X session.


Explanation of the default Debian sources?

So I've looked online and haven't found a clear explanation of the default Debian source list. Specially, what do `main`, `updates`. `proposed-updates` and `security` mean in the context of `/etc/apt/sources.list`? I can make assumption about what they mean, but I haven't found enough information to understand if I should, for instance, include `updates` when switching to testing. https://wiki.debian.org/SourcesList has some information, but not omits any information on `updates` or `security`. I am fairly new to Debian, and while I think I could just muddle through the distinctions here, I'd really like just a clear explanation of what is going on instead of just copy and pasting lines into `/etc/apt/sources.list`.


How to compile kernel for KVM guest (without paravirtualization)?

So I have a KVM machine, where I run an Ubuntu 12.04 (server edition).   I want to compile a minimalistic kernel for the KVM guest, but I only found the howto for hosts, and guests with paravirtualization. I want to compile a kernel for a guest. Nothing more. With only the things it needs.


Can't understand this script. bash <<(curl -s http://xxx.com)

In a rails book, the author wrote the script to install ruby rvm. `bash <<(curl -s https://rvm.beginrescueend.com/install/rvm)` But I don't understand how it works. Could you explain this?


How can I profile a shell script?

I have several programs that i'm executing in a shell script:               ./myprogram1     ./myprogram2     ...      I know that I can profile each individual program by editing the sourcecode, but I wanted to know if there was a way I could measure the total time executed by profiling the script itself. Is there a timer program that I can use for this purpose? If so, how precise is its measurement?


Using wget to get file names from a text file

I have found a website that hosts a few files that I'm after, there's too many to download them all individually. The filenames take a fairly standard and reproduceable form i.e. 1_a, 1_b, 1_c etc Is there a way, using the Linux command line, to use `wget` to automate downloading them all? I can easily put the filenames in a 1 entry per line text file and direct the command line to look up from there, but it wouldn't be the whole URL, just the bit that changes so the command would need to look something like:               wget url.com/files/(bit from file).doc sourcefile.txt      And basically be able to substitute in an entry from the sourcefile to the bit in the brackets. Also, at one stage a large chunk (a few hundred) of the files are simply sequentially numbered, so could I use a for loop for that bit? If so, how would I do this syntactically in the command line?


Xmonad seems like a (physically) painful experience

I've been using Xmonad for several hours after hearing recommendations from several people. Currently my configuration is very basic. I mapped the modifier key to the "windows key" as suggested in several places. As I kept using it I noticed that jumping between workspaces is done very often. However, in order to jump I need to stretch my index finger to reach for the number, while the thumb needs to be folded in order to press the "windows key". Doing that stretch & fold position for every desktop switch made my thumb quite hurt. Since I don't have a right "windows key" in my keyboard I mapped the "menu key" to be a "windows key". However, if I don't want my right hand to leave the hjkl keys then I need to fold my right thumb each time I want to switch workspaces. I know I can remap everything I want, but I want to understand the logic behind the default settings before I start remapping keys. I feel petty for writing this question, but people say the work with XMonad for 10 hours in a a day. How is that possible without hurting your thumbs?


multicast is enabled on ubuntu?

I have one of my Ubuntu machine-               rkost@rj-vm9-14105:~/infinispan/infinispan-server-6.0.0.Alpha1/bin$ uname -a          Linux rj-vm9-14105 2.6.35-22-server #33-Ubuntu SMP Sun Sep 19     20:48:58 UTC 2010 x86_64 GNU/Linux      how do I make sure multicast is enabled on my network interfaces and infrastructure? I have tried several solutions but not able to understand whether it is actually enabled or not. I am trying to start the Infinispan server as the remote cache on both of my machines but somehow they are not able to form a cluster of two nodes so I am suspecting multicast feature is disabled somehow.


How do I resolve "xrandr: cannot find crtc for output"?

Whenever I come to work I type               xrandr --auto     xrandr --output VGA1 --right-of LVDS1      This gets my second display working, however now I get               xrandr: cannot find crtc for output VGA1      For reference here is the output of xrandr,               Screen 0: minimum 320 x 200, current 3286 x 1080, maximum 8192 x 8192     LVDS1 connected 1366x768+1920+0 (normal left inverted right x axis y axis) 277mm x 156mm        1366x768       60.0*+        1360x768       59.8     60.0          1024x768       60.0          800x600        60.3     56.2          640x480        59.9       VGA1 connected (normal left inverted right x axis y axis)        1680x1050      59.9 +        1600x1200      60.0          1680x945       60.0          1400x1050      74.9     60.0          1600x900       60.0          1280x1024      75.0     60.0          1440x900       75.0     59.9          1280x960       60.0          1366x768       60.0          1360x768       60.0          1280x800       74.9     59.8          1152x864       75.0          1280x768       74.9     59.9          1280x720       60.0          1024x768       75.1     70.1     60.0          1024x576       60.0          832x624        74.6          800x600        72.2     75.0     60.3     56.2          848x480        60.0          640x480        72.8     75.0     66.7     60.0          720x400        70.1       HDMI1 disconnected (normal left inverted right x axis y axis)     DP1 disconnected (normal left inverted right x axis y axis)     HDMI2 disconnected (normal left inverted right x axis y axis)     HDMI3 disconnected (normal left inverted right x axis y axis)     DP2 disconnected 1920x1080+0+0 (normal left inverted right x axis y axis) 0mm x 0mm     DP3 disconnected (normal left inverted right x axis y axis)       1920x1080 (0x1df)  148.5MHz             h: width  1920 start 2008 end 2052 total 2200 skew    0 clock   67.5KHz             v: height 1080 start 1084 end 1089 total 1125           clock   60.0Hz


Creating a terminal application from a shell script

I have a shell script. I want to convert the shell script to an application for Ubuntu which can be installed using (`sudo apt-get install)` command and after installing, the application can run from the terminal by typing the name of the application. I am new to Ubuntu and I am not able to understand how do I proceed.


What video cards for a Desktop computer compatible with Linux can support Dual Monitors? Our start up needs to use two monitors but our default enviroment needs two monitors, can somebody recommend a cheap Video Card that could help us to use two monitors?


Weird issue with unmet dependencies when cloning package states from earlier installation on same machine

I've been doing the usual routine of saving the package selections and also marking the packages as `auto` or `manual` as outlined in the question and answer here: Restoring all data from backup of `dpkg --set-selections '*'`. Now when I try to run `apt-get -u dselect-upgrade` I get:               # apt-get -u dselect-upgrade     Reading package lists... Done     Building dependency tree     Reading state information... Done     The following packages have unmet dependencies:      cron : Depends: adduser but it is not going to be installed      upstart : Depends: initscripts                Depends: mountall                Depends: ifupdown (>= 0.6.10ubuntu5)     E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.     E: Internal error, problem resolver broke stuff      The alternative `aptitude install` doesn't give me anything at all:               # aptitude install     No packages will be installed, upgraded, or removed.     0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.     Need to get 0 B of archives. After unpacking 0 B will be used.      So when I check whether `cron` and `adduser` are installed, they of course are:               # dpkg -l|grep -E '(adduser|cron)'     ii  adduser                           3.113ubuntu2                 add and remove users and groups     ii  cron                              3.0pl1-120ubuntu4            process scheduling daemon      So two questions: **what's going on and how do I resolve it?** NB: the package selections were taken from another 12.04 installation, same architecture and everything. In fact it's a system that ran on the same machine before reinstalling on a different disk. This is the first time I run into this kind of problems when cloning an existing setup by means of package states and then copying over relevant contents from the original `/etc`. For the second set of allegedly unmet dependencies I get:               # dpkg -l|grep -E '(upstart|initscripts|mountall|ifupdown)'     ii  ifupdown                          0.7~beta2ubuntu8             high level tools to configure network interfaces     ii  initscripts                       2.88dsf-13.10ubuntu11.1      scripts for initializing and shutting down the system     ii  mountall                          2.36.4                       filesystem mounting tool     ii  upstart                           1.5-0ubuntu7.2               event-based init daemon      So all installed. No held packages either. Output of `aptitude search ~i|grep ^ih` is empty. * * * The system in question is a Ubuntu Server 12.04.2 installation, otherwise upgraded to latest packages. No third-party repositories configured, no package pinning or so going on. * * * btw: I would appreciate if the answer would include some pointers about what to do generally when hitting such an issue without relying in the subtly different problem resolvers in the various `dpkg` front ends. Most suggestions I've come across seem to rely solely on that and that's why I'm out of luck now. So I need to know some of the nitty gritty, too.


dealing with un-executable commands inside a shell-script

I am given an assignment like this: Write a Bash script that takes a *.tex file as command-line argument and checks if the file executes correctly without any errors. If it executes without any error and warning, assign a mark of 2 to that file. (1 mark if it compiled with a warning, and 0 marks if it shows an error). I am able to assign marks for files which executed without any warnings and for files which gave a warning. Here, I am giving some of the lines of my code,               #!/bin/bash     rm t.txt     pdflatex $1 >> t.txt     message=`tail -2 t.txt|grep -i "output"|cut -c 1-6`      After executing the command `pdflatex`, my script searches for appropriate words like "output" and "warning", and accordingly assigns marks. But in the case of a file which has errors, the `pdflatex` command exits only if we give a 'x'. Since it is expecting an 'x' from the user, it waits there. If I run the script, it is not showing any output; but if I print an x, it assigns the mark to that file as zero. But I have to give this program to an automatic code-evaluator which checks for my code, and tells if my code is correct for all the cases... How do I accomplish that?


Localhost .htaccess not working on Ubuntu

I have been trying to get my `.htaccess` file to work on my localhost. I know that the file works because it is on my server and works. However it doesn't seem to be working locally. I have followed the tutorials I could find to set overrides to all, below is my `/etc/apache2/sites-available/default` file start:               <VirtualHost *:80>         ServerAdmin webmaster@localhost              DocumentRoot /var/www         <Directory />             Options FollowSymLinks             AllowOverride All         </Directory>         <Directory /var/www/>             Options Indexes FollowSymLinks MultiViews             AllowOverride All             Order allow,deny             allow from all         </Directory>      This is the code in the same directory for my nibble site:               <VirtualHost *:80>         ServerName nibble.local         DocumentRoot /var/www/nibble_framework/web/         <Directory /var/www/nibble_framework/web/>             AllowOverride All             Options Indexes FollowSymLinks MultiViews             Allow from All         </Directory>         RewriteLog /var/www/rewrite.log         ErrorLog /var/log/apache2/error.log     </VirtualHost>      I have enabled this site using a2ensite and restarted apache. I have also added the site to my hosts file:                 127.0.0.1  nibble.local      I have enabled mod rewrite using a2enmod and restarted/reloaded apache multiple times.                 $ a2enmod rewrite        Module rewrite already enabled      My `.htaccess` file is in `/var/www/nibble_framework/web/.htaccess` and has the following code:                 Options +FollowSymLinks +ExecCGI            <IfModule mod_rewrite.c>       RewriteEngine On            RewriteCond %{REQUEST_FILENAME} !-f       RewriteCond %{REQUEST_FILENAME} !-d       RewriteRule ^([^/]*)/?.*$ - [E=FILE:%{DOCUMENT_ROOT}/$1.php]            RewriteCond %{ENV:FILE} !^$       RewriteCond %{ENV:FILE} -f       RewriteRule ^([^/]*)/?(.*)$ $1.php?url=$2 [QSA,L]            RewriteCond %{ENV:FILE} !^$       RewriteCond %{ENV:FILE} !-f       RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]       </IfModule>      When I do a `print_r($_REQUEST)`, it is allways an empty array even when the url is poplulated by a long string. Does anyone have any idea why this might be failing? Edit: apache2 access log:               ~$ tail -f /var/log/apache2/access.log     ::1 - - [16/Aug/2011:07:32:39 +0100] "OPTIONS * HTTP/1.0" 200 152 "-" "Apache/2.2.16 (Ubuntu) (internal dummy connection)"     ::1 - - [16/Aug/2011:07:32:39 +0100] "OPTIONS * HTTP/1.0" 200 152 "-" "Apache/2.2.16 (Ubuntu) (internal dummy connection)"     ::1 - - [16/Aug/2011:07:32:39 +0100] "OPTIONS * HTTP/1.0" 200 152 "-" "Apache/2.2.16 (Ubuntu) (internal dummy connection)"     ::1 - - [16/Aug/2011:07:32:40 +0100] "OPTIONS * HTTP/1.0" 200 152 "-" "Apache/2.2.16 (Ubuntu) (internal dummy connection)"     ::1 - - [16/Aug/2011:07:32:40 +0100] "OPTIONS * HTTP/1.0" 200 152 "-" "Apache/2.2.16 (Ubuntu) (internal dummy connection)"     ::1 - - [16/Aug/2011:07:32:40 +0100] "OPTIONS * HTTP/1.0" 200 152 "-" "Apache/2.2.16 (Ubuntu) (internal dummy connection)"     ::1 - - [16/Aug/2011:07:32:40 +0100] "OPTIONS * HTTP/1.0" 200 152 "-" "Apache/2.2.16 (Ubuntu) (internal dummy connection)"     ::1 - - [16/Aug/2011:07:32:40 +0100] "OPTIONS * HTTP/1.0" 200 152 "-" "Apache/2.2.16 (Ubuntu) (internal dummy connection)"     ::1 - - [16/Aug/2011:07:32:40 +0100] "OPTIONS * HTTP/1.0" 200 152 "-" "Apache/2.2.16 (Ubuntu) (internal dummy connection)"     ::1 - - [16/Aug/2011:07:32:40 +0100] "OPTIONS * HTTP/1.0" 200 152 "-" "Apache/2.2.16 (Ubuntu) (internal dummy connection)"


"Swap file xxx already exists" when editing apache configuration file in vim?

Using vim I keep getting a message saying "Swap file xxx already exists" when I'm editing an apache config. However, I don't see it in the working directory on in tmp. How do I delete this?


condition && command + exit

While writing a simple shell tool, I found a piece where I don't know how to get it to work.                 [ "$#" -ne 3 ] || echo "wrong number of arguments" && exit      The above works as intended because it's hard to conceive conditions where echo could fail. But what if I replaced echo with a command that can fail, and still execute `exit` nevertheless? This won't work, because `exit` quits the shell spawned with `( )` and not the main one:                 [ "$#" -ne 3 ] && ( command ; exit )      This will exit always:                 [ "$#" -ne 3 ] && command ; exit       I could use the verbose syntax:                if [ "$#" -ne 3 ] ; then            command            exit      fi      but if I don't want to engage `if` and keep the syntax terse - how can I string conditional execution of commands, including `exit` like that?


Customize Logitech M600 mouse in Fedora 20?

I just got a fancy Logitech M600 touch mouse, and there are very specific things I want it to do on my Fedora 20 64-bit KDE spin. Unfortunately, there don't seem to be any config files where I can just state my demands. I've been looking for a few days now, and have determined that touchegg and HIDPoint are completely out of the question (on account of having absolutely no support for F20). By default, it has middle-touch vertical scrolling, two-finger vertical scrolling, left-swipe is browser back, right-swipe is browser forward. I need left and right swipe to cycle through virtual desktops, _two_ -finger swipes (not natively a gesture at all) to be browser forward and back, and it'd be nifty if three-finger down swipe was minimize or alt+tab. On Windows, this can actually be done easily with Logitech's software, but of course they don't have a Linux version. I'd be happy to edit config files and remap input manually if necessary, but without that additional software the mouse has no idea that half the gestures I want are even significant. I'm hoping someone here has a solution. If not, I can thankfully return the mouse.


Setting headers using the /bin/mail command

I have a bash script that I use with nagios that sends notifications by email. The key part of it looks like this:               # $1 (FROM) | $2 (TO) | $3 (SUBJECT) | $4 (BODY)     /usr/bin/printf "%b" "$4" | /bin/mail -s "$3" "$2" -- -f $1      I know I could use the `sendmail` command directly (like this) but it would mean reworking a few scripts to take care of building the entire message including all headers. Is there any way to specify additional SMTP headers using `/bin/mail`, in my own case I am trying to add the `Importance: high` header? I'm running exim 4.63 as my MTA and CentOS 5.6 x64.


Any relatively new binary distro causes kernel panics

I'm having trouble using **_any_** relatively new binary distro on this machine. The last binary distro to work without issue was Ubuntu 8.04. I'm currently using Gentoo with the latest 3.2.1 kernel and its working fine with all peripherals functional. I was using Gentoo before (since I've always had this problem) but I decided I was tired of configuring everything myself and waiting for things to compile all the time. I tried installing Linux Mint 12, Fedora 16 and Debian Squeeze all with the same results, the kernel panics. It seems to happen more frequently when waking the notebook up or when the wireless card is connected to a network. I've read various articles indicating that there are issues with the wireless card I have, but I would think that using `rmmod iwl4965` and `rmmod iwl_legacy` as well as shutting off the wireless radio would ensure that the wireless card could not cause a kernel panic. This didn't fix the problem. I have also tried using both proprietary `nvidia` drivers and the open-source `nouveau` drivers after reading that some people had issues with the video card. I also find it hard to believe that it's a hardware problem since all of my hardware works when everything is compiled on the system with Gentoo. I have proprietary video drivers working, the machine sleeps and wakes without issue, and I have no issues using `wpa_supplicant` and `wicd` on my wireless card. Does anyone have any thoughts? _**Background information:_**   * Notebook computer: Lenovo T61 _**Output of`lspci`:_**               00:00.0 Host bridge: Intel Corporation Mobile PM965/GM965/GL960 Memory Controller Hub (rev 0c)     00:01.0 PCI bridge: Intel Corporation Mobile PM965/GM965/GL960 PCI Express Root Port (rev 0c)     00:19.0 Ethernet controller: Intel Corporation 82566MM Gigabit Network Connection (rev 03)     00:1a.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI  Controller #4 (rev 03)     00:1a.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5 (rev 03)     00:1a.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 (rev 03)     00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)     00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 03)     00:1c.1 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 2 (rev 03)     00:1c.2 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 3 (rev 03)     00:1c.3 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 4 (rev 03)     00:1c.4 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 5 (rev 03)     00:1d.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 (rev 03)     00:1d.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 (rev 03)     00:1d.2 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #3 (rev 03)     00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 03)     00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev f3)     00:1f.0 ISA bridge: Intel Corporation 82801HBM (ICH8M-E) LPC Interface  Controller (rev 03)     00:1f.2 IDE interface: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) SATA IDE Controller (rev 03)     00:1f.3 SMBus: Intel Corporation 82801H (ICH8 Family) SMBus Controller (rev 03)     01:00.0 VGA compatible controller: nVidia Corporation Quadro NVS 140M (rev a1)     03:00.0 Network controller: Intel Corporation PRO/Wireless 4965 AG or AGN [Kedron] Network Connection (rev 61)     15:00.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev ba)     15:00.1 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 IEEE 1394 Controller (rev  04)     15:00.2 SD Host controller: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 21)     15:00.3 System peripheral: Ricoh Co Ltd R5C843 MMC Host Controller (rev 11)     15:00.4 System peripheral: Ricoh Co Ltd R5C592 Memory Stick Bus Host Adapter (rev 11)     15:00.5 System peripheral: Ricoh Co Ltd xD-Picture Card Controller (rev 11)      _**/proc/cpuinfo_**               processor       : 0     vendor_id       : GenuineIntel     cpu family      : 6     model           : 15     model name      : Intel(R) Core(TM)2 Duo CPU     T7300  @ 2.00GHz     stepping        : 10     microcode       : 0x92     cpu MHz         : 2000.000     cache size      : 4096 KB     physical id     : 0     siblings        : 2     core id         : 0     cpu cores       : 2     apicid          : 0     initial apicid  : 0     fpu             : yes     fpu_exception   : yes     cpuid level     : 10     wp              : yes     flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm lahf_lm ida dts tpr_shadow vnmi flexpriority     bogomips        : 3989.02     clflush size    : 64     cache_alignment : 64     address sizes   : 36 bits physical, 48 bits virtual     power management:          processor       : 1     vendor_id       : GenuineIntel     cpu family      : 6     model           : 15     model name      : Intel(R) Core(TM)2 Duo CPU     T7300  @ 2.00GHz     stepping        : 10     microcode       : 0x92     cpu MHz         : 1200.000     cache size      : 4096 KB     physical id     : 0     siblings        : 2     core id         : 1     cpu cores       : 2     apicid          : 1     initial apicid  : 1     fpu             : yes     fpu_exception   : yes     cpuid level     : 10     wp              : yes     flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm lahf_lm ida dts tpr_shadow vnmi flexpriority     bogomips        : 3989.80     clflush size    : 64     cache_alignment : 64     address sizes   : 36 bits physical, 48 bits virtual     power management:      _**ACPI related Kernel Flags_**               CONFIG_X86_64_ACPI_NUMA=y     CONFIG_ACPI=y     CONFIG_ACPI_SLEEP=y     CONFIG_ACPI_PROCFS=y     CONFIG_ACPI_PROC_EVENT=y     CONFIG_ACPI_AC=y     CONFIG_ACPI_BATTERY=y     CONFIG_ACPI_BUTTON=y     CONFIG_ACPI_FAN=y     CONFIG_ACPI_DOCK=y     CONFIG_ACPI_PROCESSOR=y     CONFIG_ACPI_HOTPLUG_CPU=y     CONFIG_ACPI_THERMAL=y     CONFIG_ACPI_NUMA=y     CONFIG_ACPI_BLACKLIST_YEAR=0     CONFIG_ACPI_CONTAINER=y     CONFIG_X86_ACPI_CPUFREQ=y     CONFIG_PNPACPI=y     CONFIG_ATA_ACPI=y


I messed up my zshrc on a remote server and now I can't run any commands!

On a remote machine I changed my `zsh` settings and it is now broken,   for every keypress it says: "url-quote-magic:1: url-quote-magic: function definition file not found " I don't have another account on that machine, What can I do to disable the faulty `.zshrc` so that I can use my shell again and fix it.


git grep colors differ from grep custom colors

I've setup grep colors in my `~/.bashrc` :               export GREP_COLORS='ms=01;34:mc=01;34:sl=:cx=:fn=35:ln=32:bn=32:se=36'      They work for   * `grep --color=auto`   * `grep --color=always` Unfortunately, those custom colors are ignored by:   * `git grep --color=auto`   * `git grep --color=always` How to make `git grep` to use above `$GREP_COLORS` colors ?


Apache server doesn't start when mod_sm.so is loaded

I have an Apache 1.3 on a Sun machine (SunOS 5.10 Generic_138888-01 sun4u sparc SUNW,Sun-Fire-15000). If I keep the following two lines in httpd.conf, the server will not start: ` LoadModule sm_module "/cmsm_sw/epiapr1/netegrity/webagent/bin/mod_sm.so"   SmInitFile "/apache/conf/WebAgent.conf" ` This is all I get when I try to start Apache: `:/apache/bin # ./apachectl start   1392: CSemCounter created a semaphore with ID 1157627995 using key 989855746.` The mod_sm.so is the netegrity siteminder module (iPlanet). Today there were some network issue (which were solved in the mean time) so I assume that this might have something to do. Maybe I should restart some services? I appreciate any help/hints. Thank you.


What does mkinitrd change when it adds kernel modules to the initrd?

When creating an initrd using mkinitrd (CentOS 5.5), the kernel modules it adds to the initrd get modified in the process. For example, the initrd's /lib/sata_via.ko is not binary identical to /lib/modules/2.6.18-194.32.1.el5/kernel/drivers/ata/sata_via.ko. I am just curious as to what happens when mkinitrd includes a kernel module - does it link in dependencies, or what is it that makes the module change?


How do I resize a partition in Ubuntu linux without losing data?

I ran out of space in my on the drive only to find that there was another unformatted partition in the system that is available. I now want to resize the current partition to take in the empty partition without losing data. Any ideas?


Is it common to split larger script into multiple scripts and source them in the main script?

At the moment I'm developing a larger Bash script (it's an Open Source project of mine) and it's starting to become a mess. I've split up logic into functions, use local variables where I can and have only declared a handful global variables. Still, it is becoming pretty hard to maintain. I thought about splitting the script up into multiple scripts and source them in my main script (similar to imports in other languages). But I wonder if this is a feasible approach. First, sourcing multiple scripts could severly slow the execution time of the script, and second, it makes distribution harder. So, is this a good approach, and do other (Open Source) projects do it the same way?


Convert UTF-8 character to xmodmap name

Is there a way of converting a UTF-8 character to its corresponding `xmodmap` name? So if the input is `”` the output would be `rightdoublequotemark`.


How to view adobeconnect video offline?

I want to watch some lectures created with adobeconnect. I have the lectures downloaded to my Ubuntu 12.04 machine. Each one consists of a stream that includes a video window of the professor lecturing (with audio) and another video window of his shared desktop. There is also some text/chat conversation from the students. Each lecture consists of these files:               cameraVoip_1_4.flv     cameraVoip_1_4.xml     ftchat0.flv     ftchat0.xml     ftcontent1.flv     ftcontent1.xml     ftstage3.flv     ftstage3.xml     indexstream.flv     indexstream.xml     mainstream.flv     mainstream.xml     screenshare_0_2.flv     screenshare_0_2.xml     telephony-files.xml     transcriptstream.flv     transcriptstream.xml      I can watch just the professor (audio and video) in this file:   **cameraVoip_1_4.flv** The professor's share desktop is in this file:   **screenshare_0_2.flv** (I haven't found the file with the student chat stream yet & I don't know what content is in the other files or if they are needed at all.) I can currently open each of the two flv files above in two different players (such as VLC & SM Player) and manually synchronize them, but that's a pain. **Is there a better way I view this content on Linux?** The main problem with the two-different-players approach is keeping the two streams synchronized. For example, I cannot easily back up and I cannot easily skip over the class break period. It is almost never the case that I just start the two players, synchronize them once and then listen to an entire 2 hour lecture. It always turns into a giant hassle that makes me not want to watch the lectures. I need a better way.


Linux Shell fundamentals: How can I check the file descriptors status, (where are redirected to) right now without lsof?

I am learning about **file descriptors** for the case of Linux, and I was wondering if there is any command showing a **complete list** that allows me to know **where is each one redirected** to in this moment.   Maybe some info like:               0  -->  <stdin     1  -->  >stdout     2  -->  >stderr     3  -->  >MyFileForWriting     4  -->  <MyFileForReading      I have found this thread that requires `lsof`, but it could be useful to have another method not depending on that command, if it exists.   I need this info concerning to Linux (I will try it too for CygWin, that does not include the 'lsof' tool until now, but behaves mostly like a POSIX compliant operating system).


Too many keys being added to ssh-agent in CentOS6 - how can I stop this?

I was trying to debug an ssh problem `Too many authentication failures`, and find with `ssh -vv` that ssh is presenting lots of keys before falling back to try a password. On investigation I find that these keys are added somehow with `ssh-agent` running from `startx` when X11 is started. I have a lot of keys in my `~/.ssh` directory for different machines, transferred through many system updates over the years. I had not even realized that `ssh-agent` was running. I thought that `ssh-add`, per the manpage, would add by default just `id_dsa`, `id_rsa` and `identity`. But somehow it is adding `BillBrewer.pub`, `JanStewer.pub`, `PeterGurney.pub`, `PeterDavy.pub`, `DanlWhiddon`, `HarryHawke.pub`, `OldUncleTomCobley.pub` as well, and presenting the whole lot on every login session when I expect to give a password. So sshd on the server decides that enough is enough and disconnects. How can I control this behaviour ? Apart from removing my extra public keys from my .ssh directory and just keeping the private ones I need, but that's always been a convenient place to keep them in the past. For that matter, how can I stop ssh-agent running if I want to ? Is this a security issue ( sending keys to servers that are not supposed to get them) ? I realize that I can override it on a per-session basis with `-o PreferredAuthentications=password` but I'd prefer a systemic fix.   * more strangeness: I tried using `ssh-add -D` to remove all identities, or `ssh-add -d *.pub`, but when I use `ssh-add -l`, they are all still there. CentOS release 6.5, OpenSSH_5.3p1, openssh-clients-5.3p1


Can't mount remote file system with sshfs

> **Possible Duplicate:**   >  How to apply changes of newly added user groups without needing to reboot? I have posted this question in linux mint users forum about some hours ago. I'm trying to mount a file system with sshfs on linux mint. When I simply try I get               fuse: failed to open /dev/fuse: Permission denied      Reading here I tried ls:               yotam@sumsum ~/Documents $ ls -lah /dev/fuse     crw-rw---- 1 root fuse 10, 229 Nov 19 13:00 /dev/fuse      So I tried to add myself to fuse:               sudo usermod -a -G fuse yotam      But:               yotam@sumsum ~/Documents $ groups     yotam sudo      I tried the GUI interface of Linux Mint and see there that I'm the only user on the fuse group. So.... what now? As a finlal note, I'll say that I can mount the file system with sudo Edit: After restart I can mount


Incompatible group permissions in Linux - Is it a bug?

> **Possible Duplicate:**   >  How to apply changes of newly added user groups without needing to reboot? I am on Ubuntu 11.04. I am creating another user and placing an existing user in the group of other user, hoping to write in the home directory of other user.               # uname -a     Linux vini 2.6.38-11-generic #50-Ubuntu SMP Mon Sep 12 21:18:14 UTC     2011 i686 athlon i386 GNU/Linux     # whoami     sachin     # su root     # useradd -m -U foo               // create user foo     # usermod -a -G foo sachin      // add user `sachin' to group `foo'     # chmod 770 /home/foo/     # exit     # whoami     sachin     # cd /home/foo/     bash: cd: /home/foo/: Permission denied     # groups sachin     sachin : sachin foo      This is totally weird. Though user sachin is in group foo, and group bits for /home/foo/ is set to rwx, sachin can't chdir to /home/foo/. I am not able to understand this. But, if at the exit step, I switch to sachin user from root, this is what happens:               # uname -a     Linux vini 2.6.38-11-generic #50-Ubuntu SMP Mon Sep 12 21:18:14 UTC     2011 i686 athlon i386 GNU/Linux     # whoami     sachin     # su root     # useradd -m -U foo               // create user foo     # usermod -a -G foo sachin      // add user `sachin' to group `foo'     # chmod 770 /home/foo/     # su sachin     # whoami     sachin     # cd /home/foo/     # ls     examples.desktop      Now, whatever is happening here is totally incomprehensible. Does su sachin inherits some permissions from the root user at this step? A solution that was suggested was to use `newgrp`, which updates the group and other user information. So if I do `newgrp - sachin`, then I get access to the directory of the newly created user, but if I create one more user and follow the same steps `sachin` does not get access to the latest users directory. This behavior is indeed very baffling. Any explanations would be much appreciated.


I'm trying to connect to an OpenVPN server. It works perfectly when I use root to give out the commands to connect:               openvpn /etc/openvpn/client.conf      but with a normal user I get this error messages in the log:               Aug 15 18:01:43 a openvpn[4755]: OpenVPN 2.1.1 i686-redhat-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] built on Jan  5 2010     Aug 15 18:01:43 a openvpn[4755]: WARNING: you are using user/group/chroot/setcon without persist-tun -- this may cause restarts to fail     Aug 15 18:01:43 a openvpn[4755]: WARNING: you are using user/group/chroot/setcon without persist-key -- this may cause restarts to fail     Aug 15 18:01:43 a openvpn[4755]: WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.     Aug 15 18:01:43 a openvpn[4755]: NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables     Aug 15 18:01:43 a openvpn[4755]: Control Channel Authentication: using '/home/MYUSERNAME/.cert/shared.key' as a OpenVPN static key file     Aug 15 18:01:43 a openvpn[4755]: LZO compression initialized     Aug 15 18:01:43 a openvpn[4756]: NOTE: UID/GID downgrade will be delayed because of --client, --pull, or --up-delay     Aug 15 18:01:43 a openvpn[4756]: UDPv4 link local: [undef]     Aug 15 18:01:43 a openvpn[4756]: UDPv4 link remote: 111.222.333.444:443     Aug 15 18:01:43 a openvpn[4756]: [vpnserver] Peer Connection Initiated with 192.168.1.1:443     Aug 15 18:01:46 a openvpn[4756]: Note: Cannot ioctl TUNSETIFF tun: Operation not permitted (errno=1)     Aug 15 18:01:46 a openvpn[4756]: Note: Attempting fallback to kernel 2.2 TUN/TAP interface     Aug 15 18:01:46 a openvpn[4756]: Cannot allocate TUN/TAP dev dynamically     Aug 15 18:01:46 a openvpn[4756]: Exiting      So it looks like I need root priviledges to run the mentioned command.      Solutions that I've googled:   - setuid bit: https://fedoraproject.org/wiki/Features/RemoveSETUID - not good anymore   - "visudo" as root, then append this to the file:                  MYUSERNAME ALL = NOPASSWD: /usr/sbin/openvpn      Then the "MYUSERNAME" user can launch the "sudo /usr/sbin/openvpn" binary with root priviledges.      p.s.1:                 $ which openvpn     /usr/sbin/openvpn      p.s.2: Using Fedora 14/bash.      THE QUESTION:   - Are there any better/safer methods to launch the OpenVPN client as a normal user?


How to resize a VirtualBox HDD image

I initially created a dynamically expanding VirtualBox image, and have tried to increase its hard drive space:               VBoxManage modifyhd "VirtualBox VMs/JHBuild/JHBuild.vdi" --resize 16384      After that, I saw from the UI that it has increased to 16GB logical size: ![enter image description here](http://i.stack.imgur.com/sp2U9.png) Sadly, when I boot the image, I still get the initial size (e.g. when I use `df`).


Is there a way to run an ssh server on an Android device?

I'm looking to install Debian over my Android installation so as to be able to use `openssh-server`, as it's _so_ much better than Dropbear. Is there an easy way to do this, or just to simply install openssh-server on my phone? I'm running Android 2.3.X on a Google Nexus One.


In tmux session, cannot connect to X server after ssh'ing

At work, I have a desktop with a monitor and a few running tmux sessions. At home, I frequently ssh into that desktop and enter my running tmux sessions. When I ssh from home, I do _not_ want to use X11, so I do not use the `-X` flag. When I go back to work (after ssh'ing from home) and use those tmux sessions on desktop, I can no longer do anything that would spawn a GUI. I can't open files in evince. When I try use matplotlib, I get a `: cannot connect to X server` message. After ssh'ing and opening an existing tmux session from home, how do I later reattach the ability to open up GUI stuff on the desktop? The ssh'ing from home seems to make the tmux session forget that it can spawn GUI stuff. EDIT:


Tell a regex expression to skip the beginning of a line before matching

If I had a string like `45mb ./aaaa/bbbb/cccc/dddd` and I use a regex like `[^\/]*\/` it will match `45mb ./aaaa/bbbb/cccc/` I only want it to match `./aaaa/bbbb/cccc/` but I can't figure out how to do it. I want to specifically match/find all occurrences of "everything before a forward slash up to and including the slash" as I want to use `sed` to substitute the matches like in the below `sed` command but not losing the file size bit at the start.               sed -e 's/[^\/]*\//--/g      Hopefully that makes some sense. I tried look ahead/behinds but I don't know if that's the correct regex solution for this.


wpa_passphrase must be 8..63 characters

I'd like to connect to wireless network via command line in Linux. When doing it I've stuck with this issue:                $ wpa_passphrase NETWORK_SSID NETWORK_PASSWORD      Passphrase must be 8..63 characters      The NETWORK_PASSWORD has only five characters. Via smartphone there is no problem with connection. Could you help me to solve this?


Is there a reverse of yank-last-arg/insert-last-argument?

`yank-last-arg` / `insert-last-argument` is probably better known by its usual shortcut, `Alt`-`.`. It's very nice to navigate through the last argument of earlier commands, but if you're navigating a little too fast it's easy to miss the argument you wanted, and then it seems you have no other choice but to start all over again. This slows down the navigation, so I hope there's a command to **navigate this list in reverse**. A quick look at `bind -P` didn't show any obvious candidates for this purpose.


mutt: Use gpgme or classic gpg?

Mutt's wiki on GnuPG integration and many other places (like default on Debian) use the classic way of connecting mutt to gnupg. That is, one configures a bunch of commands to call `gpg` directly. On the other hand, there is a library called `gpgme`, which tries to standardize exactly that. Seaching the web for "mutt gpgme" did not give any really useful results to me. What are the pros and cons of using `set crypt_use_gpgme=yes` in `.muttrc`? Why is it so seldom used?


Set persistent routing table on Debian

I have modified my routing table by deleting one rule, and adding two new rules for my second interface eth1:               route del -net 10.1.2.0 netmask 255.255.255.0     route add -host 10.1.2.51 eth1     route add -host 10.1.2.52 eth1      I want the rules to survive reboot. I could write a simple rc script to remove 1 rule and insert 2 new, but I was wondering whether there is a way to configure ifconfig, not to add a route rule for the interface (eth1) when it is started, or even better, to specify which rules should be added. What would be a clean way to do it? Does `ifconfig` allow me to specify custom rules for routing?


Debian on Mac via reFINd: New Partitions doesnt Boot

im trying to get on Debian via the refind Bootmanager. I was able to create partitions on HDD (Swap + /) and install Debian, but i couldn't install a bootloader on the installation, nor Grub neither LILO and now the partitions dont start. what can i do.


How to configure CentOS 6 as a Proxy Server

I have installed new server with CentOS 6. How do I configure it to become a Proxy Server?


Is there a global grep.conf in Unix/Linux?

I would like to make a utility that always enables the `\--color` argument for the `grep` command in any distribution. Is there a way to do this or do I have to search for a way for each distribution?


-bash: /dev/null: Permission denied

I'm trying to create a new user on a Centos 6 system. First, I do               useradd kevin      Then, I tried to run commands as that user               su - kevin      However, I get the following error messages               -bash: /dev/null: Permission denied     -bash: /dev/null: Permission denied     -bash: /dev/null: Permission denied     -bash: /dev/null: Permission denied     -bash: /dev/null: Permission denied     -bash: /dev/null: Permission denied     [kevin@gazelle ~]$      And I can't do very much as that user. The permissions on /dev/null are as follows:               -rwxr-xr-x  1 root root           9 Jul 25 17:07 null      Roughly the same as they are on my Mac,               crw-rw-rw-   1 root   wheel         3,   2 Jul 25 14:08 null      It's _possible_ , but really unlikely, that I touched dev. As the root user, I tried adding `kevin` to the `root` group:               usermod -a -G root kevin      However I still am getting /dev/null permission denied errors. Why can't the new user write to /dev/null? What groups should the new user be a part of? Am I not impersonating the user correctly? Is there a beginners guide to setting up users/permissions on Linux? Thanks, Kevin


Problem with installation of camera drivers

When I install my video camera's drivers with a command:               modprobe usbserial vendor=... product=...      it gets installed as "sg3" instead of something like "ttyUSB0". Why is that? I did look at the dmesg, it looks like this (this is where I got that it is sg3, I am not a daily linux user, I just need to get something done, so please don't judge me for my poor knowledge):               [  292.940045] usb 2-4: new high speed USB device using ehci_hcd and address 7     [  293.094070] usb-storage 2-4:1.0: Quirks match for vid 0525 pid a4a5: 10000     [  293.094125] scsi7 : usb-storage 2-4:1.0     [  294.095461] scsi 7:0:0:0: Direct-Access     Linux    File-Stor Gadget 031a PQ: 0 ANSI: 2     [  294.096689] sd 7:0:0:0: Attached scsi generic sg3 type 0     [  294.103465] sd 7:0:0:0: [sdc] 838860800 512-byte logical blocks: (429 GB/400 GiB)     [  294.208275] sd 7:0:0:0: [sdc] Write Protect is on     [  294.208284] sd 7:0:0:0: [sdc] Mode Sense: 0f 00 80 00     [  294.208290] sd 7:0:0:0: [sdc] Assuming drive cache: write through     [  294.318200] sd 7:0:0:0: [sdc] Assuming drive cache: write through     [  294.318222]  sdc:     [  294.428212] sd 7:0:0:0: [sdc] Assuming drive cache: write through     [  294.428225] sd 7:0:0:0: [sdc] Attached SCSI removable disk


Configuring network settings manually in Qubes OS

I'm trying to setup Qubes OS on my desktop but struggling to get the network/internet working. This is the configuration i want to setup -               ip - 192.168.1.2     Subnet - 255.255.255.0     Gateway - 192.168.1.1     DNS - 8.8.8.8     interface - eth0      i tried following with limited success -               ifconfig eth0 192.168.1.2 netmask 255.255.255.0       route add default gw 192.168.1.1      also edited /etc/resolv.conf to added dns entry. Now when i check ifconfig - I get my ip & netmask configured and when i check routes i get 2 routes displayed with 192.168.1.1 as default. But i still cannot surf or even ping domains (eg. www.google.com). Qubes has various security domains called AppVm's. So i guess we could/might need to setup a network config for each VM. Its all a little new to me (+ its documented sparsely) so any help appreciated!


Where to put commands to run when X starts with SLiM

I'm having trouble determining where to add these two commands:               setxkbmap latam      to set the correct keyboard layout, and               xcompmgr -c -C &      to enable transparency. Before installing SLiM, I used this recommendation, and it worked, but it stopped working afterwards. I tried adding it to ~/.xinitrc, like shown below:               #!/bin/sh     #     # ~/.xinitrc     #     # Executed by startx (run your window manager from here)          if [ -d /etc/X11/xinit/xinitrc.d ]; then       for f in /etc/X11/xinit/xinitrc.d/*; do         [ -x "$f" ] && . "$f"       done       unset f     fi          exec setxkbmap latam     exec xcompmgr -c -C &     exec startxfce4      But this seemed to crash it, and it just froze before starting XFCE4 (after logging in). I also tried using this recommendation from the Arch Wiki, but it didn't seem to do anything. Any recommendations? Note that I'd like these commands to be the default setting for all users that log into xfce4. Thanks


Postfix: force local users (PHP) to use the SMTPD for outside recipients

My server has been hacked and was sending lots of spam over the Internet. The first thing I did is shutdown postfix, close the outgoing port 25 and take the time to clean the website, the postfix queues, and to re-setup postfix completely. I enabled lots of restrictions on the Postfix SMTPD, like forcing SASL authentification and TLS. But I'm just thinking, PHP `mail()` function doesn't care about SMTPD, because it calls `sendmail`, whose emails end in the `maildrop` queue, and finally in the `incoming` queue (and bypass all of my SMTPD protections). I made a small sketch of Postfix daemons and queues for myself, in order to understand better how it works. ![Postfix overview](http://i.stack.imgur.com/nyzft.png) I would like following setup:   * **Prevent sendmail from delivering emails to outside recipients, but allow it to deliver emails to local users, and allow it to follow mappings in /etc/aliases even if it is an "ouside" mapping.** My aim is that at the end, users have no other choice than contact local SMTPD directly, thus forced to login thanks to my `smtpd_client_restrictions = permit_sasl_authenticated, reject` configuration.


how to re-enable input on a serial console

I have an old router which runs Linux and I'd like to have a serial console on. This used to work fine, but after a firmware update, I can now only get output on the console and cannot give any input back to the device. During boot there is a line that says "Console input is disabled" that wasn't there before. Without changing the firmware, how do I re-enable input on the serial console? ... my attempts so far ... I can log in over the LAN and load any files (and cross compile tools if need be), and there is a small non-volatile user flash partition, so any solution requiring me to write a quick program using ioctl or whatnot is fine. The embedded Linux has the system files like `/sys/bus` and `/sys/devices/platform/serial8250.0` and so on in case that is useful. The files `/dev/console`, `/dev/ttyS0`, `/dev/tty` all have read and write permissions. Running `getty -L 115200 ttyS0` makes a login prompt appear on the serial console, but I can't get it to accept any input. Adding the line               ::respawn:-/bin/sh      to `inittab` makes busybox give a shell prompt ... but again, the serial console won't take input. dmesg reports               Kernel command line: root=/dev/ram rw init=/init console=ttyS0,115200      and `stty` gives               speed 38400 baud; line=0;        along with a bunch of unimportant looking settings, `stty -a -F /dev/ttyS0` gives               speed 115200 baud; stty: /dev/ttyS0       line = 0;        (and a whole bunch of settings that don't look important, but I'll type them up if people need them.) I'm at a loss here, so I'm not sure what information is needed.   Any ideas for solving this puzzle? I have a feeling there is something simple I forgot to try.


Logging outgoing connections as they happen

Is there a way to log to file all the outgoing connections that a process creates? I am aware of `netstat` but that seems to be more of a snapshot of a point in time rather than something that runs and logs information over a period. I only need the IP or hostname, port and the process making the connection.


is there an open source tool to measure cpu performance?

I have used many times `ab` for measuring web performance, `hdparm` for measuring hard disk performance and `netperf` for measuring network performance. But I didn't find any tools to measure cpu performance. Do you know a tool allowing to measure cpu performance? I am more specifically looking to measure Gflops.


Log in using a 4-digit PIN, with a password fallback

Windows 8 has this feature where you can log in with a 4-digit PIN which is really convenient. Is there such a thing in Linux? In Windows 8, you get five attempts to log in using the PIN, then it reverts to only allowing you to log in with your regular password. This isn't the same as a password that consists of 4 digits, because there's a fallback to a longer password, and there's a hard limit on the number of PIN attempts.


Where does the output go from `at` and `cron` jobs

Where does standard output go given there is now screen? It's not appearing in the same directory or my home directory. How could I actually figure this out given that I don't know how to run debug or trace on a background job.


Can't boot from Fedora PreUpgrade image

I have been happily using, for several months, Fedora 12 on a PC with a crashed Windows XP3 as the other operating system, and have just used `preupgrade` to download Fedora 16, which now appears as the second entry in my `/boot/grub/menu.lst` file. Booting with this as the default entry just hangs up the machine. So, my question is: what do I do now to complete the upgrade? I have searched the Internet and found a lot of relevant entries, but they are all either long out-of-date, or just too confusing.


Loop with 2 variables in a bash script

I am trying to utilize an API. I need to either do some type of "for loop" that replaces or utilizes 2 variables... In pseudo..               # Declare New Servers     newserver=(     box001     box002     box003     box004     box005     )               # Declare hostnames     newhostname=(     box001.domain.com     box002.domain.com     box003.domain.com     box004.domain.com     box005.domain.com     )      I need to replace NEWSERVER and NEWHOSTNAME in               http://server/api/duplicateobject.htm?id=2928&name=NEWSERVER&host=NEWHOSTNAME&targetid=3120      so that it looks like this               http://server/api/duplicateobject.htm?id=2928&name=box001&host=box001.zcloud.com&targetid=3120      I just need it to loop through all of hosts listed.


Solaris SPARC 10 32bit mode

I'm looking for a definitive answer, does Solaris 10 running on a SPARC machine support booting into 32bit mode? I've found one site that states Solaris 8 was the last version that supported booting in a 32bit mode for SPARC. I've read multiple items that explain how to boot Solaris into 32bit mode, however they did not list the Solaris version. We've tried all the ways specified, but the system keeps booting into 64bit mode.


What are the Implications of moving to Huge mem kernel on RHEL4

I've been asked to investigate adding extra memory (> 16gb) to a RHEL 4 server and moving to a huge mem kernel. The server is used for Oracle RAC. Is it just a case of installing the hugh mem kernel and booting into ? or is it more complex than that ? Any tips / gotcha's ?


vi command for adding blank line?

In vi, I can use `o` or `O` to add a blank line and go into insertion mode. But what if I want to stay in command mode, is there a command for this? In googling, I'm seeing suggestions to add stuff to my vimrc, but it seems like there should be an easier way (that will always work.)


How do I use tee to redirect to grep

I don't have much experience of using tee, so I hope this is not very basic. After viewing one of the answers to this question I came across a strange beheviour with `tee`. In order for me to output the first line, and a found line, I can use this:               ps aux | tee >(head -n1) | grep syslog     USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND     syslog     806  0.0  0.0  34600   824 ?        Sl   Sep07   0:00 rsyslogd -c4      However, the first time I ran this (in zsh) the result was in the wrong order, the column headers were below the grep results (this did not happen again however), so I tried to swap the commands around:               ps aux | tee >(grep syslog) | head -n1     USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND      Only the first line is printed, and nothing else! Can I use tee to redirect to grep, or am I doing this in the wrong manner? As I was typing this question, the second command actually worked once for me, I ran it again five times and then back to the one line result. Is this just my system? (I am running zsh within tmux). Finally, why with the first command is "grep syslog" not shown as a result (there is only one result)? For control here is the grep without the `tee`               ps aux | grep syslog     syslog     806  0.0  0.0  34600   824 ?        Sl   Sep07   0:00 rsyslogd -c4     henry    2290  0.0  0.1  95220  3092 ?        Ssl  Sep07   3:12 /usr/bin/pulseaudio --start --log-target=syslog     henry   15924  0.0  0.0   3128   824 pts/4    S+   13:44   0:00 grep syslog      * * * **Update:** It seems that head is causing the whole command to truncate (as indicated in the answer below) the below command is now returning the following:               ps aux | tee >(grep syslog) | head -n1     USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND     syslog     806


In irssi, how do I display previous chats of current chan, or current user if in bitblee?

When I reopen irssi, I'd like to display - easily and from inside irssi - previous conversations of a chan, or a query window with specific user (mostly for private conversation in bitlbee). I can obviously find logs, it's set in my ~/.irssi/config :               autolog_path = "~/.irclogs/$tag/$0.log";      but i can't display them in active and corresponding irssi window. That seems a basic chat feature I'd like to enjoy.


OpenSUSE graphical login lost after distribution upgrade from 11.2 to 11.3

I attempted to perform an in-place distribution upgrade from openSUSE 11.2 to openSUSE 11.3 following the instructions. The upgrade appeared to succeed, but after I rebooted I was presented with a console login. It seems that I lost the graphical login. How do I restore the graphical login?


How to add all binaries to bash tab completion for some command?

I've installed program `trickle` that allow to throttle the net for specified command like:               trickle -u10 -d10 <COMMAND>      How to add bash completion for all binaries to `trickle` command?


Changing my toolchain architecture (in gentoo)

This is somewhat gentoo-specific, so I'll explain it in that context, then try to abstract it to a generic linux machine. I accidently set my CHOST to "i686-pc-linux-gnu" in the beginning, not paying attention, when my machine is a Athlon64. I would like to change it to "x86_64-pc-linux-gnu". There is a guide for this. It doesn't work. The first step is "Recompile binutils, then recompile gcc" Here's the problem illustrated:   1. Compile binutils using gcc - this succeeds producing new as, ar, and the like files   2. This _breaks_ gcc. gcc is now trying to use the new /usr/bin/as - but it can't work with them   3. Since gcc can't compile anything, I can't compile gcc. I have to revert as, ar, etc; then revert the CHOST change, and recompile binutils. So I tried the following:   1. back up as, ar, etc   2. Compile binutils, rendering gcc inoperabe   3. link ar, as, etc to the old versions I backed up   4. try to compile gcc The gcc compile fails with:               /usr/x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc     /usr/x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc     /usr/x86_64-pc-linux-gnu/bin/ld: cannot find -lc     collect2: ld returned 1 exit status      _This_ is a glibc error (completing the chain). So it seems:   1. for gcc to compile it has a dependency on the new version glibc   2. for gcc to run, binutils must be the older version The steps I _haven't_ tried, because it's so complicated I wanted to get opinions first, are:   1. compile binutils under new architecture,   2. relink as, ar, etc to old executables   3. compile new glibc with old-gcc and old-binutils   4. compile new-gcc with old-gcc and old-binutils but new-glibc   5. relink as, ars, etc to new-binutils   6. recompile everything like a boss Is there any chance of #4 above working? Do I have any hope of accomplishing this without a complete reinstall?


Fedora 18 guest in VirtualBox 4.2: How to assign static IPv4 address to guest regardless of active ethernet interface on host

I have a Ubuntu 13.04 host running VirtualBox 4.2.12. This host has both a wired and a wireless network interface, but only one of which would usually be active at any given time. For example, at home wireless would be active, and at office wired one would be active. **Now, I would like to** set up a Fedora 18 VirtualBox guest in "Bridged Networking" mode in such a way that the guest and the host can freely `ssh` to each other (and to the network that the host is connected to) using their static IPv4 addresses. And if I add more such guests in future, then the guests should also be able to `ssh` to each other. However, **I'm facing the following problems** :   1. Upon selecting "Bridged Networking" mode for the guest in VirtualBox settings, the guest ends up getting a dynamically assigned, IPv6 address (whereas I want a statically assigned address that is an IPv4 address).   2. When the wireless interface is active on the host, I get to see only the "lo" and the "wlan0" entries in the output if `ip addr` on the host. So, the static IPv4 address that I assigned to the host's p2p1 (or, the wired) interface when it was active earlier in the day (in office) simply cannot be seen when the wired interface is not active later (at home).   3. I tried the instructions given here (using the `ifcfg-p2p1` file for my case), but they didn't work for me. For example, I was able to `stop` and `disable` `NetworkManager.service` just fine, but I could not `restart` `network.service` (it gave me the error `"Restarting network (via systemctl): Job for network.service failed. See 'systemctl status network.service' and 'journalctl -n' for details."` **Also** ,   1. Is there any distribution-independent way to assign static IPv4 address to my F18 VM? Meaning, since each Linux distro keeps its network settings in different file/dir structures (and with maybe different properties too inside), is there any way I can achieve the above setup via commands like `ifconfig`, `ip`, `route`, etc and then also be able to persist their changes to whatever files those changes need to go in?   2. To avoid problem #2 above, do I have to use a manually created tun/tap device to use for "Bridged Networking"? If so, how can I do that on Ubuntu 13.04?


mon linux monitor install on centos - can't find glib.h although present

I am trying to install the linux_monitor package under Centos 5.5. When I try make I get:               make[3]: Entering directory `/tmp/linux_monitor-2.0RC3/src/server'     if gcc -DHAVE_CONFIG_H -I. -I. -I../../src   -I/usr/include/openssl  -g -O2 -Wall -MT linux_mond.o -MD -MP -MF ".deps/linux_mond.Tpo" \           -c -o linux_mond.o `test -f 'linux_mond.c' || echo './'`linux_mond.c; \         then mv -f ".deps/linux_mond.Tpo" ".deps/linux_mond.Po"; \         else rm -f ".deps/linux_mond.Tpo"; exit 1; \         fi     In file included from linux_mond.c:23:     linux_mond.h:40:18: error: glib.h: No such file or directory     linux_mond.c: In function ‘server’:     linux_mond.c:155: warning: pointer targets in passing argument 3 of ‘accept’ differ in signedness     linux_mond.c: In function ‘client’:     linux_mond.c:334: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness      I understand it is not finding glib.h, right? I know it is present at /usr/include/glib-1.2/, but I tried several configure flags and looked at the different files and can't find how to let know to configure where that library is.


How to parse multiple string patterns in linux shell script

I am new to linux shell and I had a hard time thinking of the solution to this. Can somebody help how to parse multiple strings (data) in a file? For below file, I want to parse all the values next to `BIG*20021208*00001**` which are the following: `A999`, `A1000`, `1001`.               ST*810*0001     BIG*20021208*00001**A9     99*N1*ST*XYZ Test Corporation*9*122334455     N3*987 Freeway Dr.     N4*New York*NY*98765     N1*BT*ABC Test Company*9*122334455     N3*123 Highway Street     N4*Los Angeles*CA*12345     ITD*01*3*2**30**30*****60     FOB*PP     IT1**1*EA*200**UA*EAN     PID*F****Lamp     IT1**4*EA*50**UA*EAN     PID*F****Chair     TDS*2000     CAD*****Routing     ISS*30*CA     CTT*50     SE*19*0001     ST*810*0002     BIG*20021208*00001**A1000     N1*ST*XYZ Test Corporation*9*122334455     N3*987 Freeway Dr.     N4*New York*NY*98765     N1*BT*ABC Test Company*9*122334455     N3*123 Highway Street     N4*Los Angeles*CA*12345     ITD*01*3*2**30**30*****60     FOB*PP     IT1**1*EA*200**UA*EAN     PID*F****Lamp     IT1**4*EA*50**UA*EAN     PID*F****Chair     TDS*2000     CAD*****Routing     ISS*30*CA     CTT*50     SE*19*0002     ST*810*0003     BIG*20021208*00001**10     01N1*ST*XYZ Test Corporation*9*122334455     N3*987 Freeway Dr.     N4*New York*NY*98765     N1*BT*ABC Test Company*9*122334455     N3*123 Highway Street     N4*Los Angeles*CA*12345     ITD*01*3*2**30**30*****60     FOB*PP     IT1**1*EA*200**UA*EAN     PID*F****Lamp     IT1**4*EA*50**UA*EAN     PID*F****Chair     TDS*2000     CAD*****Routing     ISS*30*CA     CTT*50     SE*19*0003      Now, as you can see in the BIG segment, A999 value were separated already(no longer intact) . Then my problem now is when I get the data (e.g.A999) it will only generated this A9 and not the whole value which is A999.Is there any workaround for this?


Howto to boot an attached external hard disk (without formating)? (Solution: Repair grub easily)

I have a former internal hard drive, which I now use as external USB drive. I tried to boot from it, but it doesn't work (2 PCs tried, on my: blank screen + blinking cursor). This - I think - is normal, because to make a USB device bootable it must be prepared before the installation / during formating. Since I don't understand, if the situation of other threads here fit on mine, please tell me: _Is it possible to boot the system, which is already on the external drive (and which has worked, when it was an internal drive)._ My ideas were:   * use this device in a virtual machine as already installed system or try to boot from it (which doesn't work, since it's not prepared).   * change grub on the system, where I attach the external HDD Edit: I have used `gparted` to set the partition as active / bootable. Buuuut: it is a logical partition and not the first on the HDD. When I now try to boot from the computer gets into a reset loop: right after the BIOS messages my computer restarts instead of booting. Thanks!


"../../src/filesdb.c:683: findnamenode: Assertion `(*pointerp)->name[0] == '/'' failed."

I have been trying to update `Ubuntu 12.04` on the command line by using the two commands               sudo apt-get update     sudo apt-get dist-upgrade      which ends with the following error:               (Reading database ... 70%dpkg: ../../src/filesdb.c:683: findnamenode: Assertion `(*pointerp)->name[0] == '/'' failed.     E: Sub-process /usr/bin/dpkg exited unexpectedly      How to fix this **on the command line**?


Boot graphical application straight from Linux bootup (without verbose boot messages and desktop)

Is it possible to boot from minimum Linux core(Linux/Android) to an application (preferably created in interchangeable platform languages such as C# - Mono / GTK / Java / C) without any verbose Linux boot messages on screen? Basically power-on the OS and see nothing except your GUI application (no Linux messages, no desktop). I would hope to do this on a well established simple platform, perhaps Linux, Android or even Chrome or any other options which makes even more sense. What options is most easily or most appropriate. (for the sake of simplicity and reduce production time). The purpose is to create a single purpose application on a PC/Raspberry pi/embedded (similar to XBMC or any other media application that serves as a single purpose device).


How to make bash history prefix-sensitive?

How can I make pressing up/down on bash bring up the last command that started with the prefix I already entered? E.g.               $ ls foo     $ echo hello     $ ls <UP_ARROW>      Clicking UP after entering ls should bring up "ls foo" and not "echo hello"


Install vmware-tools using yum in vmware fusion

I added vmware-tools repo [1] to my virtual CentOS box. What is the exact set of packages I have to install? The rationale is to be able to update vmware-tools using yum. Environment: Host OS: Mac OS X 10.8 Guest OS: CentOS-6.4-x86_64 VMware-fusion: 5.0.3 [1] http://packages.vmware.com/tools/esx/latest/repos/index.html


GNU screen :fit equivalent in tmux

I'm experiencing this problem where I've attached a single tmux session at multiple terminals with differing console sizes. Is there a solution to rid of the view-port without having to disconnect the other terminal, like screen's :fit command? It seems rather silly that it is possible to attach tmux at multiple terminals and yet always have to use the lowest-common denominator of all terminals attached.


grep for an alphanumeric strings of any length with a colon on each side

How would you grep for an alphanumeric strings of 1 to 50 characters (ideally, any length would work too) with a colon on each side – a typical result would be all the lines containing the string `:shopping:`. So far I've got the code below (I've tried some variations on it) which doesn't work:               grep ':[[:alnum:]]{1,100}:' ~/x.txt


How to get infrared image data with sane on an epson v700 scanner?

I have read a number of posts on the topic and it seems that for now it is not possible to use sane to read infrared data (second pass) with my Epson Perfection V700 scanner out of the box. But are there any options to get that working? Any known patch? Any configuration behind the scenes? Any undocumented feature? I just asked the question on Avasys' message board, but if any of you guys out there had relevant information, I would appreciate greatly. Of particular interest is the 6400dpi resolution in 16bits per channel to scan slides, so I need the infrared option on the `epkowa` driver as the `epson2` driver seems limited to 3200dpi anyway. As far as I can tell neither `epkowa` nor `epson2` offers the infrared scan, though it seems that it should be a simple option (`vuescan` actually can do the job, it does two scan passes, one for the RGB and one for the infrared, but I would much prefer to be able to do my scans from the command-line). Note that I don't mind if the infrared scan comes out as a separate image, I can manage to combine them as needed. Also of interest and not included in the current `sane-epkowa` driver are:   1/ scans with multiple samples   2/ confirmation that the `scanimage` `-brightness` setting actually changes the CCD exposure time (rather than performing software image processing) * * * Edit 2011-02-01: check sane-devel for the start of an answer. sane-backends v1.0.21 has code that's unused by default. A tweak in epson2.c to enable my scanner (GT-X900) and a configure option to enable IR (CPPFLAGS=-DSANE_FRAME_IR) gets me a version that can at least pretend to do the job. I still have to solve two significant issues before I can call it a victory:   1/ with --mode=Infrared, the output image format seems incorrect, it seems like it produces grayscale, albeit in a funny format.   2/ --mode=Infrared does not actually produce IR data, the data looks like Grayscale from ordinary colour, it does not look like the result of an Infrared scan. More tweaking will be necessary before I get the desired result. Again, if any of you has any idea that would help debug and fix (such as where to start in the code, debug settings...), please shout.


What does readonly mean or do?

What does readonly mean or do in this case? I have never seen or heard of it.               a="testString"; b=a; readonly b; b=25;      Also, would the final value of b at the end be 25?


What's the progress regarding improving system performance/responsiveness during high disk I/O?

Whenever there is high disk I/O, the system tends to be much slower and less responsive than usual. What's the progress on Linux kernel regarding this? Is this problem actively being worked on?


How to install linux lmms multimedia studio

I have Linux Zorin OS and I'm trying to install the newest version Multimedia Studio. I get a tar file when downloaded but don't know where to go from there. Any suggestions for an old man trying to learn new tricks?


How does cat know the baud rate of the serial port?

I regularly use `cat` to view debugging information in the console from my FPGA development board over the serial connection, but I never have had to tell linux what the baud rate is. How does cat know what the baud rate of the serial connection is?


hook a script to apt-get

I have `/tmp` on a separate partition, and mounted with `noexec`. I am using Debian. The installation of some packages fails, because the post-installation scripts of some packages need to run from `/tmp`. I was wondering if it would be possible to "hook" a simple script to `apt- get`, which would be run every time before `apt-get`, and remount `/tmp` to `exec`. And similarly, remount it to `noexec` after `apt-get` has finished. any ideas would be appreciated


correct password but unable to connect to wifi

**Problem**   * Not able to connect to wireless network even after giving the correct password **Characteristics of Problem**   * After starting laptop, I choose the wireless network from the network manager icon on taskbar.    * I am asked for password    * I enter the **correct password**   * After a minute I get dialog box asking me to enter password again   * If I enter correct password, I get the same dialog box after a minute asking me to enter password again.   * I updated the router firmware and tried again and the same sequence of events happens. **System Properties**   * Using WPA2 security on the router   * Router model is netgear WGT624 v4   * Updated the firmware to the latest   * Using Bodhi Linux 2.3   * `lspci` gives the line `03:00.0 Network controller: Atheros Communications Inc. AR9462 Wireless Network Adapter (rev 01)`   * `nm-tool` gives the driver name as `ath9k`   * Output on dmesg `wlan0: authenticate with 00:1e:2a:5f:14:48   wlan0: capabilities/regulatory prevented using AP HT/VHT configuration, downgraded   wlan0: send auth to 00:1e:2a:5f:14:48 (try 1/3)   wlan0: authenticated   wlan0: associate with 00:1e:2a:5f:14:48 (try 1/3)   wlan0: RX AssocResp from 00:1e:2a:5f:14:48 (capab=0x431 status=0 aid=6)   wlan0: associated   cfg80211: Calling CRDA for country: US   ath: regdomain 0x8348 updated by CountryIE   ath: EEPROM regdomain: 0x8348   ath: EEPROM indicates we should expect a country code   ath: doing EEPROM country->regdmn map search   ath: country maps to regdmn code: 0x3a   ath: Country alpha2 being used: US   ath: Regpair used: 0x3a   cfg80211: Regulatory domain changed to country: US   cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)   cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)   cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)   cfg80211: (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)   cfg80211: (5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)   cfg80211: (5650000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)   cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)   wlan0: Limiting TX power to 27 (27 - 0) dBm as advertised by 00:1e:2a:5f:14:48   wlan0: deauthenticating from 00:1e:2a:5f:14:48 by local choice (reason=3)   cfg80211: Calling CRDA to update world regulatory domain   cfg80211: World regulatory domain updated:   cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)   cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)   cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)   cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)   cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)   cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)` Could someone please tell me if how I may get my comp to connect to the network?


Unable to resolve hostname

So I try to do:               ssh $(hostname)      and it tells me:               ssh: Could not resolve hostname woofy: Name or service not known      It knows that its own hostname is "woofy"; why can't it connect to itself?


Where can I look for backup script?

I want find out where the backup script of a Fedora 8 server is. I haven't found it so far ( my Linux knowledge is very spare). I looked with `crontab -l` and I only can find a tempdelete.pl. Than I looked into `/etc/cron.daily` and I can see   * 000-delay.cron   * logrotate   * mlocate.cron   * rpm   * tmpwatch   * 0anacron   * cups   * makewhatis.cron   * prelink   * tetex.con Nothing which looks like a backup script if taken the name. Nothing in the `/etc/cron.hourly` directory and `etc/cron.weekly` looks similar. The backup script includes backup from Windows and Linux machines (about 5 machines). I also saw that there is a separate backup user. It came to my mind that the backups are started from the other machines, not from the machine which holds the backup. I also looked under `/mnt` and there are three entries, but all are empty. I looked on one Windows machine and didn't found something in the task planner. Also the other backup software which is on this machine doesn't make this backup. How can I find out how the backup mechanism is working? Hope someone can help me out. **@Zoredache** : Yes, I inherited it from my precursor. I think it is a script, because no backup system was mentioned. On one Windows machine there is `CA ARCserve Backup Manager`, but it only makes backup on tapes. My precursor told me that it exists and one time I looked on it and the disk space is now empty. Therefore I want to find out how the backup looks like. I don't really know if it is running, I only saw that the diskspace is empty and thats why I think it is running. I add an excerpt of `/var/log`, but I don't know if it is logged.               anaconda.log     anaconda.syslog     anaconda.xlog     audit     bittorrent     boot.log     boot.log-20120115     boot.log-20120122     boot.log-20120129     boot.log-20120205     btmp     btmp-20120201     cron     cron-20120115     cron-20120122     cron-20120129     cron-20120205     cups     dmesg     faillog     gdm     httpd     lastlog     mail     maillog     maillog-20120115     maillog-20120122     maillog-20120129     maillog-20120205     messages     messages-20120115     messages-20120122     messages-20120129     messages-20120205     ntpstats     ppp     prelink     proftpd     rpmpkgs     rpmpkgs-20120115     rpmpkgs-20120122     rpmpkgs-20120129     rpmpkgs-20120205     samba     secure     secure-20120115     secure-20120122     secure-20120129     secure-20120205     setroubleshoot     spooler     spooler-20120115     spooler-20120122     spooler-20120129     spooler-20120205     tallylog     vbox     wtmp     wtmp-20120201     xferlog     Xorg.0.log     Xorg.0.log.old     yum.log      In which log file should I look? In `cron` I see this               Feb  9 19:01:01 backup CROND[19717]: (root) CMD (run-parts /etc/cron.hourly)


need shell script to grock a csv

Need some pointing in right direction on script to fetch and regex or sed. Site24x7 provides a URL with a CSV list of their source IP's used for monitoring. (they also provide other formats, CSV seems the least messed up as their structure leaves a lot to be desired. https://www.site24x7.com/multi- location-web-site-monitoring.html ) Like so:               Country,City,IP Address External     Australia,Sydney,"101.0.67.53"     Australia,Melbourne,"125.214.65.59"     Belgium,Brussels,"87.238.165.164"     Brazil,São Paulo,"200.170.83.170"     Brazil,Rio de Janeiro,"201.20.20.237"     Canada,Toronto,"208.69.56.166,     208.69.56.171,     208.69.56.172 "     Canada,Montreal,"199.204.45.153,     199.204.45.154,     199.204.45.155,     199.204.45.156"      I need to save it as an Allow include file in apache. Like so:               Allow from \     72.5.230.111 \     72.5.230.65 \     72.5.230.84


Using wildcards to match a directory in bash

Lets say the folder structure is like so:               /home/     --user1/asdf     --user2/asdf1234     --user3/asdf325234     --cool/asdf      How could I change to asdf1234 without specifying the user? For example:               cd /home/*/asdf1234      How can I use "not" in bash? For example, lets say I want to go to `/home/cool` but use not capability: `cd /home/!user*/asdf` is this possible? Are these bash tricks possible?


Is there a GUI tool to show an archive information with ratio visualization?

Is there a GUI tool to show an archive information with ratio visualization like this: ![enter image description here](http://i.stack.imgur.com/6Jm4o.png)


Is there a tool to display WiFi information in console?

Can I view detected WiFi networks details (like signal strength, encryption etc.) in command line? The more detailed - the better.


grub shows multiple kernel versions on startup

I have Ubuntu 10.10 and after few updates the boot menu lists many kernel versions. How do I remove older versions?


Overheating results in system shutdown

I have been having an overheating issue which makes my laptop shutdown immediately. Is there anyway to monitor the temperature from the sensor and scale down the CPU frequency to avoid that problem? Is there any existing software or shell script that can handle that job?


Devices get renamed when SATA disk attached

I have an HP xw8200 workstation running linux with two small, fast SCSI drives hooked up to the onboard LSI SCSI controller. The drives get labeled /dev/sda & /dev/sdb in /dev, respectively. I have a large SATA disk that I want to add to the system to store data, but every time I connect it, it's /dev gets assigned sda & the two scsi drives are assigned sdb,c, which messes with the boot procedure. How can I get this SATA drive to use sdc? Or what's the quickest way to get this set up?


tun0+ iptables rule

I'm trying to figure out what that + sign means in a rule such as this:               -A FORWARD -i tun0+ -j ACCEPT      I'm pretty positive it relates to vpn. I noticed a /dev/net/tun interface and a tun0 in ifconfig, but for the sake of thoroughness, I want to know about that + sign. Anyone know anything?


update-alternatives: disable log file /var/log/alternatives.log

I would like to disable the logfile `/var/log/alternatives.log`. I understand that this is being logged by `update-alternatives` script, and I also understand that `update-alternatives` can take the argument `\--log`, specifying an non-standard log file (in my case I would like /dev/null). But since `update-alternatives` is run automatically, I don't know how to specify that command line option `\--log`. Is there some config file, where I could specify the `\--log` parameter ?


sed one-liner to delete any line that does not contain lowercase letters

So, basically THIS LINE WOULD BE DELETED and (THIS LINE WOULD ALSO BE DELETED) but Indeed, THIS LINE WOULD NOT


Restore clock after short powerdown for no-network, no-RTC system

I've made a programmable power switch using Raspberry Pi (although this question is not RPi specific - it's more of "generic Linux" with problem caused by hardware shortcomings.) Raspberry has no battery-backed RTC; it's intended to work networked and sync its clock soon after boot-up over network. My problem is, that while I do programming of said switch over the net, and I can get given sockets to switch on/off at given hour that way, the device itself is to be used at different locations, including non-networked ones. When if I carry it from where I programmed it to where it's to be plugged in, it's unpowered and the clock loses state. After I power it back up, it has no connectivity to restore the date. The few minutes when it's unpowered is not a problem for me - I don't mind the clock being off by a minute or two. I mind if it's off by 43 years as is the case after I switch it on non-networked. Is there some neat way to restore the clock on boot-up to a state from before the system went down due to power loss? (writing it every second to SD card which is the memory medium of RPi will kill the card quite fast so that's not quite an option.)


Could someone provide a step by step guide to configuring OpenVPN server to work over port 443?

My network is very restrictive and many many things do not work so I need to configure a VPN that will work over port 443. I have tried numerous times to set up the server myself, however I can never get further than establishing a connection between the server and the client. The traffic is not being tunnelled. Furthermore I could not get it to run over port 443 to work correctly. I am able to use either debian or ubuntu on the server.


Obtaining md5 during wget

I'm `wget`'ing huge files (over 100GB) and then comparing my md5sum to the sum posted in the repository. Believe it or not, `md5sum` takes a nontrivial amount of time to run on a file of this size, so I'd like to get the sum in parallel with the download. What's the best way to do this? I don't see a `wget` option to calculate MD5 during download (surprisingly) so I guess using `tee` would be the way to go?!


How can I quickly copy a GPT partition scheme from one hard drive to another?

On a non GPT partition table I can do               sfdisk -d /dev/sda | sfdisk /dev/sdb      But `sfdisk` doesn't support GPT partition tables. What can I use instead? I'm looking for a one or two command solution, not just using GNU parted to output the partition sizes and then manually making them again.


Receive Pop/IMAP email and then forward as encrypted to gmail

Basically, I have an email account I can access as POP3 or IMAP. I want to take all incoming emails, encrypt them, and then forward the encrypted version to my gmail account (so I can see the subject/notifications on my phone/gmail account; and possibly decrypt the message with a passphrase -- though this last step doesn't need to be implemented initially). I probably could write a python script to do this, but using the proper linux tools seems like a better route. I have postfix (in a satelite configuration) already set up to send outgoing mail. What's the easiest way to read POP3/IMAP on a linux box and get it to gpg encrypt the email's body and attachments (not subject headers) with my public key, and forward it to my gmail acct? (For the record; its against work's policy (partially for compliance with US HIPAA law) for me to send unencrypted versions of my email to my phone; as there's the potential for someone to deliberately (or inadvertantly) email protected data to my phone. Work considers GPG to be secure.)


How can I handle raw binary data in a bash pipe?

I have a bash function that takes a file as a parameter, verifies the file exists, then writes anything coming off stdin to the file. The naive solution works fine for text, but I am having problems with arbitrary binary data.               echo -n '' >| "$file" #Truncate the file     while read lines     do  # Is there a better way to do this? I would like one...         echo $lines >> "$file"     done


Recommended Resources To Get Started With Terminal-Only Linux Server?

I want to try to setting up a headless (terminal-only) Ubuntu Linux server, and am trying to find resources to get started. I've been a GUI Linux/Windows user for a while now, and have run through a tutorial to setup a server on an Ubuntu desktop (with the GUI), but the biggest hurtle I found was when I tried to only use the terminal. Ultimately I want to try to setup a web server and host personal content (personal website, or possibly a personal Confluence site). On the server I'd also like to setup a database (postgres / mysql), I wouldn't shy away from some experience with Samba as well. I've gone far enough to enable ssh on a server so I can ssh in, but am pretty much a beginner from there. Problems I encountered with my only attempt at running a headless server: I think I installed mysql (with apt-get), but didn't grasp almost anything after that, such as how to get the database service to start with the server on server restart, how to check that it did install correctly, or even how to make sure it was running without access to a visual process manager. Is there a tutorial someone would recommend specifically aimed at people with discomfort with a Linux server, and particularly using a terminal-only interface?


Vim - statusline and links

Given this situation:               cd ~/temp     ln -s /var/lib/alsa alsa     cd alsa     pwd -> /home/<username>/temp/alsa      But if I open some file in the directory output of `pwd`, the `vim` statusline gives me:               /var/lib/alsa/asound.state      How can I make it show the `pwd` result, and not follow the link? I'm using:               set statusline=%F%=%m\ %y\ \%r\ %1*\ \%l\:\%c\ \%2*\ \ \%p%%\ \


Add year to entries generated by rsyslogd

The default configuration of rsyslogd writes log entries in the traditional format, which looks like this:               Nov 30 10:40:01 localhost CRON[30786]: pam_unix(cron:session): session closed for user list      There is no year, which is inconvenient for tools that process logs and that require an exact time stamp for each entry, have to implement hacks which guess the year. We can switch rsyslogd to a built-in template called `RSYSLOG_FileFormat` which changes to a high-precision timestamp. While this is RFC timestamp format is fine for processing, it is verbose gibberish with no whitespace that is hard on the human eyes.               2013-11-30T10:50:01.478204-08:00 localhost CRON[31200]: ...      Unfortunately, the template system of rsyslogd is very unfriendly and the documentation is poor. Incredibly, for all the unnecessary complexity in this template system, the value of `dateformat` is evidently linked to a hard coded C `enum` of choices! There are parameters like `$YEAR` but these just pull out the current time, not the one from the message timestamp, so that is a hack. I just want to concentrate on writing the program program which processes the entries. **What is the right blurb I can put into a`rsyslogd.conf` file to get this exact output:**               Nov 30 2013 10:40:01 localhost CRON[31200]: ...      Just the traditional template, plus year.


Allow all group members to create directories and files

There are 2 users   `sftp_user   apache`   Both users belong to the `updaters` group as well as other groups. New directories and files are created in the `/updates/` directory.   `drwxrwsr-x 8 sftp updaters 4096 Feb 27 16:12 updates` The `/updates` directory has the sticky bit set to the `updaters` group.   `chmod g+s /updates` In this scenario, sftp can create new directories and files using SFTP. However, when apache tries to create new directories and files, permission is declined. How can I make it so both users (in the group updaters) can create new directories and files?