Linux: clnt_create: RPC: Program not registered

NFS mounts recently automatically got un-mounted. When I checked, the NFS service status it was shown to be running.               [root@hsluasrepo]# service nfs status     rpc.svcgssd is stopped     rpc.mountd (pid 4083) is running...     nfsd (pid 4148 4147 4146 4145 4144 4143 4142 4141) is running...     rpc.rquotad (pid 4079) is running...          [root@hsluasrepo]# service rpcbind status     rpcbind (pid  4203) is running...          [root@hsluasrepo common]# rpcinfo -p 10.80.3.154        program vers proto   port  service         100000    4   tcp    111  portmapper         100000    3   tcp    111  portmapper         100000    2   tcp    111  portmapper         100000    4   udp    111  portmapper         100000    3   udp    111  portmapper         100000    2   udp    111  portmapper      But `showmount` output was showing an error.               [root@hsluasrepo ]# showmount -e 10.80.3.154     clnt_create: RPC: Program not registered      After restarting the NFS service, `showmount` output displayed the NFS server's export list. Can anyone tell me the root cause of this issue and How to avoid this problem in future?


biggest possible number for sort -n

How to determine the "biggest number" so that sort -n will always put it at the end? I'm thinking of something along `Inf` in some languages but I'm not sure if anything like this exists for sort. * * * The background is that I'm sorting list of potentially non-existent paths by age so that   * existent go first, from newest to oldest,   * non-existent go last. I'm using decoration approach and trying to put penalty on those unborns:               INFINITY=99999999999999   # ...close enough, right?          age_of() {         if [ -e $1 ];         then             local ctime=$(stat -c %Z "$1" 2>/dev/null)             local now=$(date +%s)             echo $(($now - $ctime))         else             echo $INFINITY         fi     }          cat - \       | while read path;         do             echo "$(age_of $path) $path"         done \           | sort -n \           | cut -d\  -f 2-      but obviously the comment is pretty naive; it's just a matter of time when even 99999999999999 will _not_ be close enough. ;) So is there a better value for INFINITY?


Fedora's command-not-found doesn't work

I've recently installed Fedora 19. Packagekit-command-not-found is installed. But its own examples don't work. When I enter `gedti` the output is:               bash: gedti: command not found... Similar command is: 'gedit'      And it works correctly but when I enter powertop, the output is:               bash: powertop: command not found...      With no suggestion about the package. Why? Should I edit some configuration files or update some cache or ... ?


Recovering overwritten LVM metadata

Yesterday I was trying using the Debian install in rescue mode in order to fix my Grub (The menu-item for Debian was suddenly gone). Now I wasn't able to fix it and didn't have a lot of time, so I thought I'd just reinstall Debian (I know, windows style :P). Problem was that I had installed Debian using full disk encryption, thus within a LVM partition. For some reason the installer didn't recognize the volume groups, though I could mount them in rescue mode. I tried to set "use as lvm" and then select option "use current layout", but no volume groups were present anymore. Going back to rescue mode, executing a shell, I couldn't mount them anymore, as if they were gone. So somewhere along the way the metadata for the volume groups must have been overwritten. I did some googling, but hardly found anything on the specific subject of overwrittten metadata. I've tried running testdisk, but it seems that's only for recovering partitions, not volume groups. Last I could find was the output of pvck:               root@ubuntu:/home/ubuntu# pvck -d -v /dev/sda5         Scanning /dev/sda5       Found label on /dev/sda5, sector 1, type=LVM2 001       Found text metadata area: offset=4096, size=192512         Found LVM2 metadata record at offset=194560, size=2048, offset2=0 size2=0         Found LVM2 metadata record at offset=128512, size=66048, offset2=0 size2=0         Found LVM2 metadata record at offset=116224, size=12288, offset2=0 size2=0         Found LVM2 metadata record at offset=69120, size=47104, offset2=0 size2=0         Found LVM2 metadata record at offset=68096, size=1024, offset2=0 size2=0         Found LVM2 metadata record at offset=65024, size=3072, offset2=0 size2=0         Found LVM2 metadata record at offset=53248, size=11776, offset2=0 size2=0         Found LVM2 metadata record at offset=52736, size=512, offset2=0 size2=0         Found LVM2 metadata record at offset=51712, size=1024, offset2=0 size2=0      Now that does look like it found something right? But unfortunately I don't know enough about LVM's, so I have no idea how to use this information. Anyone who is able to guide me further? Extra information: output of pvscan:               root@ubuntu:/home/ubuntu# pvscan       PV /dev/sda5                      lvm2 [465.52 GiB]       Total: 1 [465.52 GiB] / in use: 0 [0   ] / in no VG: 1 [465.52 GiB]      I am testing on live Ubuntu 10.04 LTS 32-bit live-cd and I was trying to reinstall Debian Squeeze 64-bit. I am using a Acer Aspire laptop with intel i7 quad-core processor, 2x 1TB internal hard drives, ati Radeon HD 5600 Series videocard. (which is probably more information than needed :P).


