title: Is there a perl or awk solution for this problem?

text: I have an input file ( **input.txt** ) like below.               id1      id2       name    weight      53723848 12651711 timburnes 1.36667     53530214 12651711 timburnes 1.51191     53723848 53530214 timburnes 1.94     764157 52986038 ericcartman 0.861145     56797854 764157 ericcartman 1.35258     56797854 52986038 ericcartman 1.73781      Note that **the first line is not part of the actual file, I have added it here for clarity**. I am trying to extract the values of the `id1` and `id2` to 2 separate files named **unique.txt** and **duplicate.txt**. If my `weight` column value is greater than 1.5, it means I have **duplicate ids**. In this case, I will move the `id1` value to `unique.txt` file and `id2` value to `duplicate.txt` file. If my weight column is less than 1.5, it means I do not have duplicate values. So, in this case, I will move both `id1` and `id2` to **unique.txt** file. So for the above input, I am expecting the output as, For **unique.txt** file,               53723848 timburnes     764157 ericcartman     56797854 ericcartman      For **duplicate.txt** file,               12651711 timburnes     53530214 timburnes     52986038 ericcartman      I can find out the duplicates using the below code. To get the values greater than 1.5 based on 4th column,               awk -F" " '$4 >= 1.5 { print $1" " $2" " $3" " $4}' file1.txt > Output.txt      Now, for values greater than 1.5, I can use the below code to merge the duplicate ids based on their names.                 perl -ane 'foreach(@F[0..1]){$k{$F[2]}{$_}++}                END{                     foreach $v (sort keys(%k)){                         print "$_ " foreach(keys(%{$k{$v}}));                          print "$v\n"                     };                  } ' Output.txt      However, I am not able to get the output in the way I like in the above approach. **EDIT** : I am running the command for my input as below.               awk '{           if ($4 > 1.5) {                if (++dup[$2] == 1)  print $2, $3 > "duplicate.txt"           }            else               if (++uniq[$1] == 1) print $1, $3 > "unique.txt"      }' << END     17412193 43979400 ericcartman 2.16667     21757330 54678379 andrewruss 0.55264     END       I am getting the output as,               -bash-3.2$ cat unique.txt     21757330 a.andreev     -bash-3.2$ cat duplicate.txt     43979400 ericcartman      However, the output I am expecting is,               cat unique.txt     17412193 ericcartman     21757330 andrewruss     54678379 andrewruss     cat duplicate.txt     43979400 ericcartman


title: yum install PHP Error Summary

text: so I'm following this tutorial to install php5 in a red hat 6.5 box and   I have only type one command and is this one below, I just wantend to install the php-gd module.(testing..)   when I try this:               yum --enablerepo=remi,remi-php55 install php-pecl-apc php-cli php-pear php-pdo php-mysqlnd php-pgsql php-pecl-mongo php-sqlite php-pecl-memcache php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml      I get this error:                   Dependencies Resolved              =======================================================================================                  Package           Arch   Version          Repository                             Size     =======================================================================================     Installing:      php-pecl-apc      x86_64 3.1.9-2.el6      rhel-x86_64-server-6                   96 k      php-pecl-memcache x86_64 3.0.5-4.el6      rhel-x86_64-server-6                   60 k      php-pgsql         x86_64 5.3.3-27.el6_5   rhel-x86_64-server-6                   70 k      php54-mcrypt      x86_64 5.4.27-1.ius.el6 rackspace-rhel-x86_64-server-6-ius     25 k      php54-mysqlnd     x86_64 5.4.27-1.ius.el6 rackspace-rhel-x86_64-server-6-ius    238 k      php54-pecl-memcached                        x86_64 2.2.0-1.ius.el6  rackspace-rhel-x86_64-server-6-ius     43 k      php54-pecl-mongo  x86_64 1.5.1-1.ius.el6  rackspace-rhel-x86_64-server-6-ius    151 k     Installing for dependencies:      libmcrypt         x86_64 2.5.7-5.el6      rackspace-rhel-x86_64-server-6-common  99 k      libmemcached10    x86_64 1.0.16-1.ius.el6 rackspace-rhel-x86_64-server-6-ius    154 k      libtool-ltdl      x86_64 2.2.6-15.5.el6   rhel-x86_64-server-6                   44 k      php54-common      x86_64 5.4.27-1.ius.el6 rackspace-rhel-x86_64-server-6-ius    903 k      php54-pdo         x86_64 5.4.27-1.ius.el6 rackspace-rhel-x86_64-server-6-ius     95 k          Transaction Summary     =======================================================================================     Install      12 Package(s)          Total download size: 1.9 M     Installed size: 0       Is this ok [y/N]: Y     Downloading Packages:     (1/12): libmcrypt-2.5.7-5.el6.x86_64.rpm                        |  99 kB     00:00          (2/12): libmemcached10-1.0.16-1.ius.el6.x86_64.rpm              | 154 kB     00:00          (3/12): libtool-ltdl-2.2.6-15.5.el6.x86_64.rpm                  |  44 kB     00:00          (4/12): php-pecl-apc-3.1.9-2.el6.x86_64.rpm                     |  96 kB     00:00          (5/12): php-pecl-memcache-3.0.5-4.el6.x86_64.rpm                |  60 kB     00:00          (6/12): php-pgsql-5.3.3-27.el6_5.x86_64.rpm                     |  70 kB     00:00          (7/12): php54-common-5.4.27-1.ius.el6.x86_64.rpm                | 903 kB     00:00          (8/12): php54-mcrypt-5.4.27-1.ius.el6.x86_64.rpm                |  25 kB     00:00          (9/12): php54-mysqlnd-5.4.27-1.ius.el6.x86_64.rpm               | 238 kB     00:00          (10/12): php54-pdo-5.4.27-1.ius.el6.x86_64.rpm                  |  95 kB     00:00          (11/12): php54-pecl-memcached-2.2.0-1.ius.el6.x86_64.rpm        |  43 kB     00:00          (12/12): php54-pecl-mongo-1.5.1-1.ius.el6.x86_64.rpm            | 151 kB     00:00          ---------------------------------------------------------------------------------------     Total                                                  930 kB/s | 1.9 MB     00:02          Running rpm_check_debug     Running Transaction Test               Transaction Check Error:       file /etc/php.ini from install of php54-common-5.4.27-1.ius.el6.x86_64 conflicts with file from package php-common-5.3.3-27.el6_5.x86_64       file /usr/lib64/php/modules/curl.so from install of php54-common-5.4.27-1.ius.el6.x86_64 conflicts with file from package php-common-5.3.3-27.el6_5.x86_64       file /usr/lib64/php/modules/fileinfo.so from install of php54-common-5.4.27-1.ius.el6.x86_64 conflicts with file from package php-common-5.3.3-27.el6_5.x86_64       file /usr/lib64/php/modules/json.so from install of php54-common-5.4.27-1.ius.el6.x86_64 conflicts with file from package php-common-5.3.3-27.el6_5.x86_64       file /usr/lib64/php/modules/phar.so from install of php54-common-5.4.27-1.ius.el6.x86_64 conflicts with file from package php-common-5.3.3-27.el6_5.x86_64       file /usr/lib64/php/modules/zip.so from install of php54-common-5.4.27-1.ius.el6.x86_64 conflicts with file from package php-common-5.3.3-27.el6_5.x86_64       file /usr/lib64/php/modules/pdo.so from install of php54-pdo-5.4.27-1.ius.el6.x86_64 conflicts with file from package php-pdo-5.3.3-27.el6_5.x86_64       file /usr/lib64/php/modules/pdo_sqlite.so from install of php54-pdo-5.4.27-1.ius.el6.x86_64 conflicts with file from package php-pdo-5.3.3-27.el6_5.x86_64       file /usr/lib64/php/modules/sqlite3.so from install of php54-pdo-5.4.27-1.ius.el6.x86_64 conflicts with file from package php-pdo-5.3.3-27.el6_5.x86_64      ##  Error Summary So I think nothing has happen yet. but I will like to roll back this transaction if possible so theres is no lost link somewhere that can ruin some configuration later on. I do have php 5.3.3 installed.


title: Does Linux log when a process is started, and the PID that gets assigned to it? Where can I find that log?

text: When my Ubuntu server starts up, I see a message that says: `kernel: [11.895392] init: failsafe main process (631) killed by TERM signal`. I would like to know what process this is but I'm not sure where to look. When I search through my `syslog` and `kernel.log`, I don't see any evidence of processes starting and being given an identifier (PID). I'd like to investigate my boot message (failsafe main process killed...) but first, I need to answer the question: When a process starts, where is that logged and does the PID that is assigned to it get logged as well? I understand that a process will write a PID file to reference later as necessary, but once the process is killed, can I find out what PID it used to have?


title: listen to two IPs for hosting 2 websites with SSL

text: At my work I had been working on one web application with apche on opensuse listening to one IP, lets say 123.123.123.200. Now we are adding to differet web application to same machine. both have their own SSL certificates. SSL working fine on one website which was already running there before. Now my apache vhosts.conf look like as follows               Listen 80     Listen 443          NameVirtualHost 123.123.123.200:80     NameVirtualHost 123.123.123.200:443     <VirtualHost 123.123.123.200:443>         DocumentRoot /srv/www/domainone         ServerName      domainone         SSLEngine On         SSLCertificateFile /srv/cert/domainone.crt         SSLCertificateKeyFile /srv/cert/domainone.key     </VirtualHost>     <VirtualHost 123.123.123.200:80>         DocumentRoot /srv/www/domainone         ServerName      domainone     </VirtualHost>          <VirtualHost 123.123.123.201:443>         DocumentRoot /srv/www/domaintwo         ServerName      domaintwo         SSLEngine On         SSLCertificateFile /srv/cert/domaintwo.cer         SSLCertificateKeyFile /srv/cert/domaintwo.key      </VirtualHost>      <VirtualHost 123.123.123.201:80>         DocumentRoot /srv/www/domaintwo         ServerName      domaintwo      </VirtualHost>      with this config I get an error when I start apache but if I disbale entries for 123.123.123.201 then apache starts fine. What I am doing wrong here? another thing related to same setup is that how to setup apache to listen to multiple IP. Is it under control of apache or the operating system? Thanks


title: Emacs + whitespace: ignoring 'normal' spaces

text: I would like to use whitespace to detect wrong whitespace (i.e. trailing whitespace on line, tabs instead of spaces etc.). However I would like to still have spaces displayed as spaces. I tried to use `whitespace-space` variable but I have not managed to do it. Is it possible? How to do it?


title: Boot the Arch Linux installation USB media on Dell XPS 13 (L322X) UEFI

text: this is my first attempt to install Arch Linux on my Dell XPS 13 (L322X) laptop in UEFI mode. I've dowloaded "archlinux-2014.02.01-dual.iso" and written to my USB pen drive with the dd way. I boot my laptop with the usb pen drive in my LH side USB port (RH side won't recognize the system), press F12 while loading and I select USB from the UEFI boot menu list. The bootloader menu appears and I select "Arch Linux archiso x86_64 UEFI CD", the screen gets black, the usb pen drive led flashes a few times and then the system gets stuck there. Nothing happens... I can only press the power button to power off the laptop. I've tried also with a different usb pen drive and with unetbootin instead of dd but I get the same result. **Note:** On that laptop I sucessfully booted (and installed) Ubuntu in UEFI mode in the past. **Note:** if I boot the arch installation media in legacy way from the same usb pen drive, I successfully get to command prompt **EDIT:** after many attempts I decided to try the previous installer iso "archlinux-2014.01.05-dual.iso". This one works also in UEFI mode (I used unetbootin to "burn" it to my usb pend drive). So my feeling is that current iso (archlinux-2014.02.01-dual.iso) has some issues with UEFI. I've filed a bug report on Arch bug tracker


title: Access Unix Clipboard

text: I am new to Linux. In my company, we have a Linux server, and there are multiple users (thus multiple accounts) on that server. So logically, there would be different clipboards for different users. My question is: just like in Windows we can have a clipboard viewer, how can I see the contents of clipboard on Unix?


title: How to set up networking on a per-user basis?

text: I would like to set up access to corporate VPN for just my user account on my computer; not for the other accounts and certainly not for the guest user. To achieve this, I presume, I need to configure networking on a per-user basis. How can I do this? I would like to use Ubuntu operating system, if possible. I am just figuring out how to approach setting up VPN correctly; I did not set up any.


title: Assigning command output to variable gives strange results

