psmouse sync issues!

I have Compaq CQ61-420US (64-bit AMD) laptop with Synaptics touchpad checked using               $ egrep -i 'synap' /proc/bus/input/devices     N: Name="SynPS/2 Synaptics TouchPad"      But recently after _Arch Linux 3.15-1 stock kernel_ , I have a lot of these messages in my dmesg accompanied with **mouse freezes** :               [    7.064589] psmouse serio1: synaptics: Touchpad model: 1, fw: 6.5, id: 0x1c0b1, caps: 0xa04751/0xa00000/0x0, board id: 3655, fw id: 428212     [11981.973831] psmouse serio1: TouchPad at isa0060/serio1/input0 lost sync at byte 1     [11981.975792] psmouse serio1: TouchPad at isa0060/serio1/input0 lost sync at byte 1     [11981.977503] psmouse serio1: TouchPad at isa0060/serio1/input0 lost sync at byte 1     [11981.986308] psmouse serio1: TouchPad at isa0060/serio1/input0 lost sync at byte 1     [11981.988072] psmouse serio1: TouchPad at isa0060/serio1/input0 lost sync at byte 1     [11981.988084] psmouse serio1: issuing reconnect request      And after I remove and reinstall psmouse through modprobe as mentioned here on the Arch Linux Wiki               # modprobe -r psmouse ; modprobe psmouse      I get in dmesg:               [12012.349197] psmouse serio1: synaptics: Touchpad model: 1, fw: 6.5, id: 0x1c0b1, caps: 0xa04751/0xa00000/0x0, board id: 3655, fw id: 428212`      Even though the mouse starts working, but even a short amount of inactivity it gets disabled, and I have this every now and then... sad Also I downgraded synaptics & evdev to previous versions as of now. I also tried using:               # modprobe -r psmouse     # modprobe psmouse proto=imps     # sudo modprobe psmouse proto=bare      but none of them work! I also tried changing the CPU governor to USERSPACE which was originally PERFORMANCE, no luck even then. P.S: I also posted my problem on ArchLinux Forums.


elif [ "$input" = "no" ]; then go the next statement

#!/bin/bash          input=""          echo "Does a wall needs to be sent?"     read input          if [ "$input" = "yes" ]; then         echo "Sending message to all user about a system reboot or shutdown"|wall     elif [ "$input" = "no" ]; then         exit     fi          echo "Is this a reboot or shutdown?"     read input          if [ "$input" = "reboot" ]; then         echo "System is rebooting"         shutdown -r +1     elif [ "$input" = "shutdown" ]; then         echo "System is about to shutdown"         shutdown -h +1     fi          echo "Goodbye"      what I'm trying to figure out is that if I dont send a wall than I want to get prompt the statement echo "Is this a reboot or shutdown?" how would I go about doing than instead of having the script exit when i dont want to send a wall


Can only initialize Ad-hoc mode after restarting iwlwifi mod and network manager

I am running Ubuntu 12.04.4 with network interface:                 *-network                           description: Wireless interface            product: Centrino Advanced-N 6235            vendor: Intel Corporation            physical id: 0            bus info: pci@0000:01:00.0            logical name: wlan0            version: 24            serial: c8:f7:33:8f:d3:9c            width: 64 bits            clock: 33MHz            capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless            configuration: broadcast=yes driver=iwlwifi driverversion=3.5.0-48-generic firmware=18.168.6.1 ip=145.94.189.12 latency=0 link=yes multicast=yes wireless=IEEE 802.11abgn            resources: irq:43 memory:d0400000-d0401fff      I have been trying to set up an Ad-hoc network on my laptop for some time now. I have already established that it works pretty much always at home, but not at work (I figure because there are more networks here). Today I figured I'd replace the existing driver with one from the manufacturer website, even though they seemed to be exactly the same. (`iwlwifi-6000g2b-6.ucode`, version 18.168.6.1) Unfortunately I didn't back up the old one. With the 'new' driver I was suddenly able to set up a Ad-hoc network again, using either NetworkManager (0.9.4.0-0ubuntu3):               * ipv6 ignore     * 2.4 GHz (default)     * ipv4 manual         * WEP 40/128 bit key (Hex or ASCII)     * MTU automatic      or commandline with `iwconfig` commands (With NetworkManager shutdown).               iwconfig wlan0 key 1234567890     iwconfig wlan0 mode ad-hoc     iwconfig wlan0 essid MyAdhoc     ifconfig wlan0 192.168.1.1 netmask 255.255.255.0      But here's the kicker, it fails to work after the NetworkManager establishes another connection (Infrastructure, WPA2). When it fails using the NetworkManager these lines repeatedly show up in `/var/log/kern.log`:               Apr 23 11:01:57 *** kernel: [ 2424.593393] iwlwifi 0000:01:00.0: L1 Enabled; Disabling L0S     Apr 23 11:01:57 *** kernel: [ 2424.600237] iwlwifi 0000:01:00.0: Radio type=0x2-0x1-0x0     Apr 23 11:01:57 *** kernel: [ 2424.720967] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready      and `/var/log/syslog` where I find the problem is with the wpa_supplicant:               Apr 29 17:13:39 *** wpa_supplicant[8406]: nl80211: Failed to set interface into IBSS mode     Apr 29 17:13:39 *** wpa_supplicant[8406]: Association request to the driver failed      Trying manually then results in (response to `iwconfig wlan0 mode ad-hoc`):               Error for wireless request "Set Mode" (8B06) :     SET failed on device wlan0 ; Operation not supported.      I have tried disabling ipv6 as suggested here among others to no avail. Then I tried editing the GRUB file as suggested here, which means booting with `ipv6.disable=1`. After reboot, it does eliminate the third line but it does not result in an Adhoc network. If I want to establish a new Ad-hoc network to reset the iwlwifi mod (And if I use the NetworkManager I have to be fast enough to ensure that it doesn't start on another network first).               sudo rmmod iwlwifi     sudo modprobe iwlwifi      Does anyone have an idea what the problem could be and how to resolve it?


How to run man with formatting in not interactive shell

I have webpage that process ANSI codes and output from man command (underline `A` as `A\x08_`) and I call php shell that execute `bash -c "<command>"` and print the output on the webpage. On the server (it introduce itself as "CloudLinux Server release 6.5 (Pavel Popovich)") `man` command print Ntroff (and they are in bold/underline) but on my local (XUbuntu) the output is not formatted. Why `man` command differ on these two distros and How can I create function or alias for man that will always print ntroff formatting?


Uninstall JDK rpm to reinstall

Where do I find the JDK install to uninstall? @terdon had explained using an `rpm` type download so it would be easier to uninstall, but I cannot find it.


Redirection to services in NAT or Bridged Network only with one subdomain

I have one subdomain (dyndns). xyz.dyndns.com (f.e.)   Here my question begins:     * I have a server for virtualisation.    * On the server I have multiple VMs where different web-services are available through https.   * My router is configured with xyz.dyndns.com   * VMs can be accessed over NAT or be Bridged to router How is it possible to access VM_1's and VM_2's WebService like:   `https://xyz.dyndns.com/vm_1_webservice` or   `https://xyz.dyndns.com/vm_2_webservice`   Because I need to add redirection rules to router.   I know that with bridging the VMs I can simply redirect http to the VM on router.   In my local network I have configured anything with DNAT (iptables).   I.e. when I go trought localhost(server):40001(port) f.e. I will be redirected to VM_1's WebService which is accessible through SSL. Like:   `https://127.0.0.1:40001/vm_1_webservice`   It works good. How to go on?(with nginx or apache on host?)


Count number of elements in an array

I would like to ask if there is a way to count the number of elements in an array in `ksh`.


crontab nodification is taking too much time

There are 300 processes configured in a single Linux server's crontab. if I want to stop or modify any of them, I have to comment them out (i.e. # ..cron..) for all processes. It's a time consuming process. Is there any way to avoid having to do this?


How to remove unwanted Windows domain accounts and local account from Linux Mint 17 login screen?

I added Linux mint 17 as a member of Windows 2008R2 domain controller. When I login to my domain account and switch user, I see a bunch of unwanted domain accounts and local machine accounts. I need to know how to remove these unwanted accounts. Here's a list of the accounts I see on the login screen:   * mydomain\administrator    * mydomain\guest # this account is disabled on the domain however it's still showing up    * mydomain\krbtgt # not sure what to do with this one   * hostname\Administrator # need to remove this one, not sure why I have two of them    * hostname\Guest # need to remove this one    * Administrator # need this one for local administration I am not sure if I have to edit and exclude them from /etc/mdm/mdm.conf. I forgot to mention that I am not using simple GDM style. I am using simple UserList GDM. I appreciate any help on the issue. Thank you.


Block Particular Command in Linux for Specific user

How to block command, let say `mkdir` for specific user ? What I did just created read-only function and store in users profile `~/.bashrc`               /bin/mkdir() {             echo "mkdir command not allow for you"          }          mkdir() {             echo "mkdir command not allow for you"          }     ./mkdir() {                  echo "mkdir command not allow for you"     }          readonly -f /bin/mkdir     readonly -f mkdir     readonly -f ./mkdir      **Test:**               rahul@ubuntu:~$ cd /bin/     rahul@ubuntu:/bin$ ./mkdir /home/rahul/ggg     mkdir command not allow for you     rahul@ubuntu:/bin$ cd     rahul@ubuntu:~$ mkdir testing     mkdir command not allow for you     rahul@ubuntu:~$ /bin/mkdir testing     mkdir command not allow for you      So my question is What should be the way of achieving this ? is there any tool for this ? Update 1 # But if user is smart , he could copy mkdir binary and rename it and use it . So how to achieve this ?


cannot set up lm-sensors propetly