How to convert XY to [http://xy.com XY]?

Just for editing Wiki's.. So i have this input [from a larget text]:               TEXT TEXT BLA-BLA RANDOMSTRINGS BLA-BLA     TEXT TEXT BLA-BLA RANDOMSTRINGS BLA-BLA     TEXT TEXT XY RANDOMSTRINGS BLA-BLA     TEXT TEXT BLA-BLA RANDOMSTRINGS BLA-BLA     TEXT TEXT BLA-BLA RANDOMSTRINGS BLA-BLA      and i want this output:               TEXT TEXT BLA-BLA RANDOMSTRINGS BLA-BLA     TEXT TEXT BLA-BLA RANDOMSTRINGS BLA-BLA     TEXT TEXT [http://xy.com XY] RANDOMSTRINGS BLA-BLA     TEXT TEXT BLA-BLA RANDOMSTRINGS BLA-BLA     TEXT TEXT BLA-BLA RANDOMSTRINGS BLA-BLA      "http://xy.com" could be e.g.: "https://xy.com" or "http://www.xy.com" or "https://www.xy.com", etc.


How to resize intel vga card memory?

I have a notebook with two VGA cards: Intel and AMD (Radeon), I've disabled the second, and now I want to control my card memory, here is the `lspci -v` VGA output:               00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09) (prog-if 00 [VGA controller])         Subsystem: Dell Device 0598         Flags: bus master, fast devsel, latency 0, IRQ 44         Memory at c1000000 (64-bit, non-prefetchable) [size=4M]         Memory at b0000000 (64-bit, prefetchable) [size=256M]         I/O ports at 4000 [size=64]         Expansion ROM at <unassigned> [disabled]         Capabilities: <access denied>         Kernel driver in use: i915      I use chakra Linux.


How do I add custom GPG key to Ubuntu/Debian installer?

I'm trying to setup custom Ubuntu install CD using instructions on http://beezari.livejournal.com/191717.html I've added my GPG key to ubuntu- keyring and signed Release file with it (resulting in Release.gpg signature file) But during installation I get               gpgv: Can't check signature public key not found      It looks like to install new ubuntu-keyring with my key I need to have it already installed (in debian-installer maybe?). I can get around with `debian- installer/allow_unauthenticated=false` but it seems to be quite bad practice. **Update** This installer CD is supposed to be used for unattended installation using PXE


How can I use bash's if test and find commands together?

I have a directory with crash logs, and I'd like to use a conditional statement in a bash script based on a find command. The log files are stored in this format:               /var/log/crashes/app-2012-08-28.log     /var/log/crashes/otherapp-2012-08-28.log      I want the if statement to only return true if there is a crash log for a specific app which has been modified in the last 5 minutes. The `find` command that I would use is:               find /var/log/crashes -name app-\*\.log -mmin -5      I'm not sure how to incorporate that into an `if` statement properly. I think this might work:               if [ test `find /var/log/crashes -name app-\*\.log -mmin -5` ] then      service myapp restart     fi      There are a few areas where I'm unclear:   * I've looked at the if flags but I'm not sure which one, if any, that I should use.   * Do I need the `test` directive or should I just process against the results of the find command directly, or maybe use `find... | wc -l` to get a line count instead?   * Not 100% necessary to answer this question, but `test` is for testing against return codes that commands return? And they are sort of invisible - outside of `stdout` / `stderr`? I read the `man` page but I'm still pretty unclear about when to use `test` and how to debug it.


How can a Linux machine run an exe on a remote Windows server?

I need to run an executable on a remote Windows machine from a Linux server. I am using following command but hangs in between:               ssh @server_ip 'exe_name'      After running the `exe` I need to run command on the `exe` command prompt.


How do the internals of the cron daemon work?

I want to know how `cron` works internally. Does the process keep checking the current time in an infinite while loop (thus continually consuming CPU cycles)? Or does some function generate an interrupt and notifies the `cron` daemon ?


How to add a carriage return before every newline?

I have a file that only uses `\n` for new lines, but I need it to have `\r\n` for each new line. How can I do this? For example, I solved it in Vim using `:%s/\n/\r\n/g`, but I would like to use a script or command-line application. Any suggestions? I tried looking this up with `sed` or `grep`, but I got immediately confused by the escape sequence workarounds (I am a bit green with these commands). If interested, the application is related to my question/answer here


vmware player usb device on slackware 14.0

I just installed Slackware 14.0. I installed vmware player using this command:               sh VMware-$NAME-$VERSION.bundle --console --ignore-errors      Which I found from this website: > http://www.linuxquestions.org/questions/slackware-14/installation-of-vmware- > player-4-on-slackware-13-37-32-bit-909539/ That allowed me to install a guest version of Windows XP (microcontroller programming). But I'm unable to connect a usb device to the guest xp vm. The usb device is acting like a serial device. Any thoughts?


what does 1d0 mean in diff output?

Say you have two files **file1**               a     b     c     d      **file 2**               b     c     d     e      The first line of               diff file1 file2      would be               1d0      I've read up on this and found that it means delete the lines in the first file at position 1, which would have appeared at line 0 in the second file. I understand the explanation of the number to the left but the second part is doing my head in. What does it mean line 0 (does that even exist)?


Fast way to copy a large file on a LAN

I am having some trouble with NFS, and I'd like to try using just plain old TCP. I have no idea where to begin, though. Hardware-wise, I am using an ethernet crossover cable to network two netbooks. To network them, I type               $ sudo ifconfig eth0 192.168.1.1 up && ping -c 10 -s 10 192.168.1.2 && sudo /etc/init.d/nfs-kernel-server start      on the first netbook and               $ sudo ifconfig eth0 192.168.1.2 up     $ ping -c 10 -s 10 192.168.1.1     $ mount /mnt/network1      on the second where `/mnt/network1` is specified in /etc/fstab as `192.168.1.1:/home /mnt/network1 nfs noauto,user,exec,soft,nfsvers=2 0 0` as well as in `/etc/exports` (using the syntax of that file), on the first netbook. The above works fine, but the files and directories are huge. The files average about half a gigabyte a piece, and the directories are all between 15 and 50 gigabytes. I'm using `rsync` to transfer them, and the command (on `192.168.1.2`) is               $ rsync -avxS /mnt/network1 ~/somedir      I'm not sure if there's a way to tweak my NFS settings to handle huge files better, but I'd like to see if running an `rsync` daemon over plain old TCP works better than `rsync` over NFS. So, to reiterate, how do I set up a similar network with TCP? **UPDATE:** So, after a good at few hours of attempting to pull myself out of the morass of my own ignorance (or, as I like to think of it, to pull myself up by my own bootstraps) I came up with some useful facts. But first of all, what led me on this rabbit trail instead of simply accepting the current best answer was this: `nc` is an unbelievably cool program that resolutely fails to work for me. I've tried the `netcat-openbsd` and `netcat- traditional` packages with no luck whatsoever. The error I get on the receiving machine (`192.168.1.2`) is:               me@netbook:~$ nc -q 1 -l -p 32934 | tar xv     Can't grab 0.0.0.0:32934 with bind     tar: This does not look like a tar archive     tar: Exiting with failure status due to previous errors      `route` gives:               me@netbook:~$ route     Kernel IP routing table     Destination     Gateway         Genmask         Flags Metric Ref    Use Iface     default         dir-615         0.0.0.0         UG    0      0        0 wlan0     link-local      *               255.255.0.0     U     1000   0        0 eth0     192.168.0.0     *               255.255.255.0   U     2      0        0 wlan0     192.168.1.0     *               255.255.255.0   U     0      0        0 eth0      But, here's the good news: having the static IP addresses set in `/etc/network/interfaces`, which I started doing while trying to get `nc` working, fixed all my NFS problems and rekindled my love for NFS. The exact configuration I used (with `192.168.1.1` for the first netbook, of course) was:               auto eth0     iface eth0 inet static     address 192.168.1.2     netmask 255.255.255.0      With those settings, the two netbooks will be able to ping each other directly after being booted up, without even an `ifup`. Anyway, I'd still really like to see `nc` in action, so I'm hoping someone help me debug this process.


Tunnel AFP over SSH over Internet

I can't seem to figure out how to connect to AFP over SSH. Here is my setup:               [Raspberry Pi] <---> [router] <---> (Internet) <---> [Client] I'd like to be able to connect to my home's WAN IP address on port 5123 to access the AFP server running on my Raspberry Pi over SSH. I've already:   1. Installed AFP and SSH servers on my Raspberry Pi   2. Configured SSH on my Pi to work over port 5123   3. Forwarded port 5123 of my router's WAN to my Raspberry Pi And yes, I've tried googling for instructions but I couldn't get it to work.


yum: RPM dependency tree

I'm going to install an RPM package and I can see that some of dependencies requires X server libraries to be installed as well. I'm absolutely sure that the package I need is a server software and does not need X server. I wonder if there is a way to print a list of RPM dependencies like it's done in Gentoo Linux?    ![enter image description here](http://i.stack.imgur.com/tB4c2.png) This command prints first level dependencies only, so it does not help me:               $ yum deplist <package name>


Set window manager's meta key depending on connected Xserver

# Situation A linux server is running an xdm supporting XDMCP, it is connected to from various different Linux and OS X boxes using XDMCP via an `X -query <server>` command. Once the user is logged in the window manager is started, which is mostly controlled from the keyboard using an assigned meta key. # Problem The assigned meta key needs to depend on the platform of the box that connects to the linux server. How do I figure out what the platform is behind the connected X server? # Thoughts I cannot use the DISPLAY environment variable to switch on, the IPs of the connecting boxes are assigned by DHCP and give no clue what the platform of the box is. I know the -class option to X can be used to set the display class, which then could be used to set defaults for the various display classes in Xresources. However I don't know how to get the class of the connected Xserver from the command line (or a little custom C program) and furthermore, I don't know how to get the value of an Xresource that would be configured with that class. Ideally the used meta key could be configured on the box running the X server, so that the linux server running the xdm does not need any reconfiguration when a new type of platform is introduced in the setup. What is the best way to go about this? Is it possible to determine the platform the X server is running on? Can some configuration option be passed from the Xserver to the window manager scripts? Is there a better way to resolve this?


Ubuntu kernel source code package

Can somebody explain me the difference between the following files:               drwxr-xr-x  28 root root      4096 Apr 22 12:04 linux-lts-raring-3.8.0     -rw-r--r--   1 root root  15209788 Mar 14 03:38 linux-lts-raring_3.8.0-38.56~precise1.diff.gz     -rw-r--r--   1 root root      6333 Mar 14 03:38 linux-lts-raring_3.8.0-38.56~precise1.dsc     -rw-r--r--   1 root root 107018407 May  8  2013 linux-lts-raring_3.8.0.orig.tar.gz      I want to write a simple driver and so would give the path of one of these in my driver Makefile. **OS Info**               #lsb_release -a     No LSB modules are available.     Distributor ID: Ubuntu     Description:    Ubuntu 12.04.4 LTS     Release:    12.04     Codename:   precise      Also:               3.8.0-38-generic #56~precise1-Ubuntu SMP Thu Mar 13 16:23:47 UTC 2014 i686 i686 i386 GNU/Linux


bash: Accessing function call stack in trap function

Working on a bash function call stack trace... Script traps errors and runs a `callStack()` function. But on trapping, It always shows a call stack for the `callStack()` function itself instead of the function where the trap occurred as in ...               /share/sbin/zimdialog: line 647: status: command not found         Function call stack ( command.function() ) ...           /share/sbin/zimdialog.main()             /share/sbin/include.callStack()      Looking to get a stack trace that includes the `errantFunction()` like...               /share/sbin/zimdialog: line 647: status: command not found         Function call stack ( command.function() ) ...           /share/sbin/zimdialog.main()             /share/sbin/zimdialog.errantFunction()               /share/sbin/include.callStack()      The trap is coded as...               trap callStack HUP INT QUIT TERM ERR      The `callStack()` function is coded as...               function callStack () {       { isNotNull "$1" && isHelp "$1"; } && {         helpShow 'callStack         Diagnostics regarding where the call to this function came from'         return       }       local T="${T}  "       local STACK=       i=${#FUNCNAME[@]}       ((--i))       printf "${T}Function call stack ( command.function() ) ...\n" >&2       T="${T}  "       while (( $i >= 0 ))       do         STACK+="${T}${BASH_SOURCE[$i]}.${FUNCNAME[$i]}()\n"         T="${T}  "         ((--i))       done       printf "$STACK" >&2     }      * * * **Supplemental: set -E, etc. not working** In `/share/sbin/gshlib` ...               set -e     set -E     set -T     shopt -s extdebug          trap $(callStack) ERR          function initialize () {         :       logstatus                         #<<< ERROR FOR TESTING trap     }     export -f initialize      Misnaming `logStatus` to `logstatus` within `/share/sbin/gshlib.initialize()` to spring the `trap ERR`, the best I get is...                   Function call stack ...         | /share/sbin/archive.main()         |   /share/sbin/include.include()         |     /share/sbin/gshlib.source()         |       /share/sbin/include.callStack()     /share/sbin/gshlib: line 109: logstatus: command not found      What I'm looking to get is...                   Function call stack ...         | /share/sbin/archive.main()         |   /share/sbin/include.include()         |     /share/sbin/gshlib.source()         |       /share/sbin/gshlib.initialize()         |         /share/sbin/include.callStack()     /share/sbin/gshlib: line 109: logstatus: command not found


Arch linux wifi works manually, how to make it automatic?

Running Arch Linux with kernel 3.6.11-12-ARCH+ on my Raspberry Pi. I have a Linksys wifi usb dongle (WUSB54GC v3) that is running and working after I execute the following commands:               $> sudo ifconfig wlan0 up     $> sudo iwlist scan     $> sudo iwconfig wlan0 mode managed essid myssid key "mykey" retry 7        # Only had to do this next one the first time     $> sudo wpa_passphrase myssid "mypassword" > /etc/wpa_supplicant/wpa_supplicant.conf      $> sudo wpa_supplicant -B -Dwext -iwlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf     $> sudo dhcpcd wlan0      How do I get wifi on this device to work everytime after booting? Eventually I want to deploy it in location without a wired connection (hence the wifi), but I obviously can't do that if I have to manually start/connect the wifi everytime.


Setting up Proxy Settings on Debian

During installation of Debian I was asked for a Standard Proxy String in the form of `http://user:password@host:port/`, which I entered. apt-get ran and retrieved files during update, and now Debian is installed. However, when I tried running `sudo apt-get install ...`, I get an error message containing the message `Could not resolve proxy_host` where `proxy_host` is the host I entered during installation. Are there other places where I have to set up the proxy information?


How do I run a shell command from .tmux.conf

How do I run a shell command from `.tmux.conf`, or otherwise automatically when tmux launches, without having to hit any other command? How can I create an alias, a function, or a script which boils down to, for example tmuxirc -> tmux + irssi


rename files maching specific mtime value within directory

I use simple set of shell commands to in order to create mysqldumps daily. The script is called by cron daemon. It looks like:               presentdate="`date +%d-%m-%Y_%H:%M.%S`"     basedir="/var/db_my_backup"     mysqldump -u username -ppassword --all-databases |       gzip -9 -c > $basedir/mysqlbackup.$presentdate.sql.gz |        find -L $basedir/'*' -type f -mtime +7 exec rm -f {} \; |       chown -R user:group $basedir | (         cat <<EOF     Copy of MySQL successfully placed in $basedir directory as file named mysqlbackup.$presentdate.sql.gz.      Now it is ready to be moved to QNAP backup device as scheduled.     EOF         cat       ) | /bin/mail -s "Report from scheduled job for mysqldumps" root      My concern is: how can I possibly make it more elegant? Would it be possible to build a function for selecting and renaming files that are older than 7 days? I don't like using find as it produces strange warnings like for example:               find: paths must precede expression     Usage: find [-H] [-L] [-P] [path...] [expression]      that are hard to deal with (at least for me) in such a script.


Acroread Firefox plugin Ubuntu 12.04 issues

Since I upgraded to Ubuntu 12.04, every time I try to open a PDF through Firefox (which I like to do quite often as I read a lot of PDF documents and downloading each then deleting is tiresome) I get the error message: > Could not launch Adobe Reader 9.5.1. Please make sure it exists in PATH > variable in the environment. If the problem persists, please reinstall the > application. If I launch Firefox from the terminal the message it gives when attempting to open a PDF is:               (firefox:5989): Gtk-CRITICAL **: IA__gtk_widget_realize: assertion `GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed          (firefox:5989): Gdk-CRITICAL **: IA__gdk_window_set_back_pixmap: assertion `GDK_IS_WINDOW (window)' failed     /usr/bin/acroread: 23: exec: /opt/Adobe/Reader9/Reader/intellinux/bin/acroread: Permission denied      How can I fix this? * * * I should mention loading a PDF from say the Desktop is fine. I only get error when loading a PDF via the browser. ADDITIONAL INFO:               ldd /opt/Adobe/Reader9/Reader/intellinux/bin/acroread | grep not           libBIB.so => not found     libBIBUtils.so => not found     libACE.so => not found     libAGM.so => not found     libCoolType.so => not found     libAXE8SharedExpat.so => not found     libJP2K.so => not found     libAdobeXMP.so => not found     libicuuc.so.36 => not found     libResAccess.so => not found


Why doesn't GCM HTTPS work with nginx?


How can I get the address of my local machine?

I'm on a macbook running Lion. In `Terminal` I'm connected to my schools server with `ssh`. I navigated to a folder on the server and have a file I want to copy to my local machine, but I don't know what the IP address of my local machine is. How can I get it? I'm in the folder on the server, and I want to copy `read.txt` onto my local machine's hard drive. I've tried `scp ./read.txt [my computer name].local/newRead.txt` but it doesn't work.


Can't use gcc on x64 debian:               $ gcc a.cpp     Assembler messages:     Fatal error: No compiled in support for x86_64      what should I do? Some people propose installing binutils, but they are already there. (Adding -m64 doesn't change anything). Where does this message come from? a.cpp is just an empty file. \--help=target gives               The following options are target specific:       -m128bit-long-double        sizeof(long double) is 16       -m32                        Generate 32bit i386 code       -m3dnow                     Support 3DNow! built-in functions       -m3dnowa                    Support Athlon 3Dnow! built-in functions       -m64                        Generate 64bit x86-64 code       -m80387                     Use hardware fp       -m8bit-idiv                 Expand 32bit/64bit integer divide into 8bit                                   unsigned integer divide with run-time check       -m96bit-long-double         sizeof(long double) is 12       -mabi=                      Generate code that conforms to the given ABI       -mabm                       Support code generation of Advanced Bit                                   Manipulation (ABM) instructions.       -maccumulate-outgoing-args  Reserve space for outgoing arguments in the                                   function prologue       -maes                       Support AES built-in functions and code generation       -malign-double              Align some doubles on dword boundary       -malign-functions=          Function starts are aligned to this power of 2       -malign-jumps=              Jump targets are aligned to this power of 2       -malign-loops=              Loop code aligned to this power of 2       -malign-stringops           Align destination of the string operations       -mandroid                   Generate code for the Android platform.       -march=                     Generate code for given CPU       -masm=                      Use given assembler dialect       -mavx                       Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1,                                   SSE4.2 and AVX built-in functions and code                                   generation       -mavx2                      Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1,                                   SSE4.2, AVX and AVX2 built-in functions and code                                   generation       -mavx256-split-unaligned-load Split 32-byte AVX unaligned load       -mavx256-split-unaligned-store Split 32-byte AVX unaligned store       -mbionic                    Use Bionic C library       -mbmi                       Support BMI built-in functions and code generation       -mbmi2                      Support BMI2 built-in functions and code                                   generation       -mbranch-cost=              Branches are this expensive (1-5, arbitrary units)       -mcld                       Generate cld instruction in the function prologue.       -mcmodel=                   Use given x86-64 code model       -mcpu=                      This switch lacks documentation       -mcrc32                     Support code generation of crc32 instruction.       -mcx16                      Support code generation of cmpxchg16b instruction.       -mdispatch-scheduler        Do dispatch scheduling if processor is bdver1 or                                   bdver2 and Haifa scheduling is selected.       -mf16c                      Support F16C built-in functions and code                                   generation       -mfancy-math-387            Generate sin, cos, sqrt for FPU       -mfentry                    Emit profiling counter call at function entry                                   before prologue.       -mfma                       Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1,                                   SSE4.2, AVX and FMA built-in functions and code                                   generation       -mfma4                      Support FMA4 built-in functions and code                                   generation        -mforce-drap                Always use Dynamic Realigned Argument Pointer                                   (DRAP) to realign stack       -mfp-ret-in-387             Return values of functions in FPU registers       -mfpmath=                   Generate floating point mathematics using given                                   instruction set       -mfsgsbase                  Support FSGSBASE built-in functions and code                                   generation       -mfused-madd                This switch lacks documentation       -mglibc                     Use GNU C library       -mhard-float                Use hardware fp       -mieee-fp                   Use IEEE math for fp comparisons       -mincoming-stack-boundary=  Assume incoming stack aligned to this power of 2       -minline-all-stringops      Inline all known string operations       -minline-stringops-dynamically Inline memset/memcpy string operations, but                                   perform inline version only for small blocks       -mintel-syntax              This switch lacks documentation       -mlarge-data-threshold=     Data greater than given threshold will go into                                   .ldata section in x86-64 medium model       -mlwp                       Support LWP built-in functions and code                                   generation        -mlzcnt                     Support LZCNT built-in function and code                                   generation       -mmmx                       Support MMX built-in functions       -mmovbe                     Support code generation of movbe instruction.       -mms-bitfields              Use native (MS) bitfield layout       -mno-align-stringops        This switch lacks documentation       -mno-fancy-math-387         This switch lacks documentation       -mno-push-args              This switch lacks documentation       -mno-red-zone               This switch lacks documentation       -mno-sse4                   Do not support SSE4.1 and SSE4.2 built-in                                   functions and code generation       -momit-leaf-frame-pointer   Omit the frame pointer in leaf functions       -mpc32                      Set 80387 floating-point precision to 32-bit       -mpc64                      Set 80387 floating-point precision to 64-bit       -mpc80                      Set 80387 floating-point precision to 80-bit       -mpclmul                    Support PCLMUL built-in functions and code                                   generation       -mpopcnt                    Support code generation of popcnt instruction.       -mprefer-avx128             Use 128-bit AVX instructions instead of 256-bit                                   AVX instructions in the auto-vectorizer.       -mpreferred-stack-boundary= Attempt to keep stack aligned to this power of 2       -mpush-args                 Use push instructions to save outgoing arguments       -mrdrnd                     Support RDRND built-in functions and code                                   generation       -mrecip                     Generate reciprocals instead of divss and sqrtss.       -mrecip=                    Control generation of reciprocal estimates.       -mred-zone                  Use red-zone in the x86-64 code       -mregparm=                  Number of registers used to pass integer arguments       -mrtd                       Alternate calling convention       -msahf                      Support code generation of sahf instruction in                                   64bit x86-64 code.       -msoft-float                Do not use hardware fp       -msse                       Support MMX and SSE built-in functions and code                                   generation       -msse2                      Support MMX, SSE and SSE2 built-in functions and                                   code generation       -msse2avx                   Encode SSE instructions with VEX prefix       -msse3                      Support MMX, SSE, SSE2 and SSE3 built-in                                   functions and code generation       -msse4                      Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1 and                                   SSE4.2 built-in functions and code generation       -msse4.1                    Support MMX, SSE, SSE2, SSE3, SSSE3 and SSE4.1                                   built-in functions and code generation       -msse4.2                    Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1 and                                   SSE4.2 built-in functions and code generation       -msse4a                     Support MMX, SSE, SSE2, SSE3 and SSE4A built-in                                   functions and code generation       -msse5                      This switch lacks documentation       -msseregparm                Use SSE register passing conventions for SF and                                   DF mode       -mssse3                     Support MMX, SSE, SSE2, SSE3 and SSSE3 built-in                                   functions and code generation       -mstack-arg-probe           Enable stack probing       -mstackrealign              Realign stack in prologue       -mstringop-strategy=        Chose strategy to generate stringop using       -mtbm                       Support TBM built-in functions and code generation       -mtls-dialect=              Use given thread-local storage dialect       -mtls-direct-seg-refs       Use direct references against %gs when accessing                                   tls data       -mtune=                     Schedule code for given CPU       -muclibc                    Use uClibc C library       -mveclibabi=                Vector library ABI to use       -mvect8-ret-in-mem          Return 8-byte vectors in memory       -mvzeroupper                Generate vzeroupper instruction before a transfer                                   of control flow out of the function.       -mx32                       Generate 32bit x86-64 code       -mxop                       Support XOP built-in functions and code                                   generation             Known assembler dialects (for use with the -masm-dialect= option):         att intel            Known ABIs (for use with the -mabi= option):         ms sysv            Known code models (for use with the -mcmodel= option):         32 kernel large medium small            Valid arguments to -mfpmath=:         387 387+sse 387,sse both sse sse+387 sse,387            Known vectorization library ABIs (for use with the -mveclibabi= option):         acml svml            Valid arguments to -mstringop-strategy=:         byte_loop libcall loop rep_4byte rep_8byte rep_byte unrolled_loop            Known TLS dialects (for use with the -mtls-dialect= option):         gnu gnu2


Revert commits and commit them to a branch?

I'm cloning a popular open source project into GitHub, and I only realized this after it was too late. I'm also trying to convert this project over to use Maven instead of Ant/Ivy for a build tool. I was able to convert the repository from SVN to Git via the aptly-named `svn2git`, then started making changes toward the Maven migration. I failed to realize at the get-go that I needed to create a separate branch for my Maven migrations. Is there a way for me to take my revisions, remove them from `master`, and send them to a new branch?


L2TP IPsec VPN client configuration

I have Linux (Fedora) box and I want to conject to VPN described as "L2TP IPsec VPN" one. I have got following credentials: * * * user=xxxxxxxxx pass=xxxxxxxxx VPN server= XXX.XXX.XXX.XXX IPsec key=xxxxxxxxx * * * I tried to use NetworkManager, vpnc with no luck. What software to use?


mounting local network folder in Ubuntu

I add a folder in /etc/fstab:               //172.30.12.37/test/ /home/my/test cifs user=afs,pass=123456,auto,exec,umask=002,gid=1000,uid=1000,file_mode=0777,dir_mode=0777 0 0      Now test link can be seen in nautilus sidebar. But when I click on this icon, an error will be displayed:               mount: only root can mount //172.30.12.37/test/ on /home/my/test      How I can mount this folder from terminal with root user?


Sort one column only, keeping remaining columns untouched

How to (numerically) sort a specific column in a text file, without affecting other columns (irrespective of whether they are sorted or unsorted)? On other threads I found `-s` argument, but it does sort other columns. Observation               $ cat tmp.txt     1 1     2 3     5 4     1 3          $ sort -s -n -k1,1 tmp.txt     1 1     1 3     2 3     5 4


Bash variable in Awk script

I have this flat file database(ff_servers.db) with following contents:               192.168.154.2 Alaska   hp     192.168.157.3 Colorado dell     192.168.156.3 hawaii   hp      From command line, I could run:               awk "BEGIN{IGNORECASE=1;}/alaska/ {print $NF}" ff_servers.db`      and I would get               hp      However, from a bash script, I'm having problems with "$NF" Here's the dump of that script:               machine_type=`awk "BEGIN{IGNORECASE=1;}/${server_name}/ {print \$NF}" ff_servers.db`     awk "BEGIN{IGNORECASE=1;}/${server_name}/ {print $NF}" ff_servers.db     ++ awk 'BEGIN{IGNORECASE=1;}/colorado/ {print }' ff_servers.db     + target_arch='192.168.157.3   Colorado           dell'      So obviously, $NF is not being translated properly. Where am I doing wrong?


How to open and work with terminals using bash script?

I need to open four terminals each will then connect to four different remote pcs and open specific directory locations on those pcs. Each terminal will be opened in different locations on my pc's desktop screen. How this can be done using bash scripts? I am using Ubuntu-12.04. This would be a great help because everytime doing this is a overkill to me.


scan directories of .pdf and .ps files for keyword in title and author

I have got directories full of research papers. I would like to scan the files for keywords in the titles, the author lists, etc. Does a tool for that purpose exist?


Is the purpose of setting the version number of a file using chattr similar to optomistic locking in a database?

For instance if you record the version number before editing the file, and check it again before saving the file, you can be assured that nobody else wrote to the file while you were editing it. (although to be honest I don't see it changing the version number automatically when changing a file).


Script to extract selected entries from a bibtex file

I have a large bibtex file with many entries where each entry has the general structure               @ARTICLE{AuthorYear,     item = {...},     item = {...},     item = {...},     etc     }      (in some cases `ARTICLE` might be a different word e.g. `BOOK`) What I would like to do is write a simple script (preferably just a shell script) to extract entries with given AuthorYear and put those in a new .bib file. I can imagine that I can recognize the first sentence of an entry by AuthorYear and the last by the single closing `}` and perhaps use `sed` to extract the entry, but I don't really know how to do this exactly. Can someone tell me how I would achieve this? It should probably be something like               sed -n "/AuthorYear/,/\}/p" file.bib      But that stops due to the closing `}` in the first item of the entry thus giving this output:               @ARTICLE{AuthorYear,     item = {...},      So I need to recognize whether the `}` is the only character at a line and only have 'sed' stop reading when this is the case.


Script running forever

could you please provide me insight on why the following script runs forever even after last echo statement ran successfully? Thank you for your help.               cd /app/pme/${property:DeployEnv}/ruleengine     ./stop.sh     unzip -o ruleengine.app.zip     unzip -o ruleengine.${property:DeployEnv}.zip     dos2unix *.sh     echo begin chmod     chmod ugo+rx *.sh     echo end chmod     echo begin run.sh     ./run.sh     echo end run.sh     cd /app/pme/${property:DeployEnv}/ruleengine     pwd     echo start rm commands     rm ruleengine.app.zip     rm ruleengine.${property:DeployEnv}.zip     echo end rm commands     exit


Hide top and bottom menus from Midnight Commander

Can I hide top ("File", "Options", etc) and bottom ("Help", "View", "Edit", etc) menus from Midnight Commander? If so, how can I do it?


to run script over several folders?

Currently I have a script that can run only in a single folder.               #!/bin/bash     for file in ls -1 *.jpg|sort -t . -n -k 3     do       echo "compute ./scripName $file"       ./scriptName $file     done       Question: I have a several folders containing `*.jpg` images. I need a script that can over all images of all folders.


Get all regex matches between two patterns and print them to file

I've got a file with a bunch of long lines. I'd like to grab every group between two patterns and print them to a new file, one match per line. I could manage to do this with Python, but I'd prefer using just command line tools for this task. If there is no end pattern, I'd like to grab everything 'till the end of the line. Something like:               input:      xxSTART relevanttext xxEND something else xxSTART even more relevant          output:     relevanttext     even more relevant


How do Apache2 VirtualHosts get resolved?

As I understand it, when you request a url from a website using your browser, it asks the DNS server that the OS is pointing at if it knows the ip address that relates to the dns-name of the server; then if the DNS server finds the server requested, it returns the ip so that the browser can request the url from the webserver. Considering at this point that the browser requests the URL using the ip address of the server and not the dns-name, how does the webserver (Apache2) know how to return correct VirtualHost, that is associated with the dns-name? My head tells me that it has something to do with the browser headers, but I'm not completely certain of this. **Note:** Here's a related solution


Nested virtualization: run RHEVH inside KVM

I have laptop with 16GB RAM, trying to install Red Hat Enterprise Virtualization Hypervizor 3.3 on Virtual Machine Manager (KVM) based Guest, but it gives error "Virtualization Hardware not found" ? What's possible solution for this error? ? Like in Oracle VM Box there is a option to enable support for Virtualization for Guest machine, is there anything like same in Virtual Machine Manager? Is it possible to test RHEV 3.3 on any of the virtualization like KVM, Oracle VM Box or VM Ware Workstation 10?


Fedora 16: keystroke only get beep sound and doesn't work

I'm using my laptop and suddenly the keystroke doesn't work anymore. When I press the keystrokes, it produces beep sound but doesn't work. Then I notice if I keep on pressing the same keystroke for several seconds, it will work. On command-line environment, it works fine, but in GNOME, it works as above. What is wrong with this? The version is Fedora 16 x86_64


Replace all the occurences of a term in the files contained in a folder

In a folder on my system, I have a `C++` project that I'm trying to compile. This process uses some `C++` idioms which are not supported by my compiler version. In particular, often inside the code it is used the data value `'nullptr'`. What I want to do is to replace all occurrences of `nullptr` with `NULL`. I can do this in `VIM` with the command:               :%s/nullptr/NULL/g       How can I do this for all the files in a directory once, without opening each file and executing the command?


What is kondemand?

I have searched the web for the answer of this question but couldn't find a clear answer. Best answer I found was as follows: > kondemand is a kernel thread that belongs to the ondemand governor of > cpufreq subsystem, which changes the p-states of the system, based on the > utilization statistics. Thus it’s something that helps in power management. But still there is uncertainty about the meaning **in what way kondemand helps power management** or **is it really a process/thread concerning with power management?** Can someone please explain it?


Looking for X terminal with correct window resize handling

Is there any X terminal program, which reflows the content when I'm resizing the window? Gnome-terminal and Sakura does it well _halfway_ : when I'm shrinking the window and re-expanding it, the stuff comes back to the right side of the screen as I want: _Opening a big window:_               line 1 abcdefghijklmnopqrstuvwxyz       | right margin     line 2 abcdefghijklmnopqrstuvwxyz       |       _Shrinking it:_               line 1 abcdefghijklm | right margin     line 2 abcdefghijklm |      _Resizing to original (gnome-terminal, sakura), that's what I want to see:_               line 1 abcdefghijklmnopqrstuvwxyz       | right margin     line 2 abcdefghijklmnopqrstuvwxyz       |      _Resize to original (xterm, lxterm, PuTTY/win32), I don't like this:_               line 1 abcdefghijklm                    | right margin     line 2 abcdefghijklm                    |       That's okay, some terminals works well, others not. But when I'm opening a small window and expand it, all terminals works the same way: the lines remain wrapped at the left side, instead of re-flowing and re-wrapping: _Small window (line 1 and 2 just ran out of window):_               line 3 abcdefghijklm | right margin     nopqrstuvwxyz        |     line 4 abcdefghijklm |     nopqrstuvwxyz        |      _Resize to larger:_               line 3 abcdefghijklm                    | right margin     nopqrstuvwxyz                           |     line 4 abcdefghijklm                    |     nopqrstuvwxyz                           |      **What I want to see instead:**               line 1 abcdefghijklmnopqrstuvwxyz       | right margin     line 2 abcdefghijklmnopqrstuvwxyz       |     line 3 abcdefghijklmnopqrstuvwxyz       |     line 4 abcdefghijklmnopqrstuvwxyz       |      Is there a chance to get this result? (I'm using Ubuntu with LXDE, if it matters).


Samba share permission denied user writing file but still shows

Very strange issue... Samba share on remote:               [javaerpm]         path = /u/abas/erpm/java         force user = erpm         guest ok = yes         read only = no         writeable = yes      Mount command on local using root:               root@crunchbang:/mnt/abas# mount -t cifs -o username=guest,rw,exec,auto //10.0.0.2/javaerpm ./javaerpm      Root can read/write/cd no problem at all:               root@crunchbang:/mnt/abas# cd javaerpm     root@crunchbang:/mnt/abas/javaerpm# touch test     root@crunchbang:/mnt/abas/javaerpm# ll     total 1     -rw-r--r--  1  501 users   0 Sep 24 09:55 test     root@crunchbang:/mnt/abas/javaerpm# rm test      But if I switch to a regular user and do the same thing I get this:               shawn@crunchbang:/mnt/abas/javaerpm$ touch test     touch: cannot touch `test': Permission denied      I can `ll` and I can see that it wrote the file anyways:               shawn@crunchbang:/mnt/abas/javaerpm$ ll     total 1     -rw-r--r--  1  501 users   0 Sep 24 09:55 test      I can even `rm` no problem:               shawn@crunchbang:/mnt/abas/javaerpm$ rm test     shawn@crunchbang:/mnt/abas/javaerpm$      I've tried different mounting options. `uid=501` doesn't change anything. Tried `nounix` but then it doesn't work at all and I see nothing using root or shawn user.


