Linux Last command weird output? Garbage for IP address

This was a weird output I came across. Running the "last" command gave me this output               gryphon  pts/0        192.168.0.108    Wed Mar 19 21:04   still logged in     gryphon  pts/0        s0106d850e695678 Wed Mar 19 13:53 - 13:54  (00:01)     gryphon  pts/0        192.168.0.108    Tue Mar 18 22:57 - 23:03  (00:06)      I'm pretty sure that the weird IP address was me but what is up with the garbage for the IP address? I do not have an IPV6 address. It's just a weird hostname I don't have anything named that. I might have been VPN'ing in would that have anything to do with it?


Nmap too slow with a network that can't access to internet

I am using CentOS 6.5 and Nmap 5.51 I want to find all alive IPs in a LAN between two IPs Easily get the answer               sudo nmap -sP 192.168.1.100-200      my problem when my network can access to internet the total time spend is **1.78 seconds** but when my network can't access to internet the total time spend is **17.79 seconds** **output with internet**               [mgmt_user@Management root]$ sudo nmap -sP 192.168.1.100-200          Starting Nmap 5.51 ( http://nmap.org ) at 2014-05-21 23:05 EEST     Nmap scan report for 192.168.1.106     Host is up (0.00054s latency).     MAC Address: 08:00:27:93:2E:C5 (Cadmus Computer Systems)     Nmap scan report for 192.168.1.126     Host is up (0.0013s latency).     MAC Address: 00:16:3E:63:64:A0 (Xensource)     Nmap done: 101 IP addresses (2 hosts up) scanned in 1.78 seconds      **output without internet**               [mgmt_user@Management root]$ sudo nmap -sP 192.168.1.100-200          Starting Nmap 5.51 ( http://nmap.org ) at 2014-05-21 23:02 EEST     Nmap scan report for 192.168.1.106     Host is up (0.00042s latency).     MAC Address: 08:00:27:93:2E:C5 (Cadmus Computer Systems)     Nmap scan report for 192.168.1.126     Host is up (0.0011s latency).     MAC Address: 00:16:3E:63:64:A0 (Xensource)     Nmap done: 101 IP addresses (2 hosts up) scanned in 17.79 seconds      repeat the command many time and have the same time is there any link between Nmap and the internet ?


Unique synergy monitor setup

If anyone doesn't know about synergy, it's basically a KVM switch over the lan, but you don't have to switch anything. It allows you to move your mouse from one machine to the other like if you had dual monitors. My question is: is it possible to set up your config so that you have 1 server and 1 client, both have dual monitors, but the client machine has its monitors such that one is on the left of the server's left monitor, and the other is on the right of the server's right monitor? So for example:                    ------------  -----------  ------------  -------------     |  client  |  | server  |  | server   |  | client    |     |  screen1 |  | screen1 |  | screen2  |  | screen2   |     |          |  |         |  |          |  |           |     |----------|  |---------|  |----------|  |-----------|           Hopefully my ascii is good enough to understand. The reason I ask here is because both machines will be running linux, and I'm fairly certain that there's no supported way to do this in the synergy configs. But I am completely willing to muck with X configs on the client to get it to work. I would set this up so that the only way the client could be used is through this synergy setup, so any X mucking won't have to be changed. How synergy config works is that on your server, you give it the configuration of your screens. So you'll say client1 is right of server, and server is left of client1. What I was thinking is, is there a way to somehow make X think each display is connected on a different server. So I could say like clientS1(192.168.1.1:1234) is left of server. And clientS2(192.168.1.1:1235) is right of server. And X will know which screen it is? I'm sure that last paragraph is confusing, but maybe someone who knows more about synergy or X can point me in the right direction.


Setting up a wireless to ethernet bridge

I am trying to set up a temporary network using the following hardware               [Wireless Router]))) )) ) [laptop] ----- [Desktop]                         ^wifi (debian)  ^ethernet   ^(3com Audrey)      Looking around online, I found what might be two solutions: 1) On the laptop (running debian) set up a NAT using iptables or 2) Use parprouted I've read online that the first solution won't work because there are problems translating addresses because of the difference in MAC addresses between the eth0 and wlan0 connections, so I'm leaning toward the 2nd. What I want to know is:   1. Would either of these methods be better than the other, (and/or should I use a different approach)?   2. Is there an easy way to back up my settings in case I screw something up?


pysvn fails to make due to -lneon not found?

I am trying to install pysvn on my CentOS server and it says that -lneon is gone.   After searching their mailing lists for a bit I found what neon means but it doesn't say how can I get it? Here's my make command output:               make     /usr/local/bin/python2.7 -u generate_svn_error_codes/create_svn_error_codes_hpp.     py /usr/local/include/subversion-1     g++ -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.     2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/pyt     hon2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -DPYC     XX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  gene     rate_svn_error_codes/generate_svn_error_codes.cpp -o generate_svn_error_codes/ge     nerate_svn_error_codes     /usr/local/bin/python2.7 -u create__init__.py pysvn/__init__.py.template pysvn/_     _init__.py generate_svn_error_codes/generate_svn_error_codes _pysvn_2_7.so     Info: Creating __init__.py for module _pysvn_2_7     Info: Running 'generate_svn_error_codes/generate_svn_error_codes >>pysvn/__init_     _.py'     Compile pysvn_docs.cpp     /usr/local/bin/python2.7 -u ../Docs/generate_cpp_docs_from_html_docs.py /usr/loc     al/include/subversion-1 ../Docs/pysvn_prog_ref.html pysvn_docs.hpp pysvn_docs.cp     p     Info: svn_include /usr/local/include/subversion-1     Info: html_doc ../Docs/pysvn_prog_ref.html     Info: cpp_header_filename pysvn_docs.hpp     Info: cpp_module_filename pysvn_docs.cpp     Info: Building against SVN 1.5.7 code 1005007     Compile pysvn_docs.hpp     touch pysvn_docs.hpp     Compile pysvn_version.hpp     /usr/local/bin/python2.7 -u ../Builder/brand_version.py ../Builder/version.info     pysvn_version.hpp.template     Info: Running svnversion -c ".." 2>&1     Info: revision exported     Compile pysvn.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn.o pysvn.cpp     Compile pysvn_callbacks.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_callbacks.o pysvn_callbacks.cpp     Compile pysvn_client.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_client.o pysvn_client.cpp     Compile pysvn_static_strings.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_static_strings.o pysvn_static_strings.cpp     Compile pysvn_enum_string.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_enum_string.o pysvn_enum_string.cpp     Compile pysvn_client_cmd_add.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_client_cmd_add.o pysvn_client_cmd_add.cpp     Compile pysvn_client_cmd_changelist.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_client_cmd_changelist.o pysvn_client_cmd_changelist.cpp     Compile pysvn_client_cmd_checkin.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_client_cmd_checkin.o pysvn_client_cmd_checkin.cpp     Compile pysvn_client_cmd_copy.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_client_cmd_copy.o pysvn_client_cmd_copy.cpp     Compile pysvn_client_cmd_diff.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_client_cmd_diff.o pysvn_client_cmd_diff.cpp     Compile pysvn_client_cmd_export.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_client_cmd_export.o pysvn_client_cmd_export.cpp     Compile pysvn_client_cmd_info.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_client_cmd_info.o pysvn_client_cmd_info.cpp     Compile pysvn_client_cmd_list.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_client_cmd_list.o pysvn_client_cmd_list.cpp     Compile pysvn_client_cmd_lock.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_client_cmd_lock.o pysvn_client_cmd_lock.cpp     Compile pysvn_client_cmd_merge.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_client_cmd_merge.o pysvn_client_cmd_merge.cpp     Compile pysvn_client_cmd_prop.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_client_cmd_prop.o pysvn_client_cmd_prop.cpp     Compile pysvn_client_cmd_revprop.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_client_cmd_revprop.o pysvn_client_cmd_revprop.cpp     Compile pysvn_client_cmd_switch.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_client_cmd_switch.o pysvn_client_cmd_switch.cpp     Compile pysvn_transaction.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_transaction.o pysvn_transaction.cpp     Compile pysvn_revision.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_revision.o pysvn_revision.cpp     Compile pysvn_docs.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_docs.o pysvn_docs.cpp     Compile pysvn_path.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_path.o pysvn_path.cpp     Compile pysvn_arg_processing.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_arg_processing.o pysvn_arg_processing.cpp     Compile pysvn_converters.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_converters.o pysvn_converters.cpp     Compile pysvn_svnenv.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_svnenv.o pysvn_svnenv.cpp     Compile pysvn_profile.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_profile.o pysvn_profile.cpp     Compile cxxsupport.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o cxxsupport.o /home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src/cxxsupport.cxx     Compile cxx_extensions.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o cxx_extensions.o /home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src/cxx_extensi     ons.cxx     Compile cxxextensions.o     gcc -c -Wall -fPIC -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1 -I/home/omerk     atz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/python2.7 -I/usr/loc     al/include/subversion-1 -I/usr/include/httpd -I.  -o cxxextensions.o /home/omerk     atz/pysvn-1.7.4/Import/pycxx-6.2.1/Src/cxxextensions.c     Compile IndirectPythonInterface.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o IndirectPythonInterface.o /home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src/In     directPythonInterface.cxx     Compile pysvn/_pysvn_2_7.so     g++ -shared  -o pysvn/_pysvn_2_7.so pysvn.o pysvn_callbacks.o pysvn_client.o pys     vn_static_strings.o pysvn_enum_string.o pysvn_client_cmd_add.o pysvn_client_cmd_     changelist.o pysvn_client_cmd_checkin.o pysvn_client_cmd_copy.o pysvn_client_cmd     _diff.o pysvn_client_cmd_export.o pysvn_client_cmd_info.o pysvn_client_cmd_list.     o pysvn_client_cmd_lock.o pysvn_client_cmd_merge.o pysvn_client_cmd_prop.o pysvn     _client_cmd_revprop.o pysvn_client_cmd_switch.o pysvn_transaction.o pysvn_revisi     on.o pysvn_docs.o pysvn_path.o pysvn_arg_processing.o pysvn_converters.o pysvn_s     vnenv.o pysvn_profile.o cxxsupport.o cxx_extensions.o cxxextensions.o IndirectPy     thonInterface.o -L/usr/local/lib -Wl,--rpath -Wl,/usr/local/lib -lsvn_client-1 -     lsvn_diff-1 -lsvn_repos-1 -lcom_err -lresolv -lexpat -lneon -lssl     /usr/bin/ld: cannot find -lneon     collect2: ld returned 1 exit status     make: *** [pysvn/_pysvn_2_7.so] Error 1


