How to install sshfs on Linux Mint?

I am trying to install `sshfs` on Linux Mint to mount remote folders over SSH. I've Googled up and down on how to install `sshfs` (as the command is not available to me) and I'm beating my head against the wall because I cannot find the repository it is in.               ~ $ sshfs     The program 'sshfs' is currently not installed. You can install it by typing:     sudo apt-get install sshfs     ~ $ sudo apt-get install sshfs     [sudo] password for XXXX:      Reading package lists... Done     Building dependency tree            Reading state information... Done     E: Unable to locate package sshfs      **Edit:** Adding response to @Nate from Kalamazoo's answer here for code formatting:               ~ $ sudo apt-get install sshfs-fuse     Reading package lists... Done     Building dependency tree            Reading state information... Done     E: Unable to locate package sshfs-fuse     ~ $ apt-cache search sshfs     ~ $       **Edit:** Adding output of `cat /etc/apt/sources.list /etc/apt/sources.list.d/*.list`:               deb http://packages.linuxmint.com/ olivia main upstream import     deb http://ppa.launchpad.net/dockbar-main/ppa/ubuntu raring main     deb-src http://ppa.launchpad.net/dockbar-main/ppa/ubuntu raring main     ### THIS FILE IS AUTOMATICALLY CONFIGURED ###     # You may comment out this entry, but any other modifications may be lost.     deb http://dl.google.com/linux/chrome/deb/ stable main     #deb file:///usr/share/local-repository binary/          deb http://ppa.launchpad.net/nuvola-player-builders/stable/ubuntu raring main     deb-src http://ppa.launchpad.net/nuvola-player-builders/stable/ubuntu raring main     # Do not edit this file manually, use Software Sources instead.          deb http://packages.linuxmint.com olivia main upstream import  #id:linuxmint_main          deb http://archive.ubuntu.com/ubuntu raring main restricted universe multiverse     deb http://archive.ubuntu.com/ubuntu raring-updates main restricted universe multiverse          deb http://security.ubuntu.com/ubuntu/ raring-security main restricted universe multiverse     deb http://archive.canonical.com/ubuntu/ raring partner     deb http://ppa.launchpad.net/webupd8team/jupiter/ubuntu raring main     deb-src http://ppa.launchpad.net/webupd8team/jupiter/ubuntu raring main     deb http://ppa.launchpad.net/webupd8team/sublime-text-2/ubuntu raring main     deb-src http://ppa.launchpad.net/webupd8team/sublime-text-2/ubuntu raring main      All tutorials I find don't mention adding any repositories, just to do the usual install. I'm at a loss. Can someone help me out on this relatively simple issue?


How to install Cinnamon with SLiM on Arch Linux?

I have recently installed Arch Linux and since I'm new to hard it's a little hard to get around the things in here. I wanted to know how I can instal cinnamon desktop environment with SliM display manager. By now, I know how to install Arch system and boot into the root account. I have also installed the system X and currently I'm able see the basic GUI using:                startx      I installed cinnamon and slim using:                # pacman -S cinnamon      # pacman -S slim      The problem, now, is that I don't know how to configure both the programs to start at boot.


Missing CD-ROM from /dev Redhat (Oracle Linux) 6.2

We have installed the minimal install for Redhat 6.2 (OL 6.2) on a HP Proliant 380 G8 and there is no `CDROM`, `SDB` or `DVD` listed in `/dev`. If I do `dmesg | more`, I cannot find any reference to it discovering and trying to set up a CD-ROM device. What do I do next? I know the CD drive works as we installed the OS from that drive. This is a clean install with no mods. Any advice on getting the CD (DVD) drive to show up would be much appreciated. Also, the below features at the end of `dmesg | more` but I do not know if it is relevant.               sd 2:0:0:0: Attached scsi generic sg2 type 0     sd 2:0:0:0: [sdc] 1978368 512-byte logical blocks: (1.01 GB/966 MiB)     sd 2:0:0:0: [sdc] Write Protect is off     sd 2:0:0:0: [sdc] Mode Sense: 23 00 00 00     sd 2:0:0:0: [sdc] Assuming drive cache: write through     sd 2:0:0:0: [sdc] Assuming drive cache: write through     sdc: detected capacity change from 0 to 1012924416      sdc:     sd 2:0:0:0: [sdc] Assuming drive cache: write through     sd 2:0:0:0: [sdc] Attached SCSI removable disk     scsi: killing requests for dead queue     scsi: killing requests for dead queue     FAT: Directory bread(block 8192) failed     scsi: killing requests for dead queue     FAT: Directory bread(block 8193) failed     scsi: killing requests for dead queue     FAT: Directory bread(block 8194) failed     scsi: killing requests for dead queue     FAT: Directory bread(block 8195) failed     scsi: killing requests for dead queue     FAT: Directory bread(block 8196) failed     scsi: killing requests for dead queue     FAT: Directory bread(block 8197) failed     scsi: killing requests for dead queue     FAT: Directory bread(block 8198) failed     scsi: killing requests for dead queue     FAT: Directory bread(block 8199) failed     scsi: killing requests for dead queue     scsi: killing requests for dead queue     FAT: Directory bread(block 8192) failed     scsi: killing requests for dead queue     FAT: Directory bread(block 8193) failed     scsi: killing requests for dead queue     FAT: Directory bread(block 8194) failed     scsi: killing requests for dead queue     FAT: Directory bread(block 8195) failed     scsi: killing requests for dead queue     FAT: Directory bread(block 8196) failed     scsi: killing requests for dead queue     FAT: Directory bread(block 8197) failed


Unable to find Red Hat Server

Running into a strange problem. I have a local server running Red Hat on a virtual machine (accessed through putty). I'm using this server to work on a website in Django, which I run with:               python manage.py runserver 0.0.0.0: 8080.         Now that works just fine, and I can access it through redHatIP:8080. However, I recently downloaded and installed Wordpress, Drupal, and Mint. Mint was added to the original site, and I access it through redHatIP/mint. Wordpress and Drupal are completely unrelated to the original site, but are both located in /var/www/html (long with the original site located through my 8080 poty). I accessed drupal and wordpress through redHatIP/drupal and redhatIP respectively, and it was working just fine until today. For some reason when I go to redHatIP now I receive the following error in my internet browser:               The requested URL / was not found on this server.      If I go to redHatIP/drupal I received The requested URL /drupal was not found on this server, to redHatIP/anything I receive The requested URL /anything was not found on this server et cetera. This applies to Mint as well, which I access through redHatIP/mint. However, I can still access the original site through redHatIP:8080, and that works just fine. I completely removed Django and wordpress, then downloaded them again. I tried having just one of them located in /var/www/html/, but that did nothing. I tried moving them to /var/www/, but that also did nothing. When I go to my error log messages in /pwd/log/httpd/error_log It has the following message:               _default_ VirtualHost overlap on port 80, the first has precedence.      However this was reported the day _before_ all this happened, when I had both Django and Wordpress together, and there hasn't been any message since. I have been unable to fix this on my own, nor have I found a solution on the net. Any ideas? Any other information that would help understand the problem? et cetera?


How do you pronounce System V and SysV?

Is the V in System V and SysV (and sysvinit, etc) pronounced "vee" or "five"?


Select YeAH-TCP like congestion control algorithm to configure kernel

I'm configuring/compiling the 2.6.37 kernel and I want select _YeAH-TCP_ like default congestion control algorithm but, although I enable this option ( _CONFIG_TCP_CONG_YEAH_ ), it doesn't show in the congestion control algorithm list to select like default. What's the sense of this? Am I doing something wrong?


Installing python gives dpkg error