CMake Error: The current directory is different than

I'm trying to compile the source code for Shrewsoft VPN. The instructions say to compile the source on step 4. However... I get this error:               user@ubuntu:~/Ubuntu One/Programs/ShrewSoft VPN$ sudo cmake –DQTGUI=YES –DETCDIR=/etc –DNATT=YES     CMake Error: The current CMakeCache.txt directory /home/user/Ubuntu One/Programs/ShrewSoft VPN/CMakeCache.txt is different than the directory /home/user/Programs/ShrewSoft VPN where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt     CMake Error: The source directory "/home/user/Ubuntu One/Programs/ShrewSoft VPN/–DNATT=YES" does not exist.     Specify --help for usage, or press the help button on the CMake GUI.      **Instructions:**               Compile the Source Code for the Shrew Soft VPN Client     1.  $> cd ~/Downloads          2.  $> tar –xzvf shrewsoft-client.tgz          Change to Download directory     $> cd ~/Downloads     Unpack the Source files.     $> tar –xzvf shrewsoft-client.tgz     3.   Change to the source directory.          $> cd ~/Downloads/ike     4.   Run cmake.          For GUI Installation (recommended):          $> cmake –DQTGUI=YES –DETCDIR=/etc –DNATT=YES          For non-GUI Installation:          $> cmake -DNATT=YES     5.   Run make.          $> make     6.   Run make install. NOTE: Run