text: My script looks like this:               #!/bin/sh     PROJECT_DIR=$(cd -P -- "$(dirname -- "$0")" && pwd -P)          COMMANDS_CODE=$(php $PROJECT_DIR/bin/console generate:code)          echo $COMMANDS_CODE      The output has all newlines stripped (which doesnt happen if I call the script directly) and contains some strange paths at the beginning like this:               /bin /boot /cdrom /dev /etc /home      /initrd.img /lib /lib64 /lost+found      /media /mnt /opt /proc /root /sbin      /selinux /srv /sys /tmp /usr /var /vmlinuz      ... here starts the actual output but without any newlines ...      (The above is actualy one long string which is echoed I just added some newlines for readability) What´s happening there? If I do a               php bin/console generate:code      in my project dir in my bash shell everything works fine.


title: "k" key sends focus in event

text: After a dist-upgrade to wheezy, my "k"-Key misbehaves. When typed in a gnome- terminal, no "k" is printed. Instead the terminal seems to grab the focus and will not release it. If I drag-down the mouse _outside_ the terminal it highlights line _inside_ the terminal. Also regular mouse clicks no longer work. I ran `xev` an it shows three events when pressing "k"   * a FocusIn event    * a FocusOut event    * a KeymapNotify event This only happens when I log in through a display manager using my account. It happens with gdm3 and wdm (I have not tested any others) When I log in as a different user, the "k" key works. When I log in through a display managaer using a "failsafe" session it also works. Other than that the issue occurs with many different session types. When startig X from the commandline all is fine. The issue only occurs when logging in through a display manager. AFAICS all other key work, including the uppercase shift-K I looked for "dpkg-dist" files in /etc/X11 and only found the following:               ./XftConfig.dpkg-dist     ./rstart/config.dpkg-dist      So it appears to be related to something attached to my user account. In my dispair I renamed the ~/.config directory, but that didn't resolve the issue. I am aware of `p` key doesn't work in X, and I believe it is the same issue, but I have no idea, where I could possibly have remapped the key or how to track this down.


title: Fedora list all packages not in a "clean" install

text: Is there some tool to show me all packages I've installed that are not part of the set of packages that comes with a "clean" install? I'm just cleaning out packages I don't use any more prior to upgrading from F15 to F16 (the computer has passed hands a number of times and is slowly accumulating unused packages). I don't want to actually do a fresh install of F16 (so that I can keep some particular packages that I use & config files etc), but I'd like to restore my F15 to as close to a "clean" install as possible before the upgrade. I've done a little with `rpmcleaner` and `cleanup-packages`, but I'd prefer just a list of "packages not in a fresh install of F15", bonus points if it displays in an 'Add/Remove Software'-type interface (purely because it easily displays package descriptions and it's easier to uncheck a checkbox than `yum erase whats-the-package-name-again`).


title: Rsyslog log rotation using output channels

text: I'm running rsyslogd 4.2.0 on Ubuntu. I'm trying to use the output channel feature described here: http://www.rsyslog.com/doc/rsyslog_conf_output.html Here's the relevant portion of my config:               $outchannel test_rotated,/var/log/test/test.log,1000000,/root/scripts/rotate-test-logs.pl     local0.* :omfile:$test_rotated      But rsyslog refuses to do anything and the /var/log/test/test.log does not even appear. If I replace those two lines with:               local0.* /var/log/test/test.log      everything works (but file is not rotated automatically of course). What am I missing?


title: What does yum's "Updating for dependencies" mean?

text: Sometimes when I update my software with `yum update`, the summary of packages to be updated displays two lists: "Updating" and "Updating for dependencies". The packages in the "Updating for dependencies" lists were previously installed. Why is there a separate list of packages like this? What does this mean for these packages?


title: What does the command set speller "aspell -x -c" in nanorc do?

text: When I pressed `Ctrl`+`T` in `Nano` it gave the error `Spell checking Failed: Error invoking Spell.` So I followed this answer and added `set speller "aspell -x -c"` to my `~/.nanorc` and the spell check is now working perfectly. **But what did this command do?** What was causing the error? And why did this nanorc command fix it?


title: Solaris 11 (GNOME) - Where is the "master" menu?

text: Something strange/catastrophic happened to my Solaris 11 installation, it uses GNOME. I need to know where the "master"-menu (the "Start-menu" listing programs and categories) is located. I hope that'll be the first step to fix my problem... So where is the menu defined?


title: Javascript to HTML converter?

text: Take for example this snippet of code on a web page.               <html><body>     <script language="javascript">     document.write("The cat");     document.write(" sat on the mat");     </script>     </body></html>      If I were to retrieve this web page via CURL or WGET I would get that text because the Javascript has not been processed. But I would like to retrieve this page, so I get the results of the Javascript output. So I would get just..               The cat sat on the mat      Is there some Linux Javascript sandbox/emulator/pre processor or something of that ilk that would allow me to process that text into html. I understand Javascript is complex and don't expect 100% conversion. But even to get some basic conversion would be helpful. I know its possible as I'm sure Google does that when they index web pages to get the best results for the web pages they index.


title: Critical Memory

text: > **Possible Duplicate:**   >  `free`: output format My Redhat server shows the following:               free -m      =============                   total       used       free     shared    buffers     cached      Mem:          8113       8078        35          0        171       6491        -/+ buffers/cache:       1415       6698        Swap:         8189         59       8130       Is 35 mega of free memory considered critical on a production server ?


title: What is Linux for OpenVMS DCL Ctrl/T?

text: From OpenVMS DCL Dictionary: > The Ctrl/T function displays a single line of statistical information about > the current process. When you press Ctrl/T during an interactive terminal > session, it momentarily interrupts the current command, command procedure, > or image to display statistics. The statistical information includes the > node and user names, the current time, the current process, CPU usage, > number of page faults, level of I/O activity, and memory usage. For example:               BOSTON::SMITH  16:21:04 EDT       CPU=00:00:03.33 PF=778 IO=296 MEM=277      What is Linux for OpenVMS DCL Ctrl/T?


title: Why does openssl print to stderr for a successful command?

text: When I generate a CSR using openssl, the normal output goes to stderr. I don't understand why it isn't on stdout. I'm scripting the generation of some certificate/key pairs and want to be able to detect error conditions, but this confuses the issue.               admin@ip-10-248-185-66:~> openssl req -rand $RAND -new -newkey rsa:2048 -nodes -keyout $KEYPATH -subj /C=US/ST=CA/L=LA/O=TS/OU=server/CN=primary -out $CSRPATH -config $CONFPATH     Generating a 2048 bit RSA private key     .........................+++     ..................................+++     writing new private key to '$KEYPATH'     -----     admin@ip-10-248-185-66:~> echo $?     0     admin@ip-10-248-185-66:~> openssl req -rand $RAND -new -newkey rsa:2048 -nodes -keyout $KEYPATH -subj /C=US/ST=CA/L=LA/O=TS/OU=server/CN=primary -out $CSRPATH -config $CONFPATH 2>/dev/null     admin@ip-10-248-185-66:~>


title: Moin underlay permissions

text: I am running `moinmoin` on Debian squeeze... this is a wiki I migrated from an old Debian Lenny machine whose power supply died a couple of years ago. I copied `/opt/mydebianwiki` to the new server and also copied `/usr/share/moin/underlay` to `/opt/mydebianwiki/underlay` to ensure I picked up the changes from Lenny to Squeeze. When I run this under `wsgi`, I get:               ConfigurationError               data_underlay_dir "./underlay/" does not exist, or has incorrect ownership or     permissions.          Make sure the directory and the subdirectory "pages" are owned by the web     server and are readable, writable and executable by the web server user     and group.          It is recommended to use absolute paths and not relative paths. Check     also the spelling of the directory name.      My `underlay` directory and `underlay/pages` have 740 permissions with the same user as `apache2` (as advised by ReimarBauer on the moin Installing page):               drwxr----- 3 www-data www-data 4096 Jun 21 14:39 underlay      For information, I included the following line in `wikiconfig.py`:               data_underlay_dir = '/opt/mydebianwiki/underlay/'      My apache config               <VirtualHost *:80>       ServerName wwwin.pennington.net            RewriteEngine   on       RewriteCond     %{HTTPS} !=on       RewriteRule     ^(.*)$ https://wwwin.pennington.net/$1 [L,R]            DocumentRoot /opt/mydebianwiki/       WSGIScriptAlias / /opt/mydebianwiki/moin.wsgi     </VirtualHost>          <VirtualHost *:443>       ServerName wwwin.pennington.net       DocumentRoot /opt/mydebianwiki       WSGIScriptAlias / /opt/mydebianwiki/moin.wsgi            # Generate with...       # openssl req -new -x509 -days 365 -nodes -out netwiki.pem -keyout wiki.key       SSLEngine on       SSLCertificateFile /etc/apache2/ssl/wiki.pem       SSLCertificateKeyFile /etc/apache2/ssl/wiki.key     </VirtualHost>      How can I get past this error?


title: How to compile & execute C programs under Linux?

text: I'm migrating to from Windows to Linux and I heard a lot about Linux and how you can do some real good programming under Linux. But I'm have no idea about how to compile a code written in C on Linux.


title: When should I keep debugging symbols in kernel modules?

text: When installing kernel modules, I have the option to strip out debugging symbols using `INSTALL_MOD_STRIP=1`. This saves significant disk space. Does it also save memory? Why should one keep the debugging symbols in the kernel modules?


title: Web browser hooked pulseaudio sound, how to release?

text: It seems that Chrome (and its Flash component) has grabbed all the audio on the machine for itself, leaving no sound for any other applications. I am running KDE with PulseAudio. Is there a way in the myriad different applications* that handle sound on Linux to convince Chrome to give up its death grip on audio so that other applications can get a chance to make noise? *- Looked at alsamixer, kmixer and Phonon (KDE multimedia configurer). Settings are a-ok, no indication that one application has hogged the audio device.


title: how to make a large ISO storage on xen cloud platform (XCP) or XenServer

text: i've downloaded XCP 1.5 beta from http://www.xen.org/download/xcp/index_1.5.0.html. i've managed to install it too. my physical system specifications are               3.01 GHz i7     24 GB Ram     3 TB HDD      now i would like to create an ISO storage space on the same physical server itself. i notice that Dom0 only has 4 GB of space, of which, 40% is in use. i need to create space elsewhere on my 3 TB HDD as an ISO storage area, how do i do this? on Dom0, "df -h" gives me the following information.               Filesystem            Size  Used Avail Use% Mounted on     /dev/sda1             4.0G  1.5G  2.3G  40% /     none                  380M     0  380M   0% /dev/shm      "pvs" gives me the following output.               PV         VG                                                 Fmt  Attr PSize PFree     /dev/sda3  VG_XenStorage-5a32ce29-c98e-1488-273e-263c65d47479 lvm2 a-   2.72T 2.62T      there's a link here, http://www.riverlite.co.uk/2012/01/xenserver-creating-a- local-iso-library/, that describes this problem, however, i am lost in Part 2 - Creating a larger ISO library, because for some reason, he has some extra file systems (that i don't see on my own system). any help is appreciated.


title: How to define and load your own shell function in zsh

text: I am having a hard time defining and running my own shell functions in zsh. I followed the instructions on the official documentation and tried with easy example first, but I failed to get it work. I have a folder:               ~/.my_zsh_functions      In this folder I have a file called `functions_1` with `rwx` user permissions. In this file I have the following shell function defined:               my_function () {     echo "Hello world";     }      I defined `FPATH` to include the path to the folder `~/.my_zsh_functions`:               export FPATH=~/.my_zsh_functions:$FPATH      I can confirm that the folder `.my_zsh_functions` is in the functions path with `echo $FPATH` or `echo $fpath` However, if I then try the following from the shell:               > autoload my_function     > my_function      I get: > zsh: my_test_function: function definition file not found Is there anything else I need to do to be able to call `my_function` ? ## Update: The answers so far suggest sourcing the file with the zsh functions. This makes sense, but I am bit confused. Shouldn't zsh know where those files are with `FPATH`? What is the purpose of `autoload` then?


title: Bypass ssh password prompt from a shell script

text: I've got a shell script that ssh'es into a server using public key authentication and runs a command on that machine. This works fine on machines where the users have installed the public key on the server. If this script is run from a machine where the user hasn't set up the authentication key, then the script will be stuck at password prompt. I want my script to carry on instead of getting stuck at the prompt. How can I bypass the prompt? I'm on a Mac OSX. The server is also running OSX


title: Imagemagick batch crop / rename to new folder

text: I am in the middle of writing a bash script which involves imagemagick taking a set of images in one directory, cropping them at 16/9 ratio from the center, and renaming them "image" + 5 digit number. I think this is the way if I know the image dimensions (see below), but how do I include ratios into the crop? `usr/bin/convert *.jpg -gravity Center -crop 3888x2187+0+0 -scene 1 -path /another_folder/image_%05d.jpg` Also, would that rename the jpgs incrementally by a 5 digit sequence?


