title: Sudo no longer available and users can't install or modify most files

text: I recently started messing with some files on a virtual hosted machine and I was logged in a normal/non-root user. At first everything was fine, I was able to install anything I needed using:               sudo apt-get install tree      But I somehow messed up a file where now when I do that I get the following error:               sudo: can't open /etc/sudoers: Permission denied      I'm not sure how to diagnose this, I've googled for solutions but everything's about what sudo is and nothing related to what to do about re-enabling users to use it. Let me know if you'd like any other details in comments :) **Edit:**               ls -l /etc/sudoers     -r--r----- 1 root root 577 Apr 20 03:42 /etc/sudoers


title: How to monitor the number of rows inserted per second and per minute into MySQL db

text: I have a running script which is inserting data into a MySQL database. I want to know how many rows are getting inserted per second and per minute. If the count of rows inserted per second or per minute goes beyond a certain count, I need to stop executing the script. How can I monitor this?


title: Can I upgrade my Linux kernel from 2.6.32 to 3.0.7?

text: I currently run Angstrom Linux 2.6.32 on BeagleBoard-xM (ARM architecture). Can I upgrade my Linux kernel from 2.6.32 to 3.0.7 and what is the difficulty level in case upgrade is possible? _EDIT#1:_ Image that BB-xM runs, was built from Narcissus with Bootloader Files _(x-load/u-boot/scripts)_. I recently downloaded kernel sources 2.6.32.61 from kernel.org and copied them to `/usr/src` on BB-xM. After making the configuration (`make menuconfig`), I build (`make`) and installed (`make install`) kernel directly to BB-xM _(native toolchain)_. _EDIT#2:_ I know that attention must be given as well, to the bootloader, in case it has to be manually configured, in order to boot the new kernel. In the initial Angstrom image, `boot` directory contained:   * `u-boot-scripts`   * `MLO-beagleboard-1.5.0+r24+gitr04b1732220078d47c18a84cbafc52e45db71f13d-r24`   * `u-boot-beagleboard-2011.02+r75+gitrc7977858dcf1f656cbe91ea0dc3cb9139c6a8cc8-r75`   * `uImage-2.6.32` After, configuring and installing kernel 2.6.32.61, `boot` directory contains:               root@beagleboard:/boot# ls     MLO     MLO-beagleboard-1.5.0+r24+gitr04b1732220078d47c18a84cbafc52e45db71f13d-r24     Module.symvers-2.6.32     System.map-2.6.32     System.map-2.6.32.61     System.map-2.6.32.61.old     config-2.6.32     u-boot-beagleboard-2011.02+r75+gitrc7977858dcf1f656cbe91ea0dc3cb9139c6a8cc8-r75.bin     u-boot-scripts     u-boot.bin     uImage     uImage-2.6.32     vmlinux-2.6.32.61     vmlinux-2.6.32.61.old      I didn't configure the bootloader, and BB-xM boots the newly configured kernel.


title: Heartbeat with virtual IP at Ubuntu 12.04

text: I have installed heartbeat package at both linux devices so that when ever clients request a service they will be arrived to this IP, and client will not know what are the back-end/actual ip addresses of the nodes. (this is know as virtual-ip or floating-ip) To enable this feature does each of both devices have two ethernet cards (etho and eth1)? In many documents I have found there are two eth interfaces are configured?


title: Disadvantages of linux kernel module?

text: I am trying to understand the disadvantages of using Linux kernel modules. I understand the benefits of using them: the ability to dynamically insert code into a running system without having to recompile and reboot the base system. Given this strong advantage, I was guessing most of kernel code should then be in kernel modules instead as part of base kernel, but that does not seem to be the case -- a good number of core subsystems (like memory management) still go into the base kernel. One reason I can think of is that kernel modules are loaded very late in the boot process and hence core functionality has to go in the base kernel. Another reason I read was about fragmentation. I didn't really understand why kernel modules cause memory fragmentation, can someone please explain? Are there any other downsides of using kernel modules?


title: zsh: How to check if an option is enabled

text: To enable an option, we can use `setopt`. e.g.:               setopt extended_glob      **How can we check if an option is currently enabled ?**


title: lspci machine-readable format (-vmm) does not show a kernel Module/Driver line

text: I briefly read the manual of lspci, where I found out that there is a machine- readable format lspci output using "-m" or "-mm" or "-vmm". I need to print out the device name, the device id and the kernel module driver in use using the machine-readable format. I tried this command:               $ lspci -vmm -v -nn -d 10de:0393     Slot:   01:00.0     Class:  VGA compatible controller [0300]     Vendor: NVIDIA Corporation [10de]     Device: G73 [GeForce 7300 GT] [0393]     SVendor:    Micro-Star International Co., Ltd. [1462]     SDevice:    NX7300GT-TD256EH [0412]     Rev:    a1      Compared to this output:               $ lspci -nn -v -d 10de:0393     01:00.0 VGA compatible controller [0300]: NVIDIA Corporation G73 [GeForce 7300 GT] [10de:0393] (rev a1) (prog-if 00 [VGA controller])         Subsystem: Micro-Star International Co., Ltd. NX7300GT-TD256EH [1462:0412]         Flags: bus master, fast devsel, latency 0, IRQ 16         Memory at fd000000 (32-bit, non-prefetchable) [size=16M]         Memory at d0000000 (64-bit, prefetchable) [size=256M]         Memory at fc000000 (64-bit, non-prefetchable) [size=16M]         I/O ports at cc00 [size=128]         [virtual] Expansion ROM at fe9e0000 [disabled] [size=128K]         Capabilities: <access denied>         Kernel driver in use: nvidia         Kernel modules: nvidia_current, nouveau, nvidiafb      You can see that the normal (non-machine-readable) format shows the kernel driver/module in use. How do I get it to show the Driver/Module lines in machine-readable format? In the manual it says that "Module" and "Driver" lines are optional. Does that mean that I have to compile it from source with some special attributes? P.S. I know about awk and sed and other workarounds, I'm just curious why it doesn't work. I use ubuntu 12.10, pciutils version 3.1.9-5ubuntu4


title: UUID vs /dev/sdX in FSTAB