## I actually try to get lm-sensors to work as I wish. And my only wish is to see how the cpu is doing.   (Optional HDD's, FSB and I'm open your suggestions) So I run **Debian wheezy** , and did a `apt-get install lm-sensors` After that I did a `sensors-detect`.   I said yes to all scans except the I2C/SMBus (because it says it is not safe and not because I know what I'm doing) And when I do `sensors`, this is what I get :               Adapter: PCI adapter      power1:      117.56 W  (crit = 124.95 W)          k10temp-pci-00c3 Adapter: PCI adapter      temp1:        +12.9°C  (high =+70.0°C) (crit = +70.0°C, hyst = +68.0°C)      My CPU is a **AMD FX(tm)-8120** and i did not install any kind of drivers. (I looked in the internet but cannot find a equivalent method _needed_ like in Windows) **EDIT:** So why am I only seeing the 2 entries? One shows the Watt, I don't really need this.   and the other is like 12,9°C, this is quite unrealistic because I think i should be around 40-50° based on my experience. **EDIT2:**   `sensors-detect` output > Now follows a summary of the probes I have just done.   >  Just press ENTER to continue: > > Driver `fam15h_power' (autoloaded): * Chip`AMD Family 15h power sensors' > (confidence: 9) > > Driver `k10temp' (autoloaded): * Chip`AMD Family 15h thermal sensors' > (confidence: 9) > > No modules to load, skipping modules configuration. > > Unloading cpuid... OK


How do I disable hardware detection during PXE boot?

I'm atttempting to install centOS 6.5 on a new dell machine through PXE boot. The PXE boot works fine for other PCs, just the new workstations are problematic. The PXE boot hangs on "Detecting Hardware" indefinately (I let it go for an hour without change). During a normal install at the "Boot:" menu I'd be able to put in 'noprobe' to skip hardware detection, but during a PXE boot a "Boot:" prompt appears, which does not behave the same way (it looks for an image based on the text put in ex: Boot: noprobe Image 'noprobe' does not exist Boot: linux dd Image 'linux' does not exist [linux dd is only there as an example, I do not need it]) My guess is that there is something about the hardware that's throwing off the installation, as it is quite different from the old machines that work fine. I'm wondering: a) is there a method by which I can get more information about what the installer is attempting to detect? (like a play by play [determining cpuid.....Xeon x86_64 determining RAM....128 GB ect.) b) how do I use additional boot options in conjunction with PXE? **EDIT** : Appending to initrd.img seems to read in the boot options c) is there another method to skip hardware detection? **EDIT** : Skipping the hardware detection seems to prevent the machine from downloading the KS file later (I spose that's to be expected), so it doesn't help much. d) if I do a CD install (assuming it would work), and export a KS from that installation, would it resolve the hardware detection issues for identical machines?


How to harden linux against DMA attacks?

How can I configure my linux system to be secure against DMA-attacks? Is there a way to make them impossible? ### DMA Attacks _excerptFrom wikipedia_ > In modern operating systems, non-system (i.e. user-mode) applications are > prevented from accessing any memory locations not explicitly authorized by > the virtual memory controller (called the MMU or Memory Mapping Unit). In > addition to containing damage from inadvertent software bugs and allowing > more efficient use of physical memory, this architecture forms an integral > part of the security of a modern operating system. However, kernel-mode > drivers, many hardware devices, and occasional user-mode vulnerabilities > allow the direct, unimpeded access of the physical memory address space. The > physical address space includes all of the main system memory, as well as > memory-mapped buses and hardware devices (which are controlled by the > operating system through reads and writes as if they were ordinary RAM).


sFTP server fails to start

I'm having problems getting sFTP working while there are no problems with ssh. I'm basically building zlib, openssl, and openssh for an ARM processor using an existing embedded Linux filesystem. After searching for ideas, this seemed liked a common problem, but I haven't made any progress. I only have one user defined, which is root with a empty password. I'm using openssh version 4.7p1, and I modified sshd_config with the following settings:               PermitRootLogin yes     PermitEmptyPasswords yes     UseDNS yes     UsePrivilegeSeparation no     SyslogFacility AUTH     LogLevel DEBUG3     Subsystem sftp /usr/local/libexec/sftp-server -f AUTH -l DEBUG3      The sftp-server is located in /usr/local/libexec and has the following permissions:               root@arm:/usr/local/libexec# ls -l     -rwxr-xr-x    1 root     root         65533 Oct  3 22:12 sftp-server     -rwx--x--x    1 root     root        233539 Oct  3 22:12 ssh-keysign      I know sftp-server is being found (path is set in sshd_config) because if I rename the sftp_server executable, I get the following error:               auth.err sshd[1698]: error: subsystem: cannot stat /usr/local/libexec/sftp-server: No such file or directory                                                             auth.info sshd[1698]: subsystem request for sftp failed, subsystem not found         Also, the target's login init-scripts are very simple and consists of a single file (etc/profile.d/local.sh), which only contain definitions for LD_LIBRARY_PATH, PATH and PYTHONPATH as shown below:               #!/bin/sh     export LD_LIBRARY_PATH="/usr/local/lib"     export PATH="/usr/local/bin:/usr/local/libexec:${PATH}"     export PYTHONPATH="/home/root/python"      As you can see .bashrc, .profile, etc do not exist in root's home directory:               root@arm:~# ls -la                                                                                drwxr-xr-x    2 root     root          4096 Oct  4 14:57 .                                                                                drwxr-xr-x    3 root     root          4096 Oct  4 01:11 ..                                                                                -rw-------    1 root     root           120 Oct  4 01:21 .bash_history      Here is the system log output when using FileZilla to connect to the sftp server on the target. From the log it seems that the sftp-server executable is found, but the child processes is exited immediately. I am using debug arguments when calling sftp-server in sshd_config (Subsystem sftp /usr/local/libexec/sftp-server -f AUTH -l DEBUG3), but no logs were captured.               Oct  4 14:29:45 arm auth.info sshd[2070]: Connection from 192.168.1.12 port 45888                                                                                Oct  4 14:29:45 arm auth.debug sshd[2070]: debug1: Client protocol version 2.0; client software version PuTTY_Local:_Mar_28_2012_12:33:05                                                    Oct  4 14:29:45 arm auth.debug sshd[2070]: debug1: no match: PuTTY_Local:_Mar_28_2012_12:33:05                                                                                Oct  4 14:29:45 arm auth.debug sshd[2070]: debug1: Enabling compatibility mode for protocol 2.0                                                                                Oct  4 14:29:45 arm auth.debug sshd[2070]: debug1: Local version string SSH-2.0-OpenSSH_4.7                                                                                Oct  4 14:29:45 arm auth.debug sshd[2070]: debug2: fd 3 setting O_NONBLOCK                                                                                Oct  4 14:29:45 arm auth.debug sshd[2070]: debug1: list_hostkey_types: ssh-rsa,ssh-dss                                                                                Oct  4 14:29:45 arm auth.debug sshd[2070]: debug1: SSH2_MSG_KEXINIT sent                                                                                Oct  4 14:29:45 arm auth.debug sshd[2070]: debug1: SSH2_MSG_KEXINIT received                                                                                Oct  4 14:29:45 arm auth.debug sshd[2070]: debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellma1     Oct  4 14:29:45 arm auth.debug sshd[2070]: debug2: kex_parse_kexinit: ssh-rsa,ssh-dss                                                                                Oct  4 14:29:45 arm auth.debug sshd[2070]: debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysr     Oct  4 14:29:45 arm auth.debug sshd[2070]: debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysr     Oct  4 14:29:45 arm auth.debug sshd[2070]: debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96              Oct  4 14:29:45 arm auth.debug sshd[2070]: debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96              Oct  4 14:29:45 arm auth.debug sshd[2070]: debug2: kex_parse_kexinit: none,zlib@openssh.com                                                                                Oct  4 14:29:45 arm auth.debug sshd[2070]: debug2: kex_parse_kexinit: none,zlib@openssh.com                                                                                Oct  4 14:29:45 arm auth.debug sshd[2070]: debug2: kex_parse_kexinit:                                                                                Oct  4 14:29:45 arm auth.debug sshd[2070]: debug2: kex_parse_kexinit:                                                                                Oct  4 14:29:45 arm auth.debug sshd[2070]: debug2: kex_parse_kexinit: first_kex_follows 0                                                                                Oct  4 14:29:45 arm auth.debug sshd[2070]: debug2: kex_parse_kexinit: reserved 0                                                                                Oct  4 14:29:45 arm auth.debug sshd[2070]: debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellma1     Oct  4 14:29:45 arm auth.debug sshd[2070]: debug2: kex_parse_kexinit: ssh-rsa,ssh-dss                                                                                Oct  4 14:29:45 arm auth.debug sshd[2070]: debug2: kex_parse_kexinit: aes256-ctr,aes256-cbc,rijndael-cbc@lysator.liu.se,aes192-ctr,aes192-cbc,aes128-ctr,aes128-cbc,blowfish-ctr,blowfi8     Oct  4 14:29:45 arm auth.debug sshd[2070]: debug2: kex_parse_kexinit: aes256-ctr,aes256-cbc,rijndael-cbc@lysator.liu.se,aes192-ctr,aes192-cbc,aes128-ctr,aes128-cbc,blowfish-ctr,blowfi8     Oct  4 14:29:45 arm auth.debug sshd[2070]: debug2: kex_parse_kexinit: hmac-sha1,hmac-sha1-96,hmac-md5                                                                                Oct  4 14:29:45 arm auth.debug sshd[2070]: debug2: kex_parse_kexinit: hmac-sha1,hmac-sha1-96,hmac-md5                                                                                Oct  4 14:29:45 arm auth.debug sshd[2070]: debug2: kex_parse_kexinit: none,zlib                                                                                Oct  4 14:29:45 arm auth.debug sshd[2070]: debug2: kex_parse_kexinit: none,zlib                                                                                Oct  4 14:29:45 arm auth.debug sshd[2070]: debug2: kex_parse_kexinit:                                                                                Oct  4 14:29:45 arm auth.debug sshd[2070]: debug2: kex_parse_kexinit:                                                                                Oct  4 14:29:45 arm auth.debug sshd[2070]: debug2: kex_parse_kexinit: first_kex_follows 0                                                                                Oct  4 14:29:45 arm auth.debug sshd[2070]: debug2: kex_parse_kexinit: reserved 0                                                                                Oct  4 14:29:45 arm auth.debug sshd[2070]: debug2: mac_setup: found hmac-sha1                                                                                Oct  4 14:29:45 arm auth.debug sshd[2070]: debug1: kex: client->server aes256-ctr hmac-sha1 none                                                                                Oct  4 14:29:45 arm auth.debug sshd[2070]: debug2: mac_setup: found hmac-sha1                                                                                Oct  4 14:29:45 arm auth.debug sshd[2070]: debug1: kex: server->client aes256-ctr hmac-sha1 none                                                                                Oct  4 14:29:45 arm auth.debug sshd[2070]: debug1: SSH2_MSG_KEX_DH_GEX_REQUEST_OLD received                                                                                Oct  4 14:29:45 arm auth.debug sshd[2070]: debug1: SSH2_MSG_KEX_DH_GEX_GROUP sent                                                                                Oct  4 14:29:45 arm auth.debug sshd[2070]: debug2: dh_gen_key: priv key bits set: 277/512                                                                                Oct  4 14:29:45 arm auth.debug sshd[2070]: debug2: bits set: 2052/4096                                                                                Oct  4 14:29:45 arm auth.debug sshd[2070]: debug1: expecting SSH2_MSG_KEX_DH_GEX_INIT                                                                                Oct  4 14:29:45 arm auth.debug sshd[2070]: debug2: bits set: 2036/4096                                                                                Oct  4 14:29:45 arm auth.debug sshd[2070]: debug1: SSH2_MSG_KEX_DH_GEX_REPLY sent                                                                                Oct  4 14:29:45 arm auth.debug sshd[2070]: debug2: kex_derive_keys                                                                                Oct  4 14:29:45 arm auth.debug sshd[2070]: debug2: set_newkeys: mode 1                                                                                Oct  4 14:29:45 arm auth.debug sshd[2070]: debug2: cipher_init: set keylen (16 -> 32)                                                                                Oct  4 14:29:45 arm auth.debug sshd[2070]: debug1: SSH2_MSG_NEWKEYS sent                                                                                Oct  4 14:29:45 arm auth.debug sshd[2070]: debug1: expecting SSH2_MSG_NEWKEYS                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug2: set_newkeys: mode 0                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug2: cipher_init: set keylen (16 -> 32)                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug1: SSH2_MSG_NEWKEYS received                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug1: KEX done                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug1: userauth-request for user root service ssh-connection method none                                                                         Oct  4 14:29:46 arm auth.debug sshd[2070]: debug1: attempt 0 failures 0                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug3: Trying to reverse map address 192.168.1.12.                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug2: parse_server_config: config reprocess config len 302                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug2: input_userauth_request: setting up authctxt for root                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug2: input_userauth_request: try method none                                                                                Oct  4 14:29:46 arm auth.info sshd[2070]: Accepted none for root from 192.168.1.12 port 45888 ssh2                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug1: Entering interactive session for SSH2.                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug2: fd 4 setting O_NONBLOCK                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug2: fd 5 setting O_NONBLOCK                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug1: server_init_dispatch_20                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug1: server_input_channel_open: ctype session rchan 256 win 2147483647 max 16384                                                               Oct  4 14:29:46 arm auth.debug sshd[2070]: debug1: input_session_request                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug1: channel 0: new [server-session]                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug1: session_new: init                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug1: session_new: session 0                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug1: session_open: channel 0                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug1: session_open: session 0: link with channel 0                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug1: server_input_channel_open: confirm session                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug1: server_input_channel_req: channel 0 request simple@putty.projects.tartarus.org reply 0                                                    Oct  4 14:29:46 arm auth.debug sshd[2070]: debug1: session_by_channel: session 0 channel 0                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug1: session_input_channel_req: session 0 req simple@putty.projects.tartarus.org                                                               Oct  4 14:29:46 arm auth.debug sshd[2070]: debug1: server_input_channel_req: channel 0 request subsystem reply 1                                                                             Oct  4 14:29:46 arm auth.debug sshd[2070]: debug1: session_by_channel: session 0 channel 0                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug1: session_input_channel_req: session 0 req subsystem                                                                                Oct  4 14:29:46 arm auth.info sshd[2070]: subsystem request for sftp                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug1: subsystem: exec() /usr/local/libexec/sftp-server -f AUTH -l DEBUG3                                                                        Oct  4 14:29:46 arm auth.debug sshd[2070]: debug2: fd 3 setting TCP_NODELAY                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug2: fd 7 setting O_NONBLOCK                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug3: fd 7 is O_NONBLOCK                                                                                Oct  4 14:29:46 arm auth.debug sshd[2073]: debug1: permanently_set_uid: 0/0                                                                                Oct  4 14:29:46 arm auth.debug sshd[2073]: debug3: channel 0: close_fds r -1 w -1 e -1 c -1                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug2: channel 0: read<=0 rfd 7 len -1                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug2: channel 0: read failed                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug2: channel 0: close_read                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug2: channel 0: input open -> drain                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug2: channel 0: ibuf empty                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug2: channel 0: send eof                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug2: channel 0: input drain -> closed                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug2: notify_done: reading                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug1: Received SIGCHLD.                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug1: session_by_pid: pid 2073                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug1: session_exit_message: session 0 channel 0 pid 2073                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug2: channel 0: request exit-status confirm 0                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug1: session_exit_message: release channel 0                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug2: channel 0: write failed                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug2: channel 0: close_write                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug2: channel 0: output open -> closed                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug2: channel 0: send close                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug3: channel 0: will not send data after close                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug2: channel 0: rcvd close                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug3: channel 0: will not send data after close                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug2: channel 0: is dead                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug2: channel 0: gc: notify user                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug1: session_by_channel: session 0 channel 0                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug1: session_close_by_channel: channel 0 child 0                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug1: session_close: session 0 pid 0                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug2: channel 0: gc: user detached                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug2: channel 0: is dead                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug2: channel 0: garbage collecting                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug1: channel 0: free: server-session, nchannels 1                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug3: channel 0: status: The following connections are open:\r\n  #0 server-session (t4 r256 i3/0 o3/0 fd 7/7 cfd -1)\r\n                       Oct  4 14:29:46 arm auth.debug sshd[2070]: debug3: channel 0: close_fds r 7 w 7 e -1 c -1                                                                                Oct  4 14:29:46 arm auth.info sshd[2070]: Connection closed by 192.168.1.12                                                                                Oct  4 14:29:46 arm auth.debug sshd[2070]: debug1: do_cleanup                                                                                Oct  4 14:29:46 arm auth.info sshd[2070]: Closing connection to 192.168.1.12


