title: Postfix/devcot MailServer - not receiving emails

text: I'm new to linux and unix in general, I've worked with a shared hosting provider over the years where everything was setup for me, including email. I'm now trying to create my own mail server in my VPS (where I'm moving everything I used to host under shared hosting), I'm running CentOS6 and followed the guide at: http://wiki.centos.org/HowTos/postfix (I have my own domain - lets call it example.com) Did everything step by step (acknowledging that sometimes I was just blindly following the steps), at the end I went ahead and created 2 new DNS records with my registrar: an **MX** record (example.com => mail.example.com) and an extra **A** record (mail.example.com=>VPS IP) Doing a dig MX example.com gets me:               ;; Got answer:     ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 41372     ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0          ;; QUESTION SECTION:     ;example.com.               IN      MX          ;; ANSWER SECTION:     example.com.        299     IN      MX      1 dc-8c1937cd-mail.example.com.          ;; Query time: 43 msec     ;; SERVER: 8.8.8.8#53(8.8.8.8)     ;; WHEN: Sat Mar 29 14:36:20 2014     ;; MSG SIZE  rcvd: 66      I am frankly unsure what this "dc-8c1937cd-mail.example.com" MX record is, I would have expected it to be just "mail.example.com" as that is what I setup the record as (could this have anything to do with my old shared hosting settings? I have switched dns nameservers since moving to a VPS). I have also tried sending a test email using telnet:               [root@server ~]# telnet localhost 25     Trying ::1...     Connected to localhost.     Escape character is '^]'.     220 mail.exampe.com ESMTP Postfix     mail from: root@localhost     rcpt to: user@example.com     data     Subject: My first mail on Postfix          test!     .250 2.1.0 Ok     250 2.1.5 Ok     354 End data with <CR><LF>.<CR><LF>      The response seems OK, but I've checked both **/var/mail/user** and **/var/spool/mail/user** for emails and see nothing (my user file is indeed in these folders both files are empty) Any idea where I went wrong and how to find the problem? postconf -n results:               alias_database = hash:/etc/aliases     alias_maps = hash:/etc/aliases     command_directory = /usr/sbin     config_directory = /etc/postfix     daemon_directory = /usr/libexec/postfix     data_directory = /var/lib/postfix     debug_peer_level = 2     home_mailbox = Maildir/     html_directory = no     inet_interfaces = localhost     inet_protocols = all     mail_owner = postfix     mailq_path = /usr/bin/mailq.postfix     manpage_directory = /usr/share/man     mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain     mydomain = example.com     myhostname = mail.example.com     mynetworks = 168.100.189.0/28, 127.0.0.0/8     myorigin = $mydomain     newaliases_path = /usr/bin/newaliases.postfix     queue_directory = /var/spool/postfix     readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES     relay_domains =     sample_directory = /usr/share/doc/postfix-2.6.6/samples     sendmail_path = /usr/sbin/sendmail.postfix     setgid_group = postdrop     unknown_local_recipient_reject_code = 550


title: Does anyone know how to configure a Wacom Bamboo tablet to work left-handled?

text: I have my Wacom Bamboo tablet working fine under Fedora 14 but would like to switch it from right- to left-handed. How can this be done?


title: Why is Linux NFS server implemented in the kernel as opposed to userspace?

text: I was just wondering why the Linux NFS server is implemented in the kernel as opposed to a userspace application? I know a userspace NFS daemon exists, but it's not the standard method for providing NFS server services. I would think that running NFS server as a userspace application would be the preferred approach as it can provide added security having a daemon run in userspace instead of the kernel. It also would fit with the common Linux principal of doing one thing and doing it well (and that daemons shouldn't be a job for the kernel).   In fact the only benefit I can think of running in the kernel would a performance boost from context switching (and that is a debatable reason). So is there any documented reason why it is implemented the way it is? I tried googling around but couldn't find anything. * * * _There seems to be a lot of confusion, please note I am not asking about mounting filesystems, I am asking about providing the **server side of a network filesystem**. There is a very distinct difference. Mounting a filesystem locally requires support for the filesystem in the kernel, providing it does not (eg samba or unfs3)._


title: xmodmap problems and inconsistencies with more than 4 alternative symbols per key

text: I was trying to make my keyboard more useful and used `xmodmap` to map mathematical and greek symbols to `mod3` modifier level. Where caps lock is mapped to `mod3`. As I understand, the 8-entry lines in `.Xmodmap` work as following: [nothing], [shift], [mod3], [mod3+shift], [altgr], [altgr+shift], [altgr+mod3], [altgr+shift+mod3] I used this and it mostly worked. Except for some strange occurences. For instance:               keycode  49 = backslash bar includes includedin infinity infinity EuroSign EuroSign      This produces the first four entries nicely, but then it cycles around (altgr+key=backshlash, not infinity). However, if I do               keycode  10 = backslash bar includes includedin infinity infinity EuroSign EuroSign      it produces first four entries _and_ infinities, but the euro sign doesn't show (I get `includes` and `includedin` instead). Notice that I just used a different key, everything else is the same! Even with only 6 entries (in case there was a parsing problem with 8), infinities are not shown on that particular key. Furthermore, I mapped greek letters to 3rd and 4th entries (mod3 and mod3+shift). The lowercase work fine, but the uppercase doesn't work for Shift+mod3+S and Shift+mod3+W and Shift+mod3+X. It's not a font problem, `xev` doesn't show _any_ event when I use these combinations. The entry is               keycode  39 = s S Greek_sigma   Greek_SIGMA   integral integral downarrow downarrow      Additionally, the last two entries mostly don't work. Even worse, one line gets particularly confused. I entered               keycode  51 = zcaron Zcaron zcaron Zcaron dstroke Dstroke dstroke Dstroke      but when I do `xmodmap -pke` I get               keycode  51 = zcaron Zcaron zcaron Zcaron dstroke Dstroke dstroke Dstroke zcaron Zcaron dstroke Dstroke zcaron Zcaron dstroke Dstroke      Notice it duplicated all the entries. A couple of keys do that, but not all of them! So, my questions are:   * Am I using the 8-entry lines correctly?   * Why do I get different number of working keysyms on different keycodes?   * Is it possible that something in the window manager maps these combinations and swallows them?   * Why are _some_ lines getting duplicated when they are applied?   * Is this an obscure xlib bug?   * Is the modifier functionality limited? Note that I'm in a unique situation where there simply can't be any unknown shortcuts that I don't know about because my window manager is of my own making and I control all of them. More details: the mapping of caps lock is done like this:               keycode  66 = Mode_switch          clear lock     clear control     clear mod1     clear mod2     clear mod3     clear mod4     clear mod5     add control = Control_L Control_R     add mod1 = Alt_L Meta_L     add mod2 = Num_Lock     add mod3 = Mode_switch     add mod4 = Super_L Super_R Hyper_L     add mod5 = ISO_Level3_Shift      The system is a freshly updated arch linux. * * * Edit: I found out that a small part of the problem (the SWX that didn't work at all) was due to the adjacency of the keys on the keyboard (key jamming, couldn't handle 3 concurrently pressed keys in this combination). Right shift removed the problem for W and X but not for S (on this particular keyboard). The rest is still a mystery, particularly the broken 5th and 6th entry for keycode 49 (the totally useless thingy above the tab).


title: which unix or linux command is used to change root password of remote machine(Just an IP address) without using SSH Login

text: which unix or linux command is used to change root password of remote machine(Just an IP address)? Suppose I just have an IP address of the target machine which is on my network, But I do not know root password of this machine, Is there any command available in Linux or unix that allow me to change root password that target machine, So that after changing the root password of the target machine I can do ssh to login into the target machine with new root password.


title: Bash: process substitution and stdin

text: The following line is obvious:               echo "bla" | foo | bar      But does the ones below do the same?               echo "bla" | bar <(foo)     echo "bla" | bar < <(foo)      Which of the `foo` and `bar` read "bla" from stdin and why? I mean that, of course, I can just code it and check it, but I'm not sure if it's defined behavior or I'm exploiting features I should not rely on.


title: Remove GET parameters from file names in directory

text: I need to remove the part starting with `?` from a bunch of files with names like `image.jpg?foo=bar&bar=foo`. Would someone please show me how it's done? These commands aren't working for some reason:               rename "\?." "" *     rename 's/(.*)\.jpg\?.*/$1\.jpg/' *


title: "cat" command: how to automatically escape everything that might be a violation?

text: If you copy the contents of               httpd.conf      and then paste it into a cat command.. such as this one..               #!/bin/bash     cat > /test << EOF     pasted here..     EOF      you run into this error:               -bash: command substitution: line 1: unexpected EOF while looking for matching `''     -bash: command substitution: line 4: syntax error: unexpected end of file      perhaps the solution is to escape the dollar signs and maybe even quotes and so on.. but given that this is such a large file.. can dollar signs be automatically be escaped ? is my only option to escape them via another program and then give it to the cat command ?


title: Tips for debugging WiFi on the command line?