title: Grepping over a huge file performance

text: I have FILE_A which has over 300K lines and FILE_B which has over 30M lines. I created a bash script that greps each line in FILE_A over in FILE_B and writes the result of the grep to a new file. This whole process is taking over 5+ hours. I'm looking for suggestions on whether you see any way of improving the performance of my script. I'm using grep -F -m 1 as the grep command. FILE_A looks like this:               123456789      123455321      and FILE_B is like this:               123456789,123456789,730025400149993,     123455321,123455321,730025400126097,      So with bash I have a while loop that picks the next line in FILE_A and greps it over in FILE_B. When the pattern is found in FILE_B i write it to result.txt.               while read -r line; do        grep -F -m1 $line 30MFile     done < 300KFile      Thanks a lot in advance for your help.


title: How to display next schedule time for a TSM node?

text: 0:root@SERVER:/SERVER/fs_111 # dsmc q schedule     IBM Tivoli Storage Manager     Command Line Backup-Archive Client Interface       Client Version 6, Release 4, Level 0.1         Client date/time: 03/09/2014 15:08:27     (c) Copyright by IBM Corporation and other(s) 1990, 2012. All Rights Reserved.          Node Name: SERVER_111     Session established with server TSM03: AIX-RS/6000       Server Version 5, Release 5, Level 5.2       Server date/time: 03/09/2014 15:08:27  Last access: 03/09/2014 15:02:58              Schedule Name: foo           Description:         Schedule Style: Classic            Action: Incremental           Options:             Objects:            Priority: 4        Next Execution: 2 Hours and 7 Minutes          Duration: 2 Hour             Period: 2 Day             Day of Week: Any             Month:           Day of Month:          Week of Month:             Expire: Never          0:root@SERVER:/SERVER/fs_111 #       From the output of the "dsmc q schedule" I can see that the next backup for this nodeid will be in "2 Hours and 7 Minutes". I can also see the "Server date/time". **My question** : How can I get the next schedule time? It would be the server time plus next execution time. So in this example: "03/09/2014 17:15:27"


title: What is the official Gentoo AMI?

text: I would like to use Gentoo on Amazon EC2. What are the right AMI for me to use? I won't be running X unless necessary. I guess I need a _server_ variant, if there is such a thing.


title: Listening for journalctl changes

text: Usually i use `tail -f /var/log/messages` to get updates if there are new lines How to have the similar functionality for `journalctl`?


title: OSX top command shows 5 running on a quad core

text: When trying to run the top command on my quad core mac, I see periodically that there are 5 running processes. How could it be possible to have 5 running processes on a quad core machine?


title: How is a username determined and can I hide the domain component in a winbind username?

text: Someone asked a question on Server Fault about a problem which I'm also having but no one has answered it so I'm posing a slightly different question to try and figure it out myself. I've configured PAM on my Arch Linux server to use pam_krb5 and it works.               login as: Username     Username@server.ad.example.com's password:     Warning: Your password will expire in 32 days on Tue Apr  1 22:24:58 2014     Last login: Fri Feb 28 09:46:58 2014 from pc.ad.example.com     Could not chdir to home directory /home/AD/Username: No such file or directory     [AD\Username@server /]$ echo $KRB5CCNAME     FILE:/tmp/krb5cc_3000019_DF0uwI     [AD\Username@server /]$ klist     Ticket cache: FILE:/tmp/krb5cc_3000019_DF0uwI     Default principal: Username@AD.EXAMPLE.COM          Valid starting     Expires            Service principal     28/02/14 10:03:43  28/02/14 20:03:43  krbtgt/AD.EXAMPLE.COM@AD.EXAMPLE.COM             renew until 01/03/14 10:03:43      _I haven't created the home directory yet so I think that error can be ignored for the time being._ And the logs show the following.               sshd[10567]: pam_krb5(sshd:auth): pam_sm_authenticate: entry (nonull)     sshd[10567]: pam_krb5(sshd:auth): (user Username) attempting authentication as Username@AD.EXAMPLE.COM     sshd[10567]: pam_krb5(sshd:auth): user Username authenticated as Username@AD.EXAMPLE.COM     sshd[10567]: pam_krb5(sshd:auth): (user Username) temporarily storing credentials in /tmp/krb5cc_pam_7mIl6Q     sshd[10567]: pam_krb5(sshd:auth): pam_sm_authenticate: exit (success)     sshd[10567]: pam_krb5(sshd:account): pam_sm_acct_mgmt: entry     sshd[10567]: pam_krb5(sshd:account): (user Username) retrieving principal from cache     sshd[10567]: pam_krb5(sshd:account): pam_sm_acct_mgmt: exit (success)     sshd[10567]: Accepted password for Username from 192.168.1.10 port 50653 ssh2     sshd[10567]: pam_krb5(sshd:setcred): pam_sm_setcred: entry (establish)     sshd[10567]: pam_krb5(sshd:setcred): (user Username) initializing ticket cache FILE:/tmp/krb5cc_3000019_CgGnZS     sshd[10567]: pam_krb5(sshd:setcred): pam_sm_setcred: exit (success)     kernel: type=1006 audit(1393584192.561:70): pid=10567 uid=0 old auid=4294967295 new auid=3000019 old ses=4294967295 new ses=69 res=1     sshd[10567]: pam_krb5(sshd:session): pam_sm_open_session: entry     sshd[10567]: pam_krb5(sshd:session): pam_sm_open_session: exit (success)     sshd[10569]: pam_krb5(sshd:setcred): pam_sm_setcred: entry (establish)     sshd[10569]: pam_krb5(sshd:setcred): pam_sm_setcred: exit (success)      Great. When I try `kinit` it detects the principal correctly.               [AD\Username@server /]$ kinit     Password for Username@AD.EXAMPLE.COM:     Warning: Your password will expire in 32 days on Tue 01 Apr 2014 22:24:58 BST      However, when I try to use `sudo` it interprets the username as the principal.               [AD\Username@server /]$ sudo -i     [sudo] password for AD\Username:     sudo: 1 incorrect password attempt      And the log shows the following.               sudo[10564]: pam_krb5(sudo:auth): pam_sm_authenticate: entry (silent)     sudo[10564]: pam_krb5(sudo:auth): (user AD\Username) attempting authentication as ADUsername@AD.EXAMPLE.COM     sudo[10564]: pam_krb5(sudo:auth): (user AD\Username) krb5_get_init_creds_password: Client 'ADUsername@AD.EXAMPLE.COM' not found in Kerberos database     sudo[10564]: pam_krb5(sudo:auth): authentication failure; logname=AD\Username uid=3000019 euid=0 tty=/dev/pts/0 ruser=AD\Username rhost=     sudo[10564]: pam_krb5(sudo:auth): pam_sm_authenticate: exit (failure)     sudo[10564]: pam_unix(sudo:auth): authentication failure; logname=AD\Username uid=3000019 euid=0 tty=/dev/pts/0 ruser=AD\Username rhost=  user=AD\Username     sudo[10564]: pam_krb5(sudo:auth): pam_sm_authenticate: entry (silent)     sudo[10564]: pam_krb5(sudo:auth): (user AD\Username) error getting password: Authentication failure     sudo[10564]: pam_krb5(sudo:auth): authentication failure; logname=AD\Username uid=3000019 euid=0 tty=/dev/pts/0 ruser=AD\Username rhost=     sudo[10564]: pam_krb5(sudo:auth): pam_sm_authenticate: exit (failure)      I have winbind configured in nsswitch.conf and I presume it is this which decides the username should be "AD\Username" rather than just "Username". So firstly am I right in thinking it is up to the winbind library what the user's name appears to be? And secondly, how can I configure winbind so that if the user is in the default Kerberos realm (as defined by `/etc/krb5.conf`) then their username should not be prefixed with the short domain name for that realm?


title: How to do a remote login in linux?

text: I am rather new to linux and have a CentOS box to play with. I am quite comfortable with the command line, but one thing that bugs me is that unless, someone is logged in to the GUI and has vnc enabled, I can't access it from a remote location. Even then, I must use the GUI as the user that is logged in. What if I wanted to logout and login as a different user in GUI ? Basically what i'm asking is, is there a way to remotely "log in" to a linux gui as done with windows remote desktop as opposed to just desktop sharing via vnc?


title: What's the difference of the Userland vs the Kernel?

text: I am trying to understand exactly what is userland? everyone that I ask says: "Anything that is not kernel". but it is not tangible for me. When I am reading that kernel can run that driver on the userland or something like that; I can't quite imagine what will happen!. So I will appreciate if someone set me straight in this regard.


title: Static IP on BBB won't change with network/interfaces file

text: I'm using multiple BBB's (Rev C), communicating with them from my Mac (OSX 10.9.3) over USB using the HoRNDIS drivers. The BBB's are running Debian, and so I want to manually assign them all different static IP's. However, I can't get the IP to be anything but `192.168.7.2`. Changing the `/etc/network/interfaces` file to have an ip of `192.168.7.10` does nothing:               # This file describes the network interfaces available on your system     # and how to activate them. For more information, see interfaces(5).          # The loopback network interface     auto lo     iface lo inet loopback          # The primary network interface     #auto eth0     #iface eth0 inet dhcp     # Example to keep MAC address between reboots     #hwaddress ether DE:AD:BE:EF:CA:FE          auto eth0     iface eth0 inet static     address 192.168.2.2     netmask 255.255.255.0     network 192.168.2.0     broadcast 192.168.2.255     gateway 192.168.2.1          # WiFi Example     #auto wlan0     #iface wlan0 inet dhcp     #    wpa-ssid "essid"     #    wpa-psk  "password"          # Ethernet/RNDIS gadget (g_ether)     # ... or on host side, usbnet and random hwaddr     # Note on some boards, usb0 is automaticly setup with an init script     # in that case, to completely disable remove file [run_boot-scripts] from the boot partition     iface usb0 inet static         address 192.168.7.10         netmask 255.255.255.0         network 192.168.7.0         gateway 192.168.7.1      Indeed, there was a file in the boot partition that I also changed, with no result:               #!/bin/bash          # Update /etc/network/interfaces to add virtual Ethernet port     cat >>/etc/network/interfaces <<EOF          iface usb0 inet static       address 192.168.7.10       netmask 255.255.255.0       network 192.168.7.0       gateway 192.168.7.1     EOF          # Add terminal to virtual serial port     cat >/etc/init/gadget-serial.conf <<EOF     start on stopped rc RUNLEVEL=[2345]     stop on runlevel [!2345]          respawn     exec /sbin/getty 115200 ttyGS0     EOF          # Write script to start gadget driver     cat >/usr/sbin/g-multi-load.sh <<'EOF'     #!/bin/bash     if [ "`lsmod | grep g_multi`" != "" ]; then exit 0; fi     mac_addr=/proc/device-tree/ocp/ethernet@4a100000/slave@4a100300/mac-address     eeprom=/sys/bus/i2c/devices/0-0050/eeprom          DEV_ADDR=$(perl -e 'print join(":",unpack("(H2)*",<>))' ${mac_addr})     VERSION=$(perl -e '@x=unpack("A12A4",<>); print $x[1]' ${eeprom})     SERIAL_NUMBER=$(perl -e '@x=unpack("A16A12",<>); print $x[1]' ${eeprom})     ISBLACK=$(perl -e '@x=unpack("A20A4",<>); print $x[1]' ${eeprom})          BLACK=""     if [ "${ISBLACK}" = "BBBK" ] ; then         BLACK="Black"     fi     if [ "${ISBLACK}" = "BNLT" ] ; then         BLACK="Black"     fi          modprobe g_multi file=/dev/mmcblk0p1 cdrom=0 stall=0 removable=1 nofua=1 iSerialNumber=${SERIAL_NUMBER} iManufacturer=Circuitco iProduct=BeagleBone${BLACK} host_addr=${DEV_ADDR}          # Enable the network interface     sleep 1     ifup usb0     EOF     chmod +x /usr/sbin/g-multi-load.sh          # Add script to rc.local     perl -i -pe 's!^exit 0!/usr/sbin/g-multi-load.sh\nexit 0!' /etc/rc.local          # Install DHCP server     sudo apt-get -y update     sudo apt-get -y install isc-dhcp-server          # Configure DHCP server     cat >/etc/ltsp/dhcp.conf <<EOF     ddns-update-style none;     subnet 192.168.7.0 netmask 255.255.255.252 {       range 192.168.7.1 192.168.7.1;     }     EOF     perl -i -pe 's/INTERFACES=".*"/INTERFACES="usb0"/' /etc/default/isc-dhcp-server          # Start up services     /usr/sbin/g-multi-load.sh     service isc-dhcp-server start


