title: How to build nginx on Ubuntu with cache_purge module?

text: I have been trying to rebuild `nginx` with `cache_purge` module from here. I did the following and somehow the new build doesn't seem to include the module:   * Installed `nginx`   * Stopped it   * Installed build tools using:               aptitude -y install build-essential libc6 libpcre3 libpcre3-dev libpcrecpp0 libssl0.9.8 libssl-dev zlib1g zlib1g-dev lsb-base     cd /usr/src/     sudo wget http://nginx.org/download/nginx-1.5.8.tar.gz     sudo wget http://labs.frickle.com/files/ngx_cache_purge-2.1.tar.gz     tar -xvf nginx-1.5.8.tar.gz     tar -xvf ngx_cache_purge-2.1.tar.gz     cd nginx-1.5.8        * Then I ran the following command after which the terminal sprouted a lot of things:              sudo ./configure --add-module=/usr/src/ngx_cache_purge-2.1        * Thereafter, I ran the following command:              sudo make && sudo make install      Finally though, when I run `nginx -V`, I don't see my module in the list. I see only this:               nginx version: nginx/1.4.1 (Ubuntu) TLS SNI support enabled configure arguments: --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf     --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-log-path=/var/log/nginx/access.log --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --with-pcre-jit --with-debug --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_realip_module --with-http_stub_status_module --with-http_ssl_module --with-http_sub_module --with-http_xslt_module --with-ipv6 --with-mail --with-mail_ssl_module --add-module=/build/buildd/nginx-1.4.1/debian/modules/nginx-auth-pam --add-module=/build/buildd/nginx-1.4.1/debian/modules/nginx-dav-ext-module     --add-module=/build/buildd/nginx-1.4.1/debian/modules/nginx-echo --add-module=/build/buildd/nginx-1.4.1/debian/modules/nginx-upstream-fair     --add-module=/build/buildd/nginx-1.4.1/debian/modules/ngx_http_substitutions_filter_module      Can anybody help me understand if I did the build correctly?


title: Do not halt the boot if an fstab mounting fails

text: I have this line in my fstab:               sshfs#ecarroll@o99:/opt/dealermade/ftp/inc /opt/dealermade/ftp/inc fuse defaults,idmap=user,users 0 0      For whatever reason it didn't work -- that's fine. How do I make it not stop the boot sequence. It prompted me to to hit `S` to skip or `M` to manually repair. If it isn't the boot volume, I just want my volumes to fail mounting with nothing more than an entry in logs.


title: Automatically start an application with a modifed LD_PRELOAD?

text: I have an application that needs a modified LD_PRELOAD. I want to start the application using the originally provided rc script, so I can benefit from an automatically updated rc script on an update of the application. I can't modify the original rc script of course, because any change would be lost on the next update. So, is there maybe some system settings like: If starting application X, use a modified LD_PRELOAD? Or would my best way really be to copy the original rc script, modify it and use the modified rc script?


title: log remote X session from ssh (PuTTY)

