title: Characters not defined into iso14651_t1_pinyin are not sorted properly

text: when I try to sort characters not defined in iso14651_t1_pinyin, no sort happens, they are simply left in place. I would expect to see them sorted according to their codepoint. Is there a way I can modify the collation file to enforce this rule? To replicate:   1. set your locale to zh_CN   2. sort the following list: > 㐀 > > 㐃㐄 > > ▼▽◢ > > ㎏㎜㎝ > > ｂｑｚ > > ㄠㄨㄩ─┃┆ > > ◆□■△ > > ぁあぃい > > ┻╋┠┯┨ > > ꓃꓄꓆꒺꒻ > > 々—～‖…‘” > > 龷龸龹龺龻 > > ⺁⺄⺈⺋⺌⺗⺧⺪⺮⺳⺶⺷⺻⻊ > > mario > > david > > 且 > > 丁 > > 㐀丁 > > 㐂 > > 㐀且 > > 嗄 > > 阿 What I would expect:   1. Characters defined in pinyin (阿 - 嗄 - 丁 - 且) sorted according to pinyin   2. Other characters sorted by code point (for example, I would expect 㐀, 㐀丁, 㐀且 to be sorted together since they start with the same character). I know that you can use the UNDEFINED entry inside your collation file for this: > The symbol UNDEFINED shall be interpreted as including all coded character > set values not specified explicitly or via the ellipsis symbol. Such > characters shall be inserted in the character collation order at the point > indicated by the symbol, and in ascending order according to their coded > character set values. If no UNDEFINED symbol is specified, and the current > coded character set contains characters not specified in this section, the > utility shall issue a warning message and place such characters at the end > of the character collation order. but it isn't working. Any clues?


title: Test if there are files matching a pattern in bash