title: Using a shell script as a virtual printer

text: I have a shell script that takes a PDF file as an argument and prints it with additional printer specific options. How can I add this script as a virtual printer that can be selected from the GUI? The shell script is a manual duplex script that takes a PDF file, prints even pages, gives a user prompt using zenity asking the user to flip the pages and then prints the odd pages. My current workflow is:   1. File -> Print -> Save to file -> tmp.pdf   2. `my_duplex_script tmp.pdf`   3. `rm tmp.pdf` Is there any way to make it as :   1. File -> Print -> my_script_as_virtual_printer Note: This is on Linux mint 13 cinnamon. I have tried `gnome-manual-duplex` but it doesn't work for me. * * * The GUI dialog from which I can print to a PDF file ![Standard GTK print dialog](http://i.stack.imgur.com/4TbBM.png) `my_duplex_script`               #!/bin/bash          lp_args=     while getopts o: opt     do         case "$opt" in             o)  lp_args="$lp_args -o $OPTARG" ;;             \?) echo >&2 Invalid argument; exit 1 ;;         esac     done     shift `expr $OPTIND - 1`          file=$1     page_count=$(pdfinfo "$file" | grep Pages | awk '{print $2}')     is_odd=`expr $page_count % 2`          if [ $is_odd -eq 1 ]     then         #outputting blank         echo | lp -s -t "$file"-blank     fi          #printing even reversed     lp -s -o page-set=even -o outputorder=reverse $lp_args -t "$file"-even "$file"          if zenity --question --text="Flip and reinsert the entire stack when printing has finished." --ok-label="Proceed" --cancel-label="Cancel"     then         #printing odd reversed         lp -s -o page-set=odd -o outputorder=reverse $lp_args -t "$file"-odd "$file"     else         echo >&2 User abort         exit 1     fi          exit 0


title: Manual tab completions in zsh

text: I would like `nm[TAB]` to expand to `node_modules` in zsh. Is this possible? How can it be done? Ideally, it wouldn't be triggered if there is another completion available, such as an already existing `nm` directory, and only trigger if there is a `node_modules` folder that exists, and complete if it is a part of a path, such as `cd nm/mo[TAB]` -> `cd node_modules/moment`.


title: Installation date of Ubuntu

text: How can I determine when Ubuntu was installed in my computer? There was a different question posted here, but none of them is helpful.


title: ssh-agent not getting set up (SSH_AUTH_SOCK, SSH_AGENT_PID env vars not set)

text: I set up a new user account for a friend on Kubuntu 12.04. When he uses `ssh` he gets this error: > Could not open a connection to your authentication agent We're running `ssh` in some bash scripts. After looking around at the wide variety of things that can lead to that error, I came across this solution:               $ eval `ssh-agent -s`     $ ssh-add ~/.ssh/some_id_rsa      Then he can run the `ssh` commands (and bash scripts) as expected. Before running those two commands, the env variables are not set in a terminal:               $ echo $SSH_AGENT_PID          $ echo $SSH_AUTH_SOCK          $       After running the commands, the env variables are set as expected. However, they do not stay set (e.g., in a different shell or after rebooting). I want to know how to set up his computer so he doesn't have to run those two commands to set the env variables. I do not need to run them on my computer (ever). So far I am not seeing what is different between our machines. I see this info in the man page, but it does not tell me how Ubuntu is normally setting up the agent automatically or what is happening on my friend's machine so that this is not working for him.                There are two main ways to get an agent set up: The first is that the      agent starts a new subcommand into which some environment variables are      exported, eg ssh-agent xterm &.  The second is that the agent prints the      needed shell commands (either sh(1) or csh(1) syntax can be generated)      which can be evalled in the calling shell, eg eval �‘ssh-agent -s�‘ for      Bourne-type shells such as sh(1) or ksh(1) and eval �‘ssh-agent -c�‘ for      csh(1) and derivatives.      After installing `acct` and rebooting, this is the output of `lastcomm`:               ssh-agent         F    newuser __         0.12 secs Wed Aug  7 11:02     ssh-agent         F    newuser __         0.00 secs Wed Aug  7 20:34     ssh-agent         F    newuser __         0.02 secs Wed Aug  7 20:02     ssh-agent         F    newuser __         0.01 secs Thu Aug  8 12:39     ssh-agent         F    newuser __         0.02 secs Thu Aug  8 07:45      From the man page: > F -- command executed after a fork but without a following exec I'm not sure if that is significant.


title: Auto-completion of words from the terminal buffer

text: In editors like `vim` and `emacs`, one can use hotkeys like `C-p` (vim) or `M-/` (emacs) to perform auto-completion on the current word using other words in the same buffer. Is it possible to achieve the same functionality within a shell? If I see some word in output from a previous command and I'd like to quickly auto-complete it when typing out another command. Just to be clear, an example:               $ ls     Desktop/  Mail/  music/  osx@  something_with_a_pretty_long_name          $ someth      From here, I'd like to be able to hit a hotkey and have it automatically complete what I'm typing to `something_with_a_pretty_long_name`. EDIT: Shoot. Using a filename was a poor example for what I'm after. Consider the following, second example:               $ cat /var/log/something.log     [19:30] Service started     [19:35] Something else happened          $ happ      Where I could auto-complete 'happ' to 'happened' merely because it appeared in my terminal buffer. I hope this clarifies what I'm after.


title: What happens in the Top half and Bottom Half processing of Interrupts?

text: I would like to know more about Top half and Bottom Half processing in the Context on Interrupts. Could someone explain me the exact things happening in both scenarios.


title: eth0 r8169 down on wake up from standby

text: On waking up after standby the network (eth0) remains down. The eth0 card is r8169. I have tried :   * `ifconfig eth0 up`   Doesn't work   * `ifconfig eth0 up; dhcpcd eht0`   Worked but how do I configure my static ip with this, my proxy is ip bound ## This works: > this commands gets the network up with the conventional network manager:   >  `modprobe -r r8169; modprobe r8169; service network-manager restart` **But is there any way to automate this or modify the acpi scripts so that no modprobe is required in the first place?** ## Config details: OS: Debian-squeeze (6.0) `ethtool eth0` output:               Supported ports: [ TP MII ]     Supported link modes:   10baseT/Half 10baseT/Full                              100baseT/Half 100baseT/Full      Supports auto-negotiation: Yes     Advertised link modes:  10baseT/Half 10baseT/Full                              100baseT/Half 100baseT/Full      Advertised pause frame use: No     Advertised auto-negotiation: Yes     Link partner advertised link modes:  10baseT/Half 10baseT/Full                                           100baseT/Half 100baseT/Full      Link partner advertised pause frame use: No     Link partner advertised auto-negotiation: Yes     Speed: 100Mb/s     Duplex: Full     Port: MII     PHYAD: 0     Transceiver: internal     Auto-negotiation: on     Supports Wake-on: pumbg     Wake-on: g     Current message level: 0x00000033 (51)     Link detected: yes      File `/etc/network/interfaces`               # This file describes the network interfaces available on your system     # and how to activate them. For more information, see interfaces(5).          # The loopback network interface     auto lo     iface lo inet loopback          # The primary network interface     allow-hotplug eth0     #NetworkManager#iface eth0 inet dhcp


title: ssh public keys instead of SASL for authenticated SMTP sending?

text: I'm currently using postfix and SASL on my personal server for authenticated SMTP. The server is purely for my personal use and my personal domains, so I'd much rather have something simpler based on ssh public keys. Does any such solution exist?


**Smartphone used as USB memory stick is correctly read on XP VirtualBox machine but Linux Mint show only root folders** The stick is recognized by Linux, but show first level folder only: Folders are shown 'empty'. When opened with VirtualBox XP machine, I can access everything. So, it does not seems an USB device/hardware problem? Linux Mint 13 (based on Ubuntu Precise), kernel 3.2.0-53-generic (i686) Smartphone is Samsung Note 2 in MTP mode. Listed as               gphoto2://[usb:001,006]/store_00010001      -and-     gphoto2://[usb:001,006]/store_00020002      Why 'gphoto2'? `gphoto2` is installed. Command line:               luc@luc-MS-7502> gphoto2://[usb:001,011]/store_00020002     bash: gphoto2://[usb:001,011]/store_00020002: Aucun fichier ou dossier de ce type      Alert message on connection:               'Impossible de monter GT-N7100'          Unable to mount GT-N7100     'Erreur lors de l'initialisation de l'appareil photo: -60: Impossible de verrouiller le périphérique'          Error when initializing the camera:  -60: Unable to lock the peripheral      syslog says Connect: > [80493.024031] usb 1-6: new high-speed USB device number 6 using ehci_hcd > Disconnect: [80765.488792] usb 1-6: USB disconnect, device number 6 lsusb: > Bus 001 Device 006: ID 04e8:6860 Samsung Electronics Co., Ltd GT-I9100 Phone > [Galaxy S II] ### == Added 15 Jan =======================================               fdisk      return only data for installed hard disks. _After installing (Step 1 to 3) suggested by slm ( Thanks for answer !) :_               luc@luc-MS-7502> go-mtpfs /media/MyAndroid       2014/01/15 22:45:06 compiled against libmtp 1.1.5      Device 0 (VID=04e8 and PID=6860) is a Samsung Galaxy models (MTP).       2014/01/15 22:45:06 found device Samsung: Galaxy models (MTP) (04e8:6860) @ bus 1, dev 3     :        2014/01/15 22:45:06 storage ID 65537: Phone       2014/01/15 22:45:06 storage ID 131074: Card       2014/01/15 22:45:06 backing data /tmp/go-mtpfs893583131       2014/01/15 22:45:06 starting FUSE unknown             (NOTE: NO PROMPT  ! )      and still showing only 'root' folders of both 'Phone' and 'Card'


title: Bash:source files without fullpath?

text: if I source the script file without pre-path definition, it does not work. What is happening below? I have got a go1 function in the file simply printing $PWD.               $ bash --version     GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin12)     Copyright (C) 2007 Free Software Foundation, Inc.     $ source functions.sh     $ go1     -bash: go1: command not found     $ source ./functions.sh     $ go1     Current dir is /Users/mert/temp     $


title: How does Linux load the 'initrd' image?

text: I've been trying to understand the booting process, but there's just one thing that is going over my head.. > As soon as the Linux kernel has been booted and the root file system (/) > mounted, programs can be run and further kernel modules can be integrated to > provide additional functions. To mount the root file system, certain > conditions must be met. The kernel needs the corresponding drivers to access > the device on which the root file system is located (especially SCSI > drivers). The kernel must also contain the code needed to read the file > system (ext2, reiserfs, romfs, etc.). It is also conceivable that the root > file system is already encrypted. In this case, a password is needed to > mount the file system. > > The initial ramdisk (also called initdisk or initrd) solves precisely the > problems described above. The Linux kernel provides an option of having a > small file system loaded to a RAM disk and running programs there before the > actual root file system is mounted. **The loading of initrd is handled by > the boot loader (GRUB, LILO, etc.). Boot loaders only need BIOS routines to > load data from the boot medium.** If the boot loader is able to load the > kernel, it can also load the initial ramdisk. Special drivers are not > required. If /boot is not a different partition, but is present in the / partition, then shouldn't the boot loader require the SCSI drivers, to access the 'initrd' image and the kernel image? If you can access the images directly, then why exactly do we need the SCSI drivers??


title: Should I end my text/script files with a newline?

text: > **Possible Duplicate:**   >  What's the point in adding a new line to the end of a file? What is considered better behaviour: to leave the last letter of the last line to be the last byte of a file, or to press `Enter` at the end to let there be a `lf`? Why?


title: removing the last line of a file not working?

text: I have this TXT file that is created by a bash script and at the end I want to remove the last line of that file that is an empty one.               head --lines=-1 r3.txt > r4.txt          sed '$d' r3.txt > r4.txt          cat r3.txt | head -n -1  > r4.txt      r4.txt continues to have the last empty line... I am on a linux CentOS 6.x server. Does this have anything to do with line endings (unix x windows)? Any clues?


title: Can I disable dead keys for a single application?