text: I have Linux system in which we force /dev/devname for running the system.               proc            /proc            proc    defaults        0       0     /dev/sda1       /                ext3    barrier=1,errors=remount-ro 0       1     /dev/sda5       /opt             ext3    barrier=1,defaults        0       22      /dev/sda2       /opt/vortex/dvss ext3    barrier=1,defaults 0   3     /dev/sda6       none             swap    sw              0       0     /dev/scd0       /media/cdrom0    udf,iso9660 user,noauto     0       0      We have this system running without issues till date. But, often in some installed machine we see that the system is not able to boot properly and sudden goes into "Grub rescue" When i mount the device as secondary and run E2Fsck i see that the system can be restored. Now, we are trying to address this failure. [Fixing System boot failure due to GRUB Error In order, I noticed in some forums they say to SET UUID based boot up in FSTAB what are all the advantages that we would have if it is set through UUID. Is there a possibility that it would reduce my GRUB ERROR


title: How to use booleans in fish shell?

text: I switched to `fish` shell and quite happy with it. I didn't get how can I handle booleans. I managed to write `config.fish` that executes `tmux` on `ssh` (see: How can I start tmux automatically in fish shell while connecting to remote server via ssh) connection but I'm not happy with code readability and want to learn more about `fish` shell (I've already read tutorial and looked through reference). I want code to look like that (I know that syntax isn't correct, I just want to show the idea):               set PPID (ps --pid %self -o ppid --no-headers)      if ps --pid $PPID | grep ssh          set attached (tmux has-session -t remote; and tmux attach-session -t remote)          if not attached              set created (tmux new-session -s remote; and kill %self)          end          if !\(test attached -o created\)              echo "tmux failed to start; using plain fish shell"          end      end      I know that I can store `$status`es and compare them with `test` as integers but I think it's ugly and even more unreadable. So the problem is to reuse `$status`es and use them in `if` and `test`. How can I achieve something like this?


title: Find + Grep Recursive Search

text: I am mirroring a website using wget. On the server, there is a dump of the `find /` command, which includes filenames in the form : `/dir1/ /dir1/page1.txt /dir1/page2.txt ...` The mirrorring is very large (100GB+) and I would like to compare the local output of `find` to the text file containing the server-side dump, so as to have an idea of how many files are left. I was thinking of using a `grep -v ...` or `awk` but I'm not quite sure how one would go about doing that. Can anyone help me please? Thanks !


title: Upgrade matplotlib to 1.2 or 1.3

text: I am trying to upgrade my python matplotlib but for some reason I can't get it to upgrade. I originally installed matplotlib with: `apt-get install python-matplotlib` which was fine. However it defaulted to version 1.1 I then downloaded the 1.2 source from the website and then extracted the tar.gz and ran :               sudo python setup.py build     sudo python setup.py install      After all this I went into python2.7 idle and typed:               import matplotlib     print matplotlib.__version__     >>>1.1.1      So it seems its not updating. How can I update matplotlib to 1.2 or greater?


title: samba with OpenLDAP - NT_STATUS_NO_SUCH_USER

text: To start off, shit's about to hit the fan and i need your help! I'm so short of time that i can't begin to describe everything i've done and not done, but i have a problem and hope you can help!   1. OpenLDAP (working with ldapsearch and php scripts)   2. Working samba without LDAP I'm trying to connect these two dots, I'm not sure what exactly you need but i'll give it to you if you as long as you ask! This is waht my `access.log` says (where all my smb data gets dumped):               [2013/02/10 19:41:25, 2] passdb/init_sam_from_ldap(545): Entry found for user: ***<username>***     [2013/02/10 19:41:25, 0] passdb/pdb_get_group_sid: Failed to find Unix account for ***<username>***     [2013/02/10 19:41:25, 1] auth/make_server_info_sam(589):  User ***<username>*** in passdb, but getpwnam() fails!     [2013/02/10 19:41:25, 0] auth/check_sam_security: make_server_info_sam() failed with 'NT_STATUS_NO_SUCH_USER'     [2013/02/10 19:41:25, 2] auth/check_ntlm_password:  Authentication for user [***<username>***] -> [***<username>***] FAILED with error NT_STATUS_NO_SUCH_USER      It's like the password hashes in the OpenLDAP database doesn't match what samba assumes it should recieved, or something along those lines. **note:** When supplying a wrong password, it says wrong password.. these logs are for a perfect authentication using correct credentials, or at least i try to (via gnome filebrowser, username: **username** , workgroup: WORKGROUP, password: **plain text password** ) Here's my smb.conf:               [global]             unix charset = LOCALE             netbios name = test             server string = test             passdb backend = ldapsam:"ldap://<ip>"             username map = "/etc/samba/smbusers"             log level = 2             syslog = 0             log file = /var/log/samba/access.log             max log size = 0             name resolve order = hosts dns             load printers = No             add user script = /usr/bin/smbldap-useradd -m '%u'             delete user script = /usr/bin/smbldap-userdel '%u'             add group script = /usr/bin/smbldap-groupadd -p '%g'             delete group script = /usr/bin/smbldap-groupdel '%g'             add user to group script = /usr/bin/smbldap-groupmod -m '%g' '%u'             delete user from group script = /usr/bin/smbldap-groupmod -x '%g' '%u'             add machine script = /usr/sbin/smbldap-useradd -t 0 -w "%u"             set primary group script = /usr/bin/smbldap-usermod -g '%g' '%u'             domain logons = Yes             domain master = Yes             wins support = Yes                  ldap admin dn = cn=admin,dc=test,dc=local             ldap group suffix = ou=Groups             ldap user suffix = ou=People             ldap suffix = dc=test,dc=local             ldap ssl = no             ldap passwd sync = yes      Here's my ldap.conf ** Server is down so i don't have this atm** According to wireshark OpenLDAP sends the correct information when searching for the `uid`, but when doing the actual login i **think** that samba says something about **"singelLevel"** which i think might be relevant, this is where it fails and the "wrong" data is sent back to samba. Again, I'm shit out of luck and time is against me and i've tried everything and anything, but samba just refuses to use any LDAP login. ## shares: They work without LDAP, so the share's fine! (even with non-ldap auth)    ## **Add a unix user** This works... Then i can access the share, but i've explicitly told samba to **not** use local authentication, i've chosen LDAP?


title: conffiles syntax

text: I'm trying to find what is the syntax of conffiles. I'm creating several packages using a single rules file and if I put the configuration files into conffiles I get an error when building the packages (since the files are only present in two of the 9 packages).


title: Systemd Initrd service and persistance

text: I need to run a simple daemon from system initrd image. According to system.initrd documentation, when sytemd is running directly from initrd all running processes will be killed on `switch-root`, unless `argv[0][0]` character of main process is `@`. The only way I found to change `argv[0]` it to add proper statement in application source code, but unfortunately this is a proprietary software and I do not have access to it's source code. I also found that shell `exec` command can run process under different name, changing it `argv[0]` parameter, so I wrote simple service file for systemd using `exec` to deploy new process and it works, `ps aux` shows that service process is running under proper name (`@bin/process-name ...`). Like mentioned before, processes with `argv[0]` starting with `@` character shouldn't be killed on `switch-root`. My systemd recipe:               [Unit]     Description=Simple service          [Service]     ExecStart=/bin/bash -c 'exec -a "@bin/process-name" /bin/application'      I make sure that this service is working before `switch-root` by manually enabled it at initrd stage, but it is killed like any other running processes. I tried running it as normal application, but it not working either. I even write my own application which changes their `argv[0][0]` to `@`, and like before it is killed on `switch-root`. So, how to run persistent service from initrd? It seems that systemd kills ALL processes during `switch-root` leaving nothing behind, even special processes which shouldn't be killed.               Initrd: Dracut     OS: Debian Jessie     Systemd version: 208-8      Source: http://www.freedesktop.org/wiki/Software/systemd/RootStorageDaemons/


title: What's the motivation behind kfreebsd

text: I use both FreeBSD and Debian-based Linuxes on a daily basis. (I am mostly a user/developer/sysadmin not an OS-developer). I want to know what is the motivation behind kFreeBSD? Why people may want to use FreeBSD kernel but avoid the user land?


title: Iterate over multiple parameters with spaces in bash script

text: I have a bash script for my RaspberryPi (running Raspbian) that is supposed to take multiple file names as parameter(s) and play one after the other (using `omxplayer`). The basic structure is this:               #!/bin/bash     for f in ${*}     do       echo "${f}";     done;      Now I have problems when the input filenames contain spaces; in particular, the behaviour seems to be inconsistent. Assume we have two files `test a b` and `test d e` in the same directory. Running above script with different parameters yields this:               $ ./test test\ a\ b     test     a     b     $ ./test "test a b"     test     a     b     $ ./test test\ a*     test     a     b     $ ./test "test a*"     test     a*      But, curiously:               ./test "test*"     test a b     test d e      Obviously, only this last variant provides the intended output. It is cumbersome to use, however, especially if you want to watch a single file (tab-completion will fill in the whole name) or if one of the folder names in the file's path contains spaces. What can I do differently in the shellscript so that it will always behave as intended? In particular, both of               $./test test*     $./test test\ a\ b test\ d\ e      should produce the same output               test a b     test d e          so the script can be used easily using normal tab-completion.


title: Access PgSQL executables from anywhere

text: I've installed PgSQL 9.1.2 from PostgreSQL repositories and all it's fine except that I can't execute command from every path in my OS. For example suppose that I want to run the command `pg_dump`: for that I need to change from (actual path) to `/usr/pgsql-9.1/bin` and then execute as `./pg_dump` even if I'm root user. I think in make a symlink for each executable under `/usr/pgsql-9.1/bin` in `/bin` but I don't know if this is the best way. Also I think in add this `PATH="/usr/pgsql-9.1/bin:$PATH"` to /.bashrc but didn't know the right way to do this. Any help on this?


title: Why doesn't recursion go upwards with rm?

text: I'm wondering about direction of recursion in general and rm specifically. rm recursion only works downwards correct? Running: `sudo rm -R *.QTFS` will delete all *.QTFS files in current directory and its children, correct? current directory as displayed by `ls -lha` also contains `.` and `..` links for the lack of a better word, so why doesn't recursion follow these upwards in the directory tree? Is there an artificial limit on rm app, or `.` and `..` are not real things?


title: Match one part of a regular expression in a Kwrite find-and-replace regex

text: Among the joys of KDE, Kwrite is surely noteworthy. Having regular expression support built in by default into text editor is probably one of the top 10 best ideas of all time. Since I often need to do a lot of finding and replacing, I have already begun to save a lot of time and hassle by using Kwrite. Just one problem: I'm still a newbie at it. I suppose it's probably a lot like in `sed`, but anyway, I am matching stuff like               numbersdonot8     belongattheend0     ofwords2      using the simple regex [a-z][0-9]. How do I then tell kwrite to replace the text using the first part of the regex? Using [a-z] in the 'replace' box gives things like 'numbersdonot[a-z]' as a result. But I want,               numbersdonot     belongattheend     ofwords


title: How to know when a job in screen finishes?

text: Is it possible to know if a script executed inside a screen session finished or not? The script can be seen by typing `jobs` and I would like to terminate the `screen session` when the script is finished. How can I do so or can I have the screen terminate itself after the script successfully executes? It is not convenient to do it manually since I run 72 screen sessions at once. It would be really nice to somehow check the status of the jobs inside the screen sessions automatically and print them to `stdout` and have the `screen` sessions terminate when the jobs running within are finished.


title: I'm not able connect internet from vmware player with centos

text: I installed centos 6.4 and when I installed I set the network config. But somehow centos did not save them. Now I forced server to use dhcp but it is taking wrong IP address and it is not able to connect to internet. I'm also not able to set network settings because system-network-config is not working. Also I'm not able to yum install system-network-config because I can't connect to internet. Vmware network adapter setting is NAT. When I do ifconfig the IP is 192.168.50.129 but the IP range is 192.168.0.1 how can I fix this problem? Thanks.


title: Touchpad gets disabled if notebook removed from dock

text: I have a T430 with CentOS 6.4 used as a Desktop. If I remove it from its dock, the touchpad isn't working anymore. **My question** : How to debug/solve this problem??


title: Cinnamon 2.0.14 crashing when a second monitor is enabled with NVIDIA drivers (Mint 16)

text: Here's the set-up:   * 2x identical GTX460 cards    * 1x BenQ 144hz monitor (1920x1080)    * 1x Asus 60hz monitor (1920x1080) I was told to avoid installing the NVIDIA driver myself and use the `ppa:xorg- edgers/ppa` repository instead. I have tried it both ways with little success, which is to say, either method works perfectly until I visit `nvidia-settings` and enable the second monitor, at which point cinnamon crashes. It will crash perpetually if attempted to restart and keep you in the fallback mode. Using XFCE instead of Cinnamon doesn't seem to have this problem but I'm resolved to figure out what's going on. Here's some relevant outputs: Working xorg.conf Crashing xorg.conf * * * Here's the output from `/var/log/Xorg.0.log` And here is output from `/home/username/.xsession-errors` - it has some peculiar stuff about cinnamon breaking but I can't make sense of it. `inxi -Fxz` (before NVIDIA drivers)               System:    Host: minty-pc Kernel: 3.11.0-12-generic x86_64 (64 bit, gcc: 4.8.1) Desktop: Gnome Distro: Linux Mint 16 Petra Machine:   Mobo: Gigabyte model: Z68A-D3H-B3 Bios: Award version: F11 date: 10/12/2011 CPU:       Quad core Intel Core i7-2600K CPU (-HT-MCP-) cache: 8192 KB flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 27138.4                 Clock Speeds: 1: 1600.00 MHz 2: 1600.00 MHz 3: 1600.00 MHz 4: 1600.00 MHz 5: 1600.00 MHz 6: 1600.00 MHz 7: 1600.00 MHz 8: 1600.00 MHz Graphics:  Card-1: NVIDIA GF104 [GeForce GTX 460] bus-ID: 01:00.0                 Card-2: NVIDIA GF104 [GeForce GTX 460] bus-ID: 02:00.0                 X.Org: 1.14.3 drivers: (unloaded: fbdev,vesa) FAILED: intel,nouveau Resolution: 1920x1080@60.0hz, 1920x1080@60.0hz                 GLX Renderer: Gallium 0.4 on NVC4 GLX Version: 3.0 Mesa 9.2.1 Direct Rendering: Yes Audio:     Card-1: 2x NVIDIA GF104 High Definition Audio Controller driver: snd_hda_intelsnd_hda_intel bus-ID: 02:00.1                Card-2: Intel 6 Series/C200 Series Chipset Family High Definition Audio Controller driver: snd_hda_intel bus-ID: 00:1b.0                Sound: Advanced Linux Sound Architecture ver: k3.11.0-12-generic Network:   Card-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller                 driver: r8169 ver: 2.3LK-NAPI port: ce00 bus-ID: 04:00.0                IF: eth0 state: up speed: 100 Mbps duplex: full mac: <filter>                Card-2: Belkin F7D1101 v1 Basic Wireless Adapter [Realtek RTL8188SU] driver: r8712u usb-ID: 050d:945a                IF: wlan0 state: down mac: <filter> Drives:    HDD Total Size: 624.2GB (0.9% used) 1: id: /dev/sda model: OCZ size: 60.0GB                 2: id: /dev/sdb model: OCZ size: 60.0GB 3: USB id: /dev/sdc model: Cruzer size: 4.0GB                 4: id: /dev/sdd model: WDC_WD5000BPVT size: 500.1GB  Partition: ID: / size: 46G used: 3.9G (9%) fs: ext4 ID: swap-1 size:     7.67GB used: 0.00GB (0%) fs: swap  RAID:      No RAID devices detected - /proc/mdstat and md_mod kernel raid module present Sensors:   System Temperatures: cpu: 34.0C mobo: N/A gpu: 45.0,40.0                 Fan Speeds (in rpm): cpu: N/A  Info:      Processes: 200 Uptime: 25 min Memory: 776.6/5886.1MB Runlevel: 2 Gcc sys: 4.8.1 Client: Shell inxi: 1.8.4      Here's what happens when I try to restart Cinnamon via `cinnamon --replace`:               ~ $ cinnamon --replace           JS LOG: About to start Cinnamon           JS LOG: Cinnamon started at Sat Mar 01 2014 15:04:22 GMT-0700 (MST)           JS LOG: network applet: Cannot find connection for active (or connection cannot be read)     Window manager warning: Log level 6: The program 'cinnamon' received an X Window System error.     This probably reflects a bug in the program.     The error was 'BadMatch (invalid parameter attributes)'.       (Details: serial 4423 error_code 8 request_code 7 minor_code 0)       (Note to programmers: normally, X errors are reported asynchronously;        that is, you will receive the error a while after causing it.        To debug your program, run it with the GDK_SYNCHRONIZE environment        variable to change this behavior. You can then get a meaningful        backtrace from your debugger if you break on the gdk_x_error() function.)     Trace/breakpoint trap      I suppose I should mention the cards are connected with a SLI bridge though I doubt it makes any difference. I've tried switching slots the monitors were plugged in to - I'm that desperate. EDIT: I've installed the unlisted 334.21 driver from the NVIDIA site manually (amended blocklist, purged nvidia*, ran update-initramfs -u, ran driver install while in recovery mode - **perhaps this is insufficient to remove all of nouveau's stuff?** ) and here is the latest attempt to start cinnamon:               vladdy@minty-pc ~ $ cinnamon --replace     Xlib:  extension "RANDR" missing on display ":0".     Xlib:  extension "RANDR" missing on display ":0".     Segmentation fault


