Debian Squeeze RAID 5 Install?

I have a box with four Hard Drives on it. I am going to install Debian Squeeze (I know it's old... I have to) on it. I want to be able to treat the the four Hard Drives as a single Harddrive. Durringt he installation, I tried using LVM to join all 4 of my drives but then it complains about there not being a boot partition. How can I get around this issue???


Is a ZFS storage array portable across operating systems & CPU Architectures?

I know that ZFS is available on variety of operating systems Solaris, Illumos, Linux, BSD etc. Suppose I have a bunch of disks that are part of ZFS raid file system that was created on Linux, could those drives be taken out of the Linux machine and put into a machine running BSD or Illumos and just work? Are there any OS specific things that are written to ZFS file systems that would make moving a disk between different implementations of ZFS a problem? What about if the ZFS formatted disks were moved across CPU architectures say from a machine running SPARC to x86. Would the ZFS metadata be affected by endianess of the CPU architecture?


Blacklisting won't work for kernel module "radeon"

I tried to blacklist kernel module "radeon" as it is classhing with my propietary drivers. I tried it doing it in two ways but none of them worked and every time command               mkinitcpio -M       will list "radeon" module. * * * I tried to create file `/etc/modprobe.d/radeon.config` with lines               blacklist radeon     fglrx      After reboot this didn't work so I deleted this file and tried to do the same in my bootloader (I am using **syslinux** ) kernel line. I edited the file `/boot/syslinux/syslinux.cfg`to look like this:               DEFAULT arch     PROMPT 0       TIMEOUT 10     UI menu.c32          MENU TITLE Arch Linux     #MENU BACKGROUND splash.png     MENU COLOR border       30;44   #40ffffff #a0000000 std     MENU COLOR title        1;36;44 #9033ccff #a0000000 std     MENU COLOR sel          7;37;40 #e0ffffff #20ffffff all     MENU COLOR unsel        37;44   #50ffffff #a0000000 std     MENU COLOR help         37;40   #c0ffffff #a0000000 std     MENU COLOR timeout_msg  37;40   #80ffffff #00000000 std     MENU COLOR timeout      1;37;40 #c0ffffff #00000000 std     MENU COLOR msg07        37;40   #90ffffff #a0000000 std     MENU COLOR tabmsg       31;40   #30ffffff #00000000 std          LABEL archstudio         MENU LABEL Linux (Arch) - recording studio         LINUX ../vmlinuz-linux-rt         APPEND root=/dev/sda1 rw threadirqs nomodeset modprobe.blacklist=radeon fglrx         INITRD ../initramfs-linux-rt.img      I am using RT kernel " **linux-rt** " so I did rebuild the bootloader using               mkinitcpio -p linux-rt      After restart I noticed that this didn't work either. * * * Command `mkinitcpio -v` shows that some hooks load "radeon" module:               ==> Starting dry run: 3.10.14-rt9-1-rt           -> Running build hook: [/usr/lib/initcpio/install/base]         adding file: /bin/busybox         adding symlink: /usr/lib/libc.so.6 -> libc-2.18.so         adding file: /usr/lib/libc-2.18.so         adding symlink: /lib64/ld-linux-x86-64.so.2 -> ld-2.18.so         adding file: /usr/lib/ld-2.18.so         adding symlink: /usr/bin/[ -> busybox         adding symlink: /usr/bin/[[ -> busybox         adding symlink: /usr/bin/ash -> busybox         adding symlink: /usr/bin/awk -> busybox         adding symlink: /usr/bin/basename -> busybox         adding symlink: /usr/bin/cat -> busybox         adding symlink: /usr/bin/chgrp -> busybox         adding symlink: /usr/bin/chmod -> busybox         adding symlink: /usr/bin/chown -> busybox         adding symlink: /usr/bin/chroot -> busybox         adding symlink: /usr/bin/clear -> busybox         adding symlink: /usr/bin/cp -> busybox         adding symlink: /usr/bin/cttyhack -> busybox         adding symlink: /usr/bin/cut -> busybox         adding symlink: /usr/bin/dd -> busybox         adding symlink: /usr/bin/df -> busybox         adding symlink: /usr/bin/dirname -> busybox         adding symlink: /usr/bin/dmesg -> busybox         adding symlink: /usr/bin/du -> busybox         adding symlink: /usr/bin/echo -> busybox         adding symlink: /usr/bin/egrep -> busybox         adding symlink: /usr/bin/env -> busybox         adding symlink: /usr/bin/expr -> busybox         adding symlink: /usr/bin/false -> busybox         adding symlink: /usr/bin/free -> busybox         adding symlink: /usr/bin/getopt -> busybox         adding symlink: /usr/bin/grep -> busybox         adding symlink: /usr/bin/halt -> busybox         adding symlink: /usr/bin/head -> busybox         adding symlink: /usr/bin/hexdump -> busybox         adding symlink: /usr/bin/ifconfig -> busybox         adding symlink: /usr/bin/init -> busybox         adding symlink: /usr/bin/install -> busybox         adding symlink: /usr/bin/ip -> busybox         adding symlink: /usr/bin/ipaddr -> busybox         adding symlink: /usr/bin/iplink -> busybox         adding symlink: /usr/bin/iproute -> busybox         adding symlink: /usr/bin/iprule -> busybox         adding symlink: /usr/bin/iptunnel -> busybox         adding symlink: /usr/bin/kbd_mode -> busybox         adding symlink: /usr/bin/kill -> busybox         adding symlink: /usr/bin/killall -> busybox         adding symlink: /usr/bin/less -> busybox         adding symlink: /usr/bin/ln -> busybox         adding symlink: /usr/bin/loadfont -> busybox         adding symlink: /usr/bin/loadkmap -> busybox         adding symlink: /usr/bin/losetup -> busybox         adding symlink: /usr/bin/ls -> busybox         adding symlink: /usr/bin/md5sum -> busybox         adding symlink: /usr/bin/mkdir -> busybox         adding symlink: /usr/bin/mkfifo -> busybox         adding symlink: /usr/bin/mknod -> busybox         adding symlink: /usr/bin/mktemp -> busybox         adding symlink: /usr/bin/mountpoint -> busybox         adding symlink: /usr/bin/mv -> busybox         adding symlink: /usr/bin/nc -> busybox         adding symlink: /usr/bin/netstat -> busybox         adding symlink: /usr/bin/nslookup -> busybox         adding symlink: /usr/bin/openvt -> busybox         adding symlink: /usr/bin/pgrep -> busybox         adding symlink: /usr/bin/pidof -> busybox         adding symlink: /usr/bin/ping -> busybox         adding symlink: /usr/bin/ping6 -> busybox         adding symlink: /usr/bin/poweroff -> busybox         adding symlink: /usr/bin/printf -> busybox         adding symlink: /usr/bin/ps -> busybox         adding symlink: /usr/bin/pwd -> busybox         adding symlink: /usr/bin/readlink -> busybox         adding symlink: /usr/bin/reboot -> busybox         adding symlink: /usr/bin/rm -> busybox         adding symlink: /usr/bin/rmdir -> busybox         adding symlink: /usr/bin/route -> busybox         adding symlink: /usr/bin/sed -> busybox         adding symlink: /usr/bin/seq -> busybox         adding symlink: /usr/bin/setfont -> busybox         adding symlink: /usr/bin/sh -> busybox         adding symlink: /usr/bin/sha1sum -> busybox         adding symlink: /usr/bin/sha256sum -> busybox         adding symlink: /usr/bin/sha512sum -> busybox         adding symlink: /usr/bin/sleep -> busybox         adding symlink: /usr/bin/sort -> busybox         adding symlink: /usr/bin/stat -> busybox         adding symlink: /usr/bin/strings -> busybox         adding symlink: /usr/bin/sync -> busybox         adding symlink: /usr/bin/tac -> busybox         adding symlink: /usr/bin/tail -> busybox         adding symlink: /usr/bin/telnet -> busybox         adding symlink: /usr/bin/test -> busybox         adding symlink: /usr/bin/tftp -> busybox         adding symlink: /usr/bin/touch -> busybox         adding symlink: /usr/bin/true -> busybox         adding symlink: /usr/bin/umount -> busybox         adding symlink: /usr/bin/uname -> busybox         adding symlink: /usr/bin/uniq -> busybox         adding symlink: /usr/bin/uptime -> busybox         adding symlink: /usr/bin/vi -> busybox         adding symlink: /usr/bin/wc -> busybox         adding symlink: /usr/bin/wget -> busybox         adding symlink: /usr/bin/yes -> busybox         adding file: /usr/sbin/kmod         adding symlink: /usr/lib/libz.so.1 -> libz.so.1.2.8         adding file: /usr/lib/libz.so.1.2.8         adding symlink: /usr/bin/depmod -> kmod         adding symlink: /usr/bin/insmod -> kmod         adding symlink: /usr/bin/rmmod -> kmod         adding symlink: /usr/bin/lsmod -> kmod         adding symlink: /usr/bin/modprobe -> kmod         adding symlink: /usr/bin/modinfo -> kmod         adding file: /usr/sbin/blkid         adding symlink: /usr/lib/libblkid.so.1 -> libblkid.so.1.1.0         adding file: /usr/lib/libblkid.so.1.1.0         adding symlink: /usr/lib/libuuid.so.1 -> libuuid.so.1.3.0         adding file: /usr/lib/libuuid.so.1.3.0         adding file: /usr/sbin/mount         adding symlink: /usr/lib/libmount.so.1 -> libmount.so.1.1.0         adding file: /usr/lib/libmount.so.1.1.0         adding file: /usr/sbin/switch_root         adding file: /init_functions         adding file: /init         adding file: /usr/lib/modprobe.d/usb-load-ehci-first.conf       -> Running build hook: [/usr/lib/initcpio/install/udev]         adding file: /etc/udev/udev.conf         adding file: /usr/lib/systemd/systemd-udevd         adding symlink: /usr/lib/librt.so.1 -> librt-2.18.so         adding file: /usr/lib/librt-2.18.so         adding symlink: /usr/lib/libkmod.so.2 -> libkmod.so.2.2.6         adding file: /usr/lib/libkmod.so.2.2.6         adding symlink: /usr/lib/libacl.so.1 -> libacl.so.1.1.0         adding file: /usr/lib/libacl.so.1.1.0         adding symlink: /usr/lib/libpthread.so.0 -> libpthread-2.18.so         adding file: /usr/lib/libpthread-2.18.so         adding symlink: /usr/lib/libattr.so.1 -> libattr.so.1.1.0         adding file: /usr/lib/libattr.so.1.1.0         adding file: /usr/bin/udevadm         adding file: /usr/bin/systemd-tmpfiles         adding symlink: /usr/lib/libcap.so.2 -> libcap.so.2.24         adding file: /usr/lib/libcap.so.2.24         adding file: /usr/lib/udev/rules.d/50-udev-default.rules         adding file: /usr/lib/udev/rules.d/60-persistent-storage.rules         adding file: /usr/lib/udev/rules.d/64-btrfs.rules         adding file: /usr/lib/udev/rules.d/80-drivers.rules         adding file: /usr/lib/udev/ata_id         adding file: /usr/lib/udev/scsi_id         adding file: /hooks/udev       -> Running build hook: [/usr/lib/initcpio/install/autodetect]     libkmod: kmod_config_parse: /etc/modprobe.d/radeon.conf line 2: ignoring bad line starting with 'fglrx'         caching 37 modules       -> Running build hook: [/usr/lib/initcpio/install/modconf]         adding dir: /etc/modprobe.d         adding file: /etc/modprobe.d/radeon.conf         adding file: /etc/modprobe.d/uvcvideo.conf         overwriting file: /usr/lib/modprobe.d/usb-load-ehci-first.conf       -> Running build hook: [/usr/lib/initcpio/install/block]         adding module: scsi_mod         adding module: sd_mod         adding module: cdrom         adding module: sr_mod         adding module: libata         adding module: pata_amd         adding module: sata_nv         adding module: pata_acpi         adding module: ata_generic         adding module: usb-common         adding module: usbcore         adding module: ohci_hcd         adding module: ehci-hcd         adding module: ehci_pci         adding module: usb_storage       -> Running build hook: [/usr/lib/initcpio/install/filesystems]         adding module: mbcache         adding module: jbd2         adding module: crc16         adding module: ext4       -> Running build hook: [/usr/lib/initcpio/install/keyboard]         adding module: hid         adding module: hid_generic         adding module: usbhid       -> Running build hook: [/usr/lib/initcpio/install/fsck]         adding file: /usr/sbin/fsck.ext4         adding symlink: /usr/lib/libext2fs.so.2 -> libext2fs.so.2.4         adding file: /usr/lib/libext2fs.so.2.4         adding symlink: /usr/lib/libcom_err.so.2 -> libcom_err.so.2.1         adding file: /usr/lib/libcom_err.so.2.1         adding symlink: /usr/lib/libe2p.so.2 -> libe2p.so.2.3         adding file: /usr/lib/libe2p.so.2.3         adding symlink: /usr/bin/fsck.ext2 -> fsck.ext4         adding symlink: /usr/bin/fsck.ext3 -> fsck.ext4         adding file: /usr/sbin/fsck         adding module: i2c-core         adding module: drm         adding module: drm_kms_helper         adding module: ttm         adding module: i2c-algo-bit         adding file: /usr/lib/firmware/radeon/R520_cp.bin         adding file: /usr/lib/firmware/radeon/RS600_cp.bin         adding file: /usr/lib/firmware/radeon/RS690_cp.bin         adding file: /usr/lib/firmware/radeon/R420_cp.bin         adding file: /usr/lib/firmware/radeon/R300_cp.bin         adding file: /usr/lib/firmware/radeon/R200_cp.bin         adding file: /usr/lib/firmware/radeon/R100_cp.bin         adding file: /usr/lib/firmware/radeon/SUMO2_me.bin         adding file: /usr/lib/firmware/radeon/SUMO2_pfp.bin         adding file: /usr/lib/firmware/radeon/SUMO_me.bin         adding file: /usr/lib/firmware/radeon/SUMO_pfp.bin         adding file: /usr/lib/firmware/radeon/SUMO_rlc.bin         adding file: /usr/lib/firmware/radeon/PALM_me.bin         adding file: /usr/lib/firmware/radeon/PALM_pfp.bin         adding file: /usr/lib/firmware/radeon/CYPRESS_rlc.bin         adding file: /usr/lib/firmware/radeon/CYPRESS_me.bin         adding file: /usr/lib/firmware/radeon/CYPRESS_pfp.bin         adding file: /usr/lib/firmware/radeon/JUNIPER_rlc.bin         adding file: /usr/lib/firmware/radeon/JUNIPER_me.bin         adding file: /usr/lib/firmware/radeon/JUNIPER_pfp.bin         adding file: /usr/lib/firmware/radeon/REDWOOD_rlc.bin         adding file: /usr/lib/firmware/radeon/REDWOOD_me.bin         adding file: /usr/lib/firmware/radeon/REDWOOD_pfp.bin         adding file: /usr/lib/firmware/radeon/CEDAR_rlc.bin         adding file: /usr/lib/firmware/radeon/CEDAR_me.bin         adding file: /usr/lib/firmware/radeon/CEDAR_pfp.bin         adding file: /usr/lib/firmware/radeon/R700_rlc.bin         adding file: /usr/lib/firmware/radeon/R600_rlc.bin         adding file: /usr/lib/firmware/radeon/RV710_me.bin         adding file: /usr/lib/firmware/radeon/RV710_pfp.bin         adding file: /usr/lib/firmware/radeon/RV730_me.bin         adding file: /usr/lib/firmware/radeon/RV730_pfp.bin         adding file: /usr/lib/firmware/radeon/RV770_me.bin         adding file: /usr/lib/firmware/radeon/RV770_pfp.bin         adding file: /usr/lib/firmware/radeon/RS780_me.bin         adding file: /usr/lib/firmware/radeon/RS780_pfp.bin         adding file: /usr/lib/firmware/radeon/RV670_me.bin         adding file: /usr/lib/firmware/radeon/RV670_pfp.bin         adding file: /usr/lib/firmware/radeon/RV635_me.bin         adding file: /usr/lib/firmware/radeon/RV635_pfp.bin         adding file: /usr/lib/firmware/radeon/RV620_me.bin         adding file: /usr/lib/firmware/radeon/RV620_pfp.bin         adding file: /usr/lib/firmware/radeon/RV630_me.bin         adding file: /usr/lib/firmware/radeon/RV630_pfp.bin         adding file: /usr/lib/firmware/radeon/RV610_me.bin         adding file: /usr/lib/firmware/radeon/RV610_pfp.bin         adding file: /usr/lib/firmware/radeon/R600_me.bin         adding file: /usr/lib/firmware/radeon/R600_pfp.bin         adding file: /usr/lib/firmware/radeon/ARUBA_rlc.bin         adding file: /usr/lib/firmware/radeon/ARUBA_me.bin         adding file: /usr/lib/firmware/radeon/ARUBA_pfp.bin         adding file: /usr/lib/firmware/radeon/CAYMAN_rlc.bin         adding file: /usr/lib/firmware/radeon/CAYMAN_mc.bin         adding file: /usr/lib/firmware/radeon/CAYMAN_me.bin         adding file: /usr/lib/firmware/radeon/CAYMAN_pfp.bin         adding file: /usr/lib/firmware/radeon/CAICOS_mc.bin         adding file: /usr/lib/firmware/radeon/CAICOS_me.bin         adding file: /usr/lib/firmware/radeon/CAICOS_pfp.bin         adding file: /usr/lib/firmware/radeon/TURKS_mc.bin         adding file: /usr/lib/firmware/radeon/TURKS_me.bin         adding file: /usr/lib/firmware/radeon/TURKS_pfp.bin         adding file: /usr/lib/firmware/radeon/BTC_rlc.bin         adding file: /usr/lib/firmware/radeon/BARTS_mc.bin         adding file: /usr/lib/firmware/radeon/BARTS_me.bin         adding file: /usr/lib/firmware/radeon/BARTS_pfp.bin         adding file: /usr/lib/firmware/radeon/HAINAN_rlc.bin         adding file: /usr/lib/firmware/radeon/HAINAN_mc.bin         adding file: /usr/lib/firmware/radeon/HAINAN_ce.bin         adding file: /usr/lib/firmware/radeon/HAINAN_me.bin         adding file: /usr/lib/firmware/radeon/HAINAN_pfp.bin         adding file: /usr/lib/firmware/radeon/OLAND_rlc.bin         adding file: /usr/lib/firmware/radeon/OLAND_mc.bin         adding file: /usr/lib/firmware/radeon/OLAND_ce.bin         adding file: /usr/lib/firmware/radeon/OLAND_me.bin         adding file: /usr/lib/firmware/radeon/OLAND_pfp.bin         adding file: /usr/lib/firmware/radeon/VERDE_rlc.bin         adding file: /usr/lib/firmware/radeon/VERDE_mc.bin         adding file: /usr/lib/firmware/radeon/VERDE_ce.bin         adding file: /usr/lib/firmware/radeon/VERDE_me.bin         adding file: /usr/lib/firmware/radeon/VERDE_pfp.bin         adding file: /usr/lib/firmware/radeon/PITCAIRN_rlc.bin         adding file: /usr/lib/firmware/radeon/PITCAIRN_mc.bin         adding file: /usr/lib/firmware/radeon/PITCAIRN_ce.bin         adding file: /usr/lib/firmware/radeon/PITCAIRN_me.bin         adding file: /usr/lib/firmware/radeon/PITCAIRN_pfp.bin         adding file: /usr/lib/firmware/radeon/TAHITI_rlc.bin         adding file: /usr/lib/firmware/radeon/TAHITI_mc.bin         adding file: /usr/lib/firmware/radeon/TAHITI_ce.bin         adding file: /usr/lib/firmware/radeon/TAHITI_me.bin         adding file: /usr/lib/firmware/radeon/TAHITI_pfp.bin         adding file: /usr/lib/firmware/radeon/TAHITI_uvd.bin         adding file: /usr/lib/firmware/radeon/SUMO_uvd.bin         adding file: /usr/lib/firmware/radeon/CYPRESS_uvd.bin         adding file: /usr/lib/firmware/radeon/RV710_uvd.bin         adding module: radeon     ==> Generating module dependencies     ==> Dry run complete, use -g IMAGE to generate a real image      Some hooks start the "radeon" module but how do I prevent them to? This is first time I am dealing with hooks. I checked and no files in `/etc/modprobe.d/` nor `/etc/modules-load.d/` start the "radeon"...


How to display Chinese characters correctly on remote Red-Hat machine?

I am using Ubuntu14.04 to connect to a remote host. Which its version is: Linux version 2.6.32-431.11.5.el6.yyyzzz.x86_64 (gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC) ) #1 SMP Thu Jul 3 09:42:34 CST 2014 My upload file on that machine won't display Chinese characters correctly. And I open a file, type randomly Chinese Character with Ubuntu `ibus input method`. And it shows:               ~R~V�~K~B~I~W个~I~N~T�饭~T~E      I searched online and tried the following 2 methods: 1: examine the locale               It shows:          LANG=en_US.UTF-8     LC_CTYPE="en_US.UTF-8"     LC_NUMERIC=en_US.UTF-8     LC_TIME=en_US.UTF-8     LC_COLLATE="en_US.UTF-8"     LC_MONETARY=en_US.UTF-8     LC_MESSAGES="en_US.UTF-8"     LC_PAPER=en_US.UTF-8     LC_NAME=en_US.UTF-8     LC_ADDRESS=en_US.UTF-8     LC_TELEPHONE=en_US.UTF-8     LC_MEASUREMENT=en_US.UTF-8     LC_IDENTIFICATION=en_US.UTF-8     LC_ALL=      Seems no problem. 2: install Chinese Language support package I did:               yum install "@Chinese Support"      It installed 178M files on that machine. After that, I open another file, and try typing some Chinese with ibus. But the problem remains, how to solve it? * * * **update1** I did some more research after. I find that some characters can be typed out correctly(via Pinyin input method, ibus). like:               起 度 顿 客      They are all corresponding to their Pinyin. But there is a automate-generated space after each character( not typed by me). If I try to type 启，杜，盾，刻 (they have the same Pinyin as the above 4 Chinese characters). I got:               �~P�~]~\ ~[� ~H�      For my experience, if the code converting is totally messed up. When I type a Pinyin, I shall get some wired characters which look like Chinese but actually were not, and they will never correspond to that Pinyin I typed. This time, the things are little bit different.I can type some characters correctly(with an system-generated space), and others are indecipherable.


Where is my Cursor?

My OS is Ubuntu 13.10, I use the following code to remove the KDE desktop installed before:                 sudo apt-get purge kde*      And then use the following code to install GNOME 3.10:                 sudo add-apt-repository ppa:gnome3-team/gnome3-next && sudo apt-get update       sudo apt-get update && sudo apt-get install gnome-shell ubuntu-gnome-desktop       sudo add-apt-repository ppa:gnome3-team/gnome3-staging       sudo add-apt-repository ppa:gnome3-team/gnome3       sudo apt-get update && sudo apt-get dist-upgrade      After all these were done, I restart my computer and can not find my cursor in Unity, while all things are OK in GNOME. I want to find the cursor in Unity, what should I do?


Quoting in command substitution

The command               pdftk FileOne.pdf "File two.pdf" output Combined.pdf        works as expected, merging PDF's One and Two. However, if I put the filenames in a file               FileOne.pdf      "File Two.pdf"        and then use               pdftk $(< Files.lst) output Combined.pdf        I get the error messages               Error: Failed to open PDF file:         "File       Error: Unable to find file.     Error: Failed to open PDF file:         Two.pdf"        Obviously, `pdftk` is seeing the quotes, so I don't understand how it can distinguish the two cases (which is why I am posing the question in this forum). For the record, I am using MKS Toolkit Korn shell, invoked from Emacs. I get the same in the Cygwin bash shell.


Install specific 32 bit package on 64 bit debian squeeze(6.0)

I have an amd64 installation of Debian 6.0 (Squeeze), where I need to install a 32 bit version of the libpcap0.8. I have done an `apt-get install ia32-libs` which gets me a 32 bit libc and a few other things, but now I need another specific 32 bit package. What do I have to do ? (EDIT: the suggested duplicate is for Debian 7 and Ubuntu, and does not work on Debian 6)


Color calibration on Linux Mint

I'm running Linux Mint 9. I installed Argyll and gnome-color-manager but neither of those have a GUI. I need to configure my monitor colors. Right now the white looks a little yellow etc. and I want to do photo editing in Gimp. How can I get my monitor ICC calibrated?


How to configure fonts on a remote X connection (XDMCP vs. ssh)?

Connecting to a remote Solaris 10 system over X11 I observe inconsistent behavior regarding the used fonts. I am connecting from a Cygwin/X system. When I connect using ssh forwarding like this               $ ssh -Y mymachine.example.org      fonts work as expected, i.e. the rendering is very nice and programs seem to find all kind of different fonts (e.g. gvim or emacs). When I connect to the same machine via XDMCP (to the stock blue Solaris 10 login manager screen) and login there seems only 1 fixed size font available. An Emacs from OpenCSW even fails to execute because it can't find the fonts it needs. It prints that it can't find a font using following specification:               -dt-interface user-medium-r-normal-m      I establish the XDMCP connection like this:               $ XWin -query mymachine.example.org -from mywindowsclient.example.org      My objective is no to get also proper fonts for the XDMCP use case. How can I investigate this issue? Can I duplicate some configuration which is implicitly used with `ssh -Y` for the XDMCP case? How is the font-thing usually setup during ssh-X11-forwarding?


Build Operating System version is different from Kernel version. Can this cause trouble?

I have recently messed up my Debian Squeeze installation. (click for more). I fixed audio but my battery state indicator and touchpad isn't working. In my attempt to fix this I observed that Kernel version of my system is different from the build os version. This is the out put of `Xorg :1 -configure`               root@debian-box:/boot# Xorg :1 -configure          X.Org X Server 1.7.7     Release Date: 2010-05-04     X Protocol Version 11, Revision 0     Build Operating System: Linux 2.6.32.29-dsa-ia32 i686 Debian     Current Operating System: Linux debian-box 2.6.32-5-686 #1 SMP Tue Mar 8 21:36:00 UTC 2011 i686     Kernel command line: BOOT_IMAGE=/boot/vmlinuz-2.6.32-5-686 root=UUID=df9afc0c-27af-42b2-95d7-a7944f3bac70 ro quiet     Build Date: 19 February 2011  02:37:36PM     xorg-server 2:1.7.7-13 (Cyril Brulebois )      ...


Simple, user-friendly GUI file finder?

* simple, user-friendly = as Google search web page, one editbox, one button, nothing to explain, everybody grasps an idea in 1ms   * fast = finding files and directories by filenames, not by content (!)   * cute = it should be usable by weekend-users, so icons for files found, won't hurt The closest project I found is Beagle (*), but it is dead now (it was canceled in 2009). It is said, Tracker is replacement of Beagle, but when I tried the GUI frontend... in short, disaster. (*) but I am not sure if disabling in-file searching is possible. I tried also Recoll, it is full-search program, the GUI has too many widgets, far for simplicity. I can write such program on my own (Ligthppd+php script, that's all) but before I start, maybe you know about such tool ready to use? Thank you in advance.


Install byobu (screen-profiles) on FreeBSD

I've got mostly Ubuntu servers, but have a need for 2 FreeBSD boxes. On all of the Ubuntu systems I've gotten extremely used to having Byobu on top of GNU Screen. I've been trying to figure out how to get it installed on the FreeBSD boxes from the source tarball, but run into problems at every turn. I've got everything listed in the README installed (screen, python-newt, and gsed). But I'm still not able to run it properly. It will multiplex the screen just fine, but the bottom line that displays system status and context information just says `Invalid Message (magic 0x00000000000)` and byobu-config says that the snack module is not installed, which I can't seem to find. Anyone have any ideas or pointers?


rs232 to usb not working

**I also asked this question on AskUbuntu but there nobody comments on it** I have a konig rs232 serial to usb adapter (no FTDI chip), but when I try to connect to a cisco switch/router (via Putty, screen, minicom....), sometimes it just shows nothing (But it is connected because when i remove the USB it says disconnected, and sometimes it show garbage. But it also can just work ok, for about 5-10 seconds, after that it just freezes. I checked the adapter on an other linux pc (slackware), and here it just works flawless. I'm running ubuntu 13.10 (3-11-0-15-generic , Lenovo laptop) lsusb               Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub     Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub     Bus 001 Device 025: ID 0cf3:3004 Atheros Communications, Inc.      Bus 001 Device 032: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port     Bus 001 Device 003: ID 5986:0295 Acer, Inc      Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub     Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub     Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub     Bus 003 Device 002: ID 058f:6366 Alcor Micro Corp. Multi Flash Reader     Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub      dmesg | grep 2303               [22933.099512] pl2303 1-1.2:1.0: device disconnected     [22934.926969] usb 1-1.2: New USB device found, idVendor=067b, idProduct=2303     [22934.927665] pl2303 1-1.2:1.0: pl2303 converter detected     [22934.929688] usb 1-1.2: pl2303 converter now attached to ttyUSB0      **edit** I borrowed another converter from a friend (this one does have a FTDI chip), but it still doesn't work. I forgot to mention that i tried it on USB 2.0 as well as 3.0 **BUMP**


CentOS 6 with Linux-Libre kernel?

I understand that CentOS ships with nonfree blobs in it's kernel. It seems that a "nonfree blob" free kernel exists, a.k.a. Linux-Libre. Is it possible to somehow get CentOS to use Linux-Libre kernel instead of it's default nonfree blob kernel? I am interested in CentOS specifically because of its release cycle, 10 years plus support.


How to troubleshoot high load, when there are no obvious processes

I'm running Ubuntu 13.10 on a laptop. Recently, after waking from sleep, I noticed the computer was quite warm, checked top and discovered 1.00 load average. I shutdown Chrome, various daemons, no effect. I rebooted and fired up a terminal and checked top again, and watched the load quickly spike to 1.75, and slowly settle down back to around 1.0 - 1.2:               top - 09:49:17 up 36 min,  2 users,  load average: 1.01, 1.10, 1.01     Tasks: 267 total,   1 running, 266 sleeping,   0 stopped,   0 zombie     %Cpu(s):  0.9 us,  0.4 sy,  0.0 ni, 98.6 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st     KiB Mem:   8069288 total,  2885572 used,  5183716 free,   123652 buffers     KiB Swap:  7711332 total,        0 used,  7711332 free,  1661816 cached            PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND                                                                                1420 root      20   0  589m 144m 131m S   3.4  1.8   0:36.49 Xorg                                                                                6233 user1    20   0  986m  83m  31m S   2.7  1.1   0:19.89 chrome                                                                                3708 user1    20   0  749m  19m  12m S   1.8  0.3   0:06.58 gnome-terminal                                                                                3526 user1    20   0 1350m  67m  28m S   1.4  0.9   0:26.19 compiz                                                                                4014 user1    20   0 1022m 126m  52m S   1.1  1.6   0:44.34 chrome                                                                                I checked /proc/loadavg manually, same story:               sudo cat /proc/loadavg     1.20 1.16 0.99 3/614 6254      ps auxwwwf doesn't show any process consuming more than 6.0% of CPU. iostat:               avg-cpu:  %user   %nice %system %iowait  %steal   %idle                0.63    0.00    0.13    0.00    0.00   99.25          Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util     sda               0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00    0.00    0.00   0.00   0.00     scd0              0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00    0.00    0.00   0.00   0.00      free -m:                            total       used       free     shared    buffers     cached     Mem:          7880       2841       5039          0        120       1651     -/+ buffers/cache:       1068       6811     Swap:         7530          0       7530      Clearly some process is saturating CPU, but it doesn't seem to show up on the process list. Some sort of hidden Linux filesystem checker? Rootkit? Any ideas how to find the process in question?


Is Open LDAP meant to work with the passwd command for Linux?

I've implemented an Open LDAP server in OpenSuSE 11.2 via the YaST GUI. I'm having success logging in from the local machine and other machines via LDAP. I am able to change LDAP user passwords via `passwd` on the command line. However, I cannot do anything else through the command line, such as `passwd -e username`.   I get the following error > Authentication failure. LDAP information update failed: Operations error > Error while changing password expiry information. The same goes for any other arguments regarding password expiry or for locking accounts via `-l`. Is this simply a limitation of the LDAP server, or do I have an incorrect configuration?


Looking for a Linux distro with specific window related features

I have been looking for the past few days, I need these features:   * Docking a window on any side of a desktop expands it to fit half/a quarter of the space   * Resizing and moving windows must be very easy   * Search tool that searches folders _and_ content of files in a matter of seconds.   * Multi-monitor support   * Middle clicking has to work, for example in a browser for faster scrolling I tried the live cd of Gnome 3 today, but apparently my radeon 4850 is not supported. Resizing windows from the sides is very bad in there. I have to aim for several seconds. The same is true for Ubuntu 10.10, (which I just tried via Wubi) They both don't support middle clicking either. Other than that, Ubuntu was actually quite nice, pretty comparable to Windows 7. Any suggestions? Did anyone try Ubuntu 11, does it have improvements in these areas? Unfortunately reviewers /youtube videos don't go into usability issues.


Linux - preventing an application from failing due to lack of disk space

Due to an unpredicted scenario I am currently in need of finding a solution to the fact that an application (which I do not wish to kill) is slowly hogging the entire disk space. To give more context   * I have an application in Python that uses multiprocessing.Pool to start 5 threads. Each thread writes some data to its own file.   * The program is running on Linux and I do not have root access to the machine.   * The program is CPU intensive and has been running for months. It still has a few days to write all the data.   * 40% of the data in the files is redundant and can be removed after a quick test.   * The system on which the program is running only has 30GB of remaining disk space and at the current rate of work it will surely be hogged before the program finishes. Given the above points I see the following solutions with respective problems   * Given that the process number i is writing to file_i, is it safe to move file_i to an external location? Will the OS simply create a new instance of file_i and write to it? I assume moving the file would remove it and the process would end up writing to a "dead" file?   * Is there a "command line" way to stop 4 of the 5 spawned workers and wait until one of them finishes and then resume their work? (I am sure one single worker thread would avoid hogging the disk)   * Suppose I use CTRL+Z to freeze the main process. Will this stop all the other processes spawned by multiprocessing.Pool? If yes, can I then safely edit the files as to remove the redundant lines? Given the three options that I see, would any of them work in this context? If not, is there a better way to handle this problem? I would really like to avoid the scenario in which the program crashes just few days before its finish.


Get a faster response for a ping

I noticed that the answer to my ping is slower in one debian machine that another. For the first one when i ping to 8.8.8.8:                64 bytes from 8.8.8.8: icmp_req=1 ttl=47 time=29.6 ms      For the second one:                64 bytes from 8.8.8.8: icmp_req=1 ttl=50 time=6.77 ms      It's 4 times faster. So how can i make this answer faster ? Which network parameters should i modify to get better response ?


Custom keyboard layout is reset to default after standby or reboot

I designed a keyboard layout for myself, after I run `xmodmap` it works OK, but after standby or reboot, the layout turn back to qwerty. How can I set it as default? My OS is Debian Wheezy with XFCE4.


awk high precision arithmetic

I am looking for a way to tell awk to do high-precision arithmetic in a substitution operation. This involves, reading a field from a file and substituting it with a 1% increment on that value. However, I am losing precision there. Here is a simplified reproduction of the problem:                $ echo 0.4970436865354813 | awk '{gsub($1, $1*1.1)}; {print}'        0.546748      Here, I have a 16 digit after decimal precision but awk gives only six. Using printf, I am getting the same result:               $ echo 0.4970436865354813 | awk '{gsub($1, $1*1.1)}; {printf("%.16G\n", $1)}'     0.546748      Any suggestions on to how to get the desired precision?


bash scripting - Any function to escape character?

I am trying to automate some of my stuff and facing a issue, the problem boils down to escaping the value that is being passed as a argument to the script. ### myScript.sh               #!/bin/bash          loadPatch -name $1      where `$1` is the first argument and can have value like 'p12.9.5-bug34' Running it as               myScript p12.9.5-bug34      produces no result. I checked with `echo $?` the output was successful, but the required operation didn't happen. I replaced `$1` with this actual value to test in the script and it worked as expected. There is no way for me to put a print statement in `loadPatch` to verify what arguments it has received. So, I envisage there is some escaping problem here and hence need to know, is there any function/utility which I could use to escape the argument before using? Please let me know if you see any other error with this?


open a already running process

I have 64-bit RHEL 2.6.18-238.el5 running. I access the machine through vpn. I started an application via terminal and while application was running there was disconnection in vpn which closed my terminal. Upon reconnecting to vpn when I opened the terminal I could see that my application is still running ,checked using `ps -ef` command. Now how can I continue using my application in the terminal. Is there any way to access that running application in the terminal? Please help.Thanks


How do I stop Gthumb from opening when I plug in my camera?

I'm using Linux Mint 13. Whenever I plug my camera into the USB port, Gthumb opens _and_ a directory window opens. I can't find config files, autoplay options or an option in the preferences of Gthumb to change this. How can I stop Gthumb opening when I plug in my camera? O_O


Using setfacl to create recursive permissions for Apache with rsync

I have a Dokuwiki installation locally, which I regularly sync to my server with rsync. I'm also going to give a friend of mine an ssh account, and host his public Dokuwiki installation. However, I'm having a problem with access permissions - even though the mirror is read-only, Dokuwiki still needs write- permissions to the data directory for cache etc. The Apache server runs as user www-data, and every time I do a rsync, it resets permissions. Based on some other answers on this site, I tried using setfacl to set default permissions, but it doesn't seem to work - getfacl indicates that the permissions exist, but Dokuwiki won't run, and when I try to write a file as user www-data, it also doesn't work. What am I missing?               wiki/data$ sudo su www-data     $ pwd     /var/www/wiki/data     $ whoami     www-data     $ touch hi     touch: cannot touch `hi': Permission denied     $ getfacl /var/www/wiki/data     getfacl: Removing leading '/' from absolute path names     # file: var/www/wiki/data     # owner: stian     # group: admin     user::rwx     group::r-x     other::r-x     default:user::rwx     default:user:www-data:rwx     default:group::r-x     default:mask::rwx     default:other::r-x      Here's the command I used to set the permissions:               setfacl -R -d -m u:www-data:7 /var/www/*


How can you change the GNU screen status line based on hostname?

I have a shared home directory that is automounted via NFS on all the UNIX servers I log in to. I would like to have a single .screenrc that (for example) puts the hostname in the hardstatus line in a different colour to indicate when I am logged on to production versus development; our hostnames are such that this can easily be done through the use of pattern matching. Is there any way of putting conditional statements into .screenrc? A quick grep of the man page doesn't seem to reveal anything obvious. EDIT: To clarify, I already have a custom hard status line; I want to change some of the colouring/fields displayed based on the hostname that screen is invoked on. I already have something like this for my PS1, however I would rather do this in the screen status line as I jump off from these hosts to routers/switches, which don't allow me to do any prompt colourisation. This way, I can have one window for production, and one for development, with the colour of the screen status line telling me which one I am on at a glance.


How do I only copy files to a remote folder on another server that don't already exist in the folder... from the command line in linux?

I have two folders on two different servers. I want to sync files between A and B, however, I only want to copy files that don't already exist in folder B because these files are huge. I don't care about updating files. I simply wants a copy of each in folder B. How do I do this on Linux? (I suppose it'd be nice to know how to update files that have changed too)


Powerful hardware, slow Ubuntu

My computer should be able to run Ubuntu (11.04) without breaking a sweat:   * CPU: 2.00Ghz Core i7-2630QM   * RAM: 8Gb DDR3-1333   * HDD: 60Gb SSD   * GPU: 1Gb AMD HD 6570M   * Swap: 2.7Gb However, opening folders can take around a second, scrolling and opening new tabs in the browser is clunky, dragging windows is choppy - in short it's just plain slow. Was there something I could've messed up when installing and configuring Ubuntu? I have a feeling it's the graphics driver since, even under heavy usage, system monitor shows the swap never gets touched. Here's the driver I'm using: ![ATI/AMD proprietary FGLRX graphics driver](https://lh3.googleusercontent.com/-MunSMQwQhak/ThonDgOWE5I/AAAAAAAAAIQ/D-RqXehDjt8/15161036742.jpg)


Are there any issues using 2TB hard drives with 4k sectors

I'm thinking of purchasing a 2TB hard drive (probably a Seagate F4), but I've read reports of Linux not being compatible with 4k sectors on these drives. Do I have to do anything specific when I install this hardware? It will be installed as a secondary (non-boot) drive in an Ubuntu Server 10.04.


Can't Install build-essential on CentOS

When I run the command:               sudo apt-get install build-essential      I get the following error message:               Reading Package Lists... Done     Building Dependency Tree... Done     E: Couldn't find package build-essential


Why is my PC freezing while I'm copying a file to a pendrive?

I have a really strange situation here. My PC works fine, at least in most cases, but there's one thing that I can't deal with. When I try to copy a file from my pendrive, everything is ok -- I got 16-19M/s , it works pretty well. But when I try to copy something to the same pendrive, my PC freezes. The mouse pointer stops moving for a sec or two, then it moves a little bit and it stops again. When something is playing, for example, in Amarok, the sound acts like a machine gun. The speed jumps from 500K/s to 15M/s, average 8M/s. This occurs only when I'm copying something to a pendrive. When the process of copying is done, everything backs to normal. I tried everything -- other pendrive, a different USB port on front panel or those ports from back, I even changed the USB pins on motherboard (front panel), but no matter where I put my USB stick, it's always the same. I tried different filesystem -- `fat32`, `ext4`. I have no problem with the device on Windows, on my laptop. It has to be my PC or something in my system. I have no idea what to look for. I'm using Debian testing with standalone Openbox. My PC is kind of old -- Pentium D 3GHz, 1GiB of RAM, 1,5TB WD Green disk. If you have something that would help me to solve this issue, I'd be glad to hear that. I don't know what else info I should provide, but if you need something, just ask, I'll update this post as soon as possible. I tried to reproduce this problem on ubuntu 13.04 live cd. I mounted my encrypted partition + encrypted swap and connected my pendrive to a usb port. Next I tried to start some apps, and now I have ~820MiB in RAM and about 400MiB in SWAP. There's no problem with copying, no freezing at all, everything is as it should be. So, it looks like it's a fault of the system, but where exactly? What would cause such a weird behavior?


How to combine deb dependencies into main package?

I want to include deb-dependencies with main deb-package. Consider 1 deb package which have 19 deb dependencies, so I have to install all packages by `dpkg -i *.deb`. If all 19 dependencies can be **combined and created single (master) deb** then I can easily install package by single (1) deb file! How to do this?


Introspection of the interface of a shared library

I have a problem with a library I'm working with for the first time ( it's Boost.Python but my question is much more general than this case). As a consequence I need to check what is the interface of the library I have built: so as to check if I have at least built everything correctly. _(Python is complaining that he doesn't see my module, though I put the .so renammed in .pyd into its PYTHONPATH, so there's something wrong in my library)_ I need to know all the names of the exposed functions of my .so library, and their prototype if possible. Are there commands or package that I could install to achieve something like this ?


How do I write a login daemon?

There are many guides to the steps for correctly launching a daemon process, such as Stevens' chapter in _Advanced Programming in the UNIX Environment_. There is less agreement on what steps should be taken after daemonizing, going the other way: launching a user process from a root process. Historically, the details of calls in login or telnetd have differed widely by platform. An SSH server is a modern example of a login daemon. But, there are different interpretations of the correct steps in different implementations of SSH servers, which usually heavily dependent on per-platform steps. How should one write a modern daemon that provides logins, setting up the privileges and context to run a user's commands, perhaps based on remote input?


'mv' equivalent of drag and drop with replace?

In a GUI environment, a drag-and-drop with replace will replace files and entire directories (including contents) with whatever is being copied in. Is there a way to accomplish this same intuitive result with the 'mv' command?


Change of real time priority made no visible effect

we were trying to get the best result with software PWM on raspberry pi with Raspbian. We made a python script which starts PWM on a GPIO pin, and observed the results with the oscilloscope. It didn't do well, the delay wasn't acceptable. After that we set the realtime priority of our software PWM process to 99 and changed the scheduling to real time round robin, anf later to fifo (1865 is the process pid).               sudo chrt -f -p 99 1865     sudo chrt -r -p 99 1865      It acted the same as before the priority change. **ALL** the other processes were run with nonrealtime priorities. However, there were around 3000 interrupts per second going on from the timer and USB. In this question the answer stated: > ... the vanilla kernel handles real time priorities, which gives them higher > priority than normal tasks, and those tasks will generally run until they > voluntarily yield the CPU Any ideas why the change of priority didn't have a visible efect? Do real time priorities influence what will happen with the process on interrupts?


What does `l` mean in an `ls` listing?

When I run `ls -adl .*` in one of my directories, I get a file that has this listing:               lrwxrwxrwx  1 user group   43 Jul  3 16:25 .#filename.py ->       person@computer.edu.4018:1372874769      The filename and URL-looking thing are highlighted in red. **What does the`l` mean in `lrwxrwxrwx`? What kind of file is this?**


CentOS no network interface after installation in VirtualBox

I have Ubuntu 12.10 on which i installed virtual box on which I setup centos 6.4 i386. On Ubuntu I have: 3.5.0-17-generic kernal running. On virtual box I install centos 6.4 and everything works fine, however when i boot into VM machine, there is only on loopback interface. Nothing else. I tried to manually add ifcfg-eth0 file but nothing happens. On VM settings i have added NAT and HostOnly interfaces but whenever I boot into centos there is just lo interface. What should I do?


Out-of-the-box CentOS in VirtualBox (NAT): Network is unreachable

My host is a freshly installed Ubuntu 2013.04, wireless network access worked out-of-the-box so I don't have any strange network configuration. In VirtualBox 4.2.10, with default (NAT) settings, I installed CentOS 6.4 minimal.   Immediately after install, the first thing I did was `ping 173.194.38.98` (google) and I a told `connect: Network is unreachable`. I tried running `/etc/init.d/network start` as root, no joy.   I downloaded a VM image and tried it: exact same problem. When I installed Ubuntu and Windows VMs, they are able to access the Internet without any problem.   What's wrong with this one? On the VM: ![enter image description here](http://i.stack.imgur.com/IZk1l.png) On the host (values never change, except byte counts):               eth0      Link encap:Ethernet  HWaddr f0:de:f1:c0:ad:b3                 UP BROADCAST MULTICAST  MTU:1500  Metric:1               RX packets:0 errors:0 dropped:0 overruns:0 frame:0               TX packets:0 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000                RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)               Interrupt:20 Memory:f3900000-f3920000           lo        Link encap:Local Loopback                 inet addr:127.0.0.1  Mask:255.0.0.0               inet6 addr: ::1/128 Scope:Host               UP LOOPBACK RUNNING  MTU:65536  Metric:1               RX packets:32272 errors:0 dropped:0 overruns:0 frame:0               TX packets:32272 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:0                RX bytes:4263162 (4.2 MB)  TX bytes:4263162 (4.2 MB)          wlan0     Link encap:Ethernet  HWaddr 60:d8:19:c9:42:59                 inet addr:192.168.0.67  Bcast:192.168.0.255  Mask:255.255.255.0               inet6 addr: fe80::62d8:19ff:fec9:4259/64 Scope:Link               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:1221151 errors:0 dropped:0 overruns:0 frame:0               TX packets:845193 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000                RX bytes:1438957835 (1.4 GB)  TX bytes:133904229 (133.9 MB)      _Note: Similar tothis question but switching from NAT to Bridge is not a solution I find acceptable._


Hyperthreading not detected by Linux

Problem solved! After speaking to Dell's support they realized that I had to remove the option `acpi=off` from my `/boot/grub/menu.1st` config file. Apparently ACPI support is essential for hyper-threading, but is turned off by default when installing CentOS 6.2. * * * I have a Dell server with two Intel Xeon E5645 cpus, each cpu has 6 cores, and each core is hyperthreaded (i.e. should be equivalent to two virtual cores). I installed CentOS 6.2 on this server and it seems to detect only 12 cores (although there should be 24 virtual cores altogether). When I look at `/proc/cpuinfo` I get for each cpu:               cpu cores: 6     siblings: 6      Which seems to indicate that number of cores equals number of virtual cores, or hyperthreading not detected/enabled. When I run `dmidecode` I can see that HT flag is turned on and I do see the following, which seem to indicate that the BIOS is configured correctly for hyperthreading.               Core Count: 6     Core Enabled: 6     Thread Count: 12      Is there some configuration that I am missing in order to make Linux detect all virtual cores?


rsyslog not logging

This is an odd issue. I was testing the chrony/ntp services on a RHEL7 VM and was resetting its time as well as the host's. Once I was satisfied with it I checked /var/log/messages and realized it hadn't been changed in a while. Now no matter what I do nothing is being logged except for when I restart the rsyslog service itself; when I do I get this:               Apr 15 13:59:43 mymachine1 rsyslogd: [origin software="rsyslogd" swVersion="7.4.2" x-pid="2847" x-info="http://www.rsyslog.com"] exiting on signal 2.          Apr 15 13:59:59 mymachine1 rsyslogd: [origin software="rsyslogd" swVersion="7.4.2" x-pid="2853" x-info="http://www.rsyslog.com"] start          Apr 15 14:00:11 mymachine1 rsyslogd-3000: sd_journal_get_cursor() failed: 'Cannot assign requested address'      Trying things like 'logger test' don't log, nothing else except rsyslog's own messages seems to. When I run rsyslog manually with -n -N1 as arguments I get:               rsyslogd: version 7.4.2, config validation run (level 1), master config /etc/rsyslog.conf          rsyslogd: End of config validation run. Bye      It just seems like nothing can log through rsyslog for some reason. And a second identical VM on the same host (which didn't go through quite the same circle of repeatedly disabling ntp, having the date changed and rebooted multiple times) with the same rsyslog.conf file logs just fine. At this point the date/time is correct, chrony is enabled and running, and I've rebooted several times - after 30 seconds of kernel messages nothing else gets logged again. Thoughts?


Where is the documentation for what sda, sdb, dm-0, dm-1 mean

If I run iostat I got sda0, sda1, I sort of know that those are the "hard disks". then there is dm-0, dm-1? I wanted to check the documentation. I checked http://linux.die.net/man/1/iostat it's not mentioned at all. Also my mount command shows this:               /dev/mapper/VolGroup-lv_root    /   ext4    usrjquota=quota.user,jqfmt=vfsv0    1   1     UUID=1450c2bf-d431-4621-9e8e-b0be57fd79b6 /boot                   ext4    defaults        1 2     /dev/mapper/VolGroup-lv_home    /home   ext4    usrjquota=quota.user,jqfmt=vfsv0    1   2     /dev/mapper/VolGroup-lv_swap swap                    swap    defaults        0 0     tmpfs                   /dev/shm                tmpfs   defaults        0 0     devpts                  /dev/pts                devpts  gid=5,mode=620  0 0     sysfs                   /sys                    sysfs   defaults        0 0     proc                    /proc                   proc    defaults        0 0     /usr/tmpDSK             /tmp                    ext3    defaults,noauto        0 0     /dev/sdb1               /home2                  auto    auto,defaults         0 0     /dev/sdc1               /home3                  auto    auto,defaults         0 0     /dev/sdd1               /home4                  auto    auto,defaults         0 0      It looks like dm-0, corresponde to one of /dev/mapper/VolGroup-lv. Not sure which one.


User input in linux bash to check against a list and respond with result

I am trying to get bash to ask for a user input from read and to check against a file or list of files, then respond with the result from that chesk. This is as far as I have gotten as of yet...               read -p "what are we looking for?" RESP     if [ "$RESP" = sed -n ${some line from inside file} ./file |      then do "returned variable from file"          else     echo "You need more bash programming"       I know I am very new here but I cant figure it out, what ever the response is needs to be check against a file (what inside the file)- line by line then return an associated variable of that line say like               "RESP"=line 3(or any line that matches) of ./this_file      return "var1" of that line     Do "var1"          fi      Is this the way to do this what would this code look like in simple bash I am so lost please help example: line1:"please open google" "var1[open http:www.google.com] pass "var1" to bash


How to copy Big files on other Linux Server Independent of TTY

Actually i was trying to copy all the files in another director. Total size of the file is 188GB so its going to take a time. Im trying to copy for Linux server A to B using this command               nohup scp Files-from-Server-A root@xxx.xxx.xxx.xxx:tmp &      but as soon i close the terminal it stops copying the files but the process is still shown in process manager.


do...while or do...until in POSIX shell script

There is the well known `while condition; do ...; done` loop, but is there a `do... while` style loop that guarantees at least one execution of the block?


NTFS drive not mounting in Debian

This drive has been working fine for a while, but I recall having had some slight trouble getting it mounted in the past. Anyway, it was disconnected from the machine for some time and when I reconnected it and tried to mount it again with `ntfs-3g`, I got the following error:               Failed to mount '/dev/sdb1': Input/output error     NTFS is either inconsistent, or there is a hardware fault, or it's a     SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows     then reboot into Windows twice. The usage of the /f parameter is very     important! If the device is a SoftRAID/FakeRAID then first activate     it and mount a different device under the /dev/mapper/ directory, (e.g.     /dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation     for more details.      So I plugged the drive into a Windows machine and ran `chkdsk`. While I don't have the output of `chkdsk` readily available, there were no obvious warning/error messages and I understood the output to have been indicative of a successful run. I could also mount, read, and write to the disk from within Windows Explorer. I dismounted the drive, then plugged it back into the Debian box. Attempting to mount it had the same effect as the first time. I plugged the disk into an OSX machine, which was able to read from (but obviously not write to) the drive. Plugging it back into the Windows machine seemed to indicate that all was well. After a few minutes however, the drive (mounted in Windows) became unresponsive and Windows Explorer gave me alternating error messages along the lines of "invalid parameters" and "access denied" (with no further detail!). So I'm a little bit lost at this point. I can still read from the disk from several machines and write to it from Windows, but Debian still won't mount it. Any suggestions?


Installing noip via sh script

I have this script:               cd /usr/local/src/     wget http://www.no-ip.com/client/linux/noip-duc-linux.tar.gz     tar xf noip-duc-linux.tar.gz     cd noip-2.1.9-1/     make install <<END_SCRIPT     Username     password     30     N     END_SCRIPT      According to this guide it should install Noip DUC (I'm using Ubuntu 14.04, go to the section for Ubuntu 12.04 LTS). When it gets to make install part, I tried to configure it so it would automatically enter all need information ("username", "password", "update interval", and "do you wish to run something after install (Y/N)?"). The install goes fine until I get to the configuration part. This is the last line of the output: `Enter-username Enter-password-for-Username _` (underscore is the cursor) The program then just hangs ther and accepts no input. This is how it looks like when you do it manually (more or less, I didn't copy preset printed strings to the letter):               Enter-username Username     Enter-password-for-Username password     Enter-interval 30     Question(Y/N)? N          Install done      Now, I know the Username was entered properly because it prints it out when requesting password. However, when it comes to the password part, it just hangs there. Any ideas?


git deploy using sudo nopasswd

I'm trying to write simple post-recieve script, which would switch to webserver user and pull git repository. To do so, I added git user to sudoers (I've added this to very last line):               git ALL = (www:www) NOPASSWD: /usr/bin/git      but I still can't execute               sudo -u www git pull origin production      without password prompt.


Getting terminal access on old, strange hardware

I have an old, esoteric piece of special-purpose hardware (it's a HP logic analyser system). It's running HP-UX (because OLD). Right now, it boots right into an X session with the special logic-analyser software running. I'd like to get to a terminal prompt, so I can poke around with the internals (out of curiosity). Given that this is basically a PC with some specialty hardware, what are the ways you can break out of a mildly locked-down X-session? I do have hardware access to the machine, but I'd like to avoid having to pull the disk or make boot-floppies for the thing (I don't have any other devices with floppy drives!).


vi <TAB> completes only directories in bash

In a directory I type `vi` and then `tab` (twice), this gives me               user$ vi      CMakeFiles/ global/     libs/      whereas `ls` followed by 2 `tab`s gives me               user$ ls      ! core.log CMakeFiles/ global/     libs/ _jni/      (Note: **ls is aliased to `ls -Ah --color=auto'** , _jni is a symlink, and none of the files are hidden.) I think `vi` is not showing any files, but only directories during tab- completion. Why is this happening? How to make `vi` behave same way as `ls`? I put following line in ~/.vimrc after going through one of the posts on SE. But it doesn't seem to do anything in this case.               set wildmode=longest,list,full     set wildmenu      Version of `vi`: VIM - Vi IMproved version 7.3.429   Version of `ls`: ls (GNU coreutils) 8.13


Can't use su or sudo on Arch Linux

Sudo returns this error:               sudo: effective uid is not 0, is sudo installed setuid root?      And su - returns this:               su: Authentication failure      The user I'm using is a member of the following groups:               disk wheel locate network video audio optical floppy storage power users      I can log in to root, but can't elevate my user privileges, and I'm sure the password I'm giving to both is correct.


Filter Require Capital words from a file( not all capital words )

I want Output of this file only               AVDDPLL1V8     AGNDPLL1V8     DVDDPLL1V1     DGNDPLL1V1       Please help me in this to find solution. Here is my input:               6.1.2 Power and Ground Pins                  The following table describes the power and ground pins for the PLL.                            Table 5: Power and Ground Pins                       Pin Name                                                Description                                         Analog power pin. This pin provides the power supply for the sensitive analog                     AVDDPLL1V8                                         blocks of the PLL.                                         Analog ground pin. This pin provides the ground for the sensitive analog blocks                     AGNDPLL1V8                                         of the PLL.                                         Digital power pin. This pin provides power supply for the digital circuits in the                     DVDDPLL1V1                                         PLL.                     DGNDPLL1V1          Digital ground pin. This pin provides ground for the digital circuits in the PLL.


Is the historical Unix V5 tr command padding behavior of set2 different from what we consider today "classic" System V (1983-1988) behavior?

The `tr` command is almost 40 years old. It seemingly appeared in Unix for the first time in 1973 with Unix V4. The source for this is not available. Here is probably the second oldest available Unix implementation of the command from Unix V5 about 6 months later in June 1974:               int dflag 0;     int sflag 0;     int cflag 0;     int save 0;     char code[256];     char squeez[256];     char vect[256];     struct string { int last, max, rep; char *p; } string1, string2;     int inbuf[259];          main(argc,argv)     char **argv;     {         int i, j;         int c, d;         char *compl;         extern fout;              string1.last = string2.last = 0;         string1.max = string2.max = 0;         string1.rep = string2.rep = 0;         string1.p = string2.p = "";              if(--argc>0) {             argv++;             if(*argv[0]=='-'&&argv[0][4]!=0) {                 while(*++argv[0])                     switch(*argv[0]) {                     case 'c':                         cflag++;                         continue;                     case 'd':                         dflag++;                         continue;                     case 's':                         sflag++;                         continue;                     }                 argc--;                 argv++;             }         }         if(argc>0) string1.p = argv[0];         if(argc>1) string2.p = argv[1];         for(i=0; i<256; i++)             code[i] = vect[i] = 0;         if(cflag) {             while(c = next(&string1))                 vect[c&0377] = 1;             j = 0;             for(i=1; i<256; i++)                 if(vect[i]==0) vect[j++] = i;             vect[j] = 0;             compl = vect;         }         for(i=0; i<256; i++)             squeez[i] = 0;         for(;;){             if(cflag) c = *compl++;             else c = next(&string1);             if(c==0) break;             d = next(&string2);             if(d==0) d = c;             code[c&0377] = d;             squeez[d&0377] = 1;         }         while(d = next(&string2))             squeez[d&0377] = 1;         squeez[0] = 1;         for(i=0;i<256;i++) {             if(code[i]==0) code[i] = i;             else if(dflag) code[i] = 0;         }              inbuf[0] = 0;         fout = dup(1);         close(1);         while((c=getc(inbuf)) >=0 ) {             if(c == 0) continue;             if(c = code[c&0377]&0377)                 if(!sflag || c!=save || !squeez[c&0377])                     putchar(save = c);         }         flush();     }          next(s)     struct string *s;     {         int a, b, c, n;         int base;              if(--s->rep > 0) return(s->last);         if(s->last < s->max) return(++s->last);         if(*s->p=='[') {             nextc(s);             s->last = a = nextc(s);             s->max = 0;             switch(nextc(s)) {             case '-':                 b = nextc(s);                 if(b<a || *s->p++!=']')                     goto error;                 s->max = b;                 return(a);             case '*':                 base = (*s->p=='0')?8:10;                 n = 0;                 while((c = *s->p)>='0' && c<'0'+base) {                     n = base*n + c - '0';                     s->p++;                 }                 if(*s->p++!=']') goto error;                 if(n==0) n = 1000;                 s->rep = n;                 return(a);             default:             error:                 write(1,"Bad string\n",11);                 exit();             }         }         return(nextc(s));     }          nextc(s)     struct string *s;     {         int c, i, n;              c = *s->p++;         if(c=='\\') {             i = n = 0;             while(i<3 && (c = *s->p)>='0' && c<='7') {                 n = n*8 + c - '0';                 i++;                 s->p++;             }             if(i>0) c = n;             else c = *s->p++;         }         if(c==0) *--s->p = 0;         return(c&0377);     }      With time this evolved and since the early days, there's been variations with how the command deals with sets of different length, and here my interest is with the case where set2 is shorter than set1. The _GNU Coreutils_ manual discusses the situation: > When tr is performing translation, set1 and set2 typically have the same > length. If set1 is shorter than set2, the extra characters at the end of > set2 are ignored. > > On the other hand, making set1 longer than set2 is not portable; POSIX says > that the result is undefined. In this situation, BSD tr pads set2 to the > length of set1 by repeating the last character of set2 as many times as > necessary. System V tr truncates set1 to the length of set2. > > By default, GNU tr handles this case like BSD tr. When the --truncate-set1 > (-t) option is given, GNU tr handles this case like the System V tr > >instead. This option is ignored for operations other than translation. > > Acting like System V tr in this case breaks the relatively common BSD idiom: >   >   >      tr -cs A-Za-z0-9 '\012' >   > > because it converts only zero bytes (the first element in the complement of > set1), rather than all non-alphanumerics, to newlines. There is also such a discussion in _The Open GroupBase Specifications Issue 7 IEEE Std 1003.1_, 2013 Edition: > When string2 is shorter than string1, a difference results between > historical System V and BSD systems. A BSD system pads string2 with the last > character found in string2. Thus, it is possible to do the following: > > tr 0123456789 d > > which would translate all digits to the letter 'd'. Since this area is > specifically unspecified in this volume of POSIX.1-2008, both the BSD and > System V behaviors are allowed, but a conforming application cannot rely on > the BSD behavior. It would have to code the example in the following way: > > tr 0123456789 '[d*]' Now, if you read the man pages for the tr command in V4 and V5, you see the following reference in both:               If string2 is short, it is padded with corresponding characters from string1.      But that reference is omitted in the V6 manual and later early versions of Unix yet the V6 implementation of the command is line for line identical to V5? So you have a difference in the manuals but not in the code? Also, this implementation seems different from what is considered "classic BSD or System V" behavior i.e. pad from adding from set2 elements or truncate to length of set1. So is the V4-V5 implementation different from the System V milestone Unix and what is the rationale for that different implementation and ultimately why was it discarded down the road? How can I find out more information about such an early design of the command?


What units of time does "top" use?

If I issue the "top" command and receive results such as:               PID   USER  PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND        00001 bob   25   0 77380 1212 1200 R 95.8  0.0  89122:13 fee              00002 bob   25   0 77380 1196 1184 R 95.4  0.0  88954:14 fi              00003 sam   18   0  427m  16m 6308 R 30.0  0.1  54:46.43 fo              00004 sam   18   0  427m  16m 6308 R 26.5  0.1  52:55.33 fum               **Question:** What are the units in the "TIME+" column? **What I have tried:** (please suggest a better strategy for searching documentation ...)   * `man top | grep -C 4 time` or    * `man top | grep <X>` when I substitute `minute`, `hour`, `day`, or `HH` for `X` ...


Multiple SSH tunnel through raspberry pi?

In my home network I have a PC, raspberry pi, macbook and a few other devices which I want to access away from home. As it stands, I have setup VNC server on my PC along with remote desktop and have changed the default ports. These ports are open on my router and redirect to the PC so that I can access them via dynamic dns. However I was wondering if it was possible to close those open ports on the router, and instead leave only port 22 on the raspberry pi so I can use an SSH tunnel through the pi, to the PC and run VNC through that? If so how would the command prompt look? I understand vaguely how SSH tunnels work and can use them applying to 1 remote host, i.e:               ssh -L 22222:localhost:5900 user@pi      then running `localhost:22222` in my vnc viewer will let me connect to the pi. Reading up on the subject suggests I could do something like `ssh -L 22222:internal_pc_ip:5900 user@pi` and run `localhost:22222` like before? Can I do this?


Can't setup netcfg service in arch linux

I already add this service to startup with `systemctl enable netcfg`, here's contents of `/etc/conf.d/network`,               NETWORKS=(eth0 eth1)     WIRED_INTERFACE="eth0"     WIRELESS_INTERFACE="wlan0"     AUTO_PROFILES=(eth0 eth1)      And contents of netcfg.service:               [root@localhost ~]# cat /etc/systemd/system/multi-user.target.wants/netcfg.service      [Unit]     Description=Netcfg multi-profile daemon     Before=network.target     Wants=network.target          [Service]     Type=oneshot     RemainAfterExit=yes     ExecStart=/usr/bin/netcfg-daemon start     ExecStop=/usr/bin/netcfg-daemon stop     KillMode=none          [Install]     WantedBy=multi-user.target      journalctl logs of netcfg:               Oct 29 XXXXXX localhost netcfg-daemon[182]: No recorded netcfg state to restore     Oct 29 XXXXXX localhost systemd[1]: netcfg.service: main process exited, code=exited, status=1/FAILURE     Oct 29 XXXXXX localhost systemd[1]: Failed to start Netcfg multi-profile daemon.     Oct 29 XXXXXX localhost systemd[1]: Unit netcfg.service entered failed state      It doesn't work (works randomly?), the output says `netcfg` failed, but invoke it manually works, why? ![enter image description here](http://i.stack.imgur.com/NPAKZ.png)


Persistent (casper-rw) Dropbox keeps prompting to reconnect

I use Linux Mint as my main operating system, but I run it off a persistent casper-rw partition on a flash drive. (I don't want to install it to the disk because my laptop screen is broken, and if something went wrong I'd be hopeless to repair it because I can only see the screen after the OS loads. It's tricky enough to boot as it is, and I can't see what I'm doing in BIOS.) The setup works like a charm, with one hiccup: my Dropbox installation (downloaded from the website) prompts to reconnect my account at login. The prompts are:   * Do you already have a Dropbox account? ( _Yes_ )   * Enter your username and password, and pick a name for this computer. ( _I always pick "casper-rw"_ )   * It looks like you've already set up Dropbox on this computer. Would you like to use the same settings? ( _Yes_ )   * You're done! ( _Finish_ ) Dropbox then starts up and works properly. It recognizes the existing `~/Dropbox` folder and syncing works fine. This is pretty annoying, especially considering that I get confirmation emails every time I do this, and my Dropbox account currently shows about a dozen copies of the same machine "linked" to my account. I've never had this issue on Mint on an actual install, though it may be worth noting that the last full Mint install I used was Mint 15, and I'm using Mint 16 on this LiveCD. Is there any way I can get Dropbox to use my existing settings without a prompt? * * * Linux Mint 16 Cinnamon 64-bit. HP Elitebook 8440p. SanDisk Cruzer 16 GB flash drive with two 8 GB partitions, FAT32 `boot` and ext2 `casper-rw`.


Using the same mbox file for multiple accounts

Is it possible to use the same mbox inbox file (retrieved with getmail) to load mails from two different email accounts without causing any conflicts?


Fetch values from plist file on Linux

I have bash script which was written for OS X and now ported to Linux. I don't have access to the Linux box. The bash script would read values from plist files using the `defaults read` and `PlistBuddy` command available on OS X. Since the Linux machine doesn't have these commands, I'm looking for workarounds. Is there library/script (Perl preferably) that helps user fetch values from plist files for a given key on a Linux machine? I tried using `sed`/`awk`, but the output isn't reliable. I've come across scripts like `plutil.pl` that convert a plist file to other formats. I have installed a Virtual machine running Ubuntu on my Mac so that I can test my changes before deploying to the actual Linux box.


Changing compression in memory

I have some large files that I need to change the compression type of for input to a program--I need to unrar them and then gzip (or bzip2) them. However, they're highly compressed files and I don't have the disk space to unrar them fully then gzip them. Is there any way to pipe the output of decompression via unrar to gzip or some other compression without saving the entire intermediate result to disk?


Why does grep not work with redirection?

Using the `top` command with redirection works fine:               top > top.log      Now I want to use grep to filter a certain line:               top | grep "my_program" > top.log      But the log file will remain empty. But grep delivers an output when using               top | grep "my_program"      Where `my_program` has to be replaced by a running program to see some output. Why does my approach not work ? And how can I fix it ?


start mysql server at boot for debian

I am using Debian Etch and I have following this and tried to write a script like this to auto start mysql server at boot:               #! /bin/sh     # /etc/init.d/blah     #          # Some things that run always     sudo /etc/init.d/mysql start      I used `update-rc.d` also, but mysql server don't start at boot, why?


X -config Leaves a Blank Screen

In Slackware, when I use the command "Xorg -configure" to setup the X server, I get the following:               (EE) Failed to load module "vmwgfx" (module does not exist, 0).     (EE) vmware: Please ignore the above warnings about not being able to load module/driver vmwgfx (???)     (EE) vmware: unexpected failure while loading the "vmlegacy" driver. Giving up.     (EE) LoadModule: Module xgi does not have a xgi ModuleData data object.     (EE) Failed to load module "xgi" (invalid module, 0)     (++) Using config file: "/root/xorg.conf.new"     (==) Using system config directory "/usr/share/X11/xorg.conf.d".      Because of this, when I test the Xserver, all I get is a blank screen. What can I do to fix this? I'm running a Gateway NV57H laptop with an intel graphics card. **update** Problem fixed. While I wasn't able to test the X server from the commandline, I was able to make my distro _restart_ into the x server. This problem has now been solved.


How to prevent the auto creation of the "Desktop" folder?

> **Possible Duplicate:**   >  Which application should I blame for compulsively creating a directory > again and again? When I upload files via Firefox, the `Open File` dialog appears and the `Desktop` folder is automatically created. I am using Arch Linux with Xmonad and quite frankly I don't need a `Desktop` folder inside my `home` folder. How do I stop this from happening in the future (i.e. disable the auto creation of the `Desktop` folder)?


Yum Cannot Retrieve Repository CentOS 6

I just installed CentOS 6. I tried running yum update and was having trouble getting that to work, so I tried yum clean all and now my situation seems even worse than before. Based upon what I pasted below, can someone please help me fix my yum repository? Thanks.               [root@zedo-pc 1234]# yum update     Loaded plugins: fastestmirror, refresh-packagekit     Loading mirror speeds from cached hostfile      * base: mirror.7x24web.net      * extras: mirror.linux.duke.edu      * updates: mirror.lug.udel.edu     Error: no such table: packages          [root@zedo-pc 1234]# yum clean all     Loaded plugins: fastestmirror, refresh-packagekit     Cleaning up Everything     Cleaning up list of fastest mirrors          [root@zedo-pc 1234]# yum update     Loaded plugins: fastestmirror, refresh-packagekit     Determining fastest mirrors      * base: mirror.lug.udel.edu      * extras: mirror.symnds.com      * updates: mirror.rackspace.com     Error: Cannot retrieve repository metadata (repomd.xml) for repository: InstallMedia. Please verify its path and try again


Start a service on HPUX at boot

I'm trying to start a service on `HPUX 11.31` at boot time. I generated the appropriate symlinks, but the system is not starting it up. If I run the script once the system is up, everything works as expected (but I need the service to come up at boot time by itself).                $ ls -l /sbin/init.d/weblogic      -rwxr-xr-x   1 oracle     oracle 3066 Sep 23 13:59 /sbin/init.d/weblogic           $ ls -l /sbin/rc?.d/*weblogic      lrwxr-xr-x   1 root  sys  21 Sep 23 13:38 /sbin/rc2.d/S998weblogic -> /sbin/init.d/weblogic      lrwxr-xr-x   1 root  sys  21 Sep 23 13:38 /sbin/rc3.d/S998weblogic -> /sbin/init.d/weblogic      lrwxr-xr-x   1 root  sys  21 Sep 23 13:38 /sbin/rc4.d/S998weblogic -> /sbin/init.d/weblogic


Open running KVM in separate session

I have a KVM session running on my host. If I login as someone else on my host machine, is it possible to access that running KVM session (not through the network)? I am not using the virtual manager either - I started the machine with the `kvm` command.


BackTrack USB Wireless adapter drivers issue

I purchased USB Wireless adapter which runs smoothly on Windows and Ubuntu, but in BackTrack it showing me Bad password issue. From my reading I guess it's driver issue which BackTrack Kernel don't have drivers for RTL8191SU (my) Adapter. The Realtek site have drivers for kernels 2.6-2.9. Even thought BackTrack 5R3 comes with 3.2.6, I tried to compile drivers which failed for me with **make** errors. Additionally I cant get monitor mode in aircrack suite. Any possible solutions or instructions?


How do I copy and paste text that's in a weird window (pictured here)?

![enter image description here](http://i.stack.imgur.com/wgZgD.png) The program is called ncview. I can drag and highlight the text inside, but not even Ctrl-C allows the text to be copied for pasting. Current distribution is a Debian distribution.


How can I prepend a tag to the beginning of several files?

I need to add PHP tags surrounding a file. It's easy to append them using               find . -exec echo "?>" >> '{}' \;      but how can I _prepend_ the tag `<?php`?


Inserting text at the beginning of a file with sed via the terminal in Linux

> **Possible Duplicate:**   >  How can I prepend a tag to the beginning of several files? How do I insert text at the beginning of a file via terminal?


Is there a way of color-highlighting paired brackets in shell (bash)?

Does anyone know if there is a way reproducing the same behaviour many text editors provide for colour-highlighting the syntax operators such as brackets or curly brackets. It would be very useful for complex one-liners in the terminal. Example of the functionality I am talking about (from VIM). ![Example](http://i.stack.imgur.com/MOw4X.png)


How to refresh a window by terminal? Or how to simulate `F5`?

I would like a way to refresh a specific window by the terminal. Probably I will need a comand to find the id or the name of the window and a command to refresh it. It looks like `xrefresh` cannot do this, how could I do this?


Download specific files with FTP?

I am trying to use FTP to download several hundred files within a directory. Is there a way to only download specific files with FTP? Ideally, I would like to match specific files using a regular expression. Unfortunately, the directory is massive and it's too large to download the entire directory and then use find or grep locally to manipulate certain files. Is there a simply way to do what I am trying to do on Unix? If not, I plan to just write a script in perl or python. Thanks in advance for the help.


Mount and automount and security problems

Are there any security problems related with (auto)mounting device?


check/change reserve policy on a virtual disk

I need to check if a Virtual Disk has this policy enable, if so I need to `reserve_policy=no_reserve` I need to create an DB2 Database Cluster I cannot find a Linux Command for that. I do know if this information is enough to explain my issue.


I have installed linux on my system and I wanted to install git. Can anyone help me?

How to install git in linux and how to work with git?


How to differ between build-dependencies and usage-dependencies?

Some dependencies of packages are only required for compilation, while others are required for actual usage. As an example, I happen to know `net- misc/unison` does require `dev-lang/ocaml` only for compilation, while its `sys-libs/glibc` dependency is (also) for usage. But how can one actually figure out the difference?


FreeBSD in USB Flash Drive

I like to use live FreeBSD in my USB flash drive. How can i do it ? Please give clear way to do it.


linux + xzcat command

Please advice from where ( which site ) I can download the xzcat Linux command? I am using linux version 5.4 I tried to download the xzcat from the site: http://www.filewatcher.com/m/xzcat.2-0.html but when I run the xzcat on my linux machine I get the following:                /tmp/xzcat  initrd.img | cpio -idm     -bash: /tmp/xzcat: cannot execute binary file      cpio: premature end of archive      I also tried insted the xzcat               cpio -id < initrd.img      cpio: warning: skipped 72460 bytes of junk     cpio: warning: archive header has reverse byte-order


How to run a script during Gnome log out

I would like to run a script to rsync my home directory to another machine whenever I log out of Gnome. There is a way to hook into the Gnome logout process?


Changing SMTP authentication in mutt based on From e-mail address

I use mutt as my e-mail reader, and nbSMTP as my SMTP client. I check e-mail from a half dozen accounts and sort them into miscellaneous folders in my maildir. Some of the folders are account-specific, but some contain e-mails from multiple accounts in one folder A number of the accounts are through Gmail, which has the unfortunate security feature of preventing users from sending from addresses that aren't theirs. Thus if I tell nbSTMP to authenticate as `user1@gmail.com` and send an e-mail with a `From: user2@gmail.com` header, Gmail will rewrite the header to `From: user1@gmail.com`. I've worked around this somewhat by adding folder hooks for the folders that are account-specific; when I switch to one of those folders the hook changes my sendmail command to pass nbSMTP the appropriate command-line arguments:               folder-hook =work 'set from="work@example.com"'     folder-hook =work 'set sendmail="/usr/bin/nbsmtp -f work@example.com -U work -P password"'      However, this doesn't work for the folders that hold mail from multiple accounts, and it doesn't work if I try to e.g. send e-mail from `work@example.com` when I haven't switched to the `work` folder (since the folder hook hasn't run). **Is there a way to control how nbSMTP authenticates based on the`From` header in the outgoing e-mail?** I don't think nbSMTP has the flexibility to handle it itself, so I'm pretty sure it will have to be some kind of `mutt` configuration like the `folder-hook` method I'm currently using, but I haven't figured out how to do it. If necessary I can probably switch SMTP clients, if there's another that does provide the necessary functionality


Periodic filesystem replication wih snapshot

I'm looking for a non-realtime replication solution that supports periodic snapshot. Here's my current situation:   * I have 2 email servers running **Ubuntu 12.04 LTS**   * The mail server program I use is Axigen v8.1.1, serving 2000+ mailboxes, with a rate of approx. 2000 emails per hour during workhours   * The configuration is **Master/Slave** , using heartbeat/pacemaker   * Axigen uses its own proprietary database to store all settings and messages   * Most users access the email server using POP3, but some use IMAP4 What I want to implement:   * Every _N_ minutes, there should be a snapshot done on the master to be shipped to Slave   * Slave should be able to efficiently store at least _M_ latest snapshots, plus 2 daily snapshots, just in case we need to roll back   * (We can live with N minutes of lost emails; all emails are stored in a MailArchiva storage system) **My original plan** was to implement Axigen's datastore on a ZFS-on-Linux (ZoL) filesystem, with regular snapshots that would be shipped (incrementally) to Slave. However, I was bitten with ZoL's instability during heavy I/O, where I had experienced several incidents of _CPU Soft Lockup_. The ZoL discussion group suggested I reduce the size of the ARC cache, but of course that would impact performance, so I instead revert to an ext4-backed storage on Master. (Might still implement ZFS on Slave, though). **I'm considering several options:**   1. Reconfigure the Master so that the datastore is on an LVM-backed storage, and regularly create an LVM snapshot to sync to the Slave using `csync2` or `rsnapshot` (and delete the LVM snapshot after a successful sync). On the Slave side, after every successful sync, do a ZFS snapshot to maintain the required number of snapshots & daily snapshots.   2. Implement DRBD in a Master/Slave configuration, with a hard disk-backed storage on Master, but a ZVOL-backed storage on Slave.   3. Implement a Clustered File System that supports snapshots... but which one? Your thoughts and inputs are very much appreciated. * * * _Edit:_ due to my department's budget situation, I can't use a commercial solution. Maybe next year, but unfortunately my need is current. * * * _Edit 2:_ the ZoL instability might not be the instability of ZoL itself per se, but I suspect more because of the unbelievable memory churn of the email server (due to some reasons, I have to implement Perdition in front of the Axigen server, and Perdition creates one process per connection, so the server's memory might be severely fragmented and blocks ZoL from claiming some SLABs to grow its ARC Cache)


Can you mount UFS partitions made in Solaris (Sparc) on Solaris (x86)?

I am reading about Endianness and it seems both systems save their data differently. Sparc uses big endian and x86 uses small endian, meaning the byte order is different. That makes me wonder... is it possible to mount UFS partitions from Sparc on x86-systems?


Using awk to process ls output with spaces in filenames/paths

All,   I have a script in which I use find command to filter out all png files in a given folder and list them along with their size. I want the output in the following format:                someFile.png => 1.2K       I'm using awk to to fetch $5(file size in human friendly format) and $9(path). Here is what I'm currently using:                find "$somePath"  -iname "*.png" -print0 | xargs -0 ls -lh  | awk '{print $9,"=>",$5}'      Sometimes the file names or the paths have spaces and this trips the script. Here is an example output:   /Users/test/Desktop/Test/image1 => 1.2K   /Users/test/Desktop/Test/image1.png => 1.4K The first entry in output is a file called "image1 test.png". I read somewhere that one should not parse the ls output. What's is the best way to tackle this?


(Ab) use Apache as a proxy

I have a publicly available Apache server. Is it possible to redirect all incoming requests (e.g. http:// publicname/test/) so that all accesses to /test/ are redirected to another server (in the private network, and not exposed to the internet, e.g. http:// 192.168 .1 .4/test/) without using antything besides Apache.                Internet --- httpp://xx.xx.xx/> Public Apache <- 192. 168. 1 .3   --- 192.168.1 .4-> Private Apache


How many reboots are required for updating Solaris 10 update 8 to update 10?

The Oracle Live Upgrade document* states that these patches need to be done before doing the LiveUpgrade: *Document 1004881.1, "Solaris 10 5/08 (Update 5) or later:"               119254-LR  Install and Patch Utilities Patch     121430-LR  Live Upgrade patch     121428-LR  SUNWluzone required patches     138130-01  vold patch     146578-06  cpio patch (The most recent replacement for this patch is 148027-03)      Dependencies for the last patch:               Patch-ID# 142909-17 Synopsis: SunOS 5.10: kernel patch (needs reboot)     Patch-ID# 137137-09 Synopsis: SunOS 5.10: kernel patch (needs reboot)      Post-update packages:               146670-02 (SunOS 5.10: libproject patch, needs reboot)     147774-01 automountd patch      7 patches need to be done before Live Upgrading the server with lucreate, luupgrade and luuactivate. I have been told that a Live Upgrade from update 8 to update 10 can be done with 5 minutes downtime on a ZFS server. With the reboot, it might take up to one hour and a half as the luupgrade process is time-consuming. What is the truth? Should I do the Live Upgrade without the reboot for the pre-upgrade patches (142909-17, 137137-09) so I can do the lucreate/luupgrade/luactivate while the server is running and have 5 minutes downtime or do the reboot after the patches and accept that downtime might take up to 2 hours.


Why I can't escape spaces on a bash script?

I'm trying to escape the space char for a path in Bash, but neither using a backslash or quotes works. .sh script:               ROOT="/home/hogar/Documents/files/"     FILE=${ROOT}"bdd.encrypted"     DESTINATION="/home/hogar/Ubuntu\ One/folder"          mv ${FILE} ${DESTINATION}      After execute the script (`./file`) this is the result: > mv: target ‘One/folder’ is not a directory Why does the `mv` command split the string and who do I stop this?


Catch "command not found" from shell script

I have a shell script               echo "Type your command"     read command     echo "You typed $command"     $command      so it's simple it runs a command.My question is if the input is wrong suppose `lw` the terminal says `command not found` so how can I retrieve this information to my shell script and print to terminal `Try again wrong command`. Do I have to redirect the output of the command to a certain file and read or is there any kind of trap signal which is passed to my script.Which is your advice on how to do that it in the most efficient way.


How to test whether Linux is running on a ThinkPad?

### I need to programmatically detect if Linux is running on a ThinkPad. A shell script would be _ideal_ but I can programmatically generate any binary by downloading some source and compiling it on the machine if only a custom program will be able to _reliably_ do that. Focus is: **reliability/accuracy**. If in doubt, I prefer _not_ to run the script. I have a hunch this may be cleverly done using text parsing of things like dmesg or `lshw`, but which method is the most reliable? **Restriction** : run as a normal user, as part of a login script, no possibility of temporarily elevating privileges just to detect the machine model. **Permission** : take as long as needed, speed is not a factor. **Environment** : Ubuntu, but Linux generality is nice to have. Availability of developer-level build tools (GCC can be assumed to "just work"). The login script is run by bash so a code snippet in that syntax would be more directly usable.


Where is the bugtracker for `ifconfig` located?

Is there an official place to file bugs for the package in which `ifconfig` can be found? Do most major distributions have their own implementation of the library, or does the library come from one central location?


Is there a simple flag to prevent installing X and anything that depends on it via ports?

I'm running FreeBSD in a small VMWare image and I want to keep it headless. Is there a setting someplace that will guarantee I never pull in X as a dependency, or will I have to rely solely on eternal vigilance? Thanks. See also: the same basic question on SuperUser


Return only the portion of a line after a matching pattern

So pulling open a file with cat and then using grep to get matching lines only gets me so far when I am working with the particular log set that I am dealing with. It need a way to match lines to a pattern, but only to return the portion of the line after the match. The portion before and after the match will consistently vary. I have played with using sed or awk, but have not been able to figure out how to filter the line to either delete the part before the match, or just return the part after the match, either will work. This is an example of a line that I need to filter:               2011-11-07T05:37:43-08:00 <0.4> isi-udb5-ash4-1(id1) /boot/kernel.amd64/kernel: [gmp_info.c:1758](pid 40370="kt: gmp-drive-updat")(tid=100872) new group: <15,1773>: { 1:0-25,27-34,37-38, 2:0-33,35-36, 3:0-35, 4:0-9,11-14,16-32,34-38, 5:0-35, 6:0-15,17-36, 7:0-16,18-36, 8:0-14,16-32,34-36, 9:0-10,12-36, 10-11:0-35, 12:0-5,7-30,32-35, 13-19:0-35, 20:0,2-35, down: 8:15, soft_failed: 1:27, 8:15, stalled: 12:6,31, 20:1 }      The portion I need is everything after "stalled". The background behind this is that I can find out how often something stalls:               cat messages | grep stalled | wc -l      What I need to do is find out how many times a certain node has stalled (indicated by the portion before each colon after "stalled". If I just grep for that (ie 20:) it may return lines that have soft fails, but no stalls, which doesn't help me. I need to filter only the stalled portion so I can then grep for a specific node out of those that have stalled. For all intents and purposes, this is a freebsd system with standard gnu core utils, but I cannot install anything extra to assist.