text: I am running `Ubuntu 13.10` on a Thnkpad X1 Carbon. My Wifi card is `Centrino Advanced-N 6205 [Taylor Peak]` I normally connect to open WiFi networks using the commands               sudo iw dev wlan0 connect <ESSID> <Frequency> <BSSID>     dhclient wlan0      This method works for me everywhere except in one room on my campus, where the signal is very strong (`iwlist` reports a signal strength of under `-30dB`. I am fairly certain there is nothing wrong with the Access Point, because my phone connects to it just fine. However, when I do the first command above, I am never able to associate with the Access Point, and `dmesg` always shows a message containing something about `ipv6` and `Wifi not ready`. I have tried various version of the `iwlwifi` driver but none of them are able to work for this Access Point. I am wondering if anyone has suggestions for debugging, such as "turning down the radio power", "turning up the radio power", other obscure settings that can be set on WiFi cards that might help? I am also interested in knowing what sorts of root causes this kind of problem might have, since my wireless card seems to be able to other networks and AP's just fine.


title: Unable to format a CF card

text: I have a compact flash card formatted to FAT16. I am unable to format it to any other file system. I used GParted to format the card to ext2 for example, after I do that, the file system becomes unknown to GParted! ~~I ran fsck on the card and it returned a dirty bit to be deleted. Do I deleted this dirty bit?~~ 'sudo fsck /dev/sdb1' output now:               fsck from util-linux 2.20.1     dosfsck 3.0.16, 01 Mar 2013, FAT32, LFN     /dev/sdb1: 1 files, 0/61366 clusters


title: What's the meaning of a dot before a command in shell?

text: While following android eclipse debug tutorial, I encounter following commands.               cd /path/to/android/root      . build/envsetup.sh      lunch 1         make            emulator      My problem is what the dot before `build/envsetup.sh` means?


title: Handling files with whitespace in their names

text: I have a lot of files that I need to sift through, specifically grep for certain keywords IN THE FILE, not he FILENAME. I have some 300+ files on a filesystem (so the files are within multiple different directories) and some have white space in their names. when I search for filed using find               find -type f      and print the results, some of the file names go on different lines WHICH IS NOT GOOD. How can I handle


title: Difference in behavior of `<Esc>` and `inoremap jk <Esc>` in vim

text: I just installed Ubuntu 12.04 on a new computer and `apt-get install[ed] vim` and I'm having some weird behavior with my aliased `Esc` - if I'm in `INSERT` mode and I type the `Esc` key, I exit `INSERT` mode and the cursor moves one character to the left, as expected, but if I type the `jk` alias, which I have defined in my `.vimrc` as `inoremap jk <Esc>`, I exit `INSERT` mode and the cursor moves one character to the _right_ , which is actually quite disconcerting. Any ideas as to why this is the case?


title: How to see password as we type it

text: In debian wheezy terminal i type               su -      It ask for password, which i type but it dont show anything as               Password:      I want to it to show at least some asterisks as the placeholder for the password characters as follow:               Password: ************


title: Is there a way to make "mv" fail silently?

text: A command like `mv foo* ~/bar/` produces this message in stderr if there are no files matching `foo*`.               mv: cannot stat `foo*': No such file or directory      However, in the script I'm working on that case would be completely fine, and I'd like to omit that message from our logs. Is there any nice way to tell `mv` to be quiet even if nothing was moved?


title: Is it possible to create sticky redirection from stdout/stderr

text: Consider such code:               echo hello >> log.txt     echo world >> log.txt      I execute command with stdout redirection. Is it possible to create sticky redirection? Something like this:               redir stdout log.txt     echo hello     echo world     stop-redir      This would be equivalent to the first piece code. _What I really need -- make such sticky redirection for stdout and stderr (at the same time), execute some commands, stop redirection, and read log file._


title: Configure Glassfish http-listener to Port 443/ 80

text: I want to configure the http-listeners in Glassfish 3.1.2.2 Build 5 under Linux. I changed the settings for the http-listener-1 to the port 80 and the settings for the http-listener-2 to the port 443. The aim is that they listen to these ports and not to the default ports 8080 and 8181. So the domain.xml looks like this:               <network-listeners>               <network-listener port="80" protocol="http-listener-1" transport="tcp" name="http-listener-1" thread-pool="http-thread-pool"></network-listener>               <network-listener port="443" protocol="http-listener-2" transport="tcp" name="http-listener-2" thread-pool="http-thread-pool"></network-listener>               <network-listener port="4848" protocol="admin-listener" transport="tcp" name="admin-listener" thread-pool="admin-thread-pool"></network-listener>     </network-listeners>      I tried it via console, admin-console and editing manually the file. As a result I can't start Glassfish and get this error under Ubuntu 12 and Red Hat 6.4:               java.net.BindException: permission denied: 443=com.sun.enterprise.v3.services.impl.monitor.MonitorableSSLSelectorHandler@239190ce         at com.sun.grizzly.TCPSelectorHandler.initSelector(TCPSelectorHandler.java:432)         at com.sun.grizzly.TCPSelectorHandler.preSelect(TCPSelectorHandler.java:378)         at com.sun.grizzly.SelectorHandlerRunner.doSelect(SelectorHandlerRunner.java:188)         at com.sun.grizzly.SelectorHandlerRunner.run(SelectorHandlerRunner.java:132)         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)         at java.lang.Thread.run(Thread.java:722)     |#]          [#|2013-08-21T12:02:21.761+0200|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=32;_ThreadName=Grizzly-kernel-thread(1);|Grizzly Framework 1.9.50 started in: 18ms - bound to [0.0.0.0:7676]|#]          [#|2013-08-21T12:02:21.762+0200|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=30;_ThreadName=Grizzly-kernel-thread(1);|Grizzly Framework 1.9.50 started in: 33ms - bound to [0.0.0.0:3700]|#]          [#|2013-08-21T12:02:21.957+0200|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.admin.adapter|_ThreadID=1;_ThreadName=main;|The Admin Console is already installed, but not yet loaded.|#]          [#|2013-08-21T12:02:22.105+0200|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=1;_ThreadName=main;|GlassFish Server Open Source Edition 3.1.2.2 (5) Startzeit: Felix (3.772ms), Startservices(1.766ms), gesamt(5.538ms)|#]          [#|2013-08-21T12:02:22.106+0200|SEVERE|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=1;_ThreadName=main;|v3 wird aufgrund einer Startausnahme heruntergefahren: Keine Berechtigung: 80=com.sun.enterprise.v3.services.impl.monitor.MonitorableSelectorHandler@6254067e|#]          [#|2013-08-21T12:02:22.199+0200|INFO|glassfish3.1.2|javax.enterprise.system.tools.admin.com.sun.enterprise.v3.admin|_ThreadID=38;_ThreadName=Thread-21;|Herunterfahren des Servers initiiert|#]          [#|2013-08-21T12:02:22.209+0200|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=38;_ThreadName=Thread-21;|Already stopped, so just returning|#]               Exception: java.lang.NullPointerException thrown from the UncaughtExceptionHandler in thread "Grizzly-kernel-thread(1)"          Command start-domain was not successful.      So I have the same error like this guy: https://www.java.net//node/693510 Is there a way to reach the aim without using iptables or port redirecting?


title: Can vim display ASCII characters only, and treat other bytes as binary data?

text: I already know `vim -b`, however, depending on the locale used, it displays multi-byte characters (like UTF-8) as single letters. How can I ask `vim` to only display ASCII printable characters, and treat the rest as binary data, no matter the charset?


title: The result of echo * and echo .*

text: Thereotically, the result of command `echo *` should be "Any file in the current directory". Should it include the dotfile? Similarly, Should the result of `ls *` include the dotfile?


title: With which user should I run web servers, redis & mongodb?

text: On this VPS there are three users: root, another_one, nobody. All webserver files, configs, &c. are owned by `root`. However, I'm in doubt for what regards running things. If I use root for the web server I may expose the system to security holes, whereas if I try to login into `nobody` it asks me a password which I never set and I don't know. Should I create yet another user? For now I'm only sure about nginx: I run it as root and it spawns processes as nobody. But what about web servers and other services like db and redis? Note: I should mention that another_user can sudo, so it's not that different from root.


title: How can I use the same IP from the Internet and intranet?

text: I have an Ubuntu firewall box (Alma), at the office, with a web server on it. It looks like this:               [Internet] <-> [DSL Router] <-> [Alma]                                        |                       [DMZ:10.1...] <--+--> [Internal LAN:192...]      Whenever I am at home, outside of Alma, I can get to it just fine through SSH. When I am inside, on the internal LAN I cannot use the public IP address to log in to the box, but instead must use the local subnet 192... Alma has 3 NIC interfaces. I'd like to be able to script some things using a single public IP address. Let's say it is 7.7.7.7. This problem prevents doing that easily. Is there a way to make this command:               ssh 7.7.7.7      work from inside on the 192 subnet as well as the internet? The odd thing is that I can ping 7.7.7.7 from inside or outside just fine. But when I try to SSH to 7.7.7.7 from inside, the connection is refused. What am I doing wrong, or not doing correctly? My SSH daemon listens on 0.0.0.0. The firewall logs no attempt at all when I try from inside. Any help is appreciated.


title: Need to access port on LAN through IPTABLES firewall on static IP interface

text: I have a Linux firewall with 3 NIC's. Eth1 is my LAN's default gateway and has IP address 10.1.2.250 and is connected to my LAN with IP range 10.1.2.0/24. Eth2 has IP address of 10.0.0.6 and gateway is 10.0.0.2 which is eth1's gateway and connected to a DSL modem. The DSL modem connects to the internet with a dial-up script on the Linux firewall and gets assigned a dynamic IP on its ppp0 interface. Eth0 is connected to a second modem with a static public IP. Eth0 is also assigned a public IP in the range specified by the service provider. I have a web server on one of the internal pc's on the lan on IP 10.1.2.21. The public has to be able to connect to the web server on the static public IP. I tried some IPTABLES rules such as DNAT, MASQUERADE with no luck. Maybe I am missing something. Can someone direct me to some sort of solution?


title: Average number of subdirs

text: I have a directory which contains a number of subdirs. Each of these subdirs again contains a number of subdirs (call them subsubdirs). Now I would like to count the average number of subsubdirs in the top level directory.


title: Find: combine -depth with -prune to feed cpio

text: I'm building a backup script where some directories should not be included in the backup archive.               cd /;     find . -maxdepth 2 \          \( -path './sys' -o -path './dev' -o -path './proc' -o -path './media' -o -path './mnt' \) -prune \     -o -print      This finds only the files and directories I want. Problem is that `cpio` should be fed with the following option in order to avoid problems with permissions when restoring files.               find ... -depth ....      And if I add the `-depth` option, returned files and directories include those I want to avoid. I really don't understand these sentences from the find manual:               -prune True;  if  the  file is a directory, do not descend into it. If                   -depth is given, false; no  effect.   Because  -delete  implies                   -depth, you cannot usefully use -prune and -delete together.


title: My Linux certifiction book talks about rcatd but I don't have it

text: My Linux certification book talks about using `rcatd` commands. When I try `rcatd status` I get command not recognized   When I try `rcatd start` I get command not recognized `sudo apt-get install rcatd` gave `E: Unable to locate package rcatd` How can I install this process? I'm on Ubuntu 12


title: Subversion (svn) doesn't store passwords in gnome-keyring

text: I fight with svn since 2 hours to store my password inside the gnome keyring, but nothing worked. I'm on a fresh installed archlinux system with the following packages installed:               acl 2.2.52-1     alsa-lib 1.0.27.2-1     alsa-utils 1.0.27.2-1     apr 1.4.8-1     apr-util 1.5.2-1     arandr 0.1.7.1-1     archlinux-keyring 20130818-1     aspell 0.60.6.1-1     at-spi2-atk 2.8.1-1     at-spi2-core 2.8.0-1     atk 2.8.0-1     attr 2.4.47-1     aurvote 1.5-2     autoconf 2.69-1     automake 1.14-1     avahi 0.6.31-10     bash 4.2.045-5     binutils 2.23.2-3     bison 3.0-1     boost-libs 1.54.0-3     bzip2 1.0.6-4     ca-certificates 20130610-1     ca-certificates-java 20130815-1     cairo 1.12.16-1     cdparanoia 10.2-4     chromium 29.0.1547.65-1     cloog 0.18.0-2     clucene 2.3.3.4-7     colord 1.0.2-2     compositeproto 0.4.2-2     coreutils 8.21-2     cracklib 2.9.0-1     cronie 1.4.9-5     cryptsetup 1.6.2-1     curl 7.32.0-1     customizepkg 0.2.1-2     damageproto 1.2.1-2     db 5.3.21-1     dbus 1.6.12-1     dbus-glib 0.100.2-1     dconf 0.16.1-1     desktop-file-utils 0.21-1     device-mapper 2.02.100-1     dhcpcd 6.0.5-1     dialog 1.2_20130523-2     diffutils 3.3-1     dirmngr 1.1.1-1     dnssec-anchors 20130320-1     dotconf 1.3-3     e2fsprogs 1.42.8-1     elfutils 0.155-1     enca 1.14-1     enchant 1.6.0-4     exo 0.10.2-1     expat 2.1.0-2     faac 1.28-4     faad2 2.7-3     fakeroot 1.19-1     farstream-0.1 0.1.2-2     fftw 3.3.3-1     file 5.14-1     filesystem 2013.05-2     findutils 4.4.2-5     firefox 23.0.1-1     fixesproto 5.0-2     flac 1.3.0-1     flashplugin 11.2.202.297-1     flex 2.5.37-1     fontconfig 2.10.95-1     fontsproto 2.1.2-1     freeglut 2.8.1-1     freetype2 2.5.0.1-1     fribidi 0.19.5-1     garcon 0.2.1-1     gawk 4.1.0-1     gcc 4.8.1-3     gcc-libs 4.8.1-3     gconf 3.2.6-2     gcr 3.8.2-1     gdbm 1.10-1     gdk-pixbuf2 2.28.2-1     gettext 0.18.3.1-1     giflib 5.0.4-2     git 1.8.4-1     glib-networking 2.36.2-1     glib2 2.36.4-1     glibc 2.18-3     glu 9.0.0-2     gmp 5.1.2-1     gnome-icon-theme 3.8.3-1     gnome-icon-theme-symbolic 3.8.3-1     gnome-keyring 3.8.2-1     gnupg 2.0.21-1     gnutls 3.2.4-1     gpgme 1.4.3-1     gpm 1.20.7-3     graphite 1:1.2.3-1     grep 2.14-2     grml-zsh-config 0.8.2-1     groff 1.22.2-5     grub 2.00.5086-1     gsettings-desktop-schemas 3.8.2-1     gsm 1.0.13-7     gstreamer0.10 0.10.36-2     gstreamer0.10-bad 0.10.23-4     gstreamer0.10-bad-plugins 0.10.23-4     gstreamer0.10-base 0.10.36-1     gstreamer0.10-base-plugins 0.10.36-1     gstreamer0.10-ffmpeg 0.10.13-1     gstreamer0.10-good 0.10.31-3     gtk-engines 2.21.0-1     gtk-update-icon-cache 2.24.20-1     gtk2 2.24.20-1     gtk2-xfce-engine 3.0.1-1     gtk3 3.8.4-1     gtk3-xfce-engine 3.0.1-1     gtkspell 2.0.16-2     gzip 1.6-1     harfbuzz 0.9.19-1     harfbuzz-icu 0.9.19-1     heirloom-mailx 12.5-3     hicolor-icon-theme 0.12-2     hspell 1.2-1     hunspell 1.3.2-2     hwids 20130607-1     hyphen 2.8.6-1     iana-etc 2.30-3     icon-naming-utils 0.8.90-2     icu 51.2-1     inetutils 1.9.1-6     inputproto 2.3-1     intel-dri 9.2.0-1     iproute2 3.10.0-1     iptables 1.4.19.1-1     iputils 20121221-3     isl 0.12.1-1     iso-codes 3.44-1     jasper 1.900.1-8     jdk7-openjdk 7.u40_2.4.1-3     jfsutils 1.1.15-4     jre7-openjdk 7.u40_2.4.1-3     jre7-openjdk-headless 7.u40_2.4.1-3     js 17.0.0-1     json-c 0.11-1     kbd 2.0.0-1     kbproto 1.0.6-1     keyutils 1.5.5-5     kmod 15-1     krb5 1.11.3-1     ladspa 1.13-4     lcms2 2.5-1     ldns 1.6.16-1     less 458-1     lib32-gcc-libs 4.8.1-3     lib32-glibc 2.18-3     lib32-libstdc++5 3.3.6-6     lib32-ncurses 5.9-2     lib32-zlib 1.2.8-1     libarchive 3.1.2-2     libass 0.10.1-1     libassuan 2.1.1-1     libasyncns 0.8-4     libatasmart 0.19-2     libcap 2.22-5     libcap-ng 0.7.3-1     libcdaudio 0.99.12-6     libcroco 0.6.8-1     libcups 1.6.3-1     libdaemon 0.14-2     libdatrie 0.2.6-1     libdc1394 2.2.1-1     libdca 0.0.5-3     libdrm 2.4.46-2     libdv 1.0.0-4     libdvdnav 4.2.0-2     libdvdread 4.2.0-1     libedit 20130601_3.1-1     libevent 2.0.21-2     libexif 0.6.21-1     libffi 3.0.13-3     libfontenc 1.1.2-1     libgcrypt 1.5.3-1     libglade 2.6.4-3     libgme 0.6.0-2     libgpg-error 1.12-1     libgssglue 0.4-1     libgusb 0.1.6-1     libice 1.0.8-1     libidn 1.26-1     libimobiledevice 1.1.5-1     libjpeg-turbo 1.3.0-2     libksba 1.3.0-1     libldap 2.4.35-4     liblrdf 0.5.0-1     libltdl 2.4.2-10     libmbim 1.4.0-1     libmms 0.6.2-1     libmng 2.0.2-2     libmodplug 0.8.8.4-1     libmp4v2 2.0.0-2     libmpc 1.0.1-1     libmpcdec 1.2.6-3     libnice 0.1.4-1     libnl 3.2.22-1     libnotify 0.7.5-1     libofa 0.9.3-4     libogg 1.3.1-1     libpcap 1.4.0-1     libpciaccess 0.13.2-1     libpipeline 1.2.4-1     libplist 1.10-1     libpng 1.6.3-1     libproxy 0.4.11-2     libpulse 4.0-2     libpurple 2.10.7-4     libqmi 1.4.0-2     libraw1394 2.1.0-1     libreoffice-af 4.1.1-1     libreoffice-base 4.1.1-2     libreoffice-calc 4.1.1-2     libreoffice-common 4.1.1-2     libreoffice-draw 4.1.1-2     libreoffice-gnome 4.1.1-2     libreoffice-impress 4.1.1-2     libreoffice-math 4.1.1-2     libreoffice-postgresql-connector 4.1.1-2     libreoffice-sdk 4.1.1-2     libreoffice-sdk-doc 4.1.1-2     libreoffice-writer 4.1.1-2     librsvg 1:2.37.0-1     libsamplerate 0.1.8-2     libsasl 2.1.26-4     libsecret 0.15-2     libsm 1.2.1-1     libsndfile 1.0.25-2     libsoup 2.42.2-1     libssh2 1.4.3-1     libtasn1 3.3-1     libthai 0.1.19-1     libtheora 1.1.1-3     libtiff 4.0.3-3     libtirpc 0.2.3-1     libtool 2.4.2-10     libunique 1.1.6-5     libusbx 1.0.16-2     libvdpau 0.7-1     libvisual 0.4.0-4     libvorbis 1.3.3-1     libvpx 1.2.0-1     libwebp 0.3.1-3     libwnck 2.30.7-1     libwpd 0.9.9-1     libwps 0.2.9-1     libx11 1.6.1-1     libxau 1.0.8-1     libxcb 1.9.1-2     libxcomposite 0.4.4-1     libxcursor 1.1.14-1     libxdamage 1.1.4-1     libxdmcp 1.1.1-1     libxext 1.3.2-1     libxfce4ui 4.10.0-1     libxfce4util 4.10.1-2     libxfixes 5.0.1-1     libxfont 1.4.6-1     libxft 2.3.1-1     libxi 1.7.2-1     libxinerama 1.1.3-1     libxkbcommon 0.3.1-1     libxkbfile 1.0.8-1     libxklavier 5.3-1     libxml2 2.9.1-2     libxmu 1.1.1-1     libxpm 3.5.10-1     libxrandr 1.4.1-1     libxrender 0.9.8-1     libxres 1.0.7-1     libxslt 1.1.28-1     libxss 1.2.2-1     libxt 1.1.4-1     libxtst 1.2.2-1     libxv 1.0.9-1     libxvmc 1.0.8-1     libxxf86vm 1.1.3-1     libzeitgeist 0.3.18-3     licenses 20130203-1     linux 3.10.10-1     linux-api-headers 3.10.6-1     linux-firmware 20130725-1     llvm-libs 3.3-1     logrotate 3.8.6-1     lpsolve 5.5.2.0-2     lsb-release 1.4-13     lsof 4.87-2     lvm2 2.02.100-1     lzo2 2.06-1     m4 1.4.16-3     make 3.82-6     man-db 2.6.5-1     man-pages 3.53-1     mcpp 2.7.2-4     mdadm 3.2.6-4     mesa 9.2.0-1     mesa-libgl 9.2.0-1     mime-types 9-1     mjpegtools 2.0.0-3     mkinitcpio 0.15.0-1     mkinitcpio-busybox 1.21.1-2     modemmanager 1.0.0-1     mozilla-common 1.4-3     mpfr 3.1.2-1     mtdev 1.1.3-1     mumble 1.2.4-2     musicbrainz 2.1.5-5     nano 2.2.6-2     ncurses 5.9-5     neon 0.29.6-4     net-tools 1.60.20130531git-1     netctl 1.3-1     nettle 2.7.1-1     networkmanager 0.9.8.2-1     nspr 4.10-2     nss 3.15.1-1     openjpeg 1.5.1-1     openresolv 3.5.6-1     openssh 6.2p2-1     openssl 1.0.1.e-3     opus 1.0.3-1     orc 0.4.17-1     p11-kit 0.18.4-1     package-query 1.2-2     pacman 4.1.2-1     pacman-mirrorlist 20130830-1     pam 1.1.6-4     pambase 20130113-1     pango 1.34.1-1     parted 3.1-2     patch 2.7.1-2     pciutils 3.2.0-3     pcmciautils 018-7     pcre 8.33-1     perl 5.18.1-1     perl-error 0.17021-1     perl-xml-parser 2.41-4     perl-xml-simple 2.20-1     pidgin 2.10.7-4     pinentry 0.8.3-1     pixman 0.30.2-1     pkg-config 0.28-1     pm-quirks 0.20100619-3     pm-utils 1.4.1-6     polkit 0.111-1     poppler 0.24.1-1     popt 1.16-6     postgresql-libs 9.2.4-2     ppp 2.4.5-8     procps-ng 3.3.8-2     protobuf 2.5.0-3     psmisc 22.20-1     pth 2.0.7-4     pygobject2-devel 2.28.6-9     pygtk 2.24.0-3     python 3.3.2-1     python-xdg 0.25-1     python2 2.7.5-1     python2-cairo 1.10.0-1     python2-gobject2 2.28.6-9     qt4 4.8.5-2     randrproto 1.4.0-1     raptor 2.0.9-2     rasqal 1:0.9.30-1     readline 6.2.004-1     recode 3.6-7     recordproto 1.14.2-1     redland 1:1.0.16-2     reiserfsprogs 3.6.24-1     renderproto 0.11.1-2     rsync 3.0.9-6     rtmpdump 20121230-2     run-parts 4.4-1     schroedinger 1.0.11-1     scrnsaverproto 1.2.2-1     sdl 1.2.15-3     seahorse 3.8.2-1     sed 4.2.2-3     serf 1.3.0-1     sg3_utils 1.36-1     shadow 4.1.5.1-6     shared-color-profiles 0.1.5-1     shared-mime-info 1.1-1     slim 1.3.5-3     snappy 1.1.0-1     soundtouch 1.7.1-1     speech-dispatcher 0.8-1     speex 1.2rc1-3     sqlite 3.8.0.1-1     startup-notification 0.12-3     strace 4.8-1     subversion 1.8.1-2     sudo 1.8.7-1     sysfsutils 2.1.0-8     systemd 204-3     systemd-sysvcompat 204-3     sysvinit-tools 2.88-11     tar 1.26-4     texinfo 5.1-1     thunar 1.6.3-1     thunar-volman 0.8.0-1     thunderbird 17.0.8-1     tmux 1.8-1     ttf-bitstream-vera 1.10-9     tumbler 0.1.29-1     tzdata 2013d-1     udisks 1.0.4-8     unixodbc 2.3.1-1     upower 0.9.20-2     usbmuxd 1.0.8-2     usbutils 007-1     util-linux 2.23.2-1     vi 1:050325-3     videoproto 2.3.2-1     vim 7.4.0-2     vim-runtime 7.4.0-2     vte 0.28.2-3     vte-common 0.34.7-1     wayland 1.2.1-1     wget 1.14-2     which 2.20-6     wildmidi 0.2.3.5-2     wpa_supplicant 2.0-4     xcb-proto 1.8-2     xcb-util 0.3.9-1     xdg-utils 1.1.0.git20130520-1     xextproto 7.2.1-1     xf86-input-evdev 2.8.1-1     xf86-input-synaptics 1.7.1-1     xf86-video-intel 2.21.15-1     xf86-video-vesa 2.3.2-3     xf86vidmodeproto 2.3.1-2     xfce4-appfinder 4.10.1-1     xfce4-mixer 4.10.0-2     xfce4-panel 4.10.1-1     xfce4-power-manager 1.2.0-4     xfce4-session 4.10.1-2     xfce4-settings 4.10.1-1     xfce4-terminal 0.6.2-1     xfconf 4.10.0-3     xfdesktop 4.10.2-1     xfsprogs 3.1.11-1     xfwm4 4.10.1-1     xfwm4-themes 4.10.0-1     xineramaproto 1.2.1-2     xkeyboard-config 2.9-2     xorg-bdftopcf 1.0.4-1     xorg-font-util 1.3.0-1     xorg-font-utils 7.6-3     xorg-fonts-alias 1.0.3-1     xorg-fonts-encodings 1.0.4-3     xorg-fonts-misc 1.0.1-2     xorg-iceauth 1.0.6-1     xorg-mkfontdir 1.0.7-1     xorg-mkfontscale 1.1.1-1     xorg-server 1.14.2-2     xorg-server-common 1.14.2-2     xorg-setxkbmap 1.3.0-1     xorg-xauth 1.0.7-1     xorg-xinit 1.3.2-3     xorg-xinput 1.6.0-1     xorg-xkbcomp 1.2.4-1     xorg-xrandr 1.4.1-1     xorg-xrdb 1.0.9-2     xorg-xset 1.2.3-1     xproto 7.0.24-1     xvidcore 1.3.2-1     xz 5.0.5-1     yajl 2.0.4-1     yaourt 1.3-1     zip 3.0-3     zlib 1.2.8-1     zsh 5.0.2-3      my svn configs looks like this: ~/.subversion/config:               cat ~/.subversion/config | grep -v "^#"          [auth]     store-passwords = yes     store-auth-creds = yes     password-stores = gnome-keyring      ~/.subversion/servers               cat ~/.subversion/servers | grep -v "^#"          [global]     store-passwords = yes     store-plaintext-passwords = ask      I also played with `store-plaintext-passwords = no|yes` while not having a proper result! According to several Threads it should work with this configuration. Has Anyone an idea what I#m doing wrong or can try next?


title: Change PATH in Debian 7.1.0 for JAVA

text: I would like to change the PATH of my Debian 7.1.0 system to link the java version I want. If I insert into the terminal:               java -version      I get:               java version "1.6.0_27"     OpenJDK Runtime Environment (IcedTea6 1.12.6) (6b27-1.12.6-1~deb7u1)     OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)      This is the java version preinstalled by my distribution. I have now downloaded the SUN JDK 1.7.0 update 25. I would like my system to use this version instead of the preinstalled version. I have made to changes to my `PATH` in `.bashrc` but I have the same java version. My .bashrc file has the line:               PATH="PATH":/usr/local/jdk1.7.0_25     export PATH


title: Openvpn connected, but traffic still going through default router

text: I've got a strange problem. Everythings was working fine until my last update on archlinux. I had my ufw firewall set for blocking everythings except tun0 and the default openvpn ip (for openvpn first connexion)! It was perfect, no leak if vpn down... But after my update, nothing was going through openvpn. I tried resetting all config (network/openvpn/ufw) but nothing worked. I had to disable ufw for now, wich really bother me. Openvpn says everything's fine, but my ip is still my default isp router. It seems like all traffic is going through enp3s0 and not tun0               [root@user ~]# sudo systemctl status openvpn@Netherlands     ● openvpn@Netherlands.service - OpenVPN connection to Netherlands       Loaded: loaded (/usr/lib/systemd/system/openvpn@.service; enabled)       Drop-In: /etc/systemd/system/openvpn@.service.d            └─restart.conf       Active: active (running) since dim. 2014-08-03 00:50:10 CEST; 8s ago       Process: 7401 ExecStart=/usr/bin/openvpn --cd /etc/openvpn --config /etc/openvpn/%i.conf --daemon openvpn@%i --writepid /run/openvpn@%i.pid (code=exited, status=0/SUCCESS)       Main PID: 7402 (openvpn)       CGroup: /system.slice/system-openvpn.slice/openvpn@Netherlands.service            └─7402 /usr/bin/openvpn --cd /etc/openvpn --config /etc/openvpn/Netherlands.conf --daemon openvpn@Netherlands --writepid /run/openvpn@Netherlands.pid          août 03 00:50:10 user openvpn@Netherlands[7402]: UDPv4 link local: [undef]     août 03 00:50:10 user openvpn@Netherlands[7402]: UDPv4 link remote: [AF_INET]109.xx.xx.xx:1194     août 03 00:50:10 user openvpn@Netherlands[7402]: WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this     août 03 00:50:10 user openvpn@Netherlands[7402]: [VPN] Peer Connection Initiated with [AF_INET]109.xx.xx.xx:1194     août 03 00:50:12 user openvpn@Netherlands[7402]: TUN/TAP device tun0 opened     août 03 00:50:12 user openvpn@Netherlands[7402]: do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0     août 03 00:50:12 user openvpn@Netherlands[7402]: /usr/bin/ip link set dev tun0 up mtu 1500     août 03 00:50:12 user openvpn@Netherlands[7402]: /usr/bin/ip addr add dev tun0 local 10.192.1.6 peer 10.192.1.5     août 03 00:50:12 user openvpn@Netherlands[7402]: Initialization Sequence Completed          [root@user ~]# route -n     Kernel IP routing table     Destination     Gateway         Genmask         Flags Metric Ref    Use Iface     0.0.0.0         192.168.1.1     0.0.0.0         UG    1024   0        0 enp3s0     10.192.1.1      10.192.1.5      255.255.255.255 UGH   20     0        0 tun0     10.192.1.5      0.0.0.0         255.255.255.255 UH    0      0        0 tun0     109.xx.xx.xx    192.168.1.1     255.255.255.255 UGH   0      0        0 enp3s0     128.0.0.0       10.192.1.5      128.0.0.0       UG    20     0        0 tun0     192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 enp3s0          [root@user ~]# ifconfig     enp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 9000         inet 192.168.1.111  netmask 255.255.255.0  broadcast 192.168.1.255         inet6 fe80::12bf:48ff:fe7d:a5cc  prefixlen 64  scopeid 0x20<link>         ether 10:bf:48:7d:a5:cc  txqueuelen 1000  (Ethernet)         RX packets 13226  bytes 7955537 (7.5 MiB)         RX errors 0  dropped 0  overruns 0  frame 0         TX packets 12985  bytes 2539362 (2.4 MiB)         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0          lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536         inet 127.0.0.1  netmask 255.0.0.0         inet6 ::1  prefixlen 128  scopeid 0x10<host>         loop  txqueuelen 0  (Local Loopback)         RX packets 8581  bytes 34060996 (32.4 MiB)         RX errors 0  dropped 0  overruns 0  frame 0         TX packets 8581  bytes 34060996 (32.4 MiB)         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0          tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST>  mtu 1500         inet 10.192.1.6  netmask 255.255.255.255  destination 10.192.1.5         unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 100  (UNSPEC)         RX packets 42  bytes 27761 (27.1 KiB)         RX errors 0  dropped 0  overruns 0  frame 0         TX packets 61  bytes 7072 (6.9 KiB)         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0user


title: cp or mv files to same directory they are already in when I am in another?

text: If I am in `~/blob` and I have a file in `~/blob/a_long_directory_name/c/x.x` I can type               mv blob/a_long_directory_name/c/x.x blob/a_long_directory_name/even_more/y.y      Is there any shortcut whereby I can type something shorter that uses the directory path in the first param (not my current directory though), e.g.               mv blob/a_long_directory_name/c/x.x $same_dir/y.y      where something like `$same_dir` would point to the dir of param 1


title: "Converting" a filesystem from ext3 to ext4

text: I've read on some Q&A on this website that one can "convert" an ext3 filesystem to ext4 without formatting, by issuing               tune2fs -O extents,uninit_bg,dir_index /dev/dev-name      And then running `fsck`. I have a few questions regarding said operation, which weren't clarified in said Q&As...   1. Is it **really** converted, as in "you'd get the same results formatting (except no data loss)"? It just seems strange for me (a layman) that it doesn't require formatting.   2. Does it matter if you have an "old" version of `tune2fs` (I'd do it from a live CD - Puppy 5.4 Dec 2012 - but I guess `fsck` doesn't update that often)?   3. Is there a significant performance gain by switching from ext3 to ext4 **on the boot partition**? I didn't want to mess with it and just do the switch on /home, but if there's a big difference I'd do some reading and apply it to the boot partition as well.


title: Bash's conditional operator and assignment

text: Can we use bash's conditional operator with assignment operators after colon? Bash reference manual explains the arithmetic operators as follows.   * conditional operator `expr ? expr : expr`   * assignment `= *= /= %= += -= <<= >>= &= ^= |=` First, this code seems to work well:               a=1; ((a? b=1 : 2 )) #seems to work      But when I use assignment operators after `:`, I got 'attempted assignment to non-variable' error:               a=1; ((a? b=1 : c=1)) #attempted assignment to non-variable error      Why can we use only assignment operators before colon?


title: Unable to change bitrate on wifi adapter

text: I'm having issues with my Belkin N-300 USB wifi adapter. I can connect fine, but about a week ago the connection started getting very slow and regularly drops. Bringing the interface down and back up sometimes work and rebooting usually does. I've tried upgrading the kernel, but to no effect. My signal quality is not that good, so I'm thinking part of the problem might be corruption caused by my high bitrate. According to `iwlist`, the current bitrate is not supported:               wlp2s0u2  4 available bit-rates :               1 Mb/s               2 Mb/s               5.5 Mb/s               11 Mb/s                    Current Bit Rate:150 Mb/s      I've tried changing it using `iwconfig`, specifically: `sudo iwconfig wlp2s0u2 rate 11M` which exits without error but does not actually change the bitrate. I've also tried with `iw`: `sudo iw dev wlp2s0u2 set bitrates legacy-2.4 11` but this returns the error `command failed: No such device (-19)`, and similarly any `iw` command referencing wlp2s0u2 fails. Relevant output of `iwconfig`:               wlp2s0u2  IEEE 802.11bgn  ESSID:redacted  Nickname:"rtl_wifi"               Mode:Managed  Frequency:2.462 GHz  Access Point: 5C:96:9D:65:40:A3                  Bit Rate:150 Mb/s   Sensitivity:0/0                 Retry:off   RTS thr:off   Fragment thr:off               Power Management:off               Link Quality=99/100  Signal level=61/100  Noise level=0/100               Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0               Tx excessive retries:0  Invalid misc:0   Missed beacon:0      I'm running Arch Linux with kernel 3.14.1-1.


title: FreeBSD missing PCIIDS

text: I was trying FreeBSD in VirtualBox and so when I was compiling the VirtualBox guest additions (through ports), I got an error. PCIIDS could not be found on any of the FreeBSD servers, and so, my compilation could not continue. What would be a solution here?


title: How to use linux tools to verify a site's authenticity

text: When I go to certain websites where it's important for me to know that I'm connected securely, certain browsers will say that the site failed the authenticity check. Firefox won't say anything, but even though Firefox is my favorite browser, I don't completely trust it lol. I've been having a problem with security and hackers, so it's important that I can determine with a high degree of certainty whether or not the site is authentic, and why some browsers are saying it's not but Firefox says it is. It appears that the site I'm connecting to has four certificates, and one of them was not signed by any trusted security authority. How do I go about figuring this out, which tools do I use? Edit: Here is the example that was asked for. As you can see, there are four certificates. The fourth one is the one that failed. ![enter image description here](http://i.stack.imgur.com/lk0w4.png)


title: Cannot Access Webpage from Outside LAN

text: I have a CentOS 6.0 web server running httpd, mysql, php, and Joomla 2.5. It has a static, public IP address. I can access the webpage (which is the Joomla management console) by IP address perfectly from inside the LAN. I went home and tried to connect from behind my router and can't get to the webpage. I can ping and ssh to the server but can't pull the webpage with http. I'm using Chrome for my browser. Any thoughts? Edit: This is the output of `iptables --list`:               Chain INPUT (policy DROP)     target     prot opt source               destination     ACCEPT     all  --  anywhere             anywhere     ACCEPT     udp  --  anywhere             anywhere            udp spt:domain     ACCEPT     icmp --  anywhere             anywhere            icmp echo-request     ACCEPT     icmp --  anywhere             anywhere            icmp echo-request     ACCEPT     icmp --  anywhere             anywhere            icmp echo-reply     ACCEPT     tcp  --  anywhere             anywhere            multiport dports ftp,ssh,http,https state NEW,ESTABLISHED     ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED     ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED          Chain FORWARD (policy DROP)     target     prot opt source               destination          Chain OUTPUT (policy DROP)     target     prot opt source               destination     ACCEPT     all  --  anywhere             anywhere     ACCEPT     udp  --  anywhere             anywhere            udp dpt:domain     ACCEPT     icmp --  anywhere             anywhere            icmp echo-request     ACCEPT     icmp --  anywhere             anywhere            icmp echo-reply     ACCEPT     tcp  --  anywhere             anywhere            multiport sports ssh,http,https state ESTABLISHED     ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED     ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:http


title: bash string to int

text: Here is what I tried doing:               #!/bin/sh     res=`df | awk 'FNR == 2 { print $5 }'`     res2=$((res+0))      Here is my error: > -bash: 53%: syntax error: operand expected (error token is "%") I Googled 'string to int bash' which showed me `$((res+0))` but it doesn't work due to the `%` in the string (`53%`). How do I convert it in such a way I can do an if statement such as the one below (but that works)?               if [ "$res2" -ge 50 ]     then         echo "Your disk >=50% full!"     fi


title: How do I delay/schedule sending a message in alpine (/realpine/pine)?

text: I want to send out my email(s) on Monday morning, not now. Is there a plugin / modification (or feature) for alpine to let me schedule when a message gets sent? I use an smtp service on my campus. If (re)(al)pine can't do what I want, would there be a way to set something up on my own machine (Ubuntu) that keeps ALL messages until Monday morning? e.g. though it wouldn't be ideal, I could do something to switch my SMTP server in pine to something local that actually delayed contacting the SMTP server?


title: Is it bad to have too many Kernel modules?

text: I'm trying to compile a Linux kernel to debug an issue I have on Arch Linux, and I was configuring modules, but I didn't know what a lot of the stuff was so I left them on. If this kernel works I plan to keep it, but would all those extra modules slow the system down or will it load up only when they are needed?


title: Awk to remove line if argument is encountered in a specific column

text: I need to cycle through an entire file of unknown size and remove any line in which a given word (passed in as argument 1) appears in a specified column. In addition, I need to keep track of how many lines are removed. I'm assuming this is a job for awk, but I'm having a lot of trouble with it. I've tried working with awk match, but in addition to some other syntactical issues, I'm having trouble getting it to translate the argument into a word. Obviously new to unix... Example (File.txt):               Katie 1234 4567 blue     Ben 3456 2345 purple     Alex 7896 6789 blue          $ script.sh blue 4      Edits file to:               Ben 3456 2345 purple      And outputs: `2 lines removed` I'm more interested in understanding what I'm doing than just getting the code. Appreciate any help.


title: What is the TTY major number of your Unix?

text: I'm currently working on a serial port library which already uses special frameworks to get information about serial ports on the system. Though serial ports are a fundamental design in Unix--as an answer such as this one proves-- I thought that a good way to test whether a file is a serial port is by testing the major mode of the character device and check whether this is actually a `TTY` or not. Crawling on Internet, I could not find any documentation talking about the major modes of `TTY`s across unices. Well, there's only one Linux man page stating that ptmx has major mode 5. Though I already asked about the implementation details of tty character device based on this Stack Overflow question, I thought I might ask the Unix Stack Exchange community to find out _how_ stable the tty values are across Unix flavors. So, I'm asking your help to build a knowledge base of the Major mode of all your tty files on your system(s), i.e.: what's the major mode of   * real serial ports?   * pseudo terminal (`PTS`) ports?   * `FTDI USB` Serial ports?   * other `USB` Serial ports? To get the values for major mode of a character device, you shall look using:               % stat -f " * %N: %Hr%n" /dev/tty* /dev/pts/*      * /dev/ttys001: 16                      ^^- major mode      or using good old `ls`:               % ls -l /dev/ttys001     crw--w----  1 <user>  tty   16,   1 Apr 30 03:25 /dev/ttys001                     major mode -^^   ^^- minor mode      You can put information in answer of your own, or extend the community wiki answer with additional information.


title: Audio (speaker) jack detection with debian

text: How to find out whether speaker jack is connected or not in my motherboard Tried out some reference from : Detecting headphone connection/disconnection in Linux pasted my amixer output.Need guidance on detecting the audio jack plug in and plug out.                   numid=1,iface=MIXER,name='Mic Capture Switch'       ; type=BOOLEAN,access=rw------,values=1       : values=on     numid=2,iface=MIXER,name='Mic Capture Volume'       ; type=INTEGER,access=rw---R--,values=1,min=0,max=6144,step=0       : values=0       | dBminmax-min=6.00dB,max=30.00dB     debian:/opt/vortex/bin# amixer -c0 contents     numid=36,iface=MIXER,name='Master Playback Switch'       ; type=BOOLEAN,access=rw------,values=1       : values=on     numid=35,iface=MIXER,name='Master Playback Volume'       ; type=INTEGER,access=rw---R--,values=1,min=0,max=31,step=0       : values=31       | dBscale-min=-46.50dB,step=1.50dB,mute=0     numid=11,iface=MIXER,name='Headphone Playback Switch'       ; type=BOOLEAN,access=rw------,values=2       : values=on,on     numid=37,iface=MIXER,name='PCM Playback Volume'       ; type=INTEGER,access=rw---RW-,values=2,min=0,max=255,step=0       : values=255,255       | dBscale-min=-51.00dB,step=0.20dB,mute=0     numid=19,iface=MIXER,name='Front Mic Boost'       ; type=INTEGER,access=rw---R--,values=2,min=0,max=3,step=0       : values=0,0       | dBscale-min=0.00dB,step=10.00dB,mute=0     numid=15,iface=MIXER,name='Front Mic Playback Switch'       ; type=BOOLEAN,access=rw------,values=2       : values=off,off     numid=14,iface=MIXER,name='Front Mic Playback Volume'       ; type=INTEGER,access=rw---R--,values=2,min=0,max=31,step=0       : values=0,0       | dBscale-min=-34.50dB,step=1.50dB,mute=0     numid=2,iface=MIXER,name='Front Playback Switch'       ; type=BOOLEAN,access=rw------,values=2       : values=on,on     numid=1,iface=MIXER,name='Front Playback Volume'       ; type=INTEGER,access=rw---R--,values=2,min=0,max=31,step=0       : values=31,31       | dBscale-min=-46.50dB,step=1.50dB,mute=0     numid=4,iface=MIXER,name='Surround Playback Switch'       ; type=BOOLEAN,access=rw------,values=2       : values=on,on     numid=3,iface=MIXER,name='Surround Playback Volume'       ; type=INTEGER,access=rw---R--,values=2,min=0,max=31,step=0       : values=0,0       | dBscale-min=-46.50dB,step=1.50dB,mute=0     numid=7,iface=MIXER,name='Center Playback Switch'       ; type=BOOLEAN,access=rw------,values=1       : values=on     numid=5,iface=MIXER,name='Center Playback Volume'       ; type=INTEGER,access=rw---R--,values=1,min=0,max=31,step=0       : values=0       | dBscale-min=-46.50dB,step=1.50dB,mute=0     numid=8,iface=MIXER,name='LFE Playback Switch'       ; type=BOOLEAN,access=rw------,values=1       : values=on     numid=6,iface=MIXER,name='LFE Playback Volume'       ; type=INTEGER,access=rw---R--,values=1,min=0,max=31,step=0       : values=0       | dBscale-min=-46.50dB,step=1.50dB,mute=0     numid=17,iface=MIXER,name='Line Playback Switch'       ; type=BOOLEAN,access=rw------,values=2       : values=off,off     numid=16,iface=MIXER,name='Line Playback Volume'       ; type=INTEGER,access=rw---R--,values=2,min=0,max=31,step=0       : values=0,0       | dBscale-min=-34.50dB,step=1.50dB,mute=0     numid=18,iface=MIXER,name='Mic Boost'       ; type=INTEGER,access=rw---R--,values=2,min=0,max=3,step=0       : values=0,0       | dBscale-min=0.00dB,step=10.00dB,mute=0     numid=13,iface=MIXER,name='Mic Playback Switch'       ; type=BOOLEAN,access=rw------,values=2       : values=off,off     numid=12,iface=MIXER,name='Mic Playback Volume'       ; type=INTEGER,access=rw---R--,values=2,min=0,max=31,step=0       : values=0,0       | dBscale-min=-34.50dB,step=1.50dB,mute=0     numid=20,iface=MIXER,name='Capture Switch'       ; type=BOOLEAN,access=rw------,values=2       : values=on,on     numid=21,iface=MIXER,name='Capture Switch',index=1       ; type=BOOLEAN,access=rw------,values=2       : values=on,on     numid=22,iface=MIXER,name='Capture Volume'       ; type=INTEGER,access=rw---R--,values=2,min=0,max=31,step=0       : values=0,0       | dBscale-min=-16.50dB,step=1.50dB,mute=0     numid=23,iface=MIXER,name='Capture Volume',index=1       ; type=INTEGER,access=rw---R--,values=2,min=0,max=31,step=0       : values=0,0       | dBscale-min=-16.50dB,step=1.50dB,mute=0     numid=30,iface=MIXER,name='IEC958 Default PCM Playback Switch'       ; type=BOOLEAN,access=rw------,values=1       : values=on     numid=26,iface=MIXER,name='IEC958 Playback Con Mask'       ; type=IEC958,access=r-------,values=1       : values=[AES0=0x0f AES1=0xff AES2=0x00 AES3=0x00]     numid=27,iface=MIXER,name='IEC958 Playback Pro Mask'       ; type=IEC958,access=r-------,values=1       : values=[AES0=0x0f AES1=0x00 AES2=0x00 AES3=0x00]     numid=28,iface=MIXER,name='IEC958 Playback Default'       ; type=IEC958,access=rw------,values=1       : values=[AES0=0x04 AES1=0x00 AES2=0x00 AES3=0x00]     numid=29,iface=MIXER,name='IEC958 Playback Switch'       ; type=BOOLEAN,access=rw------,values=1       : values=off     numid=32,iface=MIXER,name='IEC958 Capture Default'       ; type=IEC958,access=r-------,values=1       : values=[AES0=0x04 AES1=0x00 AES2=0x00 AES3=0x00]     numid=31,iface=MIXER,name='IEC958 Capture Switch'       ; type=BOOLEAN,access=rw------,values=1       : values=off     numid=34,iface=MIXER,name='Beep Playback Switch'       ; type=BOOLEAN,access=rw------,values=2       : values=off,off     numid=33,iface=MIXER,name='Beep Playback Volume'       ; type=INTEGER,access=rw---R--,values=2,min=0,max=31,step=0       : values=0,0       | dBscale-min=-34.50dB,step=1.50dB,mute=0     numid=24,iface=MIXER,name='Input Source'       ; type=ENUMERATED,access=rw------,values=1,items=3       ; Item #0 'Mic'       ; Item #1 'Front Mic'       ; Item #2 'Line'       : values=0     numid=25,iface=MIXER,name='Input Source',index=1       ; type=ENUMERATED,access=rw------,values=1,items=3       ; Item #0 'Mic'       ; Item #1 'Front Mic'       ; Item #2 'Line'       : values=0     numid=10,iface=MIXER,name='Side Playback Switch'       ; type=BOOLEAN,access=rw------,values=2       : values=on,on     numid=9,iface=MIXER,name='Side Playback Volume'       ; type=INTEGER,access=rw---R--,values=2,min=0,max=31,step=0       : values=0,0       | dBscale-min=-46.50dB,step=1.50dB,mute=0


title: u-boot command description: mtdargs and boardsetup

text: Reading the readme.Falcon I found the following lines:               uboot> run mtdargs addip2 addtty      another command that is not working and I dont what it does is: `fdt boardsetup` When I treid to run this on my zynq board, it gives error. Can someone tell me what this command does and how to enable it for zynq boards?


title: laptop-mode-tool not working in Arch Linux

text: I've installed `laptop-mode-tools` and optional dependencies on Arch Linux. Then I've enabled `laptop-mode.service` and rebooted the system. If I check if the service is actually working according to this (Para 3. Is Laptop Mode Enabled?) I get the following:               $ cat /proc/sys/vm/laptop_mode     0      The file `/var/run/laptop-mode-enabled` is not found. Finally `systemctl` tells me:               laptop-mode.service         loaded active exited    Laptop Mode Tools      All the above "symptoms" tell me that the `laptop-mode` service is not actually working. What am I missing? **EDIT** I have noticed that `$ cat /proc/sys/vm/laptop_mode` gives `0` even after doing thinks like in my answer below if I boot up on battery. Then if I connect the ac adapter for a few seconds and then disconnect it, `$ cat /proc/sys/vm/laptop_mode` will give `2`. In any case now my battery seems to last much longer


title: Build kernel with multi_v7_defconfig setting

text: What is multi_v7_defconfig used for and how do I build the Linux kernel with this? I think I can write this into config file as:               CONFIG_multi_v7_defconfig=y      Please correct me if I'm wrong.


title: can ping, can't connect by IP - resetting the network fixes it briefly, then it breaks again

text: I've got one server (CentOS 5), out of a half dozen, that the network flakes out on. When it's 'dead', I can still ping other servers by IP, but if I try to make any kind of connection also using an IP (ssh, telnet on 53 to test DNS) it just hangs and does nothing. Running /etc/init.d/network restart makes it work again -- for a short amount of time. I've compared the config against the other severs a dozen times and don't see anything different aside from the server IP. Prior to today, this network card & cable have been running flawlessly. I changed the way the network is laid out this morning, and this one server is giving me grief while the others all fell right in to place. The pings are 100% clean, there's no errors in ifconfig. I don't see any errors in any of the main logs, and I'm not really sure how else to try to diagnose the problem. If anyone has an insight, or guidance on how to troubleshoot further it would be greatly appreciated.


title: How can I log samba events?

text: How can I log samba events? I have samba-shared directories and I want to know what exactly someone have download from it. Actually, I can watch `iftop` to figured out WHO have downloaded, but not WHAT. Any ideas?


title: date - years prior to 1901 are treated as invalid

text: I have date (GNU coreutils) 7.1 installed on my system. If I try to check dates prior to 14-Dec-1901, I get an "invalid date" error. For example,                 $ date -d 1901-12-13       date: invalid date `1901-12-13'            $ date -d 1901-12-14       Sat Dec 14 00:00:00 EST 1901      What should I do to make the `date` utility to treat years prior to 1901 as valid? I receive similar errors for dates after 19-Jan-2038


title: How to specify a higher ruby version for installing a gem?

text: I install a ruby package.               $ sudo gem install pdfbeads     ERROR:  Error installing pdfbeads:         nokogiri requires Ruby version >= 1.9.2.      says that it needs ruby version greater than 1.9.1. My ruby is 1.8.7.               $ which ruby     /usr/bin/ruby     $ ruby --version     ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-linux]     $ gem --version     1.8.15      I have ruby 1.9.1 and 1.9.3.               $ whereis ruby1.9.1     ruby1.9: /usr/bin/ruby1.9.1 /usr/bin/ruby1.9.3 /usr/bin/X11/ruby1.9.1 /usr/bin/X11/ruby1.9.3      but 1.9.3 is linked to 1.9.1.               $ ls /usr/bin/ruby* -l     lrwxrwxrwx 1 root root   22 Jul 10 02:33 /usr/bin/ruby -> /etc/alternatives/ruby     -rwxr-xr-x 1 root root 5504 Nov 26  2013 /usr/bin/ruby1.8     -rwxr-xr-x 1 root root 5552 Nov 26  2013 /usr/bin/ruby1.9.1     lrwxrwxrwx 1 root root    9 Nov 26  2013 /usr/bin/ruby1.9.3 -> ruby1.9.1      It says itself is 1.9.3 however:               $  /usr/bin/ruby1.9.3 --version     ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux]      I change the link to ruby1.9.3 anyway               $ ls -l /usr/bin/ruby*     lrwxrwxrwx 1 root root    9 Aug 20 21:16 /usr/bin/ruby -> ruby1.9.3     -rwxr-xr-x 1 root root 5504 Nov 26  2013 /usr/bin/ruby1.8     -rwxr-xr-x 1 root root 5552 Nov 26  2013 /usr/bin/ruby1.9.1     lrwxrwxrwx 1 root root    9 Nov 26  2013 /usr/bin/ruby1.9.3 -> ruby1.9.1      The installation still says it needs ruby >= 1.9.2               $ sudo gem install pdfbeads     ERROR:  Error installing pdfbeads:         nokogiri requires Ruby version >= 1.9.2.     $ gem --version     1.8.15     $ ruby --version     ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux]      Do I have ruby1.9.3 or just ruby1.9.1? How can I make `sudo gem install pdfbeads` use ruby 1.9.3? * * * **Update:** I have now followed the way of installing ruby 2.1.0 by RVM, I have added the path of `rvm` to my `PATH`. I then successfully installed ruby2.1.0 by               $ rvm install 2.1.0      and made it default               $ rvm use 2.1.0          $ ruby -v     ruby 2.1.0p0 (2013-12-25 revision 44422) [i686-linux]     $ which ruby     /home/tim/.rvm/rubies/ruby-2.1.0/bin/ruby      Now back to install the package `pdfbeads`, but without `sudo` (because I thought I had installed ruby 2.1.0 under my account, not under root, and installation of the package requires the newer version ruby)               $ gem install pdfbeads     ERROR:  While executing gem ... (Gem::FilePermissionError)         You don't have write permissions into the /var/lib/gems/1.8 directory.      So I think I have to use `sudo`. But I still get the original error,               $ sudo gem install pdfbeads          ERROR:  Error installing pdfbeads:         nokogiri requires Ruby version >= 1.9.2.      I think it is because under `sudo`, the user is `root`, which still has the older version ruby1.8.7 as the default. So I wonder what can I do now?