title: how to release wlan0 and wlan1 interfaces which are reserved by default

text: I have just installed debian 7.1 for an arm device,               Linux arm 3.12.0-armv7-x7 #1 SMP Fri Nov 8 11:48:19 CET 2013 armv7l GNU/Linux      iwconfig shows 4 wifi interfaces where I have only two.               root@arm:~# iwconfig     wlan3     IEEE 802.11bgn  ESSID:off/any                 Mode:Managed  Access Point: Not-Associated   Tx-Power=0 dBm                  Retry  long limit:7   RTS thr:off   Fragment thr:off               Encryption key:off               Power Management:off          wlan0     IEEE 802.11abgn  ESSID:off/any                 Mode:Managed  Access Point: Not-Associated   Tx-Power=0 dBm                  Retry  long limit:7   RTS thr:off   Fragment thr:off               Encryption key:off               Power Management:off          wlan2     IEEE 802.11bgn  ESSID:off/any                 Mode:Managed  Access Point: Not-Associated   Tx-Power=0 dBm                  Retry  long limit:7   RTS thr:off   Fragment thr:off               Encryption key:off               Power Management:off          lo        no wireless extensions.          eth0      no wireless extensions.          wlan1     IEEE 802.11abgn  ESSID:off/any                 Mode:Managed  Access Point: Not-Associated   Tx-Power=0 dBm                  Retry  long limit:7   RTS thr:off   Fragment thr:off               Encryption key:off               Power Management:off          hwsim0    no wireless extensions.      `/etc/udev/rules.d/70-persistent-net.rules` shows my devices are `wlan2` and `wlan3`, somehow wlan0 and wlan1 are reserved. `/etc/network/interfaces` does not have any config. what could be the problem?


title: Virtual kernel memory layout in dmesg linux kernel 2.6.31

text: I'm working on a embedded linux project for ARM architecture, kernel version is `2.6.31.12-rt21`. In `dmesg`, I cannot see the virtual kernel memory layout like this:               virtual kernel memory layout:         fixmap  : 0xffc57000 - 0xfffff000   (3744 kB)         pkmap   : 0xff800000 - 0xffa00000   (2048 kB)         vmalloc : 0xf7ffe000 - 0xff7fe000   ( 120 MB)         lowmem  : 0xc0000000 - 0xf77fe000   ( 887 MB)           .init : 0xc0906000 - 0xc0973000   ( 436 kB)           .data : 0xc071ae6a - 0xc08feb78   (1935 kB)           .text : 0xc0400000 - 0xc071ae6a   (3179 kB)      Did this feature (print virtual memory layout) is implemented in linux kernel version 2.6.31? And how to enable it? Thanks in advance!


title: Lenovo T440s Fingerprint reader in Fedora 20

text: I just got my new Lenovo T440s and installed Fedora 20 with Gnome 3 on it. Everything runs smoothly, except for the fingerprint reader. Its got a Validity VFS5011 (138a:0017) device which is not yet officially supported by `libfprint`, but there is experimental support available. I installed this version of `libfprint` from source and also build the standard fprintd and pam_fprint. In the Users section of the Gnome settings, I now have an option to enable fingerprint login. I enroll my fingerprint and get a "Your fingerprint was successfully saved. You should now be able to log in using your fingerprint reader." message. However, I'm not. The login screen prompts me for my password as usual. The LED indicator on the fingerprint reader is not blinking. In a terminal, I can check my fingerprint using `fprintd-verify` and it works. Enrolling the finger via `fprintd-enroll` also works and seems to be the same thing as the actual enrollment from the system settings. **Update** From the `pam.d` files, two already include `pam_fprintd.so`, one is `fingerprint-auth`, the other is `system-auth`:               #%PAM-1.0     # This file is auto-generated.     # User changes will be destroyed the next time authconfig is run.     auth        required      pam_env.so     auth        sufficient    pam_fprintd.so     auth        sufficient    pam_unix.so nullok try_first_pass     auth        requisite     pam_succeed_if.so uid >= 1000 quiet_success     auth        required      pam_deny.so          account     required      pam_unix.so     account     sufficient    pam_localuser.so     account     sufficient    pam_succeed_if.so uid < 1000 quiet     account     required      pam_permit.so          password    requisite     pam_pwquality.so try_first_pass local_users_only retry=3 authtok_type=     password    sufficient    pam_unix.so sha512 shadow nullok try_first_pass use_authtok     password    required      pam_deny.so          session     optional      pam_keyinit.so revoke     session     required      pam_limits.so     -session     optional      pam_systemd.so     session     [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid     session     required      pam_unix.so      Also, I think the bunch of `gdm-*` files could be relevant as it's my understanding that `gdm` is the Gnome login screen? However, non of them has `pam-fprintd.so` in it and adding it to e.g. `gdm-fingerprint` had no effect.


title: No /etc/mdadm.conf in centos 6

text: I have installed centos 6 and setup a new RAID array with two disks. every thing is ok and I have partitioned the array but I don't see any `/etc/mdadm.conf` or `/etc/mdadm/mdadm.conf` files. I have rebooted my machine too but no luck! Can you tell me what is my mistake? Is there a change in the location of the mdadm configuration files?


title: Dropbox on OpenBSD

text: Has anyone had any success getting dropbox installed with dropboxd running properly on OpenBSD (FreeBSD would work for me too..)? I have built from source and everything installs just fine but when I try to fire it up: * * *               $ python /usr/bin/dropbox start                                                     Starting Dropbox...     The Dropbox daemon is not installed!     Run "dropbox start -i" to install the daemon          $ ssh root@localhost      root@localhost's password:           <snip>          # python /usr/bin/dropbox start -i                                                                         Starting Dropbox...     Dropbox is the easiest way to share and store your files online.      Want to learn more? Head to http://www.dropbox.com/          In order to use Dropbox, you must download the proprietary daemon. [y/n] y          Error: Platform not supported      * * * So I checked out the command line clients and text only stuff from http://wiki.dropbox.com/TipsAndTricks/TextBasedLinuxInstall but of course that's precompiled for linux.. no dice. Anyone try to tackle this and get a workaround for a DropBox/BSD combo? * * * I continued to plug away at this and eventually ran into a show stopper: There's no linux emulation on amd64 for openbsd. Game over. Sorry to kill everyone's time.


title: pulling strings out of mixed file of strings and binary

text: I'm trying to get my nokia backup file into an acceptable vcard format. It has valid vcard strings that appear in between binary data. For example:               !@#JUNKCHARACTERS!@#!@BEGIN:VCARD     VERSION:2.1     N:Jimmy;;;;     TEL;VOICE:4445551212     END:VCARD!@#JUNKCHARACTERS!@#!@      I've been working with a hex editor to do some find and replace, but even then it's tedious. Can I use grep or some other command-line tool to pull out all the strings between `BEGIN:VCARD` and `END:VCARD`?


title: BCM4312 802.11b/g under Fedora 14 - suddenly not working

text: Suddenly "ifconfig -a" doesn't prints out the "wlan0" on my Fedora14 notebook..WHY? (it worked before..) Infos:               # dmesg | egrep -i "wireless|wifi|broadcom|bcm4312|10:00.0"     [    0.219841] pci 0000:10:00.0: reg 10: [mem 0xe8000000-0xe8003fff 64bit]     [    0.220074] pci 0000:10:00.0: supports D1 D2     [    1.539203] ata1.00: ACPI cmd c6/00:10:00:00:00:a0 (SET MULTIPLE MODE) succeeded     [    1.543355] ata1.00: ACPI cmd c6/00:10:00:00:00:a0 (SET MULTIPLE MODE) succeeded          # lspci | fgrep -i network     10:00.0 Network controller: Broadcom Corporation BCM4312 802.11b/g LP-PHY (rev 01)          # rpm -qa | fgrep -i broadcom-wl     broadcom-wl-5.100.82.38-1.fc14.noarch          # lsmod | fgrep -i br     #          # ifconfig -a     eth0 ...     lo ...     #           # uname -a     Linux localhost.localdomain 2.6.35.13-92.fc14.i686 #1 SMP Sat May 21 17:39:42 UTC 2011 i686 i686 i386 GNU/Linux          # lsb_release -a     LSB Version:    :core-4.0-ia32:core-4.0-noarch     Distributor ID: Fedora     Description:    Fedora release 14 (Laughlin)     Release:    14     Codename:   Laughlin     #           # vi /var/log/messages:     Jul 16 14:21:40 localhost NetworkManager[1173]: <info> found WiFi radio killswitch rfkill0 (at /sys/devices/platform/hp-wmi/rfkill/rfkill0) (driver hp-wmi)     Jul 16 14:21:40 localhost NetworkManager[1173]: <info> WiFi disabled by radio killswitch; enabled by state file     Jul 16 14:22:12 localhost NetworkManager[1173]: <info> WiFi now enabled by radio killswitch     Jul 16 14:24:05 localhost NetworkManager[1215]: <info> found WiFi radio killswitch rfkill0 (at /sys/devices/platform/hp-wmi/rfkill/rfkill0) (driver hp-wmi)     Jul 16 14:24:05 localhost NetworkManager[1215]: <info> WiFi enabled by radio killswitch; enabled by state file     Jul 16 14:24:32 localhost NetworkManager[1215]: <info> WiFi now disabled by radio killswitch     Jul 16 14:24:37 localhost NetworkManager[1215]: <info> WiFi now enabled by radio killswitch     #


title: Emacs: Different users, different themes, same init file

text: I use emacs at work, where I usually connect to the system with two different users:   * `myuser`   * `commonuser` The former is my own personal user, whereas the latter is shared by the whole team to manage an application. (Irrelevant hint: This is a terrible idea. There are generally better, albeit a bit less obvious, ways to manage privileges. Take it from my experience). In order to avoid unfortunate mix-ups, I want to define a separate theme for each user, and define it in their respective init files. Everything else defined in the init file has to be shared by the two. ## Simple solution I create a separate init file `/path/to/init/file/.emacs` and created the following `.emacs` file in each user's home directory:               (load-file "/path/to/init/file/.emacs")     (load-theme my-favorite-theme)      This works like a charm. But of course, that would be too easy! ## New solution needed I was asked not to modify the `.emacs` file of `commonuser`. I won't go into the details of why, but the fact remains that I had to find a workaround. Here's what I got so far:   1. Wrote a complete `~myuser/.emacs` file, that I will load regardless of the user.   2. Defined an alias for `commonuser` like this:              alias emacs='emacs -Q --load ~myuser/.emacs'      This will make emacs ignore `commonuser`'s init file and load `myuser`'s. Now my (simple) question is: **How can I make emacs behave differently according to the user launching it?** I am looking to do something similar:               if [[ $(whoami) == "myuser" ]]; then            (load-theme 'theme1)     if [[ $(whoami) == "commonuser" ]]; then            (load-theme 'theme2)


title: Wireless mouse freezes frequently for a second on laptop, when on battery