Which scripting language is most widespread in system administration tasks?

I am migrating to Linux and have some experience with the Mac OS X command line/bash. I'd like to automate system admin tasks via scripting, but I am unsure as which language is the most used in the real world: bash shell scripting, Perl or Python ? Which should I learn (if more than one, what order) ? Thanks, Scott


How to clone a NTFS partition (WinXP) from a damaged disk to a new one?

I'm an Italian Windows programmer. I know almost nothing of Linux, so please be patient if the question is dumb and pardon my bad english. I need to clone a NTFS partition from a damaged, near to die hard disk (SCSI, if this matters) to a new one (SATA). I've installed the last version of Hiren's Boot CD utilities on a USB stick, and tried with GParted, which told me that it can't copy/paste the partition because it's damaged and "flagged" by windows to run CHKDSK. I followed the Warning advice and tried to repair it using `CHKDSK /f` (it took 9 hours and exited with an error after "phase 3") and a Linux program I can't recall right now, without success. I tried to clone using Clonezilla, and it failed as well, for the same reasons. In the HBCD there's dd_rescue, but it failed again because it can't find "ntfs.something". In the end, all that I want is to clone that partition as it is, with his errors and everything. I can repair it on the new drive. So, what should I do?


aliasing cd to pushd - is it a good idea?

Is it a good idea to use the following alias:               cd() {         pushd $1;     }      in bash? I think this would be very useful, since I can then use a series of `popd`s instead of just a `cd -` once. Is there any case where this might be a problem?


SSH: Network is unreachable (caused by router)

I've searched solution in _Google_ for 3 days, when I decided to write here. I have a router, so in my house is _WLAN_. I use laptop when I stay at home. In another city in my office I have a second computer (PC). I can connect with this PC using SSH protocol. Unfortunately I can't connect with my laptop from PC. When I try to do this, I see the statement:               ssh: connect to host XX.XX.XX.XX port 22: Network is unreachable      Daemon SSHD is running in my laptop. What is interesting, this connection worked correctly a few months ago, but I reinstalled the SSHD and now is the problem. **/sbin/route** shows:               Kernel IP routing table     Destination     Gateway         Genmask         Flags Metric Ref    Use Iface     default         192.168.9.1     0.0.0.0         UG    0      0        0 wlan0     192.168.9.0     *               255.255.255.0   U     2      0        0 wlan0      **/sbin/ifconfig** prints:               eth0      Link encap:Ethernet  HWaddr XX:XX:XX:XX:XX:XX               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:0 errors:0 dropped:0 overruns:0 frame:0               TX packets:0 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000                RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)               Interrupt:47           lo        Link encap:Local Loopback                 inet addr:127.0.0.1  Mask:255.0.0.0               UP LOOPBACK RUNNING  MTU:16436  Metric:1               RX packets:169 errors:0 dropped:0 overruns:0 frame:0               TX packets:169 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:0                RX bytes:13189 (12.8 Kb)  TX bytes:13189 (12.8 Kb)          wlan0     Link encap:Ethernet  HWaddr XX:XX:XX:XX:XX:XX               inet addr:192.168.9.107  Bcast:192.168.9.255  Mask:255.255.255.0               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:76455 errors:0 dropped:0 overruns:0 frame:0               TX packets:82766 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000                RX bytes:53583517 (51.1 Mb)  TX bytes:13182981 (12.5 Mb)      I suppose, that the problem is related with settings of gateway, but I'm layman in this subject (Computer Network). This suggestion is due to my Google's investigation.


How to change the Xorg gamma/brightness?

I'm trying to play a game (Deus Ex) which I have to modify the brightness since it is very dark in my ambiance. The game has a "Brightness" setting, but lately it doesn't work. I tried to figure out how to change it and find out that `xgamma` do a similar effect with `xgamma -gamma 5`. But whenever I change it, the settings revert back after almost a second (so yeah, my screen light up then shuts down). How can I either, make the `xgamma` settings permanent (or persistent) or I have to use another tool? My system is a desktop. Seemsly `xrandr --output DVI-0 --brightness 2` do the same, but still reverts back to 0 whenever I apply the settings. Each time I _try_ to change it the following output fill the `Xorg.0.log` file:               [ 14768.313] (II) RADEON(0): EDID vendor "HWP", prod id 9798     [ 14768.313] (II) RADEON(0): Using hsync ranges from config file     [ 14768.313] (II) RADEON(0): Using vrefresh ranges from config file     [ 14768.313] (II) RADEON(0): Printing DDC gathered Modelines:     [ 14768.313] (II) RADEON(0): Modeline "1024x768"x0.0   65.00  1024 1048 1184 1344  768 771 777 806 -hsync -vsync (48.4 kHz eP)     [ 14768.313] (II) RADEON(0): Modeline "800x600"x0.0   40.00  800 840 968 1056  600 601 605 628 +hsync +vsync (37.9 kHz e)     [ 14768.313] (II) RADEON(0): Modeline "640x480"x0.0   31.50  640 656 720 840  480 481 484 500 -hsync -vsync (37.5 kHz e)     [ 14768.313] (II) RADEON(0): Modeline "640x480"x0.0   31.50  640 664 704 832  480 489 492 520 -hsync -vsync (37.9 kHz e)     [ 14768.313] (II) RADEON(0): Modeline "640x480"x0.0   25.18  640 656 752 800  480 490 492 525 -hsync -vsync (31.5 kHz e)     [ 14768.313] (II) RADEON(0): Modeline "720x400"x0.0   28.32  720 738 846 900  400 412 414 449 -hsync +vsync (31.5 kHz e)     [ 14768.313] (II) RADEON(0): Modeline "1024x768"x0.0   78.75  1024 1040 1136 1312  768 769 772 800 +hsync +vsync (60.0 kHz e)     [ 14768.313] (II) RADEON(0): Modeline "1024x768"x0.0   75.00  1024 1048 1184 1328  768 771 777 806 -hsync -vsync (56.5 kHz e)     [ 14768.313] (II) RADEON(0): Modeline "832x624"x0.0   57.28  832 864 928 1152  624 625 628 667 -hsync -vsync (49.7 kHz e)     [ 14768.313] (II) RADEON(0): Modeline "800x600"x0.0   49.50  800 816 896 1056  600 601 604 625 +hsync +vsync (46.9 kHz e)     [ 14768.313] (II) RADEON(0): Modeline "800x600"x0.0   50.00  800 856 976 1040  600 637 643 666 +hsync +vsync (48.1 kHz e)      So, apparently my monitor gets redetected each time.


How to know free disk size witout df command?

Is it possible to check free disk size in Linux **without using command lines such as`df`**? Since my host machine is embedded Linux, there are no direct command lines that show free disk size.


How to host a website on personal computer

I want to start hosting my website at my own computer as well websites of my friends too (say mini hosting platform). I learned Debian, Bind9 and Apache for this purpose. On my system everything is going well. Even my IP opens up my website from outside my network. But my domain (say, `abx.com`) does not show my website. How can I set things up so that `abx.com` points to my website?


How do I install Slax to a usb stick?

I want to install Slax on my usb stick, but I just can't get it to work. I tried copying the contents of the .zip file to the usb stick, and I got to some grub rescue thingy. I also tried Unetbootin, but it couldn't download the iso itself, and when I downloaded the iso manually, it couldn't find the /slax files. How do I get it working?


mv: cannot stat No such file or directory in shell script