title: I don't have writing access to a subdirectory in /

text: I have a server running under Debian wheezy. I want to create a directory in `/`. I can't without running `sudo mkdir myDirectory`. Once in `/myDirectory`, I can't write anything or create a repertory. I tried to run as root: `chmod -R /myDirectory 775`, but in vain. I am sure that I am missing something obvious, but I can't find what. Could somebody point me in the right direction?


title: Where can I find which packages are on each Debian Squeeze CD?

text: I just installed Debian Squeeze on my E1505. In order to get my wireless card working, I'm trying to install network-manager-gnome (I already installed firmware-iwlwifi) My current question is, how can I figure out which CD this (and its dependencies) is on, and in general where is this listed? There are 52 CDs. I realize they're roughly in order of usefulness, but I'd rather not download any blindly.


title: How to remove "dead window parts" after GUI errors?

text: I have experienced this problem with Chrome only (but for quite a while now, different versions) but the question is not about Chrome but about X (I guess). Sometimes (I am not aware of any pattern) an activity causes a part of the Chrome window to be redrawn (e.g. opening the context menu or the bookmark window) but this drawing (sometimes finished, sometimes an early stage, just a white or grey background) is dead then: Clicking it leads to no recognizable result. If I move the main window then this dead part stays where it appeared (like with `position:fixed` in CSS). Thus I (with nearly no X11 background knowledge) assume it must me an additional window which somehow got lost. Chrome works normally afterwards (but the probability for this to happen again has increased a lot); the problem is: This dead window is the "top layer" on the display i.e. it covers **everything**. I can kill this dead window using `Ctrl`-`Alt`-`Esc` but that (takes some time and) kills not only the dead window but the main window, too. **question** Is there a way to kill **only** the dead window? Maybe some kind of window handle which can be closed externally? I would not be surprised if there is none but I'll give it a try. **log files** Nothing in `~/.xsession-errors` but interesting lines in `/var/log/Xorg.0.log` (which has an mtime which could be the moment of this event):               (EE) [mi] EQ overflowing.  Additional events will be discarded until existing events are processed.     (EE)      (EE) Backtrace:     (EE) 0: /usr/bin/Xorg (xorg_backtrace+0x3d) [0x585aad]     (EE) 1: /usr/bin/Xorg (mieqEnqueue+0x22b) [0x5679db]     (EE) 2: /usr/bin/Xorg (QueuePointerEvents+0x52) [0x4534a2]     (EE) 3: /usr/lib64/xorg/modules/input/evdev_drv.so (0x7fb8059fa000+0x5b0d) [0x7fb8059ffb0d]     (EE) 4: /usr/bin/Xorg (0x400000+0x797b8) [0x4797b8]     (EE) 5: /usr/bin/Xorg (0x400000+0xa1e30) [0x4a1e30]     (EE) 6: /lib64/libpthread.so.0 (0x7fb811996000+0xf9f0) [0x7fb8119a59f0]     (EE) 7: /usr/bin/Xorg (0x400000+0x189c70) [0x589c70]     (EE) 8: /lib64/libpthread.so.0 (0x7fb811996000+0xf9f0) [0x7fb8119a59f0]     (EE) 9: /lib64/libc.so.6 (0x7fb8107e8000+0x7a154) [0x7fb810862154]     (EE) 10: /usr/lib64/xorg/modules/libexa.so (0x7fb80ba81000+0x7d98) [0x7fb80ba88d98]     (EE) 11: /usr/bin/Xorg (0x400000+0x110c61) [0x510c61]     (EE) 12: /usr/bin/Xorg (0x400000+0xd7109) [0x4d7109]     (EE) 13: /usr/bin/Xorg (FreePicture+0x138) [0x5048c8]     (EE) 14: /usr/bin/Xorg (0x400000+0x5e962) [0x45e962]     (EE) 15: /usr/bin/Xorg (FreeClientResources+0x6c) [0x45f98c]     (EE) 16: /usr/bin/Xorg (CloseDownClient+0x5f) [0x43c10f]     (EE) 17: /usr/bin/Xorg (0x400000+0x3c33f) [0x43c33f]     (EE) 18: /usr/bin/Xorg (0x400000+0x3cc3e) [0x43cc3e]     (EE) 19: /usr/bin/Xorg (0x400000+0x2c1ba) [0x42c1ba]     (EE) 20: /lib64/libc.so.6 (__libc_start_main+0xf5) [0x7fb810809be5]     (EE) 21: /usr/bin/Xorg (0x400000+0x2c501) [0x42c501]     (EE)      (EE) [mi] These backtraces from mieqEnqueue may point to a culprit higher up the stack.     (EE) [mi] mieq is *NOT* the cause.  It is a victim.    [709482.747] [mi] Increasing EQ size to 1024 to prevent dropped events.     [709482.750] [mi] EQ processing has resumed after 74 dropped events.     [709482.750] [mi] EQ processing has resumed after 74 dropped events.     [709482.750] [mi] This may be caused my a misbehaving driver monopolizing the server's resources.      **graphics hardware and driver** I have an AMD E-450 (i.e. GPU integrated in the processor). In `/var/log/Xorg.0.log` there is this line:               [    52.009] (--) RADEON(0): Chipset: "AMD Radeon HD 6300 Series Graphics" (ChipID = 0x9806)