text: I have Samsung NP360E5A-A07PL laptop with ELAN Smart-Pad (ETPS/2 Elantech Touchpad, according to gpointing-device-settings), and a Logitech M195 wireless mouse (with an USB receiver). On Linux (LUbuntu 12.04 LTS) the wireless mouse stops working from time to time (quite frequently, perhaps every few minutes) for maybe one second. Disabling touchpad (via gpointing-device-setting) didn't help. Switching to wired USB mouse didn't help either, and it even made situation worse; with wired mouse to make it start working again after freeze I had to re-plug the USB, while with wireless mouse I only have to move it. The very same hardware setup works without any problems on MS Windows 7 (dual- boot). * * * Below there is result of running `xinput`:               jnareb@llaptok:~$ xinput      ⎡ Virtual core pointer                      id=2    [master pointer  (3)]     ⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]     ⎜   ↳ Logitech USB Receiver                     id=10   [slave  pointer  (2)]     ⎜   ↳ Logitech USB Receiver                     id=11   [slave  pointer  (2)]     ⎜   ↳ ETPS/2 Elantech Touchpad                  id=13   [slave  pointer  (2)]     ⎣ Virtual core keyboard                     id=3    [master keyboard (2)]         ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]         ↳ Power Button                              id=6    [slave  keyboard (3)]         ↳ Video Bus                                 id=7    [slave  keyboard (3)]         ↳ Power Button                              id=8    [slave  keyboard (3)]         ↳ WebCam SC-0311139N                        id=9    [slave  keyboard (3)]         ↳ AT Translated Set 2 keyboard              id=12   [slave  keyboard (3)]      * * * It looks like the problem occur only after resuming from sleep, and beside mouse freezing I get intermittent short beeps, like on keyboard error, for no discernible reason. It might be that it denotes event that causes mouse freezing. I don't know where to start looking...


title: Only allow certain outbound traffic on certain interfaces

text: I have rather an odd issue. I have a server with two network interfaces `eth0` and `eth1`. Each are connected to a different network. Each network has a internet gateway. The server has various _outbound_ connections: http (some scripts on the server scrape websites), nfs client, samba client, dns client and an email fetcher to name but a few. For reasons I won't go into, I need to split these outbound clients up so outbound http, nfs, samba and dns traffic is only requested over `eth0` while everything else goes off through `eth1`. I've read around a few Google searches and it looks like `iptables` is what I'll need but I really haven't got a clue. I'm only used to managing inbound firewall rules through `ufw`. Could somebody start me off with a few example rules and tell me how to get the system to adopt these rules on boot? Ideally without locking me out of my SSH connection (I _can_ get physical access, but I'd rather not). **Edit** I can split the clients over two users if it's possible to limit all outbound traffic from an account to one interface. on paper that seems like it might be easier.


title: When you type a search term in copy mode, is there a way to erase the search term with something like CTRL-U?

text: I enter into copy mode and do a search of the tmux window buffer with `/`. This works great, except when I want to do a second search, the original search term appears at the search prompt and I have to erase it by pressing and holding down the DELETE key. CTRL-U doesn't seem to clear the line. Is there a faster way to clear the search term than DELETE?


title: Is `ln` atomic and reliable on NFS? Could NFS replace GFS in this use case?

text: I have a cluster with a bunch of servers with a shared disk containing a GFS global file system that all nodes access simultaneously. Each node in the cluster run the same program (a shell script is the main core). The system processes files that appear in a couple of input directories, and it works like this:   * the program loops through the input directories.   * for each file found, check existence of a "lock file", if lock file exists skip to next file.   * if no lock file found, create lock file. If lockfile creation failed (race lost), skip to next file   * if "we" own the lock, process the file and move it out of the way when it is finished. This all works very well, but I wonder if there are cheaper (less complex) solutions that would also work. I'm thinking NFS or SMB perhaps. There are two reasons for my use of GFS:   1. each file is stored in one place only (on redundant underlying hardware of course)   2. file locking works reliably I create the lockfile like this:               date '+%s:'${unid} > ${currlock}.${unid}     ln ${currlock}.${unid} ${currlock}     lockrc=$?     rm -f ${currlock}.${unid}      where `$unid` is a unique session identifier and `$currlock` is `/gfs/tmp/lock.${file_to_process}` The beauty of `ln` is that it is **atomic** , so it fails for all but one that attempts the same thing at the same time. So, I guess what I'm asking is: will NFS fill my needs? Does `ln` work reliably in the same way on NFS as on GFS?


title: SFTP and sudo using Windows client?

text: I want to download files from a linux system using a windows client. While there are many SFTP clients I am having the problem, that I need to access files where I need to be root. On the linux system I have the root account disabled, I am using sudo to get root privileges. How to execute "sudo" using an SFTP client? I don't want to change my linux system! Thanks for any hint!


title: Trying to use multiple Debian repositories

text: **General situation:** I need to port a Qt project from MS Visual Studio 2010 to Linux (Debian). In VS 2010 I have Qt **v.4.8.1** , but in Debian it is Qt **v.4.6.1**. This difference prevents me from porting, as some features are not present in 4.6.1. In Debian I am using the stable Squeeze repository. My experience with this OS, and Linux in general, is zero. **The Issue:** Because the highest available version of Qt in the Squeeze repo is 4.6.1, I decided to enable multiple repositories, and get the more recent package from Wheezy instead. To add Wheezy I performed the following actions:   1. Edited `/etc/apt/sources.list`, where I included:     * deb http:// ftp.debian.org/debian/ wheezy main deb-src http://      * ftp.debian.org/debian/ wheezy main   2. Edited `/etc/apt/apt.conf.d*`:     * APT::Default-Release "stable"      * APT::Cache-Limit "50000000" However, it hasn't worked. I can't select the needed package from Wheezy because when I open Synaptic I get this error: > Wow, you exceeded the number of descriptions this APT is capable of I don`t know how to solve with this problem. All I need is to upgrade Qt in Debian. Am I doing this the hard way? Is there a much simpler solution?