I wrote a script to move some files form one folder to another folder but I got the following error, I checked 2 folders and notice for 1 folder there are such files and another there is no such files, but why all of them shows "mv cannot stat No such files or directory"                   mv: cannot stat `/home/esolve/project/capture/tcp_50x50/dest_folder/194.199.68.165_tcp.folder/data/*': No such file or directory         mv: cannot stat `/home/esolve/project/capture/tcp_50x50/dest_folder/194.42.17.124_tcp.folder/data/*': No such file or directory         mv: cannot stat `/home/esolve/project/capture/tcp_50x50/dest_folder/195.113.161.13_tcp.folder/data/*': No such file or directory         mv: cannot stat `/home/esolve/project/capture/tcp_50x50/dest_folder/203.159.127.3_tcp.folder/data/*': No such file or directory         mv: cannot stat `/home/esolve/project/capture/tcp_50x50/dest_folder/212.199.61.205_tcp.folder/data/*': No such file or directory         mv: cannot stat `/home/esolve/project/capture/tcp_50x50/dest_folder/212.51.218.235_tcp.folder/data/*': No such file or directory         mv: cannot stat `/home/esolve/project/capture/tcp_50x50/dest_folder/213.73.40.105_tcp.folder/data/*': No such file or directory         mv: cannot stat `/home/esolve/project/capture/tcp_50x50/dest_folder/41.225.7.4_tcp.folder/data/*': No such file or directory         mv: cannot stat `/home/esolve/project/capture/tcp_50x50/dest_folder/83.230.127.122_tcp.folder/data/*': No such file or directory         [esolve@kitty tcp_50x50]$ ls /home/wgong/project/capture/tcp_50x50/dest_folder/194.199.68.165_tcp.folder/         [esolve@kitty tcp_50x50]$ ls /home/wgong/project/capture/tcp_50x50/dest_folder/203.159.127.3_tcp.folder/data/         129.88.70.226   132.187.230.1    138.96.116.22   155.185.54.250   192.38.109.144  193.136.227.163  193.175.135.61  195.113.161.13  83.230.127.122         130.104.72.200  132.227.62.122   147.83.29.232   156.17.10.52     192.42.43.22    193.137.173.218  193.205.215.74  212.199.61.205         131.130.69.164  132.252.152.194  148.81.140.193  157.181.175.249  192.43.193.71   193.144.21.131   193.226.19.30   212.51.218.235         131.188.44.102  134.151.255.180  152.66.245.162  160.78.253.31    193.1.170.136   193.145.46.243   194.199.68.165  213.73.40.105         131.254.208.10  138.48.3.203     152.81.47.4     192.114.4.3      193.136.166.56  193.166.160.98   194.42.17.124   41.225.7.4      the script is :                   list=`ls dest_folder`         cd dest_folder         cwd=`pwd`         for folder in $list;do                 mv ${cwd}/${folder}'/data/*' ${cwd}/${folder}         done      I ran it in `/home/esolve/project/capture/tcp_50x50/`


What does ampersand mean at the end of a shell script line?

sh sys-snap.sh &      What is `sh`? What is `sys-snap.sh`? Why I should put `&` at the end of the line? Can anyone explain the syntax? Without the `&` the script won't go back to the prompt till I press `Ctrl`+`C`. With `&` I can press enter and it works.


Custom autocomplete: deal with spaces in filenames

A bit of context, this question is a follow-up of this one: Bash remote autocompletion : change the 'starting' directory Anyway, I'm writing my custom autocompletion bash script: I want the autocompletion to work just like `cd` does, except that I want to get the names from a specific directory, not necessarily the current one. It works great except when filenames have spaces in them. A quick example. Let's say the directory I'm getting the names from has two files in it: `a_file` and `another file` (notice the space). This happens: `my_command``TAB``TAB`   `a_file` `file` `another` The presentation isn't perfect but the idea is that I'm prompted with 3 choices, `another file` being split in `another` and `file`. The desired output would be: `file_1` `another file`. I would also like spaces to be escaped automatically: `my_command ano``TAB`   `my_command another\ file` Here's what my script looks like:               #!/bin/bash          _get_file_list()     {         dir="/some/path/"         cd $dir         find * -maxdepth 0     }          _GetOptMyCommand()     {         local cur              COMPREPLY=()         cur=${COMP_WORDS[COMP_CWORD]}              case "$cur" in         -*)             COMPREPLY=( $( compgen -W "-h -l --help --list --" -- "$cur" ) );;         *)             COMPREPLY=( $( compgen -W "$(_get_file_list)" -- "$cur" ) );;         esac              return 0     }          complete -F _GetOptMyCommand my_command      How do I deal with spaces in filenames and make my autocompletion script like `cd` ?


Passing quotes and full strings to bash -c or zsh -c

When I am in Perl and I call `system(some_command)`, this invokes `some_command` on `/bin/sh`. I would like it instead to run `some_command` in another shell such as `bash` or `zsh`. One way of running commands on `zsh` or `bash` from `sh` is to call `zsh -c '<command>'`. The idea would be to pass this to `system()`, but this requires using single quotes around `<command>`. But what if `<command>` already has quotes in it? How do I pass it to `zsh -c`? For example:               find . -name 'something*.txt'      The example above is just for illustrative purpose. Another example would be when I need to pass something with quotes to a binary that I want to invoke from `bash` or `zsh`.


What is Fedora's equivalent of deborphan?

An installed library that has no installed packages depending on it is referred to as **orphaned**. One of the tools used to determine which libraries are orphaned on a Debian system is named deborphan. What is the Fedora equivalent?


Screen, remote login failure, and disappearing text

When in a screen session via ssh, if I attempt to connect to another host via scp or ssh and the auth fails, any subsequent text I type in the terminal will not be displayed, however it is being entered and can be executed. > [user@host Oracle]$ scp user2@host2:/path/to/files .   >  user2@host2's password:   >  Permission denied, please try again.   >  user2@host2's password:   >  [user@host Oracle]$   >  [user@host Oracle]$   >  [user@host Oracle]$   >  [user@host Oracle]$   >  [user@host Oracle]$ [user@host ~]$ [user@host ~]$ What you can't see above is that I did 'cd' on the last line. It executed but output stays on the same line. ^C will give me a new line. Is there a way to recover without losing my screen session?


Difference between poll_s and ep_poll WCHAN in ps output

When I issue `ps -elf|grep python` for example on my system, I see these:               1 S 1000      6020  6008  0  80   0 -  9914 poll_s Jul12 ?        00:00:01     python manage.py run_gunicorn -t 3600 -w 8 -b 127.0.0.1:8000     0 S 1000     22496 22491  0  80   0 - 10477 ep_pol 12:32 ?        00:00:10     /var/lib/mywebapp/env/bin/python /var/lib/mywebapp/env/bin/pserve development.ini      What is the difference between `poll_s` and `ep_pol`?


Linking Intel RAID 5 partitions to boot disk

I have a 5-disk Intel RAID 5 along with a 6th boot disk with /, /boot, and swap. What I was planning to do was mount the Intel RAID partitions (which I've added with fdisk) so that the 6th disk /home, /var, /srv, etc. link to the RAID on the other 5 disks. So far, my attempts at doing this have failed (editing fstab, trying to mount the /dev/dm-* partitions manually, etc.) have failed. Does anyone have experience in this and can point me in the right direction? Edit: I have the RAID array partitioned so that I can mount each partition as a folder on the boot disk, i.e. RAID /dev/dm-0 -> bootdisk /home.


Batch importing .sql files

I have a bunch of .sql files in a directory that I need to import. Although I can do it manually, for scripting purposes I need to be able to apply them in bulk. How can I do that though? What combination of options and commands do I need? The mysqlimport command goes like this:               mysqlimport [options] db_name textfile1 [textfile2 ...]      I need to be able to add all the text files to the end. I would prefer a command than a convoluted for loop if possible. Any suggestions?


Why do newlines mess up my while condition?

I have a while loop that allows setting variables when written one way but does not allow it when written another way. Why is that? This prints var as 1234 and does not print var2               #!/bin/bash          var=1234          while var=9876 var2=765 read line     do              echo $var $var2         echo $line          done <datafile          echo out of loop $var      This prints var as 9876 and also prints var2               #!/bin/bash          var=1234          while      var=9876      var2=765      read line     do              echo $var $var2         echo $line          done <datafile          echo out of loop $var


using scp command to transfer files keeping the same names intact?

Using `scp` command I want to move files from local system to a remote system. I'm doing something like this:               $ scp file1 root@abc:root /root/tmp      With this command I'm able to upload `file1` to `abc:/root`, but the problem is that it changes the names to `tmp` like in my case, I want to keep the name the same as the original and just copy it to the folder. How can I do this?


SWF to PDF conversion

Are there any tools for converting SWF to PDF? I have a bunch of SWF files (to be ripped from the web) and I'd like to group them into single PDF.


Linux compatible motherboard

Where can I find a list with Linux compatible motherboards. I want all features of the motherboard to work reasonably well with latest valilla Linux kernel (ie, clearly document that I need external module, and I'll decide if this module is reasonably maintained). Obviously hibernate audio and networking should work. It is important for me that it would work "out of the box", so that maintaining a few Linux boxes with this motherboard will be easy (recompiling an external kernel module from source for each major kernel upgrade is not that easy...).


wget recursive for only files that pass a regexp

I would like to use wget recursively on an ftp directory like this: ftp://ftp.ensembl.org/pub/current_fasta/ Which contains another 2 directory levels inside, the first with the species name, and one inside with the name `dna`, like this: ftp://ftp.ensembl.org/pub/current_fasta/species_name/dna/ For example, one of them has the species_name `homo_sapiens`: ftp://ftp.ensembl.org/pub/current_fasta/homo_sapiens/dna/ Inside each `./dna/` directory, I would like to download only the file with the name containing the word `toplevel` but not the one containing the word `_rm.toplevel`. Finally, I would like a wget recursive command that would download all those from these directories, each as an output file with the name `species_name.fa.gz`, where the `species_name` is the name of the parent directory, just before `dna`. Any ideas?


Installing KDE on Ubuntu Natty from cdrom

Currently I have Ubuntu 11.04 - Natty, with Unity as the default environment; but I just want to install KDE along-side it, and I don't have perfect bandwidth. So I took Kubuntu 11.04 cdrom from my friend and inserted it to my cdrom. After running `apt-cdrom add` it prints out this:               Using CD-ROM mount point /media/apt/     Identifying.. [ce3c168e46b345c6adc05b209f603d08-2]     Scanning disc for index files..          E: Unable to stat the mount point /media/Kubuntu\04011.04\040amd64/ - stat (2: No such file or directory)     E: Unable to stat the mount point /media/Kubuntu\04011.04\040amd64/ - stat (2: No such file or directory)      I have tested the cdrom for the infections but it was just ok. What's the problem? UPDATE: my friend just asked me to put print my `fstab` entry here. as expected, my cdrom device is not listed in it but here it is:               # /etc/fstab: static file system information.     #     # Use 'blkid -o value -s UUID' to print the universally unique identifier     # for a device; this may be used with UUID= as a more robust way to name     # devices that works even if disks are added and removed. See fstab(5).     #     # <file system> <mount point>   <type>  <options>       <dump>  <pass>     proc            /proc           proc    nodev,noexec,nosuid 0       0     # / was on /dev/sda5 during installation     UUID=d8caef34-1670-4525-a5b5-df889f62aa1e /               ext4    errors=remount-ro 0       1     # /home was on /dev/sda7 during installation     UUID=7b71d3a8-bbea-477e-8b04-0c9651d0e12e /home           ext4    defaults        0       2     # /windows was on /dev/sda3 during installation     UUID=CC523DE8523DD7C2 /windows        ntfs    defaults,umask=007,gid=46 0       0     # swap was on /dev/sda6 during installation     UUID=3a281560-f3aa-4795-b396-0810e1eb15e2 none            swap    sw              0       0


Why does a new directory have a hard link count of 2 before anything is added to it?

Say I just create directory newDirectory and then I do ls -ld command. I see that the number of hard links is 2. What exactly makes the hard link 2 from the start? Also is the number of subdirectories in the current directory equal to the number of hard links - 2?


.bashrc execute command after "/bin/bash --login"

I have this alias in my .bashrc:               alias s='cd ~/Documents/projects/s && /bin/bash --login && rvm use ruby-1.9'      How can I execute the right part after it enters login shell (/bin/bash --login)?


Does git contain information about used id / group id changes?

I have googling awhile, but can not find such information. Looks like git doesn't contain users and groups, only permissions. Am I right?


Why $JAVA_HOME does not persist on a mac?

On my mac os 10.6.6 I'm trying to persist env variable $JAVA_HOME but it doesn't stick!               $ export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home      Once I restart it won't be set anymore. The GUI way to do that is to use the Property List Editor as documented by Apple and on SO. However, after a restart:               $ echo $JAVA_HOME          $


Bonds vs. Aggregators

I'm almost to the point where I can post the solution I wound up with for my complex port bonding question. However, in reading the bonding.txt file, I see this option text:               ad_select          Specifies the 802.3ad aggregation selection logic to use.  The possible values and their effects are:            stable or 0              The active aggregator is chosen by largest aggregate bandwidth.              Reselection of the active aggregator occurs only when all slaves of the active aggregator are down or the active aggregator has no slaves.              This is the default value.            bandwidth or 1              The active aggregator is chosen by largest aggregate bandwidth. Reselection occurs if:                 - A slave is added to or removed from the bond                - Any slave's link state changes                - Any slave's 802.3ad association state changes                - The bond's administrative state changes to up            count or 2              The active aggregator is chosen by the largest number of ports (slaves). Reselection occurs as described under the "bandwidth" setting, above.      The way this is written, I can't tell if a single bond can contain more than one aggregator, or not! If the bonding module is smart enough to sort out more than one aggregation within a bond, I'm golden! Let me simplify my drawing from over there:               ____________ eth1   ________   eth2 ____________     | switch 1 |========| host |--------| switch 2 |     ------------ eth3   --------        ------------      These switches do not do 802.3ad across switches. So, if I put all three interfaces into a single 802.3ad bond, do I get two aggregators? One containing eth1 & eth3, the other just holding eth2? Conceivably, the LACP signals between the host and the switches would be enough to do that. I just don't know if that capability is actually built in. Anyone? Anyone? Can I get two aggregators out of a single interface bond?


How can i get the process with the biggest pid?

How can I get the process with the biggest pid using `ps`?


777'd some files. How do I repair SSH?

So I'm messing around on a test server and accidentally ran the following (which resulting in SSH breaking):               # chmod -R 777 /var      Because it's a test server, I'd rather not re-install right now, I have things I would like to test. I understand that `777` is very bad set of mode bits on a live server, and so I already understand that it would be a very bad thing to do on a server with anything valuable on it. Is there anyway to get SSH functioning again?


nc -l in background closes immediately (nc -l 1234 &)

When I put this               nc -l 12345 >nc_out      in a shell script, run it and then connect from other shell using telnet, it allows me to type some text and have it end up in _nc_out_. But if I start nc in the background (I want to start telnet from the same script later on):               nc -l 12345 >nc_out &      connection is closed immediately:               # telnet localhost 12345     Trying ::1...     telnet: connect to address ::1: Connection refused     Trying 127.0.0.1...     Connected to localhost.     Escape character is '^]'.     Connection closed by foreign host     #      leaving the nc_out file empty. Why is that? How can I make nc accept connection normally? * * * Notes:   * On RHEL and Fedora, both _nc_ and _nmap-ncat_ behave this way, but Debian's _nc-traditional_ does accept the connection and let me save the data to nc_out.   * It does not matter if I call telnet from the same script or different (SSH) session, the behavior is the same


Red Hat with rpc.statd is not running and can't start nfslock

I try to mount from Linux machine to some folder on a Windows machine. From the output I see that mount complains about `rpc.statd`. So I tried to start the `nfslock` but I got `FAILED`. Then I look on the `nfslock` script and I see that its failed on the command:                pidof -c -o 1949 -o 1626 -o %PPID -x rpc.statd      This command should return some process ID, but this command does not print any process ID. So how to start `nfslock`?                /etc/init.d]#  mount 10.15.22.21:/work11/AAPL /mnt           mount.nfs: rpc.statd is not running but is required for remote locking.      mount.nfs: Either use '-o nolock' to keep locks local, or start statd.      mount.nfs: an incorrect mount option was specified           /etc/init.d]# ./nfslock start      Starting NFS statd:                                        [FAILED]           /etc/init.d]#  pidof -c -o 1949 -o 1626 -o %PPID -x rpc.statd      /etc/init.d]# echo $?      1


Why does `exit &` not work?

I don't understand why `exit &` does not work. Why does it not?


VMware Player update filled up half of 27.5 GB disk. I need to find files and delete them

I installed VMware-Player-3.1.6-744570.i386 on Ubuntu 11.4. The 27.5 GB disk was about 45% full. I then used VMware-Player to form a virtual machine for Centos, using ISO files for CentOS-6.5-i386. I had done this on an old laptop, that also had Ubuntu 11.4 installed, and centos ran fine in the VM. However, in both cases, when I installed centos VMware-Player asked me if I wanted to install an update. It was taking too long on the old laptop, which tends to overheat so I declined to do so on the laptop. However, I decided to let the update run overnight on the desktop. When I came down in the morning, the update was still running and there was only 1.5 GB left on the HD. I used the disk usage analyzer and found that most of the disk space being used was in mu home directory. However, when I went to my home directory and ran               sudo du | sort -n      the only recently update directory with heavy disk usage was the directory with centos ISOs and it was only taking up 4.8 GB.


How to deduce the right target for a GCC cross-build?

I have a 32 bit x86 machine where Debian is up and running with this properties   * `uname -r` is `3.2.0-4-486` and    * `uname -m` is `i586` in this situation i have to pick the right `HOST` and `TARGET` prefix so I will be able to cross compile gcc on another machine for this Debian installation. I should pick `i486` or `i586` ? I already tried `i686` but apparently it doesn't work at all ( gcc compiles and runs, it's the gcc/g++ compiler that doesn't find the headers on the machine using the `i686` prefix ).


chkrootkit throws Signal 13 when searching through /var/tmp

On my debian squeeze server in the chkrootkit log I get loads of these errors:               /usr/bin/find: Prozeß "head" wurde durch das Signal 13 abgebrochen.     /usr/bin/find: Prozeß "head" wurde durch das Signal 13 abgebrochen.      which means               head terminated by signal 13      A google search gives a lot of same problems, but no solution. It comes from these lines in `/usr/sbin/chkrootkit`:               if [ `echo abc | head -n 1` = "abc" ]; then           fileshead="`${find} ${ROOTDIR}tmp ${ROOTDIR}var/tmp ${findargs} -type f -exec head -n 1 {} \; | $egrep '#!.*php' 2> /dev/null`"     else           fileshead="`${find} ${ROOTDIR}tmp ${ROOTDIR}var/tmp ${findargs} -type f -exec head -1 {} \; | grep '#!.*php' 2> /dev/null`"     fi      when I enter directly as root:               /usr/bin/find /var/tmp -type f -exec head -1 {} \; | grep php 2> /dev/null;date      I get the same errors. `egrep` instead makes no difference.


Local disc copy at 10MB/s! What could be the problem?

I am running a Debian 6.0.6 (before you ask). I have a regular desktop computer, nothing fancy... but when I copy a file using nautilus I am getting 10MB/s copy speed and the system is completely stuck! I did some reading and executed `hdparm -tT /dev/sda` with the following output:               /dev/sda:      Timing cached reads:   2428 MB in  2.00 seconds = 1214.07 MB/sec      Timing buffered disk reads: 274 MB in  3.01 seconds =  91.05 MB/sec      So in theory my dist is a lot faster, but in reality it is working very slow. Any ideas what could be the problem? or at least how to search for clues? More information:   * I've got 4GB of RAM, and I'm not running much except Chrome which seems to take half of my ram.    * I'm copying a file from the filesystem to the same filesystem in the same drive   * my filesystem is `ext3` **Update** I added results from running `iostat -kxdN 5` while copying to an external disk. In this case I get speeds of up to 20MB/sec, much better than local dist copy:               Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await  svctm  %util     sda               4.20     6.80  265.40    2.40 26632.00    36.80   199.17     1.15    4.35   1.75  46.80     sdb               0.00  6532.00    0.00  226.20     0.00 27009.60   238.81    89.52  395.26   3.67  83.04          Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await  svctm  %util     sda               1.60     3.60  230.80    1.60 26431.20    20.80   227.64     0.64    2.76   1.74  40.40     sdb              12.20  6160.00    0.60  216.80    51.20 25878.40   238.54    87.67  403.41   3.79  82.40      Anything I can learn from these numbers?


Send stdin to console and compressed file

I'm running a propietary program which generates text output. Kind of like a logger.               logger      I'd like to both view this output on the terminal to watch the server breathe, and send it to a text file. So normally I'd do:               logger | tee /tmp/log.txt      But these log files can become large enough to overwhelm my VMs disk space. Instead of sending the text to an uncompressed text file, I'd like it to be compressed immediately. So I might do:               logger      in one terminal and               logger | gzip > /tmp/log.gz      in another terminal. But this doesn't feel very *nixy. Is there a way I can accomplish this in one command, similar to using `tee`? Here is what I'm going for, which obviously won't work, but maybe you'll get the idea:               logger | tee gzip > /tmp/log.txt


Substitute text with sed and keep part of the original text

I am trying to convert               <id>1</id>     <Name>ENTERPRISE RESOURCE PLANNING</Name>      to:               <column name="id">1</column>     <column name="Name">ENTERPRISE RESOURCE PLANNING</column>      I am assuming the best tool for the job would be `sed`, however I can't figure out how to keep parts of the original text in the replace part. If I do:               $ sed -i 's/<.*>.*<.*>/<column name="\\1">\\2<\/column>/g' filename.xml      The output is:               <column name="\1">\2</column>     <column name="\1">\2</column>      Or doing similar from within `vi`, it outputs:               <column name=""></column>     <column name=""></column>      How can I make it so that `\1` and `\2` are substituted back to their original values?


Can I use 2 WANs on DD-WRT?

I bought TL-WR1043ND and flashed it with DD-WRT. Now Im wondering if it's possible to use physical WAN port and wireless client WAN for internet usage and at the same time broadcast SSID for wired and wireless clients to share files? Here's a quick mockup in Paint: ![Network map made in paint](http://hostogo.com/image-1EF8_4E70E961.jpg)


make fatal error: openssl/sha.h: No such file or directory

I'm trying to compile a program that, according to the documentation, requires the "OpenSSL library". I have OpenSSL installed, and it's still giving me the error `openssl/sha.h: No such file or directory`. Is there some other library that has to be installed?


Asking rsync to transfer files without connecting to the remote rsync server?

If I understand correctly, `rsync` tries to connect to a remote `rsync` server when transferring files via `-e ssh`. This worked well for me most of the time, but I am having problems rsyncing with a particular server. If I verbose the transfer:               rsync -ar --verbose --progress source_file -e ssh server:dest_file      I see the following:               opening connection using: ssh server rsync --server -vvlogDtpre.iLsf .       and it stands there, forever. I should note that I can manually ssh into that machine with no problem. In case it matters, I have a `ControlMaster` set up for this connection in my ssh config file, i.e.:               ControlMaster auto     ControlPath ~/.ssh/%r@%h:%p      This made me think about two questions:   1. Why can't rsync connect to this particular server?   2. Is there a way to force rsync to act like scp (and skip connecting to the remote rsync server)?


How Can I Change the Default arguments to gcc When I run Make "filename"

Forgive me if I posted this in the wrong Stack. Every time I run make for a file without any Makefiles in the directory, make still works and compiles the source code but only with the arguments: `gcc filename.c -o filename` For example, if I enter `make test` with test.c in the directory, it does : `gcc test.c -o test` I wish to change this, so that ever time I run make without a Makefile, it will instead do : `gcc -ggdb -std=c99 -Wall -Werror -o filename filename.c -lcs50 -lm` I also which that this change becomes permanent and does not change regardless if I restart or change directories. I'm currently running Crunchbang Weezy on an AMD 64bit processor.


What's the difference between 32 and 64 bit linux?

What exactly are the implications? Can a 32 bit linux run applications that are compiled as 64 bit? Or vice versa? I just got a new machine with an i5 processor, I installed a copy of Ubuntu 10.10 which seems to be i686 which I new realize is 32 bit, but I think I have some 64 bit apps installed. Can this be right?


How to change boot logo in linux mint

I want to change my linux mint cinnamon 17 boot image manually, so I replaced the image: /lib/plymouth/themes/mint-logo/logo.png with mine.   The logo changes at shutdown but not at boot... Any help?


Sharing bandwidth between IPs

There are 200 users in my network, and these users are in two AD groups and cannot set specific IP ranges for each group. I want to set, for each group, the amount of bandwidth that can be shared between users of groups. I can manage bandwidth for a IP with squid, and also with iptables+tc, but I want to set bandwidth for groups of IPs that share between users of that. How can I do that?


Connection refused - connect(2)

I have set SMTP settings in both `config/environments/production.rb` and `development.rb` also i have added the settings in `config/initializers/setup_mail.rb`:               config.action_mailer.default_url_options = { :host => 'ipaddress' }     config.action_mailer.delivery_method = :smtp     config.action_mailer.smtp_settings = {       :address              => 'smtp.gmail.com',       :port                 => 587,       :domain               => 'gmail.com',       :user_name            => 'EMAIL_ADDRESS@gmail.com',       :password             => 'pass',       :authentication       => :plain,       :enable_starttls_auto => true,       :openssl_verify_mode  => 'none'     }      `config/initializers/setup_mail.rb`:               ActionMailer::Base.smtp_settings = {        :address              => 'smtp.gmail.com',       :port                 => 587,       :domain               => 'gmail.com',       :user_name            => 'EMAIL_ADDRESS@gmail.com',       :password             => 'pass',       :authentication       => :plain,       :enable_starttls_auto => true,       :openssl_verify_mode  => 'none'     }           ActionMailer::Base.default_url_options[:host] = "ipaddress"       I am getting the error `Connection refused - connect(2)` while I have working in localhost with below configuration I haven’t get any error and also mail has been sent. config/initializers/setup_mail.rb (localhost)               ActionMailer::Base.smtp_settings = {        :address              => 'smtp.gmail.com',       :port                 => 587,       :domain               => 'localhost',       :user_name            => 'EMAIL_ADDRESS@gmail.com',       :password             => 'pass',       :authentication       => 'plain',       :enable_starttls_auto => true     }           ActionMailer::Base.default_url_options[:host] = "localhost:3000"       controller               def sendResume     @name =params[:name]     @email_id = params[:email_id]     @mob_no = params[:ph_no]     @country = params[:country]     @qualification = params[:qualification]     @if_back_papers = params[:if_back_papers]     @back_papers_count = params[:back_papers_count]     @highest_education_percent = params[:highest_education_percent]     @twelve_percent = params[:twelve_percent]     @ten_percent = params[:ten_percent]     @yr_exp = params[:yr_exp]     attachments = params[:resume]     if simple_captcha_valid?      if params[:resume]         filename=attachments.original_filename          extname = File.extname(filename)[1..-1]         mime_type = Mime::Type.lookup_by_extension(extname)         content_type = mime_type.to_s unless mime_type.nil?             if content_type !="application/pdf"                flash[:error]= "Only pdf files are allowed"                redirect_to :action=>"careers"             else              File.open(Rails.root.join('tmp', 'uploads', attachments.original_filename), 'w') do |file|               re = attachments.read               file.write(re.force_encoding("utf-8"))               @attached_path = file.path             end             begin               ResumeMailer.sendResume(@name, @email_id, @mob_no, @country, @qualification, @if_back_papers, @back_papers_count, @highest_education_percent, @twelve_percent, @ten_percent, @yr_exp, @attached_path, attachments.original_filename ).deliver               flash[:notice] = "Your resume has been submitted successfully"               redirect_to :action=>"careers"             rescue Exception => e               puts e.message               logger.warn "error sending mail"               flash[:error]= "Error in submitting resume"               redirect_to :action=>"careers"             end          end         else           flash[:error]= "Please upload your resume"           redirect_to :action=>"careers"         end     else       flash[:error]= "Incorrect captcha"       redirect_to :action=>"careers"     end     end      In console mode the mails are sendind without error in graphical mode (in browser) I am getting the error `Connection refused - connect(2)`. What is wrong in my live code?


alternative for digest -a sha256 command from solaris in linux

I have file from solaris which have digest -a sha256. But this command is not working in linux. I want the alternative for this command.


XML modify and writing to file beautiful soup

I am using python beautiful soup to parse an XML file and write it to a different file after deletion of certain tags. But, using soup.prettify changes other XML namespaces and attribute names. f = open('new.xml',"w"); f.write(soup.prettify(formatter="xml")); f.close(); The changes are as given in sample below. Original XML file.               <draw:control text:anchor-type="paragraph" draw:z-index="1" draw:style-name="gr1" draw:text-style-name="P2" svg:width="2.805cm" svg:height="1.853cm" svg:x="3.602cm" svg:y="0.824cm" draw:control="control2"/>      New XML file written from soup.prettify.                 <draw:control draw:control="control2" draw:style-name="gr1" draw:text-style-name="P2" draw:z-index="1" svg:height="1.853cm" svg:width="2.805cm" svg:x="3.602cm" svg:y="0.824cm" text:anchor-type="paragraph"/>      I tried adding utf-8 to prettify(). But, its the same problem. Is there any other method to delete a particular tag based on searching and keep all the other XML contents in the file in tact? Please suggest.


ifconfig shows only lo

I'm a beginner using Debian. I've just installed Debian 7.5.0 amd netinst. Actually I am trying to install the firmware through aptitude install firmware-linux-nonfree When I executed ifconfig and ifconfig -a, the output indicates only the loopback no eth0 interface. However the Ethernet card and WLAN card are pretty detected, I checked it through lspci and both cards appear. I edited /etc/network/interfacesl by adding DHCP but it was in vain. Please, could anybody help me?


"Ungrep" - which patterns aren't matched

I'm looking for a command or script to do the following - given: file1.txt:               abcd     efgh      ijkl     mnop      file2.txt:               123abcd123     123efgh123     123mnop123      I want a command that does something like this:               ungrep file1.txt file2.txt      and returns the following:               ijkl      In other words it is giving me the lines in file1.txt that will not return any results on a grep of file2.txt. I know that I can do this by iterating through file1.txt, grepping file2.txt for each line and storing the result, and outputting any lines where the result is empty, but I was hoping for a more efficient way to do this.


Error mounting shared folder for KVM Solaris guest

Followed this guide on how to set up a shared folder between a KVM Host(Ubuntu 12.04) and Guest (Solaris 10 Sparc). On the last part of the it requires you to mount the shared folder and typed in this command.               mkdir /mnt/shared     mount -t 9p -o trans=virtio /hostshare /mnt/shared      But i got an error:               mount: wrong fs type, bad option, bad superblock on /hostshare,            missing codepage or helper program, or other error            (for several filesystems (e.g. nfs, cifs) you might            need a /sbin/mount.<type> helper program)            In some cases useful info is found in syslog - try            dmesg | tail  or so      Any ideas on how to fixed this?


crontab exclude specific date only

How can I write a cron that will exclude a specific date. let say : I need to run a crontab 6pm to 9pm in every 30 min on weekends and want to exclude 10th may 2014 only. Is It possible? How can I write this? or is any alternative for this? please suggest.


Displays and their relative position in a shell script

I want to get information about the displays, something like `xrandr`, but with more info. I want to know their position. So if I have two or more displays connected I want to know how they are related to each other. If we are using the displays as an extending and not as a duplicate. With a shell command I want to know If I have any display to the left, right, up or down. Is there something similar? Or at least a command where I give the id of the display and it tells me if I have another display in any direction?


Why does LD keep outputting "no version information available"

On every loading of a lib, I get the error: > no version information available This lib has been compiled on another PC (ubuntu 10.04) than the one running it (mandriva 2010.2).               $ ldd /usr/local/gnu-eabi-4.5.2/i686-pc-linux-gnu/arm-eabi/lib/libbfd-2.21.so     /usr/local/gnu-eabi-4.5.2/i686-pc-linux-gnu/arm-eabi/lib/libbfd-2.21.so: /lib/libz.so.1: no version information available (required by /usr/local/gnu-eabi-4.5.2/i686-pc-linux-gnu/arm-eabi/lib/libbfd-2.21.so)      linux-gate.so.1 =>  (0xffffe000)      libz.so.1 => /lib/libz.so.1 (0xb77a7000)      libc.so.6 => /lib/i686/libc.so.6 (0xb7655000)      /lib/ld-linux.so.2 (0xb787a000)      Edit: the workaround didn't work.


store command before pressing ctrl+c, revive afterwards

Sometimes I type a lengthy command in my command prompt and then notice that I need to check something before actually pressing return and executing the command. I press `ctrl+c`, execute the new command and then type the cancelled command again and execute it. Is there a way to "save" the command I am to cancel with `ctrl+c` and restore it later when I finished the "check something" command? Note that I do not want to open another terminal, because I am on a remote server via ssh. Shellshot:               $ git commit -am 'FOO-123: fix issue with dorks around bars'^C     $ git status     # On branch foo     modified: foo.php     $ git commit -am 'FOO-123: fix issue with dorks around bars'     1 file changed, 46 deletions(-)     $


How to save current command on zsh?

I am typing a command, I remember I have to check something, if I press `Ctrl`+`U` the command disappears and I can type something else, but then the command I was typing is not in the history. Is there a way to recover that command, or a different shortcut that I can press to save somewhere the command?


How to save a command you entered without executing it?

Every Linux user has experienced this annoying thing: you begin typing a long and boring command, then realise you should have executed another one before. How to save the first one to execute it later? ### Example You begin typing               mycommand -a -F --conf /very/long/path --and /another/one /input/file.txt      But before pressing "Enter", you realise you should've done `cp f.txt /input/file.txt` at first. So, you're stuck with your command, and if you don't press `Enter` you won't be able to have it back using your bash history. What's the best way to handle this?


Any options to replace GNU coreutils on Linux?

I've been thinking about discontinuing the use of GNU Coreutils on my Linux systems, but to be honest, unlike many other GNU components, I can't think of any alternatives _(on Linux)_. What alternatives are there to GNU coreutils? will I need more than one package? Links to the project are a must, bonus points for naming distro packages. Also please don't suggest things unless you _know_ they work on Linux, and can reference instructions. I doubt I'll be switching kernels soon, and I'm much too lazy for anything much beyond a straightforward `./configure; make; make install`. I'm certainly not going to hack C for it. _**warning:** if you're distro uses coreutils removing them could break the way your distro functions. However not having them be first in your `$PATH` shouldn't break things, as most scripts should use absolute paths._


GTK::Socket and Gtk::Plug unexpected behaviour under Gnome and FVWM2

The following code works fine if run within FVWM2. But if you change desktop to Gnome, then the embedded window is destroyed instead of being embedded. **Why is that?** What am I missing?... The code follows but basically all it does is fork. In the child, we create a VPython window an let it idle forever. In the parent, we create a GTK window, find out what the window ID of the child window is, and try to embed it vis a GTK::Socket. Note that the VPython part maybe irrelevant to this.               #!/usr/bin/env python     # -*- coding: utf-8 -*-     import subprocess     import sys     import os     import re     import time     from visual import *               def find_window_id (title):         """Gets the OpenGL window ID."""         pattern = re.compile('0x[0-9abcdef]{7}')         proc = subprocess.Popen(['xwininfo', '-name', title],                 stdout=subprocess.PIPE, stderr=subprocess.PIPE)         errors = proc.stderr.readlines()         if errors:             return None         for line in proc.stdout.readlines():             match = pattern.findall(line)             if len(match):                 return long(match[0], 16)         return None                    class Setting ():         """VPython/OpenGL class."""              def __init__ (self, w=256, h=256, title='OpenGL via VPython'):             """Initiator."""             self.width = w             self.height = h             self.title = title             self.scene = display.get_selected()              self.scene.title = self.title             self.scene.width = self.width             self.scene.height = self.height             self.sphere = sphere()                    class GTKDisplay ():              def __init__ (self, winID):             """Initiator: Draws the GTK GUI."""             import gtk             import pygtk             self.OpenGLWindowID = winID             window = gtk.Window()             window.show()             socket = gtk.Socket()             socket.show()             window.add(socket)             window.connect("destroy", lambda w: gtk.main_quit())             socket.add_id(long(self.OpenGLWindowID))             gtk.main()                    def main ():         """Main entry point."""         name = 'sphere OpenGL window'         child_pid = os.fork()         if 0 == child_pid:             sut = Setting(title=name)         else:             winID = None             while not winID:                 time.sleep(.1)                 winID = find_window_id(name)             try:                 gui = GTKDisplay(winID)             except KeyboardInterrupt, err:                 print '\nAdieu monde cruel!'               if __name__ == "__main__":         main()      _PS: Yes, this is a follow up fromthis question and this one._


system volume is changed when vlc volume is increased over 100%

When I increase my vlc sound more than 100% and after stoping or pausing vlc if I use clementine to play music the volume is same as vlc, i.e, more than 100% but in the indicator it shows whatever the previous set state, is this a bug? if so bug of vlc/clementine/gnome-shelll? using fedora 17, gnome-shell, latest vlc and clementine


Running assembly program as ring 0

I'm writing an application which reports back readings from CPU temperature sensors, and the fan speed monitor. However, according to the Intel documentation on PECI, the instructions required must be run in ring 0 mode, i.e. kernel mode, or an exception is thrown. I encountered code online to transition from protected mode to kernel mode, but none from user to kernel mode, and I read it was forbidden by the kernel. Is there a work around, hopefully that does not require patching the kernel, to allow a program initially in user mode to run as kernel mode?


Umount device after bind mounting directories: is it safe?

I have a home partition which is shared by mulitple distros on the same box. I'm using `bind` mounts from `fstab`. Each Linux install has something like this:               UUID=[...]       /mnt/data  ext4  nodev,nosuid   0 2     /mnt/data/arch   /home      none  defaults,bind  0 0     /mnt/data/files  /files     none  defaults,bind  0 0      The disadvantage is, of course, that `/mnt/data/arch` and `/mnt/data/files` are now mounted twice. On a hunch, I tried `umount /mnt/data`, which seems to work as I had hoped: according to `mount`, the device is now only mounted to `/home` and `/files`. My questions are:   1. Is this **safe** , or am I overlooking something?   2. Is it possible to get the same effect as `umount /mnt/data` using only `fstab`? Or could I do it in `rc.local`?


How to change the default filemanager of the Cinnamon desktop?

I'm running an Arch Linux machine with the cinnamon-git desktop from the Arch User Repository. The default filemanager is Nautilus, is there any way to change the default filemanager to thunar?


Use `ln` to create a missing directory

So I'm writing a small package manager, and a problem I've run into is making the symbolic links to files. It installs the package to `/usr/pkg/name-version`, and then reads a file to determine what symbolic links to make. I'm using `ln` to make the links, and I've run into a problem when trying to install the Linux API headers. I need to link the header files themselves, not the folders that contain them (so if 2 packages need to put files in the same subdirectory of include they can without screwing one package up). That problem I solved, but `ln` simply errors out if the path is incomplete, which is annoying because those directories shouldn't exist until the package is installed. Is there a flag for `ln` that will create any directories that are missing, or am I going to have to go with some convoluted bash script?


PNG viewer that can display text chunks metadata

Is there a PNG viewer that can display text chunk metadata? Ideally, I'd like a way to view arbitrary chunks.


stuck at "make install"

I'm building the kernel (3.5) from `/media/src_prog/linux-3.5/` to `/media/sda5_k/`. I've gone through the following steps:               make O=/media/sda5_k/ menuconfig     make -j2 O=/media/sda5_k/     make O=/media/sda5_k/ modules_install      And when it comes to `make O=/media/sda5_k/ install` all I get is:               [root@localhost linux-3.5]# make O=/media/sda5_k/ install     sh /media/src_prog/linux-3.5/arch/x86/boot/install.sh 3.5.0 arch/x86/boot/bzImage \         System.map "/boot"     Cannot find LILO.     [root@localhost linux-3.5]#      I also tried this manually:               cp /media/sda5_k/arch/x86/bzImage /media/sda5_k/boot/     cp /media/sda5_k/arch/x86/System.map /media/sda5_k/boot/      and repeated the `make O=/media/sda5_k/ install` but it doesn't work. I'm using Arch for compilation and boot process is done with Ubuntu's GRUB2. What do I do at this step? * * * **Edit:** fdisk:                  Device Boot      Start         End      Blocks   Id  System     /dev/sda1   *        2048    65538047    32768000   83  Linux     /dev/sda2        65538048    98306047    16384000   83  Linux     /dev/sda3        98306048   122882047    12288000   83  Linux     /dev/sda4       122882048  1953523711   915320832    5  Extended     /dev/sda5       122884096   139268095     8192000   83  Linux     /dev/sda6       139270144   204806143    32768000   83  Linux     /dev/sda7       204808192   229384191    12288000   83  Linux     /dev/sda8       229386240   245770239     8192000   83  Linux     /dev/sda9       245772288   270348287    12288000   83  Linux     /dev/sda10      270350336   319502335    24576000   83  Linux     /dev/sda11      450578432   929523711   239472640   83  Linux     /dev/sda12      929525760  1953523711   511998976   83  Linux     /dev/sda13      319504384   450576383    65536000   83  Linux      df:               Filesystem     1K-blocks     Used Available Use% Mounted on     rootfs          12245648  9913616   1717632  86% /     dev              1024756        0   1024756   0% /dev     run              1027708      328   1027380   1% /run     /dev/sda3       12245648  9913616   1717632  86% /     shm              1027708      112   1027596   1% /dev/shm     tmpfs            1027708       68   1027640   1% /tmp     /dev/sda7       12245648  1100504  10530744  10% /media/src_prog     /dev/sda5        8165804   436548   7319656   6% /media/sda5_k      **/media/src_prog/** -> Where I keep the source files **/media/sda5_k/** -> Where I want Linux Kernel to be put **/dev/sda1** -> Ubuntu **/dev/sda2** -> Old unused Ubuntu **/dev/sda3** -> Arch (here :-D) **/dev/sda1/boot** -> Boot (Ubuntu's) the one bound to MBR.


stderr over ssh -t

This sends output to STDERR, but does not propagate `Ctrl`+`C` (i.e. `Ctrl`+`C` will kill `ssh` but not the remote `sleep`):               $ ssh localhost 'sleep 100;echo foo ">&2"'      This propagates `Ctrl`+`C` (i.e. `Ctrl`+`C` will kill `ssh` and the remote `sleep`), but sends STDERR to STDOUT:               $ ssh -tt localhost 'sleep 100;echo foo ">&2"'      How can I force the second to send STDERR output to STDERR, while still propagating `Ctrl`+`C`? **Background** GNU Parallel uses 'ssh -tt' to propagate `Ctrl`+`C`. This makes it possible to kill remotely running jobs. But data sent to STDERR should continue to go to STDERR at the receiving end.


How can we make Squid do a reverse nslookup?

We all know that `access.log` file logs the access Info of Squid:               1286536351.746  41762 192.168.1.17 TCP_MISS/200 5340945 GET http://v15.lscache3.c.youtube.com/videoplayback? - DIRECT/122.160.120.150 video/x-flv     1286536351.746  41762 192.168.1.18 TCP_MISS/200 5340945 GET http://v15.lscache3.c.youtube.com/videoplayback? - DIRECT/122.160.120.150 video/x-flv      We all also know that Squid use the file `/etc/resolv.conf` to determine the DNS server it is dealing with, so if we want Squid to deal with a local DNS server we enter the local DNS server in the file `/etc/resolv.conf`. What if the local DNS server has a record like this (in its reverse zone (1.168.192.in-addr.arpa)):               $TTL 60 ; 1 minute     17          PTR Mark.     18          PTR Mike.      Can I configure Squid to do a reverse lookup (asking about the name of the IP address in the log file) and add the names to the `access.log` record, for example: I want to make this record:               1286536351.746  41762 192.168.1.17 ......      to be something like this:               1286536351.746  41762 192.168.1.17 Mark ......      How can I reach this? Can I use Squid logformats like `%>a` and `%>A` to get what I want?


How to replace a leading zero with white space in SED?

Trying to find how to replace a leading zero with white space in SED. Attempting to get day of month and replace with space to filter some data that I am screen scraping. The code I have is as follows:               DoM=$(date --date="-1 day" +"%d")     DoMSp=$(echo $DoM | sed "s/^0*/\ /g"); echo $DoMSp      But the problem is when I have a day from 1-9 instead of printing " 1" it prints "1", no matter how many "\ " I try to put in the expression.               $ DoMSp=$(echo $DoM | sed "s/^0*/\ /g"); echo $DoMSp     1          $ DoMSp=$(echo $DoM | sed "s/^0*/\ \ \ \ \ \ /g"); echo $DoMSp     1


How do I set my login avatar in MATE? (Fedora 17)

Plain old GNOME 2 had a panel applet which displayed your user long name. It had a menu option under which you could set an image to be a login avatar, and it appeared in the gdm display manager (aka login screen). Now I'm using F17 with MATE and I don't see such an option anywhere. I believe there's some package from the MATE repository I need to have to have this functionality, but which one?


What actually happens when the checksum fails for a file using btrfs?

I'm testing using btrfs on my embedded Linux system. It uses a uSD card for the rfs. This system is remotely deployed so there's no human sysadmin to take care of it. My question is what happens when the checkum fails for reading a file? Is there any way of automatically detecting this and sending a message back to my central server?


How to access and manage a large mailbox (11 GB)

I've inherited a server which on the whole has been very well maintained. There are a few oddities which are no doubt the result of some executive decision taken by "someone who is not here now". One of them is the way email is used most of the system notices are fired off as emails. This has for reasons that I'd rather not get into left the server with a large mail box which contains probably a lot of junk but also some important information as it was used as a catch all to allow for impromptu email address creation. This mailbox is just shy of 11 GB and clearly needs to be sifted through. However the scripts that are supposed to help me do that crash because of the size of the box. This is not my area of expertise and I'm really not sure what I could be doing to deal with this but all the while I wait the file gets bigger. The file is according to Webmin at `/var/spool/mail/[username]`. Trying to read it or even the list of all inboxes returns errors like this one: > HTTP/1.0 500 Perl execution failed Server: MiniServ/1.670 Date: Mon, 2 Jun > 2014 15:22:11 GMT Content-type: text/html; Charset=iso-8859-1 Connection: > close Error - Perl execution failed sdbm store returned -1, errno 22, key > "332567" at /usr/libexec/webmin/mailboxes/boxes-lib.pl line 328, line > 1213158. The server is `sendmail` and the POP3/IMAP is `dovecot`. I'm running CentOS 5.10. I have root access and the freedom to do whatever needs doing provided I do not take any of the live services down when I do it but that does not help when I'm unsure how to get into said file and deal with the mass of mail. I do not have physical access to the box but am not afraid to use PuTTY and control it that way. I thought I'd use POP3 and empty the box to a desktop PC but the connection times out because it is too big. I should have seen that coming I guess. Is there something I can use to help me get to grips with this issue?


Get URL's redirect target with curl

I would like to check where a single URL redirects. An example of that could be a link from Google's search result page (where a click always goes through Google server). Can I do that with `curl`?


Launch X11vnc server on Ubuntu remote desktop through SSH

I have a Windows computer and I am currently connected to a Ubuntu 12.04 system through SSH using CRT on my Windows computer. I would like to know the commands that I need to run from my SSH session (already connected) in order to launch X11vnc and then being able to see and fully manage from the GUI as well.


Swap root at runtime

I am developing an embedded Linux system. The system is usually installed by creating a ISO file which is written to a USB stick the board can boot from. To make the installation possible to do automatically (say, over night) I would like to be able to do the installation on the board while the old system is running. My installation has two parts: An initrd file which contains busybox and install scripts, and a .tar.gz archive that has the rest of the root file system to install.   1. The bootloader loads the kernel and points it to the initrd, and boots the kernel.   2. The initrd install scripts mounts the target drive /dev/sda, formats it, installs the bootloader, and finally copies the root file system from .tar.gz and initrd. Now I instead want to   1. Copy install.iso from host computer to target device. (No problem)   2. Do the installation steps as above. My problem is that I don't know how I should go about replacing the currently running system with my new one. I assume that the currently mounted root (/) would have to be unmounted and replaced by the initrd. But I can't seem to figure out how!


Unable to git clone over ssh

I created a bare git repository and pushed to as root. Then I ran `su myuser` and ran the following commands:               $ whoami     myuser     $ mkdir t     $ cd t     $ git clone ssh://myuser@mybox.net:1234/git3          Cloning into git3...     myuser@mybox.net's password:     fatal: '/git3' does not appear to be a git repository     fatal: The remote end hung up unexpectedly          $ git clone /home/myuser/git3     Cloning into git3...     done.      Why is ssh failing? I can clone it by using the local path, and `whoami` shows myuser -- I am not root. Just to make sure I have the addr right I wrote `ssh myuser@mybox.net -p 1234` by copy/pasting the info rather then typing it. I don't understand why ssh isn't working. I know i had it working on this remote box, but I upgraded from debian lenny to squeeze and recently I made various config changes. I don't understand why I can't use git with ssh here.


Getting text from last marker to EOF in POSIX.2

I have a text with marker lines like:               aaa     ---     bbb     ---     ccc      I need to get a text from the last marker (not inclusive) to EOF. In this case it will be               ccc      Is there an elegant way within POSIX.2? Right now i use two runs - first with nl and grep for the last occurrence with respective line number. Then i extract the line number and use `sed` to extract the chunk in question. The text segments may be quite large so i'm afraid to use some text-adding method like we add the text to a buffer, if we encounter the marker we empty the buffer, so that at EOF we have our last chunk in the buffer. Upd: 5 views for 24 hours, so i'll update the tags so incorrect ones:(


How to make dpkg faster?

Package (un)installation on a Debian system is horribly slow, partly because it works with a whole bunch of (small) files. Short of getting faster storage, how do I speed it up? I'm thinking maybe loading some highly-accessed directory onto RAM as one solution, but how do I do that? Is there a 'better' solution?


Can driver installation procedures be made into a single package?

Here is an example of the instructions for installing a Brother printer: http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/instruction_prn3.html and this just a part of the procedure... there are separate "pre-install" procedures and separate procedures for scanning and fax drivers. Couldn't the vendor produce a single package for each model of hardware that would "do everything"? If so, why don't they? And could the "community" do it for them?


Issue with graphical card on Debian 7 Wheezy

I have an issue after trying to install an Nvidia driver on my GeForce GT 630M with Debian 7 Wheezy 7.5 that seems 100% compatible with the driver. I did everything that this page told me to do. The page that I am referring is: `https://wiki.debian.org/NvidiaGraphicsDrivers` I cannot post more than two links, so... The only issue that I got when i try to run xinit is:   **_Fatal server error: No Screens Found_** I did create the file on /etc/X11/xorg.conf.d/ **20-nvidia.conf** with the entire content that was described to do put in, on the Debian webpage. I think that the problem is which display to select, on the Xorg.log.0 i have two VGA drivers which one is Intel(8086:0116) and the other is the Nvidia(10de:0de9) and the selected one is with the: **_*_**. They both are located on the line 51 and 52 of my pastebin link above. In the final of the log it says: _(EE) No devices detected._ So my question is, how can i change the preferred PCI there(on the Debian)? And my second question is if the driver of Nvidia is loading correctly? Thanks in advance!


Linux, disable /dev/fd0 (floppy)

Is it possible to make Linux kernel completely ignore the floppy disk controller? I do not have the drive but obviously my motherboard does contain the controller. I would like to disable the `/dev/fd0` device node somehow to avoid Thunar and other tools detecting it and probing it.


How Do I check Permissions of Root Folder (/ Folder, not /root)?

Is there a way to check the permissions of the root folder, /? I mean the folder's permissions, not its content's (/var, /usr, etc.) permissions? Running `ls /..` shows the content's permissions.


Are logs kept for past at jobs?

I ran a few jobs with `at` command and, if possible, I want to see which commands I ran in what directories. I work with Linux Mint 16 if this is relevant.


What are files in `/var/crash/`?

I know when a program crashes, some files creating in `/var/crash/`. But I don't know what these files are! Is that error logs?


list files and store it in variables

im new with shell programming. my goal is to give the user a selection which file should be run. i catch all available scripts in one var with:               var=$(find script*)      so far so good.. this is the output                   echo $var         script1 script2 script3 scr...      now i want to store each file in a singel variable to run it in later selection               select SEL in script1 script2 script3 ..........     case $SEL in             $Script1) echo ($Script1 will start) && ./$script1 ;;             $Script2) echo ($Script2 will start) && ./$script2 ;;             $Script3) echo ($Script3 will start) && ./$script3 ;;             $Sc..) echo ($Scr.... will start) && ./$scrip.... ;;             $Sc...) echo ($Sc...... will start) && ./$scrip..... ;;             *) echo "choose on of the availabel files";;         esac     done      i dont have a clue how should i should separate all files if i dont know how many and the exactly lenght of each file... i tried to split with echo ${var[1]} and echo $var[1] but this dosn't work. i recive either a empty output or the whole string