title: Ignore lines containing a capital letter

text: Why does the following command still return some lines containing a capital letter?               aspell dump master | grep ozz | grep -v '[^A-Z]'


title: shell Script: Sorting files into directories and subdirectories

text: I routinely write my notes in `markdown` in a complex directory structure like this.               ~/doc/doc.md     ~/doc/math/linearAlgebra/linearAlgebra.md     ~/doc/math/linearAlgebra/numericalAnalysis.md     ~/doc/linux/tmux/tmux.md     ~/doc/linux/newsbeuter/newsbeuter.md      This directory structure is ever expanding and each directory has various other files apart from the `*.md` files. I have a shell script that recursively looks for `markdown files` in the parent directory `doc/` and generates `html` and `pdf` files using `pandoc`. I also create a `doc.md` file (through the script) which contains a list of all the `*.md` files. Presently I use,               find ~/doc/**/*.md      to generate this list. I would like to sort them according to the directory structure for easy perusal like this:               math        linearAlgebra                               linearAlgebra.md                               numericalAnalysis.md     linux        tmux                               tmux.md        newsbeuter                               newsbeuter.md      If `fp=/home/user/doc/linux/tmux/tmux.md` is an example full path of a file, then `${${fp%/*.md}#/home/user/doc/}` gives me `linux/tmux`. I can further process it to isolate `linux` and `tmux` etc. But I don't know the algorithm to create the directory structure. I think that this will require use of arrays to store the complete directory structure for each file and then sorting it. If a shell script already exists to to this, please let me know. Otherwise, pointers on possible algorithm are welcome.