text: I am unable to properly use dead key characters ( ' " ^ ) on (k)ubuntu 11.10 and 12.04 in arduino (a processing based application, at least version 0022 and 1.0). Can I disable dead keys for specific application or application window, or does anybody know another work around? 'Dead keys' is the mechanism used to enter charactes like á ë ' ^, by first striking the accent-like key, then followed by a second key. The result is a combined character.


title: How to run mutt via ssh without going through an interactive shell

text: Mutt depends on curses according to this here, my discussion with Michael: > @hhh: ssh hhh@server.com mutt <--- what is wrong here? trying to run mutt > there...   >  @MichaelMrozek: mutt uses curses, which depends on a lot of terminal > manipulation; I imagine it doesn't like being run within ssh like that The manual has the entry:               ssh [user@]hostname --     [command]      How can I run `mutt` running locally from outside the server without needing to `ssh` to it and run `mutt` directly?


title: Limiting download speed based on other LAN traffic

text: I'm kind of new to Linux (but learning) so bare with me if I say something stupid :P. I'm currently running an Ubuntu fileserver which automates a whole bunch of downloading tasks. At present it is set to throttle downloads at certain times so I don't impact too much on casual browsing iPlayer etc during peak times. But this is not ideal. I was wondering if it is possible to limit overall system bandwidth usage based on sniffing packets from other systems on the LAN that are going to/from specific URLS (e.g. iplayer) If somebody could point me in the direction of the relevant tools, I'm happy to do the research myself. Just right now I wouldn't know where to start...


title: Git GUI integration in caja, Linux Mint default filemanager

text: What is the way to integrate git GUI in caja, default Linux Mint file manager ? Something what makes the interface equivalent to TortoiseGit. Didn't found any specific extension in repositories.


title: Is there a command to list files, exclude sub-directories and display size and date?

text: Before I begin please assume I have only basic knowledge in UNIX. Basic meaning I have only started reading about it since last week for a work related purpose. I have been experimenting with the `ls` command to provide lists of a particular directory containing video media. I needed to display the _filename_ , _filesize_ and the _date_ it was created. I achieved this by using the command:               ls -gohU      This was fine but the search also included the sub-directories within this directory. After searching I found another command which displays the files and excludes the folders:               find . -maxdepth 1 -not -type d      What I would like to know is if there is a command that can find all files within the directory excluding sub-directories and display their _filenames_ , _size_ and the _date_ they were created. P.S. I am also using Terminal - bash on Mac OS 10.6.8 if that helps.


title: Need to reset the Keyboard shortcuts defined

text: I bound some keys by mistake, and they don't work any more, such as HOME, END, UP, DOWN, LEFT, RIGHT. Is there a way to reset all the bound keys to their original state? I know this might be duplicate but till yet none of the answers i saw helped. Please help


title: Turning off subpixel antialiasing in Gnome 3 on Debian

text: I'm trying out the secondary monitor with portrait layout, and I want to disable subpixel font antialiasing. I have both turned it off to "Grayscale" in `gnome-tweak-tool` and created a symlink to `10-no-sub-pixel.conf`:                /etc/fonts/conf.d $ ll     total 8     lrwxrwxrwx 1 root root  34 Apr  9 10:37 10-no-sub-pixel.conf -> ../conf.avail/10-no-sub-pixel.conf     lrwxrwxrwx 1 root root  39 Apr  9 10:50 11-lcdfilter-default.conf -> ../conf.avail/11-lcdfilter-default.conf     lrwxrwxrwx 1 root root  39 Dec 11 22:51 20-fix-globaladvance.conf -> ../conf.avail/20-fix-globaladvance.conf     lrwxrwxrwx 1 root root  39 Dec 11 22:51 20-unhint-small-vera.conf -> ../conf.avail/20-unhint-small-vera.conf     lrwxrwxrwx 1 root root  36 Dec 11 22:51 30-metric-aliases.conf -> ../conf.avail/30-metric-aliases.conf     lrwxrwxrwx 1 root root  33 Dec 11 22:51 30-urw-aliases.conf -> ../conf.avail/30-urw-aliases.conf     lrwxrwxrwx 1 root root  30 Dec 11 22:51 40-nonlatin.conf -> ../conf.avail/40-nonlatin.conf     lrwxrwxrwx 1 root root  27 Dec 11 22:51 45-latin.conf -> ../conf.avail/45-latin.conf     lrwxrwxrwx 1 root root  31 Dec 11 22:51 49-sansserif.conf -> ../conf.avail/49-sansserif.conf     lrwxrwxrwx 1 root root  37 May 18  2011 50-enable-terminus.conf -> ../conf.avail/50-enable-terminus.conf     lrwxrwxrwx 1 root root  26 Dec 11 22:51 50-user.conf -> ../conf.avail/50-user.conf     lrwxrwxrwx 1 root root  27 Dec 11 22:51 51-local.conf -> ../conf.avail/51-local.conf     lrwxrwxrwx 1 root root  27 Dec 11 22:51 60-latin.conf -> ../conf.avail/60-latin.conf     lrwxrwxrwx 1 root root  38 Mar 28  2012 65-droid-sans-fonts.conf -> ../conf.avail/65-droid-sans-fonts.conf     lrwxrwxrwx 1 root root  35 Dec 11 22:51 65-fonts-persian.conf -> ../conf.avail/65-fonts-persian.conf     lrwxrwxrwx 1 root root  30 Dec 11 22:51 65-nonlatin.conf -> ../conf.avail/65-nonlatin.conf     lrwxrwxrwx 1 root root  29 Dec 11 22:51 69-unifont.conf -> ../conf.avail/69-unifont.conf     lrwxrwxrwx 1 root root  41 Jan  4 11:14 70-yes-bitmaps.conf -> /etc/fonts/conf.avail/70-yes-bitmaps.conf     lrwxrwxrwx 1 root root  31 Dec 11 22:51 80-delicious.conf -> ../conf.avail/80-delicious.conf     lrwxrwxrwx 1 root root  31 Dec 11 22:51 90-synthetic.conf -> ../conf.avail/90-synthetic.conf     -rw-r--r-- 1 root root 366 Sep 27  2011 99pdftoopvp.conf     -rw-r--r-- 1 root root 959 Jun 28  2011 README      But the fonts still get antialiased to RGB: ![Screenshot](http://i.stack.imgur.com/DU3Ji.png) Edit: Here's `xrdb -query` output:                ~ $ xrdb -query     *background:    #002b36     *color0:    #073642     *color1:    #dc322f     *color10:   #586e75     *color11:   #657b83     *color12:   #839496     *color13:   #268bd2     *color14:   #93a1a1     *color15:   #fdf6e3     *color2:    #b58900     *color3:    #cb4b16     *color4:    #2aa198     *color5:    #6c71c4     *color6:    #859900     *color7:    #eee8d5     *color8:    #002b36     *color9:    #d30102     *cursorColor:   #93a1a1     *customization: -color     *fadeColor: #002b36     *fading:    40     *foreground:    #657b83     *pointerColorBackground:    #586e75     *pointerColorForeground:    #93a1a1     Xft.antialias:  1     Xft.dpi:    96     Xft.hinting:    1     Xft.hintstyle:  hintmedium     Xft.rgba:   none


title: "Permission denied, try again" while transferring files with scp

text: I have two servers (A and B) and my local machine. I'm trying to transfer a file from server A to server B. From server A:               scp ./backup.tar user@server.b:/home/public/     Permission denied, please try again.     Permission denied, please try again.     Permission denied (publickey, password).     lost connection      From server B:               scp user@server.a:/home/public/backup.tar .     Permission denied, please try again.     Permission denied, please try again.     Permission denied (publickey, password).     lost connection      Same error message when I try from my local computer. What's going on? * * * This is what I get when I try to ssh from Server A to Server B with the debug flag:               debug1: Authentications that can continue: publickey,password     debug1: Next authentication method: publickey     debug1: Trying private key: /home/private/.ssh/identity     debug1: Trying private key: /home/private/.ssh/id_rsa     debug1: Trying private key: /home/private/.ssh/id_dsa     debug1: Next authentication method: password     debug1: read_passphrase: can't open /dev/tty: No such file or directory     debug1: Authentications that can continue: publickey,password     Permission denied, please try again.     debug1: read_passphrase: can't open /dev/tty: No such file or directory     debug1: Authentications that can continue: publickey,password     Permission denied, please try again.     debug1: read_passphrase: can't open /dev/tty: No such file or directory     debug1: Authentications that can continue: publickey,password     debug1: No more authentication methods to try.     Permission denied (publickey,password).      Does this mean it can't find my terminal? I should mention that server B is a subdomain of server A. My hosting provider however sees them as completely different entities and they are not hosted on the same LPAR. * * * **Conclusion** I've emailed my hosting provider and it seems that there is a small bug related to the version of ssh and the OS (freeBSD). Currently, my workaround is to (1) scp the file locally to my machine, then (2) scp the file locally to the second server. This is what `scp -3` is supposed to do, but that fails as well.


title: How do I find the relevant command for something in linux?

text: For example, say I'm trying to find the command that displays the routing table (like `route`) or to run a `traceroute`, but I don't actually know the commands that accomplish this. My understanding is that I should be able to use `man -k [word]`, but it never seems to work: if I do `man -k route` on Scientific Linux 6.1, I get no results, even though I would expect it to return anything that includes the word "route" in it! Unfortunately, when I search for the answer to this, it's confounded by people explaining the `find` command for a file search. Thank you!


title: Monitor keeps turning off after 10 Minutes

text: > **Possible Duplicate:**   >  Disable screen blanking on text console Hey I use gentoo as a server, so I usually don't even start X. But whats a bit annoying is that the monitor keeps turning off after 10 or 15 Minutes, especially if I emerge something and just wait for compiler to finish. How can I turn this off? I already searched google, but all answers I found were related to X or X-based terminals


title: Connect alauda driver to an mtd device

text: I have a USB card reader, an Olympus MAUSB-10. It provides direct flash access to SmartMedia or xD cards, using the Linux `alauda` driver. This is different from a typical card reader which just exposes it as a standard USB mass storage device. There's drivers in the Linux kernel that will do the FTL thing and expose this as a standard block device, but I want direct flash access. I was wondering if it's possible to use the various utilities of `mtd-tools` to read, write, and erase directly to it. So the device is recognized by `lsusb`, and drivers `aluada` and `nand_ecc` are loaded. But `cat /proc/mtd` isn't revealing another MTD device available, and I don't see any additional devices in `/dev`. How do I create a new mtd device and connect it to the alauda driver?


title: How do I set up dual quadro cards in RHEL 5.5

text: have a RHEL 5 workstation with 2 nvidia Quadro FX4500 cards, with one display attached to each card. After doing a clean install of RHEL 5.5, the second display doesnt work (it worked ok in RHEL 5.2). Neither separate X screens nor Xinerama are working. The kernel version is 2.6.18-194.el5 I've tried nvidia drivers 185.18.36 (the ones that i was using on 5.2) and the latest 260.19.36 and neither works. My xorg.conf is as follows:               # nvidia-settings: X configuration file generated by nvidia-settings     # nvidia-settings:  version 1.0  (buildmeister@builder58)  Fri Aug 14 18:34:43 PDT 2009          Section "ServerLayout"         Identifier     "Layout0"         Screen      0  "Screen0" 0 0         Screen      1  "Screen1" RightOf "Screen0"         InputDevice    "Keyboard0" "CoreKeyboard"         InputDevice    "Mouse0" "CorePointer"     EndSection          Section "Files"         FontPath        "unix/:7100"     EndSection          Section "ServerFlags"         Option         "Xinerama" "1"     EndSection          Section "InputDevice"         # generated from default         Identifier     "Mouse0"         Driver         "mouse"         Option         "Protocol" "auto"         Option         "Device" "/dev/input/mice"         Option         "Emulate3Buttons" "no"         Option         "ZAxisMapping" "4 5"     EndSection          Section "InputDevice"         # generated from data in "/etc/sysconfig/keyboard"         Identifier     "Keyboard0"         Driver         "kbd"         Option         "XkbLayout" "us"         Option         "XkbModel" "pc105"     EndSection          Section "Monitor"         # HorizSync source: edid, VertRefresh source: edid         Identifier     "Monitor0"         VendorName     "Unknown"         ModelName      "DELL 3007WFP"         HorizSync       49.3 - 98.5         VertRefresh     60.0         Option         "DPMS"     EndSection          Section "Monitor"         # HorizSync source: edid, VertRefresh source: edid         Identifier     "Monitor1"         VendorName     "Unknown"         ModelName      "DELL 3007WFP"         HorizSync       49.3 - 98.5         VertRefresh     60.0         Option         "DPMS"     EndSection          Section "Device"         Identifier     "Device0"         Driver         "nvidia"         VendorName     "NVIDIA Corporation"         BoardName      "Quadro FX 4500"         BusID          "PCI:10:0:0"     EndSection          Section "Device"         Identifier     "Device1"         Driver         "nvidia"         VendorName     "NVIDIA Corporation"         BoardName      "Quadro FX 4500"         BusID          "PCI:129:0:0"     EndSection          Section "Screen"         Identifier     "Screen0"         Device         "Device0"         Monitor        "Monitor0"         DefaultDepth    24         Option         "TwinView" "0"         Option         "metamodes" "nvidia-auto-select +0+0"         SubSection     "Display"             Depth       24         EndSubSection     EndSection          Section "Screen"         Identifier     "Screen1"         Device         "Device1"         Monitor        "Monitor1"         DefaultDepth    24         Option         "TwinView" "0"         Option         "metamodes" "nvidia-auto-select +0+0"         SubSection     "Display"             Depth       24         EndSubSection     EndSection      Xorg.0.log (edited) is as follows:               X Window System Version 7.1.1     Release Date: 12 May 2006     X Protocol Version 11, Revision 0, Release 7.1.1     Build Operating System: Linux 2.6.18-164.11.1.el5 x86_64 Red Hat, Inc.     Current Operating System: Linux blur.svsdsde 2.6.18-194.el5 #1 SMP Tue Mar 16 21:52:39 EDT 2010 x86_64     Build Date: 06 March 2010     Build ID: xorg-x11-server 1.1.1-48.76.el5          Before reporting problems, check http://wiki.x.org         to make sure that you have the latest version.     Module Loader present     Markers: (--) probed, (**) from config file, (==) default setting,         (++) from command line, (!!) notice, (II) informational,         (WW) warning, (EE) error, (NI) not implemented, (??) unknown.     (==) Log file: "/var/log/Xorg.0.log", Time: Fri Feb 18 09:52:08 2011     (==) Using config file: "/etc/X11/xorg.conf"     (==) ServerLayout "Layout0"     (**) |-->Screen "Screen0" (0)     (**) |   |-->Monitor "Monitor0"     (**) |   |-->Device "Device0"     (**) |-->Screen "Screen1" (1)     (**) |   |-->Monitor "Monitor1"     (**) |   |-->Device "Device1"     (**) |-->Input Device "Keyboard0"     (**) |-->Input Device "Mouse0"     (**) FontPath set to:         unix/:7100     (==) RgbPath set to "/usr/share/X11/rgb"     (==) ModulePath set to "/usr/lib64/xorg/modules"     (**) Option "Xinerama" "1"     (**) Xinerama: enabled     (==) Max clients allowed: 512, resource mask: 0xfffff     (II) Open ACPI successful (/var/run/acpid.socket)     (II) Module ABI versions:         X.Org ANSI C Emulation: 0.3         X.Org Video Driver: 1.0         X.Org XInput driver : 0.6         X.Org Server Extension : 0.3         X.Org Font Renderer : 0.5     (II) Loader running on linux     (II) LoadModule: "bitmap"     (II) Loading /usr/lib64/xorg/modules/fonts/libbitmap.so     (II) Module bitmap: vendor="X.Org Foundation"         compiled for 7.1.1, module version = 1.0.0         Module class: X.Org Font Renderer         ABI class: X.Org Font Renderer, version 0.5     (II) Loading font Bitmap     (II) LoadModule: "pcidata"     (II) Loading /usr/lib64/xorg/modules/libpcidata.so     (II) Module pcidata: vendor="X.Org Foundation"         compiled for 7.1.1, module version = 1.0.0         ABI class: X.Org Video Driver, version 1.0     (++) using VT number 7          (II) PCI: PCI scan (all values are in hex)     (II) PCI: 00:00:0: chip 10de,005e card 103c,1500 rev a3 class 05,80,00 hdr 00     (II) PCI: 00:01:0: chip 10de,0051 card 103c,1500 rev a3 class 06,01,00 hdr 80     (II) PCI: 00:01:1: chip 10de,0052 card 103c,1500 rev a2 class 0c,05,00 hdr 80     (II) PCI: 00:02:0: chip 10de,005a card 103c,1500 rev a2 class 0c,03,10 hdr 80     (II) PCI: 00:02:1: chip 10de,005b card 103c,1500 rev a3 class 0c,03,20 hdr 80     (II) PCI: 00:04:0: chip 10de,0059 card 103c,1500 rev a2 class 04,01,00 hdr 00     (II) PCI: 00:06:0: chip 10de,0053 card 103c,1500 rev f2 class 01,01,8a hdr 00     (II) PCI: 00:07:0: chip 10de,0054 card 103c,1500 rev f3 class 01,01,85 hdr 00     (II) PCI: 00:08:0: chip 10de,0055 card 103c,1500 rev f3 class 01,01,85 hdr 00     (II) PCI: 00:09:0: chip 10de,005c card 0000,0000 rev a2 class 06,04,01 hdr 01     (II) PCI: 00:0a:0: chip 10de,0057 card 103c,1500 rev a3 class 06,80,00 hdr 00     (II) PCI: 00:0e:0: chip 10de,005d card 0000,0000 rev a3 class 06,04,00 hdr 01     (II) PCI: 00:18:0: chip 1022,1100 card 0000,0000 rev 00 class 06,00,00 hdr 80     (II) PCI: 00:18:1: chip 1022,1101 card 0000,0000 rev 00 class 06,00,00 hdr 80     (II) PCI: 00:18:2: chip 1022,1102 card 0000,0000 rev 00 class 06,00,00 hdr 80     (II) PCI: 00:18:3: chip 1022,1103 card 0000,0000 rev 00 class 06,00,00 hdr 80     (II) PCI: 00:19:0: chip 1022,1100 card 0000,0000 rev 00 class 06,00,00 hdr 80     (II) PCI: 00:19:1: chip 1022,1101 card 0000,0000 rev 00 class 06,00,00 hdr 80     (II) PCI: 00:19:2: chip 1022,1102 card 0000,0000 rev 00 class 06,00,00 hdr 80     (II) PCI: 00:19:3: chip 1022,1103 card 0000,0000 rev 00 class 06,00,00 hdr 80     (II) PCI: 05:05:0: chip 104c,8023 card 103c,1500 rev 00 class 0c,00,10 hdr 00     (II) PCI: 0a:00:0: chip 10de,009d card 10de,02af rev a1 class 03,00,00 hdr 00     (II) PCI: End of PCI scan     (II) PCI-to-ISA bridge:     (II) Bus -1: bridge is at (0:1:0), (0,-1,-1), BCTRL: 0x0008 (VGA_EN is set)     (II) Subtractive PCI-to-PCI bridge:     (II) Bus 5: bridge is at (0:9:0), (0,5,5), BCTRL: 0x0206 (VGA_EN is cleared)     (II) Bus 5 non-prefetchable memory range:         [0] -1  0   0xf5000000 - 0xf50fffff (0x100000) MX[B]     (II) PCI-to-PCI bridge:     (II) Bus 10: bridge is at (0:14:0), (0,10,10), BCTRL: 0x000a (VGA_EN is set)     (II) Bus 10 I/O range:         [0] -1  0   0x00003000 - 0x00003fff (0x1000) IX[B]     (II) Bus 10 non-prefetchable memory range:         [0] -1  0   0xf3000000 - 0xf4ffffff (0x2000000) MX[B]     (II) Bus 10 prefetchable memory range:         [0] -1  0   0xc0000000 - 0xcfffffff (0x10000000) MX[B]     (II) Host-to-PCI bridge:     (II) Bus 0: bridge is at (0:24:0), (0,0,10), BCTRL: 0x0008 (VGA_EN is set)     (II) Bus 0 I/O range:         [0] -1  0   0x00000000 - 0x0000ffff (0x10000) IX[B]     (II) Bus 0 non-prefetchable memory range:         [0] -1  0   0x00000000 - 0xffffffff (0x100000000) MX[B]     (II) Bus 0 prefetchable memory range:         [0] -1  0   0x00000000 - 0xffffffff (0x100000000) MX[B]     (--) PCI:*(10:0:0) nVidia Corporation Quadro FX 4500 rev 161, Mem @ 0xf3000000/24, 0xc0000000/28, 0xf4000000/24, I/O @ 0x3000/7     (II) Addressable bus resource ranges are         [0] -1  0   0x00000000 - 0xffffffff (0x100000000) MX[B]         [1] -1  0   0x00000000 - 0x0000ffff (0x10000) IX[B]     (II) OS-reported resource ranges:         [0] -1  0   0x00100000 - 0x3fffffff (0x3ff00000) MX[B]E(B)         [1] -1  0   0x000f0000 - 0x000fffff (0x10000) MX[B]         [2] -1  0   0x000c0000 - 0x000effff (0x30000) MX[B]         [3] -1  0   0x00000000 - 0x0009ffff (0xa0000) MX[B]         [4] -1  0   0x0000ffff - 0x0000ffff (0x1) IX[B]         [5] -1  0   0x00000000 - 0x000000ff (0x100) IX[B]     (II) Active PCI resource ranges:         [0] -1  0   0xf5000000 - 0xf5003fff (0x4000) MX[B]         [1] -1  0   0xf5004000 - 0xf50047ff (0x800) MX[B]          [...snipped... post too long]              [28] -1 0   0x0000fb00 - 0x0000fbff (0x100) IX[B]         [29] -1 0   0x00003000 - 0x0000307f (0x80) IX[B](B)     (II) Active PCI resource ranges after removing overlaps:         [0] -1  0   0xf5000000 - 0xf5003fff (0x4000) MX[B]         [1] -1  0   0xf5004000 - 0xf50047ff (0x800) MX[B]          [...snipped... post too long]              [28] -1 0   0x0000fb00 - 0x0000fbff (0x100) IX[B]         [29] -1 0   0x00003000 - 0x0000307f (0x80) IX[B](B)     (II) OS-reported resource ranges after removing overlaps with PCI:         [0] -1  0   0x00100000 - 0x3fffffff (0x3ff00000) MX[B]E(B)         [1] -1  0   0x000f0000 - 0x000fffff (0x10000) MX[B]         [2] -1  0   0x000c0000 - 0x000effff (0x30000) MX[B]         [3] -1  0   0x00000000 - 0x0009ffff (0xa0000) MX[B]         [4] -1  0   0x0000ffff - 0x0000ffff (0x1) IX[B]         [5] -1  0   0x00000000 - 0x000000ff (0x100) IX[B]     (II) All system resource ranges:         [0] -1  0   0x00100000 - 0x3fffffff (0x3ff00000) MX[B]E(B)         [1] -1  0   0x000f0000 - 0x000fffff (0x10000) MX[B]          (...snipped...)              [31] -1 0   0x00004840 - 0x0000487f (0x40) IX[B]         [32] -1 0   0x00004800 - 0x0000483f (0x40) IX[B]         [33] -1 0   0x00004880 - 0x0000489f (0x20) IX[B]         [34] -1 0   0x0000fb00 - 0x0000fbff (0x100) IX[B]         [35] -1 0   0x00003000 - 0x0000307f (0x80) IX[B](B)     (II) LoadModule: "extmod"     (II) Loading /usr/lib64/xorg/modules/extensions/libextmod.so     (II) Module extmod: vendor="X.Org Foundation"         compiled for 7.1.1, module version = 1.0.0         Module class: X.Org Server Extension         ABI class: X.Org Server Extension, version 0.3     (II) Loading extension SHAPE     (II) Loading extension MIT-SUNDRY-NONSTANDARD     (II) Loading extension BIG-REQUESTS     (II) Loading extension SYNC     (II) Loading extension MIT-SCREEN-SAVER     (II) Loading extension XC-MISC     (II) Loading extension XFree86-VidModeExtension     (II) Loading extension XFree86-Misc     (II) Loading extension XFree86-DGA     (II) Loading extension DPMS     (II) Loading extension TOG-CUP     (II) Loading extension Extended-Visual-Information     (II) Loading extension XVideo     (II) Loading extension XVideo-MotionCompensation     (II) Loading extension X-Resource     (II) LoadModule: "dbe"     (II) Loading /usr/lib64/xorg/modules/extensions/libdbe.so     (II) Module dbe: vendor="X.Org Foundation"         compiled for 7.1.1, module version = 1.0.0         Module class: X.Org Server Extension         ABI class: X.Org Server Extension, version 0.3     (II) Loading extension DOUBLE-BUFFER     (II) LoadModule: "glx"     (II) Loading /usr/lib64/xorg/modules/extensions/libglx.so     (II) Module glx: vendor="NVIDIA Corporation"         compiled for 4.0.2, module version = 1.0.0         Module class: X.Org Server Extension     (II) NVIDIA GLX Module  185.18.36  Fri Aug 14 18:27:24 PDT 2009     (II) Loading extension GLX     (II) LoadModule: "freetype"     (II) Loading /usr/lib64/xorg/modules/fonts/libfreetype.so     (II) Module freetype: vendor="X.Org Foundation & the After X-TT Project"         compiled for 7.1.1, module version = 2.1.0         Module class: X.Org Font Renderer         ABI class: X.Org Font Renderer, version 0.5     (II) Loading font FreeType     (II) LoadModule: "type1"     (II) Loading /usr/lib64/xorg/modules/fonts/libtype1.so     (II) Module type1: vendor="X.Org Foundation"         compiled for 7.1.1, module version = 1.0.2         Module class: X.Org Font Renderer         ABI class: X.Org Font Renderer, version 0.5     (II) Loading font Type1     (II) LoadModule: "record"     (II) Loading /usr/lib64/xorg/modules/extensions/librecord.so     (II) Module record: vendor="X.Org Foundation"         compiled for 7.1.1, module version = 1.13.0         Module class: X.Org Server Extension         ABI class: X.Org Server Extension, version 0.3     (II) Loading extension RECORD     (II) LoadModule: "dri"     (II) Loading /usr/lib64/xorg/modules/extensions/libdri.so     (II) Module dri: vendor="X.Org Foundation"         compiled for 7.1.1, module version = 1.0.0         ABI class: X.Org Server Extension, version 0.3     (II) Loading sub module "drm"     (II) LoadModule: "drm"     (II) Loading /usr/lib64/xorg/modules/linux/libdrm.so     (II) Module drm: vendor="X.Org Foundation"         compiled for 7.1.1, module version = 1.0.0         ABI class: X.Org Server Extension, version 0.3     (II) Loading extension XFree86-DRI     (II) LoadModule: "nvidia"     (II) Loading /usr/lib64/xorg/modules/drivers/nvidia_drv.so     (II) Module nvidia: vendor="NVIDIA Corporation"         compiled for 4.0.2, module version = 1.0.0         Module class: X.Org Video Driver     (II) LoadModule: "kbd"     (II) Loading /usr/lib64/xorg/modules/input/kbd_drv.so     (II) Module kbd: vendor="X.Org Foundation"         compiled for 7.1.1, module version = 1.1.0         Module class: X.Org XInput Driver         ABI class: X.Org XInput driver, version 0.6     (II) LoadModule: "mouse"     (II) Loading /usr/lib64/xorg/modules/input/mouse_drv.so     (II) Module mouse: vendor="X.Org Foundation"         compiled for 7.1.1, module version = 1.1.1         Module class: X.Org XInput Driver         ABI class: X.Org XInput driver, version 0.6     (II) NVIDIA dlloader X Driver  185.18.36  Fri Aug 14 17:51:02 PDT 2009     (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs     (II) Primary Device is: PCI 0a:00:0     (--) Chipset NVIDIA GPU found     (II) Loading sub module "fb"     (II) LoadModule: "fb"     (II) Loading /usr/lib64/xorg/modules/libfb.so     (II) Module fb: vendor="X.Org Foundation"         compiled for 7.1.1, module version = 1.0.0         ABI class: X.Org ANSI C Emulation, version 0.3     (II) Loading sub module "wfb"     (II) LoadModule: "wfb"     (II) Loading /usr/lib64/xorg/modules/libwfb.so     (II) Module wfb: vendor="NVIDIA Corporation"         compiled for 7.1.99.2, module version = 1.0.0     (II) Loading sub module "ramdac"     (II) LoadModule: "ramdac"     (II) Loading /usr/lib64/xorg/modules/libramdac.so     (II) Module ramdac: vendor="X.Org Foundation"         compiled for 7.1.1, module version = 0.1.0         ABI class: X.Org Video Driver, version 1.0     (II) resource ranges after xf86ClaimFixedResources() call:         [0] -1  0   0x00100000 - 0x3fffffff (0x3ff00000) MX[B]E(B)         [1] -1  0   0x000f0000 - 0x000fffff (0x10000) MX[B]         [2] -1  0   0x000c0000 - 0x000effff (0x30000) MX[B]         [3] -1  0   0x00000000 - 0x0009ffff (0xa0000) MX[B]         [4] -1  0   0xf5000000 - 0xf5003fff (0x4000) MX[B]         [5] -1  0   0xf5004000 - 0xf50047ff (0x800) MX[B]         [6] -1  0   0xf5104000 - 0xf5104fff (0x1000) MX[B]         [7] -1  0   0xf5103000 - 0xf5103fff (0x1000) MX[B]         [8] -1  0   0xf5102000 - 0xf5102fff (0x1000) MX[B]         [9] -1  0   0xf5101000 - 0xf5101fff (0x1000) MX[B]         [10] -1 0   0xfebf0000 - 0xfebf00ff (0x100) MX[B]         [11] -1 0   0xf5100000 - 0xf5100fff (0x1000) MX[B]         [12] -1 0   0xf4000000 - 0xf4ffffff (0x1000000) MX[B](B)         [13] -1 0   0xc0000000 - 0xcfffffff (0x10000000) MX[B](B)         [14] -1 0   0xf3000000 - 0xf3ffffff (0x1000000) MX[B](B)         [15] -1 0   0x0000ffff - 0x0000ffff (0x1) IX[B]         [16] -1 0   0x00000000 - 0x000000ff (0x100) IX[B]         [17] -1 0   0x000048f0 - 0x000048f7 (0x8) IX[B]         [18] -1 0   0x000048c0 - 0x000048cf (0x10) IX[B]         [19] -1 0   0x00004c04 - 0x00004c07 (0x4) IX[B]         [20] -1 0   0x000048e8 - 0x000048ef (0x8) IX[B]         [21] -1 0   0x00004c00 - 0x00004c03 (0x4) IX[B]         [22] -1 0   0x000048e0 - 0x000048e7 (0x8) IX[B]         [23] -1 0   0x000048b0 - 0x000048bf (0x10) IX[B]         [24] -1 0   0x000048fc - 0x000048ff (0x4) IX[B]         [25] -1 0   0x000048d8 - 0x000048df (0x8) IX[B]         [26] -1 0   0x000048f8 - 0x000048fb (0x4) IX[B]         [27] -1 0   0x000048d0 - 0x000048d7 (0x8) IX[B]         [28] -1 0   0x000048a0 - 0x000048af (0x10) IX[B]         [29] -1 0   0x00004400 - 0x000044ff (0x100) IX[B]         [30] -1 0   0x00004000 - 0x000040ff (0x100) IX[B]         [31] -1 0   0x00004840 - 0x0000487f (0x40) IX[B]         [32] -1 0   0x00004800 - 0x0000483f (0x40) IX[B]         [33] -1 0   0x00004880 - 0x0000489f (0x20) IX[B]         [34] -1 0   0x0000fb00 - 0x0000fbff (0x100) IX[B]         [35] -1 0   0x00003000 - 0x0000307f (0x80) IX[B](B)     (II) resource ranges after probing:         [0] -1  0   0x00100000 - 0x3fffffff (0x3ff00000) MX[B]E(B)         [1] -1  0   0x000f0000 - 0x000fffff (0x10000) MX[B]         [2] -1  0   0x000c0000 - 0x000effff (0x30000) MX[B]         [3] -1  0   0x00000000 - 0x0009ffff (0xa0000) MX[B]         [4] -1  0   0xf5000000 - 0xf5003fff (0x4000) MX[B]         [5] -1  0   0xf5004000 - 0xf50047ff (0x800) MX[B]         [6] -1  0   0xf5104000 - 0xf5104fff (0x1000) MX[B]         [7] -1  0   0xf5103000 - 0xf5103fff (0x1000) MX[B]         [8] -1  0   0xf5102000 - 0xf5102fff (0x1000) MX[B]         [9] -1  0   0xf5101000 - 0xf5101fff (0x1000) MX[B]         [10] -1 0   0xfebf0000 - 0xfebf00ff (0x100) MX[B]         [11] -1 0   0xf5100000 - 0xf5100fff (0x1000) MX[B]         [12] -1 0   0xf4000000 - 0xf4ffffff (0x1000000) MX[B](B)         [13] -1 0   0xc0000000 - 0xcfffffff (0x10000000) MX[B](B)         [14] -1 0   0xf3000000 - 0xf3ffffff (0x1000000) MX[B](B)         [15] 0  0   0x000a0000 - 0x000affff (0x10000) MS[B]         [16] 0  0   0x000b0000 - 0x000b7fff (0x8000) MS[B]         [17] 0  0   0x000b8000 - 0x000bffff (0x8000) MS[B]         [18] -1 0   0x0000ffff - 0x0000ffff (0x1) IX[B]         [19] -1 0   0x00000000 - 0x000000ff (0x100) IX[B]         [20] -1 0   0x000048f0 - 0x000048f7 (0x8) IX[B]         [21] -1 0   0x000048c0 - 0x000048cf (0x10) IX[B]         [22] -1 0   0x00004c04 - 0x00004c07 (0x4) IX[B]         [23] -1 0   0x000048e8 - 0x000048ef (0x8) IX[B]         [24] -1 0   0x00004c00 - 0x00004c03 (0x4) IX[B]         [25] -1 0   0x000048e0 - 0x000048e7 (0x8) IX[B]         [26] -1 0   0x000048b0 - 0x000048bf (0x10) IX[B]         [27] -1 0   0x000048fc - 0x000048ff (0x4) IX[B]         [28] -1 0   0x000048d8 - 0x000048df (0x8) IX[B]         [29] -1 0   0x000048f8 - 0x000048fb (0x4) IX[B]         [30] -1 0   0x000048d0 - 0x000048d7 (0x8) IX[B]         [31] -1 0   0x000048a0 - 0x000048af (0x10) IX[B]         [32] -1 0   0x00004400 - 0x000044ff (0x100) IX[B]         [33] -1 0   0x00004000 - 0x000040ff (0x100) IX[B]         [34] -1 0   0x00004840 - 0x0000487f (0x40) IX[B]         [35] -1 0   0x00004800 - 0x0000483f (0x40) IX[B]         [36] -1 0   0x00004880 - 0x0000489f (0x20) IX[B]         [37] -1 0   0x0000fb00 - 0x0000fbff (0x100) IX[B]         [38] -1 0   0x00003000 - 0x0000307f (0x80) IX[B](B)         [39] 0  0   0x000003b0 - 0x000003bb (0xc) IS[B]         [40] 0  0   0x000003c0 - 0x000003df (0x20) IS[B]     (II) Setting vga for screen 0.     (**) NVIDIA(0): Depth 24, (--) framebuffer bpp 32     (==) NVIDIA(0): RGB weight 888     (==) NVIDIA(0): Default visual is TrueColor     (==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)     (**) NVIDIA(0): Option "TwinView" "0"     (**) NVIDIA(0): Option "MetaModes" "nvidia-auto-select +0+0"     (**) NVIDIA(0): Enabling RENDER acceleration     (II) NVIDIA(0): Support for GLX with the Damage and Composite X extensions is     (II) NVIDIA(0):     enabled.     (II) NVIDIA(0): NVIDIA GPU Quadro FX 4500 (G70GL) at PCI:10:0:0 (GPU-0)     (--) NVIDIA(0): Memory: 524288 kBytes     (--) NVIDIA(0): VideoBIOS: 05.70.02.41.01     (II) NVIDIA(0): Detected PCI Express Link width: 16X     (--) NVIDIA(0): Interlaced video modes are supported on this GPU     (--) NVIDIA(0): Connected display device(s) on Quadro FX 4500 at PCI:10:0:0:     (--) NVIDIA(0):     DELL 3007WFP (DFP-0)     (--) NVIDIA(0): DELL 3007WFP (DFP-0): 310.0 MHz maximum pixel clock     (--) NVIDIA(0): DELL 3007WFP (DFP-0): Internal Dual Link TMDS     (II) NVIDIA(0): Assigned Display Device: DFP-0     (II) NVIDIA(0): Validated modes:     (II) NVIDIA(0):     "nvidia-auto-select+0+0"     (II) NVIDIA(0): Virtual screen size determined to be 2560 x 1600     (--) NVIDIA(0): DPI set to (101, 101); computed from "UseEdidDpi" X config     (--) NVIDIA(0):     option     (WW) NVIDIA(0): UBB is incompatible with the Composite extension.  Disabling     (WW) NVIDIA(0):     UBB.     (==) NVIDIA(0): Disabling 32-bit ARGB GLX visuals.     (--) Depth 24 pixmap format is 32 bpp     (II) do I need RAC?  No, I don't.     (II) resource ranges after preInit:         [0] -1  0   0x00100000 - 0x3fffffff (0x3ff00000) MX[B]E(B)         [1] -1  0   0x000f0000 - 0x000fffff (0x10000) MX[B]         [2] -1  0   0x000c0000 - 0x000effff (0x30000) MX[B]         [3] -1  0   0x00000000 - 0x0009ffff (0xa0000) MX[B]         [4] -1  0   0xf5000000 - 0xf5003fff (0x4000) MX[B]         [5] -1  0   0xf5004000 - 0xf50047ff (0x800) MX[B]         [6] -1  0   0xf5104000 - 0xf5104fff (0x1000) MX[B]         [7] -1  0   0xf5103000 - 0xf5103fff (0x1000) MX[B]         [8] -1  0   0xf5102000 - 0xf5102fff (0x1000) MX[B]         [9] -1  0   0xf5101000 - 0xf5101fff (0x1000) MX[B]         [10] -1 0   0xfebf0000 - 0xfebf00ff (0x100) MX[B]         [11] -1 0   0xf5100000 - 0xf5100fff (0x1000) MX[B]         [12] -1 0   0xf4000000 - 0xf4ffffff (0x1000000) MX[B](B)         [13] -1 0   0xc0000000 - 0xcfffffff (0x10000000) MX[B](B)         [14] -1 0   0xf3000000 - 0xf3ffffff (0x1000000) MX[B](B)         [15] 0  0   0x000a0000 - 0x000affff (0x10000) MS[B]         [16] 0  0   0x000b0000 - 0x000b7fff (0x8000) MS[B]         [17] 0  0   0x000b8000 - 0x000bffff (0x8000) MS[B]         [18] -1 0   0x0000ffff - 0x0000ffff (0x1) IX[B]         [19] -1 0   0x00000000 - 0x000000ff (0x100) IX[B]         [20] -1 0   0x000048f0 - 0x000048f7 (0x8) IX[B]         [21] -1 0   0x000048c0 - 0x000048cf (0x10) IX[B]         [22] -1 0   0x00004c04 - 0x00004c07 (0x4) IX[B]         [23] -1 0   0x000048e8 - 0x000048ef (0x8) IX[B]         [24] -1 0   0x00004c00 - 0x00004c03 (0x4) IX[B]         [25] -1 0   0x000048e0 - 0x000048e7 (0x8) IX[B]         [26] -1 0   0x000048b0 - 0x000048bf (0x10) IX[B]         [27] -1 0   0x000048fc - 0x000048ff (0x4) IX[B]         [28] -1 0   0x000048d8 - 0x000048df (0x8) IX[B]         [29] -1 0   0x000048f8 - 0x000048fb (0x4) IX[B]         [30] -1 0   0x000048d0 - 0x000048d7 (0x8) IX[B]         [31] -1 0   0x000048a0 - 0x000048af (0x10) IX[B]         [32] -1 0   0x00004400 - 0x000044ff (0x100) IX[B]         [33] -1 0   0x00004000 - 0x000040ff (0x100) IX[B]         [34] -1 0   0x00004840 - 0x0000487f (0x40) IX[B]         [35] -1 0   0x00004800 - 0x0000483f (0x40) IX[B]         [36] -1 0   0x00004880 - 0x0000489f (0x20) IX[B]         [37] -1 0   0x0000fb00 - 0x0000fbff (0x100) IX[B]         [38] -1 0   0x00003000 - 0x0000307f (0x80) IX[B](B)         [39] 0  0   0x000003b0 - 0x000003bb (0xc) IS[B]         [40] 0  0   0x000003c0 - 0x000003df (0x20) IS[B]     (II) NVIDIA(GPU-1): NVIDIA GPU Quadro FX 4500 (G70GL) at PCI:129:0:0 (GPU-1)     (--) NVIDIA(GPU-1): Memory: 524288 kBytes     (--) NVIDIA(GPU-1): VideoBIOS: 05.70.02.41.01     (II) NVIDIA(GPU-1): Detected PCI Express Link width: 16X     (--) NVIDIA(GPU-1): Interlaced video modes are supported on this GPU     (--) NVIDIA(GPU-1): Connected display device(s) on Quadro FX 4500 at PCI:129:0:0:     (--) NVIDIA(GPU-1):     DELL 3007WFP (DFP-0)     (--) NVIDIA(GPU-1): DELL 3007WFP (DFP-0): 310.0 MHz maximum pixel clock     (--) NVIDIA(GPU-1): DELL 3007WFP (DFP-0): Internal Dual Link TMDS     (II) NVIDIA(0): Initialized GPU GART.     (II) NVIDIA(0): Setting mode "nvidia-auto-select+0+0"     (II) Loading extension NV-GLX     (II) NVIDIA(0): NVIDIA 3D Acceleration Architecture Initialized     (==) NVIDIA(0): Disabling shared memory pixmaps     (II) NVIDIA(0): Using the NVIDIA 2D acceleration architecture     (==) NVIDIA(0): Backing store disabled     (==) NVIDIA(0): Silken mouse enabled     (**) Option "dpms"     (**) NVIDIA(0): DPMS enabled     (II) Loading extension NV-CONTROL     (==) RandR enabled     (II) Setting vga for screen 0.     (II) Initializing built-in extension MIT-SHM     (II) Initializing built-in extension XInputExtension     (II) Initializing built-in extension XTEST     (II) Initializing built-in extension XKEYBOARD     (II) Initializing built-in extension XC-APPGROUP     (II) Initializing built-in extension SECURITY     (II) Initializing built-in extension XINERAMA     (II) Initializing built-in extension XFIXES     (II) Initializing built-in extension XFree86-Bigfont     (II) Initializing built-in extension RENDER     (II) Initializing built-in extension RANDR     (II) Initializing built-in extension COMPOSITE     (II) Initializing built-in extension DAMAGE     (II) Initializing built-in extension XEVIE     (II) Initializing extension GLX     (WW) Disabling Composite since Xinerama is enabled     (**) Option "CoreKeyboard"     (**) Keyboard0: Core Keyboard     (**) Option "Protocol" "standard"     (**) Keyboard0: Protocol: standard     (**) Option "AutoRepeat" "500 30"     (**) Option "XkbRules" "xorg"     (**) Keyboard0: XkbRules: "xorg"     (**) Option "XkbModel" "pc105"     (**) Keyboard0: XkbModel: "pc105"     (**) Option "XkbLayout" "us"     (**) Keyboard0: XkbLayout: "us"     (**) Option "CustomKeycodes" "off"     (**) Keyboard0: CustomKeycodes disabled     (**) Option "Protocol" "auto"     (**) Mouse0: Device: "/dev/input/mice"     (**) Mouse0: Protocol: "auto"     (**) Option "CorePointer"     (**) Mouse0: Core Pointer     (**) Option "Device" "/dev/input/mice"     (**) Option "Emulate3Buttons" "no"     (**) Option "ZAxisMapping" "4 5"     (**) Mouse0: ZAxisMapping: buttons 4 and 5     (**) Mouse0: Buttons: 9     (II) XINPUT: Adding extended input device "Mouse0" (type: MOUSE)     (II) XINPUT: Adding extended input device "Keyboard0" (type: KEYBOARD)     (--) Mouse0: PnP-detected protocol: "ExplorerPS/2"     (II) Mouse0: ps2EnableDataReporting: succeeded     (II) Open ACPI successful (/var/run/acpid.socket)     (II) NVIDIA(0): Setting mode "nvidia-auto-select+0+0"     (II) Mouse0: ps2EnableDataReporting: succeeded      (the snipped part can be changed if necessary)


title: How do I pipe colored diff output to less?

text: I've been using git diff, which produces colored output. However, I now find I need to use ordinary diff for something, and it's producing a lot of output that is hard to read because of the lack of colors. How do I make diff produce a readable, colored output? Ideally while piping it to less, for easy review of large files.


title: How to make `cd dir/filename` take me to dir/?

text: I would find it very convenient to be able to use `cd` with a **file** argument. `cd myDirectory/anyname.anyExtension` would be equivalent to `cd myDirectory/` What would be the best alias or function to achieve this behavior ? **EDIT** : Sorry I didn't mention it in the 1st place: I use `zsh`


title: Why does this shell snippet to check if hosts are up using netcat stop prematurely?

text: **Q:** Why does the second iteration exits after 10.175.192.16? Can someone explain that? Or I just found a "while/netcat" bug? a.txt's content:               $ cat a.txt      10.175.192.14     10.175.192.16     10.175.192.17     $      First iteration, this is ok, just outputs the file content:               $ while read oneline; do echo $oneline; done < a.txt      10.175.192.14     10.175.192.16     10.175.192.17     $      Second iteration, this is bad, it exists when coming to 10.175.192.16:               $ while read oneline; do nc -w 3 "$oneline" 22 >& /dev/null; echo $oneline; done < a.txt      10.175.192.14     10.175.192.16     $      Exit codes:               $ nc -w 3 "10.175.192.14" 22 >& /dev/null; echo $?     1     $ nc -w 3 "10.175.192.16" 22 >& /dev/null; echo $?     0      So there is no SSH server behind 10.175.192.14. But there is one behind 10.175.192.16. But the "while" iteration shouldn't exit before going through all the lines, no? Why does it miss 10.175.192.17? What am I missing here?      My main purpose is that I'm having a file (a.txt) that contains IP addresses. I need to sort these IP addresses in two files:      A) The ones that are reachable (ssh is prompting, so server is available)   B) The ones that are not reachable (timeout after 3 seconds, because there aren't anything listening on port 22)      "reachable" means that are there anything listening on port 22 behind the IP.