Two vsftpd instances - check passive port on FTPS

I have configured VSFTPD in a CentOS machine to run on two instances, with vsftpd.conf and vsftpd2.conf. Here the content of the second conf file:               anonymous_enable=NO     chroot_list_enable=YES     chroot_list_file=/etc/vsftpd/chroot_list     chroot_local_user=YES     connect_from_port_20=YES     dirmessage_enable=YES     force_local_data_ssl=YES     force_local_logins_ssl=YES     ftpd_banner=Hello.     listen=YES     listen_port=30     local_enable=YES     local_umask=022     pam_service_name=vsftpd     pasv_enable=YES     pasv_address=192.168.100.162     pasv_max_port=389     pasv_min_port=389     rsa_cert_file=/etc/vsftpd/vsftpd.pem     ssl_enable=YES     ssl_sslv2=NO     ssl_sslv3=NO     ssl_tlsv1=YES     ssl_ciphers=HIGH     user_config_dir=/etc/vsftpd/user_conf     userlist_enable=NO     write_enable=YES     xferlog_enable=YES     xferlog_file=/var/log/xferlog2     xferlog_std_format=NO     dual_log_enable=YES     log_ftp_protocol=YES      The fist conf file is identical excepting the xferlog file, and the listen_port that is missing, and the pasv_max_port/pasv_min_port that are 65000/60000 So I have one FTPS working on port 21 and the other on port 30. Both are working fine, but I want to make sure that 389 is really being used. So, I started a session with Wireshark, where I could see all my TCP packets to port 30, but no one to 389. Instead, I see packets to my remote server on port 49276. How can I make sure that this is working fine?