title: Boot Halts if Time if Reset

text: I have an old powerbook g4 with a dead battery & I am trying to run ubuntu 10.04 on it. Whenever the power cord gets unplugged the date gets set back to Dec. 31st 1969. Apparently when you shutdown the OS the time gets saved to a file, which is checked fist thing at boot if the date on file is in future boot halts. YAY! This is very annoying since I have to boot into recovery, startup as root and set date from console then boot will continue normally. How can I keep this file from being saved? or How could I write an init.d script that reads date from file and sets it before check? I've already written a shell script that can save time to file and restore it, but don't know how to implement it or run that early in the boot process on a linux system. I originally wrote it for mac.               #!/bin/bash          #Load variables from .conf file          . /usr/share/fixes/time/time.conf               #Variables          DATE=$(date +%m%d%H%M%Y)               #Check year & set time from variable in .conf file          [ $(date +%Y) = 1969 ] && date $TIME               #Update time via ntp server          ntpdate -u $(systemsetup -getnetworktimeserver|awk '{print $4}')               #Save time to variable in .conf file          sed -i -e "s/^TIME=.*/TIME=$DATE/" /usr/share/fixes/time/time.conf               exit 0


title: Execution behaviour of cron

text: I want to schedule a cron so as to avoid running at midnight. I was thinking a period of 7 minutes. Now, I figured out with 7 minutes of interval, the last cron schedule for a particular day would be at 23:55 PM in the night. So, here is my question, will the cron be rolled over and start its execution again at 00:07 AM the next day, or will continue its existing period and will execute at 00:02 AM? We are using `Red Hat Enterprise Linux Server release 5.3 (Tikanga)`. Here is my cron configuration               */7 * * * * sh /home/dragon/work/pling.sh | tee /home/dragon/work/pling_`date +"\%Y\%m\%d_\%H\%M\%S"`.log