text: I am trying to write an if statement in bash to test whether there are any files matching a certain pattern. If there is a text file in a directory it should run a given script. My code currently               if [ -f /*.txt ]; then ./script fi      Please give some ideas I only want to run the script if there is a `.txt` in the directory.


title: Video acceleration disabled in Mint Linux 15 (Olivia) on an Intel Atom processor

text: Recently I installed Mint Linux 15 (Olivia) 32 bit on my friends netbook. I am copy pasting the output of _sudo lspci -vk_               00:00.0 Host bridge: Intel Corporation Atom Processor D2xxx/N2xxx DRAM Controller (rev 03)     Subsystem: Acer Incorporated [ALI] Device 061f     Flags: bus master, fast devsel, latency 0          00:02.0 VGA compatible controller: Intel Corporation Atom Processor D2xxx/N2xxx Integrated Graphics Controller (rev 09) (prog-if 00 [VGA controller])     Subsystem: Acer Incorporated [ALI] Device 061f     Flags: bus master, fast devsel, latency 0, IRQ 46     Memory at 86000000 (32-bit, non-prefetchable) [size=1M]     I/O ports at 50d0 [size=8]     Expansion ROM at <unassigned> [disabled]     Capabilities: [d0] Power Management version 2     Capabilities: [b0] Vendor Specific Information: Len=07 <?>     Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit-     Kernel driver in use: gma500      So the problem is whenever I try to boot into the system it pops out a notification (not the exact words)               Running in software rendering mode. No Hardware acceleration.      I have searched the Mint Linux forum and found [this thread] (http://forums.linuxmint.com/viewtopic.php?f=49&t=135578&p=727654), but it did not help much. I am also attaching the output of _inxi -Fxz_               Kernel: 3.8.0-19-generic i686 (32 bit, gcc: 4.7.3)     Desktop: Gnome     Distro: Linux Mint 15 Olivia     Machine:        System: Acer product: AOD270 version: V1.06     Mobo: Acer model: JE01_CT     Bios: Insyde version: V1.06 date: 03/05/2012     CPU:     Dual core Intel Atom CPU N2600 (-HT-MCP-)     cache: 512 KB flags: (lm nx sse sse2 sse3 ssse3) bmips: 6383.8     Clock Speeds: 1: 1600.00 MHz 2: 1600.00 MHz 3: 1600.00 MHz 4: 1600.00 MHz          Graphics:     Card: Intel Atom Processor D2xxx/N2xxx     Integrated Graphics Controller bus-ID: 00:02.0     X.Org: 1.13.3 drivers: vesa (unloaded: fbdev)     Resolution: 1024x600@60.0hz     GLX Renderer: Gallium 0.4 on llvmpipe (LLVM 3.2, 128 bits)     GLX Version: 2.1 Mesa 9.1.1     Direct Rendering: Yes      Can someone help me to solve this problem? The direct effect of disabled hardware video acceleration is that it is impossible to play video files and since the CPU is engaged with software acceleration, the system is damn too slow. I hope I have provided enough details regarding the issue and hardware configuration. Please let me know if you need further information.


title: How do I use sudo to run multiple commands as another user within a portion of a script?

text: I'm trying to run the following:               if [! -f .owner ]; then         creator=$(whoami)         sudo -u appuser ksh         echo "$creator" >> .owner         mkdir test1 test2 test3         exit     fi      However, the file/folders get made by the person that runs the script. Any way to make these get created by appuser? **Edit** : `sudo -l` returns `(appuser) NOPASSWD: ALL`


title: Stop init.d from running, and go to terminal prompt

text: I'm running Rasbian (Debian?) on my Raspberry Pi, and have allot of auto- starting things in init.d. But what if I want to stop them all from running, and simply break into a terminal prompt? I've tried ctrl+c and I've tried esc, but none of the two seem to work. Any suggestions? PS: I can log in through SSH and modify whatever, this is not a question of being "locked out of my Linux". I'm just curious if there are any "hold down key X to go to failsafe prompt".


title: Plasmoid - connect KDE signal with QML UI

text: I'm working on this small KDE plasmoid and I really like the QtQuick/QML, but now I have this requirement. I need to do an action when a window is shown or closed in KDE. KDE API have signals for that: https://techbase.kde.org/Development/Tutorials/KWin/Scripting/API_4.9#Signals_3               windowClosed(KWin::Toplevel *toplevel, KWin::Deleted *deleted)     windowShown(KWin::Toplevel *toplevel)      But, I don't know how to connect the KDE signals with my QML plasmoid. I guess with a little bit of C++ it might be possible. No problem with mixing C++ and QML, this is documented by Qt quite good. I think what I need is C++ code, which takes the qml as a layout and setup the signal connection. Is that even possible?


title: Trying to SSH to local VM Ubuntu with putty

text: I have found similar questions in my searches here, but most of the answers are way above me at the moment, so here goes. I have set up a VM of Ubuntu server, have installed OpenSSH, and am now trying to connect to it using Putty. Within putty, under "Host name", I put "Ubuntu", given this is what I thought it was called when I set up the VM, however I just get the error "Connection Timed Out". I also tried putting 127.0.0.1 into the host name within putty and just get "Connection Refused". Note that I have done the port forwarding for SSH and HTTP within Oracle VM, so I am at a loss as to how to get it running. Can anyone help? Apologies if I am unclear - complete novice here!


title: How do I delete everything in a directory?

text: I'm sorry for asking such a basic question: How do I delete everything in a directory, including hidden files and directories? Right now, I use the following:               rm -rf *     rm -rf .*


title: Rooting Linux via mysql

text: I have a CentOS 5.6 x86 installed. I have full access to mysql but it seems I have forgotten Linux root password. How I can access the root via MySQL? Is it even possible? Update: MySQL Version is 5.0.77


title: Adding IPVS to the kernel

text: I am trying to setup keepalived on a pair of VPS load balancer servers. I have hit the road block of IPVS not being included with the kernal.               IPVS: Can't initialize ipvs: Protocol not available      I am not familiar on the best way to add support for this, I believe it may be possible with a kernel module but I am unclear how to proceed.


title: sign and trust gpg key automatically via bash

text: I've got a question about gpg and signing a key automatically via bash: I've got a script, that is doing the beginning of signing:               gpg --recv $schluessel1     gpg --edit $schluessel1      If I try something like this:               lsign      it is ignored and just show me the below output.               gpg>      From the above prompt, I can write manually `lsign` and later `y` in. Is it possible to do these two steps automatically?


title: Is there a way in Linux to have one non root user check if another non root user has permissions to a folder / file?

text: The scenario is this - I have a command line program that might not run as root, part of the requirements is to warn if another user has write permissions to some folder / file e.g.   * I'm running as non root user A    * I would like to get the answer to the question: "does user B has write permissions to folder F" So my questions are   * Is it even possible to do as a root user? if so how?    * Is there any way to do it as a non root user?


title: RHEV cannot start inside Oracle VirtualBox

text: While installing RHEV Hypervisor 3.3 on Oracle VirtualBox I am getting following message:               Failed to open a session for the virtual machine RhevH1     VT-x is used by another hypervisor.     (VERR_VMX__IN_VMX_ROOT_MODE).     VirtualBox Can't operate in VMX root mode. Please disable the KVM     kernel extension, recompile your kernel and reboot     (VERR_VMX_IN_VMX_ROOT_MODE).      What are the possible solutions are there for this?


title: Where does xfce4 hold its application references?

text: I just started up an application that created an shortcut icon in the applications menu of xfce4. However, I moved the entire application to /opt (This is a good place to put non native package managed applications right?) and so the shortcut now doesn't find the bin, because well its not there anymore. I can make a symlink to patch this, but that's ugly. Where does xfce4 keep its shortcuts text for its applications? (just can't find it, tried looking in ~/.config)


title: Windows 7 Dual Boot + Virtualization under Ubuntu 10.04?

text: **Question:** I currently have a dual boot: Win 7 x64 Pro & Ubuntu 10.04.1 x64. Is there a way to boot Win 7 as a virtual machine under Ubuntu without reinstalling anything, _in addition to maintaining the ability to dual boot?_ **Background:** I have a dual boot system with Windows 7 installed on one partition in a Raid 5 and Ubuntu 10.04.1 installed in a separate partition (actually split across three) in the same Raid 5. I have a Core i7-930 with 6GB of RAM. I'd be happy to provide any other hardware specs. I require Windows 7 x64 Pro for only a small number of things, basically just VS 2008 / VS 2010 so that I can use nSight from nVidia to debug CUDA / OpenCL projects. I must be able to dual boot because (and this is more just my suspicion) I don't want any more between the software and the three graphics cards that I have installed than is _absolutely necessary_. If it means anything, when in production mode where I'm running without virtualization, I have two cards set to exclusive mode and one set to prohibited mode (to drive the display). I'm worried that running nvidia-smi under either Ubuntu as the host OS or Win 7 as guest OS might bollux things up. I don't know much about Xen, KVM, etc. I've played around a bit with them, but I'm more than willing to use any virtualization software as long as it's free and it can accomplish what I want. Note that I'm a student -- this is all non- commercial development. I can, if absolutely necessary, reinstall everything, but I had many, many problems getting the CUDA environment to work under VS 2010 -- I installed/uninstalled/reinstalled VS '08 & '10 so many times that it corrupted the Win 7 registry and I had to start over from scratch. Now that it's working as a dual boot, I'd really like to avoid starting from scratch a fourth time.


title: setfacl remove all write access

text: I want to remove all write access to files & directories for any user or group while preserving other permissions. Is this possible?


title: Detach keyboard from the kernel

text: I am writing a remote controller app for an octocopter and want to use a keyboard as an input device for this app but I don't want it to have any effect outside this app. Somehow I would like to make the kernel to see this keyboard as one of the input devices (like a gamepad) but not treat it as a keyboard. I searched for the answer but found only solutions at Xorg level but I want to do it at a lower level to disable even the SysRq commands. (If it helps: I use Linux Mint 16 and a noname usb keyboard)


title: ps: full command is too long

text: Good day! I use 'ps' to see command that starts process. The issue is that command is too long and 'ps' does not show it entirely. Example: I use command 'ps -p 2755 | less' and have following output                 PID TTY      STAT   TIME COMMAND     2755 ?        Sl   305:05 /usr/java/jdk1.6.0_37/bin/java -Xms64m -Xmx512m -Dflume.monitoring.type=GANGLIA -Dflume.monitoring.hosts=prod.hostname.ru:8649 -cp /etc/flume-ng/conf/acrs-event:/usr/lib/flume-ng/lib/*:/etc/hadoop/conf:/usr/lib/hadoop/lib/activation-1.1.jar:/usr/lib/hadoop/lib/asm-3.2.jar:/usr/lib/hadoop/lib/avro-1.7.4.jar:/usr/lib/hadoop/lib/commons-beanutils-1.7.0.jar:/usr/lib/hadoop/lib/commons-beanutils-core-1.8.0.jar:/usr/lib/hadoop/lib/commons-cli-1.2.jar:/usr/lib/hadoop/lib/commons-codec-1.4.jar:/usr/lib/hadoop/lib/commons-collections-3.2.1.jar:/usr/lib/hadoop/lib/commons-compress-1.4.1.jar:/usr/lib/hadoop/lib/commons-configuration-1.6.jar:/usr/lib/hadoop/lib/commons-digester-1.8.jar:/usr/lib/hadoop/lib/commons-el-1.0.jar:/usr/lib/hadoop/lib/commons-httpclient-3.1.jar:/usr/lib/hadoop/lib/commons-io-2.1.jar:/usr/lib/hadoop/lib/commons-lang-2.5.jar:/usr/lib/hadoop/lib/commons-logging-1.1.1.jar:/usr/lib/hadoop/lib/commons-math-2.1.jar:/usr/lib/hadoop/lib/commons-net-3.1.jar:/usr/lib/hadoop/lib/guava-11.0.2.jar:/usr/lib/hadoop/lib/jackson-core-asl-1.8.8.jar:/usr/lib/hadoop/lib/jackson-jaxrs-1.8.8.jar:/usr/lib/hadoop/lib/jackson-mapper-asl-1.8.8.jar:/usr/lib/hadoop/lib/jackson-xc-1.8.8.jar:/usr/lib/hadoop/lib/jasper-compiler-5.5.23.jar:/usr/lib/hadoop/lib/jasper-runtime-5.5.23.jar:/usr/lib/hadoop/lib/jaxb-api-2.2.2.jar:/usr/lib/hadoop/lib/jaxb-impl-2.2.3-1.jar:/usr/lib/hadoop/lib/jersey-core-1.8.jar:/usr/lib/hadoop/lib/jersey-json-1.8.jar:/usr/lib/hadoop/lib/jersey-server-1.8.jar:/usr/lib/hadoop/lib/jets3t-0.6.1.jar:/usr/lib/hadoop/lib/jettison-1.1.jar:/usr/lib/hadoop/lib/jetty-6.1.26.cloudera.2.jar:/usr/lib/hadoop/lib/jetty-util-6.1.26.cloudera.2.jar:/usr/lib/hadoop/lib/jline-0.9.94.jar:/usr/lib/hadoop/lib/jsch-0.1.42.jar:/usr/lib/hadoop/lib/jsp-api-2.1.jar:/usr/lib/hadoop/lib/jsr305-1.3.9.jar:/usr/lib/hadoop/lib/junit-4.8.2.jar:/usr/lib/hadoop/lib/kfs-0.3.jar:/usr/lib/hadoop/lib/log4j-1.2.17.jar:/usr/lib/hadoop/lib/mockito-all-1.8.5.jar:/usr/lib/hadoop/lib/native:/usr/lib/hadoop/lib/paranamer-2.3.jar:/usr/lib/hadoop/lib/protobuf-java-2.4.0a.jar:/usr/lib/hadoop/lib/servlet-api-2.5.jar:/usr/lib/hadoop/lib/snappy-java-1.0.4.1.jar:/usr/lib/hadoop/lib/stax-api-1.0.1.jar:/usr/lib/hadoop/lib/xmlenc-0.52.jar:/usr/lib/hadoop/lib/xz-1.0.jar:/usr/lib/hadoop/lib/zookeeper-3.4.5-cdh4.3.0.jar:/usr/lib/hadoop/.//bin:/usr/lib/hadoop/.//cloudera:/usr/lib/hadoop/.//etc:/usr/lib/hadoop/.//hadoop-annotations-2.0.0-cdh4.3.0.jar:/usr/lib/hadoop/.//hadoop-annotations.jar:/usr/lib/hadoop/.//hadoop-auth-2.0.0-cdh4.3.0.jar:/usr/lib/hadoop/.//hadoop-auth.jar:/usr/lib/hadoop/.//hadoop-common-2.0.0-cdh4.3.0.jar:/usr/lib/hadoop/.//hadoop-common-2.0.0-cdh4.3.0-tests.jar:/usr/lib/hadoop/.//hadoop-common.jar:/usr/lib/hadoop/.//lib:/usr/lib/hadoop/.//libexec:/usr/lib/hadoop/.//sbin:/usr/lib/hadoop-hdfs/./:/usr/lib/hadoop-hdfs/lib/asm-3.2.jar:/usr/lib/hadoop-hdfs/lib/commons-cli-1.2.jar:/usr/lib/hadoop-hdfs/lib/commons-codec-1.4.jar:/usr/lib/hadoop-hdfs/lib/commons-daemon-1.0.3.jar:/usr/lib/hadoop-hdfs/lib/commons-el-1.0.jar:/usr/lib/hadoop-hdfs/lib/commons-io-2.1.jar:/usr/lib/hadoop-hdfs/lib/commons-lang-2.5.jar:/usr/lib/hadoop-hdfs/lib/commons-logging-1.1.1.jar:/usr/lib/hadoop-hdfs/lib/guava-11.0.2.jar:/usr/lib/hadoop-hdfs/lib/jackson-core-asl-1.8.8.jar:/usr/lib/hadoop-hdfs/lib/jackson-mapper-asl-1.8.8.jar:/usr/lib/hadoop-hdfs/lib/jasper-runtime-5.5.23.jar:/usr/lib/hadoop-hdfs/lib/jersey-core-1.8.jar:/usr/lib/hadoop-hdfs/lib/jersey-server-1.8.jar:/usr/lib/hadoop-hdfs/lib/jetty-6.1.26.cloudera.2.jar:/usr/lib/hadoop-hdfs/lib/jetty-util-6.1.26.cloudera.2.jar:/usr/lib/hadoop-hdfs/lib/jline-0.9.94.jar:/usr/lib/hadoop-hdfs/lib/jsp-api-2.1.jar:/usr/lib/hadoop-hdfs/lib/jsr305-1.3.9.jar:/usr/lib/hadoop-hdfs/lib/log4j-1.2.17.jar:/usr/lib/hadoop-hdfs/lib/protobuf-java-2.4.0a.jar:/usr/lib/hadoop-hdfs/lib/servlet-api-2.5.jar:/usr/lib/hadoop-hdfs/lib/xmlenc-0.52.jar:/usr/lib/hadoop-hdfs/lib/zookeeper-3.4.5-cdh4.3.0.jar:/usr/lib/hadoop-hdfs/.//bin:/usr/lib/hadoop-hdfs/.//cloudera:/usr/lib/hadoop-hdfs/.//hadoop-hdfs-2.0.0-cdh4.3.0.jar:/usr/lib/hadoop-hdfs/.//hadoop-hdfs-2.0.      So, the command line is too long and the command stops mid-phrase. How can I see it whole?


title: How to get colours on man pages with w3m as a PAGER?

text: Is it possible, and if so how, to have colour/ **bold** / _italic_ characters in `man` pages while using `w3m`? Another pager (`most`) does have some limited colour support but is not as versatile as `w3m`. I know that `less` does have colour support as shown here.


title: How can I enable a service only when it's installed in Puppet?

text: I was said to use the onlyif-parameter, but there doesn't seem to exist one for the service-type. What can I do to enable this service only if it's installed? It's installed with a binary installer, so testing if the installation directory exists t               class scom {         service { 'scx-cimd':             ensure => running,             enable => true,             hasstatus => true,             hasrestart => true,             onlyif => "test -f /opt/microsoft/scx"         }     }      The current error message is "Invalid parameter onlyif", because service doesn't have an onlyif parameter. What can I do to enable this service only if it's installation directory exists?


title: VirtualBox Guest Additions causes problems with X server in Fedora 18. How to solve without reinstalling?

text: I've installed VirtualBox (and it's Guest Additions), and after updating the kernel to the latest and also updating VB accordingly, I can not boot normally . (X server doesn't start, but I can login using Ctrl+Alt+F2) I read in the last post here that the problem is probably caused by graphical parts (OpenGL hardware 3D acceleration) of this Guest Addition. Is there any way to fix the problem without reinstalling Fedora ?


title: Network block after restart

text: I'm running wheezy and I don't want to install network-manager. I have a problem with network interfaces. When I restart the interfaces I cannot use any connection anymore. I cannot reach internet or same subnet ip addresses. here the `ifconfig`, `route`,`ping` and dns command before the restarting               eth0      Link encap:Ethernet  HWaddr 90:59:af:51:17:c3               inet addr:192.168.1.30  Bcast:192.168.1.255  Mask:255.255.255.0               inet6 addr: fe80::9259:afff:fe51:17c3/64 Scope:Link               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:33873 errors:0 dropped:479 overruns:0 frame:0               TX packets:952 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000               RX bytes:4125488 (3.9 MiB)  TX bytes:113565 (110.9 KiB)               Interrupt:56      `route -n`                Destination     Gateway         Genmask         Flags Metric Ref    Use Iface      0.0.0.0         192.168.1.10    0.0.0.0         UG    0      0        0 eth0      192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0      `ping google.com`               PING google.com (173.194.112.36) 56(84) bytes of data.     64 bytes from fra07s28-in-f4.1e100.net (173.194.112.36): icmp_req=1 ttl=55 time=30.1 ms     64 bytes from fra07s28-in-f4.1e100.net (173.194.112.36): icmp_req=2 ttl=55 time=29.8 ms      DNS               nameserver 8.8.8.8     nameserver 8.8.4.4      After I run `service networking restart` or `/etc/init.d/networking restart` or stop and then start again the service I get `Destination Host Unreachable`. I must reboot the system to get it work. Any idea why this happens? here the interfaces file content               auto lo     iface lo inet loopback          auto eth0     iface eth0 inet static         address 192.168.1.30         netmask 255.255.255.0         network 192.168.1.0         dns-nameservers 8.8.8.8 8.8.4.4         gateway 192.168.1.10         metric 0


title: Wheezy: how to actually blacklist ehci_hcd?

text: I'm installing wheezy on a Thinkpad T41. Those are known to have USB2 related problems, which can be avoided by not loading ehci_hcd. But I can't figure out how to actually prevent ehci_hcd to get loaded. Here is what I've tried:               echo blacklist ehci_hcd > /etc/modprobe.d/ehci_hcd.conf     depmod -a     update-initramfs -u     reboot      ...but ehci_hcd is still loaded. How can I prevent this?


title: Debian + Nginx/Unicorn permissions

text: Is there a security risk in running a web server like Unicorn as root? The Nginx master process runs as root, the Nginx worker runs as the limited www-data user, but I can't set another user like www-data to run the Unicorn master/workers without messing around with www-data's `PATH`.


title: Grep: how to add an "OR" condition?

text: I am a total regex newbie. I find it confusing and I avoid it like the plague (wanna take some guesses as to why I'm not good at it?). But I suspect it might be the solution to my question. Which is... How can I introduce a conditional OR into grep? Something like, grepping a file's type for (JPEG OR JPG), and then sending only those files into the photos folder. For example. I know how to send the file where I want it, and get the file type, I just need some help with the grep part. I'm on OS X, which IMO seems to have modified/customized *nix utilities than what I'm used to in a *nix environment. So hopefully the answers can be as generic/portable as possible.


title: Explanation for mount -t and mkfs

text: What is the purpose of specifying which type of file system will be mounted with argument [-t] if you previously already used mkfs.[whatever] to format your HDD/flash drive? I have no problem in doing so, I just want to understand the logic behind: mount -t


title: Compressed filesystem inside a file in Linux

text: I have a flash drive which is FAT32 formatted. I want to put a linux filesystem on the drive inside a file. I know I can do this by creating a file and formatting is with ext3 (or any other file system) and then mounting it with the -o loop option. What I would like is that the above filesystem be compressed. Essentially something like a read-write squashfs. Is there something that exits that I can use? Additional bonus if the file can be stored as sparse, i.e. the file re-sizes as data is written or deleted.


title: How to allow access to web only through proxy?

text: I have a machine with Linux Slackware 13.37. Is it possible to configure iptables, so the users will be able to access web only through squid? The direct access through the browser will be blocked. Cause I don't want them to visit certain sites.


title: [mntent]: line 15 in /etc/fstab is bad

text: it works fine mounting manually from the cli but when running               sudo mount -a       after editing the fstab im getting errors. It seems right to me, any one have a suggestion. my fstab is:               # /etc/fstab: static file system information.                                                            #                                                                                # Use 'blkid' to print the universally unique identifier for a                                           # device; this may be used with UUID= as a more robust way to name devices                               # that works even if disks are added and removed. See fstab(5).                                          #                                                                                # <file system> <mount point>   <type>  <options>       <dump>  <pass>                                   proc            /proc           proc    nodev,noexec,nosuid 0       0                                    # / was on /dev/sda1 during installation                                                                 UUID=31c241fa-8ce7-4ddf-a11b-c1bb7214b9ff /               ext4    errors=remount-ro 0       1            # swap was on /dev/sda5 during installation                                                              UUID=f6adc6f2-a8ac-46cc-a167-fd5bdb985ca7 none            swap    sw              0       0              /dev/fd0        /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0                                    //megaboxy/inetpub /mnt/megabo cifs username=admin, password=passwd 0 0                      //megaboxz/inetpub /mnt/megab cifs username=admin, password=passwd 0 0                      //10.0.0.15/Share  /mnt/CodeS cifs username=admin, password=passwd 0 0                     //210.0.0.1/inetpub   /mnt/webse cifs username=admin, password=passwd 0 0                     //10.0.0.120/Kabura-Projects  /mnt/Projects  cifs username=admin, password=passwd 0 0


title: Skyping (video) on Linux

text: Ever since I have been running Linux I have not been able to use Skype video messages. Even the program I have downloaded for Skype is telephony, and I don't want Skype telephony. What am I doing wrong? My webcam is a Logitech.


title: Device mounted read/write, but can't delete files

text: Please have a look on the attached. What could be done to solve it?               [root@LAB-oam-blade-3 tomcat]# mount     /dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)     [...]     /dev/mapper/TOMCATp1 on /opt/nls/float/tomcat type ext3 (**rw**)     [root@LAB-oam-blade-3 tomcat]# pwd     /opt/nls/float/tomcat     [root@LAB-oam-blade-3 tomcat]# touch test.test     touch: cannot touch `test.test': Read-only file system


title: How to write file into another

text: I have an empty file (only zeroes are in it) of size 9,0KB and I need to write another file (with size 1,1KB) to it, but the first file must not lose its size or the rest of its contents. So if the whole file is `00000000000000...` now, I need to write second file in it and leave the zeroes as they are. I have tried to use `dd`, but I haven't succeed - file resizes.               dd if=out/one.img of=out/go.img      Does anybody know how can I do it?


title: udev, how to prevent further rules to be run?

text: Is it possible (and if so how) to tell udev to stop executing further rules for a certain device? I know that there is an order/sequence of rules by the alphabetical naming of the udev files. Therefore it seems logical that earlier `*.rules` might want to prevent further (that is in the order later occuring rules) to be executed. Let us assume I have a usb-memory-media which is via udev and its RUN+ script already mounted, I would dislike now that any other rule in the system tries (and probably fails) to yet again mount the device! To facilitate responding I would like to also include an example: Let the rule be like this:               # in file 30.myusb.rules     ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="1f75", ATTRS{idProduct}=="0902", RUN+="/bin/mount.30.1f75.0902.sh"      now I want this _further_ (because of 31 > 30) rule not to happen               # in file 31.myusb.rules     ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="1f75", ATTRS{idProduct}=="0902", RUN+="/bin/mount.31.1f75.0902.sh"      the "filter" used to make **udev** able to tell if the rule applies is the same for both rules, yet I wished the 31.myusb.rules rule not ever to happen. I am looking hence for a way to tweek `30.myusb.rules` in such a pseudo-code suggested way               # in file 30.myusb.rules     ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="1f75", ATTRS{idProduct}=="0902", RUN+="/bin/mount.30.1f75.0902.sh"     ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="1f75", ATTRS{idProduct}=="0902", STOP_FURTHER_RULES_WITH_THIS_FILTER


title: What are the definitions of addrtype in iptables?

text: I am keen to use `addrtype` in combination with `-src` as a rule in one of my filter chain like so to drop some bogon ips:               -A INPUT -p tcp --dport 80 -m addrtype --src-type UNICAST ! -s 127.0.0.0/8 -j WEB      The man page says the following > **addrtype**   >  This module matches packets based on their address type. Address types are > used within the kernel networking stack and categorize addresses into > various groups. The exact definition of that group depends on the specific > layer three protocol. > > The following address types are possible: > >   * UNSPEC an unspecified address (i.e. 0.0.0.0) >   * UNICAST an unicast address >   * LOCAL a local address >   * BROADCAST a broadcast address >   * ANYCAST an anycast packet >   * MULTICAST a multicast address >   * BLACKHOLE a blackhole address >   * UNREACHABLE an unreachable address >   * PROHIBIT a prohibited address >   * THROW FIXME >   * NAT FIXME >   * XRESOLVE > It is not clear on what are the exact definitions and says it depends on the specific layer 3 protocol. This is what I think:   * UNICAST (!BROADCAST, !MULTICAST, !ANYCAST)   * LOCAL (`127.0.0.0/8`)   * BROADCAST (`*.*.*.255`)   * ANYCAST (`*.*.*.*`)   * MULTICAST (`224.0.0.0/4`) Does anyone has a clear idea what that means and how it is implemented by iptables (for example, how it knows where the hell is BLACKHOLE)?


title: Old X11 config for vmware guest

text: I wonder if anybody knows X11 configs (for Vmware) which work with ancient linux distros like Debian2:               (protocol Version 11, revision 0, vendor release 6300)     Release Date: January 8 2000             If the server is older than 6-12 months, or if your card is newer             than the above date, look for a newer version before reporting             problems.  (see http://www.XFree86.Org/FAQ)     Operating System: Linux 2.2.14-va.4.4-i586 i686 [ELF]      Configured drivers:        FBDev: Server for frame buffer device        (Patchlevel 11): mfb, cfb8, cfb16, cfb24, cfb32      These distros didn't have the Vmware SVGA driver yet. Just Vesa, fbdev and alikes. From these I'm not sure which one is the best choice for vmware. Complete X configs would be very much appreciated!


title: Is it reliable to assemble md from two machines at the same time

text: Say we have the same disks accessible from two machines. I want to do assembling md from two machines. Is it possible/reliable ? The disks are connected through SAS. All I need to have is reliable disk, in this case using md and two disks. I will do raw read/write to the raid, so filesystem is not important for me. I'm not sure about correct work of md here.


title: route added, but shows inverse ip

text: Using xubuntu... i'm trying to add a route in my work laptop, and so i do               route add -host 212.18.178.207 gw 10.15.228.1 eth0      for some strange reason, when i do just route, this is what i get...               207.178.18.212. 10.15.228.1     255.255.255.255 UGH   0      0        0 eth0      what's with the address inversion? and that extra . ? This still works, i'm just curious as to why it got inverted...


title: lost packets using traceroute

text: using mytraceroute I see 50% of ICMP echo request lost: 192.168.1.212 is internal server while 192.168.5.1 is my router:                Host                                                Loss%   Snt   Last   Avg  Best  Wrst StDev      1. 192.168.1.212                                    0.0%    10    0.4   0.4   0.4   0.4   0.0      2. 192.168.5.1                                      0.0%    10    0.7   0.7   0.7   0.8   0.0      3. 151.7.81.66                                     10.0%    10    8.7 118.0   8.7 208.0  84.7         151.7.202.72      4. 151.7.202.72                                    50.0%     9    8.6 191.3   8.5 739.2 365.3         151.7.81.66      5. 151.6.92.168                                    0.0%     9    9.2   9.4   8.2  13.3   1.5      6. ppp-109-210.21-151.libero.it                    0.0%     9    8.6   9.1   8.5   9.6   0.0      is possible consider ok this situation?


title: why 2TB external HDD is recognized as 800 GB only in Ubuntu 8.10

text: I had a **2 TB** external HDD which I formatted as below.               fdisk /dev/sdb      After issuing the above command, I did the following steps.   * Then selected option `p`. (To print the partition table).    * Then selected option `n`. (To add a new partition).    * Then selected `1`. (This option I selected by default).    * Then finally selected option `w`. (To write back the changes to disk). After formatting the external hard drive using the above steps, I did the below command.               mkfs.ext3 /dev/sdb1      Now, everything seemed fine and I had a external hard disk available in my RHEL6 system. It was mounted automatically without any issues. Now, I connected this hard disk to Ubuntu 8.10 system. The external HDD was not recognized. I had to repeat the above steps again and finally when the hard disk was recognized it had only **800 GB** available out of the **2 TB** space. **EDIT** The Ubuntu 8.10 system also has the file system type as ext3. I ran the below command to identify that.               ramesh@server2:/$ df -hT     Filesystem    Type    Size  Used Avail Use% Mounted on     /dev/sda2     ext3    184G   20G  155G  12% /      Why is it so? Is it because of some partition table issues? I am not pretty clear of these concepts.


title: How do I remove the new environment commands that were created by the virtualenvwrapper script?

text: I've installed and run `virtuarenvwrapper.sh` to try to configure an alternate version of python on my system. This script has placed somewhere a series of commands that are now executed whenever I open `gnome-terminal`. Now, when I open a terminal I see:               bash: which: command not found...     bash: -m: command not found...     virtualenvwrapper.sh: There was a problem running the initialization hooks.           If Python could not import the module virtualenvwrapper.hook_loader,     check that virtualenv has been installed for     VIRTUALENVWRAPPER_PYTHON= and that PATH is     set properly.     user@localhost ~]$      I want to remove these commands but I can't find out where they are. I've looked in:   * `~/.bash_profile`   * `~/.bashrc`   * `/etc/bashrc` The commands run on my user terminal as well as root's terminal. What other places can one put commands to run upon opening a terminal?


title: How to scp from remote host to remote host with pem files and turning off strict host checking?

text: From my DEV server I'd like to copy files from my stage server to my prod server. I already have SSH keys setup between my DEV server and my stage server. But I haven't had any success trying to copy from STAGE to PROD when I'm on my DEV server. For example, it works right now to tail a log file on my prod server if I run these commands from DEV:               ssh -T my-user@my-stage-ip << TAIL_SCRIPT     ssh -i my-key.pem -o 'StrictHostKeyChecking=no' my-user@my-prod-ip tail -f /var/www/mysite.com/logs/access.log     TAIL_SCRIPT      These are some of the commands I've tried to do without any success.               ssh -T my-user@my-stage-ip << COPY_SCRIPT     scp -i my-key.pem -o 'StrictHostKeyChecking=no' my-user@my-stage-ip:/my/file/path.txt my-user@my-prod-ip:/my/file/path.txt     COPY_SCRIPT      The error is:               scp: /my/file/path.txt: Permission denied      I also tried:               scp -i my-key.pem -o 'StrictHostKeyChecking=no' my-user@my-stage-ip:/my/file/path.txt my-user@my-prod-ip:/my/file/path.txt      This one also has an error:               Permission denied (publickey).     lost connection     Connection to my-stage-ip closed.      Can someone help me out? This is really frustrating.


title: How can I list the top IO consuming files?

text: My document management software is doing a lot of IO and I would like to know which files it is accessing the most. Is there a Linux tool that would give me the list of the top IO consuming files, like iotop but for files, every few seconds? That could look like:               $ thetool     THRPUT   R/W/SWP FILE     40MB/s   write   /usr/alfresco/repo/1283421/1324928.doc     12MB/s   read    /usr/alfresco/cache/3928dh29f8if     11MB/s   read    /tmp/239398hf2f024f472.tmp      I looked in the man pages of `iotop`,`lsof`,`strace` and they do not seem to offer such a feature.


title: What exactly is a "home directory"?

text: When your University sends everyone an e-mail saying "We're sorry! One or more of our disks have failed; thus we've lost 'x' number of home directories on our servers." Is it basically just the root directory allocated for each student/professor/faculty-member? And also, what do they mean by "server" here? Thanks :)


title: How does the Unix "fsck" differ from the Windows "chkdsk"?

text: What are the differences between Unix's `fsck` and Windows' `chkdsk`?


title: Centos 6.4. building rpm for cups 1.7

text: I try to build rpm from source by running               rpmbuild -ta cups-1.7.0-source.tar.gz  --without dbus      but get               Processing files: cups-1.7.0-1.x86_64     error: File not found: /root/rpmbuild/BUILDROOT/cups-1.7.0-1.x86_64/usr/share/cups/usb     error: File not found by glob: /root/rpmbuild/BUILDROOT/cups-1.7.0-1.x86_64/usr/share/cups/usb/*      What should I do? What package is it? I found nothing in google.


title: df showing same usage statistics for different mounts

text: I've run the following df command on my system and get the following output:                                                  Filesystem           1K-blocks      Used Available Use% Mounted on     //loonie/Market Data/EquityBenchmark/EBFS/DEV/DEV_output 5099929736 4861446952 238482784  96% /home/jb5dev/COBRA_OUTPUT     //loonie/Market Data/EquityBenchmark/EBFS/DEV/DEV_input  5099929736 4861446952 238482784  96% /home/jb5dev/COBRA_INPUT     //loonie/Market Data/EquityBenchmark/EBFS/QA/QA_output   5099929736 4861446952 238482784  96% /home/jb5qa/COBRA_OUTPUT     //loonie/Market Data/EquityBenchmark/EBFS/QA/QA_input    5099929736 4861446952 238482784  96% /home/jb5qa/COBRA_INPUT     //loonie/Market Data/EquityBenchmark/EBFS/UAT/UAT_output 5099929736 4861446952 238482784  96% /home/jb5uat/COBRA_OUTPUT     //loonie/Market Data/EquityBenchmark/EBFS/UAT/UAT_input  5099929736 4861446952 238482784  96% /home/jb5uat/COBRA_INPUT      Notice that the disk usage statistics are identical for each mount point. Each mount point is actually a folder that sits on a windows machine. It seems impossible that each mount point is using and consuming the same amount of space. I have checked the usage in Windows by doing a right-click and properties on the actual folders. Can anyone explain this?


title: How would I sort these directory names numerically?

text: I'm aware that I can somehow sort this output numerically (so cpu1/ follows cpu0/) ... I could probably get something to work eventually by splitting up the string various ways with awk, but is there an "easy" way that would be somewhat reusable in the future in other scripts?               > for i in /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq; do echo -n "$i: "; cat $i; done     /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: 2395000     /sys/devices/system/cpu/cpu10/cpufreq/scaling_cur_freq: 1064000     /sys/devices/system/cpu/cpu11/cpufreq/scaling_cur_freq: 1064000     /sys/devices/system/cpu/cpu12/cpufreq/scaling_cur_freq: 1064000     /sys/devices/system/cpu/cpu13/cpufreq/scaling_cur_freq: 1064000     /sys/devices/system/cpu/cpu14/cpufreq/scaling_cur_freq: 1064000     /sys/devices/system/cpu/cpu15/cpufreq/scaling_cur_freq: 1064000     /sys/devices/system/cpu/cpu16/cpufreq/scaling_cur_freq: 1064000     /sys/devices/system/cpu/cpu17/cpufreq/scaling_cur_freq: 1064000     /sys/devices/system/cpu/cpu18/cpufreq/scaling_cur_freq: 1064000     /sys/devices/system/cpu/cpu19/cpufreq/scaling_cur_freq: 1064000     /sys/devices/system/cpu/cpu1/cpufreq/scaling_cur_freq: 1064000     /sys/devices/system/cpu/cpu20/cpufreq/scaling_cur_freq: 1064000


title: motherboard beep

text: I need help. I am using a Debian machine, ARK-3360F, and I need to make it beep like it does when it starts-up. Unfortunately, there is not any other speaker than this on the machine, so the below methods do not work even if I use `modprobe pcspkr`:               echo -e "\a"     echo ^G     echo -e "\07"      -and the _beep_ program Can anyone help me produce a BIOS beep?


title: Are Icecat and Iceweasel different projects?

text: I was interested in finding Firefox 'clones' in Linux when I heard about Icecat and Iceweasel. But while Icecat can be installed with > sudo add-apt-repository ppa:gnuzilla-team/ppa && sudo apt-get update && sudo > apt-get install icecat -y ![enter image description here](http://i.stack.imgur.com/CoNpr.png) Iceweasel was a different matter. At a certain point I was even directed towards Icecat - as if they were one and the same project. Their names might induce this impression. More here.


title: Push local git repo to server via ssh

text: So I have a local repo and a server with git installed and a git user. I want to send (push) the repo to the server. When I simply login to the server via `ssh` I have to specify my .pem file and a passphrase. The following:               sudo git push git@333.3.3.3..3:somerepo.git      throws this error:                Permission denied (publickey).      fatal: The remote end hung up unexpectedly      Another attempt another error:               git push ssh://git@222.2.2.2:somerepo.git     ssh: Could not resolve hostname : Name or service not known     fatal: The remote end hung up unexpectedly


title: Red5 can't find JAVA_HOME

text: I'm setting up a Red5 server on Cygwin I get this               /usr/share/red5$ sh red5.sh     Running on  CYGWIN_NT-6.1-WOW64     Unable to locate Java. Please set JAVA_HOME environment variable.      However, I can also do this: `javac -version` and get `javac 1.7.0`, so I know that's installed, at least. I can also go into the emacs `.bash_profile` and see that I've added this to the bottom:               export PS1='\w\$ '     export EMACS_HOME=~/emacs-22.3     export JAVA_HOME =/cydrive/c/Program\ Files/Java/jdk1.6.0_32     export PATH=$PATH:$EMACS_HOME/bin:$JAVA_HOME/bin     export PATH=$PATH:$EMACS_HOME/bin      So what's missing? * * * I edited `.bash_profile` to be this:               export PS1='\w\$ '     export EMACS_HOME=~/emacs-22.3     export JAVA_HOME=/cydrive/c/Program\ Files/Java/jdk1.6.0_32/     export JAVA_HOME=$( cygpath -d "$JAVA_HOME" )     export PATH=$PATH:$EMACS_HOME/bin:$JAVA_HOME/bin     export PATH=$PATH:$EMACS_HOME/bin      And I get this error               cygpath: cannot create short name of D:\cygwin\cydrive\c\Program Files\Java\jdk1.6.0_32\


title: Internet working but not all of LAN!

text: I have recently installed CentOS 6.5. system is behind a firewall (institutional access) with an IP address, say, 10.50.28.99. It is not detecting (pinging or connecting via ssh) computers with similar address i.e. 10.50.28.xx are unavailable but internet and other lan pc with different IP address like say 10.50.1.1 are easily connected. I have tried disabling iptables altogether but that did not help.


title: $@ and 'set env $PATH' - Why should this statement go into .inputrc?

text: I have a line in my `.zshrc` that says:               set env $PATH      Apparently this affects the value of `$@`. I have read that `$@` should be empty and that I should **not** have any `set` statements in my `.zshrc` (at least in Bash some of these statements should actually go in my `.inputrc`file). Is this valid advice, if so why? What does `set env $PATH` do and why should `$@` be empty?


title: Superblock for /dev/sdb1 is wrong size: won't boot

text: I installed Red Hat as a VM and while it shows files for `/dev/sda1` there are no files for `/dev/sdb1`. When booting I enter a recovery login and a statement that "the /dev/sdb1 Superblock can not be found". The message recommends running `efsck -b 8192`, however, `efsck` cannot run because it pops up the same error about the superblock and may need to have the size changed. I am a Unix and Solaris type so the Red Hat commands are not my forte. Anyone have any guesses?


title: How to find out UUID of a non-block USB device?

text: In a nutshell, the device I have is not a block device so `blkid` command doesn't suit me. But at least I can get some info about my device via `lsusb -v` command although it doesn't contain its UUID. And I know my device _does_ have UUID. The thing is I tried to run `VBoxManage list usbhost` command and it showed me some USB devices (including non-block devices) with _their UUIDs_. But for some reason the output of the command abruptly ceased (even without trailing newline symbol, although with 0 return code) in the beginning of the list so I didn't have a chance to see my device's UUID. I do not want to endevour finding out why it happened. Instead I want to know an alternate way to find out UUID of my device because I believe it should be easier to do. And just in the case this information is interesting to someone: Gentoo, linux 3.7.10 **/sys/kernel/debug/usb/devices**               T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480  MxCh= 2     B:  Alloc=  0/800 us ( 0%), #Int=  1, #Iso=  0     D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1     P:  Vendor=1d6b ProdID=0002 Rev= 3.07     S:  Manufacturer=Linux 3.7.10-gentoo-r1 ehci_hcd     S:  Product=EHCI Host Controller     S:  SerialNumber=0000:00:1d.0     C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA     I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub     E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms          T:  Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=480  MxCh= 8     D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1     P:  Vendor=8087 ProdID=0024 Rev= 0.00     C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA     I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub     E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=256ms          T:  Bus=02 Lev=02 Prnt=02 Port=02 Cnt=01 Dev#=  3 Spd=480  MxCh= 0     D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1     P:  Vendor=048d ProdID=1336 Rev= 1.00     S:  Manufacturer=Generic        S:  Product=Mass Storage Device     S:  SerialNumber=00000000000006     C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA     I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage     E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=125us     E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms          T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480  MxCh= 2     B:  Alloc=  0/800 us ( 0%), #Int=  4, #Iso=  0     D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1     P:  Vendor=1d6b ProdID=0002 Rev= 3.07     S:  Manufacturer=Linux 3.7.10-gentoo-r1 ehci_hcd     S:  Product=EHCI Host Controller     S:  SerialNumber=0000:00:1a.0     C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA     I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub     E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms          T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=480  MxCh= 6     D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1     P:  Vendor=8087 ProdID=0024 Rev= 0.00     C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA     I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub     E:  Ad=81(I) Atr=03(Int.) MxPS=   1 Ivl=256ms          T:  Bus=01 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#=  3 Spd=12   MxCh= 0     D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1     P:  Vendor=1366 ProdID=0101 Rev= 1.00     S:  Manufacturer=SEGGER     S:  Product=J-Link     S:  SerialNumber=000038000375     C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=100mA     I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)     E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms     E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms          T:  Bus=01 Lev=02 Prnt=02 Port=03 Cnt=02 Dev#=  4 Spd=12   MxCh= 0     D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1     P:  Vendor=0403 ProdID=6001 Rev= 6.00     S:  Manufacturer=FTDI     S:  Product=TTL232R-3V3     S:  SerialNumber=FTF5T2QJ     C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr= 90mA     I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=ftdi_sio     E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms     E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms          T:  Bus=01 Lev=02 Prnt=02 Port=04 Cnt=03 Dev#=  5 Spd=12   MxCh= 0     D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1     P:  Vendor=046d ProdID=0a01 Rev=10.13     S:  Manufacturer=Logitech     S:  Product=Logitech USB Headset     C:* #Ifs= 3 Cfg#= 1 Atr=80 MxPwr=100mA     I:* If#= 0 Alt= 0 #EPs= 0 Cls=01(audio) Sub=01 Prot=00 Driver=(none)     I:* If#= 1 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=00 Driver=(none)     I:  If#= 1 Alt= 1 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=(none)     E:  Ad=01(O) Atr=09(Isoc) MxPS= 192 Ivl=1ms     I:  If#= 1 Alt= 2 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=(none)     E:  Ad=01(O) Atr=09(Isoc) MxPS=  96 Ivl=1ms     I:* If#= 2 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=00 Driver=(none)     I:  If#= 2 Alt= 1 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=(none)     E:  Ad=84(I) Atr=09(Isoc) MxPS=  96 Ivl=1ms          T:  Bus=01 Lev=02 Prnt=02 Port=05 Cnt=04 Dev#=  6 Spd=480  MxCh= 7     D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1     P:  Vendor=2001 ProdID=f103 Rev= 1.00     C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA     I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub     E:  Ad=81(I) Atr=03(Int.) MxPS=   1 Ivl=256ms          T:  Bus=01 Lev=03 Prnt=06 Port=01 Cnt=01 Dev#=  7 Spd=480  MxCh= 0     D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1     P:  Vendor=13fe ProdID=3600 Rev= 1.00     S:  Manufacturer=             S:  Product=                     S:  SerialNumber=90B217007BC11098     C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=200mA     I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage     E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms     E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms          T:  Bus=01 Lev=03 Prnt=06 Port=03 Cnt=02 Dev#= 12 Spd=1.5  MxCh= 0     D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1     P:  Vendor=045e ProdID=071d Rev= 2.50     S:  Manufacturer=Microsoft     S:  Product=Microsoft�� 2.4GHz Transceiver V1.0     C:* #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr=100mA     I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=01 Driver=usbhid     E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=10ms     I:* If#= 1 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid     E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=10ms      The device of interest is:   `T: Bus=01 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 3 Spd=12 MxCh= 0` **UUIDs of existing non-block devices:**               [krokoziabla@ktulhu]:0:/home/krokoziabla> VBoxManage list usbhost          Host USB Devices:          UUID:               f864c487-2a25-4649-84cd-39dc67be695a     VendorId:           0x0403 (0403)     ProductId:          0x6001 (6001)     Revision:           6.0 (0600)     Port:               3     USB version/speed:  2/1     Manufacturer:       FTDI     Product:            TTL232R-3V3     SerialNumber:       FTF5T2QJ     Address:            sysfs:/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4//device:/dev/vboxusb/001/004     Current State:      Busy          UUID:               b03a6680-ecc5-4f48-8103-3e387cf4cb28     VendorId:           0x045e (045E)     ProductId:          0x071d (071D)     Revision:           2.80 (0280)     Port:               3     USB version/speed:  2/1     Manufacturer:       Microsoft     Product:            Microsoft[krokoziabla@ktulhu]:0:/home/krokoziabla>


title: unable login solaris box

text: There is problem on my Solaris 10 box. It's not possible to access directly to the box, but via `ssh` from another box after 3 wrong entries of username/password to box then login prompt changes, at this point, I can access to box by entering its own password. Here is when I tried to login with correct password.               # ssh 10.0.70.11     Authorized use only, activities logged.     Password:     Last login: Thu May  2 15:01:05 2013 from 10.0.70.8     Sun Microsystems Inc.   SunOS 5.10      Generic January 2005 >>>>> it seems that is  connected.     Connection to 10.0.70.11 closed.  >>>>>> then kicked off      Here is the scenario that I mentioned.               #ssh 10.0.70.11     Authorized use only, activities logged.     Password:               >>>>>  tried wrong password     Password:               >>>>> tried wrong password     Password:               >>>>> tried wrong password lastly     root@10.0.70.11's password:     Last login: Thu May  2 16:41:49 2013 from 10.0.70.8     Sun Microsystems Inc.   SunOS 5.10      Generic January 2005     Sun Microsystems Inc.   SunOS 5.10      Generic January 2005     #      Does anyone has any information/feedback about this ?


title: Switching to tty changes mouse speed - why / how to change?

text: I like using a fast mouse, so I use `xset` to speed it up, more than possible with the normal gnome settings. When I switch to a tty and back to Gnome, my mouse is really slow again (changed to default setting?). Since a while I just open up a terminal, which runs the .bashrc in which I put a `xset m <fast> <faster>`. But why does switching change the settings anyway? And how can I stop this behaviour? Edit: I'm working on a Debian system (might be important concerning some xorg behaviour)


title: CLI only Linux on Intel Celeron 266 MHz

text: I want to install a CLI only Linux system on an old desktop computer for testing and development purposes. It's an Intel Celeron 266MHz with 64 MB of RAM and 4 GB of HDD, and it doesn't reach the minimum requirements for Ubuntu Server. Is there any other Linux distribution that would install with these specifications?


title: How can I see automount points in Linux?

text: We use autofs at work and I'm having trouble remembering some mount points. With autofs, you can only see currently or recently mounted volumes on a particular machine. How can I see the rest?


title: Grub2 in Ubuntu 12.04 doesn't add “quiet splash” to Fedora kernel

text: Grub2 installed in Ubuntu 12.04 doesn't add `quiet splash` kernel parameters to Fedora's kernel. Here are the options in `/etc/default/grub`:               GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"     GRUB_CMDLINE_LINUX=""      Info page has this information: > ‘`GRUB_CMDLINE_LINUX`’ > > Command-line arguments to add to menu entries for the Linux kernel. > > ‘`GRUB_CMDLINE_LINUX_DEFAULT`’ > > Unless ‘`GRUB_DISABLE_RECOVERY`’ is set to ‘true’, two menu entries will be > generated for each Linux kernel: one default entry and one entry for > recovery mode. This option lists command-line arguments to add only to the > default menu entry, after those listed in ‘`GRUB_CMDLINE_LINUX`’. According to this, present settings in `/etc/default/grub` should result in `quiet splash` kernel parameters for Fedora too. But it doesn't. While the Ubuntu's kernel gets `ro quiet splash` as kernel parameters. If I set `GRUB_CMDLINE_LINUX="quiet splash"`, then fedora's kernel gets the parameters. Why is this happening? Should I edit `/boot/grub/grub.cfg` directly?


title: Is each process considered a thread?

text: Is a Linux process considered a thread? For example, if I write a simple c program that calls pthread_create to create a new thread in main(), does that mean that I now have 2 threads, one for main() and the newly created one? Or does only the spawned thread count as a thread but not the main() process? I was wondering because by calling pthread_join to join the spawned thread to main() it seems like I'm _joining threads together_ , thus implying that the main process is a thread. Please also correct me if I use the wrong terminology. :)


title: Which TCP congestion control algorithm is best for low speed radio modems?

text: On my project we have remote Linux nodes that communicate over the Internet via very low speed CDMA cell modems. The bandwidth on these modems is about 2kbyte/second and the RTT back to the server is about 800ms. Based on these limitations, would there be any benefit in trying to tune the Linux TCP stack to match this performance? E.g. I recently found out about the pluggable congestion control algorithms and am wondering if there's a different one to the default that might work better. Sometimes I've seen downloads on these modems crawl to 800 bytes/second. I ran some UDP tests and packet loss was about 25%. Linux is 2.6.35.3 with Debian Wheezy on ARMHF. Thanks, Fred


title: Changes to input_get_keycode function in linux kernel (input/input.c)

text: I'm working on building a kernel module for an input device, and I noticed that in the module source, there's a couple calls to `input_get_keycode(data->input_dev, scancode, &keycode);` When I was compiling I was getting errors that there's no function with that prototype. Looking into the `input/input.c` source code, this is the definition of `input_get_keycode`:               int input_get_keycode(struct input_dev *dev, struct input_keymap_entry *ke)      I tried to look online, and I found a couple obscure references to changing the kernel to be able to deal with large keymaps better, and apparently this function was changed to better handle that. Looking at an older source from input/input.c, the `input_get_keycode` function was defined as               int input_get_keycode(struct input_dev *dev, unsigned int scancode, unsigned int *keycode)      My question is, when was this changed. Is there notes on the change? I'm building the `ubuntu natty` kernel from git which is from my understanding from the `2.6.37-rc3` branch. Is this a ubuntu specific change? Or is this a change in the mainline kernel. I also have the `maverick` source from git which has the old style (3 input) function.


title: Byobu/screen constantly freezes in Putty

text: For a while now I've been using Byobu to manage screen sessions for me. However I've run into a strange issue: The session keeps locking. By locking I mean that I can't type anything, and only if I wait a few minuites does unlock and do everything I typed in before. Currently its getting worse. The session keeps locking every minute or so. Even when I've restarted Putty, switched from Private Key auth to password auth, and even changed Putty installations, it still freezes. Its gotten to the point where I'll login and the current window is frozen but I'm able to switch to another window, only for that to freeze in a few seconds. Another new development is that sometimes when I first login Byobu won't even come up, it will just sit there after the "Last login" line. One time I got a `WriteMessage: Broken pipe` error and it dropped to normal shell without byobu. Strangely the tunnel's I've opened up still work. I was able to check the CPU graphs and saw that the server wasn't under any load, meaning that the session didn't freeze because it had other things to do. Any suggestions on how to fix this?


title: Do not display ACK packets

text: I have the following `tcpdump -i eth0 -n tcp port 5000` to filter every packet flowing between 2 hosts. However, one of the hosts always sends an ACK. How do I hide this ACK?


title: Are there any GUI test suites for Linux?

text: I'm looking to automate some software testing that's currently done manually by a person. Are there any regression test suites for testing GUIs that run on Linux? I'm looking for a way to record and control an X Window's set of buttons, and to read log files to determine if the test is passing.


title: How to view RAM's SPD / timings table?

text: In Linux Mint, how to get the same information presented in the lower half of the below picture? Output by CPU-Z in Windows: ![enter image description here](http://i.stack.imgur.com/5wxt8.png) What I've tried:   Running CPU-Z 1.66 in Wine as Windows 95, 98 and XP.   CPU-G   i-nex   sudo lshw   sudo dmidecode   decode-dimms


title: Enabling Bluetooth discoverability upon start-up

text: I would like to make a USB Bluetooth dongle discoverable upon start-up (or whenever it's plugged in) on Debian Squeeze or Wheezy. If I use `hciconfig` initially, I can see the device in this mode:                   UP RUNNING PSCAN      Using `hciconfig hci0 piscan` manually works fine. This puts the device in this mode (and the device can be discovered):                   UP RUNNING PSCAN ISCAN      A number of documents (for example, on the Debian wiki or this Ubuntu issue) point to settings in `/etc/bluetooth/hcid.conf`. It would seem that setting `iscan enable; pscan enable;` in this file should work. Unfortunately, the versions of Bluez I'm using (4.x) don't have this file (even with the `bluez- compat` package installed). `/etc/bluetooth/main.conf` says:               # How long to stay in discoverable mode before going back to non-discoverable     # The value is in seconds. Default is 180, i.e. 3 minutes.     # 0 = disable timer, i.e. stay discoverable forever     DiscoverableTimeout = 0      This doesn't work, though. The device starts up in `PSCAN` mode, but not `PSCAN ISCAN`. Even manually, the following command taken from the Debian wiki doesn't work:               dbus-send --system --dest=org.bluez /org/bluez/hci0 org.bluez.Adapter.SetMode string:discoverable      Is there a recommended way to set the device in `PSCAN ISCAN` mode upon start- up (or when the dongle is inserted)?


title: Differences between Chromium OS overlays?

text: In the ChromiumOS source, there are currently the following build overlays offered:   * overlay-amd64-corei7   * overlay-amd64-drm   * overlay-amd64-generic   * overlay-amd64-host   * overlay-arm-generic   * overlay-beaglebone   * overlay-daisy   * overlay-daisy-drm   * overlay-emeraldlake2   * overlay-lumpy   * overlay-nyan   * overlay-panda   * overlay-parrot   * overlay-puppy   * overlay-raspberrypi   * overlay-stumpy   * overlay-tegra2   * overlay-variant-tegra2-dev-board   * overlay-variant-tegra2-dev-board-opengl   * overlay-variant-tegra2-seaboard   * overlay-waluigi   * overlay-x32-generic   * overlay-x86-alex   * overlay-x86-drm   * overlay-x86-fruitloop   * overlay-x86-generic   * overlay-x86-mario   * overlay-x86-pineview   * overlay-x86-wayland While for some, the names give some indication of the target platform or included libraries, guessing what "waluigi" offers is quite a challenge. Is there any online resource or person of knowledge who can give an overview of each build overlay?


title: Variable name completion in ksh

text: While I am in bash , I am able to do a tab complete with environment variable names, but with ksh I am not able to do so. How can I get it done with KSH? I am using mksh with cygwin.


title: Adding files to Linux readonly-root

text: I've a netboot Linux server where the the `/root` is mounted as readonly.               # Set to 'yes' to mount the system filesystems read-only.     READONLY=yes     # Set to 'yes' to mount various temporary state as either tmpfs     # or on the block device labelled RW_LABEL. Implied by READONLY     TEMPORARY_STATE=yes     # Place to put a tmpfs for temporary scratch writable space     RW_MOUNT=/var/lib/stateless/writable     # Label on local filesystem which can be used for temporary scratch space     RW_LABEL=stateless-rw     # Options to use for temporary mount     RW_OPTIONS=     # Label for partition with persistent data     STATE_LABEL=stateless-state     # Where to mount to the persistent data     STATE_MOUNT=/var/lib/stateless/state     # Options to use for peristent mount     STATE_OPTIONS=     CLIENTSTATE=      I can see the files/directories on `/etc/rwtab` mounted in the temporary read- write filesystem. Now I would like to add files/directories to this list `/etc/rwtab` and unable to do so as itself readonly. Now, I need to install software and update some configurations. Do I have to remount the root partition.               # mount -o remount,rw /      This is a Production server.


title: Possibility to use app in LAN and via Internet

text: I use web based (https encapsulated) app in my home network and via Internet. The app has dedicated Linux desktop client (I use Mageia ver4 Linux for laptop). Of course server address I have connected to, is different when I am connected to my home LAN directly (laptop and app server are in the same network segment) and when I connect to the home server over internet. Please advice me. How can I connect to LAN or over Internet without manually running app on desktop with different config file for each connection type? Or maybe any other solution like changes in my home LAN configuration? The disadvantages are: - my home router has no possibility to assign secondary IP address for LAN; - router uses port redirection for proper access to server app from Internet Any idea?


title: How can one make a laptop remain pingable and continue running its daemons even after the lid is closed?

text: I'm running Ubuntu 12.04 server on a laptop, and I'm pinging it from another machine. Whenever I close the lid, the pings stop getting responses, and when I open it again, they resume receiving them. I'd like to make it so that shutting the lid on the laptop has no effect on its operation except for making the screen blank. How can one achieve this? Thanks.


title: What is the preferred way to build software in the BSDs?

text: I was wondering what the preferred way of building software in the BSDs is and if they are actively using and encouraging the use of GNU autotools. I found the following section about GNU autoconf in the OpenBSD Handbook: > autoconf is a gnu tool that is supposed to help in writing portable > programs. It is often used together with automake (portable makefiles) and > libtool (portable shared libraries). > > Those tools do not work all that well, and often create specific challenges > in porting software to OpenBSD. This seems not very encouraging. Does OpenBSD have its own autotools-like programs? Are you supposed to write the configure scripts yourself? I see that for example OpenSSH _is_ using autoconf. FreeBSD has a neutral section in its Handbook, but it is still in the "Special Considerations" section: > The various GNU autotools provide an abstraction mechanism for building a > piece of software over a wide variety of operating systems and machine > architectures. [...]


title: What are the two values in < > in a device tree .dts file ?

text: Following is the code snippet in a device tree file:               flash@0 {                     compatible = "n25q128";                     reg = <0x0>;                     spi-max-frequency = <50000000>;                     #address-cells = <1>;                     #size-cells = <1>;                     partition@qspi-fsbl-uboot {                         label = "qspi-fsbl-uboot";                         reg = <0x0 0x100000>;                     };                     partition@qspi-linux {                         label = "qspi-linux";                         reg = <0x100000 0x500000>;                     };                     partition@qspi-device-tree {                         label = "qspi-device-tree";                         reg = <0x600000 0x20000>;                     };                     partition@qspi-rootfs {                         label = "qspi-rootfs";                         reg = <0x620000 0x5E0000>;                     };                     partition@qspi-bitstream {                         label = "qspi-bitstream";                         reg = <0xC00000 0x400000>;                     };                 };      My simple question is what are the two values in < >? for example in reg = <0x600000 0x20000>; I thought it is initial and final address , but this will be meaning less here since final cannot be lower than initial.


title: bad magic number

text: I have a script which I need to execute. The script file is push.sh. Below are the commands that I am using:               dragan@dragan-Lenovo-G570:~/liquibase/liquibase$ chmod +x push.sh     dragan@dragan-Lenovo-G570:~/liquibase/liquibase$ ./push.sh     invalid file (bad magic number): Exec format error      What error is this and how can I fix it? Thanks in advance!


title: Create file image container

text: I would like to create a 100GB file to use as a file-system. The file will be stored on an encrypted volume, so the file/file-system itself does not need to be (further) encrypted. Searching has revealed many different methods of doing this. Some use `losetup`, some don't. Is the following an acceptable method?               $ dd if=/dev/zero of=~/theFile.img bs=1M count=10240     $ mkfs.ext4 ~/theFile.img   # will prompt about block special device     $ sudo mount -o loop ~/theFile.img /media/mountPoint


title: Rename multiple directories

text: I want to find all directories with the last subdirectory named _doc_ , for then rename them to _Doc_. How can be renamed? I've the first part:               find -type d -name 'doc'       which returns directories paths like:               ./foo/bar/doc


title: Possible to get "old" time stamp behaviour?

text: When downloading a file or e.g. unzipping one, the time stamp is not set to when the file appeared on my harddisk, which is what I want. See this example               ~$ wget https://www.google.com/images/srpr/logo3w.png     ~$ stat logo3w.png        File: `logo3w.png'       Size: 7007        Blocks: 16         IO Block: 4096   regular file     Device: fd00h/64768d    Inode: 17040834    Links: 1     Access: (0664/-rw-rw-r--)  Uid: ( 1000/      ss)   Gid: ( 1000/      ss)     Access: 2012-07-25 10:58:26.000000000 +0200     Modify: 2012-04-02 04:13:37.000000000 +0200     Change: 2012-07-25 10:58:26.254385152 +0200      Birth: -     ~$ ll logo3w.png      -rw-rw-r-- 1 ss ss 7007 Apr  2 04:13 logo3w.png      This behaviour is "new" and has happens within the last couple of years. **Question** Is it possible to disable this, so when a file is written to disk, it gets the time stamp when I did it?


title: Timeout doesn't occur when reading from fifo using `read`

text: Look at this code:               while read -t 3 line; do         echo ${line}     done < /opt/data.log      `data.log` is a fifo. One process is writing to this, and this code should be reading it to show to the user. But I want it to exit when there is no more data in the fifo for 3 seconds. The problem is it never times out. I write to this fifo, it shows me:               read: 6: Illegal option -t       What is wrong? **[UPDATE]** Yes, I was using `/bin/sh` as a shebang which is a symbolic link to `dash`. I changed it to `/bin/bash`. but it does not make any benefit. It waits for ever if no one opens the fifo. I want a timeout solution that works when the other end of the fifo has not opened it.


title: HP Business Inkjet 1000 does not work on debian wheezy because of expired ink cardriges

text: HP Business Inkjet 1000 does not work on debian wheezy is ink cardriges are marked as expired, this is a non-feature since cardriges should not degrade on time. How can I fix that? PS. I really hope that this will help anyone having hp printer ;)


title: copying a directory+renaming it

text: I want to copy a directory from:               path1/dir1      to               path2/dir2      the first time I invoke               cp -r path1/dir1 path2/dir2      there's no problem, dir2 is created under path2               ls path2/dir2      bu the 2nd time, dir1 is created under path2/dir2               ls path2/dir2/dir1      Can I get the correct behavior using only `cp` ? (= without invoking `rm -f path2/dir2` )


title: How to determine how many files are within a directory without counting?

text: I've been having a fairly serious issue on a high traffic web server. PHP pages are slowing down considerably, and it only seems to be an issue on pages where sessions are accessed, or a certain table within a database is being referenced. the '/var/log/messages' log file, I see hundreds of thousands of the following error: 'kernel: EXT4-fs warning (device dm-0): ext4_dx_add_entry: Directory index full!' I suspect there is a bottleneck in '/var/lib/php/sessions' because I cannot open the folder in Filezilla, and cannot count the number of files/sub- directories with grep. While it is quite possibly a case of hard drive corruption, I'd like to verify a hunch of mine first by checking the number of files inside of this directory. **How would you go about finding the number of files within a folder without actually counting the files in said folder?**


title: How to know which Linux and which version I am using

text: When I run `cat /proc/version` command in terminal, I got below output:               Linux version 2.6.18-348.1.1.0.1.el5 (mockbuild@ca-build56.us.oracle.com) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-54)) #1 SMP Tue Jan 22 16:39:05 PST 2013      If I run `lsb_release -a` command, I can see below information:               LSB Version:    :core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64                         :graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:prin                         ting-4.0-noarch     Distributor ID: EnterpriseEnterpriseServer     Description:    Enterprise Linux Enterprise Linux Server release 5.9 (Carthage)     Release:        5.9     Codename:       Carthage      As per the output of `cat /proc/version`, I can see that I am using RedHat 4.1.2. While as per the output of `lsb_release -a`, I am using `Linux Server release 5.9`. Which one Is correct? If yes, how old is it? Because, I am not getting MySQL 5.6 installer for this version. MySQL 5.6 is available only by `Red Hat Enterprise Linux 5 / Oracle Linux 5 (x86, 64-bit), RPM Package` version of RedHat.   * Where can I get MySQL 5.6 version for RedHat 4?    * If not, How can I know which Linux ( Fedora / Ubuntu / Red Hat etc. ) and which version I am using?


title: How to correctly put tinylogin in rootfs.cpio

text: I have downloaded tinylogin. I have its source code as well as a binary. Following this article , earlier I made a rootfs.cpio file with the following;               *       /dev/console           Required so that you can see characters on the screen     *       init           An executable program that Linux launches after booting (hello world croos compiled for ARM )      My init program was: # include               int     main ()     {         printf ("\n");         printf ("Hello world from %s!\n", __FILE__);         while (1) { }         return 0;     }      Now the issue is I want that after booting my first program i.e init should be tinylogin instead of hello world. So what I did is I renamed tinylogin binary to init and followed the following instructions:               # 1. Copy the "init" program (renamed tinylogin) into the     #    initramfs directory :     cp init initramfs           # 2. Create the CPIO archive:     cd initramfs     fakeroot # this is pure magic (it allows us to pretend to be root)     mkdir -p dev     mknod dev/console c 5 1     chown root init     find . | cpio -H newc -o > ../initramfs.cpio # <-- this is the actual initramfs     exit # leave the fakeroot shell     cd ..      Unfortunately it is not working. The boot message says `no Init program found` but when I am puting init program containing hello world code it works fine.   Why is it happening?


title: Script Command without Junk Character

text: I'm Using Unix `script` command to record everything which is output to the terminal and place it in a log file. but when I see recorded file, it also include Junk Character. So how to record terminal activity without Junk Character. Output Example : ![enter image description here](http://i.stack.imgur.com/2aA9o.png) I have tried to convert file to dos using `todos`, `vim` and also tried with `dos2unix` but it skipping file `dos2unix: Skipping binary file`.


title: automate updates with a bash script and cron

text: I'm trying to automatize the updates of debian system, without making upgrades. Then i'll send an e-mail to me, everytime there is an upgrade available. I've tryied to do it with cron-apt, but i really don't like how the configuration is organized, that's why i would prefer using a (cleaner) cron job that launch the script. looking around i found that piece of code (not mein) :               if [[ `apt-get update 2>&1 | grep Get` ]]; then       if [[ `apt-get --simulate dist-upgrade 2>&1 | grep Inst` ]]; then         apt-get --simulate dist-upgrade       fi     fi      From what i can understand(im a little-bit noob), that script update the local packages list, and make a simulation of an eventual upgrade. Now if it's possible i would like to send to me via email the output of the update, and of the upgrade-simulation. For acheave that i could use mail command: sending first email: > apt-get update | mail -s "daily update report" me@example.com second email: > apt-get --simulate dist-upgrade | mail -s "daily upgrade-simulation report" > me@example.com My main question is if there a better approach to do all this..? Secondarely, I've tryied without succed to send everything in just one email, anybody know how i could do it?


title: remove blank lines in awk display

text: I was trying to figure out a solution for this question. I wanted to use `awk` for the solution. My input file is something like below.               -bash-3.2$ cat file     ramesh     ramesh_venkat     ramesh3_venkat3     ramesh4     ramesh5     venkat     venkat3     venkat4      I used `awk` command to extract the second values after `_` as below.               awk -F "_" '{print $2}' file      However, though the above command prints the correct values I am getting blank lines in my output. I have 2 questions. **Question 1** How can I remove the blank lines in output so that I get only `venkat` and `venkat3` in the output? If I use `printf` instead of `print` in my `awk`, I get `venkatvenkat3` as output which is not I wanted to achieve. I want the output like,               venkat     venkat3      **Question 2** Using those values as an _associative array_ or something, how can I find if the values actually occur in `$1` column? I wanted to achieve something like,               awk -F "_" '$2==1{print $1}' file      **EDIT** I did not notice the `awk` solution of Stephane. Is it doing the same thing that I had mentioned?


title: Conky on root desktop doesn't show config file changes

text: **Summary:** I recently installed Crunchbang and want to change the color of Conky, which is installed by default and shows system status info on the desktop. However, changing the config settings doesn't seem to make a difference, even when I manually restart conky. **Details:** I found two config files:               /etc/conky/conky.conf          /etc/conky/conky_no_x11.conf      They have color settings. If I change the settings and run               $ conky      then a terminal-looking panel appears that DOES reflect my changes. I noticed that in order to refresh the desktop Conky, not this terminal-looking Conky, I have to do               $ sudo killall conky     $ sudo conky -q      Killing it makes Conky disappear off the desktop. Starting it again as root makes it reappear on the desktop. But none of changes I make to the config files show up in the "root desktop" Conky, only when I run it as a "subsystem" Conky. Please help me understand what is going on, and what I am missing.


title: Is installing and configuring Arch Linux in VirtualBox going to be the same as installing it for real?

text: I want to learn how to install and configure Arch Linux on my MacBook. Since I'm just barely an intermediate Linux user (but with an intense desire to learn more), I will probably need a lot of trying/failing. Therefore I want to test out how to set up Arch Linux in VirtualBox (wireless cards, speaker drivers, function buttons, etc.). If I am able to do this properly in the VirtualBox VM, will the procedure be the same as if I tried to install it for real? (Ignoring that I would need to partition my drive and boot an USB instead of just loading the Arch Linux image in VirtualBox.) If not, what are the differences going to be? I intend to try and follow the same procedure and install Arch for real when I get it right in the VM.


title: Understanding RCU when Configuring the Linux Kernel

text: I am configuring the Linux kernel version 3.9.4. I am being asked questions about RCU (seen below). Specifically, what are each of these and what are the advantages and disadvantages of enabling or disabling some of these?               Consider userspace as in RCU extended quiescent state (RCU_USER_QS) [N/y/?]     Tree-based hierarchical RCU fanout value (RCU_FANOUT) [64]     Disable tree-based hierarchical RCU auto-balancing (RCU_FANOUT_EXACT) [N/y/?]     Accelerate last non-dyntick-idle CPU's grace periods (RCU_FAST_NO_HZ) [Y/n/?]     Offload RCU callback processing from boot-selected CPUs (RCU_NOCB_CPU) [N/y/?]


title: ln -s with a path relative to pwd

text: I'm trying to create a bunch of symbolic links, but I can't figure out why this is working               ln -s /Users/niels/something/foo ~/bin/foo_link      while this               cd /Users/niels/something     ln -s foo ~/bin/foo_link      is not. I believe it has something to do with `foo_link` linking to foo in `/Users/niels/bin` instead of `/Users/niels/something` So the question is, how do I create a symbolic link that points to an absolute path, without actually typing it? For reference, I am using Mac OS X 10.9 and Zsh.


title: WDM: autologin after boot

text: I am using `Debian Wheezy` with `wdm` and `LXDE`. I would like to have my user to be logged into LXDE automatically after computer start. I know this is possible with other display managers, such as `gdm`. Is there some way to configure this in `wdm`? If not in `wdm`, is there some workaround to do it with some script?


title: How to copy files as Jenkins "post build" action if i don't have privileges to destination directory

text: I have the following users "architecture" :   1. root access is disabled.   2. admin user have access only to its home directory.   3. Apache runs as root service (root is the only one that have access to web-server files)   4. I have installed jenkins CI which is building my project with "admin" privileges. i would like to copy latest build files to my webserver location as a post build action. how can i accomplish that if only "root" user has access to my destination directory? maybe my "users architecture" is all wrong in the first place?


title: Installing PCRE 8+ on SLES SP3

text: I need to install PCRE 8+ on a Suse Enterprise Linux SP3 box. The trouble is that the latest package available in the repo is 7.8. How would I go about attaining 8+? FYI, I need this to install The Bug Genie.


title: Exclude all subdirectories except one specific path in a find command

text: I use a `find` command to search for all files with a given extension within the current subdirectories ignoring certain directory path:               find -L . \( -wholename "*/ignoredPath" -o -wholename "*/ignoredPath2" \) -prune -o -name "*.ext"      This is working pretty well but now I want to ignore another path except one precise subdirectory in it. How to do this without listing all the subdirectories to ignore? For instance if I have the following folder tree:               */base/pathToIgnore1     */base/subdir/requiredPath     */base/subdir/pathToIgnore2     */base/subdir/pathToIgnore3     */base/pathToIgnore4      How can I write the `find` command ignore all `base` subdirectories except the path `*/base/subdir/requiredPath`? I tried something like               find -L . \( -wholename "*/ignoredPath" -o -wholename "*/ignoredPath2" -o \( -wholename "*/base" -a ! -wholename "*/base/subdir/requiredPath" \) \) -prune -o -name "*.ext"      But it did not work, all the `base` subdirectories are ignored.


title: Remove branch from all submodules

text: I have a project with a lot of submodules and I want to delete all remote branches named foo in the submodules, _if it exists_. I am trying to following:               git submodule foreach git push origin :foo      This works as intended if the branch exists in _all_ submodules, but if any of the submodules is missing the branch, the foreach stops:               Stopping at 'modules/bar'; script returned non-zero status.      How do I suppress the error?


title: Set up an email domain with Postfix and Dovecot

text: I am very new to the Linux world so please forgive me. I have a VPS running Ubuntu 12.10 x86 and I have installed Rails3, Nginx, Mysql and Passenger. All are up and running. I want to set up mail so I would like to use `myname@blurmedia.co.uk`. I have installed Postfix and can send and receive mail using `sendmail`. However after doing some research I need Dovecot for POP3 and IMAP, how would I do this and how could I then use `myname@blurmedia.co.uk` in a client like Thunderbird or Outlook? If you need any information please tell me as I'm not sure what you would need to see?


title: Safe to change owner of OS X system folders?

text: I'm trying to get Homebrew to work. That program's diagnosis tool gives me these suggestions: > You should probably `chown` /usr/local/etc > > ... > > You should probably `chown` them: >   >   >     /usr/local/share/man/de >     /usr/local/share/man/de/man1 >   Because these directories are not writable. I haven't changed owner or group before. Right now the owner of etc is `root` and the group is `wheel`, my username is something else. Is it safe to change the owner of these folders on OS X? I am concerned that my user won't have all the privileges of `root` and therefore other applications will bump into problems, although my account is an admin account.


title: How to share a GNU sed script between Linux and Mac OS X

text: I have a GNU `sed` script I use on Linux; it is installed at `/bin/sed` and it seems it contains GNUisms. I have collaborators using Mac OS X. They have installed (non-GNU) `sed`, located at `/usr/bin/sed`, and using Homebrew (http://mxcl.github.io/homebrew/) can install GNU `sed` as `gsed` with the _coreutils_ package, located at `/usr/local/bin/gsed`. Currently, the script starts with `#!/bin/sed -f`. How do I modify it so that it can be run on Mac OS X, when GNU `sed` is installed as `gsed`? Another option would be to remove the GNUisms, but this may be a bit hard, as I do not have a Mac OS X install at hand and cannot ask my collaborators to test intermediate versions.


title: mount.cifs vs NFSv3 for data shared between 2 Web servers

text: When having two RHEL 6 Linux servers separated by a load balancer serving Tomcat and Apache content, if the data is shared between the 2 servers via a network locally-mounted filesystem, does it matter whether this filesystem is CIFS or NFSv3? Should I expect comparable performance from either? Are there any pros or cons to one versus the other?


title: MC does not apply custom config

text: I have a fresh installation of Debian 7. Upon using Midnight Commander I noticed that auto indentation is disabled. 'No problem' I told to myself and changed the `~/.config/mc/ini` file.   Surprisingly that did nothing, as soon as I reopened mc the new `ini`was overwritten with the previous version.   After a little googling I also tried the same with `~/.mc/mc.ini` and `~/.mc/ini` with no results at all.   An `strace` at least showed me that the `~/.config/mc/ini` file is read by mc, but as it seems this file is overwritten somewhat before the read access, which is not traceable in the `strace`. My next guess was to use a global config file like `/etc/mc/mc.ini` but that changed nothing either. I really hope someone of you can push me into the right direction. Any help is appreciated and I thank you in advance! EDIT: As suggested below I prevent modification of the ini file via `chattr +i $HOME/.config/mc/ini`. Right now everything works fine.   Does anyone else experience problems like this? Maybe this is a bug.


In the log of one of my embedded devices, the following message appears:               W/libdbus (  985): Failed to start message bus: Failed to open "/etc/dbus.conf": Permission denied      Device is: IconBit XDS73D mk2 Linux version 2.6.34-VENUS (zpl1025@ubuntu20) (gcc version 4.3.6 20110218 (prerelease) (GCC) ) #68 PREEMPT Mon Dec 9 17:59:31 CST 2013 What does this message mean?


title: Rebuilding RPM results in "invalid numeric value"

text: I am attempting to add some config changes to Bash and repackage it as an RPM in CentOS x86. This is not something I've done before, so I'm at the mercy of info I've found around the internet. I am at the point where I have created my .spec file, and am attempting to run the following command:               rpmbuild -ba bash.spec      I get the following error as a result:               error: invalid numeric value: -pl: %patch119 -pl -b .history_syslog      The line referenced is verbatim in the error above (after the "-pl:"). If the "-pl" is what it thinks is the issue, I'm confused, because every other patch entry in the list (that existed before I edited it) is formatted exactly the same, e.g. -               %patch108 -pl -b .readline_oom      I'm not seeing a lot of answers when searching. Any ideas?


title: Unattended upgrades and modified configuration files

text: We have the unattended-upgrades package upgrading our servers with security upgrades every Monday and it works great. Today though, it upgraded all of our servers with a new version of PHP5. Because we have moved the default PHP5-FPM configuration file, apt complains that the file has been moved, and what would we like to do (Install new version, keep old version, show differences, start shell) about it. Since unattended-upgrades didn't know how to deal with this, it just aborted and we were left with dozens of machines down until PHP5-FPM was restarted by monitoring. So the question is - How can we make sure unattended-upgrades can handle this situation when it happens next time? We'd like to keep our currently installed version always. I tried googling but came up empty.


title: How to locate an application that is using the 'bash' command?

text: I saw a command called 'sshd' that is using the BASH command (according to `ps aux`) to write to a file. But how to locate the code of this application that is using the `bash` command?


title: How to mount an remote filesystem with specifying a port number

text: I am trying to mount a director from another server on my server. For that, I have tested                sudo mount -t nfs 11.11.11.111:/some_directory /mnt/test/      But the connections gets a timeout because on the server I am using another port: 1122 Thanks in advance.


title: fetchmail without an mda

text: I would like to retrieve mail from a server using fetchmail and have it deposit it directly into an mailbox/repository and not hand it off to a mda. Is this possible? How? In the alternate, is there an mda which simply recieves things from er fetchamil and stores them in some sort of repository without doing any processing?


title: How security programs like firewall, IPS and IDS have access to network data?

text: It is said that kernel responsible for the transport, internet and network access layers for a network data. Then, the network data is passed on the appropriate process based on port number. How security programs like firewall, IPS and IDS have access to network data that do not belong them while they are just user level program and not part of kernel? How about proxy server? How come the network data has to pass the firewall first before the appropriate process?


title: How can I configure cgroups to fairly share resources between users?

text: There used to be a kernel config option called sched_user or similar under cgroups. This allowed (to my knowledge) all users to fairly share system resources. In 2.6.35 it is not available. Is there a way I can configure my system to automatically share io/cpu/memory resources between all users (including root?). I have never set up a cgroup before, is there a good tutorial for doing so? Thank you very much.


title: Why are spin locks good choices in Linux Kernel Design instead of something more common in userland code, such as semaphore or mutex?

text: I understand that Spinlocks are real waste in Linux Kernel Design. I would like to know why is it like spin locks are good choices in Linux Kernel Design instead of something more common in userland code, such as semaphore or mutex?


title: Using alternate libc with ld-linux.so hacks; cleaner method?

text: I have a legacy system with a very old glibc, which we can't upgrade without incurring a mountain of testing/validation work. I have needed to run newer programs (such as Java 1.7) on that system several times now. I opted for a chroot solution, where I package up all the needed libs, and run a service in a chroot. The chroot is very limiting though, and I'm trying to solve the problem with LD_LIBRARY_PATH. Unfortunately, I get an error about `libc.so.6: cannot handle TLS data` when I try that. It turns out I need the `/lib/ld-linux.so.2` from the chroot as well. This works:               LD_LIBRARY_PATH=/home/chroot/lib /home/chroot/lib/ld-linux.so.2 /home/chroot/bin/program      However, `java` foils my trick by inspecting `/proc/self/cmdline` to determine where to load its libraries from, which fails if the binary wasn't named 'bin/java'. Also java execs itself during startup, further complicating matters. In a last-ditch attempt to make this work, I opened the java binary with a hex editor and replaced the string `/lib/ld-linux.so.2` with `/home/chroot/ld.so` (and made that a symlink to `ld-linux.so.2`), and it worked! But I think everyone would agree that it is a massive kludge to rewrite the path of every new binary to an absolute path of the nested system. Does anyone know a cleaner way to use a custom library path **including** a custom ld-linux.so?


title: How do I create an IPv6 overlay network?

text: I would like to create host-only IPv6 networks on two hosts and then route between them. On each host, there will be a dummy interface, at `ipv6_prefix::9`. I would like to be able to ping that interface from the _other_ host. Is there a well-developed best practice for this? It seems reasonable that one could do it with 6in4 tunnels. Below, I'll work through the setup I tried recently in EC2, using 6in4 to tunnel. The two hosts are `10.239.143.35` and `10.238.249.113`. First, let's set up the dummy interfaces. We'll use these Bash functions:               function dummy {       local name="$1" ipv6="$2"       ip link add "$name" type dummy       ip -6 addr add "$ipv6" dev "$name"       ip link set "$name" up     }          function calc6to4 {       printf '2002:%02x%02x:%02x%02x::\n' $(tr '.' ' ' <<<"$@")     }          function eth0ipv4 {       ip addr list dev eth0 | egrep -o 'inet [^/]+' | head -n1 | cut -d' ' -f2     }      (You can just paste these straight in to your shell session.) On the first host, we run:               :;  ipv4="$(eth0ipv4)"     :;  ipv6="$(calc6to4 "$ipv4")"     :;  echo "ipv4 = $ipv4" "ipv6 = $ipv6"     ipv4 = 10.239.143.35 ipv6 = 2002:0aef:8f23::     :;  dummy dummy9 "$ipv6"9     :;  ip addr show dev dummy9     69: dummy9: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN          link/ether e2:69:75:10:04:2c brd ff:ff:ff:ff:ff:ff         inet6 2002:aef:8f23::9/128 scope global             valid_lft forever preferred_lft forever         inet6 fe80::e069:75ff:fe10:42c/64 scope link             valid_lft forever preferred_lft forever      Pinging seems to work okay:               :;  ping6 -q -c1 "$ipv6"9     PING 2002:0aef:8f23::9(2002:aef:8f23::9) 56 data bytes          --- 2002:0aef:8f23::9 ping statistics ---     1 packets transmitted, 1 received, 0% packet loss, time 0ms     rtt min/avg/max/mdev = 0.040/0.040/0.040/0.000 ms      Now it's on to the second host:               :;  ipv4="$(eth0ipv4)"     :;  ipv6="$(calc6to4 "$ipv4")"     :;  echo "ipv4 = $ipv4" "ipv6 = $ipv6"     ipv4 = 10.238.249.113 ipv6 = 2002:0aee:f971::     :;  dummy dummy9 "$ipv6"9      Ping check checks out:               :;  ping6 -q -c1 "$ipv6"9     PING 2002:0aee:f971::9(2002:aee:f971::9) 56 data bytes          --- 2002:0aee:f971::9 ping statistics ---     1 packets transmitted, 1 received, 0% packet loss, time 0ms     rtt min/avg/max/mdev = 0.037/0.037/0.037/0.000 ms      Now it's time for the exciting bit: connecting the hosts with 6in4 tunnels. We use the following Bash function on both hosts:               function tunnel {       local name="$1" self_ipv4="$2" ipv4="$3" ipv6="$4"       ip tunnel add "$name" mode sit ttl 64 remote "$ipv4" local "$self_ipv4"       ip -6 addr add "$ipv6"1 dev "$name"       ip -6 route add "$ipv6"/64 dev "$name" metric 1       ip link set "$name" up     }      On the first host:               ################################### IPv4 and IPv6 from host 2 ##     :;  tunnel tun6in4 10.239.143.35 10.238.249.113 2002:0aee:f971::      On the second:               ################################### IPv4 and IPv6 from host 1 ##     :;  tunnel tun6in4 10.238.249.113 10.239.143.35 2002:0aef:8f23::      When we try to find a route from the first host to `2002:aee:f971::9`, bound to the dummy device on the second, we get a hit:               :;  ip -6 route get 2002:aee:f971::9     2002:aee:f971::9 from :: dev tun6in4  src 2002:aee:f971::1  metric 0          cache       But pings don't work:               :;  ping6 -q -c1 2002:aee:f971::9     PING 2002:aee:f971::9(2002:aee:f971::9) 56 data bytes          --- 2002:aee:f971::9 ping statistics ---     1 packets transmitted, 0 received, 100% packet loss, time 0ms      Maybe I need to add an address to `eth0`?


title: Is there a good drive torture test tool?

text: I have been having odd and rare filesystem corruption lately that I suspect is the fault of my SSD. I am looking for a good drive torture test tool. Something that can write to the whole disk, then go back and read it looking for flying writes, corrupted blocks, blocks reverted to older revisions, and other errors. This would be much more than what `badblocks` does. Is there such a tool? Note I am _not_ looking for a performance benchmark and already checked the SMART status; says healthy and no bad blocks reported.


title: How to read by multiple lines instead of line-by-line

text: I see that in my code I can modify a line if the entire code is based on that line. Example: `<p class="example">this is an example Happy Holidays</p>`. However if the `</p>` tag is located on a second line the code will pass that line. What is the best way to detect until the line ends for certain tags?