title: What does the following kernel message mean?

text: The following appears /var/log/messages, what that means ?                 Feb 19 22:51:20  kernel: [  187.819487] non-matching-uid symlink following attempted in sticky world-writable directory by sh (fsuid 1001 != 0)      It happens when a cron job was about to run.


title: Top says 100% CPU used, but 50% of cores idle?

text: top - 08:43:16 up 96 days, 22:16,  1 user,  load average: 4.03, 3.92, 3.98     Tasks: 199 total,   1 running, 198 sleeping,   0 stopped,   0 zombie     Cpu0  :  0.0%us,  0.5%sy, 50.0%ni, 49.5%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st     Cpu1  :  0.0%us,  3.9%sy, 46.8%ni, 49.3%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st     Cpu2  :  0.0%us,  3.0%sy, 47.5%ni, 49.5%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st     Cpu3  :  0.0%us,  5.0%sy, 45.5%ni, 49.5%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st            PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND      3593 foldinga  39  19  276m  80m 2972 S  402  1.0  12:55.42 FahCore_a3.exe      Now, how come top says it's using 100% of the CPU (400% / 4 cores) while exactly half of the processors are idle??               processor       : 3     vendor_id       : GenuineIntel     cpu family      : 6     model           : 30     model name      : Intel(R) Xeon(R) CPU           X3440  @ 2.53GHz     stepping        : 5     cpu MHz         : 2526.932     cache size      : 8192 KB     physical id     : 0     siblings        : 4     core id         : 3     cpu cores       : 4     apicid          : 6     initial apicid  : 6     fpu             : yes     fpu_exception   : yes     cpuid level     : 11     wp              : yes     flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm ida dts tpr_shadow vnmi flexpriority ept vpid     bogomips        : 5054.02     clflush size    : 64     cache_alignment : 64     address sizes   : 36 bits physical, 48 bits virtual     power management:      * * * EDIT: In response to i_grok and Max Alginin, I made sure Hyperthreading was enabled on the server. Once I got it turned on, here are the results of top now. Notice, the same symptoms are evident.               top - 10:17:01 up 47 days, 10:28,  3 users,  load average: 7.93, 7.96, 8.02     Tasks: 150 total,   1 running, 149 sleeping,   0 stopped,   0 zombie     Cpu0  :  0.0%us,  2.8%sy, 42.0%ni, 55.2%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st     Cpu1  :  0.0%us,  2.2%sy, 42.5%ni, 55.2%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st     Cpu2  :  1.2%us,  3.7%sy, 95.1%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st     Cpu3  :  0.0%us,  1.7%sy, 43.1%ni, 55.2%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st     Cpu4  :  0.0%us,  1.1%sy, 43.6%ni, 55.2%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st     Cpu5  :  0.0%us,  0.0%sy, 44.8%ni, 55.2%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st     Cpu6  :  0.0%us,  2.2%sy, 42.5%ni, 55.2%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st     Cpu7  :  0.0%us,  1.7%sy, 43.1%ni, 55.2%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st     Mem:   8177700k total,  6258704k used,  1918996k free,    29248k buffers     Swap:        0k total,        0k used,        0k free,  5203172k cached            PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND      8132 foldinga  39  19  557m  99m 3060 S  796  1.2   1510:53 FahCore_a3.exe


title: xmodmap configuration to emulate Mac special key layout?