title: I no longer have smart bash completion for normal user

text: I created a new user on our Ubuntu server and I no longer have the bash auto/smart completion (pressing tab once finishes your current phrase if possible. Two tabs give you a `ls`). Smart complete works fine as root, but I want to enable it for my user.


title: Which tftp server is running

text: I need to find out which `tftp` server/daemon is running, in order to edit it's configurations and view the error log. I found out that there's a service of tftpd running:               # netstat -tupln | grep ftp     udp        0      0 0.0.0.0:69              0.0.0.0:*                           7915/in.tftpd     # ps aux | grep ftp     root      7915  0.0  0.0   2704   296 ?        Ss   22:10   0:00 /usr/sbin/in.tftpd --listen --user tftp --address 0.0.0.0:69 --secure /tftpboot      I've tried to edit it's configurations (notice the username `nobody`):               # nano /etc/xinetd.d/tftp     # cat /etc/xinetd.d/tftp     service tftp     {     protocol        = udp     port            = 69     socket_type     = dgram     wait            = yes     user            = nobody     server          = /usr/sbin/in.tftpd     server_args     = -v -s /tftpboot     disable         = no     }      But when restarting the tftpd, nothing changes:               # kill 7915     # ps aux | grep ftp     root     16815  0.0  0.0   2704   124 ?        Ss   22:31   0:00 /usr/sbin/in.tftpd --listen --user tftp --address 0.0.0.0:69 --secure /tftpboot      So I've tried to edit the other configuration file:               # nano /etc/inetd.conf     # cat /etc/inetd.conf     # /etc/inetd.conf:  see inetd(8) for further informations.     #     # Internet superserver configuration database     #     #     # Lines starting with "#:LABEL:" or "#<off>#" should not     # be changed unless you know what you are doing!     #     # If you want to disable an entry so it isn't touched during     # package updates just comment it out with a single '#' character.     #     # Packages should modify this file by using update-inetd(8)     #     # <service_name> <sock_type> <proto> <flags> <user> <server_path> <args>     #     #:INTERNAL: Internal services     #discard                stream  tcp     nowait  root    internal     #discard                dgram   udp     wait    root    internal     #daytime                stream  tcp     nowait  root    internal     #time           stream  tcp     nowait  root    internal          #:STANDARD: These are standard services.          #:BSD: Shell, login, exec and talk are BSD protocols.          #:MAIL: Mail, news and uucp services.          #:INFO: Info services          #:BOOT: TFTP service is provided primarily for booting.  Most sites     #       run this only on machines acting as "boot servers."     tftp            dgram   udp4    wait    nobody /usr/sbin/tcpd /usr/sbin/in.tftpd --tftpd-timeout 300 --retry-timeout 5 --mcast-port 1758 --mcast-addr 239.239.239.0-255 --mcast-ttl 1 --maxthread 100 --verbose=5 /tftpboot          #:RPC: RPC based services          #:HAM-RADIO: amateur-radio services          #:OTHER: Other services      And then tried to restart:               # kill 16815     # ps aux | grep ftp     root     18287  0.0  0.0   2704   120 ?        Ss   22:34   0:00 /usr/sbin/in.tftpd --listen --user tftp --address 0.0.0.0:69 --secure /tftpboot      But as you can see, nothing has changed. _I've trimmed the above output for better readability._ So how can I tell which tftp daemon is being executed and what are the config file & error log? * * * **Edit #1 (21 January 2014, 07:33 UTC):**   _Response to the commentor @"Mark Plotnick"_               # ps -efl|grep tftp     1 S root     18287     1  0  80   0 -   676 poll_s Jan20 ?        00:00:00 /usr/sbin/in.tftpd --listen --user tftp --address 0.0.0.0:69 --secure /tftpboot     0 S root     19271 10638  0  80   0 -  1097 pipe_w 11:36 pts/1    00:00:00 grep --color=auto tftp     # ps -p 1       PID TTY          TIME CMD         1 ?        00:00:03 init      * * * _Response to the responder @"slm"_ I've executed the commands you wrote after importing them to Ubuntu 12.04:               # dpkg --list | grep tftp     ii  atftp                                        0.7.dfsg-11                                      advanced TFTP client     ii  tftp                                         0.17-18ubuntu2                                   Trivial file transfer protocol client     rc  tftpd                                        0.17-18ubuntu2                                   Trivial file transfer protocol server     ii  tftpd-hpa                                    5.2-1ubuntu1                                     HPA's tftp server     # dpkg --listfiles tftpd-hpa     /.     /usr     /usr/sbin     /usr/sbin/in.tftpd     /usr/share     /usr/share/man     /usr/share/man/man8     /usr/share/man/man8/in.tftpd.8.gz     /usr/share/doc     /usr/share/doc/tftpd-hpa     /usr/share/doc/tftpd-hpa/README     /usr/share/doc/tftpd-hpa/README.security     /usr/share/doc/tftpd-hpa/README.Debian     /usr/share/doc/tftpd-hpa/copyright     /usr/share/doc/tftpd-hpa/examples     /usr/share/doc/tftpd-hpa/examples/sample.rules     /usr/share/doc/tftpd-hpa/examples/tftpd-hpa.preseed     /usr/share/doc/tftpd-hpa/changelog.Debian.gz     /usr/share/lintian     /usr/share/lintian/overrides     /usr/share/lintian/overrides/tftpd-hpa     /etc     /etc/init     /etc/init/tftpd-hpa.conf     /etc/init.d     /usr/share/man/man8/tftpd.8.gz     /etc/init.d/tftpd-hpa     # dpkg --status tftpd-hpa     Package: tftpd-hpa     Status: install ok installed     Priority: extra     Section: net     Installed-Size: 137     Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>     Architecture: i386     Source: tftp-hpa     Version: 5.2-1ubuntu1     Depends: debconf (>= 0.5) | debconf-2.0, upstart-job, libc6 (>= 2.11), libwrap0 (>= 7.6-4~), adduser     Suggests: syslinux-common     Conflicts: atftpd, tftpd     Conffiles:      /etc/init/tftpd-hpa.conf 3647737c313ad1968b8463388ded2d26     Description: HPA's tftp server      Trivial File Transfer Protocol (TFTP) is a file transfer protocol, mainly to      serve boot images over the network to other machines (PXE).      .      tftp-hpa is an enhanced version of the BSD TFTP client and server. It      possesses a number of bugfixes and enhancements over the original.      .      This package contains the server.     Homepage: http://www.kernel.org/pub/software/network/tftp/     Original-Maintainer: Daniel Baumann <daniel.baumann@progress-technologies.net>     # /usr/sbin/in.tftpd --version     tftp-hpa 5.2, with remap, with tcpwrappers     # sudo lsof -p $(pgrep -n "in.tftpd")     lsof: WARNING: can't stat() fuse.gvfs-fuse-daemon file system /home/tlvlab/.gvfs           Output information may be incomplete.     COMMAND    PID USER   FD   TYPE     DEVICE SIZE/OFF     NODE NAME     in.tftpd 18287 root  cwd    DIR       0,20        0  9575553 /     in.tftpd 18287 root  rtd    DIR        8,1     4096        2 /     in.tftpd 18287 root  txt    REG        8,1    35008   270805 /usr/sbin/in.tftpd     in.tftpd 18287 root  mem    REG        8,1    47040 28836074 /lib/i386-linux-gnu/libnss_files-2.15.so     in.tftpd 18287 root  mem    REG        8,1    42652 28836073 /lib/i386-linux-gnu/libnss_nis-2.15.so     in.tftpd 18287 root  mem    REG        8,1    30520 28836075 /lib/i386-linux-gnu/libnss_compat-2.15.so     in.tftpd 18287 root  mem    REG        8,1    92016 28836060 /lib/i386-linux-gnu/libnsl-2.15.so     in.tftpd 18287 root  mem    REG        8,1  1734120 28836077 /lib/i386-linux-gnu/libc-2.15.so     in.tftpd 18287 root  mem    REG        8,1    35032 28836781 /lib/i386-linux-gnu/libwrap.so.0.7.6     in.tftpd 18287 root  mem    REG        8,1   134344 28836067 /lib/i386-linux-gnu/ld-2.15.so     in.tftpd 18287 root    0u   CHR        1,3      0t0     1029 /dev/null     in.tftpd 18287 root    1u   CHR        1,3      0t0     1029 /dev/null     in.tftpd 18287 root    2u   CHR        1,3      0t0     1029 /dev/null     in.tftpd 18287 root    3u  unix 0xf0030d80      0t0  2154638 socket     in.tftpd 18287 root    4u  IPv4    2154641      0t0      UDP *:tftp      Probably the path to log file is `/var/log/syslog` (file `/etc/syslog.conf` doesn't exist).