text: I've googled alot about this and can't find a way to do this (or if it's even possible) I want to log a user on a remote machine in his X session (Gnome) from a ssh in a windows machine with PuTTY. Note: I do not want to view in windows the remote desktop, just pass the login screen in the remote computer so i can open things there like XBMC and so on. Auto-login is not an option. Thanks in advance. Edit: Ok, let's meet the scenario. It isn't exactly like that but may help understanding the thing. Let's say i have a computer on the lower floor, wired to a TV on the upper floor, and also have a infrared reveiver there with his controller. How can i start let's say a XBMC, w/o go to the lower floor. Just with a laptop (or smartphone maybe) in the upper floor. The computer is such a multipurpose (and has many users) so autologin is not a choice.


title: Is there any simple way to change one line in a lot of files?

text: I'm trying to use PHP CodeSniffer, and here's the result:               -----------------------------------------------------------------     A TOTAL OF 3008 ERROR(S) AND 380 WARNING(S) WERE FOUND IN 46 FILE(S)     -----------------------------------------------------------------      There a a lot of small changes on one line (for example: change `@author Olivier Pons` to `@author Olivier Pons <olivier.pons@gmail.com>`) that I'd like to do via a shell script, or even better, via a command line, and (if possible) using regular expression. Do you have any idea/suggestion/working solution for this problem? Thank you! (Note: I've already read this but it didn't help me)


title: Rsync that handles moves sensibly

text: I've been successfully using **rsync** to synchronize my home directories between my laptop and my netbook (both using ext4 with Linux). My only problem with it is that every now and then I like to completely reorganize certain directories, and **rsync** sees this as deletions and creation of new files, which makes it very slow and inefficient. Does anybody know of a good piece of software that handles file moves well? I've found that **unison** should be capable of this, but it doesn't seem to work in practice. I tested **unison** by synchronizing two local directories, each with a large file in it, and it still detected my move as a deletion+creation and was in effect even slower than **rsync**. Moreover, if I remember correctly from my looking at **unison** 's source code a couple of months ago, it tried to do something like doing sha sums—and I don't want my ideal solution to do sha sums—that's too slow on large files/directories. I'd like something that notices things like: " The last source counterpart of this file seems to have been deleted and there's a new file elsewhere in the source directory tree that has the same mdate, size, and inode number, so I'm just going to assume that this was a move and move its target counterpart accordingly instead of doing a delete+copy. " It's important to me that I be able to sync these machines quickly. Any suggestions?


title: Format of cookies when using wget?

text: What's the format of the "natescapes" cookies.txt when I need to mirror a website that requires login. I use some chrome extension that returns cookies in that format, I save them in cookies.txt, import with wget command but no use, it just downloads content like I'm not logged in at all Appreciated any help


title: install RPM packages using perl

text: I'm trying to install RPM package using 'yum' through perl. But, the package is prompting to enter 'Y/N' during the install. How can i do a silent install?


title: . (dot) in file mode

text: I `tar` a folder on windows and `untar` on RHEL machine. `ls -l` shows a `.` in file mode and folders are in `blue + yellow background`.               [root@xt-storage-01 apache-tomcat-8.0.5]# ls -l     total 120     drwxrwxrwx. 2 root root  4096 Jul 24 11:18 bin     drwxrwxrwx. 2 root root  4096 Jul 24 11:18 conf     drwxrwxrwx. 2 root root  4096 Jul 24 11:18 lib      what's the meaning of `.` at the end of file mode?


title: Firefox Nightly auto-update not working

text: I'm using Firefox Nightly on Crunchbang (Debian). There is no version in the repos so I downloaded and extracted the `tar` to the home folder. Firefox runs fine but is will ask me to update fairly often since this is the Nightly version. When I try to do the auto update it just says "connecting to server" and never actually does anything. The workaround I found is that if I run Firefox as `root` it will update normally. But I later found that none of the changes/updates made while `root` will stay. I think this is just a problem with the permissions but I'm wondering if anyone has ran into this before?


title: lxappearance, FreeBSD and normal user

text: I set pure Openbox desktop on FreeBSD 10 and I am usingn `lxappearance` for theme, font and icon changes.   but if i do `$ > lxappearance` I can't install icon themes or GTK+ themes. if i do `$ > sudo lxappearance` and install icons or themes; those themes would not be in lxappearance list when i run `lxappearance` without `sudo`.   if i select a theme by `$ > sudo lxappearance` whether GTK+ or Icon theme, thoes themes would only applies to root not my account. PS: i have a solution and that's putting the icons and gtk+ in a folder that is in `~` my home directory. but i don't know what would be the path and if they would be picked up by `lxappearance`?


title: Forward local port to remote port in a Vagrant machine

text: I have MySQL running on my local machine and I need to publish this port to a Vagrant box without any special SSH hackery. Is there a way for me to forward 10.0.2.2:3306 to 127.0.0.1:3306 on the Vagrant box using iptables? If so, how can I debug it to make sure I get things right?


title: Why does Android crash when stressed on Memory where as GNU-Linux keeps running?

text: I have two devices, an Android phone with an eGlibC stack running side by side with Bionic, and an old HP tower with Debian. My HP tower has 512 MB of RAM. My phone has 2GB of RAM. I run top on both to keep an eye on things. I have been compiling stuff on my phone, well because the phone it's self has better specs than my HP tower and I am studying ARM assembly, so working on ARM makes sense, at least to me. My tower is pretty much always tight on memory usually with about 20 MB of free ram at any given point in time, sometimes less depending on what I am doing. My tower has been up and running for 40 days:               $uptime     17:34:14 up 40 days,  8:54, 12 users,  load average: 2.60, 2.14, 1.58      But, my phone, running Android, which is supposed to be designed for low memory environments, crashes when I push it to about 50MB of free memory, this has happened more often now that I am compiling larger projects such as the Android SDK/NDK .   * Why is this?   * What could be some possibilities? I would like to fix the problem but reading over every bit of code in the Android project is infeasible .   * Where should I start?


title: What should be the buffer size for the sort command?

text: I have a machine with 2 TB of RAM and I am running a sort command on a file of size 150G where I have specified the buffer-size as 1000G, after doing my bit of reasearch on google, I got this piece of information "the more is the buffer size, the better is the performance". This is the command that I ran               sort -rk2 --buffer-size=1000G master_matrix_unsorted.csv > master_matrix_sorted.csv      But this is taking a lot of time and I have no clue on the progress of the task. Any idea on what should be the best buffer size for this operation? I am planning to re-run this task with a new buffer-size.


title: Adding a label to start-stop-daemon service in process list

text: I have a bunch of redis service instances, and I would like to add a label to them in the output of the `ps` command. Currently I see:               $ ps aux | grep redis     root     <snipped>   /usr/local/bin/redis-server *:6381                         root     <snipped>   /usr/local/bin/redis-server *:6380        Is there a way to have an output like this:               root     <snipped>   /usr/local/bin/redis-server *:6381 item cache # <== label     root     <snipped>   /usr/local/bin/redis-server *:6380 page cache # <== label      i.e. adding a text label to easily identify what each of those instances is for. Is there a way to do this instead of having to make copies of the binary?


title: iptables rules for iscsi initiator

text: I need to configure `iptables` on my client (iscsi-initiator). From `tcpdump`, I can see that the server (iscsi target) sends `tcp` from port `3260`. So I have added following `iptables` rule on my client (where `10.1.212.51` is the iscsi target):               -A INPUT -i eth1  -s 10.1.212.51  -p  tcp  -m tcp  --dport 3260  -j ACCEPT      but `iscsi` does not work with this rule. Only after I allow all ports, does it work:               -A INPUT -i eth1  -s 10.1.212.51  -p  tcp  -m tcp   -j ACCEPT      Thus my question is, does `iscsi` need some other port as well?


title: How can I "grep" patterns across multiple lines?

text: It seems I am misusing `grep`/`egrep`. I was trying to search for strings in multiple line and could not find a match while I know that what I'm looking for should match. Originally I thought that my regexes were wrong but I eventually read that these tools operate per line (also my regexes were so trivial it could not be the issue). So which tool would one use to search patterns across multiple lines?


title: Geeqie: keyboard shortcut for "up folder"

text: I love Geeqie photo viewer, the best of all I've seen on Linux. However, I'm having problems setting the right keyboard shortcuts. The backspace key acts as "previous photo", but it would be way more intuitive for for it to act as "up folder" shortcut. Where/how can I change that? (couldn't find it in settings->keyboard)


I backed up my raspbian using Win32DiskImager. Later, I noticed that my Raspberry Pi did not boot because the SD card was damaged. I tried to restore the backup but still the Raspberry Pi did not boot. I formatted the card, installed a new raspbian image and everything now works fine. Is there a way to somehow "mount" the image of my backed up old SD card and exctract some configuration files from it without having to boot the Raspberry? Extract configuraiton files from raspbian image


title: bash script with network request in pure lsb environment

text: From what I can understand of LSB documentation, neither wget or netcat are standard tools always available in an LSB environment. Is there some other way to make a http request without being dependent on anything else than LSB?   What would be the most safe tool to be dependent on if I want to make it as simple as possible for users of my tool?


title: How to determine where an environment variable came from

text: I have a linux instance that I set up some time ago. When I fire it up and log in as root there are some environment variables that I set up but I can't remember or find where they came from. I've checked `~/.bash_profile`, `/etc/.bash_rc`, and all the startup scripts. I've run `find` and `grep` to no avail. I feel like I must be forgetting to look in some place obvious. Is there a trick for figuring this out?


title: How to find where is $JAVA_HOME set?

text: I'm a beginner with linux. I'm trying to change the value of $JAVA_HOME & I just can't seem to find in which file is it being set currently. I can't remember where did I set it the last time. Could someone please help me with this & also please let me know where should it actually be set. Already tried How to determine where an environment variable came from but I need(ed) a list of files where the variable can be set.


title: Decreasing hard drive sync time with Unison

text: I'm using Unison to synchronize my music collection to a few different sources, namely a couple computers over SSH and a hard drive. One thing I've noticed is that SSH updates are incredibly _fast_ in comparison to hard drive syncs, possibly because `rsync` (or whatever's running under the hood) is only moving what's changed. Add that to the fact that I can run multiple SSH copy actions at once and copying to a local USB hard drive is left in the dust, as it only copies one file at a time and overwrites the entire file every time. When changing the encoding of ID3v1 tags (for compatibility tests), my entire ~5000 file music library changes needs to be backed up to the other computers and hard drive. Is there any way for me to:   1. increase the number of simultaneous copies; and   2. only copying the parts of the files that have changed?  Here's my Unison profile:               # Unison preferences     batch = false     confirmbigdel = true     copymax = 10     logfile = .unison/unison-music.log     maxthreads = 30     perms = 0     sortbysize = true          root = /home/me/Music     root = /media/truecrypt1/media/music


title: UNIX move file name with sysdate

text: I want to make a script in Unix in which I have to move a file daily to a specific path. In order to avoid overlapping of the file, I want the file name along with the date. e.g. `mv filename /home/bin`.   How can I add the date to the file name?


title: list out owned file/directories and change its permissions

text: Can anyone please tell how can I change files/directories owned by me only. below is the command that list out files/directories owned by me                find . -user <username>


title: Do I have duplicate packages?

text: I'm on linux mint 12, when i run `sudo apt-get update` i see:               W: Duplicate sources.list entry http://www.duinsoft.nl/pkg/ debs/all i386 Packages        (/var/lib/apt/lists/www.duinsoft.nl_pkg_dists_debs_all_binary-i386_Packages)     W: You may want to run apt-get update to correct these problems      FSlint does not find any duplicates in `/var/lib/apt/lists`. When i search `/var/lib/apt/lists` manually, i see 3 files: `www.duinsoft.nl_pkg_dists_debs_all_binary-i386_Packages` size: 3.3 kb `www.duinsoft.nl_pkg_dists_debs_release` size: 2.9 kb `www.duinsoft.nl_pkg_dists_debs_release.gpg` size: 490 bytes This has something to do with java installation. Anyway should i delete any of these files?


title: How to properly use Gentoo Linux as a supplement to an existing distribution?

text: While I originally wanted to entirely replace the Linux distribution my NAS uses, I meanwhile came to the conclusion that it would be better to leave the existing system as unmodified as possible and merely supplement it via Gentoo (or Arch) Linux - which is basically what the answer to the previous question suggested. So currently the only modification to the original system consist of a `/gentoo` directory that I `chroot` into via the following script:               #!/bin/bash     set -e          cp -L /etc/resolv.conf etc/ # for internet access     cp -P /etc/localtime etc/   # to keep the timezones consistent     cp -d /etc/mtab etc/        # to check mounted systems     # cp /etc/{mdadm.conf,hosts,fstab} etc  # Maybe?     mount --rbind /mnt mnt      # use host's mounts     mkdir host; mount --bind / host     mount --bind /var/log var/log # or run own syslogd?          mount --bind /dev dev     mount -t devpts devpts dev/pts     mount --bind /proc proc  # or mount -t procfs proc proc?     mount --bind /sys sys    # or mount -t sysfs sysfs sys?     chroot . /usr/sbin/sshd -p 22222     # chroot . /bin/env -i TERM=$TERM /bin/bash      Now I can simply `ssh` into the host via port 22222 and end up in the `chroot` environment, which basically behaves like Gentoo Linux, and this script can be run from the host's `/etc/init.d/rcS`. But of course I don't want to end up starting every Gentoo service I'd like to use manually that way - that's what OpenRC (or systemd, if preferred) is good for after all. So my major question is > What Gentoo command should `chroot` execute in order to properly "boot" the > Gentoo Linux on top of the host Linux with as little interference as > possible? With as little interference as possible I mean it should not attempt to remount the filesystem (but at the same time it would be nice if Gentoo's `mount` would work correctly) - so simply running `init` is probably not correct, some modifactions to the OpenRC configuration will probably be necessary, but which ones? Additionally, there's the question of host daemons - should I use them or have Gentoo run it's own instances of e.g. `crond` and `syslogd` (and how would they need to be set up in order to not interfere with the host instances?), or should I go even further and entirely virtualize Gentoo? As mentioned in another question it would be neat to have the Gentoo instance have its own IP and more or less behave like an independent system, but on the other hand I'd like to have as little overhead as possible due to the system's limited resources. The host system is running these daemons, plus my thoughts so far:               Daemon           | Use Gentoo's own?     -----------------+---------------------------------------------------------------     udevd            | N bind-mount /dev     klogd, k*        | N using host kernel (although UML might be interesting...)     dhcpd, inetd     | ? depends on using own IP or not     syslogd          | ? bind-mount /var/log or use Gentoo's more versatile settings?     mdadm --monitor  | ? should Gentoo bother with the RAID configuration?     smbd, nmbd       | ? disable host's samba in favour of Gentoo's one? maybe with a                      |   maintenance-only share on the host     crond            | Y to minimize interference with host's maintenance scripts     sshd             | Y to directly SSH into the chrooted Gentoo system     daemonwatch      | ? maybe use host instance to watch Gentoo instance?     logchkd, errormon| ? unknown      Finally, I'd like to know what I should consider on shutdown/reboot - can I simply have the host's shutdown script run `chroot /gentoo /bin/init shutdown` before its own sequence, or could that cause a power off by Gentoo _before_ the host's actual shutdown sequence?


title: i3 Window Manager doesn't allow full screen videos on two monitors

text: I'm currently using i3 Window Manager on Debian Wheezy, and as soon as I open a video in fullscreen (a YouTube video for example), and switch over to my second monitor, i3 reduces the video back to it's original size. Is there anyway of patching this?


title: DD-WRT on WZR-HP-AG300H: Want XFS support; what firmware has kernel 3.8.13-1?

text: I installed latest DD-WRT firmware to my wifi router WZR-HP-AG300H. I got the firmware from here (05-27-2013-r21676). I'm currently trying to install XFS file system support because my USB hard disk is formatted with it, but unfortunately DD-WRT firmware doesn't seem to support it. I found that XFS module can be installed from internet (kmod-fs- xfs_3.8.13-1_ar71xx.ipk). I managed to install libc and opkg (the installer tools), but the module needs kernel 3.8.13-1:               root@DD-WRT:/# opkg install kmod-fs-xfs     Installing kmod-fs-xfs (3.8.13-1) to root...     Downloading kmod-fs-xfs_3.8.13-1_ar71xx.ipk.     Collected errors:      * satisfy_dependencies_for: Cannot satisfy the following dependencies for kmod-fs-xfs:      *  kernel (= 3.8.13-1-c9fbcbc6c04e6f1cd1482e9b879b485b) *  kernel (= 3.8.13-1-c9fbcbc6c04e6f1cd1482e9b879b485b) *       * opkg_install_cmd: Cannot install package kmod-fs-xfs.          root@DD-WRT:/# uname -a     Linux DD-WRT 3.9.4 #322 Mon May 27 03:17:08 CEST 2013 mips GNU/Linux      So, I want to know, what firmware has kernel 3.8.13-1? There are so many revisions and I couldn't find any changelog past 2008.


title: How do I find out what process is consuming pending signals?

text: A user is getting the following message when they try to run a particular program. > timer_create: Resource temporarily unavailable From this StackOverflow Q&A titled: timer_create() : -1 EAGAIN (Resource temporarily unavailable), I discovered that this has to do with running out of space for pending signals. I confirmed this using a separate user account by running this command:               $ ulimit -i 0      and checking that I get the same error, which indeed I do. With this command:               $ ulimit -i 1      or any higher amount there is no error. When the original user runs `ulimit -i` they get 127368. Thus I concluded that they had run out of space for pending signals somehow. What is going on? Does it mean that one or more running programs has consumed these? If so how do I find out which ones?


title: Delete all words surrounded by parentheses with sed

text: How can I do this in `sed`, I have a long long list of things and some are surrounded by a parentheses.               lol     xml     lol     lol (347)     idiot (67)      How can delete `(347)` and `(67)` but for a huge list with numbers and random letters in parentheses? I tried this command, `sed 's/(*)/hshshshshs/g'` but I'm new to `sed`. I was going to just use a text editor to replace `hshshshshs` with nothing, as I wasn't sure `sed` could handle empty lines..


title: FreeBSD reboots during install and leaves invalid install

text: I just downloaded the most recent FreeBSD CD image, and put it in VirtualBox. It looks like it installs fine but then it reboots and boots from the CD image again. When I make it boot from the hard-drive by pressing F12 at VirtualBox's boot splash screen and selecting the hard drive, it says:               gptboot: No /boot/loader on 0:ad(0p2)     gptboot: No /boot/kernel/kernel on 0:ad(0p2)          FreeBSD/x86 boot     Default: 0:ad(0p2)/boot/kernel/kernel     boot: _      What am I doing wrong? Changing the chipset to ICH6 didn't work, increasing the RAM to 512 MB didn't work either. PC-BSD doesn't work either (VirtualBox specific image)


title: Why does `!45` get replaced with `top`?

text: I was trying to a string search within Ubuntu 12.04 which went as follows: `find . -exec grep -l "!45" {} \;` Instead of searching for the string "!45", it was replaced with `top`. It didn't invoke the commmand, but merely start searching for the term "top". Until I figured out `-F` for `grep`, I thought special characters would be treated as text in between quotations. Anywho, now that I've discovered this, **I have no idea what this is, what it's used for, or why it even exists!**


title: Linux network stops when transferring files

text: Running Debian, when transferring files from the server to my pc, the transfer is suddenly interrupted. Some smaller files (couple of MB) seem to work most of the time, but bigger files mostly fail at random points. After the transfer fails, the entire TCP/IP stack seems to be out on the server, even ping doesn't work anymore (every host is unreachable). I tried the follwing:   - Connecting my PC directly to the server, ruling out errors with switches etc in between.   - Trying different client pc's, ruling out a problem with the client pc   - Trying different files from different hard drives on the server, ruling out hard disk issues   - Trying different protocols (ftp, scp, smb), ruling out a problem with a specific protocol or server The problem appeared in any of the above configurations. So I'm leaning towards either a software issue are a hardware issue with the NIC. However, syslog and dmesg doesn't indicate any problems. Ethtool results also seem normal... I'm really out of ideas on what's broken and how to proceed...


title: Redirecting mail to Gmail

text: I'm trying to set up the redirection of all emails to my VPS to my Gmail account because it's easier to handle. At the moment though, it is not working, and I can't see why. I have tried a few solutions from the Internet but none have worked so far (I tell you this because I realize there may be a chance that things are conflicting). My VPS is running on CentOS 5. Postfix is the most popular solution, and this is what I have done:   * Edited /etc/postfix/main.cf to add:               virtual_alias_domains = mydomain.com     virtual_alias_maps = hash:/etc/postfix/virtual        * Created /etc/postfix/virtual and added:              admin@mydomain.com   mygmail@gmail.com     @mydomain.com   mygmail@gmail.com        * Then ran `postmap /etc/postfix/virtual` and `service postfix reload` and `service postfix restart` There is nothing in my `/var/log/maillog` but the only contents is the activity of me restarting the server etc. As a side note, if I send mail from the server command line to `admin@mydomain.com`, it redirects to my Gmail. Am I doing anything obviously wrong? I followed an article to the letter on this and many other articles recommend the same or a very similar process. If you need any more info then I will be happy to give it to you - any help is greatly appreciated.


title: Permanently set kernel parameters [isolcpus] without grub?

text: Is there any way to set kernel parameters in an Ubuntu-based system without relying on grub? (not available in the target environment) Specifically I want to set the isolcpus parameter to dedicate cores to an application. This page titled: "How to permanently set kernel parameters for Oracle on Linux", describes a means of setting kernel parameters in a startup script. Is there a way to set this parameter without a grub-style externally-supplied command line? Can it be done without altering system binaries?


title: What are common rights for /tmp ? I unintentionnally set it all public recursively

text: I have abused `sudo`. I have created a really really short life temporary directory that I wanted to share between some users for a few hours... and I named this directory `/some/path/tmp` Unfortunately I have launched `sudo chown 777 -R /tmp` instead of `sudo chown 777 -R tmp` so my `/tmp` file is now completely public... I use the common `/tmp` pretty often (every day, almost every hour) personally for short life files, scripts, lots of scripts. Is it a security breach now that it is completely set to public? Should I change it back to more secure settings, or like common default settings for a Debian / Ubuntu distro - (I don't know which they were)? What are the common right settings for `/tmp`?


title: Realtek r8169 not working in CentOS 6.5

text: We have recently purchased Gigabyte 990xe-ud3 motherboards. It came with Realtek LAN conroller. However with CentOS 6.5 it is not working, i.e. although it shows that it's connected with network, it is really not. On searching I found r8169 drivers to be likely a problem so I followed remedy given in foxhop.net article about Realtek NIC r8169 dropping packets in Ubuntu and Fedora. But it's still the same. Though Broadcom network card works perfectly. `lspci` output for Realtek card:               4:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06)       Subsystem: Gigabyte Technology Co., Ltd Motherboard       Flags: bus master, fast devsel, latency 0, IRQ 58       I/O ports at d000 [size=256]       Memory at d2104000 (64-bit, prefetchable) [size=4K]       Memory at d2100000 (64-bit, prefetchable) [size=16K]       Capabilities: [40] Power Management version 3       Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+       Capabilities: [70] Express Endpoint, MSI 01       Capabilities: [b0] MSI-X: Enable- Count=4 Masked-       Capabilities: [d0] Vital Product Data       Capabilities: [100] Advanced Error Reporting       Capabilities: [140] Virtual Channel       Capabilities: [160] Device Serial Number 01-00-00-00-68-4c-e0-00       Kernel driver in use: r8169       Kernel modules: r8169      `lspci` output for Broadcom card:               Ethernet controller: Broadcom Corporation NetXtreme BCM5722 Gigabit Ethernet PCI Express       Subsystem: Broadcom Corporation NetXtreme BCM5722 Gigabit Ethernet PCI Express       Flags: bus master, fast devsel, latency 0, IRQ 59       Memory at fe300000 (64-bit, non-prefetchable) [size=64K]       Expansion ROM at <ignored> [disabled]       Capabilities: [48] Power Management version 3       Capabilities: [50] Vital Product Data       Capabilities: [58] Vendor Specific Information: Len=78 <?>       Capabilities: [e8] MSI: Enable+ Count=1/1 Maskable- 64bit+       Capabilities: [d0] Express Endpoint, MSI 00       Capabilities: [100] Advanced Error Reporting       Capabilities: [13c] Virtual Channel       Capabilities: [160] Device Serial Number 00-10-18-ff-fe-ea-59-47       Capabilities: [16c] Power Budgeting <?>       Kernel driver in use: tg3       Kernel modules: tg3      Is there any way to get it working with some other drivers etc?


title: Increasing the time for requests to complete

text: I have a one off web request that I need to send via a Wordpress page hosted on my server. The request takes a long time because it's processing a lot of data; unfortunately, the page returns with an error page before the request has had time to completed. (There's nothing wrong with the request per se; I know, because when I pass it a smaller set of data, it completes with no problems.) My question is: **What settings can I change on the server to increase the length of time that passes before the server kills the request?** So far I have changed these:   * In `/etc/httpd/conf/httpd.conf`: `Timeout`.   * In `/etc/php.ini`: `default_socket_timeout` and `mysql.connect_timeout`.   * In `/etc/my.cnf`: `connect_timeout`, `wait_timeout` and `interactive_timeout` But none of these changes make a difference.


title: Random lag on connection

text: when i try to connect to my friend's server, the connection seems randomly laggy, sometimes it's 50ms, 40ms, 60ms, but sometimes it tooks 1, 3 or 7 seconds               time curl -vv 'http://ipaddress/foo.json'     * Hostname was NOT found in DNS cache     *   Trying ipaddress... --> SLOW AT THIS LINE !!!     * Connected to ipaddress (ipaddress) port 80 (#0)     > GET /foo.json HTTP/1.1     > User-Agent: curl/7.37.0     > Host: ipaddress     > Accept: */*     >      < HTTP/1.1 200 OK     < Date: Tue, 24 Jun 2014 02:51:45 GMT     * Server Apache/2.2.27 (Unix) mod_ssl/2.2.27 OpenSSL/1.0.1e-fips mod_bwlimited/1.4 is not blacklisted     < Server: Apache/2.2.27 (Unix) mod_ssl/2.2.27 OpenSSL/1.0.1e-fips mod_bwlimited/1.4     < Last-Modified: Tue, 24 Jun 2014 02:42:12 GMT     < ETag: "2e8109e-871-4fc8be82affe4"     < Accept-Ranges: bytes     < Content-Length: 2161     < Content-Type: application/json      How could I know which part of the system that causes this? I've tried to disable mod_bwlimited, but the lag still happened I've tried to use another web server (monkey) on another port, it still happened the server:               Linux bar 2.6.32-042stab090.3 #1 SMP Fri Jun 6 09:35:21 MSK 2014 x86_64 x86_64 x86_64 GNU/Linux      Also when I tried to change `/etc/sysctl.conf` and using `sysctl -p` using `root`:               net.ipv4.tcp_tw_recycle = 1     net.ipv4.tcp_tw_reuse = 1     fs.file-max = 524288       It shows:               error: permission denied on key 'net.ipv4.tcp_tw_recycle'     error: permission denied on key 'net.ipv4.tcp_tw_reuse'     error: permission denied on key 'fs.file-max'      Maybe that values was restricted by the hosting company?


title: Command-line incremental backup tools

text: Which command line backup tool(s) has the best compression ratio? I want to backup my entire system, including media files, text files etc. I found this list on the Arch wiki site but I don't know how these tools compare to each other and which one would offer the best compression ratio overall. I realize that different tools might give better results for specific file types, but which tool and using which settings would result in the smallest archive given a mix of various input files?


title: Remove USB flash-drive write-protection

text: I have a sports-watch which has an integrated flash-memory. This flash-memory is used to store training information. When I connect the watch to my computer using the USB cable, it's detected as write-protected flash drive:               [354703.052138] sd 7:0:0:0: [sdc] Write Protect is on      ..and I obviously can't remount the partition with RW rights:               root@T60:~# mount -vt vfat -o rw,remount /dev/sdc1 /media/     mount: cannot remount block device /dev/sdc1 read-write, is write-protected     root@T60:~#       I remembered that `hdparm` had an option to change the readonly flag for a device and as USB flash-drive is detected as an SATA drive, then I gave it a try, but this did not help either:               root@T60:~# hdparm -r0 /dev/sdc          /dev/sdc:      setting readonly to 0 (off)      readonly      =  0 (off)     root@T60:~# mount -vt vfat -o rw,remount /dev/sdc1 /media/     mount: cannot remount block device /dev/sdc1 read-write, is write-protected     root@T60:~#       I guess that the watch is designed in a way that once it detects the USB connection, it triggers the (hardware) USB write-protection switch? Is such hardware write-protection part of the USB standard? Or is there something left to try?


title: "mv" command-- file vanished into non-directory

text: I was attempting to utilize the `mv` command to move a file onto a remote server. I ended up executing the command...               mv sqlreport.php myuser@mywebsite.org      Unfortunately, this did not work. Worse, my file seems to have disappeared. A new file, `myuser@mywebsite.org`, has appeared, but it is not a directory (In that I cannot `cd` into it). Any tips on where my file may have gone, and how to rescue it?


title: Can't boot properly after moving all files off then back on my VM drive

text: I have created an Ubuntu 12.04 32-bit VM in VirtualBox with a .vdi disk. I then mount this disk with qemu-nbd and move all the files off it; then back onto it. When I boot the VM again I get varying results:   1. Ubuntu tells me there has been an error and asks if I would like to fix/skip/ignore/manual fix. If I fix, it will restart and boot to a tty. If I ignore it will boot to a tty. I haven't tried skip/manual fix yet.   2. Boot to a blank purple screen. Freeze. On subsequent resets, boot to a blinking text cursor.   3. Boot to the Ubuntu splash screen, freeze. On reset, see number 1 in this list. **My question is** : why does this happen? Is there some disk hardware address in Grub referencing /boot/? Is there a way to remove and replace files in the VHD without having this problem? **How to reproduce this result (I hope):**   1. Create a VM in VirtualBox using an 8GB .vdi virtual disk (called ub.vdi, for the purposes of the rest of the question)   2. Boot with the Ubuntu 12.04.3 32-bit install ISO   3. "Try Ubuntu".   4. Set up an MSDOS partition table and two primary partitions, a 2048MiB swap space, the rest an ext4 partition. (Used gparted).   5. Install Ubuntu on the ext4 partition   6. Shut down the VM   7. Navigate to your VM directory and run the following script: * * *               #!bin/bash     # load the nbd module     sudo modprobe nbd     # make a folder for our virtual disk files     mkdir os_files     # load the virtual disk as a device (nbd0)     sudo qemu-nbd -c /dev/nbd0 ub.vdi     sleep 1     # create a directory and mount the os partition to it     MNT_DIR=$(mktemp -d)     sudo mount /dev/nbd0p2 $MNT_DIR     # move the os files off, then back onto the virtual disk     find $MNT_DIR -maxdepth 1 -mindepth 1 | xargs -I{} sudo mv {} os_files/     find os_files/ -maxdepth 1 -mindepth 1 | xargs -I{} sudo mv {} $MNT_DIR     # clean up     sudo umount $MNT_DIR     sudo qemu-nbd -d /dev/nbd0     rm os_files/ $MNT_DIR -r     unset MNT_DIR      **Why are you doing this?** As part of a contractual requirement, I need to store the virtual disk in version control. Having an enormous binary blob (virtual disk) in version control is a pain, mostly for clone(git)/checkout(svn), but also for diffs. I have considered splitting to multiple files, but I need to be able to manipulate the OS/data extracted in (5) above. Note that my VCS repository still needs all the information required to build a complete VM. See also: http://superuser.com/questions/641971/manual-clone-recreate-virtual- disk. Apologies if posting again seems untoward/ungrateful/not-idiomatic/rude whatever; the answers I received at SU, while useful, simply lacked the expertise to actually solve my problem. Please do note that the question I've asked here is a little more specific than the linked one, but any ideas that circumvent the problem entirely are more than welcome.


title: How to secure CentOS and FreeBSD by disabling USB ports and VGA output on-site?

text: Is it possible to disable USB ports and CDRom and VGA output in the Dell R310 from CentOS or FreeBSD (without BIOS)? A demo server is running in a customer test laboratory, where they can simply get inside by plugging in a monitor and a USB keyboard and mouse, which I do not want. Is there any CentOS/FreeBSD way to block all the USB ports and VGA output? And only keep open the serial console port/ethernet to maintain and use?


title: splitting textfiles according to a regular expression

text: By pasting into a text editor, I have a textfile gleaned from an online edition of Wilhelm's Yi Jing translation which I now want to split into 64 unequal parts, according to the 64 hexagrams of the Yi Jing. Since the passage for each hexagram begins with some digit(s), a period, and two newlines, the regex should be pretty easy to write. But how do I actually split the textfile into 64 new files according to said regex? Can I pipe a `sed` command to `split`? (That just doesn't seem like it would work. It seems like more of a task for `perl`. But maybe there's a more obvious way that I'm just totally missing.)


title: How can i dump /tmp/files in CentOS to Dropbox using crontab?

text: How can i dump files from my CentOS box to Dropbox account? As regular nightly backup task.


title: How to mount a USB stick in FreeBSD?

text: I am running a FreeNAS (FreeBSD version) on a DELL R310, but when I connect a USB stick it does not automatically get mounted. The same stick does get automatically mounted in CentOS/Fedora. How do I troubleshoot this and make it work?


title: Which FreeBSD version or ISO for Dell R310?

text: When I try to install FreeBSD I always get confused as to which iso is the correct one for Rack mounted servers. In their download choices, there are too many versions of FreeBSD Which one is the correct one to burn in CDROM or USB drive to install?


title: OpenLDAP: how can I list active schemes, classes etc?

text: I'm using `openldap-server-2.4.38_1` on `FreeBSD 9.1-RELEASE-p5`. 1) can I get list of active (connected) schemes without viewing `slapd.conf` file? 2) how can I get description of `obectClasses` and/or it's `attributes` in this schemes whiout viewing scheme file? So - it there any pre-builded utils (I mean utils like `ldapsearch` etc), or - something external scripts like `ldapscripts`? Or may be I can obtain this info directly from `ldapshell` or `phpldapadmin` (but I don't like use utils with web-interface...)?


title: Cygwin DenyHosts daemon-control file: no such file or directory error

text: I have been trying to figure out this error and searched everywhere with no luck. I have installed DenyHosts on Cygwin and also the DenyHosts daemon but when I try to start the daemon by typing:               cygrunsrv -S DenyHosts      I get the following error in my DenyHosts.log file:               C:\Program Files\Python33\python.exe: can't open file '/usr/share/denyhosts/daemon-control': [Errno 2] No such file or directory      I have checked the above path to daemon-control and the file is there. Any ideas?


title: Lftp & Mirror, comma added in the folder name

text: I need to upload my local website to my ftp server. I am exploiting the good **lftp** in the following way. This is my script **upload.sh** :               #!/bin/bash     HOST="ftp.xxxsite.it"     USER="xxxuser"     PASS="xxxpass"     TARGETFOLDER="/target/test"     SOURCEFOLDER="/home/source/test"          lftp -f "     set ftp:ssl-allow no;     open $HOST     user $USER $PASS     lcd $SOURCEFOLDER     mirror --reverse --delete --verbose --only-newer $SOURCEFOLDER $TARGETFOLDER"      which I call with the line command               bash upload.sh      But:   1. I get an error: source: Is a directory (already asked here, but no answers)   2. The directory is correctly uploaded, unfortunately in a **test;** folder (yes, with final comma). Where does it get that comma? I couldn't find a way to remove it I need help to solve this, I almost tried everything, except the final solution of course. Please note that I create a new question because my main problem is the ';' and I think the two issues are related.


title: mysql replication not working

text: I have two servers A and B I tried to setup replication between two servers for fixed dbs DBA and DBB but it's not working my configurations Tables are not getting updated why??               Master:(/etc/my.cnf)     server-id=4233865     log-bin=mysqld-bin     log-error=mysql-bin.err     relay-log=mysqld-relay-bin          Slave:(/etc/my.cnf)     symbolic-links=0     server-id=1359390567     relay-log-index = slave-relay-bin.index     relay-log   = slave-relay-bin     replicate-do-db=DBA,DBB      Show Slave Status               Slave_IO_State  Waiting for master to send event     Master_Host     10.0.0.163     Master_User     repl     Master_Port     3306     Connect_Retry   60     Master_Log_File     mysqld-bin.000007     Read_Master_Log_Pos     770800     Relay_Log_File  slave-relay-bin.000017     Relay_Log_Pos   770947     Relay_Master_Log_File   mysqld-bin.000007     Slave_IO_Running    Yes     Slave_SQL_Running   Yes     Replicate_Do_DB     DBA,DBB     Replicate_Ignore_DB          Replicate_Do_Table       Replicate_Ignore_Table       Replicate_Wild_Do_Table          Replicate_Wild_Ignore_Table          Last_Errno  0     Last_Error       Skip_Counter    0     Exec_Master_Log_Pos     770800     Relay_Log_Space     1134838     Until_Condition     None     Until_Log_File       Until_Log_Pos   0     Master_SSL_Allowed  No     Master_SSL_CA_File       Master_SSL_CA_Path       Master_SSL_Cert          Master_SSL_Cipher        Master_SSL_Key       Seconds_Behind_Master   0      Master Status               mysql> show master status;     +-------------------+----------+--------------+------------------+     | File              | Position | Binlog_Do_DB | Binlog_Ignore_DB |     +-------------------+----------+--------------+------------------+     | mysqld-bin.000007 |   608837 |              |                  |     +-------------------+----------+--------------+------------------+     1 row in set (0.00 sec)      And I am able to login with the replication user I created in Master from Slave. for the user I gave `REPLICATION_SLAVE on % PERMISSIONS`. Am I missing out anything. `No Error in Logs` **UPDATE** Processes ID User Host Database Command Time Status SQL query (Kill) (2) (system user) (None) (Connect) (149410) (Waiting for master to send event) (---) Kill 1 system user None Connect -38185 Slave has read all relay log; waiting for the slave I/O thread to update it --- As you can see SQL query is always --- why??


title: Send email written in markdown using mutt

text: Sometimes I need to send a fragment of code on google-group inline. Text does not help here; I can type it in markdown, convert it to html (using pandoc etc.), attach to mutt as `text/html` and send it. There is one good solution available here but it uses external `sendmail` program to send email. I am using mutt which has capabilities to send emails ~~over IMAP~~ by itself.


title: "Last" command: How to show latest user login?

text: As I know, the `last` command shows recent logins by all users. But my PC (CentOS) has been used for roughly a year, and there are many users logged. I tried to used the `last` command, but it just showed from June 2013 to September 2013. **My question is:** how can I show the latest users that have logged in recently, say (December 2013 through Jan 2014)?


title: Unwanted 32 bits audio sample type with default codecs

text: I'm running a fresh Debian sid / KDE with Pulseaudio and the VLC/Phonon backend (default). When I play a (16 bits) mp3 file with most of my players (VLC/cVLC, SMplayer, Juk, etc), the Pulseaudio manager `paman` states a f32l (32 bits) stream. The sink itself is 16 bits. When I play the same file with `mplayer` in xterm, the stream is in the correct sample type (16 bits). Same with Spotify. VLC throws a mysterious > mpgatofixed32 audio converter debug: mpga->f32l But I can't dig useful information from it. Nothing relates to this in VLC configuration. I suspect the VLC Phonon backend, but it has no kind of configuration. I tried with the Gstreamer backend but no luck. I've checked `/usr/bin/start-pulseaudio-kde` but nothing related. I've greped fl32 and float32 in ~ and /etc but nothing. My `/etc/pulse/daemon.conf` has               default-sample-format = s16le      Output of /etc/asound.conf :               pcm.!default {       type pulse     }     ctl.!default {       type pulse     }     defaults.pcm.dmix.!rate 44100     defaults.pcm.!rate_converter "samplerate_best"      But it's the same with or without it. Does it come from the mp3 codecs ? Is it possible to configure them ? It's hard to find information on playback configuration.


title: Are lock, mutex, and semaphore for between threads or between processes?

text: I think lock, mutex, semaphore are used for synchronized multiple (threads or processes?) to access something simultaneously. Must this "something" be some shared memory between multiple (threads or processes)? If yes, does that mean lock, mutex, semaphore are only used for multiple threads of a process, not for multiple processes, because multiple processes don't share memory, while multiple threads of the same process do? Thanks.


title: What is the alternative to using metamail with nmh?

text: In nmh, mhshow calls `/usr/bin/metamail` by default. Is there an alternative for this, since metamail has been deprecated in Debian since etch?


title: Get environment variable of other user

text: Is there a way I can see the environment variable of an other user? I want to do that as root, so permissions won't be a problem I guess. For the user himself, I use `echo $PATH` or `set | grep PATH` (or `set` when I don't remember the variable name). What would be a similar instruction for an other user? For what it's worth, I'm on Ubuntu Server 13.04.


title: How to change search result highlight in vi?

text: The scenario: I log on a server using ssh, and search for keywords in a log file using `vi`. The problem: at the moment, the results of a search is only highlighted by a cursor `_` below the searched word, which is not very easy to find on a screen of log messages. The question: how can I change the highlighting of the search results to something more noticeable? e.g. different background and foreground colors on the whole word.


title: Reboot and zero drive

text: Is it possible to issue one command that will both reboot, boot to an external live drive or something similar, and then zero a hard drive?


title: Set new default file manager in firefox on Archlinux

text: I'm trying to use Dolphin as file chooser for Firefox in Archlinux instead of Nautilus. I've read this but it did not solve my problem. The config seems related to firefox as               xdg-mime query default inode/directory     dolphin.desktop      Which is right. Also               cat /usr/share/applications/mimeinfo.cache | grep  x-directory/gnome-default-handler     x-directory/gnome-default-handler=kde4-dolphin.desktop;      Seems to be right too. What am I missing?


title: Unable to connect to a wifi network with a special SSID

text: My current wifi network (and i'm writing this with the help of Windows -.- ) has a special character in it's SSID: "ö", a so-called "umlaut". If changing the SSID is not an option, how to connect to such a network? This does not work with Ubuntu 12.04 or Android 2.3.6 or Android 4.0, so I guess it's a general Linux problem. The network adapter is a "Broadcom 4313". **[Update]** The problem is, that the network is **hidden**. Both Android and Ubuntu fail to interpret the manually entered SSID string correctly. However both systems can see the network, if it's not hidden. Ubuntu sees the SSID name correctly, Android fails at the umlaut "ö" and misses the following two characters too, (so instead of "[some characters]örc[some other characters]" it sees "[some characters] [some other characters]"). So it's the combination of hidden SSID and special-character-SSID that causes the problem. **[/Update]**


title: Unix Shell Scripting output to an Excel File

text: I have a Shell script with Multiple SQL statements like this:               select Count(*) from Emp where date= current_date-1;      After executing the Shell script i need a MS excel file to be create with Column name (as shown below) and result in my local system and also it has to be mailed to my mail id. Ms Excel File:               X(Table name)  - Eg: Emp     Result set           120      Can anyone help me on this ??


title: Is it possible to make a chroot -bind with debian under mac os x lion?

text: Within Linux (e.g. Ubuntu), it is possible to mount partitions like `/home`, `/etc`, `/lib` from another Linux machine and bind them to `/proc` `/sys` `/tmp` to the host's to actually take control of the mounted non-booted linux system. i.e using the other one as host. This can be done with `mount -bind bla bla bla` and the `chroot` command. The question is, is it possible to do this within Mac OS X as host? With this we could forget fink and macports and have a completely debian distro working on Mac OS X. Any ideas to achieve this?


title: Using X11 Displays through Terminal.app commands : generic mapping tools

text: I am trying to figure out why I can't use ghostscript or ghostview (or any other X11 applications) when I try to call them in the Terminal. I am using `bash`, and I also used Fink to get the packages I need. I am using GMT (generic mapping tools), and the commands within this `gmt` package that don't need x11 run perfectly fine, but when I try to display a postscript, using either the command `$ gs` or `$ gv`, I get these error messages, respectively: `gv: Unable to open the display.` and `GPL Ghostscript 9.10: Cannot open X display ':0'.` `**** Unable to open the initial device, quitting.` I have tried many edits that I've found online, such as adding editing the `~./profile`, as shown below:               test -r /sw/bin/init.sh && . /sw/bin/init.sh          . /sw/bin/init.sh     export DISPLAY=:0      The saving grace here is that if I run the same commands from `gmt` in xterm (the terminal in X11), the graphic I need is created just fine. All I want to do is have X11 called through the terminal, but right now, I cannot get it working.


title: Is there an easy way to stop and reissue a command?

text: I am doing Node.js development in Ubuntu and I'm curious if there is a way to quickly stop and restart a node server. I run this command to start my app: > $ node app.js When I make changes to app.js I have to restart the server. To stop it I have to use CTRL-C followed by UP and then `enter` to reissue the startup command. Is there a faster way to do this? It doesn't seem like much until you're making many minor changes and needing to restart a lot.


title: How to beat GRUB2 into submission?

text: I have tried GRUB2 on different Ubuntu releases (12.04 and 13.04) on several machines and no matter what I do I can't get it to behave. It seems like a great idea (abstracting away configuration files through a CLI), but it really does not work for me. Here's a simple example:               $ grub-set-default 'Ubuntu, with Linux 3.5.0-45-generic'     $ grub-editenv list     saved_entry=Ubuntu, with Linux 3.5.0-45-generic     $ update-grub && reboot     #.... wait for reboot....     $ uname -r     3.8.0-29-generic      I've tried editing `/etc/default/grub` as well as `grub-reboot`, and adding `GRUB_DEFAULT=saved` but with zero success. I normally end up shuffling the order of configuration files in `/etc/grub.d` to do what I need. Obviously, editing a `menu.lst` was much preferred to this shenanigans. Has anyone had any of these features work? Did it take any tricks? I find it hard to believe that this could be broken this horribly and I feel that I'm clearly missing something.


title: relation between chmod and sudo on an executable file

text: What is the relationship between `chmod` and `sudo` on an executable file for a user? Are the cases that "a user needs sudo to run an executable" the same as the cases that "chmod hasn't set the execution mode bit for the user"? Are the cases that "a user doesn't need sudo to run an executable" the same as the cases that "chmod has set the execution mode bit for the user"? More specifically,   1. For an executable file, If `chmod` doesn't set its execution permission for a user, must that user run the executable with `sudo` or `su`?   2. if `chmod` sets its execution permission for a user, does that mean that the user can run the executable without `sudo` or `su`?   3. How do you make an executable runnable only with `sudo` or `su` by a given user?   4. Conversely, if a user can run an executable only with `sudo` or `su`, does that mean `chmod` hasn't set execution permission of the executable file for the user?


title: Read only new parts of a file?

text: I have a large CSV file, that grows by some entries every day (created by an external software which writes always to this one file, no splitting possible). For performance reasons and further processing I only want to read the new data. Is there some command line tool, that allows me to define a starting offset for reading from a file and works good for these things?


title: For a given directory, how do I concatenate the tail end of recently modified files to a new file?

text: In case there's a better solution to the problem, my goal is to be able to quickly analyze ALL recent apache activity in /usr/local/apache/domlogs. The usefulness of this is when the server load is going through the roof I want to quickly see which website(s) are getting hammered (and what URLs) without having to individually grep/awk everything in domlogs. For example, I know I can get a list of the very recently active apache access domlogs using this command within the domlogs directory:               find -regex '.*\.\(com\|org\|net\|biz\|info\)' -mmin -1      Now what I'd like to do is concatenate the tail 1000 lines of each of those files into a new file so I can quickly analyze it and see where all the traffic is coming from.


title: Select drive partition table in preseed file automated Debian install

text: I am using a preseed file for my Debian installs. I am using 1TB drives, and I would like to use MS-DOS partition tables. It is defaulting to GPT. Is there a way to choose which type of table to use in the preseed file?


title: moving a (file | directory) while avoiding filename collisions

text: I have a bash script that moves files from a number of different locations to a folder named `completed`. I want to avoid overwriting previous files, so in the case when the name of a file (for example, `Selection Of Recipes.zip`) I want to move is already in `completed`, add a nonce or other string to the filename to differentiate (`Selection of Recipes-???.zip`, where `???` is a random string). Is this possible with just `mv`, or should I try creating another bash script with arguments that handles that aspect? Does anyone have a bash script that I can pattern my own against? I'm still a newbie with bash scripting, so I'd rather not re-invent the wheel.


title: Traffic segmentation for a particular subnet

text: Two questions is it possible to segment traffic for a particular subnet to use an interface and at the same time receive traffic from a different subnet via the same interface? This is the scenario. Sitting at home on my laptop I want to vpn into my office to be able to connect to the servers there using wlan0 but without adding another interface I also want all the rest of my traffic to use wlan0 to connect to the internet instead of routing it to the office first. Is this possible? If so w


title: Difference between Debian 7.1 and Linux Mint 15 Debian

text: What is the main _difference between Debian 7.1 and Linux Mint 15 Debian_ besides _look and Desktop Environment_. Basically with a special reference to **security stability, and updates** if you are going to use the machine as as server. Themes, colors, desktop environments, ease of use do not have anything to do with the answers.


title: What is the CSS selector for GtkSearchBar?

text: I've been trying to customize the Elementary GTK3 theme (I'm using elementary OS), and would like to have different padding each for `GtkEntry` and `GtkSearchBar`. I set the padding for all `GtkEntry` type widgets using:               *.entry {         padding: 4px 5px 4px 10px;     }      However, this seems to affect both the `GtkEntry` and `GtkSearchBar`.   ![enter image description here](http://i.stack.imgur.com/uqLf5.png)   ![enter image description here](http://i.stack.imgur.com/FdElC.png) The extra space before the search icon in `GtkSearchBar` could sure be done without. What I want is, the `GtkEntry` to have a `10px` padding to it's left as shown in the picture, and `4px` padding to the left of the `GtkSearchBar`.   How do I do this? I couldn't find a css selector (like `GtkComboBox.combobox- entry .entry`) meant specifically for a `GtkSearchBar`.


title: KVM reports strange CPU usage peaks (bash infinite recursion)

text: On a KVM machine running Fedora 20 I ran `ulimit -s unlimited` (this removes limit on stack size) and an experimental ~~torturing~~ testing script. All this script does is just infinite recursion:               #!/bin/bash          fn() {         true         fn     }          fn      What I expected was that CPU usage would go to 100%, and after some resource depletion (which could take long time), the bash would be eventually shot down by kernel. But what really happened is somewhat strange and I don't have the right knowledge to explain:   * Inside the VM, top reports 100% CPU usage by this funny script. That makes sense.   * But from outside, virt-manager shows 0% no CPU usage, expect for recurring sharp 100% peaks. And as if that was not strange enough, the delay observed between each consecutive peaks is growing (eventually the delay stops growing and becomes coinstant): ![CPU usage peaks](http://i.stack.imgur.com/sVL19.png) Why is this? What is actually happening inside? Or is the usage reported by virt-manager misleading? Then what creates the pattern seen between the peaks?


title: Bundling of dependencies with shell scripts

text: Shell scripts often have to depend on tools that may not be installed on the users' computer. To circumvent this problem, many scripts have multiple fallbacks. IMO doing such things only leads to complex code, and it is not uncommon to find a large chunk of the script just devoted to compatibility reasons. Why couldn't be the dependencies just be included in the script? The script could include these programs (as an appended compressed section, like `makeself` does), and simply use them while running? To clarify, of course this does not apply to things like `wget` and `curl`; the code for each would be minimal in that case. I'm talking about scripts that involve GUIs, and there's a lot of code to support such programs (`zenity`/`yad`/`xdialog` etc.), which involve wildly different syntaxes. Is there a reason why the above isn't done?


title: File backed, locked shared memory and disk interaction

text: Varnish, a HTTP accelerator, uses a ~80MB file backed SHM log that is mlock()ed into memory. The Varnish docs recommend to store the file on tmpfs to avoid unnecessary disk access. However if the entire file is locked into memory, does the Linux kernel still write to the backing file? I tried to monitor this using inotify and fatrace, however since this interaction presumably happens all inside the kernel, no file activity was visible to these tools. There is clearly some kind of update happening either to the file or the filesystem, as monitoring the backing file with ls showed the file time changing, and sha1sum showed the contents were changing, but does this actually involve disk access or is it all happening in memory? Basically I'm trying to avoid having to do the tmpfs workaround, as using SHM to back SHM seems like an ugly workaround for a problem that might not even exist.


title: Clone hard disk while PXE booting

text: I would like to boot a PC from the network (e.g., PXE), then let the PC clone its hard disk from an image located on a server, then boot from the hard disk. Is it possible? FAI (fully automatic install) seems not to support cloning an entire image. Another solution I found would be to use dd and netcat for cloning over the network. However, I would have to somehow first boot a minimalistic system that has dd and netcat available, then clone, then re-boot from hard disk. Is this possible? Is there a simpler solution?


title: Installing php5-cURL on Backtrack leads to dependencies issues

text: I am trying to install a program called Glype on my computer for a proxy. I am using Backtrack 5 R3 and I have the latest version of Apache running on it. The problem I have is that Glype needs cURL to run and when I try to install cURL using: "apt-get install php5-curl" it displays an error. It says-               Some packages could not be installed. This may mean that you have     requested an impossible situation or if you are using the unstable     distribution that some required packages have not yet been created     or been moved out of Incoming.     The following information may help to resolve the situation:     The following packages have unmet dependencies:       php5-curl: Depends: php5-common (= 5.3.2-1ubuntu4.9) but 5.3.2-1ubuntu4.17 is to be installed      So is there a way that I can install it without having any errors?


title: Missing 'which' executable on CentOS

text: We booted up our CentOS (6.4 Final, kernel version 2.6.32.... i686) VM today (running on a Windows machine, yeah I know...) and for some bizarre reason the 'which' binary has gone missing. (Last week, everything was fine). `ls -la /usr/bin` shows no `which`. Although another strange thing: there was a 'which-nodejs' symlink which pointed to a file that's missing. We since re- installed Node.js though (no 'which-nodejs' now, but it didn't help). We just noticed we're also missing the 'clear' command. Please might anyone be able to suggest a way we could get 'which' back, without reinstalling everything?


title: string having doublequotes in between apart from the enclosing quotes

text: I have a requirement. My CSV file has a string `"Testurteil "sehr gut""` and I need to load this file (into `redis`) without removing the quotes, _or_ I want it this way: `Testurteil "sehr gut"`, even if it has the closing quotes it's fine. Can any one help me in this?


title: Remove pauses greater than x from pcap file

text: I've captured udp traffic to a pcap file. When replaying with `tcpreplay- edit`, I'd like to shorten all pauses (where there is no udp traffic at all) to `x seconds` max. `tcpreplay-edit` only has a global speed multiplier. Is there any automated way to do this? Ideally without resorting to guis like `wireshark`, but any solution is welcome.


title: Why tracepath and chrome use different gateway

text: System: Archlinux latest Softerware: NetworkManager My route table               Destination     Gateway         Genmask         Flags Metric Ref    Use Iface     default         10.3.0.9        0.0.0.0         UG    0      0        0 tun0     1.0.1.0         192.168.2.1     255.255.255.0   UG    5      0        0 enp0s26u1u3     1.0.2.0         192.168.2.1     255.255.254.0   UG    5      0        0 enp0s26u1u3     1.0.8.0         192.168.2.1     255.255.248.0   UG    5      0        0 enp0s26u1u3     1.0.32.0        192.168.2.1     255.255.224.0   UG    5      0        0 enp0s26u1u3     1.1.0.0         192.168.2.1     255.255.255.0   UG    5      0        0 enp0s26u1u3     1.1.2.0         192.168.2.1     255.255.254.0   UG    5      0        0 enp0s26u1u3     1.1.4.0         192.168.2.1     255.255.252.0   UG    5      0        0 enp0s26u1u3      I connect to a vpn in USA (I am living in China myself). And add some ip range by using `route add xxx.xxx.xxx.0/13 via 192.168.2.1 metric 5 ` Then I tracepath an Chinese website: http://taobao.com               $ tracepath taobao.com                                                            1?: [LOCALHOST]                                         pmtu 1500      1:  192.168.2.1                                           4.209ms       1:  192.168.2.1                                           3.692ms       2:  no reply      3:  183.128.112.175                                       9.918ms pmtu 1492      3:  183.128.112.1                                         8.514ms       4:  61.164.22.98                                         10.032ms asymm  5       5:  61.130.126.22                                        11.133ms asymm  6       6:  183.136.160.150                                      14.151ms       7:  no reply      8:  no reply      9:  no reply     10:  no reply      It goes the gateway expected (my router ip). But When I visit taobao.com > It's very slow and the site says I am in America. What's the difference between `tracepath` and `chrome`? Can I make chrome use the default gateway?


title: xrandr-mediated correction of VGA overscan on external computer monitor

text: When I employ an external monitor (Dell E207WFP) as the display device for my laptop computer, about 10 pixels are truncated from the left edge of the screen, which I believe is a consequence of a phenomenon known as overscan (the monitor is connected to the computer by VGA). I have several accessible resolutions: 1680x1050 (60.0 Hz), 1280x1024 (75.0 Hz), 1152x864 (75.0 Hz), 1024x768 (75.1 Hz), 800x600 (75.0 Hz), 800x600 (75.0 Hz), and 720x400 (70.1 Hz). I have elected to use the highest resolution, which is the default and also the highest resolution supported by this monitor. Scaling down to a lower resolution resolves the overscan problem but is undesirable. I seek a solution that diminishes, to the lowest possible extent, the resolution of the display. I have tried to rectify the overscan problem by shifting the display by 10 pixels to the right with a concomitant rescaling of the output to ensure that a truncation of pixels from the right side of the screen does not ensue. However, I have not experienced success by tweaking the x/y rescaling value in the 2D affine transformation used by the `xrandr --transform` utility. Regardless of what these values are set to, the display suffers from right- sided pixel truncation if I invoke a rightward shift of the display. I use a command of the following form:               xrandr --output VGA1 --transform 1,0,-10,0,1,0,0,0,1      The `-10` refers to the translation (in pixels) of the display along the x-axis (negative values move the display rightward). The first two parameters set as `1` indicate that no re-scaling is applied to the x-axis (field 1) or y-axis (field 5). I have tried using larger (e.g., 1.05) or smaller (e.g., 0.95) scaling factors but in all cases, the display becomes overscanned on the right edge. If someone could tell me what set of values might produce the desired effect, or propose an alternative solution, I would be grateful. Should it be of use in resolving this issue, the full output of `xrandr --query` is given below:               Screen 0: minimum 320 x 200, current 1670 x 1050, maximum 8192 x 8192     LVDS1 connected (normal left inverted right x axis y axis)        1366x768       60.0 +        1360x768       59.8     60.0          1024x768       60.0          800x600        60.3     56.2          640x480        59.9       VGA1 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 430mm x 270mm        1680x1050      60.0*+        1280x1024      75.0     60.0          1152x864       75.0          1024x768       75.1     60.0          800x600        75.0     60.3          640x480        75.0     60.0          720x400        70.1       HDMI1 disconnected (normal left inverted right x axis y axis)     DP1 disconnected (normal left inverted right x axis y axis)


title: start-stop-daemon not working as expected, no pid file was written

text: I'm trying to control a python based program (which doesn't detach itself from console)               #!/bin/bash          user=nobody     pid=/var/run/xx.pid     name=xx     prog=/xx.py          case $1 in         start)             /sbin/start-stop-daemon --start -b --oknodo --user "$user" --name "$name" --pidfile "$pid" --startas "$prog" --chuid nobody -- --daemon             ;;         stop)             /sbin/start-stop-daemon --stop --oknodo --user "$user" --name "$name" --pidfile "$pid" --retry=TERM/5/KILL/1             ;;         restart)             ;;         *)             ;;     esac      The start part works fine. I can see the script up and running, but the stop part doesn't. It simply says `No xx found running; none killed.` So I guess there's something wrong with the start part?


title: Insert mode in all windows in VI

text: Suppose I am using `vim` with two or more files opened in split-screen mode. The open files are very similar, and I want to perform a few identical changes to all files. I already know of               :windo set scrollbind      to have the windows scroll in the same way. My question is the following: is there a method to enter insert mode in all windows. Or, if not, to copy all latest actions to a different window. The result should be that some edit is the same in all open files.


title: Sync writes very slow. Ubuntu 10.10, 32 bits, ext4

text: I am running ActiveMQ on my Macbook Pro that runs Ubuntu 10.10, 32 bits with an ext4 partition.               Linux iker-laptop 2.6.35-23-generic-pae #40-Ubuntu SMP Wed Nov 17 22:32:51 UTC 2010 i686 GNU/Linux      If I enable persistence in ActiveMQ the performance drops terribly. I've tested the same thing on other machines and the difference is of 2 orders of magnitude. There is a tool with activeMQ to test the HD, here are the results:               iker@iker-laptop:~/apps/apache-activemq-5.4.1$ java -classpath lib/kahadb-5.4.1.jar org.apache.kahadb.util.DiskBenchmark           Benchmarking: /home/iker/apps/apache-activemq-5.4.1/disk-benchmark.dat     Writes:        146171 writes of size 4096 written in 11.074 seconds.       13199.477 writes/second.       51.560455 megs/second.          Sync Writes:        197 writes of size 4096 written in 10.006 seconds.       19.688187 writes/second.       0.07690698 megs/second.          Reads:        5589861 reads of size 4096 read in 10.001 seconds.       558930.2 writes/second.       2183.321 megs/second.      Performance for Sync Writes is s**t. There must be something misconfigured, but this is the only app where I've noticed a HD performace issue. hdparm throws expected values:               iker@iker-laptop:~$ sudo hdparm -tT /dev/sda          /dev/sda:      Timing cached reads:   6282 MB in  2.00 seconds = 3141.73 MB/sec      Timing buffered disk reads:  240 MB in  3.00 seconds =  79.88 MB/sec


title: Linux and CPU usage

text: What does it mean for a core to run at different loads in different moments? How does a 10% load differ from a 90% load? How is this number calculated, essentially?


title: sending text input to a detached screen

text: I'm trying to run a minecraft server on my unRAID server. The server will run in the shell, and then sit there waiting for input. To stop it, I need to type 'stop' and press enter, and then it'll save the world and gracefully exit, and I'm back in the shell. That all works if I run it via telnetting into the NAS box, but I want to run it directly on the box. this is what I previously had as a first attempt:               #define USER_SCRIPT_LABEL Start Minecraft server     #define USER_SCRIPT_DESCR Start minecraft server. needs sde2 mounted first     cd /mnt/disk/sde2/MCunraid     screen -d -m -S minecraft /usr/lib/java/bin/java -Xincgc -Xmx1024M -jar CraftBukkit.jar      MCunraid is the folder where I have the Craftbukkit.jar and all the world files etc. If I type that screen line in directly, the screen does setup detached and the server launches. If I execute that line from within the script it doesn't seem to set up a screen for stopping the server, I need to 'type' in STOP and then press enter. My approach was               screen -S minecraft -X stuff "stop $(echo -ne '\r')"      to send to screen 'minecraft' the text s-t-o-p and a carriage return. But that doesn't work, even if I type it directly onto the command line. But if I 'screen -r' I can get to the screen with the server running, then type 'stop' and it shuts down properly. any guidance here? As far as I can tell (linux noob), the command formatting is ok, but the screen doesn't seem to be hearing me. The server runs well if I telnet in and do it manually, just need to run it without being connected from my remote computer.


title: How to send a message in Minecraft before rebooting the server?

text: I have a Ubuntu Linux Server 14.04 LTS which is running a Minecraft server.   I want it to reboot every 6 hours. I have that now and after the reboot, it starts the Minecraft server. Now what I want. I have the server console in a screen session named cds_screen. Is there a way to do something like `screen -d -r cds_screen && say Server is restarting && sudo reboot`?   The server runs as jebg user and not as root so can anyone help me?


title: Unable to 'stuff' commands into a created 'screen' immediately after creating it

text: > **Possible Duplicate:**   >  sending text input to a detached screen With reference to the answered question: Sending input to a screen session from outside I am trying to write a script that will create a `screen` and then `stuff` input (in my case, UNIX commands) into the shell that I want it to execute. Here's what I have till now:               $ screen -dmS new_screen bash          $ screen -S new_screen -X stuff "cd /some/path/     some_script_file.sh     " <--This new line is required to execute the above command.      $ # Note: See comments. We could insert the newline character instead of 'hard-coding' a newline string literal.      For some reason, the screen gets created fine and enters the `bash` shell. But the `cd` and `some_script_file.sh` commands don't get stuffed to the screen's bash shell. Now the really strange part is.. After I detach from the screen, re-execute the stuff command as below..               $ screen -S new_screen -X stuff "cd /some/path/     some_script_file.sh     "      and then attach back into new_screen. Now I see that the commands were correctly stuffed and executed in the bash shell inside screen. Not sure where I am going wrong here, there seems to be any issue stuff-ing commands into a not as yet attached screen.


title: Cron & Gnu Screen - Trouble with detached screen

text: > **Possible Duplicate:**   >  sending text input to a detached screen I have a script for my Minecraft server that runs automatically every 15 minutes. The problem is that after a server reboot, minecraft is automatically started in Gnu Screen. This is ideal, of course, except that for some reason the script (which returns no errors in this case) can't seem to "connect" with the screen if I don't SSH in and manually attach, then detach the screen. The script runs, but nothing happens within the screen. I have checked that I am the owner of the screen (as opposed to a system owner), and it checks out. The screen exists, and is titled properly, and everything seems like it should be working. But if I don't login to attach the screen manually first, my script can't communicate with the screen. Does anyone have any clue why this is and how I can work around it?


title: How to open multiple files from `find` output?

text: I know I can open multiple files found in a dir like so: `find -name *.foo -xargs <command> {} \;` This works, but when trying to open a bunch of textfiles in gedit at the same time, it opens them successively (when one files is closed, the next one is opened). I would like to open all of those files at the same time. How can I achieve this?


title: Why should a user program mess with kernel space?

text: I'm not even sure what the problem is, but I'm talking about the kernel attack described here. Down this list of comments somebody asked about renicing the process. The trick didn't improve the situation (the machine still runs in a very sluggish fashion) and the replying comment says something about kernel space vs user space. First of, is the replying comment correct? If so, why does renice work for things in user space and not for things in kernel space? Also, according to what I read, all programs that a user starts emself should be in user space, what did I miss? If it is incorrect, then why doesn't renice improve the situation?


title: How to combine contents of two files having the same value in a column?

text: File1:               00:00 274     00:04 476     00:05 450     00:06 499     00:07 373     00:08 206     00:09 471     00:10 154      File2:               00:00 183     00:01 60     00:02 344     00:03 540     00:04 450     00:07 348     00:09 473     00:10 203      Desired output:               00:00,274,183     00:01,0,60     00:02,0,344     00:03,0,540     00:04,476,450     00:05,450,0     00:06,499,0     00:07,373,348     00:08,206,0     00:09,471,473     00:10,154,203      Column 1 of each file will be checked and if same, values will be joined to the output. Please note the "0" value for those contents not present on either file. Also, this will be used for combining contents of 6 files.


title: openwrt firewall - block a set of ip addresses from internet access

text: I'm running OpenWRT Attitude Adjustment r33556 / LuCI Trunk (trunk+svn9325) on my WNDR3800. I would like to configure my firewall to:   1. Only allow a specific range of IP addresses to access internet, like my static IP's.   2. Also block IP's from internet access in my DHCP IP range, and redirect to a local IP web server.


title: Configure Atheros AR9285 wireless in Gentoo

text: My laptop has an Atheros AR9285 wireless card. By following the "Network Configuration" section in the Gentoo handbook I chose the ath9k module. The modules seem to be loaded correctly:               # lsmod | grep ath     ath9k                  72172  0      ath9k_common            2345  1 ath9k     mac80211              146807  2 ath9k,ath9k_common     ath9k_hw              213153  2 ath9k,ath9k_common     ath                     8652  2 ath9k,ath9k_hw     cfg80211              112782  4 ath9k,ath9k_common,mac80211,ath And the interface also shows up in ifconfig:               wlan0     Link encap:Ethernet  HWaddr 00:22:43:61:a2:f0                 UP BROADCAST MULTICAST  MTU:1500  Metric:1               RX packets:0 errors:0 dropped:0 overruns:0 frame:0               TX packets:0 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000                RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B) However, I cannot do a network scan:               # iwlist wlan0 scanning     wlan0     Interface doesn't support scanning. And the interface doesn't seem to be recognized:               # iwconfig wlan0     wlan0     no wireless extensions. What can I try to make it work? PS: I also have Ubuntu on this laptop and wireless is working fine.


title: Best Dictionary Software for Linux

text: Can anyone suggest a good "Dictionary" software in Linux. I have artha, but I am actually expecting a better one. Ok here are things which i look out for in a dictionary:   * Good database   * Word pronounciation (This is not available in Artha.)


title: Have aptitude search print full package name

text: _Environment: aptitude called in a script._ I'm having problems with this command:               aptitude search '?virtual'  |grep ^v |grep -v i386|sort|uniq      In particular if I do:               aptitude search '?virtual'  |grep ^v |grep -v i386|sort|uniq|grep adblock      I get (as one of the results):               v   adblock-plus-element-hiding-hel -          instead of what I want:               v   adblock-plus-element-hiding-helper -          How do I get aptitude to print the full package name in a script?


title: Why is this line included in the `logcheck` report email?

text: In addition to the Debian provided rulesets, I have added a file /etc/logcheck/ignore.d.workstation/wpasupplicant.local (owner root:logcheck, mode 0644) to my newly installed logcheck setup. I have confirmed that REPORTLEVEL is set to "workstation" in /etc/logcheck/logcheck.conf. The contents of wpasupplicant.local is the single line:               ^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ wpa_supplicant\[[[:digit:]]+\]: wlan0: WPA: Group rekeying completed with XX:XX:XX:XX:XX:XX \[GTK=CCMP\]$      where XX:XX:XX:XX:XX:XX is the lowercase-hex MAC address of my WiFi AP/gateway. However, I'm still receiving email reports hourly (every time logcheck executes) which include the following (the time varies; I have set up rekeying to be done at fairly short intervals):               Aug 11 20:06:51 yeono wpa_supplicant[2524]: wlan0: WPA: Group rekeying completed with XX:XX:XX:XX:XX:XX [GTK=CCMP]      Again, XX:XX:XX:XX:XX:XX is the lowercase-hex MAC address I'm connecting to. I have double-checked that the MAC addresses shown are the same in both. If I do `grep -E --color "$(cat wpasupplicant.local)" -` and then paste the log line copied directly from the log email into grep's stdin, it indicates a full match (the entire line is echoed back at me, colored red). Since the data does match something in the proper `ignore` directory, I would expect that line to not be included in the e-mail report. I have checked /etc/logcheck/violations.d and /etc/logcheck/cracking.d and neither seems to contain anything relevant (`grep -i WPA *` in those two directories turn up empty). **What might be the reason why the "rekeying completed" line is included in the logcheck report e-mail?**


title: find utility does not recognize bracket notation

text: I've two files in the current folder: > submitWeb.m   >  submit.m the following `find` does not show the two files:               find . -regex .*submit\(Web\)?\.m      But the above regex expression works fine in emacs buffer, i.e., search for the example strings in the emacs buffer using `isearch-forward-regexp`. The default `regextype` for `find` is `emacs`. But it seems that `find` consider `\\(` as a left bracket in the filename, which differs from emacs regex syntax. So is this a bug or my misunderstanding of `find` manpage?


title: Top forest view with filter, can I include all children?

text: If I'm using top in "forest" mode (V) and I restrict by PID (o PID=12345), can I also get top to show all the child processes in the same view? Ubuntu, top from procps-ng version 3.3.9


title: Equivs: enhance or update an existing package without uninstalling?

text: Some background: I'm using Debian 7 as my main environment, and I want to tell my system that I have `glibc = 2.15` in addition to the environment's required `glibc = 2.13` for the purposes of using some more recent applications. I got the glibc from the various tutorials on the web for installing eg.: Steam. It is unpacked in `/usr/local/lib/libc6-2.15` and I've tested it with some applications such as Pidgin 2.10, Boinc 7 and Stellarium, it's working well (so far, I _do_ expect it to eventually fail gracefully). Since it'd be much better if I could install those applications from packaged sources as well (both clang and Boinc are in testing for example), I'd like to tell my system via a virtual package that I do, in fact, have a glibc 2.15 available. Of course I know about `equivs` as a tool to create virtual packages for stuff that one does _not_ have installed from repositories, but I have found no good documentation so far on how to use `equivs` to create a virtual package that can update an already installed package, ideally without breaking. I first tried the obvious:               Package: libc6     Version: 2.15-1      And dpkg-installed the generated package, with the expected result that it uninstalled the already present `libc` to update and left the system in an unusable state. (Of course, I tried this in a VM). I've also tried               Version: >= 2.13      Without any good results. I tried to look for a way of using _Provides_ or _Enhances_ by creating a package of a different name               Package: local-libc6     Version: 2.15     # Either this:     Provides: libc6     # Or this:     Enhances: libc6 (< 2.15)      But so far I have had no success in getting `equivs` to create an installable package (aptitude complains about an invalid Provides or Enhances), or even to create a package at all. Of course, the idea is to create a virtual package for `libc` that _won't_ uninstall the already installed one, and merely "provides" the new version. But I've found the documentation horribly lacking in that respect so far (and I really don't want to have to delve deep and become lost into the DPKG Encyclopedia; usually I have the disposition and time to do such tasks, but these days my focus is needed elsewhere). So, I guess the base question is: _can_ I use equivs to create an update for a package without uninstalling the original, or achieve something to that effect? What general cares do I need to exercise when specifying versions to `equivs`?