Installing python gives a dpkg error. I have done these commands, output below               $ sudo apt-get install python3.4       $ sudo dpkg -C       $ sudo apt-get check       $ apt-cache policy libglib2.0-dev       $ sudo dpkg --configure libglib2.0-dev       $ sudo dpkg --audit        $ sudo apt-get install cdrecord mkisofs slib libident spice-protocol \                          default-jdk libaudio2:i386 libcacard default-jre       $ apt-cache policy python        $ sudo apt-get install python       $ apt-cache policy libc6       $ sudo apt-get update       ## no error       $ sudo apt-get -f install python        * * * ## The output: **$ sudo apt-get install python3.4**               $ sudo apt-get install python3.4     Reading package lists... Done     Building dependency tree            Reading state information... Done     The following packages were automatically installed and are no longer required:       librrd4 ntop-data python-mako python-markupsafe     Use 'apt-get autoremove' to remove them.     The following extra packages will be installed:       libdb5.3 libmpdec2 libpython3.4-minimal libpython3.4-stdlib       python3.4-minimal     Suggested packages:       python3.4-venv python3.4-doc     The following NEW packages will be installed:       libdb5.3 libmpdec2 libpython3.4-minimal libpython3.4-stdlib python3.4       python3.4-minimal     0 upgraded, 6 newly installed, 0 to remove and 488 not upgraded.     1 not fully installed or removed.     Need to get 4,804 kB of archives.     After this operation, 19.0 MB of additional disk space will be used.     Do you want to continue [Y/n]? y     Get:1 http://ftp.de.debian.org/debian/ testing/main libdb5.3 i386 5.3.28-3 [662 kB]     Get:2 http://ftp.de.debian.org/debian/ testing/main libmpdec2 i386 2.4.0-6 [76.4 kB]     Get:3 http://ftp.de.debian.org/debian/ unstable/main libpython3.4-minimal i386 3.4.1-6 [484 kB]     Get:4 http://ftp.de.debian.org/debian/ unstable/main libpython3.4-stdlib i386 3.4.1-6 [2,018 kB]     Get:5 http://ftp.de.debian.org/debian/ unstable/main python3.4-minimal i386 3.4.1-6 [1,366 kB]     Get:6 http://ftp.de.debian.org/debian/ unstable/main python3.4 i386 3.4.1-6 [198 kB]     Fetched 4,804 kB in 7s (621 kB/s)                                                   Selecting previously unselected package libdb5.3:i386.     (Reading database ... 459131 files and directories currently installed.)     Unpacking libdb5.3:i386 (from .../libdb5.3_5.3.28-3_i386.deb) ...     Selecting previously unselected package libmpdec2:i386.     Unpacking libmpdec2:i386 (from .../libmpdec2_2.4.0-6_i386.deb) ...     Selecting previously unselected package libpython3.4-minimal:i386.     Unpacking libpython3.4-minimal:i386 (from .../libpython3.4-minimal_3.4.1-6_i386.deb) ...     Selecting previously unselected package libpython3.4-stdlib:i386.     Unpacking libpython3.4-stdlib:i386 (from .../libpython3.4-stdlib_3.4.1-6_i386.deb) ...     Selecting previously unselected package python3.4-minimal.     Unpacking python3.4-minimal (from .../python3.4-minimal_3.4.1-6_i386.deb) ...     Selecting previously unselected package python3.4.     Unpacking python3.4 (from .../python3.4_3.4.1-6_i386.deb) ...     Processing triggers for man-db ...     Processing triggers for menu ...     Processing triggers for gnome-menus ...     Processing triggers for desktop-file-utils ...     dpkg: dependency problems prevent configuration of libglib2.0-dev:      libglib2.0-dev depends on python:any (>= 2.6.6-7~).          dpkg: error processing libglib2.0-dev (--configure):      dependency problems - leaving unconfigured     Setting up libdb5.3:i386 (5.3.28-3) ...     Setting up libmpdec2:i386 (2.4.0-6) ...     Setting up libpython3.4-minimal:i386 (3.4.1-6) ...     Setting up libpython3.4-stdlib:i386 (3.4.1-6) ...     Setting up python3.4-minimal (3.4.1-6) ...     Setting up python3.4 (3.4.1-6) ...     Processing triggers for menu ...     Errors were encountered while processing:      libglib2.0-dev     E: Sub-process /usr/bin/dpkg returned an error code (1)      **$ sudo dpkg -C**               knoppix@Microknoppix:/var/lib$ sudo dpkg -C     The following packages have been unpacked but not yet configured.     They must be configured using dpkg --configure or the configure     menu option in dselect for them to work:      libglib2.0-dev       Development files for the GLib library          The following packages are missing the md5sums control file in the     database, they need to be reinstalled:      cdrecord             Dummy transition package for wodim      mkisofs              Dummy transition package for genisoimage      slib                 Portable Scheme library      libident             simple RFC1413 client library - runtime      spice-protocol       spice-protocol      default-jdk          Standard Java or Java compatible Development Kit      libaudio2:i386       Network Audio System - shared libraries      libcacard            libcacard      default-jre          Standard Java or Java compatible Runtime      **$sudo apt-get check**               knoppix@Microknoppix:/var/lib$ apt-get check     E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)     E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?     knoppix@Microknoppix:/var/lib$ sudo apt-get check     Reading package lists... Done     Building dependency tree            Reading state information... Done      **$ apt-cache policy libglib2.0-dev**               knoppix@Microknoppix:/var/lib$ apt-cache policy libglib2.0-dev         libglib2.0-dev:           Installed: 2.40.0-3           Candidate: 2.40.0-3           Version table:              2.41.0-1 0                   1 http://ftp.de.debian.org/debian/ experimental/main i386 Packages          *** 2.40.0-3 0                 500 http://ftp.de.debian.org/debian/ testing/main i386 Packages                 500 http://ftp.de.debian.org/debian/ unstable/main i386 Packages                 100 /var/lib/dpkg/status              2.33.12+really2.32.4-5 0                 990 http://ftp.de.debian.org/debian/ stable/main i386 Packages      **$sudo dpkg --configure libglib2.0-dev**               knoppix@Microknoppix:~$ sudo dpkg --configure libglib2.0-dev     dpkg: dependency problems prevent configuration of libglib2.0-dev:      libglib2.0-dev depends on python:any (>= 2.6.6-7~).          dpkg: error processing libglib2.0-dev (--configure):      dependency problems - leaving unconfigured     Errors were encountered while processing:      libglib2.0-dev      **$sudo dpkg --audit**               knoppix@Microknoppix:~$ sudo dpkg --audit     The following packages have been unpacked but not yet configured.     They must be configured using dpkg --configure or the configure     menu option in dselect for them to work:      libglib2.0-dev       Development files for the GLib library          The following packages are missing the md5sums control file in the     database, they need to be reinstalled:      cdrecord             Dummy transition package for wodim      mkisofs              Dummy transition package for genisoimage      slib                 Portable Scheme library      libident             simple RFC1413 client library - runtime      spice-protocol       spice-protocol      default-jdk          Standard Java or Java compatible Development Kit      libaudio2:i386       Network Audio System - shared libraries      libcacard            libcacard      default-jre          Standard Java or Java compatible Runtime      **$ sudo apt-get install cdrecord mkisofs slib libident spice-protocol default-jdk libaudio2:i386 libcacard default-jre**               knoppix@Microknoppix:~$ sudo apt-get install cdrecord mkisofs slib libident spice-protocol default-jdk libaudio2:i386 libcacard default-jre   Reading package lists... Done     Building dependency tree            Reading state information... Done     default-jdk is already the newest version.     default-jdk set to manually installed.     default-jre is already the newest version.     libident is already the newest version.     libident set to manually installed.     slib is already the newest version.     cdrecord is already the newest version.     mkisofs is already the newest version.     spice-protocol is already the newest version.     libcacard is already the newest version.     The following packages were automatically installed and are no longer required:       librrd4 ntop-data python-mako python-markupsafe     Use 'apt-get autoremove' to remove them.     Suggested packages:       nas     The following packages will be upgraded:       libaudio2     1 upgraded, 0 newly installed, 0 to remove and 487 not upgraded.     1 not fully installed or removed.     Need to get 87.0 kB of archives.     After this operation, 4,096 B of additional disk space will be used.     Do you want to continue [Y/n]? y     Get:1 http://ftp.de.debian.org/debian/ stable/main libaudio2 i386 1.9.3-5wheezy1 [87.0 kB]     Fetched 87.0 kB in 0s (302 kB/s)     (Reading database ... 459964 files and directories currently installed.)     Preparing to replace libaudio2:i386 1.9.3-5 (using .../libaudio2_1.9.3-5wheezy1_i386.deb) ...     Unpacking replacement libaudio2:i386 ...     dpkg: dependency problems prevent configuration of libglib2.0-dev:      libglib2.0-dev depends on python:any (>= 2.6.6-7~).          dpkg: error processing libglib2.0-dev (--configure):      dependency problems - leaving unconfigured     Setting up libaudio2:i386 (1.9.3-5wheezy1) ...     Errors were encountered while processing:      libglib2.0-dev     E: Sub-process /usr/bin/dpkg returned an error code (1)     knoppix@Microknoppix:~$       **$ apt-cache policy python**               knoppix@Microknoppix:/var/lib$ apt-cache policy python     python:       Installed: 2.7.3-4       Candidate: 2.7.3-4+deb7u1       Version table:          2.7.6-2 0             500 http://ftp.de.debian.org/debian/ testing/main i386 Packages             500 http://ftp.de.debian.org/debian/ unstable/main i386 Packages          2.7.3-4+deb7u1 0             990 http://ftp.de.debian.org/debian/ stable/main i386 Packages      *** 2.7.3-4 0             100 /var/lib/dpkg/status     knoppix@Microknoppix:/var/lib$       Trying apt-get install python (not specifying version) **$ sudo apt-get install python**               knoppix@Microknoppix:/var/lib$ sudo apt-get install python     Reading package lists... Done     Building dependency tree            Reading state information... Done     The following packages were automatically installed and are no longer required:       librrd4 ntop-data python-mako python-markupsafe     Use 'apt-get autoremove' to remove them.     The following extra packages will be installed:       python-minimal     Suggested packages:       python-doc     The following packages will be upgraded:       python python-minimal     2 upgraded, 0 newly installed, 0 to remove and 485 not upgraded.     1 not fully installed or removed.     Need to get 223 kB of archives.     After this operation, 0 B of additional disk space will be used.     Do you want to continue [Y/n]? y     Get:1 http://ftp.de.debian.org/debian/ stable/main python all 2.7.3-4+deb7u1 [181 kB]     Get:2 http://ftp.de.debian.org/debian/ stable/main python-minimal all 2.7.3-4+deb7u1 [42.8 kB]     Fetched 223 kB in 0s (390 kB/s)           (Reading database ... 459964 files and directories currently installed.)     Preparing to replace python 2.7.3-4 (using .../python_2.7.3-4+deb7u1_all.deb) ...     Unpacking replacement python ...     Preparing to replace python-minimal 2.7.3-4 (using .../python-minimal_2.7.3-4+deb7u1_all.deb) ...     Unpacking replacement python-minimal ...     Processing triggers for doc-base ...     Processing 1 changed doc-base file...     Registering documents with scrollkeeper...     Processing triggers for man-db ...     Setting up python-minimal (2.7.3-4+deb7u1) ...     Setting up python (2.7.3-4+deb7u1) ...     dpkg: dependency problems prevent configuration of libglib2.0-dev:      libglib2.0-dev depends on python:any (>= 2.6.6-7~).          dpkg: error processing libglib2.0-dev (--configure):      dependency problems - leaving unconfigured     Errors were encountered while processing:      libglib2.0-dev     E: Sub-process /usr/bin/dpkg returned an error code (1)     knoppix@Microknoppix:/var/lib$       **$ apt-cache policy libc6**               knoppix@Microknoppix:~$ apt-cache policy libc6     libc6:       Installed: 2.17-5       Candidate: 2.19-1       Version table:          2.19-1 0             500 http://ftp.de.debian.org/debian/ testing/main i386 Packages             500 http://ftp.de.debian.org/debian/ unstable/main i386 Packages      *** 2.17-5 0             100 /var/lib/dpkg/status          2.13-38+deb7u1 0             990 http://ftp.de.debian.org/debian/ stable/main i386 Packages     knoppix@Microknoppix:~$       after sudo apt-get update and doing sudo apt-get -f install python, I still get the error **$sudo apt-get -f install python**               knoppix@Microknoppix:~/ntopngtr2/ntopng-1.1_6932$ sudo apt-get -f install python     Reading package lists... Done     Building dependency tree      Reading state information... Done     python is already the newest version.     python set to manually installed.     The following packages were automatically installed and are no longer required:     librrd4 ntop-data python-mako python-markupsafe     Use 'apt-get autoremove' to remove them.     0 upgraded, 0 newly installed, 0 to remove and 486 not upgraded.     1 not fully installed or removed.     After this operation, 0 B of additional disk space will be used.     Do you want to continue [Y/n]? y     dpkg: dependency problems prevent configuration of libglib2.0-dev:     libglib2.0-dev depends on python:any (>= 2.6.6-7~).          dpkg: error processing libglib2.0-dev (--configure):     dependency problems - leaving unconfigured     Errors were encountered while processing:     libglib2.0-dev     E: Sub-process /usr/bin/dpkg returned an error code (1)     knoppix@Microknoppix:~/ntopngtr2/ntopng-1.1_6932$


How to see the amount of pending data on a unix domain socket?

When I'm logged to a `tmux` session from two different computers, I'd like to be able to trace the amount of pending data on the sockets of both `tmux` session. To test this I logged to computer `A` and to computer `B`, then from computer `B` I used ssh to login to computer `A`. From each console I attached to the same `tmux` session and started running a script which prints the iteration number from 1 to 100M. Indeed, I see that the numbers of the iterations printed in the local (`A`) console are larger than the numbers printed in the remote console (`B`) since it takes time for the messages to travel to the remote computer               [user@server00 ~]$ lsof | grep tmux | grep unix     tmux      1073     user    4u     unix 0xf6dc2ac0       0t0   18681 socket     tmux      1073     user    5u     unix 0xf6dc3840       0t0   18682 socket     tmux      1073     user    6u     unix 0xf137ed00       0t0   19768 socket     tmux      1073     user    7u     unix 0xf6dc2880       0t0   18683 /tmp/tmux-1000/default     tmux      1073     user    8u     unix 0xf6cbcd80       0t0   22647 /tmp/tmux-1000/default     tmux      1073     user   14u     unix 0xf137ef40       0t0   12146 /tmp/tmux-1000/default     tmux      1092     user    4u     unix 0xf6cbd200       0t0   24848 socket     tmux      1092     user    5u     unix 0xf6cbef40       0t0   24849 socket     tmux      1092     user    6u     unix 0xf6cbed00       0t0   24850 socket     tmux      1177     user    4u     unix 0xf137fcc0       0t0   19947 socket     tmux      1177     user    5u     unix 0xf137fa80       0t0   19948 socket     tmux      1177     user    6u     unix 0xf137c240       0t0   19949 socket     [user@server00 ~]$ netstat -a | grep tmux     unix  2      [ ACC ]     STREAM     LISTENING     18683    /tmp/tmux-1000/default     unix  3      [ ]         STREAM     CONNECTED     12146    /tmp/tmux-1000/default     unix  3      [ ]         STREAM     CONNECTED     22647    /tmp/tmux-1000/default      Since I see only the path of `/tmp/tmux-1000/default` I was hoping to see its size increasing but its size is always 0               [user@server00 ~]$ ls -l /tmp/tmux-1000/default     srwxrwx---. 1 user user 0 Feb  9 10:45 /tmp/tmux-1000/default      How can I see the data pending on the socket, and how do I know if the socket becomes congested?