title: Memory usage on SunOS and Linux

text: I have some doubts with memory usage.   Currently I have `nagios` check who measures used memory from `free -m` command on Linux. I added another script for memory usage from http://exchange.nagios.org/directory/Plugins/Operating- Systems/Solaris/check_mem-2Epl/details and it measures for Solaris from `vmstat` and for Linux from `/proc/meminfo`, with this new check a have a lot more usage 20 % - 30 % more on some hosts.               ./check_mem.pl -f -w 90 -c 60     CRITICAL - 34.6% (439872 kB) free!|TOTAL=1272376KB;;;; USED=832504KB;127237;508950;; FREE=439872KB;;;; CACHES=418977KB;;;;      this is output from new script on Solaris host on this host I also have                   vmstat 1 2      kthr      memory            page            disk          faults      cpu      r b w   swap  free  re  mf pi po fr de sr s0 -- -- --   in   sy   cs us sy id      0 0 0 1184172 474856 54 222 0  0  0  0 112 8  0  0  0  231 1735  669  1  8 91      0 0 0 1175352 440948 16 58  0  0  0  0  0  0  0  0  0  229   83  190  0  3 97      values from `vmstat` and from new script are OK. I mean the script collects from `vmstat` values ok. I need to know what is the best way to measure memory usage on Solaris and Linux, how can I see how much OS uses and how much is used by app is it `vmstat`(Sunos) and `/proc/meminfo` (Linux) OK for that?


title: How to highlight a word in the output of "cat"?

text: I can do the following to see if some word is available in the output of "cat":               cat filename | grep word      This filters the output and shows only those lines which contain "word". Now, is it possible to only highlight the "word" in the output, without dropping other lines?


title: Grep display both matched and umatched lines

text: How can I use `grep` command to display both matched and unmatched lines? Matched line should be in red and other lines should be in normal color. Is there a `grep` option available to do that?


title: bash: color matching string

text: I am looking for a command which would color a matching string in text. I.e. I am looking for functionality similar to what grep does, but I want to see the complete text not only the matching lines Can somebody please advise whether such tool exists, or how I could best achieve this ?


title: Highlight patterns in command output (grep-like but without excluding lines)

text: I need a command that colorizes some symbol sequence in output of a certain command. I'd like it like `grep` make it.               $ some-command | grep symbol-sequence      However `grep` removed lines that isn't contained `symbol-sequence`. I'd like to have all original lines with highlighted `symbol-sequence`. How it can be done? * * * I have `alias grep='grep --color=auto'` in `~/.bashrc`


title: Color matching but print other lines too

text: I have an alias: `alias grep='grep --color=auto'`. I wish to have some way to print not only matching row but all of them and just color matching patterns. I doubt is there an option to do that in the `grep` itself. Any other tool ? Or idea how to achieve this ?


title: Using zsh's line editor to wrap around subprocesses

text: Is it possible to use zsh's built-in line editor (`zle`) to feed input to a subprocess? That is, I would like to run `zlewrap mycommand` where `zlewrap` is a zsh function and `mycommand` is any program that just reads lines from stdin; `zlewrap` would effectively provide zle's line-editing capabilities to `mycommand`. This is on the model of `rlwrap` which does just this, but with readline and not zle for line editing.


title: How to integrate sound with desktop events?

text: On Windows, the `Sounds & Multimedia` control panel allows the connection of sound snippets to various operating system events, like window movements, process start/stop, and start-up/shutdown. I am using GNOME on Fedora 13, and I have not had any luck discovering any similar functionality. Does such a function exist? If so, is it cross-window- manager-compatible or tied to a specific window manager (GNOME, KDE, etc.) or distribution?


title: untar a directory of *.tgz files using a wildcard

text: I've got a directory that looks like               $ ls     Broad_hapmap3_r2_Affy6_cels_excluded.tgz  DINGO.tgz                     GIGAS.tgz  index.html          IONIC.tgz             passing_cels_sample_map.txt  SCALE.tgz     CHEAP.tgz                                 EPODE.tgz                     HOMOS.tgz  index.html?C=M;O=A  LOVED.tgz             PICUL.tgz                    SHELF.tgz     CORER.tgz                                 excluded_cels_md5.txt         HUFFS.tgz  index.html?C=N;O=D  NIGHS.tgz             POSIT.tgz                    SLOTH.tgz     CUPID.tgz                                 excluded_cels_sample_map.txt  HUSKS.tgz  index.html?C=S;O=A  passing_cels_md5.txt  SAKES.tgz                    TESLA.tgz      I want to unzip all the files that match the extension *.tgz with a single command, except Broad_hapmap3_r2_Affy6_cels_excluded.tgz. I can do               ls *.tgz | xargs -n1 tar zxvf      for all the *tgz files, but what's a good way to exclude a subset of them? From reading online maybe find is indicated in this situation, but it seems like overkill. Thank in advance. Addendum: I'd also be interested in alternative methods to the question without excluding files.