title: How to speed up my build

text: I am doing a build on a Linux machine with ubuntu 10.04 on it. I want to know how can I really speed up my build. I have 4 CPUs and lots of RAM. I already reniced the process group to -20. Is there something else I can do?


title: Does linux kill heavy and long running background processes after they reach some threshold?

text: If I start a really heavy (memory/cpu intensive) running really long running process will the OS terminate it after a period of time arbitrarily?   I.e. are there any limits beyond which the OS would stop a background process from running?   Are these limits configurable? Where are they defined?


title: setfacl access issues

text: I have a list of users (user1,user2,user3,superuser). user1, user2 and user3 belong to a usergroup called **normalusers** . Now, I need to issue the access control list command for the user **superuser** to view the home pages of the users (user1, user2, user3). I have a setfacl command as below.               setfacl -m user:superuser:rx /home/user1      The above command works perfectly fine and the user **superuser** has access to user1 directory. Now, I need to issue the rights to the remaining users too. I wanted to apply the ACL rules to all the users inside the home directory. So, I issued the following command.               setfacl -m user:superuser:rx /home/      However, the above command did not allow me to view all the users. I was wondering if the setfacl command can be modified to access all the home directories belonging to a particular group.


title: How does zoneinfo get updated if at all?

text: I have been installing several systems lately have noticed a difference of opinion on how to set time-zones. Arch Linux Beginners' Guide says to use a symlink and the Gentoo HOW TO Guide says to copy from the shared folder While this preference might be better for meta I am wondering if these time- zone files get updated. If they were updated would the new replace the old or would my zone move from America/Dawson_Creek to America/Dawson_Creek.old? I am wondering as my little pocket time-zone is an oddity and I constantly worry that since Microsoft refuses to acknowledge it we will be absorbed by the Arizona time zone.