How can I debug Apache, not starting upon boot

Apache is already set up as a service, since:               $ sudo update-rc.d apache2 defaults      System start/stop links for /etc/init.d/apache2 already exist.      But Apache isn't starting. How can I start debugging what is going wrong? I'm running Linux Mint, so a Debian flavour.


Does CentOS fall into System V family? How is it considered to be while comparing with Unix System V family?

CentOS is `"derived entirely from the Red Hat Enterprise Linux (RHEL) distribution"` (more here).   1. Does it fall into any UNIX System V family? Such as PDP-11 or etc?   2. If not, where does CentOS stands for comparing with System V family for zero downtime or performance etc?


Use `dd` to cut file end part

There is probably simple trick to do this, but I can't figure from man page. How do I cut last 1MB from file with undetermined size for example, by using `dd`?


I want my Ubuntu 9.04/9.10 back, is there any current similar distro?

I was switching to Linux in the optimal time, around Ubuntu 9.04/9.10. I am a programmer, so I don't want to be a "Linux guru", that's why Ubuntu **was** perfect for me - until Unity/Gnome3. In latest Ubuntu releases (11.04/11.10), several important things have just disappeared. There's no Compiz-Fusion support, no Gnome2 applets. The position of the panels is fixed. The Unity launcher is "for-dummies", but I'm not. Lots of customisation options are gone. On the computer I've performed distro- upgrade, I've installed LXDE now, it's like Gnome (I've replaced LXDE's file manager with Nautilus), but it does not support Compiz-Fusion. So, the question is: which Linux distro is like Ubuntu 9.04/9.10, which I can just install, set up Compiz-Fusion shortcuts, select panel's position, add applets, and it just works? Should I go back to Ubuntu 10.04 LTS? What about Mint? I don't wanna dig too deep into the soul of window managers and desktop environments.