title: How can I run tcpdump from a Python script without AppArmor complaining?

text: For inconvenient reasons going beyond the scope of this question, I have to run `tcpdump` from within a Python script. I currently just call `subprocess.Popen(['tcpdump', ...)` and everything works just fine. However, when I use tools like pyInstaller to package the script into an executable, and run it (as root), I get the following error:               tcpdump: error while loading shared libraries: libcrypto.so.0.9.8: "failed to map segment from shared object: Permission denied"       As I found out, this is AppArmor whining. Now, I can easily replace my call to tcpdump with the following:               subprocess.call(['aa-complain', '/usr/sbin/tcpdump'])     pcap = subprocess.Popen(['tcpdump', ...)     subprocess.call(['aa-enforce', '/usr/sbin/tcpdump'])      Now it prints two info lines (about changing into complain/enforce mode), and runs tcpdump without further complaints. The people who will run this script will run it as root when they want to do packet captures, so I don't see how this is a security problem. At the same time, the above seems hackish to me. So to the AppArmor experts among you: is this the canonical way to deal with it? PS. I'm also thankful for links to a good, quick introduction to AppArmor in general, since this is the first time I'm encountering this.


title: Centos GUI not working

text: I installed centos 6.3 Final . But after rebooting it stuck and doesn't show GUI ![enter image description here](http://i.stack.imgur.com/XbEmt.jpg)


title: Web front-end to find/grep/ack

text: In my lab, we are trying to build a web that allows the user to enter **queries** for `find`, `ack`, `grep` on a specific directory. The web would return an HTML with a table of a list of clickable files (click on them would download the file). For example, in this interface the user would type a word in a form in the browser, and the system would call `find . -name "*word*"` and send back an HTML with the result. Has anything like this been done before? We would like to avoid reinventing the wheel. What toolkits, utilities or packages would be helpful to build this functionality?


title: ~./inputrc file not sourcing correctly

text: I have this ~/.inputrc file that I created for certain key bindings.               # mappings for Ctrl-left-arrow and Ctrl-right-arrow for word moving     "\e[1;5C":forward-word     "\e[1;5D":backward-word     "\e[5C":forward-word     "\e[5D":backward-word     "\e\e[C":forward-word     "\e\e[D":backward-word      whenever I try to run `source ~/.inputrc`, it gives me the following error: > \e[1;5C:forward-word: Command not found. \e[1;5D:backward-word: Command not > found. \e[5C:forward-word: Command not found. \e[5D:backward-word: Command > not found. \e\e[C:forward-word: Command not found. \e\e[D:backward-word: > Command not found. It also doesn't work when I open a new terminal, I don't get the error but my ctrl key combinations are not working in new terminal as well. I created this file myself since I do not have root access to change /etc/inputrc. Can anybody help me out? Thanks. EDIT: I've tried the file with space after the colon (:) sign as well. It doesn't work. I also tried my making it executable (chmod +x ~/.inputrc), didn't work. EDIT: I realized that this procedure is only for 'bash' and I am running 'tcsh'. For 'csh', use `./bindings` file instead of `./inputrc` file and use `bindkey` syntax.


title: 'locate' for case-insensitive words?

text: I wonder how to use the command `locate` to search for words that are not case sensitive? Such as modify `locate normal` to search for results that have "Normal" and "normal".


title: Alternative to `pkill` or `pgrep -f` on cygwin?

text: Suppose I have starting my process like:               java -DSOME_STRING -jar foo.jar      Then on linux, I can use the following to find or kill this process:               pgrep -f SOME_STRING     pkill -f SOME_STRING      However this doesn't seem to work on cygwin. Can anyone suggest an alternative for these tools in cygwin?


title: Bash-script. Shift seconds

text: Maybe somebody can help me. In bash I don't know how to do that. I need to do a bash-script. At stdin I have .srt file of subtitles in this format:               num     HH:MM:SS,SSS --> HH:MM:SS,SSS     text line 1     text line 2     ...      HH:MM:SS,SSS start and finish of title for text. Script must shift seconds. (it can be + or -) Example:               $cat bmt.srt     5     00:01:02,323 --> 00:01:05,572     Hello, my frieds!     6     ....          $./shifter.sh +3<mbt.srt     5     00:01:05,323 --> 00:01:08,572     Hello, my frieds!     6      I think, I need to grab all HH:MM:SS and convert them to seconds firstly. If somebody can do this without sed, I will applaude. Thank you!


title: No effect of umask and chmod on mounted drives

text: The windows drives are mounted at boot-time using pysdm. The setting were `nls=iso8859-1,users,umask=002,sync,user,dirsync,uid=mtk` When I try to change the permission of files using chmod, I don't see any update in the permissions. Chmod quietly returns the prompt. Also the permission of created files must have been 755 instead of 775. Here is the output of terminal.               mtk@mtk-laptop$ umask     0022     mtk@mtk-laptop$ touch abc.txt     mtk@mtk-laptop$ ls -l abc.txt      -rwxrwxr-x 1 mtk root 0 May 14 00:00 abc.txt*     mtk@mtk-laptop$ chmod ugo-x abc.txt      mtk@mtk-laptop$ ls -l abc.txt      -rwxrwxr-x 1 mtk root 0 May 14 00:00 abc.txt*     mtk@mtk-laptop$       Does anyone know what is the issue behind this? I am using ubuntu 12.04.


title: How to customize .bashrc to configure command prompt?

text: Is there an easy way to change my Bash prompt to modify the colors and what text is displayed? I've heard that this is done in `.bashrc`, but I haven't found any nice, easy ways of modifying it. How are colors expressed in Bash?


title: How to add color to my command prompt?

text: On my system: `echo $PS1` prints: `\\[\e]0;\u@\h: \w\a\\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$` I followed this tutorial here to modify it: `PS1="\e[0;38m \u@\h: \w\a\\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$ \e[m"` Basically I've enclosed the original expression in `\e[` and `\e[m` to make it colored. However it doesn't add color and makes my prompt: `kshitiz@ksh: ~/testkshitiz@ksh:~/test` What is wrong with my PS1 expression?


title: Does symlinking from Drive A to Drive B affect I/O on Drive A?

text: I was wondering if IO through a symbolic link affects IO on the host drive even if it points to a seperate drive? My setup is,               /dev/sdb2       1.8T  443G  1.3T  26% /home1     /dev/sda3       1.8T  1.7T   44G  98% /home      With symbolic links poiting `/home/$users` to `/home1/$users` (about 50 links, with constant IO streams to /home/*), will this affect the IO at all on sda3 (`/home/`), as you can see sda3 needs all the IO to itself, with 98% full and high load (34% iowait :/) So, with 34% iowait, would removing the symlinks and querying /home1/ directly go anywhere to decreasing my iowait?               Linux 3.2.13-grsec-xxxx-grs-ipv6-64 (sb7)       17/10/12        _x86_64_        (8 CPU)          avg-cpu:  %user   %nice %system %iowait  %steal   %idle                1.27    0.00    2.87   31.50    0.00   64.36          Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util     sda             110.61   471.54  167.28   18.98 11076.29  1964.83   140.04     8.35   44.30   23.27  229.66   5.36  99.78     sdb               0.38     0.75   80.00    5.16  4227.02  2143.14   149.59     1.99   23.38   10.69  219.99   3.26


title: Problem with encrypting /var/www and ikiwiki

text: I tried to encrypt `/var/www` with `encfs`. To do so I did following: `mv /var/www /var/www.bak`   `mkdir /var/www_enc`   `encfs --public /var/www_enc /var/www`   `cp -a /var/www.bak/* /var/www/`   `/etc/init.d/apache2 restart` I tried it with my local `ikiwiki` (`localhost/myikiwiki`). Browsing worked perfectly but when I tried to save an edit I got the following error message:               Failed to save your changes.          Your changes were not able to be saved to disk. The system gave the error:          Your changes are preserved below, and you can try again to save them.       However if I revert the changes, everything works perfectly. I don't understand this, since the encrypted `/var/www` folder should look to the outside world exactly as the old unencrypted version would (especially because I used the `\--public` switch). Any idea what may be wrong and how to fix it? System Info:   * Ubuntu 11.04   * Apache2: 2.2.17-1ubuntu1.2   * ikiwiki version 3.20110124ubuntu1


title: SCP fails without error

text: I've been experiencing very strange behavior of SCP for some time: whenever I try to copy a file, the output of SCP contains a bunch of underscores and the file is not copied.               $ scp test.txt 192.168.0.2:~     job@192.168.0.2's password:       ________________________________________      When I create an SSH connection using Midnight Commander and copy files it does work. Some info about my machine:               $ ssh -V     OpenSSH_5.8p1 Debian-1ubuntu3, OpenSSL 0.9.8o 01 Jun 2010          $ uname -a     Linux squatpc 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:05:41 UTC 2011 i686 i686 i386 GNU/Linux      And I'm running Kubuntu 11.04. **Edit:** Some more info as requested by the comments:               $ scp -v test.txt 192.168.0.2:~     Executing: program /usr/bin/ssh host 192.168.0.2, user (unspecified), command scp -v -t -- ~     OpenSSH_5.8p1 Debian-1ubuntu3, OpenSSL 0.9.8o 01 Jun 2010     debug1: Reading configuration data /etc/ssh/ssh_config     debug1: Applying options for *     debug1: Connecting to 192.168.0.2 [192.168.0.2] port 22.     debug1: Connection established.     debug1: identity file /home/job/.ssh/id_rsa type 1     debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048     debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048     debug1: identity file /home/job/.ssh/id_rsa-cert type -1     debug1: identity file /home/job/.ssh/id_dsa type -1     debug1: identity file /home/job/.ssh/id_dsa-cert type -1     debug1: identity file /home/job/.ssh/id_ecdsa type -1     debug1: identity file /home/job/.ssh/id_ecdsa-cert type -1     debug1: Remote protocol version 2.0, remote software version OpenSSH_5.8p1 Debian-1ubuntu3     debug1: match: OpenSSH_5.8p1 Debian-1ubuntu3 pat OpenSSH*     debug1: Enabling compatibility mode for protocol 2.0     debug1: Local version string SSH-2.0-OpenSSH_5.8p1 Debian-1ubuntu3     debug1: SSH2_MSG_KEXINIT sent     debug1: SSH2_MSG_KEXINIT received     debug1: kex: server->client aes128-ctr hmac-md5 none     debug1: kex: client->server aes128-ctr hmac-md5 none     debug1: sending SSH2_MSG_KEX_ECDH_INIT     debug1: expecting SSH2_MSG_KEX_ECDH_REPLY     debug1: Server host key: ECDSA 28:f3:2b:31:36:43:9b:07:d8:33:ca:43:4f:ca:6c:4c     debug1: Host '192.168.0.2' is known and matches the ECDSA host key.     debug1: Found key in /home/job/.ssh/known_hosts:20     debug1: ssh_ecdsa_verify: signature correct     debug1: SSH2_MSG_NEWKEYS sent     debug1: expecting SSH2_MSG_NEWKEYS     debug1: SSH2_MSG_NEWKEYS received     debug1: Roaming not allowed by server     debug1: SSH2_MSG_SERVICE_REQUEST sent     debug1: SSH2_MSG_SERVICE_ACCEPT received     debug1: Authentications that can continue: publickey,password     debug1: Next authentication method: publickey     debug1: Offering RSA public key: /home/job/.ssh/id_rsa     debug1: Authentications that can continue: publickey,password     debug1: Trying private key: /home/job/.ssh/id_dsa     debug1: Trying private key: /home/job/.ssh/id_ecdsa     debug1: Next authentication method: password     job@192.168.0.2's password:      debug1: Authentication succeeded (password).     Authenticated to 192.168.0.2 ([192.168.0.2]:22).     debug1: channel 0: new [client-session]     debug1: Requesting no-more-sessions@openssh.com     debug1: Entering interactive session.     debug1: Sending environment.     debug1: Sending env LANG = en_US.UTF-8     debug1: Sending command: scp -v -t -- ~      ________________________________________     debug1: client_input_channel_req: channel 0 rtype exit-status reply 0     debug1: channel 0: free: client-session, nchannels 1     debug1: fd 0 clearing O_NONBLOCK     debug1: fd 1 clearing O_NONBLOCK     Transferred: sent 2120, received 1872 bytes, in 0.3 seconds     Bytes per second: sent 7783.1, received 6872.6     debug1: Exit status 0      and               $ type scp     scp is hashed (/usr/bin/scp)