title: What does `export COLUMNS` do?

text: What is the significance of importance of the command `export COLUMNS` ? What I know is that it's a global variable. I frequently see it in the beginning of *nix scripts.


title: How do I replace certain text with the respective line number using sed?

text: I have a file where certain (not all) lines look like so:               Sequence: n      I wish to replace `n` with the respective line number. How can I do it with sed?


title: Multitouch support on KDE

text: On Ubuntu there is an app called `ginn` which forces non-multitouch aware apps to support multitouch. (source) Is there any analogue for the KDE Desktop Environment?


title: Can one disable tap-to-click in X server configuration without "InputClass" sections?

text: I want to configure my system so that tap-to-click is disabled on the touchpad. (It's running a rather old version of ALTLinux distro with xorg- server-1.4.2-alt10.M41.1.) I'm interested in a solution without running `synclient` in each X session. Probably, my X server is too old so that it doesn't understand "InputClass" sections in `xorg.conf`, as suggested in another answer by Vincent Nivoliers:               Section "InputClass"         Identifier "touchpad catchall"         Driver "synaptics"         MatchIsTouchpad "on"         MatchDevicePath "/dev/input/event*"         Option "MaxTapTime"             "0"     EndSection      The I get an error; from Xorg.*.log:               (==) Using config file: "/etc/X11/xorg.conf"     Parse error on line 71 of section InputClass in file /etc/X11/xorg.conf         "InputClass" is not a valid section name.     (EE) Problem parsing the config file     (EE) Error parsing the config file      Also, my `xorg.conf` doesn't have any explicit "InputDevice" sections (with a comment: "With libXiconfig we don't need configuration for ps and usb mice."). How do I put the "MaxTapTime" option into my `xorg.conf` so that the configuration of my input devices (including the touchpad) is not broken? (If I write explicit "InputDevice" sections, I might break the correct configuration obtained automatically..) Perhaps, the output of `xinput list` can be of some use. I do not want to make the question too specific by posting my `xinput list` and asking what to do in this specific case. Let it be just an example:               $ xinput list     "Virtual core keyboard" id=0    [XKeyboard]         Num_keys is 248         Min_keycode is 8         Max_keycode is 255     "Virtual core pointer"  id=1    [XPointer]         Num_buttons is 32         Num_axes is 2         Mode is Relative         Motion_buffer is 256         Axis 0 :             Min_value is 0             Max_value is -1             Resolution is 0         Axis 1 :             Min_value is 0             Max_value is -1             Resolution is 0     "AT Translated Set 2 keyboard"  id=4    [XExtensionKeyboard]         Type is KEYBOARD         Num_keys is 248         Min_keycode is 8         Max_keycode is 255     "PS/2 Mouse"    id=3    [XExtensionPointer]         Type is MOUSE         Num_buttons is 32         Num_axes is 2         Mode is Relative         Motion_buffer is 256         Axis 0 :             Min_value is -1             Max_value is -1             Resolution is 1         Axis 1 :             Min_value is -1             Max_value is -1             Resolution is 1     "AlpsPS/2 ALPS GlidePoint"  id=2    [XExtensionPointer]         Type is TOUCHPAD         Num_buttons is 12         Num_axes is 2         Mode is Relative         Motion_buffer is 256         Axis 0 :             Min_value is 0             Max_value is -1             Resolution is 1         Axis 1 :             Min_value is 0             Max_value is -1             Resolution is 1     $       I expect the answer to give some general advice, not specific for this case.


title: Can emacs render downloaded html files?

text: From Firefox, I downloaded a `.html` file, with a directory with name ended in `_files`, by specifying "Webpage, Complete". When open the `.html` in emacs, even under `html-mode`, only the source of the html file is displayed, and the webpage is not rendered. How can I render a downloaded html file inside Emacs? It will also be the best that the files under the `_files` dir is also used in the rendering, but I am only need to read text most of the time. I am mainly looking form some light-weight (even text) application rather than full-fledged one, because I have opened too many webpages in both Firefox and Chrome, and they take up too much resources. Is it the same as browsing a webpage via its URL?


title: Where does demo code usually go when installed with package manager.

text: In this particular example I am trying to get the CGAL Library demo code wich is availble from the Fedora package manager `yum`:               CGAL-demos-source.x86_64 : Examples and demos of CGAL algorithms     CGAL-devel.i686 : Development files and tools for CGAL applications      I know the development packages end up in `/usr/include` and `/usr/lib64`. **I want to look at the demo source, where does this usually end up?**