Can't dualboot Fedora

I have Windows XP installed on partition `C`, and then I installed Fedora on `ext3` partition. Now at computer startup I should see two options to select from; either launch XP or Fedora. However, my computer automatically starts Windows XP: I do not have two options at computer startup. I have a Fedora still installed on `ext3`, but I can’t boot it. Why?


Playing sound in a user X session

I am running Linux Mint 14 and can play sound when I start my x session through `mdm`. however, when I start my X session using `startx` in user space, I am unable to get any sound play. What could be wrong? how do I go about playing sound in an X session when running X in userspace? Is this even possible?


Init Script initializing daemonized process, but won't return [ok]

I'm new to init scripts, but the one I'm using I've copied almost verbatim (I did have to change a few things around from the source I found to work with Fedora). The daemon initializes fastcgi just fine, which was a great victory. However, the init script itself never finishes running, and never returns [ok], even though the program is initialized. It just hangs at "Starting PHP FastCGI" with a blinking cursor. I can't ^C out of it, either. The init script is below. This is a Fedora14 server.               #!/bin/sh     #chkconfig 3 85 15     #processname: php-fcgi      . /etc/rc.d/init.d/functions          php_cgi="/usr/bin/php-cgi"     prog=$(basename $php_cgi)     bind=/tmp/php.socket          php_fcgi_children=15     php_fcgi_max_requests=1000          user=root     php_cgi_args="- USER=$user PATH=/usr/bin PHP_FCGI_CHILDREN=$php_fcgi_children PHP_FCGI_MAX_REQUESTS=$php_fcgi_max_requests $php_cgi -b $bind"     RETVAL=0     start() {         echo -n "Starting PHP FastCGI: "         daemon /usr/bin/env $php_cgi_args         RETVAL=$?         echo "$prog."     }          stop() {         echo -n "Stopping PHP FastCGI: "         killall -q -w -u $user $php_cgi         RETVAL=$?         echo "$prog."     }          case "$1" in         start)             start         ;;         stop)             stop         ;;         restart)             stop             start         ;;         *)         echo "Usage: php-fcgi {start|stop|restart}"         exit 1         ;;     esac     exit $RETVAL


Finding duplicate files

I need to write a bash script that finds duplicate files, but in addition to `md5sum` it needs to use `cmp` to do the final check. I tried the command below in my shell. How can I add a loop and put it into a bash script?               find . -type f | xargs -I%  md5sum % | sort | uniq -w32 -D| cut  -f3 -d' '


ALT+F2 doesnt work in Linux Mint Mate

I am trying to install Sublime Text 2 on Linux MINT (Mate) from this tutorial. http://community.linuxmint.com/tutorial/view/907 and I'm stuck on:               Next , to create a menu icon press Alt+F2 and type:     gksu gedit /usr/share/applications/sublime.desktop      When I press `Alt`+`F2` nothing happens, is there another way I can run this command?


yum install in user home for non-admins

I am a non-admin user on a large computer system. I need some up to date packages that are not installed on the system. I want to use yum to install them. As a user without sudo, admin, or root access, can I use package management to install packages in my home directory? I can always use make from the sources, but being able to use yum will make life easier.


Equivalent of pick command in linux

OS: Linux Mint 14 Is there an equivalent of the `pick` command available in Linux? Pick command is the one where for each given argument, it asks yes/no and prints the selection to stdout. This script is commonly described in unix books (unix power tools).


Getting black controls when running linux on vmware on windows

I want to run ubuntu 12.04 LTS. I want to put the graphics in it, but when I open it, I get this. I used this command               sudo apt-get install --no-install-recommends ubuntu-desktop      to put the desktop version on it. Also I have an intel chipset, and nvidia 420m graphics card. Does anyone know how to fix this? Thanks ![enter image description here](http://i.stack.imgur.com/PKoq8.png)


How to identify the program that uses most bandwidth?

How can I know which application is using the most network bandwidth? I saw some graph from KDE's network monitor, but don't know which process did that.


Weird SSH issue, ssh works with -t but freezes without it

When I `ssh` into one of my servers, it seems to log in, but then hangs before giving me the prompt (`message debug2: shell request accepted on channel 0 is the last log entry`). Though the odd thing is `ssh -t "/bin/bash"` works when `ssh` doesn't. _What I have found out so far_   * I can log in fine from servers in the same geographical location normally   * If I `ssh -t '/bin/bash'` \- I can log in perfectly from ANY location.   * If I use `rsync` _to_ the server , it seems to work, and then locks   * If I use `rsync` _from_ the server, it works without problem _What I have tried_   * removing or changing all login options `.profile`, `.bashrc /etc/profile`   * Changing the `ssh_config` _and/or_ `sshd_config` to one from an identical server that works fine   * I've checked the routing   * I've had a network expert examine `tcpdump` to no avail (though there do seem to be a lot of re-transmissions) _I really can't think of anything else_ Apart from a dodgy network card driver/firmware.


How to disable moving between workspaces feature?

I have installed Linux Mint 14 Cinnamon - have been upgrading from Linux Mint 13. There is a feature:   I can move between workspaces by moving cursor to the edge of screen and holding it there for about 1.5 seconds. It is very useful, but sometimes annoying. And I cannot find where to turn off it.


Slackware Upgrade on new release

I am about to install Slackware . Likely using Salix however a little concerned getting in st the rear end of the 13.37 cycle . If I install now and in a month anew release of Slackware occurs will a brand new install be required or is there a similar facility to dist-upgrade? Should I just use slackel and stay on Slackware current?


bit rot detection and correction with mdadm

I'm about to re-organise all my HDDs in my linux box nas and would like to use mdadm raid for data protection and its flexibility for reshaping the arrays. However, before I use mdadm for this I'd like to know how it handles bit rot. Specifically the kinds of bit rot that do not result from unrecoverable read errors. Given that I'll likely be using at least 21TB of HDDs in 8 disks in the nas and the various quotes on probabilities of failures on HDDs, I'm thinking that during a rebuild from a single disk failure I'm reasonably likely to encounter some form of bit rot on the remaining disks. If it is an unrecoverable read error on 1 of the drives, that the drive actually reports it as an error, I believe that should be fine with raid6(is it?). However if the data read from the disk is bad but not reported as such by the disk, then I can't see how this can be automatically corrected even with raid6. Is this something we need to be concerned about? Given the article It is 2010 and RAID5 still works, and my own successful experiences at home and work, things are not necessarily as doom and gloom as the buzz words and marketing would have us believe, but I hate having to restore from backups just because a HDD failed. Given that the usage patterns will be, write at most a few times, and read occasionally, I'll need to perform data scrubbing. I see on the archlinux wiki the mdadm commands for data scrubbing an array as               echo check > /sys/block/md0/md/sync_action      then to monitor the progress               cat /proc/mdstat      This seems to me that it will read all sectors of all disks and check that the data matches the parity and vice-versa. Though I notice there is heavy emphasis in the docs to say that there are significant circumstances that the "check" operation will not be able to auto correct, only detect, and it will leave it up to the user to fix. What mdadm RAID level(s) should I choose to maximise my protection from bit rot and what maintenance and other protective steps should I be doing? And what will this not protect me from? Edit: I'm not looking to start a RAID vs ZFS or any other technology QA. I want to know specifically about mdadm raid. That is also why I'm asking on Unix & Linux and not on SuperUser.


Installing Fedora 16 from an external HDD?

How can I install Fedora 16 Live (32-bit) from an external HDD connected via USB? I tried it with Universal-USB-Installer and received an error message that there was no drive found to be mounted and the NTFS format was not recognized. In Netbootin, the external HDD does not even get recognized in Windows 8 CP and is not selectable in the drop down menu, even though it is visible and writable in Windows Explorer. I have successfully installed with this method before with Ubuntu 12.04 and Universal-USB-Installer, but with Fedora 16 it did not work for me. How do I fix this issue? Will it work if I simply format the external HDD in vFat instead of NTFS? I have read that others have gotten it to work with vFat.


how does /etc/init.d/networking restart cause wpa_supplicant to be run using the previous configurations?

**Background:** I use Debian Lenny and have two WiFi interfaces. I use a generic configurations on `/etc/network/interfaces`               iface wlan0 inet static             address 10.0.0.1             network 10.0.0.0             netmask 255.255.255.0             broadcast 10.0.0.255          auto wlan1     iface wlan1 inet static             address 192.168.5.1             network 192.168.5.1             netmask 255.255.255.0             broadcast 192.168.0.25      So it has no sign about the `wpa_supplicant`. I use wpa_supplicant (v2.0) manually to connect them to a WLAN via `/etc/wpa_supplicant.conf` (for wlan0) and `/etc/wpa_supplicant2.conf` (for wlan1). **Problem:** While the wifi interfaces are connected to WLANs, I do               ip link set wlan0 down     ip link set wlan1 up     rm /var/run/wpa_supplicant/wlan0     rm /var/run/wpa_supplicant/wlan1      Then I do `ip link set wlan0 (and 1) up`. In that case, the iwconfig shows that the wifi interfaces are not connected to any network. After that, I run `/etc/init.d/networking restart`. When the process is completed, iwconfig shows that the wifi interfaces are connected to the WLANs that they were previously connected. **Question:** How come `/etc/init.d/networking restart` cause wpa_supplicant to be run by using the .config file for the interface that were used before (wpa_suppliant.conf for wlan0 and wpa_supplicant2.conf for wlan1)? I repeated this procedure many times and each time the wifi interfaces are connected to the same network that are defined on the .config files. **What I have done:** **1)** I suspected that `/etc/init.d/networking` script uses wpa_supplicant somehow. Therefore, I took a look at the script:                    #!/bin/sh -e         ### BEGIN INIT INFO         # Provides:          networking         # Required-Start:    mountkernfs ifupdown $local_fs         # Required-Stop:     ifupdown $local_fs         # Default-Start:     S         # Default-Stop:      0 6         # Short-Description: Raise network interfaces.         ### END INIT INFO     PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin"          [ -x /sbin/ifup ] || exit 0          . /lib/lsb/init-functions          process_options() {         [ -e /etc/network/options ] || return 0         log_warning_msg "/etc/network/options still exists and it will be IGNORED! R     ead README.Debian of netbase."     }          check_network_file_systems() {         [ -e /proc/mounts ] || return 0              exec 9<&0 < /proc/mounts         while read DEV MTPT FSTYPE REST; do             case $DEV in             /dev/nbd*|/dev/nd[a-z]*|/dev/etherd/e*)                 log_warning_msg "not deconfiguring network interfaces: network devic     es still mounted."                 exit 0                 ;;             esac             case $FSTYPE in             nfs|nfs4|smbfs|ncp|ncpfs|cifs|coda|ocfs2|gfs|pvfs|pvfs2|fuse.httpfs|fuse     .curlftpfs)                 log_warning_msg "not deconfiguring network interfaces: network file      systems still mounted."                 exit 0                 ;;             esac         done         exec 0<&9 9<&-     }          case "$1" in     start)                  process_options                  log_action_begin_msg "Configuring network interfaces"             if ifup -a; then                 log_action_end_msg $?             else                 log_action_end_msg $?             fi             ;;          stop)             check_network_file_systems                  log_action_begin_msg "Deconfiguring network interfaces"             if ifdown -a --exclude=lo; then                 log_action_end_msg $?             else                 log_action_end_msg $?             fi             ;;          force-reload|restart)             process_options                  log_action_begin_msg "Reconfiguring network interfaces"             ifdown -a --exclude=lo || true             if ifup -a --exclude=lo; then                 log_action_end_msg $?             else                 log_action_end_msg $?             fi             ;;          *)             echo "Usage: /etc/init.d/networking {start|stop|restart|force-reload}"             exit 1             ;;     esac          exit 0      `ifupdown` is a script that kills the wpa_supplicant before ifdown is executed (as that script explains so). I don't know shell or bash programming, but as I understood, restart only does ifdown and ifup the interfaces. **2)** Read the ifup's man page which says: > The ifup and ifdown commands may be used to configure (or,respectively, > deconfigure) network interfaces based on interface definitions in the file > /etc/network/interfaces. my `/etc/network/interfaces` does not include any configuration about the wpa_supplicant.