Evaluating the return value of a command line

How do I evaluate or calculate the return value of a command line? For exemple, I count the number of lines with a grep and I want to know if that value is above X. If so, I want to print the number to a file. Or I want to substract the value of a grep count to another grep count... How can I manipulate return values that way ?


How to programmatically retrieve the GID of a running process

I need to write some C code to check the effective GID of a running process whose PID I know. I've not found any direct way to do this. There are a number of heavyweight kludges I could use, such as invoking `popen("/bin/ps ARGS", "r")` and parsing its output, or `fopen("/proc/PID/status", "r")` and parsing _that_ output, but I'm looking for a cleaner, more direct approach. If only `getegid()` took a PID argument...


Where are displays other than ":0"?

X Power Tools -book has a sentence about ":0": > Display 0 on the local computer, connected by a local connection scheme I tried to open a clock by "xclock -display :2", but I got an error: > Can't open display: :2 How am I supposed to program if I cannot get displays working? Can you really do everything on it? How can you run programs, such as Vim and gcc, on displays 3 and 999? Where are they?


need to install mercurial

> **Possible Duplicate:**   >  How do I upgrade python on openSUSE? Hi If you look at my previous question you will find this one as same as that but as I couldn't solve my problem yet I want to ask again, I did tried all your good suggestions but there were no mercurial package in opensuse 10.2(my linux) please give me another sollution which doesn't need packages I'm completely confused and I just installed opensuse 11.1 but it had the same problems(also I'm not familiar with this version and even couldn't find yum) :(   please give me some suggestions for a begginer in Linux, any help to make my program work. Any help would be appreciated.   Bests


Is there a standard Unix command to check English verb conjugation?

Having recently come across wordlist and wordnet, two great discoveries on their own, I'm now looking for a similar tool, if simpler, that will take the bare infinitive of a verb and return the simple past and past participle. Example:               $ verbteacher throw          Simple past: threw     Past participle: thrown      Does anybody know where to find `verbteacher(1)`?


bash execute read command from file

After some manipulations, I got the file with commands that I would be glad to be able to execute. Input file (name of file is inp2.txt):               "02 - Beautiful Emptiness.mp3"     "02 - Come. mp3"     "02 - Go For It.mp3"      Code:               #!/bin/bash     exec 4<inp2.txt           # opening  file via descriptor     while read LINE <&4; do         printf "%s\n" "$LINE"  # just to watch that command is proper         $LINE                # execute command     done      **EDIT:** sorry, I omitted important part of code that I thought is not important for understanding. Full code:               #!/bin/bash     IFS='      '     declare LINE     declare BUF     declare a     a=1           rm inp2.txt # delete previous version of file     exec 3< inp.txt # open descriptor for a file()content of it is written above     while read LINE <&3; do  # read it         printf "mv ""$LINE"" %s\n" """$a"".mp3" >> inp2.txt          # form a command and output it to the file, just to make sure that I got a command that I really want         let "a++"  # increment number that will be a part of new unique name     done          exec 4<inp2.txt #open again descriptor with ready commands          while read LINE <&4; do         printf "%s\n" "$LINE"  # check again         $LINE #  here it should be executed, but I get mistakes that  is pointed down     done          exit 0      Output: ![enter image description here](http://i.stack.imgur.com/851Xq.png) It seems that command is proper, but something is wrong and I can't figure out what's wrong exactly.


Environment settings on setuid executables

I am observing a curious behavior when running a program with `setuid` bit enabled. Program `foo` is owned by user `bar` with setuid bit set. User `execbar` runs `foo` `foo` reports that one of the dynamic libraries is inaccessible. The dynamic library in question is located in a directory outside the normal `ld.so.conf` search paths so it's set via `LD_LIBRARY_PATH` for user `execbar` The question is: Is running a program with `setuid` clears the environment set by user `execbar`?


Verify Debian ISO integrity

I recently downloaded Debian 7.5.0 Wheezy and managed to use the Release.sig signature to verify the integrity of the Release checksum file using GPG4Win. Unfortunately, I couldn't find any advice on where to find the md5/SHA1/SHA256 checksum inside the Release filw to verify that the ISO is correct/hasn't been corrupted/manipulated. Couldn't find any help regarding this specific problem on the support sites either. I am using Windows 7 if this is relevant. Hope you can help me with this. Cheers Edit: The name of my ISO file is "debian-7.5.0-amd64-netinst". Other versions can be found here (ftp://cdimage.debian.org/cdimage/release/7.5.0-live/amd64/iso-hybrid/) and offer an easier way to verify the integrity because of this file: ftp://cdimage.debian.org/cdimage/release/7.5.0-live/amd64/iso- hybrid/SHA256SUMS. I need to find something like this in the Release file I verified.


How do I get the information I need in order to use unison and ssh to synchronise files

I have a desktop at home, and a laptop that I take with me to places away from home, both have Fedora 20 installed. I edit the same files on either machine, and would like to be able to synchronise these files over the Internet to keep them identical, and avoid the error prone task of trying to repeat the same edits on the other one. It seems that using `unison` and `ssh` are the way to go, (but if there is a more straightforward method, I would be happy to use that instead, not `diff` and `patch` though) but what I have failed to discover is how to find out the identification details as in this extract from a document on how to use unison:               $ unison -testServer /home/ravisaive/Desktop ssh://172.16.25.125//home/ravisaive/Desktop      The document is: Unison – An Ultimate Local/Remote File Synchronization Tool for Linux By Avishek Kumar Under: Backups On: March 21, 2014 So my question is, please: how do I obtain or define the equivalents of the `172.16.25.125` for my two machines? In other "how to do it" articles I see `plink@plonk` as the form of the identifiers, is this easier, and again how do I discover or define them? Please, I would like an answer that is suitable for my completely novice status on this topic, not the sort that only experts can understand. Please insult my intelligence. * * * A Final plea: I have asked similar questions to this on the Internet and here, and cannot get an answer to what seems to me to be a straightforward question. Here is another quotation, about OpenSSH (From Fedora Wiki, SSH) "The Default fedora setup for the ssh client works just fine for a basic ssh server setup, like the one above. The syntax is even pretty basic, command options username @ address or IP. An example follows.               ssh user@192.168.1.100 "      In my slow dim-witted way I just cannot see where the "user@192.168.1.100" comes from. Perhaps it is so obvious that I shouldn't need to ask, but I can't see it for myself. **_Please_** can someone _explain_ this for me?


Mount /home to USB Live Linux

do you think that it would be possible to somehow mount /home folder with all the settings to Linux that runs as Live CD from USB key? Imagine that you have /home partition on the disk in the laptop and you want to run Live Linux but you want to have your old settings. Think of it as an alternative to dual boot. Do you think it is possible? What do you think it will be usable? I mean if it will be slow because of USB? What about USB 3.0 - I mean not the cheap version but really fast read/write speeds. Would 8 GB stick will be large enough?


How do I associate the Windows key with GNOME menu in Fedora?

There is a similar question: How to associate the Fedora Start menu with the Windows keyboard? but it's for KDE 4. Can someone post equivalent steps for GNOME?


Modify prompt based on value

Suppose I have an environment variable defined in .bash_profile like this: `PS1='\\[\e[31;1m\\][\u@\h \T \w] \\[\e[0m\\]'` This variable makes my Linux prompt show certain information, like thes: `[jeff@node21 01:48:30 ~]` `[jeff@node22 01:48:30 ~]` `[jeff@node23 01:48:30 ~]` `[jeff@master 01:48:30 ~]` When the word "master" appears, I want to capitalize it (I am not to do any work on that node and I want it to stand out when I forget to `rsh` to other nodes). I can't use `sed` on the variable `PS1`, because that doesn't contain the word "master" in it. Ultimately, _I want the prompt to be capitalized when I'm on node "master". Is there a way to evaluate variable "PS1", manipulate the string, and then re- assign it so the prompt works?_


How to autofocus already joined channels in irssi with /join?

I've got a bunch of windows (>80) in irssi. Quite often I quickly want to switch the active window to #channelX, without knowing which window number it has. Cycling through all of them is useless too of course. I'm not sure where to find the answer, named windows? I messed with autofocus_new_items and window_auto_change but both don't cut it.


How to install freetds on centos 6

This error occurs to me when i install freetds on centos Machine. What is the problem?? This is Error appears when i installed freetds i installed unixODBC but with version 64 bit How can i Solve this problem               [root@localhost portal]# yum install freetds     Loaded plugins: fastestmirror, refresh-packagekit     Loading mirror speeds from cached hostfile      * base: mirror.crazynetwork.it      * epel: mirror01.th.ifl.net      * extras: mirror.crazynetwork.it      * rpmforge: be.mirror.eurid.eu      * updates: mirror.crazynetwork.it     Setting up Install Process     Resolving Dependencies     --> Running transaction check     ---> Package freetds.i386 0:0.91-2.el5 will be installed     --> Processing Dependency: libtermcap.so.2 for package: freetds-0.91-2.el5.i386     --> Processing Dependency: libreadline.so.5 for package: freetds-0.91-2.el5.i386     --> Processing Dependency: libodbcinst.so.1 for package: freetds-0.91-2.el5.i386     --> Processing Dependency: libodbc.so.1 for package: freetds-0.91-2.el5.i386     --> Processing Dependency: libgnutls.so.13(GNUTLS_1_3) for package: freetds-0.91-2.el5.i386     --> Processing Dependency: libgnutls.so.13 for package: freetds-0.91-2.el5.i386     --> Running transaction check     ---> Package compat-libtermcap.i686 0:2.0.8-49.el6 will be installed     ---> Package compat-readline5.i686 0:5.2-17.1.el6 will be installed     ---> Package freetds.i386 0:0.91-2.el5 will be installed     --> Processing Dependency: libodbcinst.so.1 for package: freetds-0.91-2.el5.i386     --> Processing Dependency: libodbc.so.1 for package: freetds-0.91-2.el5.i386     --> Processing Dependency: libgnutls.so.13(GNUTLS_1_3) for package: freetds-0.91-2.el5.i386     --> Processing Dependency: libgnutls.so.13 for package: freetds-0.91-2.el5.i386     --> Finished Dependency Resolution     Error: Package: freetds-0.91-2.el5.i386 (epel)                Requires: libodbc.so.1     Error: Package: freetds-0.91-2.el5.i386 (epel)                Requires: libgnutls.so.13     Error: Package: freetds-0.91-2.el5.i386 (epel)                Requires: libodbcinst.so.1     Error: Package: freetds-0.91-2.el5.i386 (epel)                Requires: libgnutls.so.13(GNUTLS_1_3)      You could try using --skip-broken to work around the problem      You could try running: rpm -Va --nofiles --nodigest