I have a backup server which takes backup of other servers and in few days back the backup server started experiencing error and the not able to take back. I think the error log bellow could describe the problem better than me:               2012-09-10 20:05:40 Aborting backup up after signal PIPE     2012-09-10 20:05:44 Got fatal error during xfer (aborted by signal=PIPE)     2012-09-10 21:00:15 full backup started for directory rootBackup (baseline backup #277)          2012-09-11 10:21:07 Aborting backup up after signal PIPE     2012-09-11 10:21:11 Got fatal error during xfer (aborted by signal=PIPE)     2012-09-11 11:00:24 full backup started for directory rootBackup (baseline backup #277)     2012-09-11 13:22:41 Aborting backup up after signal PIPE     2012-09-11 13:22:52 Got fatal error during xfer (aborted by signal=PIPE)     2012-09-11 14:00:30 full backup started for directory rootBackup (baseline backup #277)for directory rootBackup     2012-09-14 06:38:02 Got fatal error during xfer (Child exited prematurely)     2012-09-14 06:38:08 Backup aborted (Child exited prematurely)     2012-09-14 07:00:27 incr backup started back to 2012-09-11 14:00:30 (backup #278) for directory rootBackup     2012-09-20 14:22:04 Got fatal error during xfer (Child exited prematurely)     2012-09-20 14:22:10 Backup aborted (Child exited prematurely)     2012-09-20 15:00:45 incr backup started back to 2012-09-19 05:00:02 (backup #282) for directory rootBackup     2012-09-20 15:26:29 Got fatal error during xfer (Child exited prematurely)     2012-09-20 15:26:35 Backup aborted (Child exited prematurely)     2012-09-20 16:00:12 incr backup started back to 2012-09-19 05:00:02 (backup #282) for directory rootBackup     2012-09-20 16:27:37 Got fatal error during xfer (Child exited prematurely)     2012-09-20 16:27:43 Backup aborted (Child exited prematurely)     2012-09-20 17:00:09 incr backup started back to 2012-09-19 05:00:02 (backup #282) for directory rootBackup     2012-09-20 17:27:37 Got fatal error during xfer (Child exited prematurely)     2012-09-20 17:27:43 Backup aborted (Child exited prematurely)     2012-09-20 18:00:20 incr backup started back to 2012-09-19 05:00:02 (backup #282) for directory rootBackup     2012-09-20 18:27:49 Got fatal error during xfer (Child exited prematurely)     2012-09-20 18:27:55 Backup aborted (Child exited prematurely)     2012-09-20 19:00:26 incr backup started back to 2012-09-19 05:00:02 (backup #282) for directory rootBackup     2012-09-20 19:28:29 Got fatal error during xfer (Child exited prematurely)     2012-09-20 19:28:36 Backup aborted (Child exited prematurely)     2012-09-20 20:00:32 incr backup started back to 2012-09-19 05:00:02 (backup #282) for directory rootBackup     2012-09-20 20:23:06 Got fatal error during xfer (Child exited prematurely)     2012-09-20 20:23:11 Backup aborted (Child exited prematurely)     2012-09-20 21:00:16 incr backup started back to 2012-09-19 05:00:02 (backup #282) for directory rootBackup     2012-09-20 21:20:30 Got fatal error during xfer (Child exited prematurely)     2012-09-20 21:20:37 Backup aborted (Child exited prematurely)     2012-09-20 22:00:15 incr backup started back to 2012-09-19 05:00:02 (backup #282) for directory rootBackup     2012-09-20 22:15:21 Got fatal error during xfer (Child exited prematurely)     2012-09-20 22:15:26 Backup aborted (Child exited prematurely)     2012-09-20 23:00:21 incr backup started back to 2012-09-19 05:00:02 (backup #282) for directory rootBackup     2012-09-20 23:15:06 Got fatal error during xfer (Child exited prematurely)     2012-09-20 23:15:11 Backup aborted (Child exited prematurely)     2012-09-21 01:00:09 incr backup started back to 2012-09-19 05:00:02 (backup #282) for directory rootBackup     2012-09-21 01:27:47 Got fatal error during xfer (Child exited prematurely)     2012-09-21 01:27:53 Backup aborted (Child exited prematurely)     2012-09-21 02:00:20 incr backup started back to 2012-09-19 05:00:02 (backup #282) for directory rootBackup     2012-09-21 02:34:06 Got fatal error during xfer (Child exited prematurely)     2012-09-21 02:34:13 Backup aborted (Child exited prematurely)     2012-09-21 03:00:21 incr backup started back to 2012-09-19 05:00:02 (backup #282) for directory rootBackup     2012-09-21 03:26:13 Got fatal error during xfer (Child exited prematurely)     2012-09-21 03:26:19 Backup aborted (Child exited prematurely)     2012-09-21 04:00:14 incr backup started back to 2012-09-19 05:00:02 (backup #282) for directory rootBackup     2012-09-21 04:17:05 Got fatal error during xfer (Child exited prematurely)     2012-09-21 04:17:11 Backup aborted (Child exited prematurely)     2012-09-21 05:00:09 incr backup started back to 2012-09-19 05:00:02 (backup #282) for directory rootBackup     2012-09-21 05:27:00 Aborting backup up after signal PIPE     2012-09-21 05:27:02 Got fatal error during xfer (aborted by signal=PIPE)     2012-09-21 06:00:04 incr backup started back to 2012-09-19 05:00:02 (backup #282) for directory rootBackup     2012-09-21 06:19:01 Aborting backup up after signal PIPE     2012-09-21 06:19:02 Got fatal error during xfer (aborted by signal=PIPE)     2012-09-21 07:00:01 incr backup started back to 2012-09-19 05:00:02 (backup #282) for directory rootBackup     2012-09-21 07:11:57 incr backup 283 complete, 138 files, 282332868 bytes, 0 xferErrs (0 bad files, 0 bad shares, 0 other)     2012-09-22 07:00:09 incr backup started back to 2012-09-19 05:00:02 (backup #282) for directory rootBackup     2012-09-22 07:11:31 Got fatal error during xfer (Child exited prematurely)     2012-09-22 07:11:36 Backup aborted (Child exited prematurely)     2012-09-22 08:00:07 incr backup started back to 2012-09-19 05:00:02 (backup #282) for directory rootBackup     2012-09-22 08:16:04 Got fatal error during xfer (Child exited prematurely)     2012-09-22 08:16:10 Backup aborted (Child exited prematurely)     2012-09-22 09:00:05 incr backup started back to 2012-09-19 05:00:02 (backup #282) for directory rootBackup     2012-09-22 09:25:18 Got fatal error during xfer (Child exited prematurely)     2012-09-22 09:25:26 Backup aborted (Child exited prematurely)     2012-09-22 10:00:29 incr backup started back to 2012-09-19 05:00:02 (backup #282) for directory rootBackup     2012-09-22 10:26:23 Got fatal error during xfer (Child exited prematurely)     2012-09-22 10:26:28 Backup aborted (Child exited prematurely)     2012-09-22 11:00:13 incr backup started back to 2012-09-19 05:00:02 (backup #282) for directory rootBackup     2012-09-22 11:23:26 Got fatal error during xfer (Child exited prematurely)     2012-09-22 11:23:32 Backup aborted (Child exited prematurely)     2012-09-22 12:00:13 incr backup started back to 2012-09-19 05:00:02 (backup #282) for directory rootBackup     2012-09-22 12:16:27 Got fatal error during xfer (Child exited prematurely)     2012-09-22 12:16:33 Backup aborted (Child exited prematurely)     2012-09-22 13:00:11 incr backup started back to 2012-09-19 05:00:02 (backup #282) for directory rootBackup     2012-09-22 13:25:22 Got fatal error during xfer (Child exited prematurely)     2012-09-22 13:25:27 Backup aborted (Child exited prematurely)     2012-09-22 14:00:33 incr backup started back to 2012-09-19 05:00:02 (backup #282) for directory rootBackup     2012-09-22 14:26:53 Got fatal error during xfer (Child exited prematurely)     2012-09-22 14:26:58 Backup aborted (Child exited prematurely)     2012-09-22 15:00:10 incr backup started back to 2012-09-19 05:00:02 (backup #282) for directory rootBackup     2012-09-22 15:22:22 Got fatal error during xfer (Child exited prematurely)     2012-09-22 15:22:30 Backup aborted (Child exited prematurely)     2012-09-22 16:00:38 incr backup started back to 2012-09-19 05:00:02 (backup #282) for directory rootBackup     2012-09-22 16:25:32 Got fatal error during xfer (Child exited prematurely)     2012-09-22 16:25:38 Backup aborted (Child exited prematurely)     2012-09-22 17:00:11 incr backup started back to 2012-09-19 05:00:02 (backup #282) for directory rootBackup     2012-09-22 17:24:36 Got fatal error during xfer (Child exited prematurely)     2012-09-22 17:24:41 Backup aborted (Child exited prematurely)     2012-09-22 18:00:21 incr backup started back to 2012-09-19 05:00:02 (backup #282) for directory rootBackup     2012-09-22 18:24:42 Got fatal error during xfer (Child exited prematurely)     2012-09-22 18:24:50 Backup aborted (Child exited prematurely)     2012-09-22 19:00:20 incr backup started back to 2012-09-19 05:00:02 (backup #282) for directory rootBackup     2012-09-22 19:24:47 Got fatal error during xfer (Child exited prematurely)     2012-09-22 19:24:53 Backup aborted (Child exited prematurely)     2012-09-22 20:00:20 incr backup started back to 2012-09-19 05:00:02 (backup #282) for directory rootBackup     2012-09-22 20:23:21 Got fatal error during xfer (Child exited prematurely)     2012-09-22 20:23:26 Backup aborted (Child exited prematurely)     2012-09-22 21:00:14 incr backup started back to 2012-09-19 05:00:02 (backup #282) for directory rootBackup     2012-09-22 21:43:12 Aborting backup up after signal PIPE     2012-09-22 21:43:13 Got fatal error during xfer (aborted by signal=PIPE)     2012-09-22 22:00:10 incr backup started back to 2012-09-19 05:00:02 (backup #282) for directory rootBackup     2012-09-22 22:14:58 Got fatal error during xfer (Child exited prematurely)     2012-09-22 22:15:04 Backup aborted (Child exited prematurely)     2012-09-22 23:00:15 incr backup started back to 2012-09-19 05:00:02 (backup       **Note:** I am using backuppc for backup. Backup server is able to take backup for other servers but for one server its experiencing error. So I believe there must be some problem in that particular _client_ server so that its prematurely exiting . **Update:** Network seams to be OK( **netstat -in** ) on client side.               Kernel Interface table     Iface   MTU Met   RX-OK RX-ERR RX-DRP RX-OVR    TX-OK TX-ERR TX-DRP TX-OVR Flg     eth0       1500 0  1297053361      0 126811 0      2321209324      0      0      0 BMRU     lo        16436 0  35169163      0      0 0      35169163      0      0      0 LRU      **The bellow is the contents of:** file /var/lib/backuppc/pc/ns381613.ovh.net- daily/XferLOG.bad.z, modified 2012-11-21 17:25:14 (Extracting only Errors)               full backup started for directory www (baseline backup #300)     Connected to ns381613.ovh.net:873, remote version 30     Negotiated protocol version 28     Connected to module www     Sending args: --server --sender --numeric-ids --perms --owner --group -D --links --hard-links --times --block-size=2048 --recursive --ignore-times . .     Xfer PIDs are now 4845     [ skipped 120129 lines ]     Remote[2]: file has vanished: "/mywebsite.com/sessions/sess_017p907qdbm3rn5vv8gdin2ab7" (in www)     Remote[2]: file has vanished: "/mywebsite.com/sessions    Remote[2]: file has vanished: "/mywebsite.com/sessions/sess_vkn369qbj5dhoj4no0bei1sen3" (in www)     Remote[2]: file has vanished: "/mywebsite.com/sessions/sess_vkn7demudpv0othe6e98s2v1v4" (in www)     Remote[2]: file has vanished: "/mywebsite.com/sessions/sess_voseo6s018c8tmocgthj87irj1" (in www)     Remote[2]: file has vanished: "/mywebsite.com/sessions/sess_vqpqhv16urbrh99acecmujj8j1" (in www)     Remote[2]: file has vanished: "/mywebsite.com/sessions/sess_vs0j1bsfina3f4913lorb7j681" (in www)     Remote[2]: file has vanished: "/mywebsite.com/sessions/sess_vu3jupeug0qpls9f6ikub544t0" (in www)     Remote[2]: file has vanished: "/mywebsite.com/sessions/sess_vu3pp00ko7uip62jf7vp8o8la1" (in www)     [ skipped 55244 lines ]     Read EOF: Connection reset by peer     Can't write 32780 bytes to socket     Tried again: got 0 bytes     finish: removing in-process file mywebsite.com/www-bk-17-oct-2012/lms/archive/LAWYER_1350329888/document/screencasts/TechtutorTv.flv     Child is aborting     Done: 160949 files, 2244371209 bytes     Got fatal error during xfer (aborted by signal=PIPE)     Backup aborted by user signal     Not saving this as a partial backup since it has fewer files than the prior one (got 160949 and 160949 files versus 5985910)      **Then I tried:** > sudo -u backuppc /usr/share/backuppc/bin/BackupPC_dump -v -f > ns381613.ovh.net **Output**               Sending args: --server --sender --numeric-ids --perms --owner --group -D --links --hard-links --times --block-size=2048 --recursive --ignore-times . .          Xfer PIDs are now 22310     xferPids 22310     Remote[1]: rsync error: timeout in data send/receive (code 30) at io.c(137) [sender=3.0.7]     Read EOF:      Tried again: got 0 bytes     Child is aborting     Parent read EOF from child: fatal error!     Done: 0 files, 0 bytes     Got fatal error during xfer (Child exited prematurely)     cmdSystemOrEval: about to system /bin/ping -c 1 ns381613.ovh.net     cmdSystemOrEval: finished: got output PING ns381613.ovh.net (188.165.247.43) 56(84) bytes of data.     64 bytes from ns381613.ovh.net (188.165.247.43): icmp_req=1 ttl=60 time=0.591 ms          --- ns381613.ovh.net ping statistics ---     1 packets transmitted, 1 received, 0% packet loss, time 0ms     rtt min/avg/max/mdev = 0.591/0.591/0.591/0.000 ms          cmdSystemOrEval: about to system /bin/ping -c 1 ns381613.ovh.net     cmdSystemOrEval: finished: got output PING ns381613.ovh.net (188.165.247.43) 56(84) bytes of data.     64 bytes from ns381613.ovh.net (188.165.247.43): icmp_req=1 ttl=60 time=0.366 ms          --- ns381613.ovh.net ping statistics ---     1 packets transmitted, 1 received, 0% packet loss, time 0ms     rtt min/avg/max/mdev = 0.366/0.366/0.366/0.000 ms          CheckHostAlive: returning 0.366     Backup aborted (Child exited prematurely)     Not saving this as a partial backup since it has fewer files than the prior one (got 0 and 0 files versus 1)     dump failed: Child exited prematurely      In the above output I see it says timeout, But I have increased the timeout variable in configuration.


title: Error when try to install KVM on CentOS

text: I am trying to install KVM from Installation doc. When I run the command `modprobe kvm-intel` I get the error `FATAL: Error inserting kvm_intel (/lib/modules/2.6.32-279.5.2.el6.x86_64/kernel/arch/x86/kvm/kvm-intel.ko): Operation not supported`. I also run the `cat /proc/cpuinfo` and output is as below.               processor       : 0     vendor_id       : GenuineIntel     cpu family      : 6     model           : 42     model name      : Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz     stepping        : 7     cpu MHz         : 2494.420     cache size      : 3072 KB     fpu             : yes     fpu_exception   : yes     cpuid level     : 13     wp              : yes     flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss syscall nx rdtscp lm constant_tsc up arch_perfmon pebs bts xtopology tsc_reliable nonstop_tsc aperfmperf unfair_spinlock pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 popcnt aes xsave avx hypervisor lahf_lm ida arat epb xsaveopt pln pts dts     bogomips        : 4988.84     clflush size    : 64     cache_alignment : 64     address sizes   : 40 bits physical, 48 bits virtual     power management:      May be I am missing some command but which I dont know :(.


title: Execute bash scripts on entering a directory

text: What is the best way to execute a script when entering into a directory?   When I move into a new directory I would like bash to execute the projectSettings.bash script much like RVM does.


title: Write a zsh method the responds to a `cd` command

text: I'm trying to write a script that will be called when navigating into certain directories. What I'd want is to have a message appear when I enter certain (not every) directories based on what it finds in there. Is there any way to write a function in my .zshrc that will respond to cd commands into certain directories, or do I simply have to alias cd?


title: Networking is not starting up?

text: I have a Raspberry Pi and while its plugged into the network via ethernet, my setup works and I can connect to the static IP. Today I bought a wlan adapter and after install it works great too... but only one thing. It will not start up by it self? To get the wlan running I actually have to plug the LAN cable in for a few sec, then I can connect by its static IP. After the LAN cable is plugged in I can unplug it and connect to it wirelessly. How wierd is that? I'm guessing something aint starting up? Before it notices the LAN cable and starts up the service? My setup is:               auto lo     iface lo inet loopback          auto eth0     iface eth0 inet static             address 192.168.1.50             netmask 255.255.255.0             gateway 192.168.1.1          auto wlan0     iface wlan0 inet static             wpa-ssid <ssid>             wpa-psk <key>             address 192.168.1.51             netmask 255.255.255.0             gateway 192.168.1.1


title: Why isn't this sed regex matching?

text: I've recently started learning `sed`. I did               $seq 10 | sed '/[^049]/d'      I was expecting               4      9     10      as output. But I got               4     9      Where am I making mistake in understanding this regex?


title: Behavior of stdin/stdout in conjunction with subshells and cd command

text: I have the following series of commands:               cd / && ls | ( cd /tmp && cat >dumpfile)      This series of commands does the following: it creates a file named `/tmp/dumpfile`. This file contains a listing of the root directory. The `cd / && ls` output gets piped to a subshell. What I find **odd** is that in the subshell, instead of `cd /tmp` swallowing the `ls` output, the later `cat >dumpfile` gets it and writes it to a file. What is going on here?


title: Awesome widget formatted print

text: I have the following widget definition:               netwidget = widget({ type = "textbox" })     vicious.register(netwidget, vicious.widgets.net, '${p17p1 down_kb} ${p17p1 up_kb}', 3)      Which prints network usage on /dev/p17p1. How can I make those numbers be a fixed width say, `%3.2f` or something?


title: TinyCore Linux & RVM

text: I'm running TinyCore Linux and when I tried to install RVM (needed a portable linux distro for QA Automation) I keep getting an error `sh: syntax error:unexpected redirection`. I am unsure why I am getting this error since the `echo $SHELL` command returns BASH. Any ideas on how I could get this working or get more details on the issue?


title: How to write script that watching directory for lessc command?

text: I use lesscss extensively. I want to write bash script that watching my target directory, and then when `.less` file was modified and saved, command: `lessc` should be executed automatically. For example, I have directory, named `css`. When `css/app/main.less` was modified, command `lessc main.less > main.css` should be executed.


title: Mirroring site with an offset

text: I followed answers here http://webapps.stackexchange.com/questions/12311/how- to-download-all-english-books-from-gutenberg which are using `wget` I want to download using `wget` from a particular starting offset `http://www.gutenberg.org/robot/harvest?offset=100000filetypes[]=txt`. As I've already downloaded previous files, but it starts from the first page. How can I avoid that?


title: Anyone know a dynamic lyric display application for mpd that works on Arch Linux?

text: I'm looking for a dynamic lyric display app, not like in sonata, static display in a tab, but dynamic ones, show corresponding lines as the music plays


title: reformat a text file to have all text on one line using CentOS 5.6

text:
I have a 210-line block of HTML that I have stored in a HTML for debugging purposes. The HTML, as you would expect, is formatted accordingly so is stored in the file with spaces and tabs. Is it possible to convert this file to having all the HTML on one line? I am on CentOS 5.6. For example, is there an easy way to change this:

     ... content in here ...

       to this:


title: Upgrading curl in Centos 5.6

text: There is any easy way to upgrade the default curl 7.15 to the 7.20 or 7.21 version? Any repository to install into YUM. Edit: I found this repository with the last version http://nervion.us.es/city-fan/yum-repo/rhel5/i386/


title: Handling filenames that contains a hyphen, within a script

text: I have few files that was incorrectly encoded, during extraction, file names now become something similar to `-a -b`, Now I'm trying to fix this issue with: `convmv -f ENCODING -t utf8 --notest *` But got:               Unknown option: a     Unknown option: b      So what's the right way to handle it, in a script ?


title: What is sport and dport?

text: I want to stop internet on my system using iptables so what should I do? `iptables -A INPUT -p tcp --sport 80 -j DROP` or `iptables -A INPUT -p tcp --dport 80 -j DROP` ?


title: rfkill unblock bluetooth is timing out

text: I'm creating a Bluetooth script that controls every aspect of the Bluetooth experience with headphones. As part of this I want to reset the Bluetooth adapter. I'm using:               rfkill block bluetooth     rfkill unblock bluetooth      This should toggle and it does work, just not every time. There is also no pattern to when it doesn't work. Sometimes (and often about 60% of the time) it times out. Checking the logs reveal: GOOD CASE :               Product: Bluetooth USB Host Controller     Manufacturer: Atheros Communications     SerialNumber: Alaska Day 2006     Adapter /org/bluez/4100/hci0 has been enabled     Endpoint registered: sender=:1.25 path=/MediaEndpoint/HFPAG     Endpoint registered: sender=:1.25 path=/MediaEndpoint/HFPHS     Endpoint registered: sender=:1.25 path=/MediaEndpoint/A2DPSource     Endpoint registered: sender=:1.25 path=/MediaEndpoint/A2DPSink      BAD CASE (WHEN IT TIMES OUT) :               Product: Bluetooth USB Host Controller     Manufacturer: Atheros Communications     SerialNumber: Alaska Day 2006     Bluetooth: hci0 command 0x1003 tx timeout     Bluetooth: hci0 command 0x1001 tx timeout      Is there some way I can increase this timeout, failing that using BASH, check for the timeout, and in a loop - just keep retrying till it works - because eventually it does, if the adapter is completely reset again using rfkill block.


title: Installing jdk 1.4.2 on fedora 14

text: I am trying to install wsdgate, In the installation they have recommended to use jdk 1.4.2, I already have jdk 1.7 but I am not able to install JDK 1.4.2 on fedora 14. I got error like this   `could not execute binary file`   can anyone please help me who has done something similar before? what should i do to install jdk version 1.4 in my fedora?


title: sources for doing profiling of kernel portions?

text: Related to my previous post. I did not find any specific driver for which I can do profiling and benchmarking. However there is a one driver jffs2 filesystem for flash devices but I didn't know about any specific profiling tool and is it possible to do profiling without having flash device(that means for virtual hardware). And please tell me if we can do profiling (by changing various parameters) test for other kernel portions like memory management and process scheduling and what are the sources to study about it and profiling tools to do it efficiently and accurately.


title: substrings and regexps

text: I have a string contained in a variable, and I want to extract substrings based on position relative to another substring. My solution seems to work unless the string is sent to a function as an arg. I am using the bash shell.               #!/usr/bin/bash          var0="-a check one two three"     var1="check"          function getsubstr() {     echo ${*#*"${2}"}      }          # this prints 'one two three' which is what I want     echo ${var0#*"${var1}"}          # this prints '-a one two three', not what I want.     getsubstr $var0      note that when I put `echo $*` in the `getsubstr` function it prints the same string as `$var0` (-> '-a check one two three'), and that when I put `echo $2` in the `getsubstr` function is prints the same string as `$var1` (-> 'check'). So, it seems to me that I'm asking to print the same substring in both circumstances. A further conundrum is that if, instead of `echo ${*#*"${2}"}` in the `getsubstr` function I use `echo ${*%"${2}"*}` , I get the exact same result. Any help in understanding this behavior would be greatly appreciated. BTW, I realize that `${*:3}` inside the `getsubstr` function works to return the substring I want, but I'm trying to understand the `#*<regexp>` and `%<regextp>*` behavior.


title: No sound on Ubuntu 11.04

text: I have a problem on my notebook (MSI E-620) running Ubuntu Natty Narwhal x86. When I installed it there was just output, when I plugged my headphones in. The speakers in my notebook do not play anything. I tried a lot - now I don't have a listed sound device in Audio-Settings. The following error appears every time I try to install alsa-driver:               root@andre-EX620:/home/andre/Downloads/alsa-src/alsa-driver-1.0.8# ./configure      checking for gcc... gcc     checking for C compiler default output... a.out     checking whether the C compiler works... yes     checking whether we are cross compiling... no     checking for suffix of executables...      checking for suffix of object files... o     checking whether we are using the GNU C compiler... yes     checking whether gcc accepts -g... yes     checking for gcc option to accept ANSI C... none needed     checking for ranlib... ranlib     checking for a BSD-compatible install... /usr/bin/install -c     checking how to run the C preprocessor... gcc -E     checking for egrep... grep -E     checking for ANSI C header files... yes     checking for an ANSI C-conforming const... yes     checking for inline... inline     checking whether time.h and sys/time.h may both be included... yes     checking whether gcc needs -traditional... no     checking for current directory... /home/andre/Downloads/alsa-src/alsa-driver-1.0.8     checking cross compile...      checking for directory with kernel source... /lib/modules/2.6.38-11-generic/build     checking for directory with kernel build...      checking for kernel version... 0.0.0     checking for GCC version... ./configure: eval: line 3547: syntax error near unexpected token `)'     ./configure: eval: line 3547: `my_compiler_version=4.5.2-8ubuntu4)'      But the Audio-devices are there..               root@andre-EX620:/home/andre/Downloads/alsa-src/alsa-driver-1.0.8# lspci | grep -i Audio     00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 03)     06:00.1 Audio device: ATI Technologies Inc RV620 Audio device [Radeon HD 34xx Series]      Any suggestions? **Solution:** I solved the problem by executing the following lines:               su root     vi /etc/modprobe.d/alsa-base.conf #Am Ende 'options snd-hda-intel model=3stack-6ch-dig', bzw. eine Option von hier einfügen: http://wiki.ubuntuusers.de/Soundkarten_konfigurieren/HDA?redirect=no#Beispielkonfigurationeneinfügen          add-apt-repository ppa:ubuntu-audio-dev/ppa     apt-get update     apt-get install linux-alsa-driver-modules-$(uname -r)     alsaconf     restart -r now


title: how will I make interactive login

text: I'm having trouble in making script with interactive login. I have made one but it doesn't ask the login, it automatically log in when i run the script. i just need the output like this:               please enter ftp server :     username :     password :


title: Using nohup at /etc/init.d/service

text: I have been trying to create a daemon using `/etc/init.d/myservice` and it will call a shell script that contains `nohup` within the script line. Will it affect it if I could do `service stop` later?


title: How to use Emacs to run Matlab programs?

text: I'm learning matlab and using emacs to edit .m files. Is there a method in Emacs to call matlab to run programs?


title: Understanding getlogin()

text: I think the previous iteration of this question was a little bit like a carpet bomb of questions, so that may have turned people off to it (to the point of almost being flagged for removal) so I'll start a new one that hopefully people can have an easier time with. Basically, my overall interest is in understanding `logname` and `getlogin()` as it relates to audit trails. It breaks down like this: 1) My understanding is that `logname` and `getlogin()` both display the `auid` that would/will end up showing in the session's audit logs. Is that correct? I know `auid` is an immutable process attribute, but I was interested in knowing whether the two are necessarily the same or just usually the same. This would help me with writing scripts/helper programs that can make access control decisions based on the user's original identity, rather than just who they happen to be at the moment or a mutable environmental variable. 2) I still don't understand how the exploit of CVE 2003-0388 being shown was supposed to work. If someone could explain that to me, it would be great. My primary interest is with point #1, though.


title: Ubuntu email: Wrong (and unexpected) postfix mapping

text: I am quite experienced with Linux but a beginner with email configuration and with postfix. On my desktop I have installed Ubuntu Linux 10.04 with package postfix 2.8.5-2~build0.10.04. I have configured postfix to send email through my ISP and this works fine: I can open `mutt` and send an email to an external address (e.g. google) and the email is delivered correctly. The next thing I wanted to do was to define a mapping so that if I send a local email, it is delivered to my address which has the form:               my-username@my-isp-provider.net      In order to do this, I followed the postfix documentation and configured postfix as follows:               /etc/postfix/main.cf:         smtp_generic_maps = hash:/etc/postfix/generic          /etc/postfix/generic:         @my-hostname       my-username@my-isp-provider.net         @localhost         my-username@my-isp-provider.net      So, if I have understood the documentation correctly, this should cause **all messages** sent to **any local user** `user-x` with the addresses `user-x@my- hostname` and `user-x@localhost` to be delivered to `my-username@my-isp- provider.net`. Instead, I observe the following unexpected behaviour:   * If I send email to `my-username@localhost`, the message is delivered to my Linux box and not to my ISP account `my-username@my-isp-provider.net`.   * Even more strangely, my ISP administrator has sent me an email, that they are receiving messages for destination `root@my-isp-provider.net` with subject 'Subject: Anacron job 'cron.daily' on my-hostname'. I suppose this is a local notification of my Linux box that is meant for `root`, but how does this get mapped to `root@my-isp-provider.net`? At the moment I have checked all my configuration files and I have not clue as to how I can explain this behaviour:   * Why are my messages to address `my-username@localhost` not mapped to `my-username@my-isp-provider.net` as specified in the configuration file?   * Where do these messages for `root@my-isp-provider.net` come from, if the only mapping I have specifies the complete address of the receiver (`my-username@my-isp-provider.net`) **explicitly**? So if a message for `root@locahost` gets mapped, it should be delivered to `my-username@my-isp-provider.net` and not to `root@my-isp-provider.net`.


title: How to switch to a screen with two digit index in screen command?

text: Let's say we have opened more than 10 screens in the `screen` program. How to switch to a screen using Ctrl+A, n where n > 9?


title: Can't run 32 bit python on 64 bit Ubuntu: error while loading shared libraries: libutil.so.1

text: I'm trying to run a 32 bit version of python on 64 bit Ubuntu 12.04. There are alternatives to running this specific binary, but I'm more interested in understanding what's causing the error than workarounds for it. This is the full error I'm getting:               /build/toolchain/lin32/python-2.7.1/bin/python: error while loading shared libraries: libutil.so.1: cannot open shared object file: No such file or directory      I got a friend who is using the same system to run `ldd` on his machine to see the exact library path that was missing:               $ ldd /build/toolchain/lin32/python-2.7.1/bin/python         linux-gate.so.1 =>  (0xf77c5000)         libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xf778e000)         libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf7789000)         libutil.so.1 => /lib/i386-linux-gnu/libutil.so.1 (0xf7784000)         libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xf7758000)         libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf75ae000)         /lib/ld-linux.so.2 (0xf77c6000)      On my system, for the libutil.so.1 line I get               libutil.so.1 => not found      The interesting thing is that I do have the same shared library my friend has on my machine:               $ ls /lib/i386-linux-gnu/libutil.so.1      /lib/i386-linux-gnu/libutil.so.1      So if I have the library, why can't python find it? It might be worth noting that the latest python works fine and even the 64 bit version of python 2.7.1 that's in the toolchain works fine. Update: Here is the strace output:               $ strace /build/toolchain/lin32/python-2.7.1/bin/python     execve("/build/toolchain/lin32/python-2.7.1/bin/python", ["/build/toolchain/lin32/python-2."...], [/* 46 vars */]) = 0     [ Process PID=6192 runs in 32 bit mode. ]     brk(0)                                  = 0x81b8000     mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xfffffffff776d000     access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)     open("/etc/ld-mfert.so.cache", O_RDONLY) = 3     fstat64(3, {st_mode=S_IFREG|0644, st_size=10518, ...}) = 0     mmap2(NULL, 10518, PROT_READ, MAP_PRIVATE, 3, 0) = 0xfffffffff776a000     close(3)                                = 0     open("/opt/McAfee/runtime/2.0/lib/libpthread.so.0", O_RDONLY) = 3     read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\200A\0\0004\0\0\0"..., 512) = 512     fstat64(3, {st_mode=S_IFREG|0755, st_size=60992, ...}) = 0     mmap2(NULL, 332928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xfffffffff7718000     mmap2(0xf7726000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xd) = 0xfffffffff7726000     mmap2(0xf7728000, 267392, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xfffffffff7728000     close(3)                                = 0     open("/opt/McAfee/runtime/2.0/lib/libdl.so.2", O_RDONLY) = 3     read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\360\v\0\0004\0\0\0"..., 512) = 512     fstat64(3, {st_mode=S_IFREG|0755, st_size=9892, ...}) = 0     mmap2(NULL, 12400, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xfffffffff7714000     mmap2(0xf7716000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0xfffffffff7716000     close(3)                                = 0     open("/lib/tls/i686/sse2/libutil.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)     stat64("/lib/tls/i686/sse2", 0xff8a0924) = -1 ENOENT (No such file or directory)     open("/lib/tls/i686/libutil.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)     stat64("/lib/tls/i686", 0xff8a0924)     = -1 ENOENT (No such file or directory)     open("/lib/tls/sse2/libutil.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)     stat64("/lib/tls/sse2", 0xff8a0924)     = -1 ENOENT (No such file or directory)     open("/lib/tls/libutil.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)     stat64("/lib/tls", 0xff8a0924)          = -1 ENOENT (No such file or directory)     open("/lib/i686/sse2/libutil.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)     stat64("/lib/i686/sse2", 0xff8a0924)    = -1 ENOENT (No such file or directory)     open("/lib/i686/libutil.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)     stat64("/lib/i686", 0xff8a0924)         = -1 ENOENT (No such file or directory)     open("/lib/sse2/libutil.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)     stat64("/lib/sse2", 0xff8a0924)         = -1 ENOENT (No such file or directory)     open("/lib/libutil.so.1", O_RDONLY)     = -1 ENOENT (No such file or directory)     stat64("/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0     open("/usr/lib/tls/i686/sse2/libutil.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)     stat64("/usr/lib/tls/i686/sse2", 0xff8a0924) = -1 ENOENT (No such file or directory)     open("/usr/lib/tls/i686/libutil.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)     stat64("/usr/lib/tls/i686", 0xff8a0924) = -1 ENOENT (No such file or directory)     open("/usr/lib/tls/sse2/libutil.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)     stat64("/usr/lib/tls/sse2", 0xff8a0924) = -1 ENOENT (No such file or directory)     open("/usr/lib/tls/libutil.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)     stat64("/usr/lib/tls", 0xff8a0924)      = -1 ENOENT (No such file or directory)     open("/usr/lib/i686/sse2/libutil.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)     stat64("/usr/lib/i686/sse2", 0xff8a0924) = -1 ENOENT (No such file or directory)     open("/usr/lib/i686/libutil.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)     stat64("/usr/lib/i686", 0xff8a0924)     = -1 ENOENT (No such file or directory)     open("/usr/lib/sse2/libutil.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)     stat64("/usr/lib/sse2", 0xff8a0924)     = -1 ENOENT (No such file or directory)     open("/usr/lib/libutil.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)     stat64("/usr/lib", {st_mode=S_IFDIR|0755, st_size=36864, ...}) = 0     writev(2, [{"/build/toolchain/lin32/python-2."..., 46}, {": ", 2}, {"error while loading shared libra"..., 36}, {": ", 2}, {"libutil.so.1", 12}, {": ", 2}, {"cannot open shared object file", 30}, {": ", 2}, {"No such file or directory", 25}, {"\n", 1}], 10/build/toolchain/lin32/python-2.7.1/bin/python: error while loading shared libraries: libutil.so.1: cannot open shared object file: No such file or directory     ) = 158     exit_group(127)                         = ?      Output request by Gilles:               $ ls -l /lib*/ld-*.so*     -rwxr-xr-x  1 root root 156872 Nov  1  2012 /lib64/ld-2.12.so     lrwxrwxrwx  1 root root     10 Nov 19  2012 /lib64/ld-linux-x86-64.so.2 -> ld-2.12.so     lrwxrwxrwx  1 root root     20 Nov 19  2012 /lib64/ld-lsb-x86-64.so -> ld-linux-x86-64.so.2     lrwxrwxrwx. 1 root root     20 Oct 25  2012 /lib64/ld-lsb-x86-64.so.3 -> ld-linux-x86-64.so.2     -rwxr-xr-x  1 root root 142472 Nov  1  2012 /lib/ld-2.12.so     lrwxrwxrwx  1 root root     10 Nov 19  2012 /lib/ld-linux.so.2 -> ld-2.12.so     $ cat /etc/ld.so.conf     include /etc/ld.so.conf.d/*.conf     $ for f in /etc/ld.so.conf.d/*; do echo "File: $f"; cat "$f"; done     File: /etc/ld.so.conf.d/i386-linux-gnu_GL.conf     File: /etc/ld.so.conf.d/i686-linux-gnu.conf     # Multiarch support     /lib/i386-linux-gnu     /usr/lib/i386-linux-gnu     /lib/i686-linux-gnu     /usr/lib/i686-linux-gnu     File: /etc/ld.so.conf.d/libc.conf     # libc default configuration     /usr/local/lib     File: /etc/ld.so.conf.d/nvidia_settings.conf     /usr/lib/nvidia-settings     File: /etc/ld.so.conf.d/x86_64-linux-gnu.conf     # Multiarch support     /lib/x86_64-linux-gnu     /usr/lib/x86_64-linux-gnu     File: /etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf     /usr/lib/nvidia-current     /usr/lib32/nvidia-current     File: /etc/ld.so.conf.d/zz_i386-biarch-compat.conf     # Legacy biarch compatibility support     /lib32     /usr/lib32


title: How to find path where jdk installed?

text: I'm a newbie to `Linux` so please forgive me for asking such stupid question! I'd installed `jdk1.7.0.rpm` package in `RHEL6`.   Where I do find the `path` and to `execute` my first `java` program?


title: How can I issue parallel commands to remote nodes with different arguments?

text: I need to execute an application in parallel on multiple Ubuntu servers while supplying different arguments for different servers. I tried to google it, but could not get to the possible solution. I even experimented with ssh/pdsh/parallel, but without success. To explain the scenario further, here is a non-working example (with `pdsh`) where `script.sh` should be executed on all 3 servers in parallel but with different arguments. FYI, I already have public/private ssh-key (password-free login) in place.               pdsh -w server1,server2,server3 -l username script.sh args      Where `args` should be 1 for server1, 2 for server2 etc. I would appreciate if someone can help me achieve this, either using `pdsh` or some other tool available in Ubuntu.


title: Guide to installing Xen on CentOS 5.9 (That is still valid)

text: I need an idiots guide to installing Xen Hypervisor on CentOS 5.9 We attempted to install it on 6.3 before, but completely failed, so we reverted to 5.9 to see if we had more luck. We had issues trying to find the right kernel download etc and RPM's weren't working correctly, and it was just a mess in general. So I was wondering if anybody knew of a great step by step guide to installing Xen Hypervisor on CentOS 5.9 for idiots, that is still 100% working?


title: Automating typing strings in xmacro

text: Could you show me how to write macro in `xmacro` (that will work in whole desktop environment) that is able to expand strings? E.g. I will type "thx" and it will expand to "thank you".


title: Evolution of Operating systems from Unix

text: Can you explain the evolution hierarchy of operating systems (Linux and Windows) from Unix?


title: Problem with brightness on OpenSuse 13.1

text: I'm using OpenSUSE 13.1 KDE on Lenovo G500 with AMD RADEON and I can't adjust the brightness in any mode I know. I tried to type in a terminal the command `xbacklight -dec percentage` but it doesn't work and it prints the message: > No outputs have backlight property How I can fix this problem?


title: Confusions mitigation while working similar environments in multiple servers

text: I often have to open multiple ssh sell terminals of remote servers together., eg. Dev and test. These paths and applications are exactly similar. And I am often confused if I run a particular command intended on one window to the other one. For example, I want to update svn of a dev environment, but likely to run it on test environment, which if done, invites problems. Would you please share how you handle controlling the terminals precisely?


title: Why can't I run programs on another partition in Linux?

text: So for convenience, I store all my data on my Windows partition so that I can access my data easily from both Linux and Windows. However, I tried compiling a C++ program with g++, and found out that I cannot run the program with `./program_filename`, as it tells me               bash: program_filename: Permission denied      Doing               cp program_filename ~/program_filename      and running it from my home directory works just fine, however. So I tried `chmod +rwx program_filename`, but `ls -l` shows that the permissions are still set as `-rw-------.` for all files in the directory. Nothing changes when I do this as root, either. Is there a simple fix for this? (In case it's useful, I am running Fedora 16 x64)


title: Test if a string has a period in it with bash

text: I want to run a bash command on output from Drupal's drush command-line interface. `drush site-alias` returns a list of webroots, first showing the name of the group, and then each site in that group. The site itself is aliased in the form `group.site`. For instance, you might get internal internal.site1 internal.site2 external external.site1 external.site2 marketing marketing.site1 marketing.site2 I want to do a command on each of the site aliases, but not on the group alias itself. I need to test if the string has a period in it, and if so, run it:               for i in $(drush site-alias); do {if no period) drush $i command; done;      How can I run this test?


title: How to utilize TUN/TAP tunnel from user program?

text: I recently discovered the existence of Linux TUN/TAP interfaces and am still trying to understand them. I think I get the basic concept - pseudo devices are created which emulate a network interface and instead of passing data to hardware it is passed to a userspace program. How would you direct an unrelated program to utilize this tunnel? For example, before the tunnel is created my system only contains eth0 and lo, the normal ethernet interface (wired to my local network) and the loopback interface. After a program creates and configures a tunnel, I have a new interface gr0 which I gave an IP address that is on my local network, but not in use (so we are all on the same subnet). How would I make an unrelated program utilize this 'tunnel'? Say I had a simple Python message passing client/server app which utilizes a TCP connection, how could I configure it to use the tunnel? I apologize if I am missing something basic, but as usual I have managed to confuse myself in the scheme of things. Again, all I want is to have a simple TCP program utilize this tunnel. Thanks!


title: Will Linux use NTFS as correctly as windows?

text: I had a bad experience once when I did some unexpected behavior and maybe the power went out and a Windows driver I used to access my Mac harddrive fudged something enough that even my Mac couldn't recover the filesystem. I was able to use a disk recovery program to scan the drive and save what it could on an external HD. I lost a lot of data, I don't want that to happen again. So I'm asking this, is there any problems with Linux using NTFS? If I power it out, pull cables, do weird things and run Linux using a virtual machine (and repeat all madness there) will I have any problems? Obviously a partial transferred file will be lost and it may want a second to revert/repair midway writes. Will Linux handle NTFS as correctly as Windows does? Do I have anything i need to worry about? I'll be using Ubuntu but I'm likely to switch over to Debian and maybe other Debian based OS.


title: How to make USB debian squeeze disk for PPC?

text: I'm using a G4 1.5ghz PPC 32bit Powerbook I followed the instructions on this site. http://mintppc.org/content/installation-mintppc-92 But could never get my powerbook to boot up from the usb drive. I can not use a CD because my DVD drive is busted. Thus the need for USB. Also most of the usb partitioning and install instructions are for people using linux already. I need to create the disk in mac osx only.


title: Transparent proxy with squid 3.1 on RHEL 6

text: We have nearly 50 systems with windows XP and have Linux (RHEL6) for server. Also have squid 3.1 , Samba and Apache for local use. Under proxy, VPN and outlook express does not connected. I heard that transparent proxy will fix this problem. I have tried steps from internet and stack-exchange. But i can't fix this issue fully. Please give clear configuration file and configuration for IpTables. Here my squid conf file.               #     # Recommended minimum configuration:     #     acl manager proto cache_object     acl localhost src 127.0.0.1/32 ::1     acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1     #     # Example rule allowing access from your local networks.     # Adapt to list your (internal) IP networks from where browsing     # should be allowed     acl localinternet src 10.1.1.0/24     ##acl localnet src 10.0.0.0/8        # RFC1918 possible internal network     ##acl localnet src 172.16.0.0/12    # RFC1918 possible internal network     ##acl localnet src 192.168.0.0/16    # RFC1918 possible internal network     ##acl localnet src fc00::/7           # RFC 4193 local private network range     ##acl localnet src fe80::/10          # RFC 4291 link-local (directly plugged) machines     #     # Special IP List     acl special src "/etc/squid/special.txt"                # All Access IPs     # Allowed IP List     acl d_unlimited src "/etc/squid/d_unlimited.txt"        # Full Download access     acl u_unlimited src "/etc/squid/u_unlimited.txt"        # Full Upload access     acl allow_proxy src "/etc/squid/allow_proxy.txt"        # Allow Proxy     acl allow_social src "/etc/squid/allow_social.txt"      # Allow Social networking     acl allow_tutorial src "/etc/squid/allow_tutorial.txt"  # Allow Tutorial     acl allow_movie src "/etc/squid/allow_movie.txt"        # Allow Jobs     acl allow_jobs src "/etc/squid/allow_jobs.txt"          # Allow Movie     acl allow_sex src "/etc/squid/allow_sex.txt"            # Allow Sex     #     # Blocked Keys     #     acl goodkey url_regex "/etc/squid/goodkey.txt"     acl proxy url_regex "/etc/squid/proxy.txt"     acl social url_regex "/etc/squid/social.txt"     acl tutorial url_regex "/etc/squid/tutorial.txt"     acl movie url_regex "/etc/squid/movie.txt"     acl jobs url_regex "/etc/squid/jobs.txt"     acl sex url_regex "/etc/squid/sex.txt"     #     # Upload/Download Limit     #     request_body_max_size 2000 KB localinternet !u_unlimited     reply_body_max_size 6000 KB localinternet !d_unlimited     #     #     acl SSL_ports port 443     acl Safe_ports port 80        # http     acl Safe_ports port 21        # ftp     acl Safe_ports port 443        # https     acl Safe_ports port 70        # gopher     acl Safe_ports port 210        # wais     acl Safe_ports port 1025-65535    # unregistered ports     acl Safe_ports port 280        # http-mgmt     acl Safe_ports port 488        # gss-http     acl Safe_ports port 591        # filemaker     acl Safe_ports port 777        # multiling http     acl CONNECT method CONNECT          #     # Recommended minimum Access Permission configuration:     #     # Only allow cachemgr access from localhost     http_access allow manager localhost     http_access deny manager          # Deny requests to certain unsafe ports     http_access deny !Safe_ports          # Deny CONNECT to other than secure SSL ports     http_access deny CONNECT !SSL_ports          # We strongly recommend the following be uncommented to protect innocent     # web applications running on the proxy server who think the only     # one who can access services on "localhost" is a local user     #http_access deny to_localhost          #     # INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS     #          # Example rule allowing access from your local networks.     # Adapt localnet in the ACL section to list your (internal) IP networks     # from where browsing should be allowed     #http_access allow localnet     #     # Allow all / Allow Good keys     http_access allow special     http_access allow goodkey     #     # Allow  Proxy Sites     #     http_access allow allow_proxy proxy     #     # Allow Social Networking     #     http_access allow allow_social social     #     # Allow Tutorials     http_access allow allow_tutorial tutorial     #     # Allow Movie     http_access allow allow_movie movie     #     # Allow Jobs     http_access allow allow_jobs jobs     #     # Allow Sex     http_access allow allow_sex sex     #     # Allow List     http_access allow localinternet !proxy !social !tutorial !movie !jobs !sex     #     # Local Host     http_access allow localhost          # And finally deny all other access to this proxy     http_access deny all          # Squid normally listens to port 3128     http_port 3128          # We recommend you to use at least the following line.     hierarchy_stoplist cgi-bin ?          # Uncomment and adjust the following to add a disk cache directory.     #cache_dir ufs /var/spool/squid 100 16 256          # Leave coredumps in the first cache dir     coredump_dir /var/spool/squid          # Add any of your own refresh_pattern entries above these.     refresh_pattern ^ftp:        1440    20%    10080     refresh_pattern ^gopher:    1440    0%    1440     refresh_pattern -i (/cgi-bin/|\?) 0    0%    0     refresh_pattern .        0    20%    4320


title: Solaris 10 boot from cd-rom

text: I am trying to start up my solaris server using the newly downloaded iso written on a CD. The iso name is `sol-10-u9-ga-sparc-dvd.iso` When we started the server, logging in as root then tried to boot the system from CD-Rom, this is what happened:               sc> reset       Are you sure you want to reset the system (y/n)? y     Chassis | critical: Host has been reset     Performing hard reset on the system          Chassis | critical: Host has been powered off     sc> poweronChassis | major: Host has been powered on          The Host System Power is already running.          sc> Chassis | major: Mar 28 13:47:34 ERROR: MB/CMP0/BR2/CH0/D0 must be populated, MB/CMP0/MCU2 not configured     Chassis | major: Mar 28 13:47:34 ERROR: MB/CMP0/BR3/CH0/D0 must be populated, MB/CMP0/MCU3 not configured          Chassis | major: Mar 28 13:47:34 ERROR: MB/CMP0/L2_BANK4, MB/CMP0/L2_BANK5 unused because MB/CMP0/MCU2 is not configured          Chassis | major: Mar 28 13:47:34 ERROR: MB/CMP0/L2_BANK6, MB/CMP0/L2_BANK7 unused because MB/CMP0/MCU3 is not configured          Chassis | major: Mar 28 13:47:34 ERROR: Degraded configuration: system operating at reduced capacity          Chassis | major: Mar 28 13:47:34 ERROR: System DRAM Available: 016384 MB          Chassis | major: Mar 28 13:47:34 ERROR: Only 4 cores, up to 32 cpus are configured because some L2_BANKS are unusable      After this, pressing `Enter` brings us a command prompt for `sc>`, but no boot command is recognized here. How can we boot from the CD?


title: Problems with permissions for /tmp

text: I executed command:               chmod 1777 /tmp      Now I get these results of executing the `ls` command from root:               ls -ld /tmp     drwxrwxrwt 4 root root 4096 Aug 9 05:42 /tmp      and from not-root user:               ls -ld /tmp     d-w--w--wT 4 root root 4096 Aug 9 05:42 /tmp      Why cannot I get full access to /tmp from not-root user? OS: Red Hat Linux 6.2 Not-root user `admin73` is created with `useradd` command. Then a password was set to it using `passwd`. Output of `ls -id` command (the same for both users):               ls -id /tmp     212577 /tmp      Output of `df /tmp` command (the same for both users):               File system  1K-blocks  Used      Available Used%  mounted     /dev/hda3    13369468   12131244  559080    96%    /      Output of `grep -E '/*tmp*' /proc/self/mounts` command:               none /dev/shm tmpfs rw 0 0


title: Is there a command which creates a temporary file containing the arguments passed to it?

text: I can paste the contents of a file into a command using `cat` and backticks:               ls `cat filenames`      Is there a way to do the reverse - to turn a string into a (temporary) filename?               gcc -o cpuburn `uncat "main(){while(1);}"`.c