Expanding functionality of case switching commands in Vim

In my current work of refactoring a fairly large codebase, I find myself wanting to replace apostrophes and quotes with each other from time to time. Up until now I've been applying `s/"/'/g` for visual selections I've made, and it works fine. Recently though, I discovered the tilde (`~`) command. I thought it would be nice if I could expand its functionality to not only change the case of characters, but also exchange `"` with `'` and vice versa. Is it possible to expand its functionality to accomplish this?


Share a directory over FTP with chroot_local enabled

I'm using vsftpd. By default, when I create a user, they are jailed in their directory which is `/home/user`. I have enabled `chroot_local_user=YES`. On the other hand, I also wanted to create a shared directory for all the FTP users. so in a nutshell, they have their own directory and they have a shared group folder               /     +/home        +user1        +shared_folder      How can I give the users access to the shared directory over FTP?


How do I minimize disk space usage

One of my machines is the **2GB EeePC Surf** , a neat netbook with very limited resources. So limited that right now, I have **22MB** free space left. On it, I'm running **Arch Linux** with the **Openbox** DE and a host of needed applications for it to function as a mobile PC. What methods are available to stamp out some unnecessary used space?


Is it possible to break long lines in sshd_config?

Specifically `AllowUsers` parameter: e.g. convert this               AllowUsers user1 user2 user3 user4      to this               AllowUsers         user1         user2         user3         user4


operator in if condition

I am using the below script to move two days back when script runs at starting two days of the year and also check first and second days of every month and move two days back.               if [$month="01"] && [$day="01"];     then         date="$last_month/$yes_day/$last_year"           fulldate="$last_month/$yes_day/$last_year"     else     if [$month="01"] && [$day="02"];     then              date="$last_month/$yes_day/$last_year"           fulldate="$last_month/$yes_day/$last_year"     else        if [ $day = "01" ];     then         date="$last_month/$yes_day/$year"                 fulldate="$year$last_month$yes_day"     else             if [ $day = "02" ];     then         date="$last_month/$yes_day/$year"             fulldate="$year$last_month$yes_day"     else         date="$month/$yes_day/$year"             fulldate="$year$month$yes_day"                     fi                    fi                   fi     fi      But my bad am getting the below error message               Etime_script.sh: line 19: [06=01]: command not found     Etime_script.sh: line 24: [06=01]: command not found


Install qtile 1.6 from the source

I try to install qtile from the source, you can see also this link: Install libxcb from source When I try to launch `qtile` I have this error, I do not understand why:               Traceback (most recent call last):       File "/usr/local/bin/qtile", line 5, in <module>         pkg_resources.run_script('qtile==0.6', 'qtile')       File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 499, in run_script         self.require(requires)[0].run_script(script_name, ns)       File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1235, in run_script         execfile(script_filename, namespace, namespace)       File "/usr/local/lib/python2.7/dist-packages/qtile-0.6-py2.7.egg/EGG-INFO/scripts/qtile", line 26, in <module>         from libqtile import confreader, manager       File "/usr/local/lib/python2.7/dist-packages/qtile-0.6-py2.7.egg/libqtile/confreader.py", line 29, in <module>         import utils       File "/usr/local/lib/python2.7/dist-packages/qtile-0.6-py2.7.egg/libqtile/utils.py", line 26, in <module>         import xcbq       File "/usr/local/lib/python2.7/dist-packages/qtile-0.6-py2.7.egg/libqtile/xcbq.py", line 5, in <module>         from xcb.xproto import CW, WindowClass, EventMask     ImportError: No module named xcb.xproto      I installed all the dependency and xpyb also.


System packages not detected by the Oracle installer

I am installing Oracle 11g 32bit on Ubuntu Linux and the setup shows the following error message on `Prerequisite Checks` screen:               This is a prerequisite condition to test whether the package "make-3.80" is available on the system. (more details)     Expected Value      : make-3.80     Actual Value      : missing      On the commandline when I run `sudo apt-get install make` I get:               make is already the newest version.      There are lot of other dependencies that setup is not able to find. Why can't it find them?


Joining two files with unique identifier