lftp: login, put file in remote dir and exit in a single command: proper quoting help

I want to use `lftp -c` to do an entire session in one go (as I'll be launching this from a script later on) and I managed with `-e` but that ofc leaves me with the interactive session which I don't want. Manual states               -c commands               Execute the given commands and exit. Commands can be separated with a semicolon,  `&&'               or  `||'.  Remember to quote the commands argument properly in the shell.  This option               must be used alone without other arguments.      But I dont understand how I should quote and string my commands/interactions together correctly. `lftp -e "put -O remote/dir/ /local/file.txt" -u user,pass ftpsite.com` works excellent. But I want to exit after executing the command; `lftp -c "open -u user,pass ftpsite.com" || put -O "remote/dir/ /local/file.txt"` just shouts at me, or in fact any combination of quotes I tried (`||` or `&&` regardless)


Unclaimed device in lshw

I have added in my computer a PCI Express controler card with 2 USB3 ports and 2 sata3 ports. (http://www.ldlc.be/fiche/PB00121886.html). The USB ports are working correctly but the HDD plugged in the sata port is not appearing in the devices. I ran lshw and here the result concerning the pci card:               *-pci:1                 description: PCI bridge                 product: PEX 8604 4-lane, 4-Port PCI Express Gen 2 (5.0 GT/s) Switch                 vendor: PLX Technology, Inc.                 physical id: 5                 bus info: pci@0000:05:05.0                 version: ba                 width: 32 bits                 clock: 33MHz                 capabilities: pci pm msi pciexpress normal_decode bus_master cap_list                 configuration: driver=pcieport                 resources: irq:46 ioport:7000(size=8192) memory:d6100000-d61fffff              *-ide UNCLAIMED                    description: IDE interface                    physical id: 0                    bus info: pci@0000:07:00.0                    version: 01                    width: 32 bits                    clock: 33MHz                    capabilities: ide msi pm pciexpress cap_list                    configuration: latency=0                    resources: ioport:7000(size=8) ioport:7400(size=4) ioport:7800(size=8) ioport:7c00(size=4) ioport:8000(size=16) memory:d6100000-d61001ff`      It seems that the Unclaimed IDE is the culprit and that it is unclaimed because the system found no driver for it. How can I find which driver I would need to make that ide part working? So far my google search for PEX 8604 return almost nothing concerning a linux driver. EDIT: additional info               # lspci -nn     00:00.0 Memory controller [0580]: nVidia Corporation CK804 Memory Controller [10de:005e] (rev a3)     00:01.0 ISA bridge [0601]: nVidia Corporation CK804 ISA Bridge [10de:0050] (rev f3)     00:01.1 SMBus [0c05]: nVidia Corporation CK804 SMBus [10de:0052] (rev a2)     00:02.0 USB Controller [0c03]: nVidia Corporation CK804 USB Controller [10de:005a] (rev a2)     00:02.1 USB Controller [0c03]: nVidia Corporation CK804 USB Controller  [10de:005b] (rev a3)     00:04.0 Multimedia audio controller [0401]: nVidia Corporation CK804 AC'97 Audio Controller [10de:0059] (rev a2)     00:06.0 IDE interface [0101]: nVidia Corporation CK804 IDE [10de:0053] (rev f2)     00:07.0 IDE interface [0101]: nVidia Corporation CK804 Serial ATA Controller [10de:0054] (rev f3)     00:08.0 IDE interface [0101]: nVidia Corporation CK804 Serial ATA Controller [10de:0055] (rev f3)     00:09.0 PCI bridge [0604]: nVidia Corporation CK804 PCI Bridge [10de:005c] (rev f2)     00:0a.0 Bridge [0680]: nVidia Corporation CK804 Ethernet Controller [10de:0057] (rev f3)     00:0b.0 PCI bridge [0604]: nVidia Corporation CK804 PCIE Bridge [10de:005d] (rev f3)     00:0c.0 PCI bridge [0604]: nVidia Corporation CK804 PCIE Bridge [10de:005d] (rev f3)     00:0d.0 PCI bridge [0604]: nVidia Corporation CK804 PCIE Bridge [10de:005d] (rev f3)     00:0e.0 PCI bridge [0604]: nVidia Corporation CK804 PCIE Bridge [10de:005d] (rev a3)     00:18.0 Host bridge [0600]: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration [1022:1100]     00:18.1 Host bridge [0600]: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map [1022:1101]     00:18.2 Host bridge [0600]: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller [1022:1102]     00:18.3 Host bridge [0600]: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control [1022:1103]     01:00.0 VGA compatible controller [0300]: nVidia Corporation G98 [GeForce 8400 GS] [10de:06e4] (rev a1)     04:00.0 PCI bridge [0604]: PLX Technology, Inc. PEX 8604 4-lane, 4-Port PCI Express Gen 2 (5.0 GT/s) Switch [10b5:8604] (rev ba)     05:01.0 PCI bridge [0604]: PLX Technology, Inc. PEX 8604 4-lane, 4-Port PCI Express Gen 2 (5.0 GT/s) Switch [10b5:8604] (rev ba)     05:05.0 PCI bridge [0604]: PLX Technology, Inc. PEX 8604 4-lane, 4-Port PCI Express Gen 2 (5.0 GT/s) Switch [10b5:8604] (rev ba)     06:00.0 USB Controller [0c03]: Device [1b21:1040]     07:00.0 IDE interface [0101]: Device [1b21:0611] (rev 01)     08:06.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ [10ec:8139] (rev 10)     08:0b.0 FireWire (IEEE 1394) [0c00]: Texas Instruments TSB43AB22/A IEEE-1394a-2000 Controller (PHY/Link) [104c:8023]     08:0c.0 Ethernet controller [0200]: Marvell Technology Group Ltd. 88E8001 Gigabit Ethernet Controller [11ab:4320] (rev 13)               # lspci -v -s 5:5     05:05.0 PCI bridge: PLX Technology, Inc. PEX 8604 4-lane, 4-Port PCI Express Gen 2 (5.0 GT/s) Switch (rev ba) (prog-if 00 [Normal decode])         Flags: bus master, fast devsel, latency 0         Bus: primary=05, secondary=07, subordinate=07, sec-latency=0         I/O behind bridge: 00007000-00008fff         Memory behind bridge: d6100000-d61fffff         Capabilities: [40] Power Management version 3         Capabilities: [48] MSI: Enable+ Count=1/4 Maskable+ 64bit+         Capabilities: [68] Express Downstream Port (Slot+), MSI 00         Capabilities: [a4] Subsystem: PLX Technology, Inc. PEX 8604 4-lane, 4-Port PCI Express Gen 2 (5.0 GT/s) Switch         Capabilities: [100] Device Serial Number [EDITED]         Capabilities: [fb4] Advanced Error Reporting         Capabilities: [148] Virtual Channel         Capabilities: [520] Access Control Services         Capabilities: [950] Vendor Specific Information: ID=0001 Rev=0 Len=010 <?>         Kernel driver in use: pcieport         Kernel modules: shpchp          # lspci -v -s 7:0     07:00.0 IDE interface: Device 1b21:0611 (rev 01) (prog-if 85 [Master SecO PriO])         Subsystem: Device 1b21:1060         Flags: fast devsel, IRQ 18         I/O ports at 7000 [size=8]         I/O ports at 7400 [size=4]         I/O ports at 7800 [size=8]         I/O ports at 7c00 [size=4]         I/O ports at 8000 [size=16]         Memory at d6100000 (32-bit, non-prefetchable) [size=512]         Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit-         Capabilities: [78] Power Management version 3         Capabilities: [80] Express Legacy Endpoint, MSI 00         Capabilities: [100] Virtual Channel


Vim to print file on terminal and exit

I would like vim to do this in order to have syntax highlight as set up in vim (or without need for extra tools). So instead to use `cat file | <some_sh_tool>` I would use `vim +"some_opts" +"..." +q file`. The problem is that vim restores previous screen upon exit, but using some remote access tools this didn't happen so it was basically working as cat with syntax highlight. So, is this possible ? **EDIT** Thinking more about this I think this is great thing to have. Apart from syntax highlighting other features of vim could be used while displaying file content, like line numbers, white space, wrapping,etc... especially within script and because vim is omnipresent.


What are some options for lightweight distros, specifically for virtulization?

> **Possible Duplicate:**   >  Which Linux distro is most lightweight for running virtual machines? I've been using Linux for a year or two full time. I do a lot of programming, and I'm pretty good at it, so I started making video tutorials. Sadly, one of the languages I've spent a lot of time learning only works on Windows. I can't/won't install a Windows OS to my computer, so I've been using VirtualBox as an emulator. My problem is that it runs quite slowly, which can be attributed to using Ubuntu with GNOME, having a mess of other processes and services running at the same time, and the fact that it's emulation it self. I'd like to eliminate the first two... so my question is: > ### What are some lightweight Linux distros that will give high speeds to an > emulator? * * * Here are the details of my situation.   * I have a 64 bit computer, AMD. I typically use 32 bit Linux due to compatibility issues.   * I almost _need_ a binary of the emulator. I don't think I've successfully compiled someone else's program. Hence me using Ubuntu ;-)   * VirtualBox, VMWare Player, I don't care. Anything that doesn't cost money, and can run Windows XP is fine.   * Wobbly windows, etc. don't matter. I just want it to work, it doesn't have to be pretty. Heck, I can deal with just a console as long as the emulator works.   * It doesn't have to be perfect. I'm just trying to optimize where I can. Personal experience and hard facts are both encouraged. Thanks. * * * Need more detail? Just ask! * * * ### Update I have Debian installing on my main computer right now. On a SO question I ran into, it mentions Tiny Core Linux. The site says it's 10mb, which is so small it can't come with much out of the box. Even though I installed Debian already, it's still early enough to change to something better. If there isn't a great performance kick from TCL, and Debian does what I need it to, this question's probably answered. I'll just answer and accept it.


How can I replace root / filesystem with another filesystem?

When the Linux kernel starts up, it uses initrd as the root / filesystem, then replaces that with a filesystem partition in fstab. Based on a test in an early init script, I want to replace that root / filesystem with another filesystem partition. How to do that?


Can't boot slackware after installation. Liloconfig not found

I just installed my first linux distro: slackware. The installation went fine. I followed this guy's tutorial for the setup: https://www.youtube.com/watch?v=DdwZylEQcQ0 And this guy's tutorial for the formatting the disk etc: https://www.youtube.com/watch?v=HGgAGAle1a8 Unfortunately, slackware won't boot after completing the installation. After some googling I found out that it's most likely due to LILO not working. I've installed LILO using the simple installation, selecting standard and then the MBR option (just like in the first YT video). After rebooting I'm getting the syslinux boot: menu again. If I reboot without installation USB i'll get the same as prior to installing slackware. Entering liloconfig in the boot: menu as some people online suggested resulted in something like 'liloconfig... no such file or directory found.' I would really like to use slackware right now, so can any one of you help me out? Thanks in advance! ps: If it matters, I'm installing on a stripped HP Probook 4710s


Encrypting file only with SSH -priv-key?

Suppose I want to encrypt a file so that only I can read it, by knowing my SSH private key password. I am sharing a repo where I want to encrypt or obfuscate sensitive information. By that, I mean that the repo will contain the information but I will open it only in special cases.   1. Suppose I am using SSH-agent, is there some easy way to encrypt the file for only me to open it later?   2. I cannot see why I should use GPG for this, question here; basically I know the password and I want to only decrypt the file by the same password as my SSH key. Is this possible?


store and execute redirection/piped command in script

How do you store, and later execute, a command with redirection and and a pipe? (And is it the pipe, or the redirection, or both, that's causing my problem?) I tried to print the urxvt version in a script, as well as echo the actual command. The command I use to get the version is `urxvt -help 2>&1 | head -n 2` - for some reason, urxvt prints help to `stderr`; as for the `head`, only the two first rows contain version and configuration data. In the shell, it works great, but, in the script (isolated the problem, below), it seems the third line loses its head:               #!/bin/bash          VER_URXVT='urxvt -help 2>&1 | head -n 2'     echo $VER_URXVT     $VER_URXVT


Unable to boot VM: Error 13: Invalid or Unsupported Executable Format

I used VMWare vConverter and everything converted fine, but when I try to boot I get an error: ![Error 13: Invalid or unsupported executable format](http://i.stack.imgur.com/H4h4E.jpg) The physical machine boots correctly, so I don't think it is a source machine issue. I am not sure why the VM won't boot; aren't VMs exact copies of source machines?


Setting IFS for a single statement

I know that a custom IFS value can be set for the scope of a single command/built-in. Is there a way to set a custom IFS value for a single statement?? Apparently not, since based on the below the global IFS value is affected when this is attempted               #check environment IFS value, it is space-tab-newline     printf "%s" "$IFS" | od -bc     0000000 040 011 012                  \t  \n     0000003     #invoke built-in with custom IFS     IFS=$'\n' read -r -d '' -a arr <<< "$str"     #environment IFS value remains unchanged as seen below     printf "%s" "$IFS" | od -bc     0000000 040 011 012                  \t  \n     0000003          #now attempt to set IFS for a single statement     IFS=$'\n' a=($str)     #BUT environment IFS value is overwritten as seen below     printf "%s" "$IFS" | od -bc     0000000 012              \n          0000001


tac command's option creates strange output [comprehension question]

Say I have this file, containing nothing but               a     b     c     b     a      Using `tac --separator=a file` in BASH [on a Debian based Linux], I get this:                                 # empty line                       # empty line     b     c     b     aacommand@prompt  # two a just before the prompt         **Question** : As far as I understood, `\--separator=a` defines that `a` marks the break inside the string, instead of `newline`. **Is this right?** I have tried this with other strings an much more input and ended up with quite a mess. The other options all work quite right, I presume: If I use `tac --before` I first get about five than one empty lines, but then this is about what should happen, right?


What's the story behind Super Cow Powers?

As we know, `apt-get` has Super Cow Powers and `aptitude` does not:               $ apt-get --help | grep -i cow                            This APT has Super Cow Powers.     $ aptitude --help | grep -i cow                       This aptitude does not have Super Cow Powers.      and of course, APT has an Easter egg to go with it:               $ apt-get moo              (__)               (oo)         /------\/        / |    ||         *  /\---/\          ~~   ~~        ...."Have you mooed today?"...      I'm curious, is there are story behind this Easter egg? What's its history? I know it's been in apt for a long time—from a quick grep of apt sources in old Debian releases, it gained it sometime between Debian 2.2 (potato; apt 0.3.19) and Debian 3.0 (woody; apt 0.5.4). **edit:** According to a message from Jacob Kuntz on the Debian-Devel mailing list, it was in apt 0.5.0 in Feb. 2001. A message from Matt Zimmerman on the Debian bug tracker makes it sound like 0.5.0 is when it was added.


Creating an Alias to Loopback Interface with an Arbitrary Name

I have an odd problem that seems simple enough but has evaded me thus far. I am attempting to support a legacy application that has a hard-coded ethernet device name ("eth0"). This hard-coding, I am told, will not change. Now, we are attempting to bring this software in a much more modern OS (Fedora 17) that uses persistent device naming and, as such, has no "eth0" interface. Furthermore, this effort requires that I use the loopback interface for communication to another module as part of a virtualization effort (there is actually a LOT more going on here, but that would take way too long to describe). I am aware that it is possible to create an alias of the form "lo:0", however the software is explicitly looking for "eth0" and my research and testing thus far has indicated that the "iface:N" naming scheme is the only one supported. So, in short: **Is there any way to create a virtual interface named "eth0" that communicates over lo?**


How can I silence ssh-agent?

I have a script like this one at my `.bashrc` file at the `mysuer` home:               eval `ssh-agent`     ssh-add /path/to/my/key      The problem is I have this output when I log with the user `mysuer` (`su - myuser`):               Agent pid 1234     Identity added: /path/to/my/key (/path/to/my/key)      I would like avoid this, silence this output, but load the `ssh-agent` and `ssh-add`. How can I perform this?


Can I ssh to a server through a pptp tunnel?

I'm new to VPNs, so there's a good chance I'm completely misunderstanding my needs here. My workplace is setup so that I can only ssh into its servers when either (a) I'm using a computer in the building or (b) I'm connected via VPN. Naturally, they only support VPN through Windows, so I'm on my own for figuring out how to (and whether I even can) get it working on linux. I have a start on connecting to the VPN on the command line. If I type:               pon work      it'll connect using the settings in `/etc/ppp/peers/work` with the following syslog output:               [pppd] pppd 2.4.6 started by root, uid 0     [pppd] Using interface ppp0     [pppd] Connect: ppp0 <--> /dev/pts/3     [pppd] pppd 2.4.6 started by root, uid 0     [pppd] Using interface ppp1     [pppd] Connect: ppp1 <--> /dev/pts/4      and then, 30 seconds later:               [pppd] LCP: timeout sending Config-Requests_     [pppd] Connection terminated.     [pppd] Modem hangup     [pppd] Exit.     [pppd] LCP: timeout sending Config-Requests_     [pppd] Connection terminated.     [pppd] Modem hangup     [pppd] Exit.      It's around here that I took a step back and realized that I have no idea how I'll even know if it's working. I did manage to find this page on PPTP routing, but I have no idea what kind of route I even want to setup. Do I want client-to-LAN? The server I'm connecting to is public-facing; it just only accepts ssh connections from machines in the building (or, allegedly, over VPN). So I don't see how client-to-LAN would help me, since I really just want traffic to a particular IP address to go through the PPTP tunnel. For all intents and purposes, my home machine has no GUI whatsoever. I'm only interested in connecting to a single computer via port 22 through the VPN. My questions at this point:   1. Is what I'm trying to do possible (assuming I get my PPTP client working)?   2. Can you point me to any examples of somebody who's made this work? All I can find are people doing the opposite (i.e. PPTP through an ssh tunnel), and it doesn't help that I have no idea what I'm doing.


Linux process "scheduling"

I've seen it written many times that the Linux scheduler schedules processes. I'm teaching a course on multithreaded programming, and would like to get my terminology straight. I have one thing I would like to say about it (written below), hoping someone can help me clear out the most egregious errors: > It's not the process that the scheduler schedules, it's the _thread_ > associated to that process. The process is simply a bunch of memory mapping > segments, and thus static. We can see this clearly when we > `pthread_create()` or even `clone()` (mostly, but not exactly, the same), > whereby one process has several threads, and it is those that are scheduled > (otherwise you would only schedule the process thread (the PID=TID one), > rather than any other. I assume the ambiguity is due to the fact that all > processes have at least one thread of execution. Is this the correct (although simplified) picture?


Any programs suitable for making a database over disk-content?

I have quite a lot of external hard-drives, and often have a hard time finding what I'm looking for - not to mention not storing the same file several times on different drives or finding free space when I need. I was therefor wondering if there are any database-programs suitable for storing the content of disks; including filenames, size and modification dates? Generally, the more automated the program is in searching each disk and parse information about the files, the better. Ideally, it should use a checksum (or something) to identify an identical files. A database that also stores information about each disk - like partitioning, format (filesystems) and free space remaining (on each partition) - would be a plus. I have MySQL and PostgreSQL, as well as Apache with PHP, running on my computer, so I can use solution based on these. Though I'm really after a more specialized stand-alone program; at least for managing collections, but preferably specialized for keeping track of files on multiple disks. I'm also open to unconventional approaches (using a program intended for something else). Has anybody had a similar problem and found a good solution?


Arch Linux: Apache just isn't interpreting the index.php files

Title is self explanatory. I'm on Arch Linux, I installed the `apache`, `php`, `php-apache` and `mariadb` packages. I have added the following line to the `/etc/httpd/conf/httpd.conf` file:               LoadModule php5_module modules/libphp5.so      However it doesn't seem to make a difference. It recognizes index.html files flawlessly, it renders them correctly as well. However if it's a index.php file then it just reads it as-is. What I get on the browser is the text contents of the file, as if it was a text editor but without the text editing. Any info that you need to help I will happily provide. :)


Program for identifying files from unfinished torrent-downloads?

Are there any programs that can help identify files and directories belonging to unfinished bittorrent-downloads? I've made a mess, and I'm unsure of which downloads are finished and which are not. I could obviously use the bt-client, if I still had the torrent-files, but I don't. I'm therefor looking for way to identify _likely_ unfinished bt-downloads - doesn't have to be 100% accurate. I've noticed that bt-clients typically create empty-files, as well as leave files with "holes" (blocks of the file with just NULL-characters), so this could perhaps be a good way to find likely candidates. Sadly, I don't know any good Linux-commands for finding files with blocks of NULLs...


Mplayer2 stuck when I press XF86Audio keys

When mplayer2 got focused, if I press XF86 audio keys, e.g. volume up, it gets stuck for one second then continues to play the video. If mplayer is not focused, that won't happen. Is there any way to prevent that behavior? Running `MPlayer2 UNKNOWN (C) 2000-2012 MPlayer Team`, Arch Linux, Kwin + RazorQt desktop


Installing Dovecot and Exim on CentOS 6.4

I've been looking for some guides on setting up a secure Dovecot and Exim mail server setup on CentOS 6.4, however it seems there's nothing out there. Does anyone know of any guides - or - if someone could push me in the right direction that'd be fantastic.


bash - reading user variable into bash script grep

I've tried every possible combination to get this bash script working. It's part of a larger script, and it basically prompts for a username (to check if it exists) and returns the appropriate response:               #! /bin/bash     # Script to see if User exists          clear     echo -n "Enter user to check: "     read $uzer          grep -c '^${uzer}:' /etc/passwd          if [ $? -eq 0 ]; then       echo "User does exist :)"     else       echo "No such user"     fi      In terminal the following works fine:               grep -c '^devuser1:' /etc/passwd     RETURNS: 1     grep -c '^devuser1234:' /etc/passwd     RETURNS: 0      I've tried many combinations of passing the read variable into `'^${uzer}:'` with no joy. Any ideas what else I can try?


Insert a character that isn't present on my keyboard on Linux Mint

As stated in the title: How can I use `Alt+<ASCII CODE>` on Linux (Mint 16) on a netbook which doesn't have a num pad nor a "Num lock" button? I found lots of tutorials for Windows, but no one with Linux. I also tried using Alt+"Fn" key but I just get some strange behavior on terminal,like (while running `gdb`) :               (arg: 23)


grep for words of no more than a certain length

I'm looking for a way to grep things like: `i log for E M, i 1 f x i 0, I xi 1, 3 1,.` simply based on number of characters. Nothing in that hypothetical output is longer than three characters. This hypothetical one-liner would look something like, `grep -v [:alnum:] > {3}`. (Except I just don't know how to write that in grep syntax.)


How to read an IP address backwards?

If we have this string (IP address): `192.168.1.1` How can I derive the (DNS reverse record form) from this string, so it will be shown like `1.1.168.192.in-addr.arpa` using a shell script?


How to determine the current Enhanced Zoom factor in Compiz?

When I use Skype :( need to, rather than want to ), I find that I sometimes want to open the main menu, but it doesn't have a shortcut key assigned to it (well, not one that I can find). I have written a bash/python script which searches for and clicks on Skype's main menu icon. This works quite well when the icon is within the screen area and when it is off-screen with a normal sized (un-zoomed) screen. However, I cannot find a way to locate the icon so that I can move it into the zoomed screen area (so the script can send a mouse-click to it). To do this the current Compiz Enhanced Zoom factor needs to be known. I would like to know if this value is accessible, and how? ... and maybe; **Is** there a shortcut key for Skype's main menu? but I still want to know about the Compiz value, as the issue has come up before, and probably will again. (using Ubuntu 10.04, compiz 0.8.4)


Trying to sort on two fields, second then first

I am trying to sort on multiple columns. The results are not as expected. Here's my data (people.txt):               Simon Strange 62     Pete Brown 37     Mark Brown 46     Stefan Heinz 52     Tony Bedford 50     John Strange 51     Fred Bloggs 22     James Bedford 21     Emily Bedford 18     Ana Villamor 44     Alice Villamor 50     Francis Chepstow 56      The following works correctly:               bash-3.2$ sort -k2 -k3 <people.txt                                                                                Emily Bedford 18                                                                                James Bedford 21                                                                                Tony Bedford 50                                                                                Fred Bloggs 22                                                                                Pete Brown 37                                                                                Mark Brown 46                                                                                Francis Chepstow 56                                                                                Stefan Heinz 52                                                                                John Strange 51                                                                                Simon Strange 62                                                                                Ana Villamor 44                                                                                Alice Villamor 50      But, the following does not work as expected:               bash-3.2$ sort -k2 -k1 <people.txt                                             Emily Bedford 18                                                                                James Bedford 21                                                                                Tony Bedford 50                                                                                Fred Bloggs 22                                                                                Pete Brown 37                                                                                Mark Brown 46                                                                                Francis Chepstow 56                                                                                Stefan Heinz 52                                                                                John Strange 51                                                                                Simon Strange 62                                                                                Ana Villamor 44                                                                                Alice Villamor 50      I was trying to sort by surname and then by first name, but you will see the Villamors are not in the correct order. I was hoping to sort by surname, and then when surnames matched, to sort by first name. It seems there is something about how this should work I don't understand. I could do this another way of course (using awk), but I want to understand sort. I am using the standard Bash shell on Mac OS X. Many thanks!


Sort only on the second column

I'm trying to sort a file where typically (not always) the lines are               whatever:[A-Ba-b0-9_]: values      where fields are separated with `:`. Some lines do not follow this pattern, I'm not interested in them, they can be anywhere in the output. I want to sort the lines only on the second column (and not on values), but when I do `sort -t: -k 2 myfile`, it sorts the file on all the line. How to use the `-k` in order to have what I need?


How does -k flag work in sort command?

I have got a dataset like this:               manufacturer,model,year,mileage,price     plym fury 1970 73 2500      chevy malibu 1999 60 3000     ford mustang 1965 45 10000     volvo s80 1998 102 9850     ford thundbd 2003 15 10500     chevy malibu 2000 50 3500     bmw 315i 1985 115 450     honda accord 2001 30 6000     ford taurus 2004 10 17000     toyota rav4 2002 180 750     chevy impala 1985 85 1550     ford explor 2003 25 9500      I am supposed to sort the file by the manufacturer and then by the price within a manufacturer. The book says that this command will do it:               sort -t ' '  a -k1,1 -k5      My question is that what is the difference between the command above and this command               sort -t ' '  a -k1 -k5      I checked the output of both of command alone with `-k1` and `-k1,1` like this               sort -t ' '  a -k1,1           sort -t ' '  a -k1      and both of them were the same, and why is it that when are adding `-k5` the output in these two cases are different. I am not able to understand the difference between `-k1` and `-k1,1` properly in terms of functioning, Can anyone explain this to me with the context of the given dataset.


Check if a file or folder has been patched already

Is it possible to know if a file has been patched already, before apply the patch? I need to do this in a script, any thoughts?


Replace matches with multiline string using sed

> **Possible Duplicate:**   >  Insert a multiline string into another string I have a file called `foo.txt` containing:               foo     bar     baz      I want to replace every occurence of `bar` with a multiline string, stored in the variable `$bar`:               1     2     3      Resulting in:               foo     1     2     3     baz      I can do this in `awk` using:               echo "$bar" | awk '{             if(FILENAME == "-")             {                 if(i != "")                 {                     i = i"\n"                 }                 i = i$0             }             else             {                 if($0 == "bar")                 {                     printf i                 }                 else                 {                     print                 }             }         }'      However trying to do the same in `sed` using `sed 's/bar/'"$bar"'/' foobar.txt` gives the error:               sed: 1: "s/bar/1     2     3/": unescaped newline inside substitute pattern      Can this be fixed? If there is an even easier way of doing this using another standard tool, I would like to know that too.


Make Apache view hidden files (Solaris)

Is it possible to make an Apache server like this               Apache/1.3.41 Server at user.it.uu.se Port 80      display hidden files (i.e., those who start with a dot) in a specific directory? I have some configuration there that's accessible (no problem), only those files don't show when I navigate to that directory. (Of course, you could set up an HTML interface with links, etc., even automatize update, but I'd rather just view the files like any others.) It's my school's server, so I can't configure it apart from putting a file in that directory, telling the server to override the habit of not showing hidden files. Is this something you normally do, and, if so, how? The system, if it matters (with `uname -a`):               SunOS yxan.it.uu.se 5.10 Generic_147440-25 sun4u sparc SUNW,Sun-Fire-V240


Is there a text-only equivalent (no curses) of `zenity --question`?

For my mercurial commit hook, I want to run my test cases and be asked whether I really want to commit if any of the tests fail. I'm thinking something like `<run-the-tests> || <ask-yes-no>` is the way to go, except I don't know what to put in the `<ask-yes-no>` spot. My best solution so far is `zenity --question`, but I would like something that doesn't depend on X11. Then there's `dialog`, but that depends on curses which is a no-go inside an emacs shell. So, I'm pretty stumped. How do I turn a yes-or-no user input into a zero-or-nonzero exit status?


Convert images into avi with Raspberry Pi

I'm following this page: Creating Timelapse Videos With The Raspberry Pi Camera. But every time I try to make the video, I get this error: ![ss of error](http://i.stack.imgur.com/sNSKy.png) _original:http://i.imgur.com/VLJrK8q.png_ Specifically this command from the output above:               $ avconv -r 10 -i pic_%04d.png -r 10 -vcodec libx264 -crf 20 -g 15 \           -vf crop=2592:1458,scale=1280:720 timelapse.mp4     ...     ...     Output #0, mp4, to 'timelapse.mp4':     Output file #0 does not contain any stream      Also when using `mencoder`, following this page: 6.8. Encoding from multiple input image files (JPEG, PNG, TGA, etc.):         ![ss of error](http://i.stack.imgur.com/skswM.png) _original:http://i.imgur.com/aY5ZAcm.png_ Can someone please help?


Can't change to Korean-named directory on my debian server

I made a _rsync_ backup of some directories from a macbook laptop to a debian server. Some of these have korean characters ( _Hangeul_ ) in their names. After fixing my server's locale, it displays well when I do a _ls_ for instance. But I can't _cd_ to it. Example:               $ ls -1 | head     한국어     dirA     dirB     …      But if try to go browse that directory:               $ cd 한 국 어     cd: 3: can't cd to 한국어      Any idea what's wrong and how to fix it ?


Unable to SSH into Google Cloud Server after Reboot

I was learning to configure a Debian server and familiarising myself with the common command lines. However, after executing the `reboot` command in SSH, my subsequent SSH connections were refused and I have total no access to the server. I was able to `ping` the server. I attempted to reboot through the Google cloud interface too, however I was still unable to connect successfully. Having this as a cloud server, I do not have any physical access to the server. The solution that I seem to see are to reconfigure the SSH settings which I can't without logging in. What are the possible alternatives I have now or recreating a new instance is the only solution?


bash: Using read <<<"$VARIABLE" on a read-only root partition

Just by coincidence I had to use my ATA-ID-to-device-name script (found here: http://serverfault.com/questions/244944/linux-ata-errors-translating-to-a- device-name/426561#426561) on a **read-only** `/` partition. In case you're curious, it was an Ubuntu recovery console which will let you access your `/` partition, but will mount it read-only by default. I am glad about that, because otherwise I would probably never have found out that my script behaves strangely on a R/O system due to a specific line, this one:               IFS=: read HostMain HostMid HostSub <<< "$HostFull"      This does _not_ work if there is no write permission. I wouldn't have assumed it would fail, though. But apparently the `<<<` operator _does_ require to write some temporary file to somewhere. But is there any way to circumvent the creation of a temporary file, or, is there any way to specify where the file is written to? In the Ubuntu recovery console, there is---oddly enough---write permission on the `/run` directory, so that would do, if I could somehow "tell" `read` to write the temp file to somewhere else than usual.


Occasional screen blackouts on Debian 7

I installed Debian 7 on an Asus Eee PC 2101HA. Sometimes the screen goes black for 1 second. My VGA card is `VGA compatible controller: Intel Corporation System Controller Hub (SCH Poulsbo) Graphics Controller (rev 07)`


Hauppage WinTV USB 40001

I have tried, unsuccessfully, to hook up my (very old) video capture device. I have tried making it work with `tvtime`, but to no avail. I've tried sending messages to th e dsitribution list but I've had no replies yet (no wonder, it was today, but I've decided to take a more proactive apprach :). Maybe some of you have had the same issue? Here's the error:               Your capture card driver: USBVision [Hauppauge WinTV USB (NTSC M/N)/usb-     0000:00:1d.0-1.8/     does not support full size studio-quality images required by tvtime.     This is true for many low-quality webcams.  Please select a     different video device for tvtime to use with the command line     option --device.      Any ideas?


Trying to login-in in the Ubuntu tty

I am having some trouble starting the recently upgraded Ubuntu. So, I try to boot in recovery mode, and start a terminal (with Ctrl + Alt + F1). However, when the terminal starts, I get the prompt               Username:$login:       but it doesn't get my usual username. When I type it + Return, it doesn't ask for my password. How can I login in this case?


Does tar create new inodes to be archived?

When tar is asked to archive a directory, does it create a new inode for each file system object? If yes, how does it query and save the meta-data? Won't the format of storing this inode metadata vary from system to system? How does tar maintain a consistent output?


why can't I install packages with rpm? I get "transaction lock"

I'm having problems with `yum` and I am trying to re-install it. I've download `yum.3.2.0-40-el6.centos.noarch.rpm`. When I try:               $ rpm -ivh yum.3.2.0-40-el6.centos.noarch.rpm      I get: > error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Permission > denied) I tried running `su -` and I'm getting this error: > -bash: su: command not found` I get the same "permission denied error" if I try to uninstall `yum` and force ignore dependencies (without forcing to ignore dependencies, it fails uninstall with a few dependencies).


Can I list only specific subdirectories?

I have a folder tree structure like               arndell     \_databases       \_daily       \_weekly     claremont     \_databases       \_daily       \_weekly     monte     \_databases       \_daily       \_weekly      and I am only after all files inside weekly and daily directories. Is there a way I can achieve that using shell command or commands? I tried `ls -R */weekly/` from the top folder but it didn't work.


Convince apt-get *not* to use IPv6 method

The ISP I work at is setting up an internal IPv6 network in preparation for eventually connecting to the IPv6 internet. As a result, several of the servers in this network now try to connect to security.debian.org via its IPv6 address by default when running `apt-get update`, and that results in having to wait for a lengthy timeout whenever I'm downloading updates of any sort. Is there a way to tell apt to either prefer IPv4 or ignore IPv6 altogether?


$VAR vs ${VAR} and to quote or not to quote

I can write               VAR=$VAR1     VAR=${VAR1}     VAR="$VAR1"     VAR="${VAR1}"      the end result to me all seems about the same. Why should I write one or the other? are any of these not portable/POSIX?


when to use double quotes with a variable in shell script?

I am in a confusion with what is meant by the double quotes referring to a variable. For example following two scripts gives the same output. What is really meant by the double quotes? Script1               getent passwd | while IFS=: read a b c d e f ; do     echo login "$a" is "$d"     done      script 2               #! /bin/sh          getent passwd | while IFS=: read a b c d e f ; do              echo login $a is $d     done


what is diffrence between "$var" and "${var}"

i have seen in many script usage of `"$var"` and `"${var}"`, so I just want to know diffrence between `"$var"` and `"${var}"`


What is the difference having double quotes or not in bash

I have some bash scripts, one which has the following content:               #!/bin/bash     source $(dirname ${BASH_SOURCE[0]})/script.sh      while the other one has the following content:               #!/bin/bash     source "$(dirname ${BASH_SOURCE[0]})/script.sh"      How do these scripts behave differently and why? What _is_ the difference?


How does a kernel mount the root partition?

My question is with regards to booting a Linux system from a separate /boot partition. If most configuration files are located on a separate / partition, how does the kernel correctly mount it at boot time? Any elaboration on this would be great. I feel as though I am missing something basic. I am mostly concerned with the process and order of operations. Thanks! EDIT: I think what I needed to ask was more along the lines of the dev file that is used in the root kernel parameter. For instance, say I give my root param as root=/dev/sda2. How does the kernel have a mapping of the /dev/sda2 file?


Installing Kali Linux dual boot Windows 8

I have Windows 8 currently installed on my computer I created a 350gb partition. I removed secure boot and enabled legacy boot sources, I booted into a live environment, installed Kali, everything went smooth and flawless, it prompted me that the next time I reboot it will show the Grub boot loader so I reboot and it doesn't show the boot loader. Is there something I did wrong? I asked someone what they thought and he said I didn't install grub on the MBR, I installed it on the partition itself, but I followed the tutorial on this link http://docs.kali.org/installation/dual-boot-kali-with-windows


Getting "Not found" message when running a 32-bit binary on a 64-bit system

I have currently a strange problem on debian (wheezy/amd64). I have created a chroot to install a server (i can't give any more detail about it, sorry). Let's call its path `/chr_path/`. To make things easy, I have initialized this chroot with a debootstrap (also wheezy/amd64). All seemed to work well inside the chroot but when I started the installer script of my serveur I got : `zsh: Not found /some_path/perl` (the installer includes a perl binary for some reasons) Naturally, I checked the `/some_path/` location and I found the "perl" binary. `file` in chroot environment returns :               /some_path/perl ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.2.5, not stripped      The file exists, seems ok, has correct rights. I can use `file`, `ls`, `vim` on it but as soon as I try to execute it - `./perl` for example - I get : `zsh: Not found ./perl`. This situation is quite ununderstable for me. Moreover :   * I can execute other basic binaries (/bin/ls,...) in the chroot without getting errors   * I have the same problems for other binaries that came with the project   * When I try to execute the binary from the main root (`/chr_path/some_path/perl`), it works.   * I have tried to put one of the binaries with a copy of my `ls`. I checked that the access rights were the same but this didn't change anything (one was working, and the other wasn't)


"No such file or directory" when I clearly see the file listed with correct permissions

> **Possible Duplicate:**   >  Getting "Not found" message when running a 32-bit binary on a 64-bit system Ok I feel like I'm having some sort of brain fade moment, please help me out. I just installed Unreal Tournament on my Linux Mint Debian Edition OS. The startup script was complaining about a missing file so I decided to check it out manually.               ~/Desktop $ ut     /usr/local/bin/ut: 78: ./ut-bin: not found     ~/Desktop $ cd /usr/local/games/ut/System/     /usr/local/games/ut/System $ ls -l ut-bin      -rwxrwxr-x 1 root staff 91336 Jan 28 11:33 ut-bin     /usr/local/games/ut/System $ ./ut-bin      bash: ./ut-bin: No such file or directory      `ut-bin` is a binary executable according to the `file` command. Why is bash complaining about a missing file? I tried executing it in another shell and got a similar error. I also launched a new terminal with no change. What am I missing here?


executable lies about own existence

Okay, I'm completely baffled on this one. I'm installing a piece of software called InterPro Scan for my superiors, and it is complaining about an executable not existing. Please see below.               root@cpt:/usr/local/lib/iprscan# bin/Linux/seqret      bash: bin/Linux/seqret: No such file or directory     root@cpt:/usr/local/lib/iprscan# ls bin/Linux/seqret      bin/Linux/seqret     root@cpt:/usr/local/lib/iprscan# stat bin/Linux/seqret        File: `bin/Linux/seqret'       Size: 949624          Blocks: 1856       IO Block: 4096   regular file     Device: 801h/2049d      Inode: 38541532    Links: 1     Access: (0755/-rwxr-xr-x)  Uid: ( 1257/ UNKNOWN)   Gid: ( 1055/ UNKNOWN)     Access: 2013-06-17 17:28:41.317364148 -0500     Modify: 2009-12-16 05:57:46.000000000 -0600     Change: 2013-06-17 17:28:33.049363860 -0500      Birth: -     root@cpt:/usr/local/lib/iprscan# md5sum bin/Linux/seqret      bc08e679fb146bc47e6f41636dcc1f88  bin/Linux/seqret     root@cpt:/usr/local/lib/iprscan# file /usr/local/lib/iprscan/bin/binaries/seqret          /usr/local/lib/iprscan/bin/binaries/seqret: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.2.5, not stripped      It exists! But it says it doesn't? I'm incredibly confused.               root@cpt:/usr/local/lib/iprscan# /usr/local/lib/iprscan/bin/iprscan -cli -i /usr/local/lib/iprscan/test.seq -o /usr/local/lib/iprscan/test.out -format raw -goterms -iprlookup      This calls the wrapper script:               /usr/local/lib/iprscan/conf/seqret.sh: line 18: /usr/local/lib/iprscan/bin/binaries/seqret: No such file or directory     /usr/local/lib/iprscan/bin/iprscan: checkParams: unable to create input files: formatSequences:       This is the original call to the wrapper script:               /usr/local/lib/iprscan/conf/seqret.sh  /usr/local/lib/iprscan/tmp/20130617/iprscan-20130617-17561022/iprscan-20130617-17561022.seqs > /usr/local/lib/iprscan/tmp/20130617/iprscan-20130617-17561022/iprscan-20130617-17561022.input.formatted: exit status 127      All of the input files exist. The wrapper script itself               root@cpt:/usr/local/lib/iprscan# cat /usr/local/lib/iprscan/conf/seqret.sh     #!/bin/bash          ##### NOTE ####     # Should be already set by iprscan_wrapper.pl.     # If not just add the full path to your iprscan installation     #IPRSCAN_HOME=/your/path/here/to/iprscan     ###############     IPRSCAN_HOME=/usr/local/lib/iprscan          #Needed for seqret & sixpack emboss applications     EMBOSS_ROOT=$IPRSCAN_HOME/conf     export EMBOSS_ROOT          EMBOSS_ACDROOT=$IPRSCAN_HOME/conf/acd     export EMBOSS_ACDROOT          # "$@" is related to the command line of formatcmd tag in file iprscan.conf.     $IPRSCAN_HOME/bin/binaries/seqret -osf fasta -auto -stdout "$@"


problem occur during installation of moses scripts

> **Possible Duplicate:**   >  /bin/sh: ./check-dependencies.pl: not found — but check-dependencies.pl > exists! I obtain an error when I compile `moses-script`, which reads as follows:               minakshi@minakshi-Vostro-3500:~/Desktop/monu/moses/scripts$ make release     # Compile the parts     make all     make[1]: Entering directory `/home/minakshi/Desktop/monu/moses/scripts'     # Building memscore may fail e.g. if boost is not available.     # We ignore this because traditional scoring will still work and memscore isn't used by default.     cd training/memscore ; \           ./configure && make \           || ( echo "WARNING: Building memscore failed."; \                echo 'training/memscore/memscore' >> ../../release-exclude )     checking for a BSD-compatible install... /usr/bin/install -c     checking whether build environment is sane... yes     checking for gawk... no     checking for mawk... mawk     checking whether make sets $(MAKE)... yes     checking for g++... g++     checking whether the C++ compiler works... yes     checking for C++ compiler default output file name... a.out     checking for suffix of executables...     checking whether we are cross compiling... no     checking for suffix of object files... o     checking whether we are using the GNU C++ compiler... yes     checking whether g++ accepts -g... yes     checking for style of include used by make... GNU     checking dependency style of g++... gcc3     checking for gcc... gcc     checking whether we are using the GNU C compiler... yes     checking whether gcc accepts -g... yes     checking for gcc option to accept ISO C89... none needed     checking dependency style of gcc... gcc3     checking for boostlib >= 1.31.0... yes     checking for cos in -lm... yes     checking for gzopen in -lz... yes     checking for cblas_dgemm in -lgslcblas... no     checking for gsl_blas_dgemm in -lgsl... no     checking how to run the C++ preprocessor... g++ -E     checking for grep that handles long lines and -e... /bin/grep     checking for egrep... /bin/grep -E     checking for ANSI C header files... yes     checking for sys/types.h... yes     checking for sys/stat.h... yes     checking for stdlib.h... yes     checking for string.h... yes     checking for memory.h... yes     checking for strings.h... yes     checking for inttypes.h... yes     checking for stdint.h... yes     checking for unistd.h... yes     checking n_gram.h usability... no     checking n_gram.h presence... no     checking for n_gram.h... no     checking for size_t... yes     checking for ptrdiff_t... yes     configure: creating ./config.status     config.status: creating Makefile     config.status: creating config.h     config.status: config.h is unchanged     config.status: executing depfiles commands     make[2]: Entering directory `/home/minakshi/Desktop/monu/moses/scripts/training/memscore'     make  all-am     make[3]: Entering directory `/home/minakshi/Desktop/monu/moses/scripts/training/memscore'     make[3]: Leaving directory `/home/minakshi/Desktop/monu/moses/scripts/training/memscore'     make[2]: Leaving directory `/home/minakshi/Desktop/monu/moses/scripts/training/memscore'     touch release-exclude # No files excluded by default     pwd=`pwd`; \         for subdir in cmert-0.5 phrase-extract symal mbr lexical-reordering; do \           make -C training/$subdir || exit 1; \           echo "### Compiler $subdir"; \           cd $pwd; \         done     make[2]: Entering directory `/home/minakshi/Desktop/monu/moses/scripts/training/cmert-0.5'     make[2]: Nothing to be done for `all'.     make[2]: Leaving directory `/home/minakshi/Desktop/monu/moses/scripts/training/cmert-0.5'     ### Compiler cmert-0.5     make[2]: Entering directory `/home/minakshi/Desktop/monu/moses/scripts/training/phrase-extract'     make[2]: Nothing to be done for `all'.     make[2]: Leaving directory `/home/minakshi/Desktop/monu/moses/scripts/training/phrase-extract'     ### Compiler phrase-extract     make[2]: Entering directory `/home/minakshi/Desktop/monu/moses/scripts/training/symal'     make[2]: Nothing to be done for `all'.     make[2]: Leaving directory `/home/minakshi/Desktop/monu/moses/scripts/training/symal'     ### Compiler symal     make[2]: Entering directory `/home/minakshi/Desktop/monu/moses/scripts/training/mbr'     make[2]: Nothing to be done for `all'.     make[2]: Leaving directory `/home/minakshi/Desktop/monu/moses/scripts/training/mbr'     ### Compiler mbr     make[2]: Entering directory `/home/minakshi/Desktop/monu/moses/scripts/training/lexical-reordering'     make[2]: Nothing to be done for `all'.     make[2]: Leaving directory `/home/minakshi/Desktop/monu/moses/scripts/training/lexical-reordering'     ### Compiler lexical-reordering     ## All files that need compilation were compiled     make[1]: Leaving directory `/home/minakshi/Desktop/monu/moses/scripts'     /bin/sh: ./check-dependencies.pl: not found     make: *** [release] Error 127      We don't know why this error occurs? check-dependencies.pl file existed in scripts folder ...


make: arm-elf-gcc: Command not found

I'm working on an application for a Moxa UC-7110, and I have installed their tool chain, which provides a cross compiler for their arm architecture on uClinux. I'm on on Ubuntu 12.04 LTS. I'm having trouble getting the compiler to work though. I was able to run the tool chain installer successfully, and I see the arm-elf-gcc compiler under /usr/local/bin along with others. However, when I run make, I get a command not found error. Here is the make file:               srcdir = .     LDFLAGS =  -Wl,-elf2flt     LIBS =       CFLAGS = --verbose          # Change these if necessary          CC = arm-elf-gcc      CPP = arm-elf-gcc -E          all:    hello          hello:         $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(LIBS) $@.c          clean:         rm -f $(OBJS) hello core *.gdb      I've checked my PATH:               /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin      And when I run `which arm-elf-gcc` I get `/usr/local/bin/arm-elf-gcc`. I even get tab completion, but when I try to run the `arm-elf-gcc` directly I still get `bash: /usr/local/bin/arm-elf-gcc: No such file or directory`. I've verified that the file exists, but for some reason Ubuntu doesn't see it. Any ideas?


I get "bash: ...: No such file or directory" even though the executable is there

Operating system: Lubuntu 13.10, 64-bit. I installed the Seamonkey browser from http://www.seamonkey-project.org/ following the instructions quoted below from http://www.seamonkey- project.org/doc/install-and-uninstall#install_linux > To install SeaMonkey by downloading the tar.bz2 file: > > Create a directory named "seamonkey2" (mkdir seamonkey2) and change to that > directory (cd seamonkey2).   >  Click the link on the site you're downloading SeaMonkey from to download > the package (seamonkey-2.*.tar.bz2) file into the seamonkey2 directory.   >  Decompress the file with the following command: > > `tar jxvf seamonkey-2.*.tar.bz2` > > This creates a "seamonkey" directory under your seamonkey2 directory.   >  Change to the seamonkey directory (cd seamonkey).   >  Run SeaMonkey with the following command: > > `./seamonkey` I followed the instructions but here is what I see with the following commands:               [05:28 PM] ~/seamonkey2/seamonkey $ ll seam*     -rwxr-xr-x 1 vasa1 vasa1 82816 Oct 29 08:23 seamonkey*     -rwxr-xr-x 1 vasa1 vasa1 82820 Oct 29 08:23 seamonkey-bin*      * * *               [05:28 PM] ~/seamonkey2/seamonkey $ seamonkey     bash: /home/vasa1/seamonkey2/seamonkey/seamonkey: No such file or directory     [05:28 PM] ~/seamonkey2/seamonkey $ seamonkey-bin     bash: /home/vasa1/seamonkey2/seamonkey/seamonkey-bin: No such file or directory     [05:28 PM] ~/seamonkey2/seamonkey $ ./seamonkey     bash: ./seamonkey: No such file or directory     [05:29 PM] ~/seamonkey2/seamonkey $ ./seamonkey-bin     bash: ./seamonkey-bin: No such file or directory     [05:29 PM] ~/seamonkey2/seamonkey $       So why is `bash` saying "No such file or directory" although the directory and files (seamonkey and seamonkey-bin) exist? Here is the output of `cat /etc/environment`:               [05:38 PM] ~ $ cat /etc/environment     PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/vasa1/seamonkey2/seamonkey"     [05:38 PM] ~ $       Here is the output of `file seamonkey` and `ldd seamonkey`:               [06:29 PM] ~/seamonkey2/seamonkey $ file seamonkey     seamonkey: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped     [06:30 PM] ~/seamonkey2/seamonkey $ ldd seamonkey         linux-gate.so.1 =>  (0xf7726000)         libpthread.so.0 => /lib32/libpthread.so.0 (0xf76f6000)         libdl.so.2 => /lib32/libdl.so.2 (0xf76f1000)         libstdc++.so.6 => not found         libm.so.6 => /lib32/libm.so.6 (0xf76ae000)         libgcc_s.so.1 => not found         libc.so.6 => /lib32/libc.so.6 (0xf74fc000)         /lib/ld-linux.so.2 (0xf7727000)     [06:31 PM] ~/seamonkey2/seamonkey $


When executable files aren't

> **Possible Duplicate:**   >  Can't execute some binaries in chroot environment (zsh: Not found) Today I ran into something that has me stumped. A co-worker is working with a specific pre-compiled binary he downloaded (available here). On the Ubuntu 10.04 LTS Server he's working on, attempting to execute this file yields file- not-found, even with permissions set right. And yet, when I attempt the same thing from OpenSUSE 11.4, it runs just fine. Running `file` on it gives me: > ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked > (uses shared libs), for GNU/Linux 2.6.15, stripped Both the Ubuntu and OpenSUSE boxes are 64-bit installs, and `file` returns the same information on both machines. Which looks just fine to me. And on the opensuse box, LDD even gives me a short list of library files. Hand checking, all of those specified files also exist on the Ubuntu server. Strace output is different though: Opensuse: > execve("./trid", ["./trid"], [/* 122 vars */]) = 0 Ubuntu (giving full path does not change result): > execve("./trid", ["./trid"], [/* 19 vars */]) = -1 ENOENT (No such file or > directory) What can cause a file like this to not be executable in this way?


skype not found on Oneiric 64, but it is right there

> **Possible Duplicate:**   >  Can't execute some binaries in chroot environment (zsh: Not found) I have something weird here. Cannot find a file although it is right there.               $ skype     command not found: skype     $ whereis skype     skype: /usr/bin/skype /usr/share/skype     $ /usr/bin/skype     file or directory not found: /usr/bin/skype     $ ls -l /usr/bin/skype     -rwxr-xr-x 1 root root 21362968 2011-06-08 12:26 /usr/bin/skype     $ type /usr/bin/skype     /usr/bin/skype is /usr/bin/skype     $ which skype     /usr/bin/skype      Any explanation for that? Happened only with skype so far, no matter if on zsh or bash. I'm on Ubuntu Natty 64, had not encountered anything like that before.


Getting 'no such file or directory' even though the file is clearly there

I'm having a perplexing issue. If I try to run a script via:               root@myServer:~/dig# ./minerd.sh      I get:               -bash: ./minerd.sh: No such file or directory      If I try:               root@myServer:~/dig# ~/dig/minerd.sh      I still get:               -bash: /root/dig/minerd.sh: No such file or directory      If I do:               root@myServer:~/dig# ls ~/dig/minerd.sh      Then I get:               /root/dig/minerd.sh      So, the file is clearly there. I have also previously done `chmod +x` on it. But still, its not allowing me to run it for some reason. What am I doing wrong? Edit: Even moving the file to a different name doesn't work:               root@myServer:~/dig# mv minerd.sh test.sh     root@myServer:~/dig# ./test.sh     -bash: ./test.sh: No such file or directory


Executable exists for everything but bash & file manager

I am running Debian. I was trying to use truecrypt the other day. I downloaded and extracted the zip, and ran the installer. I just extracted the file, and did not install it. I then tried executing it, and apparently it does not exist. First I just double clicked the file from thunar (xfce4 file manager), and it told me the file did not exist. I then tried the following:               ~$ cd /home/share/crypt/truecrypt/     /home/share/crypt/truecrypt$ ls -al truecrypt-linux_x86-64      -rwxrwxrwx 1 abstruselyarcane root 4873328 Feb  7  2012 truecrypt-linux_x86-64 #Its not a figment of my imagination     /home/share/crypt/truecrypt$ file truecrypt-linux_x86-64      truecrypt-linux_x86-64: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), stripped # It is indeed an executable     /home/share/crypt/truecrypt$ ./truecrypt-linux_x86-64      bash: ./truecrypt-linux_x86-64: No such file or directory # It doesn't exist?     /home/share/crypt/truecrypt$ sudo ./truecrypt-linux_x86-64      [sudo] password for abstruselyarcane:      sudo: unable to execute ./truecrypt-linux_x86-64: No such file or directory     /home/share/crypt/truecrypt$ ldd truecrypt-linux_x86-64          not a dynamic executable # file just said it is an executable!      I am very confused right now. EDIT: I has been suggested to be that I'm running a 64bit from a 32bit, I went to the other post, and tested my distro:               ~$ uname -m     x86_64