title: How to get a list of installed external kernel modules?

text: From the documentation of Linux kernel 3.2 (Documentation/kbuild/modules.txt)               === 5. Module Installation          Modules which are included in the kernel are installed in the     directory:              /lib/modules/$(KERNELRELEASE)/kernel/          And external modules are installed in:              /lib/modules/$(KERNELRELEASE)/extra/      This implies that if I look into `/lib/modules/$(KERNELRELEASE)/extra/` I can find all installed external kernel modules. However, I find that the official Nvidia display driver installs `nvidia.ko` into `/lib/modules/$(KERNELRELEASE)/kernel/drivers/video/`. This contradicts the above rule and suggests that the path is not a reliable indicator of included/external modules. How to get a list of external kernel modules installed? If the distro matters, I'd like to know the answer for RHEL 6 and Ubuntu 10.04.


title: compressed and uncompressed kernel on an embedded device

text: I have been using several different embedded boards that store kernel, init files, filesystem, etc. on partitions of a (micro)SD card. I notice in the example usage or instructions that compressed image (`zImage`) is loaded to the corresponding partition of the SD card (let's say sda2). I wonder if it would be fine to load uncompressed image file (Image) to the `sda2`. If it is a fine case, would the board boot some seconds faster than the one that has zImage or the difference would be insignificant? And, is there any specific reason to use zImage apart from saving storage space?


title: Recording a webcam using ffmpeg

text: I'm struggling with ffmpeg. My webcam can do 720p at 30fps, but only when using the MJPEG codec:               ~> v4l2-ctl --list-formats-ext     ioctl: VIDIOC_ENUM_FMT             Index       : 0             Type        : Video Capture             Pixel Format: 'YUYV'             Name        : YUV 4:2:2 (YUYV)               -- cut --                           Size: Discrete 1280x720                             Interval: Discrete 0.133 s (7.500 fps)                             Interval: Discrete 0.200 s (5.000 fps)     -- cut --                  Index       : 1             Type        : Video Capture             Pixel Format: 'MJPG' (compressed)             Name        : MJPEG               -- cut --                      Size: Discrete 1280x720                             Interval: Discrete 0.033 s (30.000 fps)                             Interval: Discrete 0.040 s (25.000 fps)                             Interval: Discrete 0.050 s (20.000 fps)                             Interval: Discrete 0.067 s (15.000 fps)                             Interval: Discrete 0.100 s (10.000 fps)                             Interval: Discrete 0.200 s (5.000 fps)          -- cut --      I can't figure out how to tell ffmpeg to read the MJPEG compressed format. It is trying to read the raw variant, which ends up with horrible quality.


title: How to use one nic for storage traffic & other for network traffic in Linux(Slackware)?

text: **Problem** I have a Linux machine (Slackware) with two network interface cards and i want to use one interface for network traffic and other for storage traffic . As this is Slackware i dont know this this could be the solution or not but i am trying this : **ip route add IP1 dev eth0** , **ip route add IP2 dev eth1** For more reference please take a look at it![enter image description here](http://i.stack.imgur.com/145Qx.png)


title: Does changing of the swappiness need a reboot?

text: If I configure the swappiness value to another, from ex.: 60 to 0, then I always need to reboot the machine to the changes to take effect? Even when modifying with:               sysctl -w vm.swappiness=0