I have two files with approximately 12900 and 4400 entries respectively, that I want to join. The files contain location information for all landbased weather observing stations around the globe. The largest file is updated biweekly, and the smaller once a year or so. The original files can be found here (http://www.wmo.int/pages/prog/www/ois/volume-a/vola-home.htm and http://weather.rap.ucar.edu/surface/stations.txt). The files I have are already manipulated by me with some mixed awk, sed, and bash script. I use the files to visualize data using the GEMPAK package, that is freely available from Unidata. The largest file will work with GEMPAK, but only not with its full capability. For this a join is needed. File 1 contains location information for weather observing stations, where the first 6 digits is the unique station identifier. The different parameters (station number, station name, country code, latitude longitude, and station elevation) are defined only by its position in the line, i.e. no tabs.                        060090 AKRABERG FYR                        DN  6138   -666     101              060100 VAGA FLOGHAVN                       DN  6205   -728      88              060110 TORSHAVN                            DN  6201   -675      55              060120 KIRKJA                              DN  6231   -631      55              060130 KLAKSVIK HELIPORT                   DN  6221   -656      75              060160 HORNS REV A                         DN  5550    786      21              060170 HORNS REV B                         DN  5558    761      10              060190 SILSTRUP                            DN  5691    863       0              060210 HANSTHOLM                           DN  5711    858       0              060220 TYRA OEST                           DN  5571    480      43              060240 THISTED LUFTHAVN                    DN  5706    870       8              060290 GROENLANDSHAVNEN                    DN  5703   1005       0              060300 FLYVESTATION AALBORG                DN  5708    985      13              060310 TYLSTRUP                            DN  5718    995       0              060320 STENHOEJ                            DN  5736   1033      56              060330 HIRTSHALS                           DN  5758    995       0              060340 SINDAL FLYVEPLADS                   DN  5750   1021      28      File 2 contains the unique identifier in File 1 and a second, 4 character identifier (ICAO locator).               060100 EKVG     060220 EKGF     060240 EKTS     060300 EKYT     060340 EKSN     060480 EKHS     060540 EKHO     060600 EKKA     060620 EKSV     060660 EKVJ     060700 EKAH     060780 EKAT      I want to join the two files, so that the resulting file will have the 4 character identifier in the first 4 positions in the line, i.e. the identifier should replace the 4 spaces.                        060090 AKRABERG FYR                        DN  6138   -666     101     EKVG     060100 VAGA FLOGHAVN                       DN  6205   -728      88              060110 TORSHAVN                            DN  6201   -675      55              060120 KIRKJA                              DN  6231   -631      55              060130 KLAKSVIK HELIPORT                   DN  6221   -656      75              060160 HORNS REV A                         DN  5550    786      21              060170 HORNS REV B                         DN  5558    761      10              060190 SILSTRUP                            DN  5691    863       0              060210 HANSTHOLM                           DN  5711    858       0     EKGF     060220 TYRA OEST                           DN  5571    480      43     EKTS     060240 THISTED LUFTHAVN                    DN  5706    870       8              060290 GROENLANDSHAVNEN                    DN  5703   1005       0     EKYT     060300 FLYVESTATION AALBORG                DN  5708    985      13              060310 TYLSTRUP                            DN  5718    995       0              060320 STENHOEJ                            DN  5736   1033      56              060330 HIRTSHALS                           DN  5758    995       0     EKSN     060340 SINDAL FLYVEPLADS                   DN  5750   1021      28      Is it possible to accomplish this task with some bash and/or awk script?


Remove complete line in text files based on Tags

For example : 01.txt, 02.txt, 03.txt and 04.txt has following values.               HDR|A|B|C|D|F|||||||     DTL|1|2|3|4|5|||||||||||     DTL|5|6|7|8|9|||||||||||     TLR|A|B|C|D|F|||||||      I have to remove complete lines based on tags like HDR, TLR. Once HDR and TLR lines are removed from four files, it should merge into single file . we should merge in such way , should maintain files orders after removing HDR , TLR lines.(01_latest.txt, 02_latest_txt, 03_latest.txt and 04_latest.txt) How can we achieve in UNIX Script?


Display possible corrections but do not apply them automatically

I have the following completion:               zstyle ':completion:*' completer _complete _approximate       As a result if I type something incorrectly and hit TAB I will see a list with corrected propositions (what I like) and at the same time misspelled word will be changed automatically at command line with first proposition (what I do not like). So how to get rid of this in-line automatic correction? I just want list of possible correction but command line should stick with original text.


Puzzle: transfering files between two servers (ssh, ftp, http multipart...)

A puzzle: files being uploaded in realtime by SCP to SERVER1 need to be transfered to SERVER2. But:   * SERVER1 doesn't actually have network access to SERVER2 (NAT), however SERVER2 has SSH access to SERVER1   * SERVER1 and SERVER2 both are running Linux   * SERVER2 has FTP server running, can ran HTTP server to receive files,    * SFTP server on SERVER2 is not an option   * Files transfered to SERVER2 need to be deleted from SERVER1 on successful transfer Preference is to use running FTP server on SERVER2 Any ideas on simple ways to transfer files from SERVER1 to SERVER2? ps. FTP over reverse SSH tunnel was ruled out, curl would probably work over reverse SSH tunnel with HTTP server running on SERVER2 but it requires HTTP server which is more work.


How to add zero (0) in blanks in a big file (example file is below)

Here is a example file where I need to replace blanks with zero               A   2   2   2   2   2     B   2   2   2   2   2     C   2   2   2   2   2     D   A                    E   B                    F     D     R


How to debug and fix slow autocomplete in bash?

After a recent update (Ubuntu 12.04 LTS), TAB complete on the command line is slow. After entering a partial command (e.g `evi [TAB]`) or partial filename (e.g. `evince somedocu[TAB]`) the shell, sometimes though not always, hangs for several seconds. Personally, I'd prefer a less powerfull autocomplete to a slow one. Is there a simple fix? **Edit:** Additional information related to comments:   * PATH is pretty standard. ~/bin has some bash scripts              $ echo $PATH     /home/USERNAME/bin:/usr/local/bin:/usr/bin:/bin:/usr/games        * The number of files in the working directory is less than 100.   * The autocomplete feature was especially slow after unusual disk activity (system upgrade). It is, thus, possible, that rereading /usr/bin and other directories caused the lag.


How to tell Linux Kernel > 3.0 to completely ignore a failing disk?

I am asking this question here in the hope that some Linux-kernel guru can have an answer. This question has been asked on AskUbuntu and on SuperUser without answers: thinking better, it is really Linux-kernel specific, so I think its natural place is on this forum. I have a Samsung laptop (Chronos s7) with one SATA hard disk on bus `ata:1`, which is detected as `/dev/sda`, an 8G SSD on `ata:2`, `/dev/sdb`, and various other devices on the rest of SATA interface. The problem is that the SSD disk is   * soldered to the main board (unmovable)    * busted (it just gives I/O errors for any operation)    * it does not appear in the bios (probably because it is broken) Now this disk:   * delays the boot three to five minutes trying to probe the failing disk, which is annoying;   * but the most annoying thing is that the system fails to suspend due to `/dev/sdb` failing.  Notice that I can live with the delay at boot --- what worries me is the resume/suspend thing. * * * **So the question is:** can I tell the kernel to avoid even probing the device on ata:2? In older kernel (<3.0), when I was still able to dig a bit into the source, there was a command-line parameter of the style `hdb=ignore` that would have done the trick. I have tried all the tricks proposed below with `udev` and `libata:force` kernel parameters, to no avail. Specifically, the following does not work:   1. Adding to one of the following `/etc/udev/rules.d/` a file (in early execution like `00-ignoredisk.rules` or in late as `99-ignoredisk.rules` or in both places)              SUBSYSTEMS=="scsi", DRIVERS=="sd", ATTRS{rev}=="SSD ", ATTRS{model}=="SanDisk iSSD P4 ", ENV{UDISKS_IGNORE}="1"       nor              KERNEL=="sdb", ENV{UDISKS_IGNORE}="1"      nor a lot of intermediate solutions --- this makes the disk not accessible after boot, but it is probed at boot, and still checked when suspending --- causing the suspend to fail.   2. Editing the system files `/lib/udev/rules.d/60-persistent-storage.rules` (and `udisks`, `udisks2`) changing               KERNEL=="ram*|loop*|fd*|nbd*|gnbd*|dm-|md", GOTO="persistent_storage_end"      to              KERNEL=="ram*|loop*|fd*|nbd*|gnbd*|dm-|md|sdb*", GOTO="persistent_storage_end"      again, this has some effect, masking the disk from userspace, but the disk is still visible to the kernel.   3. Booting with all the possible combinations (well, a lot of them) of the `libata:force` parameters (found for example here) in order to disable DMA, lower speed or whatever about the failing disk --- does not work. The parameter is used, but the disk is still probed and fails. Full `udevadm info -a -n /dev/sdb` pasted to http://paste.ubuntu.com/6186145/ `smartctl -i /dev/sdb -T permissive` gives:              root@samsung-romano:/home/romano# smartctl -i /dev/sdb -T permissive     smartctl 5.43 2012-06-30 r3573 [x86_64-linux-3.8.0-31-generic] (local build)     Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net          Vendor:               /1:0:0:0     Product:                   User Capacity:        600,332,565,813,390,450 bytes [600 PB]     Logical block size:   774843950 bytes     >> Terminate command early due to bad response to IEC mode page      which is clearly wrong. Nevertheless:              root@samsung-romano:/home/romano# fdisk -b 512 -C 970 -H 256 -S 63 /dev/sdb     fdisk: unable to read /dev/sdb: Input/output error      (SSD data from http://ubuntuforums.org/showthread.php?t=1935699&p=11739579#post11739579 ).


Does mc (Midnight Commander) have favourites for directories?

If I am in remote directory on different server via ssh I want to do to directory like `/var/lib/edumate/backup` without typing the whole path. Is there any way to do that in mc?


Why would someone choose FreeBSD over Linux? What are the advantages of FreeBSD compared to Linux? (My shared hosting provider uses FreeBSD.)


missing pieces of certain letters in text in Linux Mint

My problem is that as I type this message, in the second word, "problem", there are horizontal slices of missing bits in both the l and the m. Following perusal of a similar question on the askUbuntu site, my problems persist. Here are the results of my following several suggestions (answers) that were given: I've tried the `gksudo nvidia-settings` and `sudo fc-cache -v -f` suggestions to no avail /etc/lsb-base yields the distribution as: debian "Linux Mint Xfce Edition" `lspci | grep VGA` produces `00:02.0 VGA compatible controller: Intel Corporation 82915G/GV/910GL Integrated Graphics Controller (rev 04)` One suggestion suggested reinstalling an nVidia driver. Since I have an Intel VGA controller, is that suggestion pertinent? I was directed to "Administration - Hardware Drivers" but no such option is in my current "Applications" menu options. I currently have an new, odd desktop (window manager?) Another suggestion was to make an addition to xorg.conf in `/etc` or `/etc/X11`. I have no such file, only a directory: `/usr/share/X11/xorg.conf.d`


Unable to change permissions of file system root

When I write ls -la the output is :               tusharmakkar08-Satellite-C660 tusharmakkar08 # ls -la     total 88     drwxr-x---+ 10 root root  4096 Apr 18 19:43 .     drwxr-xr-x   4 root root  4096 Mar 18 17:35 ..     drwxr-xr-x   4 root root 32768 Jan  1  1970 CFB1-5DDA     drwxrwxrwx   2 root root  4096 Feb 23 00:09 FA38015738011473     drwxrwxrwx   2 root root  4096 Apr 17 14:00 Local     drwxrwxrwx   2 root root  4096 Mar 19 05:04 Local\040Disk1     drwxrwxrwx   2 root root  4096 Apr 18 19:43 Local\134x20Disk1     drwxrwxrwx   2 root root  4096 Feb 23 00:09 Local Disk     drwxrwxrwx   1 root root 24576 Apr 19 15:15 Local\x20Disk1     drwxrwxrwx   2 root root  4096 Feb 23 00:08 PENDRIVE      Now I want to change the permissions of CFB1-5DDA .. but i am unable to do so . When I write               chmod 777 CFB1-5DDA      still the permissions remain unchanged. The output of               sudo blkid -c /dev/null      is               tusharmakkar08-Satellite-C660 tusharmakkar08 # sudo blkid -c /dev/null     /dev/sda2: UUID="FA38015738011473" TYPE="ntfs"      /dev/sda3: LABEL="Local Disk" UUID="01CD72098BB21B70" TYPE="ntfs"      /dev/sda4: UUID="2ca94bc3-eb3e-41cf-ad06-293cf89791f2" TYPE="ext4"      /dev/sda5: UUID="CFB1-5DDA" TYPE="vfat"      The output of               cat /etc/fstab       is               tusharmakkar08-Satellite-C660 tusharmakkar08 # cat /etc/fstab     # /etc/fstab: static file system information.     #     #                          #Entry for /dev/sda4 :     UUID=2ca94bc3-eb3e-41cf-ad06-293cf89791f2   /   ext4    defaults    01     #Entry for /dev/sda2 :     UUID=FA38015738011473   /media/sda2 ntfs-3g defaults,locale=en_IN   0   0     #Entry for /dev/sda5 :     UUID=CFB1-5DDA  /media/tusharmakkar08/CFB1-5DDA vfat    defaults    0   0     /dev/sda3   /media/tusharmakkar08/Local\134x20Disk1 fuseblk defaults,nosuid,nodev,allow_other,blksize=4096  0   0     /dev/sda3   /media/tusharmakkar08/Local\x20Disk1    ntfs-3g defaults,nosuid,nodev,locale=en_IN  0   0          #/dev/sda3  /media/tusharmakkar08/Local\134x20Disk1 ntfs    defaults,nls=utf8,umask=0222,nosuid,nodev   0   0      And the output of               mount      is               tusharmakkar08-Satellite-C660 tusharmakkar08 # mount     /dev/sda4 on / type ext4 (rw)     proc on /proc type proc (rw,noexec,nosuid,nodev)     sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)     none on /sys/fs/fuse/connections type fusectl (rw)     none on /sys/kernel/debug type debugfs (rw)     none on /sys/kernel/security type securityfs (rw)     udev on /dev type devtmpfs (rw,mode=0755)     devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)     tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)     none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)     none on /run/shm type tmpfs (rw,nosuid,nodev)     none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)     cgroup on /sys/fs/cgroup type tmpfs (rw,relatime,mode=755)     cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,relatime,cpuset)     cgroup on /sys/fs/cgroup/cpu type cgroup (rw,relatime,cpu)     cgroup on /sys/fs/cgroup/cpuacct type cgroup (rw,relatime,cpuacct)     cgroup on /sys/fs/cgroup/memory type cgroup (rw,relatime,memory)     cgroup on /sys/fs/cgroup/devices type cgroup (rw,relatime,devices)     cgroup on /sys/fs/cgroup/freezer type cgroup (rw,relatime,freezer)     cgroup on /sys/fs/cgroup/blkio type cgroup (rw,relatime,blkio)     cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,relatime,perf_event)     /dev/sda2 on /media/sda2 type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)     /dev/sda5 on /media/tusharmakkar08/CFB1-5DDA type vfat (rw)     /dev/sda3 on /media/tusharmakkar08/Local\x20Disk1 type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)     binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)     gvfsd-fuse on /run/user/tusharmakkar08/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=tusharmakkar08)


Monitor directory and if a file is requested then rsync on demand

Is there a tool that monitors a certain directory and if a program tries to access a file in that directory, the program loads that file from another place transparent for any application that tries to load that file? The background is that I have a local development enviroment for a large server application. At the moment I sync all the files created by the users on the production system from time to time via `rsync` to my local machine. But the amount of data has become too big. I can not store the several hundreds of gigabytes from the production environment on my local dev machine. So is there a way of mimicking the files from the external system and load/sync them only from the external system if they are really needed? Writing changes to these "monitored" directories should nevertheless take only place locally.


What happens to the old binary when a new one compiled from source?

I've compiled git from source after git from the repository was already installed via the package manager. In that process, the "from source" git took its place as the "main system git".               user@jeanny:~$ git --version     git version 1.8.3.2      Is there a way to set the git from the repo as the "main system git"?


urxvt map esc key to key sequence

This question is a spin-off of Rebinding "clear prompt" in mutt I use vim keybindings a lot and like using `esc` to abort commands. I've now moved to mutt but it is not possible to bind `esc` to 'abort' in Mutt (see above). Instead, I would like to map `esc` to `esc`+`Ctrl-g`. My hope is to get the `esc` key to send both key sequences. That way `esc` is a kind of universal abort key for vim and mutt. I've mapped `Ctrl-g` to 'no operation' in .vimrc with `nmap <C-g> <nop>` so there's no conflict in Vim. Preferably I would like this mapping to be set in .Xdefaults or .Xresources so that the strange `esc` to `esc`+`Ctrl-g` mapping only applies to urxvt (my terminal em) and programs run inside it. By making this apply more globally in Xinput or Xmodmap I will have to stay on the lookout for what this mapping does to other (possibly non-cli) programs. That said, any suggestions are welcome :)


No room on ep ring?

I just switched to tty1, and I'm getting all kinds of output. It all looks like this:               [timestamp] xhci_hcd 0000:00:14.0: ERROR no room on ep ring      It's happening over 100 times per second, every 5 seconds or so, on every tty. Other similar questions say it's happening because of external drives, but the only drive I have mounted is /dev/sda1 (root), as well as a swap partition on /dev/sda5 EDIT: Here's `mount` as root:               sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)     proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)     udev on /dev type devtmpfs (rw,relatime,size=10240k,nr_inodes=1008641,mode=755)     devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)     tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=808160k,mode=755)     /dev/disk/by-uuid/eb5e28f7-395f-4556-aff4-8c8910a6295c on / type ext4 (rw,relatime,errors=remount-ro,user_xattr,barrier=1,data=ordered)     tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)     tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=4924640k)     binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)     fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)     gvfs-fuse-daemon on /home/lucas/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)     gvfs-fuse-daemon on /root/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,relatime,user_id=0,group_id=0)     truecrypt on /tmp/.truecrypt_aux_mnt1 type fuse.truecrypt (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)     /dev/mapper/truecrypt1 on /media/truecrypt1 type ext4 (rw,relatime,user_xattr,barrier=1,data=ordered)      (Note that this issue started before the truecrypt volume was mounted) My `dmseg` has been completely bloated out, nothing but this message. After rebooting, my dmesg is back to normal. It's _way_ too long to post here, so here's a pastebin link: dmesg