text: On my Mac, I frequently type curly quotes manually. For example, a left curly double quote is Option-[. I would like to do the same on my Linux box. I run vanilla X11 (FVWM) with no GNOME, KDE, etc. Is there an xmodmap file out there that maps the curly quotes, and ideally all the rest of the Option and Shift-Option characters, to the same key combinations as Macs use?


title: Using regex inside if clause in bash

text: Look at this if block:               #!/bin/bash          str="m.m"     if [[ "${str}" =~ "m\.m" ]]; then         echo "matched"     else         echo "not matched"         exit 1     fi          exit 0      This should print "matched", but it doesn't. Where am I going wrong?


title: Crunchbang/Debian apt-preferences

text: So I did manage to set up apt-preferences but I'm not sure if I did it correctly. So basically what I want is, if I have the need I want to install packages from TESTING, UNSTABLE and DEB-MULTIMEDIA and that (ONLY) these Packages also get updates from the specific Repo. But as a "base" I want to have the STABLE-Version. Would be nice if somebody could check if I set this up correctly, because I'm not quite sure how the Pin-Priority works... so this i my sources.list               ## CRUNCHBANG     ## Compatible with Debian Wheezy, but use at your own risk.     deb http://packages.crunchbang.org/waldorf waldorf main     #deb-src http://packages.crunchbang.org/waldorf waldorf main          ## DEBIAN-STABLE     deb http://ftp.cz.debian.org/debian stable main contrib non-free     #deb-src http://http.debian.net/debian wheezy main contrib non-free          ## DEBIAN-BACKPORTS     deb http://http.debian.net/debian wheezy-backports main contrib non-free          ## DEBIAN-TESTING     deb http://ftp.cz.debian.org/debian testing main contrib non-free          ## DEBIAN-UNSTABLE     deb http://ftp.cz.debian.org/debian unstable main contrib non-free          ## DEBIAN MULTIMEDIA     #deb http://www.deb-multimedia.org wheezy main non-free          ## DEBIAN SECURITY     deb http://security.debian.org/ wheezy/updates main contrib     #deb-src http://security.debian.org/ wheezy/updates main      and my apt/preferences               Package: *     Pin: release a=waldorf     Pin-Priority: 1001          Package: *     Pin: release a=stable     Pin-Priority: 800          Package: *     Pin: release a=wheezy-backports     Pin-Priority: 650          Package: *     Pin: release a=testing     Pin-Priority: 400          Package: *     Pin: release a=unstable     Pin-Priority: 90          Package: *     Pin: origin *.deb-multimedia.org     Pin-Priority: 10


title: Triple Boot - Mac, Windows, Backtrack

text: This was the closest stackexchange site I could find to something of this nature. Currently, I own a Macbook Pro with a Bootcamp Partition (Win7), a Mac Partition (OS X Lion), and the Recovery Partition that comes with the aforementioned Lion. How do I go about creating a new partition with Backtrack on it?


title: Order of redirections

text: I don't quite understand how the computer reads this command. `cat file1 file2 1> file.txt 2>&1` If I understand, `2>&1` simply redirect Standard Error to Standard Output. By that logic, the command reads to me as follows:   1. concatenate files `file1` and `file2`.    2. send `stdout` from this operation to `file.txt`.   3. send `stderr` to `stdout`.   4. end? I'm not sure what the computer's doing. By my logic, the command should be `cat file1 fil2 2>&1 > file.txt` but this is not correct.


title: Determine which process is taking most of disk bandwidth?

text: When the HDD indicator is blinking (for a long period), how could I know which process is taking most disk bandwidth?


title: Apache : Close entire site to public but display a custom page

text: Suppose I do not want to delete any files or anything from my web site, but I want to close everything to the public. They simply need to see a custom page. How can one go about this via `httpd.conf` file? Perhaps something like:               Alias /* /a.txt


title: Rfkill refuses to unblock the WiFi device

text: Running `rfkill list` indicates the USB WiFi adapter is softblocked. I can run `rfkill unblock 0` with no error message, yet running `rfkill list` again indicates the device is still softblocked. ### Questions   * How can I unblock this device?   * Why is there no warning or error message reporting that it was unsuccessful?


title: Redirect VI command output to a file

text: I want to export the output of `vi` command `:set fileencoding` to another file. It seems `vi`'s file encoding detection is better than `file` command. How to do that? I could write a macro with:               :set fileencoding     :q      but this won't export the output.


title: Why no other distros/spins based on openSuSE?

text: So... I've been looking at 'returning' to openSuSE after a long absence (parted ways back in the 7.x/8x time frame). One thing that kind of jumped out at me all of a sudden was that for a relatively popular 'mainstream' distro that has been around for a _long_ time... I don't believe I've ever heard of or seen any forks, spins or any other kind of distro based off of SuSE. Any ideas as to why that might be?


title: Is it possible to have a seperate firefox profile for root?

text: There's a shared office PC that employees can use to surf / look up information on, etc. There are times when it would be convenient for me to use the same PC to check my email / log into secure sites. These are sites they should not have access to, for instance HR records of other employees. I have root access on the PC and they don't. Is there a way for me to do some quick work on the machine and ensure they won't see my saved passwords, etc.? For instance, run firefox as root instead of as the normal user? Or do I need to log into an entirely different profile?


title: Make mouse movements scroll when the middle button is held down

text: In Windows, I'm used to clicking the center button and it offering a "fast scroll" option up or down. How can I get this behavior on Linux? It currently seems to use the back button upon center click instead. I use Gnome under CentOS.


title: Why can an unpriviliged user execute the `sync` command?

text: Currently on Ubuntu Linux, but I noticed this on other OS's too. Apparently any user can execute the `sync` command, but why is this? I can only see the disadvantage: system slow down due to unnecessary disk writes. Why can every user execute `sync`?


title: Where are the CentOS 6.4 documents?

text: I'm only able to find up to version 5 on CentOS.com: http://www.centos.org/docs/ Even though CentOS 6 was released back in mid-2011..


title: sda and sdb block specials point to same device and get mixed up (hardware RAID doesn't work after new installation of 12.04)

text: I just installed the latest Ubuntu 12.04 and obviously it screws something up. I'm not sure if this has anything to do with the fact that I have a Raid 1 but at the moment, I have sda and sdb which point to the same device:               # blkid     /dev/sda1: UUID="88aa922a-4304-406e-8abd-edc2e9064d79" TYPE="ext2"      /dev/sda2: UUID="22b881d5-6f5c-484d-94e8-e231896fa91b" TYPE="swap"      /dev/sda3: UUID="e1fa161b-b014-4a6b-831a-9d8f9e04be07" TYPE="ext3"      /dev/sda5: UUID="6ed19886-1cba-47b2-9ce0-7c2ea8f9c3c9" SEC_TYPE="ext2" TYPE="ext3"      /dev/sdb1: UUID="88aa922a-4304-406e-8abd-edc2e9064d79" TYPE="ext2"      /dev/sdb2: UUID="22b881d5-6f5c-484d-94e8-e231896fa91b" TYPE="swap"      /dev/sdb3: UUID="e1fa161b-b014-4a6b-831a-9d8f9e04be07" SEC_TYPE="ext2" TYPE="ext3"      /dev/sdb5: UUID="6ed19886-1cba-47b2-9ce0-7c2ea8f9c3c9" TYPE="ext3"       But I have only one "visible" hard disc, so this ought to be sda. In my earlier version (10.10) /dev/mapper took care of it. Look at the mount points below. In the current version, this doesn't work anymore, so I entered sda mount points to fstab at first, which seemed to work, but when I execute the mount command, I saw that suddendly one partition was mounted as sdb instead of sda. So I tried to use the UUID as file system in fstab but the problem still exists. Which is even worse: It mixes up both devices. That means it sometimes mount one partition as sda, at next reboot it is suddendly sdb. And it behaves as it would mount different hard drives, because my /home partition was mounted once as sda, now as sdb and changes and setting I made in file system were suddenly "reset". What can I do? Should I delete all sdb block specials?               # <file system> <mount point>   <type>  <options>       <dump>  <pass>     proc            /proc           proc    nodev,noexec,nosuid 0       0     #/dev/mapper/pdc_ccfhbjbeeg3 /               ext3    errors=remount-ro 0       1     #/dev/mapper/pdc_ccfhbjbeeg1 /boot           ext2    defaults        0       2     #/dev/mapper/pdc_ccfhbjbeeg5 /home           ext3    defaults        0       2     #/dev/mapper/pdc_ccfhbjbeeg2 none            swap    sw              0       0     #/dev/sda1                   /boot           ext2    defaults        0       2     #/dev/sda2                   none            swap    sw              0       0     #/dev/sda3                   /               ext3    errors=remount-ro 0     1     #/dev/sda5                   /home           ext3    defaults        0       2          UUID=e1fa161b-b014-4a6b-831a-9d8f9e04be07      /               ext3    errors=remount-ro 0     1     UUID=88aa922a-4304-406e-8abd-edc2e9064d79       /boot           ext2    defaults        0       2     UUID=6ed19886-1cba-47b2-9ce0-7c2ea8f9c3c9      /home           ext3    defaults        0       2     UUID=22b881d5-6f5c-484d-94e8-e231896fa91b       none            swap    sw     0       0      UPDATE   by the way, the Ubuntu installer shows the RAID array and not the partitions. See also https://bugs.launchpad.net/ubuntu/+bug/973147


title: Blurred 70/100 DPI Xorg font packages with Webkit?

text: In web browsers using Webkit as their engine we have blurred and unclear font rendering issue in some pages such as Stackexchange, Github and some random other sites. The problem is the fonts come with Xorg 70/100 dpi fonts packages. In the case of Stackexchange and Github it is helveticam which come with `font- adobe-75dpi` and `font-adobe-100dpi`. Removing these packages may affect other part of system, so my question is:   * Is there any way to tell the system to load these fonts, without scaling them or not to load these font for webkit browsers?   * Does it help to solve the problem?


title: How to configure Kate to always use 2 spaces for tabulation?

text: By default Kate inserts 2 spaces on Tab press but switches to real tabs starting from the fourth Tab level. Can I disable this and use spaces always, regardless to the depth? I want this because I use Kate to code Scala, and using space pairs instead of tabs is a convention there.


title: How to write a script to execute files in multiple directories

text: How do I write a script to execute the files in multiple directories? The problem is this: I have many directories, and each has a data file to be read and analyzed by a python script (say, `a.py`). I don't want to "cd" to each of the directories and type "a.py". Outputs are saved in each directory.


title: How I should load file with setkey -f

text: I would like to load a text on Fedora. I use this command:               setkey -f "name"      but the file cannot be found. I have the file on my desktop.


title: Search ALL files with ack

text: How can I search **all** files (including binary) in the current directory with `ack` v2? I want to do the same as doing `ack 'foo' **`, but just with a flag, so it works if I want to search all files in a specific directory without appending `**`. * * * Difference between `ack 'foo'` and `ack 'foo' **`:               $ mkdir test && cd test     $ printf '\x00\x01foo1\x00' > test1     $ printf 'foo2' > test2     $ ack 'foo'     test2     1:foo2     $ ack 'foo' **     test1     1:foo1          test2     1:foo2


title: How do I extract a specific directory from a tarball? and strip a leading directory?

text: I want to extract a specific directory from the wordpress tarball. specifically `wp-includes` to `.`. It appears that the directory structure inside the tarball is `wordpress/wp-includes` but I just need`./wp-includes` once it's been extracted, no leading wordpress directory. How would I do this?


title: Why does the linux kernel use linux-libre code to get rid of binary blobs?

text: I ask this question because I'm curious as to whether there is some sort of performance advantage offered from the binary blobs that are in the Linux kernel. Since many of these blobs have been replaced with code in linux-libre, why has that same code not been incorporated into the Linux kernel at kernel.org?


title: add monitor to linux tty framebuffer

text: Whenever I use my laptop at my desk, I usually connect it to an external display on DP-1. To switch the window manager output to this display, I can just use xrandr --output DP-1 ... However, whenever I switch to another virtual tty (e.g. because I messed up again and X is frozen), the output is only shown on the laptop display (LVDS-1). This is quite annoying if the laptop is closed. If I reboot the laptop, both the LVDS-1 and VGA-1 output display the same framebuffer tty. My question: is there any way to achieve this behaviour without rebooting? By this I mean: is there an easy way to activate framebuffer output for the external display? I've searched this question on google, but all I seem to find is people suggesting me to use vbetool, which only allows to disable the front panel.


title: How do I permanently increase the font size in mrxvt?

text: The `Ctrl`+`=` hotkey increases the font size for the current session in mrxvt. What configuration option will increase the font size permanently?


title: How to list all the files used during Linux boot

text: I would like to get the list of files that are used during the process of Linux boot. We are developing the protected enterprise system based on the RHEL 6.4. The integrity of specified files will be checked by a special hardware. So the question is - how to get the list of these files (with resolved dependencies coming from different booting services and daemons).


title: Why is plymouth-log-viewer starting up?

text: I've been using Fedora 14 for about a month on my primary system (converted from Win2K). My secondary system was converted to Fedora 12 from Win2K, and was updated sequentially to Fedora 14 (using package-update both times). Recently, my primary system started showing an alert icon in the notification area immediately after login - a yellow triangle with an "!" in it. When I click on the triangle, I get a window titled "Boot Messages" with the following content:                       Welcome to Fedora      Starting udev:                                             [  OK  ]     Setting hostname gravastar.oakenhammer.org:                [  OK  ]     Setting up Logical Volume Management:   3 logical volume(s) in volume group "vg_gravastar" now active                                                                [  OK  ]     Checking filesystems     _Fedora-14-i686-: clean, 161569/1638400 files, 1511990/6553600 blocks     /dev/sda1: clean, 47/128016 files, 81952/512000 blocks     /dev/mapper/vg_gravastar-lv_home: clean, 55815/1646592 files, 1597690/6578176 blocks                                                                [  OK  ]     Remounting root filesystem in read-write mode:             [  OK  ]     Mounting local filesystems:                                [  OK  ]     Enabling /etc/fstab swaps:                                 [  OK  ]     Entering non-interactive startup     Starting monitoring for VG vg_gravastar:   3 logical volume(s) in volume group "vg_gravastar" monitored                                                                [  OK  ]     ip6tables: Applying firewall rules:                        [  OK  ]     iptables: Applying firewall rules:                         [  OK  ]     Starting portreserve:                                      [  OK  ]     Starting system logger:                                    [  OK  ]     Enabling p4-clockmod driver (passive cooling only):        [  OK  ]     Starting irqbalance:                                       [  OK  ]     Starting mdmonitor:                                        [  OK  ]     Starting system message bus:                               [  OK  ]     Setting network parameters...                              [  OK  ]     Starting NetworkManager daemon:                            [  OK  ]     Starting Avahi daemon...                                   [  OK  ]     Starting cups:                                             [  OK  ]     Starting HAL daemon:                                       [  OK  ]     Retrigger failed udev events                               [  OK  ]     Starting sshd:                                             [  OK  ]     Starting ntpd:                                             [  OK  ]     Starting sendmail:                                         [  OK  ]     Starting sm-client:                                        [  OK  ]     Starting abrt daemon:                                      [  OK  ]     Starting httpd:                                            [  OK  ]     Starting crond:                                            [  OK  ]     Starting atd:                                              [  OK  ]     Starting jexec services      This content corresponds exactly to the full content of `/var/log/boot.log`. Some poking around determined that this was the process `plymouth-log-viewer`, and that it is a graphical boot log viewer. I can understand this occurring if there's a boot problem. However, reviewing the content of the log does not seem to reveal any problems. Also, it's somewhat disconcerting that my only option once the viewer appears is to right-click the "!" and select "`Quit`". Can anyone provide any information on why this is happening, and how to stop it? This does not happen on my secondary system at all, and I cannot identify any significant discrepancies between the two systems. The only information that appears to indicate a potential cause is the following fragments from `/var/log/messages`: **UPDATE** The message content below also appears in the same log file on my secondary system, where `plymouth-log-viewer` is not triggered on login. Repeats several times:               Dec 18 19:18:51 gravastar NetworkManager[1069]: <error> [1292717931.616234] [nm-manager.c:1332] user_proxy_init(): could not init user settings proxy: (3) Could not get owner of name 'org.freedesktop.NetworkManagerUserSettings': no such name      Occurs once:               Dec 18 19:18:59 gravastar gdm-simple-greeter[1564]: Gtk-WARNING: gtkwidget.c:5691: widget not within a GtkWindow     Dec 18 19:19:00 gravastar gdm-simple-greeter[1564]: WARNING: Unable to load CK history: no seat-id found     Dec 18 19:19:09 gravastar gdm-simple-greeter[1564]: WARNING: Failed to send buffer      Occurs once:               Dec 18 19:19:44 gravastar dbus: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.60" (uid=500 pid=1815 comm="nautilus) interface="org.freedesktop.DBus.Properties" member="GetAll" error name="(unset)" requested_reply=0 destination=":1.18" (uid=0 pid=1461 comm="/usr/sbin/console-kit-daemon))      Thanks in advance!


title: Stuck on Fedora splash screen after OpenBox3/tint2 install

text: My system was bogged down by Gnome3 DE and so I made an install of OpenBox3 and tint2 on a Fedora 17 system yesterday. Both were working marvelously. After a system reboot this morning, my system is stuck on the Fedora splash screen and will go no further. I tried entering into command line and modifying my `~/.xinitrc` (which I had to create) through vim and then running `xinit` and `startx`, but both returned errors stating the X server failed to run. Are there any suggestions? I am somewhat new to the underpinnings of Linux, so this a bit more of a difficult puzzle to wade through.


title: remove lines that is newer than the given date in a file

text: I'm stuck on how I can go about deleting lines that are newer than given date. Here is a snippet of contents of a file. buildsave.txt               647919 2013/11/30     647946 2013/11/30     647955 2013/12/01     648266 2013/12/03     648267 2013/12/03     648674 2013/12/04      I would like to remove the lines that are newer than 2013/12/03 leaving only               647919 2013/11/30     647946 2013/11/30     647955 2013/12/01      How can this be done through bash?


title: Copy files to parent directory using relative pathnames

text: ![This is the directory tree I'm working with](http://i.stack.imgur.com/2jCWF.png) If I'm in the current working directory of oxford. How would I copy `outline.doc`, and place it into the `sample_dir` directory using relative pathnames? I've tried               cp outline.doc ../outline.doc


title: A terminal that is always scrollable or forever like less?

text: I'm currently using #!Waldorf, but have used Manjaro, Mint, Ubunto, Fedora, etc. Is there a way to make my terminal always behave like it's passed to less but without the (END) "feature" that requires I quit before I type anymore text. What I'm looking for, is a terminal that always supports scrolling left,right, up and down with the keyboard... and "No, SHIFT+PgUp and SHIFT+PgDn are not the same thing". The command `less` allows for a "natural" scrolling as if I were viewing the terminal's output inside of a window. Clearly the ability to detect when output has exceeded the current viewport's width and height exist, does anyone know how to incorporate this into the terminal itself?


title: How to configure a shortcut to open a window accessed by right click on the systray icon?

text: The application I am referring to is Turpial and it is a Twitter client. The problem is to open the window I need to send twits, I have to right click on a systray icon and select an option. In the manual (`man turpial`), I can't find a command to open the 'send twit' window, just the timeline window. After I open the window and send a twit, the window closes. I would like configure a global shorcut to open this window and then send my twits. So, some possibles solutions that I need are: How do I discover the command in the application that opens the 'send twit' window (when the systray icon right click and option select) and then use it in a terminal? This is probably the better solution. How to open the 'send twit' window that can be accessed with just a right click (and option select) on the systray icon by the terminal? How can I enable a shortcut to open this window to send twits?


title: How do you connect to the internet in backtrack 5 R2

text: I have recently installed backtrack 5 r2 so it dual-boots alongside windows. However for some reason I'm finding it difficult to make a wired connection using wicd. I know that the connection itself works because it's fine on windows. I also don't have (never had) a static IP. What steps do I have to follow to setup a such connection?


title: Tools for Monitoring Steal Time (st)

text: We're running on a virtual "dedicated" server, which should, in theory, mean that we're the only guys on the server. In practice.... I'm thinking we might not be. ![enter image description here](http://i.stack.imgur.com/rMrVk.png) Notice that although it looks like we're killing our machine, "Steal time" is at 71% I'm taking statistics on load and I was disappointed that this stat didn't show up in my graphs. Are there any tools which monitor this which might be able to help? * * * Additional information: We're running 4 cores, model:               # grep "model name" /proc/cpuinfo | sort -u     model name  : Intel(R) Core(TM)2 Duo CPU     E7500  @ 2.93GHz


title: How to find which processes are taking all the memory?

text: I'm looking for somthing like top is to CPU usage. Is there a command line argument for top that does this? Currently, my memory is so full that even 'man top' fails with out of memory :)


title: Running two animations side-by-side using ImageMagick

text: I have two animations (.gif files) I want to run side-by-side. Can this be done with ImageMagick? Moreover, I want to start one of the gifs after thirty frames of the other have passed. Can this be done as well? Otherwise, I can manually insert thirty frames of blackness into one image, but it would be easier to automate this step with ImageMagick, because I will potentially be doing this many times.


title: Executing a program with various parameters (loop)

text: I have a program, `prog`, which takes an integer argument when I call it from the terminal, eg:               ./prog 10      I would like to execute `prog` with a range of values, e.g. `10, 20, 30, ...`. Is there a neat way to do it, besides using:               ./prog 10 ; ./prog 20 ; ./prog 30 ; ....


title: How to give variable to a KSH script with a CGI?

text: index.sh is in the cgi-bin directory:               #!/usr/bin/ksh          echo 'Content-type: text/html          <html><body>     <form action=FOO.KSH method=POST>     <input type=submit value=fgrep style=width:42px>     <input type=text name=name type=text autofocus size=60>     </input></form>     <br>'      FOO.KSH               #!/usr/bin/ksh          printf "Content-type: text/html\n\n";           echo $1     echo $QUERY_STRING     echo $(</dev/stdin)      **Q** : Why does the FOO.KSH gives an empty file if I send an "a" string in the index.sh's form?


title: File permissions of file when tranferring from Windows to Unix

text: When I am uploading a file from windows PC to Unix ,the permissions of file are `\--wxr----t` on unix machine , whereas umask is `0022` .I am not able to understand from where is the file getting permissions `\--wxr----t` ? Please help me understand.


title: Lightest Debian Linux Distribution : Console Only - StandAlone (not net install)

text: Please suggest to me the lightest Debian Linux release with console only (no GUI). Please don't suggest any net install like `netinst`. I need an ISO of that release which is capable to boot and install from. Later I'll install my own chosen GUI and applications for my needs from Debian/Ubuntu repositories.


title: How to enable tab completion of  wildcards in bash?

text: How can I enable tab completion in bash for a statement such as `vim db/migrate/*crea`? Essentially I am looking for tab completion to match the regular expression and present the options. How would one go about doing this? This questions relates to one I asked here


title: Why do Unix-like systems execute a new process when calling a new function?

text: Why do Unix-like systems execute a new process when calling a function rather than a dynamic library? Creating a new process is costly in terms of performance when compared to calling a dynamic library.


title: Is disabling barriers for ext4 safe on a laptop with battery?

text: The manual page says about the `barrier` option for ext4: > Write barriers enforce proper on-disk ordering of journal commits, making > volatile disk write caches safe to use, at some performance penalty. **If > your disks are battery-backed in one way or another** , disabling barriers > may safely improve performance. Does a laptop with a battery (and an SSD) count as having a battery-backed disk? So, is `barrier=0` for ext4 safe on a laptop?


title: How to disable autocompletion for sudo ...?

text: I am new to zsh and I like it a lot, especially with oh-my-zsh plugin. I installed oh-my-zsh with its default values and can't figure out how to turn off autocompletion for specific commands, that I often use, such as: `sudo mc` or `sudo gem update`. The thing is that I have .mc directory and .gem directory and zsh proposes corresponding autocompletions (for .mc and .gem). Generally I would like to config zsh so that `sudo` is not considered a separate command (which it is not) with the following as a params. Is there a config for that?


title: Gnome 3 notification doesn't appear While vlc is runnig

text: I am using Gnome3 on Fedora 15. One of the good features of Gnome3 is Notifications from empathy will appear while you are watching a movie in the movie player and you can reply without changing the focus. This is working with totem movie player, but not with VLC. Actually the notification will have the top Z-index but it fails to get the top position with VLC.


I was wondering how logical volume, logical disk, volume, partition, physical disk and filesystem are related and correspond to each other? I am confused about these concepts and would like to have some general idea and big picture.


title: How to check that AES-NI is supported by my CPU?

text: Howcan I check if my CPU supports the AES-NI instruction set under Linux/UNIX.


title: Excessive resource usage by Xorg

text: I'm using Debian (testing) on a laptop. I have installed the Nvidia drivers and I'm using an external monitor connected to my laptop. My desktop environment is Xfce4. My problem is that Xorg seems to consume too much of the system resources. If I scroll a web page, it takes about 30/40% of the CPU and the Nvidia card runs at the max frequency. Maybe I have some bad configurations, but I don't known how to check. What can I do? Thank.


title: How can I automate sending mail using a script?

text: I have in the past heard of using `nail` for this task, but I can't seem to find it for my distribution (Ubuntu 11.04) in any of the repositories. What program can I use to one-off emails from a shell like so:               send-mail -to me@email.com -file attachment.zip -message "Hello World"      Is there a program out there through which I can script mail sending as above?


title: Gentoo: Display stays black after inactivity (ThinkPad T60p, ATI FireGL)

text: I've freshly installed Gentoo on my ThinkPad T60p. The graphics card is an ATI FireGL v5200, so I configured the Kernel to use KMS with radeon selected and included R300_cp.bin as the firmware. (buildin) (1st Question - Is that correct?) Now, wenn I use my device, everything works like a charm. - But after some inactivity, the display turn black and whatever I try to do, I can't get it back on again. It doesn't suspend or anything. - If I execute the command "speaker-test", I hear some noices. What might be the problem here? - Why doesn't the display turns back on, after I've pressed some keys? PS: I'm not using X11/Xorg by now, just the textmode.


title: What does dead.letter files do

text: I find dead.letter files from time to time in my `$HOME` directory. What they are for?


title: How do rolling releases work?

text: In my understanding of linux distributions, you get notified of updates, then by a simple click or with a bunch of commands you can install them. These may be patches or minor version updates of software you installed previously. For example, the distribution may suggest to upgrade firefox version 23 to firefox version 24 (bad example this is not a minor release but you get the idea). After a few months, though, the system asks you to do an upgrade : you're updating the system itself, not the software packages you have installed. Why can't the system itself be updated the same way as other software packages, via small, continuous updates ? What solution do rolling releases use to solve this problem ?


title: Changing monospace fonts system-wide

text: By default, the monospace font for my distribution (Trisquel) is Font A. I would like to change it to font B. Some time ago, I managed to make a partial change to Font C, but I have since forgotten this method and cannot reproduce it. The trouble is that now I may see all three fonts in monospaced contexts. Using `gnome-tweak-tool` as both root and user, I have changed the "monospace" field to Font B. I have also done this via the command line on gsettings, again as both root and user. However:   * ~~If a web page requests the style`{font-family: monospace;}`, Font C displays.~~ Edit: this was a setting in Firefox, which I have changed.   * In the Inkscape and gedit font menus, there is a font called simply "Monospace", which is font A. My distribution's default UI fonts, which I have changed, also display in these menus under the names "Sans" and "Serif".   * When Thunderbird messages I have received are formatted as plain text, they are displayed in Font A. Unless explicitly changed, messages I write also display in the fonts "Sans" and "Monospace". How can I fix this situation, such that Font B displays in all contexts described above, and the mysterious "Sans" font is replaced by the UI font I am currently using?


title: Weird stuff going on in terminal and emacs since upgrade to Ubuntu 10.10

text: I can't really describe the slightly odd behaviour of my terminal window and occasionally also on emacs, but here's a picture of it happening: ![Weird stuff](http://i.stack.imgur.com/CVU4w.png) If I press CTRL+L, it disappears. What could cause this? It started happening once I upgraded to Ubuntu 10.10, so I expect something broke there. It's a zsh shell using xterm. The computer in question is an Acer Aspire Timeline 4810T.


title: Variable with multiple values in Bash

text: I am trying to create a variable with multiple values, and use it in a command that will execute these values one by one. Example:               value=(a, b, c, d, e)      By using `echo "$value"` I would like these values to be passed on to echo one by one. When I use `ARRAY=(a, b, c, d, e)`, they all get executed at once. Which I'm trying to avoid. Any ideas?


title: Parse expirydate from openssl command

text: Was about to ask how to check the date of SSL certificates automatically but then figured it out, so below you can find my answer too.


title: imagemagick display: different text in font preview

text: The awesome `display` command from imagemagick allows me to preview fonts:               display ~/.fonts/font.ttf      However, the text is always the same ('That which does not destroy me, only makes me stronger'). Is there a way to change the standard text?


title: Is it possible to have more than just one backup when editing text files?

text: `Gedit` and `medit` are two text editors that I know of that allow me to save a backup. So, if I create a file called `temp.txt` the next time I edit it and then save it, I'll have a backup called `temp.txt~`. My question is this: is there a text editor that allows me to have backups named in a serial fashion so that I can have more than just the one backup in case I want to go back to the file as it existed a few revisions ago? For example, I'd have `temp.txt` as the latest version and `temp.bak.1`, `temp.bak.2`, etc.? If that is not possible, is there some script that will automatically rename a backup each time it is created so that serial versions are retained? Even a `temp.timestamp.txt` would be great. (I don't mind a solution using `nano` as the text editor.) * * * I should clarify that I'm not a coder or programmer. I just want to have previous versions of text files that I edit. These text files maybe `.css` or `.rc` or `.svg` files that form part of a theme. So if I edit some aspect of a theme's file, I can go back a bit in case I don't like a change I made.


title: How to change the backgrounds in isolinux

text: I've been messing with this problem for a while now, and it seems like there isn't much documentation, or people who have asked about this before. I've been trying to change the back640x480.jpg, back800x600.jpg,and welcome.jpg file in isolinux, but when I make the iso and boot it, none of the pictures show up. its just black instead of the modified images. I also change them in the bootlogo CPIO archive, and then recompress it. How can I make these image show?


title: How to explicitly load shell interpreter in a C program

text: I want to create an **executable script** which is not **readable/writable** However since an interpreter needs to read this file it is not possible to do so directly. Therefore I wanted to know if I could explicitly load an interpreter into a C program along with my script. This would allow me to set the permission of the C program according to my needs.


title: Multiple video cards on Xorg on Debian 7.4

text: I have 2 video cards installed and configured xorg.conf to output onto both monitors with Option "Xinerama" "1" but rather than extending my display, it is simply cloning the displays. I'm using KDM as a display manager, which recognises that there are 2 monitors, but no matter what I do, it seems to only clone the displays Here is the server layout and flags from xorg.conf:               Section "ServerLayout"         Identifier     "X.org Configured"         Screen      0  "Screen0" 0 0         Screen      1  "Screen1" RightOf "Screen0"         InputDevice    "Mouse0" "CorePointer"         InputDevice    "Keyboard0" "CoreKeyboard"     EndSection          Section "ServerFlags"         Option      "Xinerama" "1"      EndSection


title: Whonix no DHCP offer received

text: Hi I'm on the last step of setting up Whonix physical isolation and can't get the gateway to see the workstation. I'm confused because on the page linked below where it says 'Host Network' and 'NAT Recommended'. They both advise to replace the same file with different code? Anyways, the gateway will just tell me something like:               DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7     No DHCPOFFER received.      Any ideas on how to fix this? I'm using a wired connection. Site: https://www.whonix.org/wiki/Physical_Isolation


title: How to make a custom FreeBSD distribution

text: I have been struggling for several hours on how to find a coherient guide on how to create your own BSD distribution based off of FreeBSD. I have looked at the GitHub repositories for pfsense, but I don't understand how it works. My goal is to create a custom distro that comes with a desktop environment and other desktop utilities already setup, etc... (not interested in PCBSD or any other similar solution) I ran across the following article, but it does not tell you how to install custom ports and customize the ISO, rather just compile the existing source. This article is more in the direction I was aiming for, but it only sets up basic files and not ports. If I copy the binaries from ports, how will the system keep track of which programs need to be updated? Furthermore, the documentation on the FreeBSD website is of not much help, it still does not cover installing custom ports.


title: How to evaluate if it's worth using deduplication?

text: I have a partition where I am considering to use deduplication. For the profile of it's data I think it will be a good choice. Still, before doing it, I would like to evaluate the impact in a more systematic way than "feeling". Is there a tool that evaluates the impact of deduplication on a partition? (either file level or block level). For now I have ubuntu and ext4, but if deduplication proves to be valuable in this situation I am considering using opendedup or lessfs. Any other sugestion is welcome, even if that might mean using a different distribution / free *nix.


title: Can I reference a command before '&&' after '&&'

text: Not sure how else to phrase the question, but basically, I often find myself running a command like `vagrant` to bring up the VM, and then ssh into it like below:               vagrant up && vagrant ssh      Short of writing my own function or script, is there a way to "reuse" the `vagrant` portion in the second part of the command?


title: Double click Linux Bash Script and debug with pause commands

text: I'm fairly good with windows .bat scripts and normally use the pause command while developing them so I can see things step by step as the script runs in the command prompt. I am trying to do something similar with a Linux Bash file. I have a very simple bash, which can be seen below...               #!/bin/bash     echo Hello World!     read -p "Press [Enter] key to continue..."      I configured Nautilus (a Linux file management program) to "Run executables when they are double clicked" but I don't see anything when I double click the script. Do I need to re-route output to the console or something? **Edit** Here is how I achieved what I wanted...   1. Create a .sh file (I am using one from above)    2. Open Nautilus    3. Click Edit -> Preferences -> Behavior tab    4. Under "Executable Text Files" choose "Ask Each Time" Radio button Now when you click on .sh files, you will be prompted with a few options. Option "Run in Terminal" does exactly what I want. Thanks everyone for the contributions!


title: Log files for kernel panic on Arch Linux

text: I have recently updated my Arch Linux machine. Since then, I have been getting kernel panics here and there. (the screen freezes and the status lights on my keyboard are blinking) It seems to happen when I watch a YouTube video for around 10 minutes. I want to find out what is causing these kernel panics so that I may solve them. I can't seem to find any kind of log file with any kind of valuable information. `journalctl` gives no useful information and `dmesg` only shows information about the current running kernel. Most of the log files in /var/log/ are empty. I think this is normal since systemd handles logging and doesn't store the logs there. Where can I find more information about the kernel panics I'm getting? I don't need a full kernel dump, A stack trace or the name of the module/subsystem at fault should be enough.


title: How to setup port redirection after a ssh connection has been opened?

text: I'm using openssh on both client and server. I know I can run `ssh -L` or `ssh -R` to setup some port redirections over ssh. However, since they are command- line parameters, such redirections must be written before the connection is opened. **Can I setup port redirections on-the-fly using the command-line ssh client?** When I used the `PuTTY` ssh client, I could interactively setup a port redirection while a connection was already opened, without dropping nor reconnecting, thus I know it is technically possible.


title: Vi for Cygwin syntax

text: How can I make vi in Cygwin highlight the syntax when I open a file by default? I know that I can type in the command "syntax on" but I would prefer to not do this all the time.


title: xargs grep suggestion

text: grep -v "\<Swap" instruments.log | awk '{ idx=index($0, "MasterId="); masterId=substr($0, idx+length("MasterId=")+1); masterId=substr(masterId,1,index(masterId,"L")-3); print masterId; }' | xargs grep rel.log      I need to search each of that MasterId/output of `awk` in `rel.log` using `xargs` or something.   How can I do that?


title: How to configure Linux to cache file metadata in preference to contents?

text: I’d like to set the system up to use most RAM for file system metadata caching, but only a reasonably small amount for read/write caching and prefetching files. Ideally I would like to be able to browse the filesystem (as much as it fits in the RAM) without spinning up the disks until I actually open a file. Here are the details: I have a home-made file server. It’s got five disks in a LVM volume around 9TB, but only 4GB of RAM. Since the server doesn’t do much else then serve files, most of the RAM is used for caching. (“free” reports 3.4G out of 3.9G used for cache.) The server lives in my bedroom, and if all disks are spinning it makes enough noise to be annoying when it’s quiet. (I don’t mean seek noise, just spinning noise. The disks are of various makes and models, and I think slight differences in rotation speeds cause interference. No disk is noisy on its own, but if some of them are spinning together there’s a slight noise with a sub-Hertz period.) So I configured the server to spin down the disks most of the time. Of course, if the disks are spun down when I open a folder in my file manager, there’s a delay while whichever of the disks has that folder spins up. Just that is no big deal. But depending on where I look, it can happen several times in a row, if LVM happened to spread the metadata for each subfolder on the different disks. I suspect that Linux mostly fills its cache with file contents, and possibly prefetched data. The caching isn’t very useful beyond a few MB to ensure smooth playback; if I just watched a movie I probably won’t look at it again anytime soon. Prefetching, if it happens, is also completely useless _in my case_ , after more than a few MB. But one would think that 4GB should be plenty to be able to cache most file- system metadata, at least those parts that were already visited, so that I could browse the files without needing to spin up the disks if it turns out they’re sleeping. There would still be a delay when opening the file, but that’s OK. Compare “click; _wait_ ; click; _wait_ ; click; _wait_ ; play; watch” with “click; click; click; play; _wait_ ; watch”. The former is incredibly frustrating; the latter is almost expected. Notes:   1. Should it matter, the kernel is 3.2, the OS is Debian, the volume is lvm2, and the FS is ext4.   2. The only reason for the spin down is noise during the night; the server is otherwise running continuously. (I made it as low-power as reasonable.) The spin-down delay is varied depending on the time of day.   3. The hard disks are only for media. The OS is on a separate (small) flash drive. (Which means any spin-up delays comes from the data, not just because it needed something in `/usr` or whatever. I could spare a few GB on it if it would help with my problem somehow.   4. A reasonable impact on performance is not a big deal. The disks are faster than my network anyway.


title: Which edac module should I enable here?

text: I got a `Intel(R) Core(TM) i5-2450M CPU @ 2.50GHz` CPU here , not sure which module should be enabled for EDAC: ![enter image description here](http://i.stack.imgur.com/85Pzr.png) Chipset: `Inter Coporation 6 Series/C2000` , driver in use: `i801_smbus`


title: Is it possible to get a character at terminal cursor using ANSI escape codes?

text: I know I can move the cursor with the escape codes, and I can also print at the cursor. What I'd like to know is if it is possible to pull the character under the cursor. I tried searching for such a code, but failed. So I assume it is not possible, but I'd like to ask if there is some way I failed to find.


title: Fedora 18 not working on an HP Dv7

text: I've recently installed Fedora 18 on my brand new HP Dv7 that comes with Windows 8 and secure boot. Before install Fedora I disabled secure boot in the BIOS. I've installed Fedora 18 and all is working well, but for some reason the laptop boots to the default bootloader (the HP one that sends you straight to Windows 8) instead of Grub. At boot, I can push F9 and I see   * OS Bootloader - This is the HP Bootloader for windows 8   * Fedora (Hitachi hard drive name) - This is the Grub bootloader   * Select an EFI File - In Grub, Fedora and Windows boot just fine, but I want the computer to boot to grub, instead of the HP bootloader, what should I do?


title: Bash: Float to Integer

text: Is this right way of doing float to integer in bash, Or is there any other method ?               flotToint() {         printf "%.0f\n" "$@"     }


title: Bash history number not starting at 1?

text: I was customizing my bash prompt (I'm on OS X 10.7) when I came across something strange. Within my prompt I included !, which should give me the history number. However the history number always starts out at 501, instead of 1. This is true even if I restart Terminal. I can't seem to find anything close to this, I was wondering if you guys could offer some insight.


title: Change to the last modified subdirectory of the current directory

text: I have an application which generates a couple of files in different directories at a regular interval and I need to check the latest files generated, i.e. the file which is generated in the most recent directory (created or updated). The name of the file remains the same in all directories, so I just want a simple script which will change the directory to the last modified subdirectory. [Update] By seeing most of the answers, I think I should clarify that the directory names are dynamic (depends upon some user input & timestamp), so I can assume a directory pattern like dir[1,2,3] or similar


title: Cleanup of temporary file ~/.cache/duplicity/temp failed

text: Often when I run Duplicity I see an error message like this at the end of the run:               Cleanup of temporary file /home/user/.cache/duplicity/9a169830d41477b2dbc3c5b32edd4e8a/duplicity-MEXhMY-tempdir/mktemp-StAkzj-1 failed      The mentioned directory will contain ten or so files that are deleted the next time I run Duplicity. Any idea why this sometimes fails when running incremental backups? I have not seen any pattern to it myself, and have had little luck in finding others mentioning the same issue. Some guy on some emailing list once mentioned that his locale caused problems for Duplicity. I tried changing from my normal Norwegian bokmål locale to en-US, but still see the issue. Is this just normal operation for Duplicity? Seeing it on three different systems: two Ubuntu 13.04 64-bit desktops and one Ubuntu Server 13.04 64-bit.


title: Security of an encrypted (dm-crypt & LUKS) Ubuntu 12.04 installed by somebody else?

text: Suppose I want an Ubuntu setup (let it be 12.04) with full disk encryption. Ubuntu offers this as an option during installation. Suppose also that I have somebody (e.g. my vendor) else set this up for me and that I only get the finished system including the predefined encryption password (and of course all other passwords). Is there any way that this person can _reliably_ retain access to the encrypted data on the device even when I change the encryption password (and possibly other passwords)? (Note that I'm not talking about normal backdoors like installing a SSH key or a root shell or patching some daemon to receive commands from outside. I am talking specifically about backdoors that target the full disk encryption and possibly cannot be closed without having to reinstall or re-encrypt the whole system.) For example, with TrueCrypt it is (or was) possible to save the first sectors of an encrypted harddisk, because it only uses the password to encrypt the master key (which is then used to encrypt the data) - and if you replace both password and encrypted master key by replacing those sectors after a password change, you can practically undo an encryption password change. Is something like this possible with dm-crypt/LUKS? If not, anything similar?


title: GNU Screen: you have neither usable sockets nor usable pipes

text: I am trying to build GNU screen on CentOS 6 Minimal and When I type the command `./configure` it gives me this error > you have neither usable sockets nor usable pipes -> no screen I tried to use `yum update` and `yum provide */stropts.h` Still gives me the same error when I type the command `make` it gives me that error > pty.c:38:26: error: sys/stropts.h: No such file or directory How should I solve it? Pleas don't answer use `yum install screen`


title: How to enable swap accounting for memory cgroup in Archlinux?

text: On my Archlinux box I want to limit some applications to a smaller amount of memory using cgroups. Since I use swap, I need to account memory+swap. How can I enable swap accounting?


title: Shell script to backup VMware VM's, exporting each VM to a list then asking user intput

text: What I'm Trying To Accomplish:   * Get list of Virtual Machines ".vmx" file and place in variables    * Give the user and choice of which VM to backup   * Use "ovftool" to produce an export of the chosen VM to a hardcoded location What I Have So Far:               #!/bin/bash          # MyVariables     #vmFolder=     #vmList=     #vmDestination="~/Desktop/"     vmTool="/Applications/VMware OVF Tool/ovftool"          # DatScript     for i in "/Users/$USER/Documents/Virtual Machines.localized/"* ; do        if [ -d "$i" ]; then          echo $(basename "$i")        fi     done      Still getting used to Bash and FWIW I'm writing this for OS X 10.8 but thought the Unix SE would be best.


title: How can I monitor a file that fully recreates during its run?

text: This is a follow-up question of > Why are some file changes not shown in tail -f? With the use of capital F: `tail -F` I can monitor the output of               tail -F ~/.mysql_history      from the manual:               --retry           keep trying to open a file even if it is inaccessible when  tail           starts  or if it becomes inaccessible later; useful when follow-           ing by name, i.e., with --follow=name          -f, --follow[={name|descriptor}]           output appended data as the file grows; -f, --follow, and --fol-           low=descriptor are equivalent          -F     same as --follow=name --retry      but then the whole file is added to the output each time it changes. Is there a way to tail the `.mysql_history` file correctly? I also tried               tail --follow=name ~/.mysql_history       but then I get the same behaviour and additionally this each time the history file changes:               tail: '.mysql_history' has been replaced; following end of new file      _(using`LC_ALL=C tail --follow=name ~/.mysql_history` to get the english errormessage)_ My **end goal** is to redirect the complete output of all changes in the mysql history into another file, but this is not satisfying:               tail -F ~/.mysql_history >> ~/.mysql_complete_history


title: ffmpeg webcam to device driver , output 8 bit grayscale

text: With the following command i'm trying to capture 10fps and send them the device driver. Now i want 8 bit gray raw frames (640x480= 307200 bytes per frame) to be send to the device driver. I can't figure out how to set the output with ffmpeg or the intput with v4l2 to this format.               ffmpeg -f v4l2 -r 25 -s 640x480 -i /dev/video0 -f rawvideo "/dev/devicedriver"      ffmpeg doesn't seem to support 8-bit gray output. And with v4l2 i can't figure out how to set it. It seems it doesn't recoginize V4L2_PIX_FMT_GREY.               v4l2-ctl --set-fmt-video-out=width=640,height=480,pixelformat=V4L2_PIX_FMT_GREY      I came up with a solution combining python, opencv and ffmpeg:               import cv     import sys     import os     import time     camera_index = 0      capture = cv.CaptureFromCAM(camera_index)     count = 0     def repeat():         global capture         global camera_index         global count         frame = cv.GetMat(cv.QueryFrame(capture))         framegray = cv.CreateMat(480, 640, cv.CV_8UC1)         cv.CvtColor(frame, framegray, cv.CV_BGR2GRAY)         sys.stdout.write(framegray.tostring())         c = cv.WaitKey(1)         if c == 27:             print count             sys.exit()          while True:         repeat()      and then pipe it to ffmpeg               python capturewebcam.py | ffmpeg -f rawvideo -pix_fmt gray -s 640x480 -i - -an -f rawvideo -r 10 "/dev/null"      But i think it really has to be possible with just ffmpeg and v4l2, and i can't figure out how. My head hurts from reading the documentation :p.


title: How can I print "-n" with `echo`?

text: I feel really stupid, yet I can't figure how to print the string "-n" with the over 30 years-old command `echo`. I tried these:               Michaels:Scripts$ echo -n     Michaels:Scripts$ echo "-n"     Michaels:Scripts$ echo -e "-n"     Michaels:Scripts$ echo -- -n     -- -n     Michaels:Script$ echo -- "-n"     -- -n     Michaels:Script$ echo "\-n"     \-n      I use Mac OS X ML. I consider this behaviour very weird and unexpected.


title: AR9485 Wireless Network Adapter with Linux

text: Lately I change my VivoBook 500ca for Linux. I installed the latest Mint Cinnamon. I have been having some problems with my wireless card :                  description: Wireless interface        product: AR9485 Wireless Network Adapter        vendor: Atheros Communications Inc.        physical id: 0      When I start my PC everything works perfectly for about 10 minutes and then I get disconnected from my wireless network. Any ideas why I keep getting disconnected?


title: vim regex to search for lines containing string1 AND string2

text: How in vim/vi can I search for all lines that contain string1 and string2, where either string can appear anywhere on the line separated by whitespace and possibly other words? I would also like to know how to do this using the less pager search (/).


title: Makefile idiom to install to the first available directory

text: I have a Makefile which, among other things, installs a Bash completion script:               install [...] /etc/bash_completion.d/      This works fine in Ubuntu, but in Arch Bash completions are installed to `/usr/share/bash-completion/completions`. What would be the **idiomatic GNU or POSIX`make` way** to handle this? I expect a nice solution would have something like these features:   1. If the `install` command fails, the target must fail.   2. Traverse the list of directories in sequence as written. At the first directory which already exists (if any):      1. Install the file if it does not exist,     2. overwrite the file if it exists and is not up to date (according to `make` semantics),     3. skip the file if it exists and is up to date, and     4. stop processing directories.   3. It is _not_ an error if the file is not installed anywhere.   4. It is _not_ an error (nor should the `Makefile` attempt to handle this case) if the file has already been installed in one directory, and subsequent runs installs it into another directory. That is, given a directory list `/a /b`, if someone     1. creates `/b`,     2. puts the file in `/b`,     3. then creates `/a` and     4. runs `make` the `Makefile` should _not_ detect the presence of `/b` at all.   5. It is _not_ an error if none of the directories exist.   6. Feedback about which directories were attempted would be nice, but not mandatory.


title: Docear on Kubuntu 12.04 64

text: I am running a 64bit version of Kubuntu 12.04 and I would like to run Docear (Some kind of research assistant) on it. The software is based on Java (which I had it installed) and has only a `.sh` file which based on their website you just need to double click it to run the software. Every time I double click I just seed the splash screen and then nothing! Is there anyway to resolve this issue? cause this software can severely ease my burden.


title: Install Cinnamon on Debian

text: Is it possible to install Cinnamon on Debian unstable? There is no packages for Debian on their official download page, and when i tried to add PPA to my repositories list, it won't install because of lacking dependencies. ### Edit (01.05.12) My actions. I downloaded the source, then ran `./configure` in the folder. I got that: `configure: error: Your intltool is too old. You need intltool 0.40 or later.` There were 2 packages, `intltool` (version 0.50.2) and `intltool-debian` (version 0.35.0), so i installed the first one. Then it complained that the following packages were not installed or were older than required. `dbus-glib-1 folks libmuffin gjs-internals-1.0 libgnome-menu-3.0 gconf-2.0 clutter-x11-1.0 libstartup-notification-1.0 gobject-introspection-1.0 libcanberra telepathy-glib telepathy-logger-0.2 polkit-agent-1 libnm-glib libnm-util gnome-keyring-1` Unfortunately i could not satisfy the versions and dependencies. Linux Mint claims that "Users can ... switch their sources to follow Testing, or even Unstable, directly to get more frequent updates", so i decided there should not be compatibility problems and just added `deb http://packages.linuxmint.com/ debian main upstream import` to my `/etc/apt/sources.list`. After that i installed Cinnamon from Linux Mint repositories and when i logged in, there was MATE (i think), not Cinnamon, loaded, with almost unreadable fonts and some other glitches. I decided it is easier to just install LMDE with proper apt repository priorities, than to install Cinnamon on Debian unstable. So i ultimately failed at my task, but marked one of the answers as correct.


title: How to install Aurora (Firefox) on Debian?

text: How to install the latest Firefox build (called Aurora) on Debian unstable? Are there any packages or repositories?


title: What are the strengths and weaknesses of different Unices

text: In a few points, what are the strength and weakness of your favourite Unix. Tell us the unique features that other implementations do not offer.


title: Running shell commands in .sh file results to error

text: I have two following linux shell commands:               echo 'CPU type and model'     cat /proc/cpuinfo | head -5 | tail -1      When i run these commands directly in Terminal, i get this result truly:               CPU type and model     model name  : Intel(R) Core(TM) i3 CPU       M 330  @ 2.13GHz      But when i save them into a `test.sh` file and run `sh test.sh`, i get this error:               CPU type and model     tail: option used in invalid context -- 1      I also try `bash test.sh` and get this:               CPU type and model     tail: option used in invalid context -- 1


title: What is causing a pause during the system device probe?

text: I am running FreeBSD 10.0-RELEASE. During the boot device probe there is a two-times 30 second pause. The output relevant to this is               # dmesg     ...     (aprobe0:ata0:0:1:0): ATAPI_IDENTIFY. ACB: a1 00 00 00 00 40 00 00 00 00 00 00     (aprobe0:ata0:0:1:0): CAM status: Command timeout     (aprobe0:ata0:0:1:0): Error 5, Retry was blocked     run_interrupt_driven_hooks: still waiting after 60 seconds for xpt_config     (aprobe0:ata0:0:1:0): ATAPI_IDENTIFY. ACB: a1 00 00 00 00 40 00 00 00 00 00 00     (aprobe0:ata0:0:1:0): CAM status: Command timeout     (aprobe0:ata0:0:1:0): Error 5, Retry was blocked     ...      I am quite new to this OS but does this mean the system is detecting a device but cannot figure out what it is? I have nothing but the bare essentials attached - hard drive and optical drive and is confirmed with:               # camcontrol devlist     <MATSHITA DVD-RAM UJ-841S 1.00>     at scbus0 target 0 lun 0 (pass0,cd0)     <HGST HTS7250xxxxxxxx GHB0xxxx>     at scbus1 target 0 lun 0 (pass1,ada0)      I tried some other commands to get some additional information:               # camcontrol rescan all     (aprobe0:ata0:0:1:0): ATAPI_IDENTIFY. ACB: a1 00 00 00 00 40 00 00 00 00 00 00     (aprobe0:ata0:0:1:0): CAM status: Command timeout     (aprobe0:ata0:0:1:0): Error 5, Retry was blocked     (aprobe0:ata0:0:1:0): ATAPI_IDENTIFY. ACB: a1 00 00 00 00 40 00 00 00 00 00 00     (aprobe0:ata0:0:1:0): CAM status: Command timeout     (aprobe0:ata0:0:1:0): Error 5, Retry was blocked     Re-scan of bus 0 was successful     Re-scan of bus 1 was successful     Re-scan of bus 2 was successful     Re-scan of bus 3 was successful     Re-scan of bus 4 was successful      With `camcontrol rescan all` the system again pauses twice for 30 seconds before it rescans the buses. Even if I request to scan just a single bus the system insists on doing the 'aprobe0' scan first. Also, the "aprobe0..." lines are bold and bright white which someone told me means it is a kernel response. I would be happy if I could even just reduce the length of the pauses. I tried entering `kern.cam.ada.default_timeout=5` in `/boot/loader.conf` but it did not have any effect. I have searched long and hard without success and can't get much help. Anyone who knows better have any ideas? Thanks! Just to add, this is RELEASE-10. For a short while before this I was running RELEASE-8.3 which worked perfectly with no delays. The boot process took something like 15 seconds. But just as I was starting to learn on R8.3, it reached EOL, so I just decided to move up to R10. The ATA kernel modules for R10 are very different from those in R8.3. I have read about such changes but I don't know where to go from here.


I face this issue on some of Unix servers. When I open different session for same user, command history is shared by all the session. This creates issues if by mistake I press `Ctrl-P` or `up arrow` and just press Enter. On one occasion I end up running `rm -rf *` thankfully I was in directory where I don't have permissions to remove files. How to have separate command history for different sessions for the same user? Most of the time I am using ksh and tcsh shells.


title: Calculating memory and CPU utilization

text: I want to know how to calculate CPU and memory utilization of a process using the `/proc/stat` and `/proc/status` files. Can I calculate the total memory and CPU a user is using?


title: Tell wget not to spider URL matching a pattern?

text: I want to test how my site would be behave when being spidered. However, I want to exclude all URLs containing the word "page". I tried:               $ wget -r -R "*page*" --spider --no-check-certificate -w 1 http://mysite.com/      The `-R` flag is supposed to reject URL pattern containing the word "page". Except that it doesn't seem to work:               Spider mode enabled. Check if remote file exists.     --2014-06-10 12:34:56--  http://mysite.com/?sort=post&page=87729     Reusing existing connection to [mysite.com]:80.     HTTP request sent, awaiting response... 200 OK      How do I exclude spidering of such URL?


title: Control and up/down keys in terminal for use by emacs

text: Is it possible to use `C-up` and `C-down` when running emacs in the terminal window (when starting emacs from the command line with the `-nw` flag)? What should my terminal send when I press `C-up` and `C-down` for these keys to work in emacs? I'm on Mac OSX, using iterm2 to ssh into a remote linux server, where I start the emacs session from bash.


title: What is the equivalent of /usr/share/misc on Solaris?

text: The Linux Filesystem Hierarchy Standard has the following to say: > This directory contains miscellaneous architecture-independent files which > don't require a separate subdirectory under /usr/share. This leads me to ask, what is the equivalent to /usr/share/misc on Solaris? Is there none, would a directory with a single file do the best job?


title: Help updating OpenSSH to v6.6

text: My system is vulnerable to OpenSSH Wildcards on AcceptEnv Vulnerability, CVE-2014-2532. I have tried to update openssh to version 6.6 for centos but I can not get repository[sic] for that version. **/EDIT/** PCI-DSS compliance is a driving factor for this question.


title: Cannot install Snort 2.9.6.1 due to "Not a compatible architecture"

text: I have Centos 6.5 installed on a Dell Inspirion Intel chip. When I entered               uname -a      I got               Linux family.room 2.6.32-431.el6.i686 #1 SMP Fri Nov 22 00:26:36 UTC 2013 i686 i686 i386 GNU/Linux      I tried the following commands after downlowning the appropriate .rpm file.               sudo yum localinstall snort-2.9.6.1-1.f19.x86_64.rpm     sudo yum localinstall snort-2.9.6.1-1.centos6.x86_64.rpm     sudo yum localinstall snort-2.9.6.0-1.src.rpm      In every case, the response was               Loaded plugins: fastestmirror, refresh-packagekit, security     Setting up Local Package Process     Examining snort-2.9.6.1-1.f19.x86_64.rpm: 1:snort-2.9.6.1-1.x86_64     Cannot add package snort-2.9.6.1-1.f19.x86_64.rpm to transaction. Not a compatible architecture: x86_64     Nothing to do


title: Debian restarts itself after booting with a "not responding" error

text: I had a stable Debian 6 install until earlier today, when some keys on my USB keyboard stopped working and my USB mouse buttons started to behave strangely. I had not installed anything new since the last time I shutdown my computer. I ran `sudo reboot`, left to check on something else, then came back to see a screen like the following:               [nnnn.nn] not responding     [nnnn.nn] not responding      ... where the `n`s were numbers (I don't know if the decimal point was always placed at the same spot). After a few seconds, my computer restarted. This would happen every time after I got to the GRUB screen and selected Debian. Is there any way to fix this? Thanks.


title: df reports the space occupied in the partition, but there is no data

text: Pasting the output of `df -h` for the `/mtd_rwarea` partition:               $ df -h      Filesystem                Size      Used Available Use% Mounted on     /dev/mmcblk0p16         150.0M    138.5M     11.5M  92% /mtd_rwarea      But there is nothing in the directory. Directory `/mtd_rwarea` is empty. The output of `ls -la` from that partition:               ls -la     drwxr-xr-x    1 root     0                2 Jan  1 00:01 .     drwxrwxrwx   26 root     0              693 Aug 16  2012 ..      Could anyone please help in understanding what could be the reason here? Thanks!


title: Bonding two broadband connections to serve LAN as a gateway

text: I need to increase the connectivity and speed of the Internet to my LAN users. These are the things I have in my hand to do so.   1. PC with 3 NICs 1 for LAN and 2 for routers   2. 2 broadband connections with dynamic IPs connected to two routers. (one with 192.168.1.1 and one with 192.168.0.1)   3. CentOs 6.4 I need My Eth0 to serve my LAN users as below: Eth0 Ip: 192.168.100.250 and this should be their gateway and DNS to the Internet (Correct me if this wrong) I use each router's Lan IPs as gateways and DNSs as; Eth1 IP: 192.168.0.250, Gateway 192.168.0.1, DNS 192.168.0.1 Eth2 Ip: 192.168.1.250, Gateway 192.168.1.1, DNS 192.168.1.1 But how do I configure Bonding? Do I need to assign IP settings before the configuration of bonding? should I change LAN ip addresses of routers to one/same segmant/subnet as 192.168.1.1 and 192.168.1.2? If I config the bonding, what should be my Eth0 configuration? Leave it as it is? What is the most suitable bonding mode for a LAN more than 50 users?


title: Force command to be run on logout or disconnect?

text: I'm logging in to a system via SSH and I'd like to be able to force a command to be run on logout, whether that's an intentional logout (exiting the shell) or because my SSH connection has dropped/been terminated. Is there any way to set this up? My best guess right now is to change the login shell to a program that intercepts the signal sent on SSH closing (SIGHUP?) and executes the command then, but I'm wondering if there's a cleaner solution.


title: Text annotations and image additions to PDF file using free software

text: I'm mostly interested in annotating a PDF file with text at a predetermined position. GUIs and command line utilities are both Ok, but only free software solutions, please. However, I included image additions for completeness. There are two similar questions on Ask Ubuntu, but they are both a couple of years old. These are How can I add text and images (for example, a signature) to a PDF? and How can I edit a picture into an existing PDF file? I've tried Xournal, which does work. However, I think a little tutorial about how to do this would be good, so you want to add a small tutorial on how to use Xournal to accomplish these tasks, please add an answer. I also tried updf, which didn't work for me, though this answer and this one for example says it can. I rebuilt the package (which is pure Python) on Debian Wheezy, using the sources from the updf PPA. It seems quite primitive and the "Save As" dialog did not even have a save button. If other people have had different experiences, please post. For each answer, please provide a brief tutorial with screenshots if appropriate, as to how you accomplished this task.


title: DVD not mounted automatically in Linux Mint Debian Edition

text: I just installed LMDE on a brand new laptop. When I inserted a movie-dvd for the first time, it was loaded not causing any trouble. But since then, there seems to be no automatic mounting of dvds anymore. Mouting the dvd manually works fine and even when I open a video player - vlc for example - the dvd gets loaded after a short while. That wouldn't be too much of an issue for me, but since it's about a laptop of a friend of mine - who isn't too experienced when it comes to technical affairs - I'd better fix it for him. The output of `fdisk -l` looks alright too. I know that's only a small amount of information, but I don't really know what's of further interest for you in order to be able to spot the bug.


title: Asterisk, GSM-FXO gateway example of usage

text: Can anyone explain where to use GSM-FXO gateway. I understand where to use GSM-FXS - for example to connect analogue telephone to gsm gateway. But do we use GSM-FXO to connect to two telephone stations?


title: grub thinks ext4 is iso9660 filesystem

text: How do I fix this and install grub? When I use gparted I see /dev/sdb has one partition and it is ext4 however when I tried to install grub I got > #grub-install /dev/sdb   >  /usr/sbin/grub-setup: error: hd0 appears to contain a iso9660 filesystem > which isn't known to reserve space for DOS-style boot. Installing GRUB there > could result in FILESYSTEM DESTRUCTION if valuable data is overwritten by > grub-setup (--skip-fs-probe disables this check, use at your own risk). I also see a mount point and 2 disk systems. One is appears to be my debian install the other appear to be a install disk. I can't seem to figure out whee on the filesytem the install disk is. There is clearly only one partition. I installed this by using VMWare and installing to usb rather then a disk in vmware. I have another usb that doesn't suffer the problem but I used a labtop instead


title: Uninstalling software packages, without removing the downloaded .deb in apt-cache?

text: Currently I am running Wheezy 32-bit, and recently I installed FreeSWITCH from the official repos. However, I realized that for the purpose I had in mind, I needed to rebuild FreeSWITCH myself, from source, which is somewhat newer than the binary release no. installed. Just to be sure that I can reinstall/reuse the FreeSWITCH binaries from official repos at a later date, without having to fetch the package .deb files again (which took quite a while on my slow connection) — I wanted to thus uninstall, while keeping the package files in apt cache. How can I achieve this ? Also, the FreeSWITCH package installation was done using a meta-package (i.e. “freeswitch-meta-vanilla”) which pulled in all the other FreeSWITCH package. Would I need to perform this uninstall differently ?


title: Get errors when aptitude update

text: I get the following errors when `aptitude update`. These errors are after non- error updates. What do I do to fix this, but not remove the ppas, etc?               Err http://ppa.launchpad.net  Packages       404  Not Found     Ign http://ppa.launchpad.net  Translation-en_CA     Ign http://ppa.launchpad.net  Translation-en     Fetched 520 kB in 2s (206 kB/s)     W: Failed to fetch http://ftp.ca.debian.org/debian/dists/wheezy/Release: Unable to find expected entry 'main/binary-back/Packages' in Release file (Wrong sources.list entry or malformed file)     W: Failed to fetch http://dl.google.com/linux/talkplugin/deb/dists/stable/Release: Unable to find expected entry 'main/binary-back/Packages' in Release file (Wrong sources.list entry or malformed file)     W: Failed to fetch http://ftp.ca.debian.org/debian/dists/wheezy-updates/Release: Unable to find expected entry 'non-free/binary-back/Packages' in Release file (Wrong sources.list entry or malformed file)     W: Failed to fetch http://ftp.ca.debian.org/debian/dists/wheezy-proposed-updates/Release: Unable to find expected entry 'non-free/binary-back/Packages' in Release file (Wrong sources.list entry or malformed file)     W: Failed to fetch http://packages.linuxmint.com/dists/debian/Release: Unable to find expected entry 'import/binary-back/Packages' in Release file (Wrong sources.list entry or malformed file)     W: Failed to fetch http://packages.crunchbang.org/waldorf/dists/waldorf/Release: Unable to find expected entry 'main/binary-back/Packages' in Release file (Wrong sources.list entry or malformed file)     W: Failed to fetch http://ppa.launchpad.net/webupd8team/sublime-text-2/ubuntu/dists/lucid/Release: Unable to find expected entry 'main/binary-back/Packages' in Release file (Wrong sources.list entry or malformed file)     W: Failed to fetch http://ftp.debian.org/debian/dists/wheezy-backports/Release: Unable to find expected entry 'main/binary-back/Packages' in Release file (Wrong sources.list entry or malformed file)     W: Failed to fetch http://repository.violetsky.ch/steam/dists/wheezy/Release: Unable to find expected entry 'main/binary-back/Packages' in Release file (Wrong sources.list entry or malformed file)     W: Failed to fetch http://mozilla.debian.net/dists/wheezy-backports/Release: Unable to find expected entry 'iceweasel-release/binary-back/Packages' in Release file (Wrong sources.list entry or malformed file)     W: Failed to fetch http://security.debian.org/dists/wheezy/updates/Release: Unable to find expected entry 'non-free/binary-back/Packages' in Release file (Wrong sources.list entry or malformed file)     W: Failed to fetch http://http.debian.net/debian/dists/wheezy/Release: Unable to find expected entry 'main/binary-back/Packages' in Release file (Wrong sources.list entry or malformed file)     W: Failed to fetch http://ppa.launchpad.net///download.learnfree.eu/repository/skss/Packages: 404  Not Found     E: Some index files failed to download. They have been ignored, or old ones used instead.     E: Couldn't rebuild package cache          W: Duplicate sources.list entry http://http.debian.net/debian/ wheezy/main amd64 Packages (/var/lib/apt/lists/http.debian.net_debian_dists_wheezy_main_binary-amd64_Packages)     W: Duplicate sources.list entry http://http.debian.net/debian/ wheezy/contrib amd64 Packages (/var/lib/apt/lists/http.debian.net_debian_dists_wheezy_contrib_binary-amd64_Packages)     W: Duplicate sources.list entry http://http.debian.net/debian/ wheezy/non-free amd64 Packages (/var/lib/apt/lists/http.debian.net_debian_dists_wheezy_non-free_binary-amd64_Packages)     W: Duplicate sources.list entry http://http.debian.net/debian/ wheezy/main i386 Packages (/var/lib/apt/lists/http.debian.net_debian_dists_wheezy_main_binary-i386_Packages)     W: Duplicate sources.list entry http://http.debian.net/debian/ wheezy/contrib i386 Packages (/var/lib/apt/lists/http.debian.net_debian_dists_wheezy_contrib_binary-i386_Packages)     W: Duplicate sources.list entry http://http.debian.net/debian/ wheezy/non-free i386 Packages (/var/lib/apt/lists/http.debian.net_debian_dists_wheezy_non-free_binary-i386_Packages)     W: You may want to update the package lists to correct these missing files


title: acpid - Hibernate When Unplugged

text: I'm new to programming for Linux (lubuntu specifically) and I'm working on a project to get an old, discarded laptop up and running the way I want it. I have acpi and acpid installed, and when I run the acpi command, I]m informed of whether my laptop is plugged in (charging) or unplugged (discharging). I would now like to have the laptop automatically hibernate when the laptop is discharging. My first thought was to write a script that would poll acpi every 30 seconds or so and then run a hibernate command whenever it responded with the word "discharging". However, I understand that acpid is the better tool to use, as it is more event-driven. I can't seem to find any material on making a laptop hibernate when unplugged - any advice?


title: Can I bypass crontab command by putting the file?

text: I need to create and put my cron file with               cat cronfile1 cronfile2 > cronfile     crontab cronfile -u myuser      This works for me, but I want to know if I can do directly               cat cronfile1 cronfile2 > /var/spool/cron/crontabs/myuser      Of course I am root, and I'm doing this from busybox. Is it safe or am I doing something wrong and should use the crontab command instead?


title: Why would anyone not set 'histappend' in bash?

text: After finding out what this `shopt -s histappend` means, it seems a very sane setting, and I'm surprised that it isn't default. Of course I may be shortsighted, so why would anyone not use such a setting? Why would anyone want to wipe their history on each shell exit?


title: Get line numbers for empty lines

text: I have a large pipe-delimited file where I need to find the line number of all lines where a certain field is empty. I can use `cut -d \| -f 6 filename.txt` to output just that column. What is a utility/tool/command I can use to find what output lines from the above are empty?


title: Debugging system-related application errors in Linux

text: I am now faced with trying to debug some odd crashes for a commercial application, the dreaded SAS, and I am looking for some clues that might help to diagnose the issue. Of course I check the SAS runtime logs, and I also check /var/log/messages. Nothing in /var/log/messages, but the SAS runtime log seems to indicate a memory or disk space issue:               ERROR: Insufficient space in file WORK.'#tf0533'n.UTILITY.     ERROR: Insufficient space in file WORK.20110609_BCH.DATA.      There is **surely enough** disk space, so I am lead to believe it might be a memory issue. What other system logs or even tools can I use for looking for further information (such as writing to a full disk device, spikes in memory usage, swapfs errors, etc.)?


title: Need to upgrade svn on centos

text: I have an error when I run `svn up` > svn this client is too old to work with working copy...please get a newer > subversion client This is on centos. I need to update svn. How do I do this?               [user@somewhere cms]$ sudo yum install     subversion Loaded plugins:     fastestmirror Loading mirror speeds     from cached hostfile * addons:     mirror.chpc.utah.edu * base:     mirrors.usc.edu * extras:     mirror.chpc.utah.edu * updates:     centos.mirror.facebook.net Setting up     Install Process Package     subversion-1.4.2-4.el5_3.1.i386     already installed and latest version     Nothing to do      `yum update` does the same thing. Additionally, only one directory is supposedly affected, but deleting this from the repository doesn't fix the issue.


title: How can I give a very stripped down login for viewing logs?

text: I have various log files in folders on an RHEL 5 system:               /var/log/syslog-ng/A/     /var/log/syslog-ng/B/     /var/log/syslog-ng/C/      I would like to be able to give certain users the rights to view/tail (but not modify/delete) all files inside the folders `B` and `C` (and subdirectories) but not to view the contents of folder `A` nor the `/var/log/syslog-ng` folder itself. What I can imagine is a cut down shell with the only commands being `tail`, `cd`, `grep` and `vi`, with `cd` only able to navigate into the `B` and `C` folders. A single user/password shared between the people who would be using this information is fine. How would you recommend achieving this? Is it even possible? (we currently achieve this with a bash script made available through Apache HTTPD, with the Apache configuration requiring a password if the path being navigated passes above the B or C folders. The script is clunky and hacky to say the least, and doesn't provide any form of live updating apart from a meta-refresh on the generated HTML page - making use of ssh and tail would be a much better user experience, and be less prone to errors)


title: How can I add a certificate to Mercurial?

text: I use Arch Linux, when I want to clone a project from bitbucket with mercurial I get this error:               warning: bitbucket.org certificate with fingerprint 24:...:3b         not verified (check hostfingerprints or web.cacerts config setting)     searching for changes        * how can I fix this?    * how can I add this certificate to my shell?   * is there a pack of certificate to install? like the default certificate bundle that comes with Firefox?


title: Bring up all terminal windows to front of screen?

text: I usually have 2-3 terminals open when programming on Fedora, but I find it quite tedious having to click and manually bring every terminal to the front screen when I compile and run. Are there any hotkeys / tools that will bring all terminals to the front of the screen?


title: How do I remap my caps lock key to ctrl+x within x.org?

text: I've seen some `setxkbmap` stuff when talking about key mappings, but `ctrl`-`c` isn't a single key. Ideally, I would love to make it a copy/paste key but that seems impossible on Linux. Is there a way on Gentoo/Arch Linux to remap the caps lock key into:   * caps lock on = copy   * caps lock off = paste or just a "hitting the caps lock = ctrl+c" mapping?


title: Defragment a USB flash drive on Mac OS X

text: I frequently create bootable flash drives and many a time large files need to be defragmented in order to boot. On Windows I'd used Contig/WinContig, but I must use OS X for the same purpose now. Are there any free tools for defragmenting external drives for Mac or something more specifically for defraging single files?


title: domain 'ubuntu-hvm' does not exists, xen + ubuntu, hvm guest os installation problem

text: I am following the installation/setup instructions at https://help.ubuntu.com/community/XenProposed to install ubuntu + xen. I was able to install a PV guest OS. However, when I got to the HVM guest OS part, I keep getting the statement:               error: domain 'ubuntu-hvm' does not exist      This error shows when I execute the following command:               sudo xm create /etc/xen/ubuntu-hvm.cfg      My `ubuntu-hvm.cfg` looks like the following:               builder = "hvm"     name = "ubuntu-hvm"     memory = "512"     vcpus = 1     vif = ['']     disk = ['phy:/dev/xenvg/ubuntu-hvm,hda,w','file:/home/jwayne/ubuntu-12.04-desktop-amd64.iso,hdc:cdrom,r']     vnc = 1     boot="dc"      I did some internet searches, and some site the `dhcp = 'dhcp'` line in the configuration file as the problem (which I do not have). I've also seen some variations of the configuration file where they set:               kernel = "/usr/lib/xen-4.1/boot/hvmloader"      which doesn't resolve the error message for me. The way I create a logical volume is as follows:               sudo lvcreate -L 4G -n ubuntu-hvm /dev/xenvg      The logs at /var/log/xen/qemu-dm-ubuntu-hvm.log looks like the following.               Using file /dev/xenvg/ubuntu-hvm in read-write mode     Using file /home/jwayne/ubuntu-12.04-desktop-amd64.iso in read-only mode     Watching /local/domain/0/device-model/3/lodirty/cmd     Watching /local/domain/0/device-model/3/command     Watching /local/domain/3/cpu     qemu_map_cache_init nr_buckets = 10000 size 4194304     shared page at pfn feffd     buffered io page at pfn feffb     Guest uuid = d56fc9dd-0a2e-a797-8ebe-c4f0d7a4fae8     Time offset set 0     populating video RAM at ff000000     mapping video RAM at ff000000     Register xen platform.     Done register platform.     platform_fixed_ioport: changed ro/rw state of ROM memory area. now is rw state.     xs_read(/local/domain/0/device-model/3/xen_extended_power_mgmt): read error     Could not read keymap file: '/usr/share/qemu/keymaps/en-us'      How can I fix this problem?


title: Nautilus Actions embedded not working right

text: I installed Nautilus Actions from Community (nautilus-actions) and the Nautilus Terminal from Community (nautilus-terminal). I can see the terminal (screenshot http://screencloud.net/v/EknY) and I made a simple Nautilus Action to use Filebot (another screenshot http://screencloud.net/v/ohJf) so as you can see from the second screenshot I chose Embedded which should run the command inside the nautilus-terminal but it doesn't. It always launches a new gnome-terminal. Versions   Nautilus: GNOME nautilus 3.12.2   Nautilus Actions: nautilus-actions-config-tool (Nautilus-Actions) v 3.2.3


title: How do find the LDAP connection details that the Solaris box uses to authenticate users?

text: The Solaris box is configured to use LDAP and has no local user accounts. This is the output of the `nsswitch.conf` file:               bash-3.2$ less /etc/nsswitch.conf     passwd:     files [NOTFOUND=continue] ldap     group:      files ldap     hosts:      files dns     ipnodes:    files     networks:   files     protocols:  files     rpc:        files     ethers:     files     netmasks:   files     bootparams: files     publickey:  files     automount:  files ldap     netgroup:   ldap     aliases:    files     services:   files     sendmailvars:   files     printers:   user files ldap     auth_attr:  files     prof_attr:  files     project:    files     sudoers:    ldap      So Solaris will look-up users and groups in the LDAP. But where exactly are the LDAP service/server details configured? * * * Note that I am new to working with *nix so any additional references would be very helpful. References:   1. /etc/nsswitch.conf


title: Eclipse not executable

text: I have just downloaded the Android SDK for Linux. I am running OpenSuse 12.3. When I try to run Eclipse, there is an error that says that there is no program to run executable files. So, I use the following ways to make the Eclipse program executable.   1. Right click on the program and open the 'Properties' option to check the 'Allow executing file as program' checkbox. But as soon as I check the box, it gets unchecked and I am not able to run Eclipse.   2. I tried using the `chmod +x` command but there was no change. As requested here is the output of the `file eclipse` and `ldd eclipse` command.               gursheel@linux-vfsr$ file eclipse     eclipse: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.2.5, not stripped     gursheel@linux-vfsr$ ./eclipse     bash: ./eclipse: Permission denied     gursheel@linux-vfsr$ ldd eclipse     ldd: warning: you do not have execution permission for `./eclipse'     /usr/bin/ldd: line 124: ./eclipse: Permission denied     gursheel@linux-vfsr$ chmod +x eclipse     gursheel@linux-vfsr$ ldd eclipse     ldd: warning: you do not have execution permission for `./eclipse'     /usr/bin/ldd: line 124: ./eclipse: Permission denied      Here is the entry in `/etc/fsatb`               /dev/disk/by-id/ata-HITACHI_HTS725032A9A364_100712PCK304VKKKRWMJ-part7 swap                 swap       defaults              0 0     /dev/disk/by-id/ata-HITACHI_HTS725032A9A364_100712PCK304VKKKRWMJ-part8 /                    ext4       acl,user_xattr        1 1     /dev/disk/by-id/ata-HITACHI_HTS725032A9A364_100712PCK304VKKKRWMJ-part9 /home                ext4       acl,user_xattr        1 2     proc                 /proc                proc       defaults              0 0     sysfs                /sys                 sysfs      noauto                0 0     debugfs              /sys/kernel/debug    debugfs    noauto                0 0     usbfs                /proc/bus/usb        usbfs      noauto                0 0     devpts               /dev/pts             devpts     mode=0620,gid=5       0 0      and `/proc/mounts` **Statics** is the name of the drive that has the adt folder with eclipse in it.               /dev/sda3 /run/media/gursheel/Statics fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096 0 0     /dev/sda3 /var/run/media/gursheel/Statics fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096 0 0      How do I make Eclipse executable?


title: Removing lines that are common to the outputs produced by two commands

text: Say, I have two commands that return some text. For example:               $ ./c1     /usr/bin/foo     /usr/bin/bar     /usr/bin/baz     $ ./c2     /usr/bin/foo     /usr/bin/qux     /usr/bin/buzz     /usr/bin/bar      I want to remove the duplicate lines; i.e. the output will be (order isn't important):               /usr/bin/baz     /usr/bin/qux     /usr/bin/buzz      How would I go about doing this?


title: mount tmpfs preserve current permissions

text: I have a directory of a web application cache and this has the permissions 755 (default), and I configured setfacl additional permissions. the problem is that when I restart the system, the information is always lost permissions. As I can preserve them? ### `/etc/fstab`               none /home/rkmax/myapp/cache tmpfs defaults 0 0      ### `setfacl` command               -R -m rkmax:rwx -m appuser:rwx /home/rkmax/myapp/cache     -dR -m rkmax:rwx -m appuser:rwx /home/rkmax/myapp/cache