Mount a second ssd drive on centos - How can I figure out which is the unused drive?

I need to mount my secound ssd drive to /home2. I already created the folder /home2 - Now, how can i figure out which is the unused drive ? Is this /dev/sda or sdb ? What is the exactly thing i`ve to look for to know which is the unmounted drive ?               [/]# cat /proc/mdstat     Personalities : [raid1]     md1 : active raid1 sdb2[1] sda2[0]           524224 blocks super 1.0 [2/2] [UU]          md0 : active raid1 sdb1[1] sda1[0]           16777088 blocks super 1.0 [2/2] [UU]          md2 : active raid1 sdb3[1] sda3[0]           217125312 blocks super 1.0 [2/2] [UU]          unused devices: <none>          df -h     Filesystem      Size  Used Avail Use% Mounted on     /dev/md2        204G   84G  111G  44% /     tmpfs            16G     0   16G   0% /dev/shm     /dev/md1        496M   53M  419M  12% /boot     /usr/tmpDSK     1.9G   94M  1.7G   6% /tmp          root@kas [~]# fdisk -l | grep '^Disk'     Disk /dev/sdb: 240.1 GB, 240057409536 bytes     Disk identifier: 0x0007b22f     Disk /dev/sda: 240.1 GB, 240057409536 bytes     Disk identifier: 0x000c0cf1     Disk /dev/md2: 222.3 GB, 222336319488 bytes     Disk identifier: 0x00000000     Disk /dev/md0: 17.2 GB, 17179738112 bytes     Disk identifier: 0x00000000     Disk /dev/md1: 536 MB, 536805376 bytes     Disk identifier: 0x00000000     root@kas [~]# fdisk -l          Disk /dev/sdb: 240.1 GB, 240057409536 bytes     255 heads, 63 sectors/track, 29185 cylinders     Units = cylinders of 16065 * 512 = 8225280 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x0007b22f          Device Boot Start End Blocks Id System     /dev/sdb1 1 2089 16777216+ fd Linux raid autodetect     /dev/sdb2 2089 2155 524288+ fd Linux raid autodetect     /dev/sdb3 2155 29186 217125464+ fd Linux raid autodetect          Disk /dev/sda: 240.1 GB, 240057409536 bytes     255 heads, 63 sectors/track, 29185 cylinders     Units = cylinders of 16065 * 512 = 8225280 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x000c0cf1          Device Boot Start End Blocks Id System     /dev/sda1 1 2089 16777216+ fd Linux raid autodetect     /dev/sda2 2089 2155 524288+ fd Linux raid autodetect     /dev/sda3 2155 29186 217125464+ fd Linux raid autodetect          Disk /dev/md2: 222.3 GB, 222336319488 bytes     2 heads, 4 sectors/track, 54281328 cylinders     Units = cylinders of 8 * 512 = 4096 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x00000000               Disk /dev/md0: 17.2 GB, 17179738112 bytes     2 heads, 4 sectors/track, 4194272 cylinders     Units = cylinders of 8 * 512 = 4096 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x00000000               Disk /dev/md1: 536 MB, 536805376 bytes     2 heads, 4 sectors/track, 131056 cylinders     Units = cylinders of 8 * 512 = 4096 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x00000000


linux distro that's lightweight & works in seamless mode for commandline use on VirtualBox

Currently, I'm doing web development on my windows machine. Some projects are just easier to run on Linux (like Node.js.) I only need the commandline, so I run Ubuntu in seamless mode. I don't need all the overhead of Ubuntu. Is there lighter distro I could use that still supports seamless mode in VirtualBox?


Colors wrong in wine with new x server with 8 bit color

I have an old pc game (win95) that I'm trying to play through wine on my ubuntu box. I got it running and all that pretty jazz using this code;               $ xinit /usr/bin/xterm -- :1 -ac -depth 8      Then in the new window               $ ck-launch-session     $ sudo wine "mygame.exe"      But for some reason, certain shades of white are black, and visa versa. Is there a way to fix this, or am I stuck with it?