Why are there so few "running" processes?

On all of BSD/Linux/MacOS and Solaris, I made an observation - no matter how busy the system is, `top` always reports very few (usually 1-2) running processes. According to my limited understanding, a process is in "running" state if it is using CPU time, or waiting for CPU time to become available. So, here is a scenario: I use SSH to tunnel VNC, then run `top` on remote machine, in a Terminal emulator:   * `top` itself is listed as a "running" process (understandable)   * `sshd` is listed, but not "running"   * `Xvnc` is listed, but not "running" But `sshd` is tunneling VNC traffic, `Xvnc` is what keeps me updated with screen content, how can they not be using CPU time? If they are using CPU time, then how come they are not "running"?


Awesome floats some programs by default

I have Kubuntu with KDE and replaced KWin with Awesome WM. It works well, except that it floats Konsole and Dolphin consistently. While using KWin, I set up some KWin rules to fix the windows size, but I have deleted those rules in the KDE system settings by now, the issue persists. How can I have Dolphin and Konsole tiled by default?               awesome v3.4.15 (Never Gonna Give You Up)      • Build: Apr 28 2013 18:48:19 for x86_64 by gcc version 4.8.0 (buildd@batsu)      • D-Bus support: ✔      My rc.lua.


What is wrong with this code?

I have a script that goes like this:               while :     do        Start_Time=$(date +"%s")                MAIN PROGRAM GOES HERE (CROPPED TO SHORTEN THINGS)             Run_Time=$(( $(date +"%s") - $Start_Time ))             if [[ $Run_Time < $Wait_Time ]]        then           Delay_Time=$(( $Wait_Time - $Run_Time ))           sleep $Delay_Time        else           echo "Delay exceeded"            echo $Run_Time           echo $Wait_Time        fi     done      And my problem is that sometimes even if the run time is smaller than the wait time it fails the < test Here is an output from the last run:               Delay exceeded     Run_Time 4     Wait_Time 30


Move and empty /home partition of Ubuntu

My partitions are:   * Ubuntu's `/` on `/dev/sda1`   * Ubuntu's `/home` on `/dev/sda6/`   * Crunchbang's `/` on `dev/sda7` Now I want to install Backtrack, but for this I need to get rid of Ubuntu's `/home` and move its content somewhere else (whichever of the other partitions). How should I go about and do that without messing up the partitions table and the boot loader? ![Partitions table](http://i.stack.imgur.com/Z2B7C.png)


Graphical Interfaces cutomization and theming

I'm currently using Linux Mint 15, Cinnamon 1.8. I really like it except for the customization and theming part. In Widows 7, themes also affect the windows of programs or you can set colors. Is this not possible in Linux? In my Linux Mint I installed a black/dark theme. It affects the task bar, main menu and system tray panel but not the windows of the applications. It really looks ugly because the windows are still the default gray color while the task bar and main menu is black/dark. Is this the same for all graphical interface in Linux? or is this just cinnamon?


Turn NumLock on on startup?

I usually edit in **Vim** ,and when pressing `+`, I'd rather move my hand to the right part of the keyboard where `+` resides rather than doing `shift` \+ `=`. But when `NumLock` is not on, in Vim it just opens a new line above and inserts the letter **_k_**. And every time I start my PC `NumLock` is off. I would like to know if there is any `xmodmap` trick to turn on `NumLock`,so I could add it to my `.xinitrc`.And it would be even better if I could add it to my `.map` file which swaps `Escape` and `CapsLock` which I load with `loadkeys` in my `/etc/rc.local` on startup. I am using **_Arch Linux_**.


Limit the max connections per IP using OpenWRT?

Would the following `iptables` command on an OpenWRT router assure that no one client has more than 50 active connections?               $ iptables -I FORWARD -m connlimit --connlimit-above 50 -j REJECT --reject-with tcp-reset     iptables v1.4.6: Couldn't load match `connlimit':File not found      If so, what package do I need to install to be able to use `--connlimit`?


How to soft kill gui applications via terminal?

Is there a way to close a GUI application in friendly " _please quit yourself now_ " way, without graphical access to the applications window? For example, if Gnome/X display crashes to black, I'd like to switch to tty2 and close applications like firefox in a way which lets them save their config etc. At best without further user queries.


Cifs mount a windows share that goes offline

I have a windows share on my workstation that I need on my CentOS 7 server. I have this set up in my fstab as the following: `//XXX.XXX.X.XX/Share /mnt/workstation cifs username=X,password=X 0 0` This is working as long as my workstation is online. Once my workstation is offline it'll give errors on the /mnt/ directory and WinSCP will not connect. I have to umount the share and remount it for it to work again. Is there a better way to do this instead of remounting the drive every time?


Choose other timezone when install Debian?

![screenshot](http://i.stack.imgur.com/b3myZ.png) Why can't I select English and choose timezone outside US?


Shell spawned backgrounded process is still hanging

It seems processes spawned after `||` make the parent shell hang with them. For example, do in your terminal               $ cat <<"EOF" >/tmp/hello_im_still_here     #!/usr/bin/env bash     killall emacsclient     pgrep emacsclient || emacsclient -c &     EOF     $ chmod +x /tmp/hello_im_still_here     $ ./tmp/hello_im_still_here      and check it               $ pstree | grep emacsc          |-hello_im_still_---emacsclient      Changing the line forking the process to               pgrep emacsclient || (nohup emacsclient -c) &      doesn’t help.