How to print (part of) a man page?

The question is: **how do you print only part of a man page?** Currently I do `zcat manpage.1.gz | vim -` and just remove everything I don't want to print. Then I pass that through groff and lpr. Are there better methods?


How to use cron + python to regularly adjust screen brightness?

I want to use cron and this script (http://askubuntu.com/questions/23593/use- webcam-to-sense-lighting-condition-and-adjust-screen-brightness):               import opencv     import opencv.highgui     import time     import commands               def get_image():         image = opencv.highgui.cvQueryFrame(camera)         return opencv.adaptors.Ipl2PIL(image)          camera = opencv.highgui.cvCreateCameraCapture(-1)          while 1:         image = get_image()         image.thumbnail((32, 24, ))         image = tuple(ord(i) for i in image.tostring())         x = int((int((max(image) / 256.0) * 10) + 1) ** 0.5 / 3 * 10)         cmd = ("sudo su -c 'echo " + str(x) +             " > /sys/devices/virtual/backlight/acpi_video0/brightness'")         status, output = commands.getstatusoutput(cmd)         assert status is 0      crontab: _/30_ *** sudo python /home/username/screen.py However, there are two issues: First, can the while-loop be terminated after 5 sec or so? Second, could anyone please try to improve the script so that lower brightness-levels can be set using the script? Maybe the way the 256 brightness-levels are mapped to the ones that can be set for the screen would need to be changed. Thanks


Make bash use external `time` command rather than shell built-in

How can I make bash use time binary (/usr/bin/time) by default instead of the shell keyword? `which time` returns `/usr/bin/time`   `type time` returns `time is a shell keyword`   Running `time` is obviously executing the shell keyword:               $ time          real    0m0.000s     user    0m0.000s     sys     0m0.000s     $ /usr/bin/time     Usage: /usr/bin/time [-apvV] [-f format] [-o file] [--append] [--verbose]        [--portability] [--format=format] [--output=file] [--version]        [--quiet] [--help] command [arg...]      `enable -n time` returns `bash: enable: time: not a shell builtin`


I am failing to delete a partition on a USB drive/stick

I got a partition that is probably created by dd, and is about 200MB on a 4GB USB stick. I am failing to delete it using GParted (the option is greyed on the right-click menu). ![enter image description here](http://i.stack.imgur.com/1h3Vt.png) ![enter image description here](http://i.stack.imgur.com/Axbqm.png)


How do I auto-mount internal HDD partitions to dynamic mount points?

I would like to auto-mount some partitions the way USB drives and external HDDs are currently mounted on my system. I understand that to auto-mount internal HDDs at startup, I need to place it in the `/etc/fstab` and map its mount point, etc. But I like how my USB drives and external HDDs are automatically mounted to `/run/media/myuser/drive-label` when I plug them in. To do this to my internal HDDs, I'd have to use `udiskctl mount --block-device /dev/sda4` and it then gets mounted to `/run/media/myuser/sda4-label`. Is there a way of doing it automatically on boot? _I'm currently using Antergos (Arch Linux)_


Why does `htop` show more process than `ps`

In `ps xf`               26395 pts/78   Ss     0:00  \_ bash     27016 pts/78   Sl+    0:04  |   \_ unicorn_rails master -c config/unicorn.rb                                                27042 pts/78   Sl+    0:00  |       \_ unicorn_rails worker[0] -c config/unicorn.rb                                              In `htop`, it shows up like: ![enter image description here](http://i.stack.imgur.com/1elU4.png) Why does htop show more process than ps?


Why is there a big delay after entering a wrong password?

I notice a weird (well, according to me) thing about passwords. For example, if I type an incorrect password during login, there will be a few seconds' delay before the system tells me so. When I try to `sudo` with a wrong password I would also have to wait before the shell says "Sorry, try again". I wonder why it takes so long to "recognize" an incorrect password? This has been seen on several distributions I use (and even OSX), so I think it's not a distribution specific thing.


Is it possible to remove the delay on wrong password?

So I type my password incorrectly from time to time. Sometimes for `sudo` sometimes for logging in to my (Ubuntu) machine. In either case, there is a two or three second delay before it gives me a second chance. I understand that this is a security feature, but I'm curious if this could be disabled for the first failed attempt.


why slight delay after failed login in tty

> **Possible Duplicate:**   >  Why a wrong password gives a big delay Whenever I mistype my password when logging in in a tty, I have noticed that I have to wait for a second before I'm able to log in again. I can't seem to find the reason for this nor what is causing it. I can only think of this being some security layer preventing from bruteforcing logins from a scripted HID attached to the machine. Is there a wayto shorten the delay? If I'm correct I see the same behavior in kdm and other screenlocks.


I can't adjust screen brightness of my laptop anymore

My laptop has keyboard buttons for adjusting screen brightness. After a Debian Squeeze re-installation, they don't work no more. [ **laptop** ] Acer TravelMate 6592; I use `Fn``<` to decrease the brightness and `Fn``>` to increase it.


Boot Linux from UEFI BIOS

I'm porting UEFI BIOS. I'd like to download an Linux image (bzImage) to system memory by TFTP in my UEFI shell, and then boot the OS directly. I know we generally need another bootloader to do that. But is it possible to boot Linux in UEFI BIOS? And how?


Set visible directories for SFTP access?

I am setting up SFTP access to one of my machines running Linux with the Dropbear SSH server. When I SFTP onto the machine remotely, I can see the entire filesystem on it, even if I might not have write access. How to I control what directories a user can see when connecting to my machine via SFTP? For example, what if I only want to make one directory, e.g. /ftp/, visible and accessible? Thanks.


Why doesn't rc.local run entirely

Here is my rc.local               #!/bin/sh -e     #     # rc.local     #     # This script is executed at the end of each multiuser runlevel.     # Make sure that the script will "exit 0" on success or any other     # value on error.     #     # In order to enable or disable this script just change the execution     # bits.     #     # By default this script does nothing.     /bin/echo 12 > /sys/class/backlight/acpi_video0/brightness     /bin/echo disable > /proc/acpi/ibm/bluetooth          # Samsung at home     /usr/bin/xrandr --newmode "1680x1050_60.00"  146.25  1680 1784 1960 2240 1050 1053 1059 1089 -hsync +vsync     /usr/bin/xrandr --addmode VGA1 1680x1050_60.00     /usr/bin/xrandr --output VGA1 --mode 1680x1050_60.00          exit 0      whose permission is `-rwxr-xr-x`. **The first command works, I can set the brightness of my laptop's monitor.** The following script is to disable bluetooth and to set resolution of my external monitor. Only the first command is correctly executed, not the others. I know that rc.local stops running when a command fails. However, I've tried to run it manually               /bin/sh /etc/rc.local      Everything seems to work correctly, the bluetooth is disabled and the resolution is set without problem. I've also tried to run the first command in terminal               /bin/echo 12 > /sys/class/backlight/acpi_video0/brightness     echo $?      It shows that the first command returns zero. So I don't understand why the system doesn't run all the commands in rc.local. I really need it, especially for the first 2 lines which need root permission.


Creative X-Fi alternative for Linux

I have a pretty slick Creative X-Fi Titanium (Elite Pro) card in my system. In Windows everything sounds amazing with this card, in Linux I just get generic sound. I can configure ALSA or Pulse to do some 2.0 -> 5.1 upmixing for me easily, but it just doesn't work as well as CMSS-3D does on Windows. I want my hardware upmixing back, X-Fi CMSS-3D Stereo Surround changes everything, And Crystalizer helps too (although some people hate it). Is there any dedicated soundcard out there worth getting over onboard sound that actually fully supports Linux and has officially provided drivers with full functionality on Linux just like on Windows? If not is there some way I can make my on-board audio match my X-Fi in sound quality? Or is my best bet to just shove this card in a Windows machine and stream my sound over ethernet with something terrible like pulseaudio to get the best of both worlds? (As in set up a dedicated sound server) I am assuming the list of modern sound cards fully compatible with Linux isn't big, so surely someone can point out my options?


Start the networking from scratch

Let us assume I have a computer that for some reasons has had all the networking information, in particular the stuff in /etc, wiped. Furthermore whatever caused the information to be wiped prevents the /etc folder to be modified. I've booted the computer, nothing regarding networking has been set up ( assume the driver for the card is loaded ). Now I need to initilialize and start the network from scratch. Can some describe the needed steps to set up the gateway, routing etc needed for networking? Or at least point me to a reference which does does.


How can I change the language in chromium?

I've installed chromium, but it deeply sucks that it uses my mother tongue (german) in its UI and for websites by default. I want the english back, like firefox did. I'm using archlinux's default packages. I looked into the settings dialogs, but I found nothing useful.


Writing to picture which is scanned document

I have a scanned contract and I need to change only a few names and dates in the contract. It's easy to scan the document but impossible to ocr the document and open in *.doc format. Is there an application that is able to reliably change the dates and names in scanned image, so I can print it with other names and dates? thank you for help


Inittab seems to ignore remount,rw /

I have an embedded system that boots off compact flash and runs with the initrd.img ramdisk mounted as root. When booting, it mounts the initrd image ok in read only mode but then when inittab runs, it seems to skip over the first mount command which is               null::sysinit:/bin/mount -o remount,rw /      I have /etc/fstab setup with the correct options as far as I know:               /dev/root    /    ext2    rw,noauto,noatime    1    1      The system then manages to get me a command prompt and I can then login as root and type the mount command which works without a problem. Furthermore, this same setup has worked on a seemingly identical piece of target hardware. The difference is that I am creating the boot image from my laptop instead of the usual server that we use. My laptop is running a newer version of grub which I use to make a bootloader for the image. Perhaps I also have a newer version of genext2fs which is used to make the image used as the ramdisk. The server is running FC10 but my laptop is using ubuntu so there must be some differences that I'm overlooking which is affecting mount or inittab. Could it be something to do with /dev/null? Why isn't the system remounting the ramdisk image and how can I fix it?


Can't get pop down menus to do anything in KDE/QT application GUIs in Ubuntu (Gnome session)

I have a brand new install of Ubuntu 10.10 x64 in an attempt to solve the following problem from my previous 10.04 x86 install, but with the exact same problem persisting. When trying to run Amarok or Skype, which I am told produce their GUI component via the KDE and QT frameworks ( I may be misusing these terms but I hope my point comes across ), both of these applications fail to produce menus when a menu producing button is clicked. This of course, makes both of these apps useless. I installed both apps through the Ubuntu software manager, so expected that any KDE runtime dependencies would have been taken care of already. I then installed kdelibs manually from the console, which didn't appear to be installed already, but this didn't seem to change anything. I installed a QT GUI settings management application to see if somehow menus were turned off or something for QT applications, but the QT settings application itself appears to suffer from the same lack of popdown menus... I don't have this problem with any of my Gnome apps. What is wrong here? How can I make these applications work?


Mount (or makefs or tunefs or cap or...) option to disallow symlinks?

(Other than mkfs.vfat, that is.) Is there a way in Linux to have a filesystem mounted but to prevent symlinks from being made on it? It's fine if this needs to happen at the time the filesystem is created rather than at mount time, and it's fine if this requires a "weird" filesystem (but it can't be vfat; I do want permissions). (An option that allows symlinks but prevents the formation of a graph rather than a tree would be fine too, but IIRC from CS101 that's NP-hard.)


What program constantly reads e-mails and could execute actions under certain conditions?

I need a program that would be running as a daemon, connecting to mail server and reading inbox of a specified e-mail address (provided with password, of course =) ). If certain conditions are met, it'd execute a script - and there could be many different conditions with many different scripts =) Conditions could include: sender address, e-mail topic&text, etc. Is there any program like I've described?


uploaded file via filezilla to proftp server(on ubuntu 14.04 lts) but reported 550 error               550 download.html: Permission denied     Error:  Critical file transfer error      I try to set the directory to chmod 777 but error is same ftp for download is OK your comment welcome


dd is crashing after a few hours of transfer

I am trying to clone a external hardrive ( 1.5T ) to a second one ( 3T ) with dd. I am working on Unix and want to create a disk image. Here is the command I am using :               dd if=/dev/disk1 of=/Volumes/FreeAgent\ GoFlex\ Drive\ DENISE/SeaGate_AC.dmg conv=noerror      I have used the following command to check the progress of my transfer:               kill -INFO 1880      At the beginning it was working correctly and here is an example of the output:               8576952+0 records in     8576952+0 records out     4391399424 bytes transferred in 658.085533 secs (6672992 bytes/sec)       But after a while, the terminal is not answering and even my Finder is crashing when I am trying to access the destination HD. I have tried with the option sync with the same result Any suggestions are welcome... Thanks Simon Here is the output of dmesg as suggested by slm:               2Request - begin     com_seagate_IOPowSec00_10_5: GetBufferDescriptor with buffer=0 dataSize=0 task=0     com_seagate_IOPowSec00_10_5-(NA0LVZ12): IssueSAT12Request - SCSITaskStatus 2     com_seagate_IOPowSec00_10_5-(NA0LVZ12): IssueSAT12Request - SendCommand non-zero status,     check condition     com_seagate_IOPowSec00_10_5-(NA0LVZ12): IssueSAT12Request - senseSize 18, respCode 0x72,    senseKey 0x1, addlSenseCode 0x0, addlSenseQual 0x1d, addlLength 0xe     com_seagate_IOPowSec00_10_5-(NA0LVZ12): IssueSAT12Request - returning main line 0     com_seagate_IOPowSecUserClient00_10_5[0x12f7ed00]::externalMethod(2, 0x1102c70, 0, 0, 0)     com_seagate_IOPowSecUserClient00_10_5[0x12f7ed00]::externalMethod(9, 0x1102c70, 0, 0, 0)     com_seagate_IOPowSec00_10_5-(NA0LVZ12)::UpdateSelfTestResults: using     IssueSmartDiagnosticStatus     com_seagate_IOPowSec00_10_5-(NA0LVZ12): IssueSAT12Request - begin     com_seagate_IOPowSec00_10_5: GetBufferDescriptor with buffer=12ee1928 dataSize=200 task=0     com_seagate_IOPowSec00_10_5-(NA0LVZ12): IssueSAT12Request - SCSITaskStatus 0     com_seagate_IOPowSec00_10_5-(NA0LVZ12): IssueSAT12Request - returning main line 1     com_seagate_IOPowSecUserClient00_10_5[0x12f7ed00]::externalMethod(2, 0x1102c70, 0, 0, 0)     com_seagate_IOPowSecUserClient00_10_5[0x12f7ed00]::externalMethod(10, 0x1102c70, 0, 0, 0)     com_seagate_IOPowSecUserClient00_10_5[0x12f7ed00]::externalMethod(1, 0x1102c70, 0, 0, 0)     com_seagate_IOPowSecUserClient00_10_5[0x9ffc000]::externalMethod(0, 0x1102c70, 0, 0, 0)     com_seagate_IOPowSecUserClient00_10_5[0x9ffc000]::externalMethod(23, 0x1102c70, 0, 0, 0)     com_seagate_IOPowSecUserClient00_10_5[0x9ffc000]::externalMethod(1, 0x1102c70, 0, 0, 0)     com_seagate_IOPowSecUserClient00_10_5[0x9ffc000]::externalMethod(0, 0x1152c70, 0, 0, 0)     com_seagate_IOPowSecUserClient00_10_5[0x9ffc000]::externalMethod(24, 0x1442c70, 0, 0, 0)     com_seagate_IOPowSecUserClient00_10_5[0x9ffc000]::externalMethod(1, 0x1442c70, 0, 0, 0)     com_seagate_IOPowSecUserClient00_10_5[0xa014600]::externalMethod(0, 0x112ac70, 0, 0, 0)     com_seagate_IOPowSecUserClient00_10_5[0xa014600]::externalMethod(2, 0x112ac70, 0, 0, 0)     com_seagate_IOPowSecUserClient00_10_5[0xa014600]::externalMethod(12, 0x112ac70, 0, 0, 0)     com_seagate_IOPowSec00_10_5-(NA0LVZ12)::IssueSmartRequest: using IssueSmartReturnStatus     com_seagate_IOPowSec00_10_5-(NA0LVZ12): IssueSAT12Request - begin     com_seagate_IOPowSec00_10_5: GetBufferDescriptor with buffer=0 dataSize=0 task=0     com_seagate_IOPowSec00_10_5-(NA0LVZ12): IssueSAT12Request - SCSITaskStatus 2     com_seagate_IOPowSec00_10_5-(NA0LVZ12): IssueSAT12Request - SendCommand non-zero status,  check condition     com_seagate_IOPowSec00_10_5-(NA0LVZ12): IssueSAT12Request - senseSize 18, respCode 0x72,     senseKey 0x1, addlSenseCode 0x0, addlSenseQual 0x1d, addlLength 0xe     com_seagate_IOPowSec00_10_5-(NA0LVZ12): IssueSAT12Request - returning main line 0     com_seagate_IOPowSecUserClient00_10_5[0xa014600]::externalMethod(2, 0x112ac70, 0, 0, 0)     com_seagate_IOPowSecUserClient00_10_5[0xa014600]::externalMethod(9, 0x112ac70, 0, 0, 0)     com_seagate_IOPowSec00_10_5-(NA0LVZ12)::UpdateSelfTestResults: using IssueSmartDiagnosticStatus     com_seagate_IOPowSec00_10_5-(NA0LVZ12): IssueSAT12Request - begin     com_seagate_IOPowSec00_10_5: GetBufferDescriptor with buffer=12ee1928 dataSize=200 task=0     com_seagate_IOPowSec00_10_5-(NA0LVZ12): IssueSAT12Request - SCSITaskStatus 0     com_seagate_IOPowSec00_10_5-(NA0LVZ12): IssueSAT12Request - returning main line 1     com_seagate_IOPowSecUserClient00_10_5[0xa014600]::externalMethod(2, 0x112ac70, 0, 0, 0)     com_seagate_IOPowSecUserClient00_10_5[0xa014600]::externalMethod(10, 0x112ac70, 0, 0, 0)     com_seagate_IOPowSecUserClient00_10_5[0xa014600]::externalMethod(1, 0x112ac70, 0, 0, 0)     com_seagate_IOPowSec00_10_5-(NA0LVZ12) handling stop request     com_seagate_IOPowSec00_10_5-(NA0LVZ12) IssueModeSelectTimer: shortTime = 1     com_seagate_IOPowSec00_10_5-(NA0LVZ12)::SetModeSelectTimer: using shortime     com_seagate_IOPowSec00_10_5-(NA0LVZ12) IssueModeSelectTimer: complete     com_seagate_IOPowSec00_10_5-(NA0LVZ12): IssueStopUnderDeviceControlCommand     Warning: audit space low (< 5% free)on audit log file-system      My image file is about 17G... **UPDATE #1** Both drives are formatted as `NTFS`. The system they're mounted on is `Mac OSX 10.6.8`. The `GoFlex` software provided by Seagate is being used to access the 3TB drive. The 1.5TB HDD is failing and during boot up `Disk Utility` is failing when scanning the drive.


Key letters? Option letters? What are these things?

Some GNU and GNU-like tools seem to accept options in a combined manner, e.g. `foo -hgcf` instead of `foo -h -g -c -f`. An example is tar, as in `tar cXbf keepout 20 archive.shar *.txt` instead of `tar -c -b 20 -X keepout -f archive.tar *.txt`. I was under the impression that this "compressed" or "short" style of specifying arguments had a name. Does anyone know what it's called, how I can learn more about it, and how to find out if a tool supports it?


Vim :fold of python code not different to C/C++ code

When I enter the command `:fold` inside my python code in .py files, Vim inserts the `/*{{{*/` and `/*}}}*/` tags. They, of course, cannot be parsed by python interpreter. When I'm in python I would like something like `#{{{` Do you know how I could do that ? Of course, keeping the `/*{{{*/` for my C/C++ files.


Read data from a pipe for a certain amount of time (in seconds)

Is there an easy way to create a pipe that only lasts for a given amount of wall time? I want to be able to take a "snapshot" of what's being written STDOUT for a period of time (rather than bytes or lines). Something like `tail -f /var/log/whatever.log | pipe_for_seconds 10 > ./10_second_sample_of_log` I'm using BASH, but if this is dramatically easier in some other shell, I'd like to hear about it.


is upstart and supervisord used for the same thing?

I have a some jvm based processes that I need to make sure start whenever my server is rebooted, and also if it stops because of an unexpected error etc. I'm running Ubuntu 12.04 in case in matters. I have seen sample upstart scripts and I am sort of leaning that way, but I want to understand what the differences is going with something like upstart or supervisord. Are they used for the exact same purposes or there are differences in functionality?


canlock-password - hashed password (?) mysteriously in .emacs

In my `.emacs`, this has appeared, for unknown reasons:               (custom-set-variables       ; ...       '(canlock-password "fdd7041be5b...")      And so on, totalling 40 characters and digits. `C-h v` offers this:               canlock-password is a variable defined in `canlock.el'.     Its value is "fdd7041be5b..."          Documentation:     Password to use when signing a Cancel-Lock or a Cancel-Key header.      I use rmail and GNUS, and those use headers, other than that it doesn't remind my of anything, really, but it can of course be something unrelated that I've overlooked. I tried to delete it, but it came back.


Printing the line after or before a regular expression match in Bash

Given a string like the following:               BASH - Mplayer Playlist Shuffle     http://www.youtube.com/watch?v=IB7SCPtbJM8     metalx1000     BASH - Playing Music     http://www.youtube.com/watch?v=S_-EGoLYCXY     metalx1000     BASH - Burn ISO images with cdrecord in Linux     http://www.youtube.com/watch?v=BxAEGa9NKs8     metalx1000     BASH - replace space in file names     http://www.youtube.com/watch?v=MRlUPV1221Y     metalx1000      What would be the best way to get the titles, the URLs, and the uploaders into separate variables? My thought was to find a way to `grep`, `sed`, or `awk` www.youtube.com, and then print the line above it or below it. Then save it into a variable. I haven't had any luck finding a solution that works.


"Missing operating system" error on boot

I replaced Windows 8 with Linux Mint. After the installation had completed, I restarted only to face a black screen with `missing operating system`. I thought the problem was with Mint so I decided to try Fedora. Again I got the same problem. How can I fix this problem?


I can see my LVM but I can't initialize it. Missing UUID of one of the disks

I have had a 2 disk LVM called Data going for about 6 months, and I recently bought a third disk. I installed the disk in the machine, and wanted to format it and extend the lvm onto it, like I've done before. The system refused to format the disk, claiming it was already in use. I looked around for possible solutions, and ended up using dmsetup remove_all. This allowed me to format the new drive, but now it seems the system has problems with one of the two disks in the lvm. I don't know what the next step is. Will try to include as much info as I can. Sda is a 500gb disk for system/swap etc. Sdb and sdc are the two already existing disks, and sdd is the newest addition. Sdb, sdc and sdd are all 3TB disks. I basically just want the lvm restored, and possibly the new disk included in it. It seems like the solution is right in front of me, I just don't quite know what to do.                 root@Localhost:~$ sudo lvdisplay            Couldn't find device with uuid DLdcnb-5EzK-Vhw2-3M10-8JG8-R0X1-OjWyW2.       --- Logical volume ---       LV Path                /dev/Data/cargo       LV Name                cargo       VG Name                Data       LV UUID                avSFsQ-J49l-twOa-j9KM-Dkeg-JDBE-aG1yWC       LV Write Access        read/write       LV Creation host, time Enterprise, 2013-09-22 18:32:06 +0100       LV Status              NOT available       LV Size                5.46 TiB       Current LE             1430792       Segments               2       Allocation             inherit       Read ahead sectors     auto                    root@Localhost:~$ sudo vgdisplay            Couldn't find device with uuid DLdcnb-5EzK-Vhw2-3M10-8JG8-R0X1-OjWyW2.       --- Volume group ---       VG Name               Data       System ID                    Format                lvm2       Metadata Areas        1       Metadata Sequence No  4       VG Access             read/write       VG Status             resizable       MAX LV                0       Cur LV                1       Open LV               0       Max PV                0       Cur PV                2       Act PV                1       VG Size               5.46 TiB       PE Size               4.00 MiB       Total PE              1430792       Alloc PE / Size       1430792 / 5.46 TiB       Free  PE / Size       0 / 0          VG UUID               rR2QmV-cbjs-rOYu-fU62-uEXp-cVfJ-xVHgRp                    root@Localhost:~$ sudo vgchange -ay            Couldn't find device with uuid DLdcnb-5EzK-Vhw2-3M10-8JG8-R0X1-OjWyW2.       Refusing activation of partial LV cargo. Use --partial to override.       0 logical volume(s) in volume group "Data" now active                    root@Localhost:~$ sudo vgchange -ay --partial            Partial mode. Incomplete logical volumes will be processed.       Couldn't find device with uuid DLdcnb-5EzK-Vhw2-3M10-8JG8-R0X1-OjWyW2.       Cannot activate Data/cargo: all segments missing.       0 logical volume(s) in volume group "Data" now active                    root@Localhost:~$ sudo blkid          /dev/sda7: UUID="200fea91-eed3-4634-8303-ef777e6e60a3" TYPE="swap"      /dev/sdb: UUID="jH6LUK-hTsX-035m-mdSY-zfHp-oBaR-THVnC2" TYPE="LVM2_member"      /dev/sda1: UUID="6144b690-afdd-4bd4-a095-a35da926f6bc" TYPE="ext4"      /dev/sda5: UUID="73df5ee2-33fb-495e-ad20-ad33f82996b1" TYPE="ext4"      /dev/sda6: UUID="d7a9d483-ed4a-4220-bf57-576723c636b8" TYPE="ext4"      /dev/sda8: UUID="b5a9d030-d3af-4dfe-b72a-8180128caa11" TYPE="ext4"      /dev/sda9: UUID="a7c62a16-62ee-406d-ad97-4887c823f40f" TYPE="ext4"      /dev/sdd1: UUID="mWr3pU-WDNn-8cG2-Xt0z-fZvo-wzLe-wK7Dv3" TYPE="LVM2_member"                     root@Localhost:~$ sudo fdisk -l          Disk /dev/sda: 500 GB, 500105249280 bytes     255 heads, 63 sectors/track, 60801 cylinders     Units = cylinders of 16065 * 512 = 8225280 bytes             Device Boot      Start         End      Blocks   Id  System      /dev/sda1   *           1          43      345366   83  Linux     Warning: Partition 1 does not end on cylinder boundary.     /dev/sda2              43       60802   488046667    5  Extended     Warning: Partition 2 does not end on cylinder boundary.     /dev/sda5              43        1137     8787555   83  Linux     Warning: Partition 5 does not end on cylinder boundary.     /dev/sda6            1137        1502     2931862   83  Linux     Warning: Partition 6 does not end on cylinder boundary.     /dev/sda7            1502        2285     6289447   82  Linux swap     Warning: Partition 7 does not end on cylinder boundary.     /dev/sda8            2285        2334      393592   83  Linux     Warning: Partition 8 does not end on cylinder boundary.     /dev/sda9            2334       60802   469644210   83  Linux     Warning: Partition 9 does not end on cylinder boundary.     Error: /dev/sdb: unrecognised disk label     Error: /dev/sdc: unrecognised disk label          Disk /dev/sdd: 3000 GB, 3000590369280 bytes     255 heads, 63 sectors/track, 364801 cylinders     Units = cylinders of 16065 * 512 = 8225280 bytes             Device Boot      Start         End      Blocks   Id  System      /dev/sdd1               1      364802  2930272033   83  Linux      Warning: Partition 1 does not end on cylinder boundary.                    picard@Enterprise:~$ sudo pvdisplay -C       Couldn't find device with uuid DLdcnb-5EzK-Vhw2-3M10-8JG8-R0X1-OjWyW2.       PV             VG   Fmt  Attr PSize PFree       /dev/sdb       Data lvm2 a--  2.73t    0        /dev/sdd1           lvm2 a--  2.73t 2.73t       unknown device Data lvm2 a-m  2.73t    0


How do I manually install the XPM library?

I'm wanting to install SWI-Prolog, however my linux box (more like a tuna can; it's a RasPi) isn't connected to the internet, so I can't just do               sudo apt-get install libxpm-dev      How can I do this succesfully by hand?


How do I create a VM from an existing FreeBSD 8.2 PreRelease server?

I need to create a VM (VirtualBox) out of an existing `freebsd 8.2 pre-release i386` machine. I need to replicate the exact same environment and I can't rebuild from scratch because FreeBsd 8.2 PreRelease has been discontinued. I have never done this, and I haven't found a good lead yet. What is the classic workflow?


USB 2.0 device is not working in USB 3.0 ports

I have a Ubuntu 12.04 system. On that system I have one USB 3.0 port. In this port I am trying use my USB 2.0 device, but every time when I plug in that USB 2.0 device into the USB 3.0 port, the system gets hung and I try to shutdown but it won't allow me to. If I continue to match Port types to Device speeds (2.0 to 2.0) everything woks fine. So my question is: How can I allow a USB 3.0 port to use a USB 2.0 device or is there any way to convert a USB 3.0 port to a USB 2.0 port like drivers or something? Am I mistaking the issue I'm having for another type of problem? Here is my `lsub` command output               Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub     Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub     Bus 003 Device 002: ID 046d:0823 Logitech, Inc.      Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub     Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub     Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub     Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub     Bus 002 Device 003: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB     Bus 002 Device 009: ID 046d:0823 Logitech, Inc.      Bus 002 Device 008: ID 5555:1110 Epiphan Systems Inc. VGA2USB     Bus 002 Device 006: ID 0d8c:0008 C-Media Electronics, Inc.      Bus 002 Device 007: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)      and for `dmesg` command output you can refer this link Suggestions would be appreciated. Thanks in advance.


Dual boot Mint/Windows: Lost 8 GBs on Windows side

Many dual boot tutorials talk about freeing up space through the disk manager in Windows before attempting a dual boot with Linux -- Out of curiosity I decided to skip this step and just run the Mint installer and let it decide what to do ( Mint 12 / Win 7 ). Results? I'm missing 8 gigabytes of space on the Windows side. Not complaining here ...I deliberately took the risk to see what would happen. So what's your explanation for why this happened and how you would recover the space? This is a Toshiba laptop. Started with 3 primary partitions. There is the Toshiba recovery partition, the Win 7 recovery partition and the Win 7 OS partition. Is this due to the MBR primary partition limitation? An issue with parted? **UPDATE** `df -h` shows the following: > >     Filesystem            Size  Used Avail Use% Mounted on >     /dev/sda5             108G  3.7G   99G   4% / >     udev                  898M  4.0K  898M   1% /dev >     tmpfs                 362M  1.1M  361M   1% /run >     none                  5.0M     0  5.0M   0% /run/lock >     none                  905M  136K  905M   1% /run/shm >   Using the disk utility in Mint I see the following:   * System: 1.6 GB NTFS   * Tl1...etc: 119 GB NTFS   * Extended: 119 GB   * 117 GB ext4   * 1.9 GB swap   * HDDRECOVERY: 10 GB NTFS So the drive is 250 GB -- Windows 7 Disk Manager shows the following:   * Disk 0 Basic - 232.89 GB Divided as follows:   * 1.46 GB Active, Recovery - Simple - Basic   * 111.21 GB NTFS Boot - Simple - Basic   * 109.10 GB Primary - Simple - Basic   * 1.80 GB Primary - Simple - Basic   * 9.32 GB Primary - Simple - Basic So if we subtract the 10 GB recovery partition we get 240 GB. What happened to 7 approx. Gigabytes? **UPDATE 2**   My question has been answered -- thanks. So now I owe an explanation. I am researching this for a new Linux user who'd like a dual-boot config but is having issues with all the tutorials suggesting 'shrinking' partitions in Windows first. Why bother? It's an added step and it's way easier without. Can anyone offer an explanation as to what the advantage is -- ? Seems like a wasted and confusing step for would-be converts.


How to specify an ISO as the location of root filesystem for GRUB?

I'm trying to understand the Debian "booting from Hard Disk" installation manual. The process is as follows: I copy a `kernel image`, a `ramdisk initrd` and an `ISO` with installer to the hard drive and then configure GRUB to start the kernel and ramdisk, but also I have to tell GRUB, where is the root filesystem (it should be located at the ISO), so that the kernel could pivot root to it. But the debian-supplied grub configurations seem to specify the whole hard drive as the root filesystem, not the ISO file within it: GRUB1:               title  New Install     root   (hd0,0)     kernel /boot/newinstall/vmlinuz     initrd /boot/newinstall/initrd.gz      GRUB2:               menuentry 'New Install' {     insmod part_msdos     insmod ext2     set root='(hd0,msdos1)'     linux /boot/newinstall/vmlinuz     initrd /boot/newinstall/initrd.gz     }      Why would that work? Is GRUB so smart to mount the ISO file on the hard disk as root filesystem, not the whole hard disk? Or do I have to `dd` the contents of ISO right onto the hard disk? Debian is vague on this.


SSH LocalCommand on exit

In `~/.ssh/config` you can use the `LocalCommand` directive to execute a local command whenever you connect to a remote machine via SSH. But how do I execute a command when I _exit_ an SSH connection? It seems that *.bashrc/.bash_profile* files are not sourced when connection ends or is closed.


Are there ways to break into a machine if iptables drops all traffic?

Say I install Linux on an blank computer (no other OS, disk is formatted for installation), and I configure this in iptables:               iptables -F     iptables -P INPUT DROP     iptables -P OUTPUT DROP     iptables -P FORWARD DROP      This machine is then directly connected to the internet (internet won't be functional though as no traffic goes in and out). How secure will this machine be? Are there ways to break in to this machine? Let's define 'break in' as reading any file from this machine. If the OS matters, feel free to compare how this would behave using the latest Ubuntu Server edition vs. Arch Linux with only the basics installed.


Mount a dropbox directory without installing the dropbox application

This is most likely to be a duplicate question, but I could not find a simple answer for my problem. My situation is as follows: I have multiple accounts on different computing clusters. I want to have a common directory where I can save some files and scripts. In particular, I want a way to simply access a `Dropbox` directory with a passwordless connection. So for instance, if I am logged to one of my accounts and I want to run a `python` script to process some of my files, I will like to do something like this:               python /dropbox_path/script.py      Where `/dropbox_path/` is a web link to my `Dropbox` account.


Date calculation in script for notification alerts

I want to create account expiry alerts therefore I need to write a script which could alert me before 1 month of expiry over email. I'm working on Linux. I can get expiry information as 2015-27-03. I want if 31 days are left in 2015-27-03 by determining current date then I could get an email alert. I'm unable to write a correct if statement.


Tunnel traffic through another machine over ssh

I want to be able to route a portion of my traffic through another machine over SSH. For example, is it possible to browse the web through the ssh tunnel and also browse the web through your LAN connection without much effort? (i.e. I want a seamless transition from using tunnel to using LAN) Thus it is not a simple _how do I tunnel ALL web traffic through ssh tunnel_ , but moreso _how can I setup a tunnel that I can use at my discretion but not impeded my normal traffic flow_. (Kind of on an as-needed basis) I would like the filtered traffic to be encrypted when leaving the LAN and it could be ftp, ssh, web, mail whatever traffic. Some questions I think I need to answer/address:   * Does this require multiple nics?    * Does this require setting up a proxy?    * Can I even do this the way I want it to function?  Are there other options aside from a tunnel to achieve the result of having some traffic (user decides) encrypted through another machine (outside the LAN) and have other traffic use the normal flow through the LAN and out into the internet world? Edit: If some of the answers depend on specific traffic types I can be more specific and say that web traffic is a primary focus of this. However, other traffic such as IM/Email traffic would be desirable.


SSH Connection into LAN without port forwarding?

I'm living inside a study union for the next few month. the organisation has its own network and gateways where the students are connected to the internet. problem: I don't have access to the routers but want to install my sftp- server. is there a possibility to access from outside the LAN to my server via sftp?


log into a machine through another, with (de)compression at the ends only

I have looked all around but couldn't find the answer to a very simply question: I would like to log into machine C from machine A, passing through machine B. However, B is slow, so I would also like my connection to C to be compressed/decompressed at C, tunneled through B, and decompressed/compressed at A. What ssh command should I execute (in machine A) to get a prompt at machine C when:   1. I am physically at machine A.    2. I can use ssh to log directly... 2.1. ... into machine B from A 2.2. ... into machine C from B   3. I cannot log into machine C from A directly * * * [EDIT] This is _not a duplicate_ because:   1. I am not asking how to forward traffic in general, only an ssh connection, so there could be a different answer for the particular case of ssh forwarding through ssh   2. I am asking for compression at the ends (as even the title mentions)


Installing Certain PPAs

I'm following my own article: Making a Wireless Hotspot When I put in               sudo add-apt-repository ppa:nilarimogard/webupd      I get the message > Cannot access PPA > (https://launchpad.net/api/1.0/~nilarimogard/+archive/webupd) to get PPA > information, please check your internet connection. I use Cylon Linux, which uses the updates from Ubuntu 12.04, basically. I'm using Ethernet. After doing it and responding to an answer, I get               Address already in use                                                                              [fail]     invoke-rc.d: initscript dnsmasq, action "start" failed.


Run smartctl on all disks of a server

My question is a quite simple , I want to run the command `smartctl -i -A` on all disks that the server have. Think that I've too much server with different number of disks and RAID Controllers, then I need to scan all drivers for a diagnosis. I'm thinking of running `smartctl --scan | awk '{print $1}' >> test.log`, so if I open the test.log I'll have all the drives information in it.   After this I need to run some if or do constructions to scan with `smartctl` all drivers. I don't know if this is the best way to do this, since I need to identify the RAID Controller too. Am heading in the right direction? ## Edit: I'm used to use these commands to troubleshoot: ### Without RAID Controller               for i in {c..d}; do         echo "Disk sd$i" $SN $MD         smartctl -i -A /dev/sd$i |grep -E "^  "5"|^"197"|^"198"|"FAILING_NOW"|"SERIAL""     done      ### PERC Controller               for i in {0..12}; do         echo "$i" $SN $MD         smartctl -i -A -T permissive /dev/sda -d megaraid,$i |grep -E "^  "5"|^"197"|^"198"|"FAILING_NOW"|"SERIAL""     done     /usr/sbin/megastatus –physical     /usr/sbin/megastatus --logical      ### 3ware Controller               for i in {0..10}; do         echo "Disk $i" $SN $MD         smartctl -i -A /dev/twa0 -d 3ware,$i |grep -E "^  "5"|^"197"|^"198"|"FAILING_NOW"|"SERIAL""     done      ### SmartArray & Megaraid Controler:               smartctl –a –d cciss,0 /dev/cciss/c0d0     /opt/3ware/9500/tw_cli show     cd /tmp      ### DD (Rewrite disk block (DESTROY DATA)):               dd if=/dev/zero of=/dev/HD* bs=4M     HD*: sda, sdb…      ### Burning (Stress test (DESTROY DATA)):               /opt/systems/bin/vs-burnin --destructive --time=<hours> /tmp/burninlog.txt      ### Dmesg&kernerrors:               tail /var/log/kernerrors     dmesg |grep –i –E “”ata”|”fault”|”error”      So what I'm trying to do is automate these commands.   I want that the script verify all disks that the host have and run the appropriate `smartctl` command for the case.   Something like a menu with some options that let me choose if I want to run a `smartctl` or some destructive command, if I choose to run `smartctl`   the script will scan all disks and runs the command according to the host configuration ( with / without RAID controller),   and if I choose to run a destructive command, the script will ask me to put the disk number that I want to do this. * * * ## Edit 2: I resolved my problem with the following script:               #!/bin/bash     # Troubleshoot.sh     # A more elaborate version of Troubleshoot.sh.          SUCCESS=0     E_DB=99    # Error code for missing entry.          declare -A address     #       -A option declares associative array.                    if [ -f Troubleshoot.log ]     then         rm Troubleshoot.log     fi          if [ -f HDs.log ]     then         rm HDs.log     fi          smartctl --scan | awk '{print $1}' >> HDs.log     lspci | grep -i raid >> HDs.log          getArray ()     {         i=0         while read line # Read a line         do             array[i]=$line # Put it into the array             i=$(($i + 1))         done < $1     }          getArray "HDs.log"               for e in "${array[@]}"     do         if [[ $e =~ /dev/sd* || $e =~ /dev/hd* ]]             then                 echo "smartctl -i -A $e" >> Troubleshoot.log                 smartctl -i -A $e >> Troubleshoot.log # Run smartctl into all disks that the host have         fi     done     exit $?   # In this case, exit code = 99, since that is function return.      I don't know if this solution is the right or the best one, but works for me!   Appreciate all help!!


Unzipping appearing to fail

I run:               ~$ gzip -d Mom.img.gz     ^C     ~$      I created `Mom.img.gz` by piping a `dd` to `gzip`. Should I be seeing output? I tried it with the GUI too, and the progress bar didn't move.


FreeBSD: Which branch is supported for longer?

Can someone help explain the FreeBSD support policy? I'm looking at http://security.freebsd.org/#sup , which says:               Branch      Release         Type        Release Date        Estimated EoL     RELENG_6    n/a             n/a         n/a                 November 30, 2010     RELENG_6_4  6.4-RELEASE     Extended    November 28, 2008   November 30, 2010     RELENG_7    n/a             n/a         n/a                 last release + 2 years     RELENG_7_1  7.1-RELEASE     Extended    January 4, 2009     January 31, 2011     RELENG_7_3  7.3-RELEASE     Extended    March 23, 2010      March 31, 2012     RELENG_8    n/a             n/a         n/a                 last release + 2 years     RELENG_8_0  8.0-RELEASE     Normal      November 25, 2009   November 30, 2010     RELENG_8_1  8.1-RELEASE     Extended    July 23, 2010       July 31, 2012      We haven't decided between FreeBSD 7.x and FreeBSD 8.x yet. We want to go with a FreeBSD branch which is supported for a while. Which release will be supported for longer? RELENG_7, or RELENG_7_3 ? RELENG_7 says "last release", which is a big ambiguous.


ssh passwordless login not working on RHEL

After following this tutorial for setting up SSH pubkey auth, I cannot seem to get passwordless login to work, It always redirects me to the password authentication. As far as I am aware, I have correctly copied the public key into authorized_keys on the server onto one line and have also removed the trailing "email" address. I am running a windows machine but am ssh-ing through my git bash terminal. I have run the command `chmod 700 .ssh; chmod 640 .ssh/authorized_keys` on the server as the user bob Your help would be highly appreciated. thank you. The output of `ssh -vvv: bob@myserver` is as follows:               $ ssh -vvv bob@myserver     OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007     debug1: Reading configuration data /c/Users/bob/.ssh/config     debug2: ssh_connect: needpriv 0     debug1: Connecting to myserver [192.168.0.2] port 22.     debug1: Connection established.     debug1: identity file /c/Users/bob/.ssh/identity type -1     debug3: Not a RSA1 key file /c/Users/bob/.ssh/id_rsa.     debug2: key_type_from_name: unknown key type '-----BEGIN'     debug3: key_read: missing keytype     debug2: key_type_from_name: unknown key type 'Proc-Type:'     debug3: key_read: missing keytype     debug2: key_type_from_name: unknown key type 'DEK-Info:'     debug3: key_read: missing keytype     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug2: key_type_from_name: unknown key type '-----END'     debug3: key_read: missing keytype     debug1: identity file /c/Users/bob/.ssh/id_rsa type 1     debug1: identity file /c/Users/bob/.ssh/id_dsa type -1     debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3     debug1: match: OpenSSH_5.3 pat OpenSSH*     debug1: Enabling compatibility mode for protocol 2.0     debug1: Local version string SSH-2.0-OpenSSH_4.6     debug2: fd 3 setting O_NONBLOCK     debug1: SSH2_MSG_KEXINIT sent     debug1: SSH2_MSG_KEXINIT received     debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1     debug2: kex_parse_kexinit: ssh-rsa,ssh-dss     debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr     debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr     debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96     debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96     debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib     debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib     debug2: kex_parse_kexinit:     debug2: kex_parse_kexinit:     debug2: kex_parse_kexinit: first_kex_follows 0     debug2: kex_parse_kexinit: reserved 0     debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1     debug2: kex_parse_kexinit: ssh-rsa,ssh-dss     debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se     debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se     debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96     debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96     debug2: kex_parse_kexinit: none,zlib@openssh.com     debug2: kex_parse_kexinit: none,zlib@openssh.com     debug2: kex_parse_kexinit:     debug2: kex_parse_kexinit:     debug2: kex_parse_kexinit: first_kex_follows 0     debug2: kex_parse_kexinit: reserved 0     debug2: mac_init: found hmac-md5     debug1: kex: server->client aes128-cbc hmac-md5 none     debug2: mac_init: found hmac-md5     debug1: kex: client->server aes128-cbc hmac-md5 none     debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent     debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP     debug2: dh_gen_key: priv key bits set: 124/256     debug2: bits set: 512/1024     debug1: SSH2_MSG_KEX_DH_GEX_INIT sent     debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY     debug3: check_host_in_hostfile: filename /c/Users/bob/.ssh/known_hosts     debug3: check_host_in_hostfile: match line 9     debug3: check_host_in_hostfile: filename /c/Users/bob/.ssh/known_hosts     debug3: check_host_in_hostfile: match line 8     debug1: Host 'myserver' is known and matches the RSA host key.     debug1: Found key in /c/Users/bob/.ssh/known_hosts:9     debug2: bits set: 516/1024     debug1: ssh_rsa_verify: signature correct     debug2: kex_derive_keys     debug2: set_newkeys: mode 1     debug1: SSH2_MSG_NEWKEYS sent     debug1: expecting SSH2_MSG_NEWKEYS     debug2: set_newkeys: mode 0     debug1: SSH2_MSG_NEWKEYS received     debug1: SSH2_MSG_SERVICE_REQUEST sent     debug2: service_accept: ssh-userauth     debug1: SSH2_MSG_SERVICE_ACCEPT received     debug2: key: /c/Users/bob/.ssh/identity (0x0)     debug2: key: /c/Users/bob/.ssh/id_rsa (0xa01a478)     debug2: key: /c/Users/bob/.ssh/id_dsa (0x0)     debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password     debug3: start over, passed a different list publickey,gssapi-keyex,gssapi-with-mic,password     debug3: preferred publickey,keyboard-interactive,password     debug3: authmethod_lookup publickey     debug3: remaining preferred: keyboard-interactive,password     debug3: authmethod_is_enabled publickey     debug1: Next authentication method: publickey     debug1: Trying private key: /c/Users/bob/.ssh/identity     debug3: no such identity: /c/Users/bob/.ssh/identity     debug1: Offering public key: /c/Users/bob/.ssh/id_rsa     debug3: send_pubkey_test     debug2: we sent a publickey packet, wait for reply     debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password     debug1: Trying private key: /c/Users/bob/.ssh/id_dsa     debug3: no such identity: /c/Users/bob/.ssh/id_dsa     debug2: we did not send a packet, disable method     debug3: authmethod_lookup password     debug3: remaining preferred: ,password     debug3: authmethod_is_enabled password     debug1: Next authentication method: password         bob@myserver's password: <cursor>      **UPDATE:** I have tried to create a key using cygwin this time and it has given me the output as described in the tutorial (with the random key art at the bottom), It has not worked :(


Can't use SSH anymore after installing denyhosts

so I'm in a very tricky situation. I've installed denyhosts on my debian machine and suddenly I can't use SSH anymore. Hopefully I could still login through webmin, but with root, so I had to login with another user and then "su". I flushed the IPtables, changed the port of SSH back to 22 (I had it previously changed) and tried to remove denyhosts : aptitude remove denyhosts. It doesn't seem to work: E: Waited for /usr/bin/apt-listchanges --apt || test $? -ne 10 but it wasn't the re E: Failure running script /usr/bin/apt-listchanges --apt || test $? -ne 10 at this point I really don't know what to do, I still can't connect through SSH and I only have this text terminal in webmin that allows me to do it but very slowly. Any idea ? PS: When I do an aptitude upgrade now I get an error:               Get:1 http://security.debian.org/ squeeze/updates/main file amd64 5.04-5+squeeze 5 [50.3 kB]                                                                           Get:2 http://security.debian.org/ squeeze/updates/main libmagic1 amd64 5.04-5+sq ueeze5 [236 kB]                                                                       Fetched 286 kB in 0s (622 kB/s)                                                       dpkg-deb: unrecoverable fatal error, aborting:                                         wait for subprocess tar failed: No child processes                                   close failed in file object destructor:                                               IOError: [Errno 10] No child processes                                               Traceback (most recent call last):                                                      File "/usr/bin/apt-listchanges", line 237, in <module>                             main()                                                                              File "/usr/bin/apt-listchanges", line 102, in main                                      pkg = DebianFiles.Package(deb)                                                      File "/usr/share/apt-listchanges/DebianFiles.py", line 133, in __init__                 self.binary  = pkgdata.Package                                                    AttributeError: ControlStanza instance has no attribute 'Package'                     E: Waited for /usr/bin/apt-listchanges --apt || test $? -ne 10 but it wasn't the re                                                                                E: Failure running script /usr/bin/apt-listchanges --apt || test $? -ne 10       A package failed to install.  Trying to recover:          I get the same kind of error when I do a install or reinstall denyhosts...


/bin /etc /lib64 /root /sbin deleted or moved by mv folder/* /* while su

OS is Centos 6.5 64-bit I downloaded a tar file and wanted to untar and `mv` it. I untared, then accidentally (as root) ran `mv folder/* /*` instead of `mv folder/* .` bash said it couldn't overwrite some files, then asked permission for others. I ctrl-c'd out. I've left terminal session open, but have exited `su`. Now I've lost access to most `shell` commands, can't `ls` any directories and can't get back to `su`. The webserver and services still seem to be running. I can run very few commands, `cd` is one of them and when I try to `cd` to `/etc` or `/bin` it errors with `no directory found`. _EDIT_ Just noticed all folders missing from `/` (`bin`,`etc`,`lib64`,`root`,`sbin`) got moved to `/var` directory, I tried `/var/bin/su` & get: `-bash: /var/bin/su: /lib64/ld-linux-x86-64.so.2: bad ELF interpreter: No such file or directory`


How could running strace be fixing my OpenGL issue?

Since a recent major upgrade to my distribution (PLD Linux), I have been having trouble with a whole slew of programs. As best I can tell, anything that touches OpenGL or PulseAudio segfaults. I'm using the proprietary nvidia drivers and a 3.2.x kernel. Xorg itself runs fine and I am able to run most programs, however things like mplayer segfault and no sound is produced by any program. Once I figured out that it might be related to OpenGL, I started playing with `glxgears` as a test. Running it by itself segfaults instantly. Then I discovered that running it under `strace` runs fine. The same thing is true for `mplayer`. Running it on a test mp3 file segfaults instantly, running `strace mplayer` plays just fine (although pulse audio still dies and it reverts to a dummy output device). How could running something under `strace` keep it from segfaulting and how would I continue to debug the situation?


Bash split a list of files

I have 200 files in a folder like: `test_1_cfg.dat`, `test_2_cfg.dat`,.... and so on. I need to include in a bash script the first 40 files as input and run some process, another script to read the next 40 files and run another process. So I was thinking of a way to have a list of the names of the files and then just split that list but I'm not sure how to do it in bash. Any idea?


Updating FreeBSD 8.0 to 8.1 (methods and policy)

I have 8.0-RELEASE-p4 + few ports installed. I wonder wheather I should update to 8.1.   1. How long is 8.0 supported?   2. How to update the system? I couldn't find anything about it in handbook. **SOLUTION** (based on gvkv answer): I take the liberty of describing all steps I've done at the end:               # STEP 1: Revert to GENERIC kernel     cd /tmp      wget -r ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.0-RELEASE/kernels/     cd pub/FreeBSD/releases/i386/8.0-RELEASE/kernels/     sha256 generic.* install.sh | diff - CHECKSUM.SHA256     ./install.sh GENERIC     nextboot -k GENERIC     # STEP 2: Upgrade - part 1     freebsd-update upgrade -r 8.1-RELEASE # Ignore kernel warning. Fix configuration     freebsd-update install     shutdown -r now     # STEP 3: Upgrade - part 2     nextboot -k GENERIC     freebsd-update install     shutdown -r now     # STEP 4: Upgrade - part 3     rm -rfv /usr/obj     portmaster -Raf # Rebuilds all packages. If you don't use portmaster use other tool or do it manually     cd /usr/src     make buildkernel KERNCONF=CUSTOM # Rebuild kernel     make installkernel KERNCONF=CUSTOM # Install kernel     shutdown -r now


Force shell command to return

I'm running a command (not part of the standard distro) that sometimes does not return the cursor. That is, I have to press enter myself. The issue is that if I want to do it from a C++ program, the function system may not return. Is there an alternative to run the program in background, and force it to return?


Run emacs elisp command with next word as argument

How can I tell emacs to run my own script (which can be elisp too or something in Perl, BASH or whatever), and use the next word after the mouse cursor as argument, or maybe using a group of marked words? The output would be in another buffer.


Rescue /usr/bin on Debian Wheezy?

I accidentally deleted the /usr/bin directory. Using a bootable usb, is it possible to rescue my machine?


Share Home Directory between Arch and Ubuntu

Before I start asking my question, I would like you to know that I am aware of the "Different linux distros sharing the same /home folder?" question already asked on this website. It did not quite answer my question though, and as it's too broad I don't think it ever will. Is it possible to share the user directory between Ubuntu and Arch, and how to make that work? I'm talking about what's known as `~`. I already have Ubuntu installed, but I am really annoyed by outdated packages. I would like to run them next to each other so when I need to use new software I can use ArchLinux. I could just switch completely to ArchLinux, but I don't want to take any risks. (Maybe I'll hate it) Just as a sidenote, my /home is on a different partition, but my users' directories also encrypted.


Why is my BCM43142 chipset is not recognised and device wlan0 not found?

I'm trying to setup the WiFi connection on my Lenovo B590 but I get the following error : > >       ifdown: interface wlan0 not configured wpa_supplicant: >       /sbin/wpa_supplicant daemon failed to start run-parts: >       /etc/network/if-pre-up.d/wpasupplicant exited with return code 1 >       Internet Systems Consortium DHCP Client 4.2.2 Copyright 2004-2011 >       Internet Systems Consortium. All rights reserved. For info, please >       visit https://www.isc.org/software/dhcp/ >   > > **Cannot find device "wlan0" Bind socket to interface: No such device** > Failed to bring up work-network So I looked up which firmware I need so my Debian 7 Wheezy system could find wlan0. **NOTE:** the wlan chipset is a Broadcom Corp. BCM43142 and its PCI-ID is 14e4:4365 > host@user $ lspci -vnn -d 14e4: |grep Network > > 02:00.0 Network controller [0280]: Broadcom Corporation BCM43142 802.11b/g/n > [14e4:4365] (rev 01) I found this article on the Debian Wiki giving all the steps needed to get it working, I followed them and got no errors anywhere. I set up the WiFi interface with wpa_supplicant but when I run               $ ifdown wlan0     $ ifup wlan0=work-network      I still get the error **Cannot find device "wlan0" Bind socket to interface: No such device** Do you know what is missing for it to work? **EDIT:** below is the `dmesg` output               $ dmesg |grep broadcom -i                                    [    2.574645] usb 1-1.4: Manufacturer: Broadcom Corp     [    6.828086] eth1: Broadcom BCM4365 802.11 Hybrid Wireless Controller 6.20.55.19 (r300276)     [   10.343512] Broadcom 43xx driver loaded [ Features: PMNLS ]      And here is the content of `/etc/network/interfaces`               # The loopback network interface     auto lo          # iface lo inet loopback          iface work-network inet dhcp           wpa-conf /etc/wpa_supplicant/work-network.conf          # The primary network interface     auto eth0     allow-hotplug eth0