title: How can I rewrite the From: address of an email and resend it?

text: I have a cPanel web hosting account. On this account I have a PHP-based support/trouble ticket system for my customers to use. I'd like to be able to send an email to both my customer and to the ticket system, but have the email that goes to the ticketing system appear to come _from_ my customer, so that the support ticket which gets created appears under their account. So what I want to do is create some email address `billing- redirect@mydomain.com` which gets piped to a unix command or shell script. This means that when I send an email from `billing@mydomain.com` to `some_customer@example.com` and CC `billing-redirect@mydomain.com`, the shell script should be able to _resend_ the email to `support@mydomain.com` **but resend the email from the To: address of the email**. Is there any way to make a shell script which will accept an email on stdin, rewrite the From: address, and resend the mail to a new address? Can Procmail do anything like that? Or will I have to hand code this myself?


title: sendmail not sending to the cloud (local mail works)

text: I'm using a perl module (Mail::Sendmail) which uses `sendmail` to send stuff. It hasn't been working, but hasn't been giving me any errors. So now I suspect `sendmail`. I tried:               telnet 127.0.0.1 25     mail from:root@localhost.com     rcpt to:max@f33r.com     data      subject: subject line      sgiopjsdoigjsd      sdgsdg           sdgfsdg      .     quit      I get the "mail accepted for delivery" message, which is what should happen. I wait around for a couple minutes and nothing in my inbox. So I take a look at `/var/log/maillog.3` and it doesn't have anything pertaining to what I just did. I tried sending mail locally to another user by doing `mail user@localhost.localdomain` and that worked. But still nothing in the logs (which makes me believe the real logs are somewhere else). **Summing up:**   * Can't send mail to the cloud, but it works locally   * Unknown location of sendmail log file


title: Using debuild to build shared libraries .deb

text: I'm trying to package a shared library using debuild to build the .deb file. In runnign dh_make the library option was selected. Have been following this guide Having managed to build the library, i'm getting the foillowing error:                 dh_install     dh_install: mylibrary-dev missing files (usr/lib/lib*.a), aborting     make: *** [binary] Error 255     dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2     debuild: fatal error at line 1337:     dpkg-buildpackage -rfakeroot -D -us -uc failed      I looked inside the directory listed in the error, e.g. ~/mylibrary-1.0/debian/mylibrary-dev/usr/lib/ and it empty. The shared libraries are actually in: ~/mylibrary-1.0/debian/tmp/usr/lib/ However there are no *.a libs in there. The mylibrary-dev.install file list the following:               usr/include/*     usr/lib/lib*.a     usr/lib/lib*.so     usr/lib/pkgconfig/*     usr/lib/*.la     usr/share/pkgconfig/*      For some reason an extra package is listed in the control file.               Source: mylibrary     Priority: extra     Maintainer: satpal <satpal@unknown>     Build-Depends: debhelper (>= 7.0.50~), autotools-dev     Standards-Version: 3.8.4     Section: libs     Homepage: <insert the upstream URL, if relevant>          Package: mylibrary-dev     Section: libdevel     Architecture: any     Depends: mylibrary1 (= ${binary:Version})     Description: <insert up to 60 chars description>      <insert long description, indented with spaces>          Package: mylibrary1     Section: libs     Architecture: any     Depends: ${shlibs:Depends}, ${misc:Depends}     Description: <insert up to 60 chars description>      <insert long description, indented with spaces>      Following the helloworld example used in the guide, it only comes up with Source and a single package Sorry for long post, just wanted ensure there was enough info. Thanks EDIT (@Gilles) my rules file is:               #!/usr/bin/make -f     # -*- makefile -*-     # Sample debian/rules that uses debhelper.     # This file was originally written by Joey Hess and Craig Small.     # As a special exception, when this file is copied by dh-make into a     # dh-make output file, you may use that output file without restriction.     # This special exception was added by Craig Small in version 0.37 of dh-make.          # Uncomment this to turn on verbose mode.     #export DH_VERBOSE=1          %:         dh $@      I don't know howto attached an archive, or if i have enough rep to attached one.


title: How to clear DNS cache on DD-WRT

text: How can I clear the DNS cache in DD-WRT on my router? DD-WRT uses the dnsmasq daemon.


title: Fluxbox borderWith on focused Maximized windows

text: Using fluxbox for a few days now trying to get things setup as I want them. I added window.focus.borderWidth: 2 (and .borderColor: white) to my .fluxbox/overlay so I can easily determine what window is focused without looking down to the toolbar. This works perfect.. except for: If a window is maximized such as Firefox then no focus border appears, so for maximized windows I cant use the same visuals to determine if they are focused. Why the obsession: I use deco: border (i dont need window title) on a multi-head setup so I like to know whats in focus. In a nutshell, I want large border for focused maximized windows in Fluxbox, how?


title: How to improve this backup script?

text: I wrote this backup script. I run `rsync`, `tar` and a dump of mysql. I'd like to add some features like email alert or some kind of statistic. Here is the script:               #!/bin/sh          DATE=`date +%D-%T`     ORIGIN=/home/share/     DEST=/media/BACKUP/mercurio/     LOGFILE=log.txt     echo "=====Starting backup on $DATE =====" >> $LOGFILE     echo "==Start rsync" >> $LOGFILE      rsync -arHu --delete --stats $ORIGIN $DEST/share >> $LOGFILE     wait     if [ $? -eq 0 ]     then             echo "==rsync ok"  >> $LOGFILE     else             echo "==rsync ko"   >> $LOGFILE     fi          echo "==Sart TAR" >> $LOGFILE     tar -czf $DEST`date +%y%m%d-%T`.tar.gz $ORIGIN     wait     if [ $? -eq 0 ]     then             echo "==tar ok" >> $LOGFILE     else             echo "==tar ko" >> $LOGFILE     fi     echo "==Start DUMP" >> $LOGFILE     mysqldump -u root -ptoor --all-databases > ${DEST}databases/`date +%Y%m%d-%k:%M`.sql     wait     if [$? -eq 0 ]     then             echo "==dump ok" >> $LOGFILE     else              echo "==dump ko" >> $LOGFILE     fi     echo "=====End Bakcup=====" >> $LOGFILE


title: Is there a tool to visualize a filesystem allocation map on Linux?

text: May you have ever used filesystem defragmentation tools (like Norton SpeedDisk or Piriform Defraggler) on Windows, you have probably seen such a diagram: ![Defraggler ](http://i.stack.imgur.com/2RlKW.png) It displays a filesystem sectors map, painting (as for this particular example) sectors (sets of sectors actually, to fit the whole partition in the screen) occupied by non-fragmented (contiguous) files in blue, the opposite in red and free sectors in white (and some more colours for some more particular cases which can happen to be of interest). You can click on a "sector" and see what particular files "live" there. Is there such a visualization tool for Linux? UPDATE: I've accepted sr_'s answer as it seems perfectly the answer to the question but I would be really happy to see a better option :-)


title: Distro for a startup?

text: We run a small start-up in the `SaaS` industry. About half of our current staff are developers using their own laptops with various Linux distros (Ubuntu, Debian, Fedora) with a few exceptions of Windows XP. The other half of our staff performs administrative tasks using only OpenOffice, Thunderbird & Firefox and have very little interest in what OS that is used as long as it works. As we're going to invest in workstations for our staff very soon, we need to choose a Linux distribution that will become the default in the company. Stability will be the primary focus and after what I've read, either `Debian` or `centOS` seems to be the appropriate choice - after ruling `RHEL` out for economical reasons. **From an unbiased business perspective soberly looking at pros and cons and putting preferences aside, what should be our concerns?**   * Is there anything that either `centOS` or `debian` can offer us that the other distro won't?   * What about `SElinux` and similar security systems?


title: iptables/pf rule to only allow XY application/user?

text: I think there is no iptables/pf solution to only allow an XY application on e.g.: outbound tcp port 80, eth0. So if I have a userid: "500" then how could I block any other communications then the mentioned on port 80/outbound/tcp/eth0? (e.g.: just privoxy is using port 80 on eth0)      Extra: virtualbox uses port 80 too? when a browser on the guest os visits a site..how to declaire that? - setting the normal user would be too much hole


title: Postfix: Can I configure it to *not* include original email on undeliverable?

text: The question's title says it all. Scenario: The Postfix server is used _only_ for mail-relay; in the office back-end, we use hMailServer. Some hMailServer users have their emails auto- forwarded to their BlackBerry account. Sometimes, they changed their BlackBerry operator without informing IT Dept. As a result, the auto-forward (handled by Postfix) failed, and a notification is sent (by Postfix) back to the user's account, which gets re-forwarded to the (no longer active) BlackBerry account, another failure, and ... well, you get the idea: A mailing loop. I need to prevent this from happening. For complex reasons, we can't change our current setup of a separate internal mail server and the cloud-based Postfix mail-relay. So, I must either reconfigure Postfix or use some other mail-relay system that can be configured as such. Thanks in advance.


title: configure.ac: not using gettext

text: I am trying to compile a gnome application and I am curious what the output means when I run the `autogen.sh` script:               ~/Documents/Code/window-picker-applet $./autogen.sh     autoreconf: Entering directory `.'     autoreconf: configure.ac: not using Gettext     autoreconf: running: aclocal      autoreconf: configure.ac: tracing     autoreconf: running: libtoolize --install --copy     libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.     autoreconf: running: /usr/bin/autoconf     autoreconf: running: /usr/bin/autoheader     autoreconf: running: automake --add-missing --copy --no-force     data/Makefile.am:11: `%'-style pattern rules are a GNU make extension     data/Makefile.am:11: wildcard $(top_srcdir: non-POSIX variable name     data/Makefile.am:11: (probably a GNU make extension)     autoreconf: Leaving directory `.'     [Output trunkated...]      Why am I getting the info `configure.ac: not using Gettext`? Is that a warning and should I change some of the configuration files to fix it? I know the application has a `po/` folder so I think it should be using Gettext, hence I am confused about this warning. ~~I also had a lot of warnings with the`N_` macro not being defined, so this might be related?~~ **[Update]** See comment below **[/Update]**


title: Detailed sparse file information on Linux

text: I have a sparse file, in which only some blocks are allocated:               ~% du -h --apparent-size example     100K    example     ~% du -h example     52K     example      I would like to know which blocks of the file are actually allocated. Is there a system call or kernel interface that could be used to get a list of either the allocations, or the holes of file? Simply checking for a long enough string of zeros (the approach used by GNU cp, rsync, etc) does not work correctly:               ~% cp example example1       ~% du -h example1      32K     example1      It detected other sequences of zeros that were actually allocated.


title: grep: count total number of occurrences

text: `grep -c` is useful for finding how many times a string occurs in a file, but it only counts each occurence once per line. How to count multiple occurences per line? I'm looking for something more elegant than:               perl -e '$_ = <>; print scalar ( () = m/needle/g ), "\n"'


title: How do I read the output of commands in a script

text: I'm learning Linux scripting at the moment, and one thing I can get working is assigning a command output to a variable. The command `service httpd configtest` returns `Syntax is OK`, so I wrote this.               #!/bin/bash          var=`service httpd configtest`     echo "Output is $var"      From what I've read that should store the output in `var`, then echo it. However, the output when I run that script is               Syntax OK     Output is      What have I done wrong? I'm using CentOS 6.5 if that makes a difference.


title: run lsof in non-interactive mode

text: I need to write `lsof` output for several network ports into bash variable. Simple `$(lsof -i :5555)` doesn't work - lsof waits for quit command (Ctrl-C) every time I call it. I can't figure out how to solve my task. Please, help


title: Which is the most portable of sed, awk, perl and sh?

text: Can someone put these tools in order of portability? Which of these is _certain_ to be found on even the most minimal *nix systems? Is any of them 100% sure to be present? My guess is that the order is the following:   1. awk   2. sed   3. sh   4. perl While I imagine there are systems which don't default to a bourne shell, _some_ shell will be present as the default, will that always be at `/bin/sh`? Presumably not if it's not a bourne-type shell. Both `awk` and `sed` have pages explaining them on the POSIX specification so presumably they will always be present. Is that so? Can I be _sure_ that both will be installed on any *nix? Including embedded systems?


title: Send data from file to rsyslog local0 facility

text: Is any possibility for `logger` to permanently get data from file - and send it to `local0` facility? Why - I want to collect all data in database. For this - I'm use `rsyslog- mysql`. In it - I have configured "channel" for `local0` like:               $ModLoad ommysql     local0.* :ommysql:[...]      And - I have few log-files (Tomcat, our application, some "hand-made" log- files from backup scripts etc). And I want to send data from them in to database - but without editing systems/scripts which this log-files fill (uses). One way I see - run in background (and add to `/etc/rc.local` too) something like:               # tail -f /some/log.file | logger -p local0.*      I found `logger -f` option - but it seems runs only once and get full info from file and send it in to "channel" (facility). P.S. CentOS 6.4


title: Why does find -exec du sum up differently?

text: I have family pictures and movies in a folder /media/data/Selbstgemacht and I'd like to find the size of all pictures. In /media/data I use `find Selbstgemacht -type f -iname '*.jpg' -exec du -ch '{}' +` which returns 5,1GB.   However, if I step down into the folder "Selbstgemacht" and use `find . -type f -iname '*.jpg' -exec du -ch '{}' +` it returns 7,0GB. I then compared the output of find to check if they find the same files:   From parent folder `find Selbstgemacht -type f -iname '*.jpg' -printf '%P\n' |sort > test1.txt`   From subfolder `find . -type f -iname '*.jpg' -printf '%P\n' |sort > ../test2.txt` The files are identical, so both find commands find exactly the same files, which leads me to thinking that the difference in the size du reports must be due to something else. What exactly is the cause here? System information:   * Debian stable    * find (GNU findutils) 4.4.2      * D_TYPE O_NOFOLLOW(enabled)     * LEAF_OPTIMISATION, FTS(), CBO(level=0)    * du (GNU coreutils) 8.13


title: cannot boot Debian Jessie installed via debootstrap

text: I've just installed a Debian Jessie via debootsrap for testing/learning purpouse, this is its entry in the GRUB menu:               menuentry "Debian GNU/Linux (jessie/sid) (on /dev/mapper/nostromo-DEBIAN)" --class gnu-linux --class gnu --class os {        insmod lvm        insmod part_msdos        insmod ext2        set root='(nostromo-DEBIAN)'        search --no-floppy --fs-uuid --set=root f8ae3cc5-384a-484e-a701-76754242baf3        linux /boot/vmlinuz-3.14-2-rt-amd64 root=/dev/dm-2        initrd /boot/initrd.img-3.14-2-rt-amd64     }      As you can see I use lvm2. Unfortunately, the boot process fails because it cannot find the /dev/dm-2 partition. In facts running `ls /dev/` from busybox console the dm-* devices are all missing, but if I launch another system and I access the new installation via chroot, dm-* devices are present. How can I fix this issue? Thanks in advance.


title: How to properly configure sudoers file, on debian wheezy?

text: I have seen many blog posts that say, it is enough to do               aptitude install sudo     su root     adduser USERNAME sudo      But that only protects `aptitude`, in other words:   * `aptitude install sendmail` will ask for password, you need to be `sudo` to run `aptitude`   * `apt-get install sendmail` won't ask for password, no `sudo` privileges needed   * If you edit protected files, like files in `etc` it won't ask for password, no `sudo` privileges needed   * You can run and stop services like `apache`, it won't ask for password, no `sudo` privileges needed How to fix this? This is my sudoers file:                This file MUST be edited with the 'visudo' command as root.     #     # Please consider adding local content in /etc/sudoers.d/ instead of     # directly modifying this file.     #     # See the man page for details on how to write a sudoers file.     #     Defaults        env_reset     Defaults        mail_badpass     Defaults        secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:$          # Host alias specification          # User alias specification          # Cmnd alias specification      This is the output of `sudo -l`:               Matching Defaults entries for root on this host:         env_reset, mail_badpass,         secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin          User root may run the following commands on this host:         (ALL : ALL) ALL         (ALL : ALL) ALL


title: Grouped sorting of continuous paragraphs (separated by blank line)?

text: I think I'm pretty experienced now in sorting by _columns_ ; however, I haven't found anything so far how to sort _continuous rows_. Supposing we have a text file that looks like this: (very simplified, of course)               Echo     Alpha     Delta     Charlie          Golf     Bravo     Hotel     Foxtrot      Now, is it possible to sort the lines alphanumerically _per each block separately_? I mean, so that the result looks like this:               Alpha     Charlie     Delta     Echo          Bravo     Foxtrot     Golf     Hotel      Telling from what I found in the `sort` man page, this might not be possible with the built-in UNIX `sort`command. Or can it even be done without having to resort to external/third-party tools?


title: TERM=(linux|xterm) vi in an xterm or the AAABBBBBBCCDDD-problem

text: Usually when I want to run `vim` in a desktop `konsole` session, I make sure the TERM variable is set to `linux` as the arrow keys don't work in insert mode with `TERM=xterm`. They show capital A..D instead of moving the cursor. Now I think this is the wrong way of doing thingsas `konsole` or `xterm` is actually of type `xterm`. Is there a better way for making arrow keys work under `vi` / `vim`? OS: Kubuntu 13.04 (Clean install)


title: How to implement retry mechanism while executing the server url in the shell script?

text: I am working on a project in which I need to make a url call to one of my server from the bash shell script..               http://hostname.domain.com:8080/beat      After hitting the above url, I will be getting the below response which I need to parse it and extract value of `syncs` and `syncs_behind`               state: READY process: 30 process_behind: 100 num_rounds: 60 hour_col: 2 day_col: 0 oldest_day_col: 0      Now I need to hit the above url every 10 seconds for a period of 10 minutes and extract the value of `process` and `process_behind` from it and then use it to validate it with below conditions -               process > 8     process_behind = 0      if the syncs is greater than 8 and process_behind = 0, then I will end my shell script with some message saying - "Data has been validated", otherwise I would keep on trying for 10 minute window.. If in that 10 minute window, the above condition doesn't met I will end the shell script anyway meaning I won't retry again. Below is my shell script which does the above thing and it works fine in normal condition when the server is up.               #!/bin/bash          COUNT=60   #number of 10 second timeouts in 10 minutes          while [[ $COUNT -ge "0" ]]; do          #send the request, put response in variable     DATA=$(wget -O - -q -t 1 http://hostname.domain.com:8080/beat)          #grep $DATA for process and process_behind     PROCESS=$(echo $DATA | grep -oE 'process: [0-9]+' | awk '{print $2}')     PROCESS_BEHIND=$(echo $DATA | grep -oE 'process_behind: [0-9]+' | awk '{print $2}')          echo $PROCESS     echo $PROCESS_BEHIND          #verify conditionals     if [[ $PROCESS -gt "8" && $PROCESS_BEHIND -eq "0" ]]; then exit 0; fi          #decrement the counter     let COUNT-=1          #wait another 10 seconds     sleep 10          done      There might be a scenario in which it gets failed suppose if the server is down, then `wget` line throws an exception. Now what I am trying to do is, if the server is down, then I will sleep for 30 seconds and then retry executing the server url again and if it failed again, then sleep again for 30 seconds and then retry executing the server url again. I will retry executing the server url for n times, let's say n is 10. And after that still the server is not up I will exit out of the shell script with non zero status and a message server is down. But if the server is up and I am able to get the response back, I will move forward to extract those fields which I have in my later shell script. Is this possible to implement retry mechanism in bash shell script? Or is there any better way of doing this apart from wget? **UPDATE 1:-** This is what I have got -               #!/bin/bash          COUNT=60   #number of 10 second timeouts in 10 minutes     DATA=""     RETRY=10          while [[ $COUNT -ge "0" ]]; do          while [ $RETRY -gt 0 ]     do         #send the request, put response in variable         DATA=$(wget -O - -q -t 1 http://machineA:8080/beat)         echo "Hello"         if [ $? -eq 0 ]         then             break         else             let RETRY-=1             sleep 30         fi     done          if [ $RETRY -eq 0 ]     then         exit 2     fi          #grep $DATA for process and process_behind     PROCESS=$(echo $DATA | grep -oE 'process: [0-9]+' | awk '{print $2}')     PROCESS_BEHIND=$(echo $DATA | grep -oE 'process_behind: [0-9]+' | awk '{print $2}')          echo $PROCESS     echo $PROCESS_BEHIND          #verify conditionals     if [[ $PROCESS -gt "8" && $PROCESS_BEHIND -eq "0" ]]; then exit 0; fi          #decrement the counter     let COUNT-=1          #wait another 10 seconds     sleep 10          done      If my server is down and I am running the above shell script, then it is printing "Hello" to the console and it works fine. But see my below update - **Update 2:-** Ok, Now I have found the issue, if I am running the shell script like this which I will be running in my production system and if the server is down, then it doesn't prints out "Hello" at all. But if I run the above shell script in Update 1 and if the server is down, then it works fine.               #!/bin/bash          COUNT=60   #number of 10 second timeouts in 10 minutes     HOSTNAME=machineA     DATA=""     RETRY=10          while [[ $COUNT -ge "0" ]]; do          while [ $RETRY -gt 0 ]     do         #send the request, put response in variable         DATA=$(wget -O - -q -t 1 http://$HOSTNAME:8080/beat)         echo "Hello"         if [ $? -eq 0 ]         then             break         else             let RETRY-=1             sleep 30         fi     done          if [ $RETRY -eq 0 ]     then         exit 2     fi          #grep $DATA for process and process_behind     PROCESS=$(echo $DATA | grep -oE 'process: [0-9]+' | awk '{print $2}')     PROCESS_BEHIND=$(echo $DATA | grep -oE 'process_behind: [0-9]+' | awk '{print $2}')          echo $PROCESS     echo $PROCESS_BEHIND          #verify conditionals     if [[ $PROCESS -gt "8" && $PROCESS_BEHIND -eq "0" ]]; then exit 0; fi          #decrement the counter     let COUNT-=1          #wait another 10 seconds     sleep 10          done      This is what I am getting in the debug mode with the above script -               david@some-machine:~$ bash -x ./ping1.sh     + set -e     + COUNT=60     + HOSTNAME=machineA     + DATA=     + RETRY=10     + echo machineA     machineA     + [[ 60 -ge 0 ]]     + '[' 10 -gt 0 ']'     ++ wget -O - -q -t 1 http://machineA:8080/beat     + DATA=      I guess both of the scripts are same? Then why this is happening?


title: How can I use grep to search multiple unnested directories?

text: It may sound like I'm asking the same thing as this question, but I have different requirements. This is an example of my filesystem:   * /code/      * internal/        * dev/       * main/     * public/        * dev/       * main/       * release/     * tools/ /code/internal/dev/, /code/public/dev/ and /code/tools/ contain subdirectories for multiple projects. I work almost exclusively in the dev branches of /code/internal/ and /code/public/, and often I want to search for a text string in those directories along with /code/tools/ (which has no branches). In these instances I have to do three separate commands:               $ grep -r "some string" /code/internal/dev/     $ grep -r "some string" /code/public/dev/     $ grep -r "some string" /code/tools/      I'd like to know if there's a single command to do this. If not, I would most likely need to write a simple bash script.


title: remove files after insertion into tarball

text: I want to limit the number of files that get put into a tar ball and erease them after they've been inserted into the tarball and being indipendent from the current directory. I've tried this: `tar -C ~/semios/tmp/ -cjvf ~/semios/tmp/test.tar.bz2 $(cd ~/semios/tmp/; ls *| head -5) | xargs rm -f` but this leaves the files where they are as the verbose option of `tar` only prints the file name, not the whole path, I thought I could fix it with the `-C` argument but it doesn't look like it... any hints?


title: Saving iptables on CentOS, and merging the previous rules with the newly saved ones?

text: I added some new rules using `iptables` command, then saved them using `/sbin/service iptables save` as described here:   * http://www.centos.org/docs/4/html/rhel-rg-en-4/s1-iptables-saving.html After that in the `/etc/sysconfig/iptables` file presents my new rules only. And all old rules are in the `/etc/sysconfig/iptables.save` file now. As I understand, when the system restarts, the new rules will be applied but the old rules will not. How can I apply them both - new and old rules?


title: Why does ldd show this dynamic linker location?

text: Here's the link command. Notice the specially defined dynamic linker near the beginning. ` time gcc **-Wl,-rpath,/data/data/org.freesoft.Macaulay2/files/lib -Wl,-rpath,/data/data/org.freesoft.Macaulay2/files/lib/Macaulay2/armv7l-Linux- Ubuntu-12.04/lib** -L/root/M2/M2/libraries/final/lib **_-Wl,--dynamic- linker=/data/data/org.freesoft.Macaulay2/files/lib/ld-linux.so.3_** -L/usr/lib/gcc/arm-linux-gnueabi/4.6 -L/usr/lib/gcc/arm-linux- gnueabi/4.6/../../../arm-linux-gnueabi -L/usr/lib/gcc/arm-linux- gnueabi/4.6/../../../../lib -L/lib/arm-linux-gnueabi -L/lib/../lib -L/usr/lib/arm-linux-gnueabi -L/usr/lib/../lib -L/usr/lib/gcc/arm-linux- gnueabi/4.6/../../.. timestamp.o ../d/M2inits.o ../d/startup.o ../d/../regex/regex.o ../d/gmp_init.o ../d/gmp_aux.o ../d/main.o ../d/pari-c.o ../d/M2-factory.o ../d/M2types.o ../d/scclib.o ../d/M2lib.o ../d/M2mem.o ../d/gdbm_interface.o ../d/xml-c.o ../d/arithmetic.o ../d/atomic.o ../d/M2.o ../d/system.o ../d/strings.o ../d/varstrin.o ../d/strings1.o ../d/errio.o ../d/vararray.o ../d/ctype.o ../d/nets.o ../d/varnets.o ../d/interrupts.o ../d/pthread0.o ../d/stdiop0.o ../d/gmp.o ../d/engine.o ../d/xml.o ../d/stdio0.o ../d/parse.o ../d/expr.o ../d/stdio.o ../d/stdiop.o ../d/err.o ../d/gmp1.o ../d/tokens.o ../d/getline.o ../d/lex.o ../d/parser.o ../d/binding.o ../d/basic.o ../d/convertr.o ../d/common.o ../d/util.o ../d/struct.o ../d/classes.o ../d/buckets.o ../d/equality.o ../d/hashtables.o ../d/sets.o ../d/version.o ../d/evaluate.o ../d/mysqldummy.o ../d/pthread.o ../d/actors.o ../d/actors2.o ../d/actors3.o ../d/actors4.o ../d/xmlactors.o ../d/actors5.o ../d/threads.o ../d/pari.o ../d/interface.o ../d/interface2.o ../d/texmacs.o ../d/interp.o ../e/error.o ../e/table.o ../e/exptable.o ../e/monordering.o ../e/complex.o ../e/rand.o ../e/matrix-stream.o ../e/cra.o ../e/aring-zz-flint.o ../e/aring-RRR.o ../e/aring-tower.o ../e/aring-m2-gf.o ../e/aring-promoter.o ../e/aring-glue.o ../e/aring-zzp.o ../e/aring-gf.o ../e/aring-ffpack.o ../e/aring.o ../e/schurSn.o ../e/schur2.o ../e/spair- heap.o ../e/dpoly.o ../e/tower.o ../e/interreduce.o ../e/gb-test1.o ../e/finalize.o ../e/NAG.o ../e/overflow.o ../e/memory-status.o ../e/exceptions.o ../e/imonorder.o ../e/sagbi.o ../e/monideal-minprimes.o ../e/dmat-LU.o ../e/lapack.o ../e/LLL.o ../e/fractionfreeLU.o ../e/ntl- interface.o ../e/fplll-interface.o ../e/mat.o ../e/dmat.o ../e/smat.o ../e/coeffrings.o ../e/Eschreyer.o ../e/gbweight.o ../e/qring.o ../e/polyquotient.o ../e/poly.o ../e/debug.o ../e/comp.o ../e/comp-gb.o ../e/comp-gb-proxy.o ../e/comp-gb-declared.o ../e/comp-res.o ../e/res-a0.o ../e/res-a0-poly.o ../e/res-a1.o ../e/res-a1-poly.o ../e/res-a2.o ../e/reducedgb.o ../e/reducedgb-field.o ../e/reducedgb-marked.o ../e/reducedgb-field-local.o ../e/reducedgb-ZZ.o ../e/montable.o ../e/montableZZ.o ../e/schorder.o ../e/GF.o ../e/ZZ.o ../e/QQ.o ../e/RRR.o ../e/CCC.o ../e/assprime.o ../e/buffer.o ../e/comb.o ../e/det.o ../e/frac.o ../e/franzi-brp.o ../e/freemod.o ../e/gb-default.o ../e/gb-homog2.o ../e/gb- sugarless.o ../e/gb-toric.o ../e/gb-walk.o ../e/gbring.o ../e/gauss.o ../e/hermite.o ../e/hilb.o ../e/int-bag.o ../e/intarray.o ../e/matrix.o ../e/matrix-con.o ../e/mem.o ../e/monideal.o ../e/monoid.o ../e/monomial.o ../e/ntuple.o ../e/polyring.o ../e/pfaff.o ../e/relem.o ../e/ring.o ../e/ringmap.o ../e/schur.o ../e/skew.o ../e/skewpoly.o ../e/solvable.o ../e/spair.o ../e/text-io.o ../e/varpower.o ../e/weylalg.o ../e/ZZp.o ../e/interrupted.o ../e/newdelete.o ../e/ntl-internal.o ../e/ntl-debugio.o ../e/matrix-kbasis.o ../e/matrix-symm.o ../e/matrix-sort.o ../e/ring-vecs.o ../e/res-a2-gb.o ../e/engine.o ../e/x-aring.o ../e/x-monom.o ../e/x-monoid.o ../e/x-relem.o ../e/x-free.o ../e/x-mat.o ../e/x-gb.o ../e/x-ringmap.o ../e/x-mutablemat.o ../e/franzi-gb.o ../e/franzi-interface.o ../e/x-monideal.o ../e/x-factor.o ../e/f4/f4.o ../e/f4/f4-syz.o ../e/f4/f4-mem.o ../e/f4/f4-monlookup.o ../e/f4/f4-types.o ../e/f4/f4-computation.o ../e/f4/f4-spairs.o ../e/f4/f4-m2-interface.o ../e/f4/hilb-fcn.o ../e/f4/monhashtable.o ../e/f4/monsort.o ../e/f4/moninfo.o ../e/f4/ntuple- monomial.o ../e/f4/varpower-monomial.o ../e/f4/gausser.o ../system/m2file.o ../system/supervisor.o ../system/tests.o ../kernel/bibasis/bibasis.o ../kernel/bibasis/allocator.o ../kernel/bibasis/launcher.o ../kernel/bibasis/monom.o ../kernel/bibasis/monomDL.o ../kernel/bibasis/monomDRL.o ../kernel/bibasis/monomLex.o ../kernel/bibasis/settings-manager.o -L../d -lM2inits2 -lfac -lcf -lfac -lcfmem -lgc -lpthread -lmpfr -lfrobby -lpari -lmpirxx -lmpir -Wl,-Bstatic -Wl,-Bdynamic -lxml2 -lz -lm -llapack -lblas -lntl -lgdbm -lgc -lreadline -lpthread -ldl -lrt -lstdc++ -lncurses -Wl,-Bstatic -lgfortran -Wl,-Bdynamic -ldl -lrt -lm -lxml2 -lm -lc **-o "/root/M2/M2/StagingArea/armv7l-Linux- Ubuntu-12.04/bin/M2".tmp** ` Here's what ldd has to say about the resulting executable:               ldd /root/M2/M2/StagingArea/armv7l-Linux-Ubuntu-12.04/bin/M2.tmp         libpthread.so.0 => /data/data/org.freesoft.Macaulay2/files/lib/libpthread.so.0 (0x401b2000)         libxml2.so.2 => /data/data/org.freesoft.Macaulay2/files/lib/libxml2.so.2 (0x401cd000)         libm.so.6 => /data/data/org.freesoft.Macaulay2/files/lib/libm.so.6 (0x40023000)         liblapack.so.3gf => /data/data/org.freesoft.Macaulay2/files/lib/liblapack.so.3gf (0x4029b000)         libntl-5.4.2.so => /data/data/org.freesoft.Macaulay2/files/lib/libntl-5.4.2.so (0x40925000)         libgdbm.so.3 => /data/data/org.freesoft.Macaulay2/files/lib/libgdbm.so.3 (0x4009c000)         libreadline.so.6 => /data/data/org.freesoft.Macaulay2/files/lib/libreadline.so.6 (0x400f0000)         libdl.so.2 => /data/data/org.freesoft.Macaulay2/files/lib/libdl.so.2 (0x4008f000)         librt.so.1 => /data/data/org.freesoft.Macaulay2/files/lib/librt.so.1 (0x400ca000)         libstdc++.so.6 => /data/data/org.freesoft.Macaulay2/files/lib/libstdc++.so.6 (0x40a3f000)         libc.so.6 => /data/data/org.freesoft.Macaulay2/files/lib/libc.so.6 (0x40ae6000)         /data/data/org.freesoft.Macaulay2/files/lib/ld-linux.so.3 => **/lib/ld-linux.so.3** (0x400aa000)         libgcc_s.so.1 => /data/data/org.freesoft.Macaulay2/files/lib/libgcc_s.so.1 (0x400d8000)         libz.so.1 => /data/data/org.freesoft.Macaulay2/files/lib/libz.so.1 (0x40120000)         libblas.so.3gf => /data/data/org.freesoft.Macaulay2/files/lib/libblas.so.3gf (0x40138000)         libgfortran.so.3 => /data/data/org.freesoft.Macaulay2/files/lib/libgfortran.so.3 (0x40bc8000)         libgmp.so.10 => /data/data/org.freesoft.Macaulay2/files/lib/libgmp.so.10 (0x40c43000)         libtinfo.so.5 => /data/data/org.freesoft.Macaulay2/files/lib/libtinfo.so.5 (0x40c8d000)      Why does everything point to `/data/data/...` EXCEPT the dynamic loader itself? If you want to reproduce the whole thing, it's a Macaulay 2 build on ARM with this `configure` command:               ./configure  --enable-download --enable-build-libraries=pari --prefix=/data/data/org.freesoft.Macaulay2/files LDFLAGS=-Wl,--dynamic-linker=/data/data/org.freesoft.Macaulay2/files/lib/ld-linux.so.3


title: httpd server simply doesn't want to run anymore

text: I have no idea why, if I do `service httpd restart` it just goes back to prompt:               root@host [/home3/backup/2013-08-25/accounts]# service httpd start      httpd (pid 29767) already running     root@host [/home3/backup/2013-08-25/accounts]# service httpd stop     root@host [/home3/backup/2013-08-25/accounts]# service httpd restart     root@host [/home3/backup/2013-08-25/accounts]# service httpd status      Nothing! And after a while it reports that apache is not running. No error message whatsoever. However WHM and CPanel run though.               root@host [/home3/backup/2013-08-25/accounts]# service httpd configtest     Syntax OK     root@host [/home3/backup/2013-08-25/accounts]#      Notice that it used to work fine. I got something: root@host [/home3/backup/2013-08-25/accounts]# service httpd status Terminated               root@host [/home3/backup/2013-08-25/accounts]# 403 Forbidden             Access is forbidden to the requested page:               localhost/whm-server-status (port 80)             Please forward this error screen to localhost's [1]WebMaster.          __________________________________________________________________                   Apache/2.2.23 (Unix) mod_ssl/2.2.23 OpenSSL/1.0.0-fips         mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635         Server at localhost Port 80          References             1. mailto:webmaster@buildingsuperteams.com?subject=Error%20message%20[403]%20403%20Forbidden%20for%20localhost/whm-server-status%20port%2080%20on%20Thursday,%2029-Aug-2013%2023:43:54%20MDT      forbidden what? Restarting the whole server works. Restarting apache doesn't/


title: filesystem that works under qemu and I can mount on my host

text: I'm using `qemu` for different kind of tasks, I would like to pick a filesystem that is both qemu-compatible and easy to mount under my host. I already discarded both `qcow` and `qcow2` because apparently they are not supported as filesystem by the linux kernel, there is a little trick but it doesn't meet my needs, I basically need to write and read freely from/to this image file, not just take a look when this image is hotplugged to qemu. Could you suggest a way to create a qemu filesystem that will be usable under a GNU/Linux host as any other partition/hard disk ?


title: Performance differences between pipelines and process substitution

text: I tend to use pipelines in my bash scripts over process substitution in most situations, especially in cases of using multiple sets of commands as it seems more readable to do `... | ... | ...` over `... < <(... < <(...))`. I'm wondering though why using process substitution is much faster in some situations than using a pipeline. To test this, I `time`d two scripts using `10000` iterations of the same attached commands with one using a pipeline and another using process substitution. Scripts: `pipeline.bash`:               for i in {1..10000}; do         echo foo bar |         while read; do             echo $REPLY >/dev/null         done     done      `proc-sub.bash`               for i in {1..10000}; do         while read; do             echo $REPLY >/dev/null         done < <(echo foo bar)     done      Results:               ~$ time ./pipeline.bash          real    0m17.678s     user    0m14.666s     sys     0m14.807s          ~$ time ./proc-sub.bash          real    0m8.479s     user    0m4.649s     sys     0m6.358s      I know that pipelines create a sub process whereas process substitution creates a named pipe or some file in `/dev/fd`, but am unclear about how those differences impact performance.


title: Remove ^M character from log files

text: Remove ^M character from log files. In my script I redirect output of my program to a log file. The output of my log file contains some ^M (newline) characters. I need to remove them while running itself. My command:               $ java -jar test.jar >> test.log       `test.log` has: > Starting script ... ^M Starting script ...Initializing


title: Make feh notice newly plugged-in monitor for image scaling

text: I use my laptop with multiple monitor, I want `feh` to understand that a new monitor has plugged in and scale wallpaper image accordingly. I use the following code, but when a new monitor is plugged in, `feh` tiles the last wallpaper on all monitors.                feh --bg-scale ~/Pictures/wallpaper/example.jpg


title: How to put current line at top/center/bottom of screen in vim?

text: Any quicker navigation trick to place the line at which the cursor is at the moment to the   * top of the screen?   * center of the screen?   * bottom of the screen?


title: How do I resize GNOME shell top bar

text: I am on Ubuntu 12.04 and installed gnome-shell, but I found the top bar is larger than it normally is, how can I change its size?


title: Is there a way to install only the base Fedora system?

text: I'd like to install a base Fedora system meaning without all the other programs/applications that come when installing a Gnome/KDE/XFCE spins. How do I do this? This is the first time I'd be installing Fedora and I'm quite accustomed to Arch Linux so I want the same approach, or similar approach of building from the base install up to the system of my preference. I've been reading the documentation and came across using the boot options `linux text` but I don't think this will install a base Fedora system, just that the installation menu system will be in text mode, but I could be wrong.


title: Is it possible to make scp fail when you do a local copy?

text: Is it possible to make `scp` fail when you do a local copy? I find it annoying to accidently create files with names like `192.168.11.5` when I meant to type `192.168.11.5:` and hence copying the file to the remote computer.


title: A distro that supports intel/nvidia hybrid graphics out of the box

text: I've spent so much time trying to get various flavours of Linux to run on my Dell XPS LS02 laptop which only has a HDMI output. I've tried all sorts of solutions and methods including http://bumblebee- project.org/ However none have managed to get me a stable second display working. The question, is there any distribution that supports the intel/nvidia(optimus) hybrid chipset out of the box?


title: Why am I having ghosting and tearing with the i3 window manager paired with xcompgmr when tiling terminals vertically?

text: I'm using the _i3_ tiling window manager. As it doesn't do compositing, I've enabled the `xcompmgr` compositor in my _~/.i3/config_ file as well as `feh` to display a wallpaper:               exec --no-startup-id xcompmgr -c -C -t-5 -l-5 -r4.2 -o.55     exec feh --bg-scale ~/Downloads/Arch-Linux-Bluewave.jpg      Now `lxterminal` supports translucency etc. but when I arrange my terminals vertically, some **ghosting** , tearing and decoration artifacts from other workspaces appear to the top right - and disappear as soon as the window is tiled horizontally. Furthermore, when `transmission-gtk` "floats" a dialog box, moving that box around leaves ghosting in the form of tiny horizontal lines which remain until some refresh. Is there any workaround?


title: Sharing private keys across machines

text: Say I have **local** access to two machines **A** and **B** and **remote** access to machine **C**. If I generate a public-private pair of keys for accessing machine C from A, can I share the private key with machine B to access machine C from it? Or do I need to generate a new public-private pair? At the moment I have a pair of keys working to access C from A, but when I use this private key from B it doesn't work. In case it matters, I use a config file for this as follows:               Host XXX     User XXX     HostName XXX     IdentityFile ZZZ      Where ZZZ points to the key in B (different paths in the machines A and B) I am using the same username in both.


title: Permissions for a submission script

text: I'm a TA for an introductory Python programming class (all work is done from the terminal), and I'm writing a project submission script. Ideally I want a directory setup like this:               submissions/        user1/           project1/           ...        user2/           project1/           ...        ...      Ideally, I'd like nothing inside the submissions directory to be readable or writable to any of the users, and I'll provide a submission script that copies all of their work into the right place. Currently I have a little Perl script that does the submission part and works when I use it, but how can I set up the permissions (or the script) so that the students don't get a `permission denied` error while running the script (requiring write permissions to the submissions directory), but they don't simultaneously have write permissions?


title: Can't apply chmod to a file

text: I have a file on my HDD,               cd /media/celebisait/5AC69788C6976355      There is my file called `myFile.tar.gz`. I do a`ls -l`,               -rw------- 2 celebisait celebisait  1387745311 Jun  6  2013 myFile.tar.gz      Everything seems fine. However, when I do,               $ sudo chmod 755 myFile.tar.gz      I do not have any errors but nothing happens, i.e., when I do `ls -l` again, I get the same output,               -rw------- 2 celebisait celebisait  1387745311 Jun  6  2013 myFile.tar.gz      Chmod does not change.. Why? PS: I use Ubuntu 13.04. ## Edit:               $ cd /media/celebisait/5AC69788C6976355     $ df          Filesystem     1K-blocks      Used Available Use% Mounted on     /dev/sda2       89873576  42976028  42325544  51% /     none                   4         0         4   0% /sys/fs/cgroup     udev            16436736         4  16436732   1% /dev     tmpfs            3289260       920   3288340   1% /run     none                5120         0      5120   0% /run/lock     none            16446280       764  16445516   1% /run/shm     none              102400        52    102348   1% /run/user     /dev/sda1          94759      2208     92551   3% /boot/efi     /dev/sdb1      767999996 541212516 226787480  71% /media/celebisait/5AC69788C6976355     /dev/sdb2      767999996   1466472 766533524   1% /media/celebisait/54D09DBDD09DA5B0      ## Edit 2:               $ cd /media/celebisait/5AC69788C6976355     $ mount          /dev/sda2 on / type ext4 (rw,errors=remount-ro)     proc on /proc type proc (rw,noexec,nosuid,nodev)     sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)     none on /sys/fs/cgroup type tmpfs (rw)     none on /sys/fs/fuse/connections type fusectl (rw)     none on /sys/kernel/debug type debugfs (rw)     none on /sys/kernel/security type securityfs (rw)     none on /sys/firmware/efi/efivars type efivarfs (rw)     udev on /dev type devtmpfs (rw,mode=0755)     devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)     tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)     none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)     none on /run/shm type tmpfs (rw,nosuid,nodev)     none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)     /dev/sda1 on /boot/efi type vfat (rw)     binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)     gvfsd-fuse on /run/user/celebisait/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=celebisait)     /dev/sdb1 on /media/celebisait/5AC69788C6976355 type fuseblk (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096)     /dev/sdb2 on /media/celebisait/54D09DBDD09DA5B0 type fuseblk (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096)      ## Edit 3:               $ sudo fdisk -l /dev/sdb1          Disk /dev/sdb1: 786.4 GB, 786432000000 bytes     255 heads, 63 sectors/track, 95611 cylinders, total 1536000000 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 4096 bytes     I/O size (minimum/optimal): 4096 bytes / 4096 bytes     Disk identifier: 0x6e697373          This doesn't look like a partition table     Probably you selected the wrong device.               Device Boot      Start         End      Blocks   Id  System     /dev/sdb1p1   ?  1936269394  3772285809   918008208   4f  QNX4.x 3rd part     Partition 1 does not start on physical sector boundary.     /dev/sdb1p2   ?  1917848077  2462285169   272218546+  73  Unknown     Partition 2 does not start on physical sector boundary.     /dev/sdb1p3   ?  1818575915  2362751050   272087568   2b  Unknown     Partition 3 does not start on physical sector boundary.     /dev/sdb1p4   ?  2844524554  2844579527       27487   61  SpeedStor     Partition 4 does not start on physical sector boundary.          Partition table entries are not in disk order      ## Edit 4:               $ sudo fdisk -l /dev/sdb          Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes     255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 4096 bytes     I/O size (minimum/optimal): 4096 bytes / 4096 bytes     Disk identifier: 0x9c73d093             Device Boot      Start         End      Blocks   Id  System     /dev/sdb1            2048  1536002047   768000000    7  HPFS/NTFS/exFAT     /dev/sdb2      1536002048  3072002047   768000000    7  HPFS/NTFS/exFAT     /dev/sdb3      3072002048  3907026943   417512448    7  HPFS/NTFS/exFAT


title: zsh autocomplete directory

text: I'm new to zsh and one thing that I do quite often is execute shell scripts that are in a directory of mine called Scripts. I'm not always inside of the Scripts directory, however... I may be in $HOME and therefore would like to just type `Sc<Tab>` and have it autocomplete to `Scripts/` and then be able to autocomplete which script I want to run from there, of course... However, zsh doesn't seem to do this by default. It will only autocomplete directory names for me if I have typed `ls` or `cd`. If I'm trying to autocomplete a directory first, it just simply won't do it. Is there a way to change this behavior? Edit: I figured out that I could do `./Sc<Tab>` and it would autocomplete for me. I guess I'm just used to not having to type out `./` before something to get it to autocomplete, so I'd still like to know if this is possible in zsh, but this is an acceptable workaround for now.


title: Linux 3D graphic libraries

text: What libraries can be used for 3D graphics on Linux? Are there big differences for 3D graphics programming between Linux and Windows? I found about DirectX and OpenGl by searching, but I'm not sure that these are graphic libraries.


title: First and last day of a month

text: Given two numbers, month and year, how can I compute the first and the last day of that month ? My goal is to output these three lines:   1. month / year (month in textual form but that is trivial)   2. for each day of the month: name of the day of the week for the current day: Fri. & Sat. & Sun. [...]   3. day number within the month: 1 & 2 & 3 [...] & 28 & .. ? I'm looking for a solution using GNU `date` or BSD `date` (on OS X).


title: File descriptors & shell scripting

text: I am having a very hard time understanding how does one use file descriptors in shell scripts. I know the basics such as               exec 5 > /tmp/foo      So fd 5 is attached to foo for writing.               exec 6 < /tmp/bar      … for reading.               exec 5>&-      … close fd. Now what does this do?               #!/bin/bash          exec 5 > /tmp/foo      exec 6 < /tmp/bar           cat <&6 | while read a     do          echo $a >&5     done      As i understand `&5` closes the fd, so how is the output still being re- directed successfully after each call? This is a copy pasta from : Here It claims using this over a simple `echo $a > file` would make it much quicker, I however fail to understand. I would appreciate any links to decent tutorial. I google powers seem to be failing me.


title: How to save a GNOME 3 session

text: GNOME 2 allows one to either save the session automatically or manually (i.e. _save the session as it looks right now_ ). This is a nice feature because it restores the various desktop states between logins (and system restarts):   * which apps were open   * where (physically) on the desktop were they open   * what specific window sizes were these apps set to Looking around, I can't find the feature in GNOME 3? Did I not look hard enough?


title: Python library conflict with lower version

text: I am trying to reinstall yum in `CentOS`. Because I made some mistake by removing python.               so I got error as follows     There was a problem importing one of the Python modules     required to run yum. The error leading to this problem was:             No module named rpm          Please install a package which provides this module, or     verify that the module is installed correctly.          It's possible that the above module doesn't match the     current version of Python, which is:     2.4.3 (#1, Nov 11 2010, 13:34:43)      [GCC 4.1.2 20080704 (Red Hat 4.1.2-48)]          If you cannot solve this problem yourself, please go to      the yum faq at:       http://wiki.linux.duke.edu/YumFaq      And then I followed some tutorial from http://www.electrictoolbox.com/install- yum-with-rpm-on-centos/ But I got an error while trying to install python libs               error: Failed dependencies:         python < 2.4.3-32.el5 conflicts with python-libs-2.4.3-43.el5.i386      How can I fix this? **Edit**               rpm -qa|grep python     python-iniparse-0.2.3-4.el5     python-2.4.3-27.el5_5.3     libselinux-python-1.33.4-5.5.el5     gamin-python-0.1.7-8.el5     python-elementtree-1.2.6-5     python-urlgrabber-3.1.0-6.el5     audit-libs-python-1.7.17-3.el5     libxml2-python-2.6.26-2.1.2.8.el5_5.1     python-sqlite-1.1.7-1.2.1


title: High CPU utilization with zip command

text: When I am using the `zip` utility in Linux to compress files, CPU utilization is going to 100%. Can anybody help me why CPU utilization is so high? I'm using the command:               zip file_name *.xml


title: Unix - How to append text to every line of a file except for the header line/first line

text: I have a file say abc.txt with following data (real data has many records,say around 200) > Sno | Name   >  1 | Jack   >  2 | Jill   >  3 | June Now how do I append text to make my file look like this, > Sno | Name | Place   >  1 | Jack | Paris   >  2 | Jill | Paris   >  3 | June | Paris I tried replacing globally ,but first line should be appended with different text.So please help me out guys.


title: Mixing audio tracks in a video file in Linux

text: I have a video file that has two audio tracks. The first one is background music and the other one is commentary. I want to merge those tracks together. This is the media information I got from ffmpeg:               Input #0, avi, from '24.avi':       Metadata:         encoder         : BandiAviMuxer 1.0       Duration: 00:17:49.13, start: 0.000000, bitrate: 10514 kb/s         Stream #0:0: Video: mpeg1video (MPEG / 0x4745504D), yuv420p, 1280x1024 [SAR 1:1 DAR 5:4], 104857 kb/s, 30 tbr, 30 tbn, 30 tbc         Stream #0:1: Audio: mp2 (P[0][0][0] / 0x0050), 48000 Hz, stereo, s16p, 192 kb/s         Stream #0:2: Audio: mp2 (P[0][0][0] / 0x0050), 48000 Hz, stereo, s16p, 192 kb/s      I am looking for a GUI tool, because I need to be able to interactively fine tune the relative volume of the audio tracks. I may need to apply different volume ratios throughout the video. So I need some ability to edit volume as curves, with keypoints and some simple interpolations between them. I haven't done any video editing recently so I do not know what the possibilities are. Using a Linux only software is fine with me.


title: Lubuntu PowerPC with no apt repositories?

text: I've installed Lubuntu 13.04 on my G4 Mac Mini, however it didn't have any `apt` repositories, except from the CD. I've copied over the repositories from my i386 installation, but it can't find some of them. What repositories do I need to make it work? **Output from`apt-get update`:**               ...          W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/raring-security/main/binary-powerpc/Packages  404  Not Found [IP: 91.189.92.200 80]          W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/raring-security/restricted/binary-powerpc/Packages  404  Not Found [IP: 91.189.92.200 80]          W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/raring-security/universe/binary-powerpc/Packages  404  Not Found [IP: 91.189.92.200 80]          W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/raring-security/multiverse/binary-powerpc/Packages  404  Not Found [IP: 91.189.92.200 80]          W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/raring/main/binary-powerpc/Packages  404  Not Found [IP: 91.189.92.177 80]          W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/raring/restricted/binary-powerpc/Packages  404  Not Found [IP: 91.189.92.177 80]          W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/raring/universe/binary-powerpc/Packages  404  Not Found [IP: 91.189.92.177 80]          W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/raring/multiverse/binary-powerpc/Packages  404  Not Found [IP: 91.189.92.177 80]          W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/raring-updates/main/binary-powerpc/Packages  404  Not Found [IP: 91.189.92.177 80]          W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/raring-updates/restricted/binary-powerpc/Packages  404  Not Found [IP: 91.189.92.177 80]          W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/raring-updates/universe/binary-powerpc/Packages  404  Not Found [IP: 91.189.92.177 80]          W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/raring-updates/multiverse/binary-powerpc/Packages  404  Not Found [IP: 91.189.92.177 80]          W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/raring-backports/main/binary-powerpc/Packages  404  Not Found [IP: 91.189.92.177 80]          W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/raring-backports/restricted/binary-powerpc/Packages  404  Not Found [IP: 91.189.92.177 80]          W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/raring-backports/universe/binary-powerpc/Packages  404  Not Found [IP: 91.189.92.177 80]          W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/raring-backports/multiverse/binary-powerpc/Packages  404  Not Found [IP: 91.189.92.177 80]          E: Some index files failed to download. They have been ignored, or old ones used instead.      **Old`/etc/apt/sources.list`:**               deb cdrom:[Lubuntu 13.04 _Raring Ringtail_ - Release powerpc (20130424)]/ raring main multiverse restricted universe      **`/etc/apt/sources.list` copied from i386:**               # deb cdrom:[Lubuntu 13.04 _Raring Ringtail_ - Release i386 (20130423.1)]/ raring main multiverse restricted universe          # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to     # newer versions of the distribution.     deb http://gb.archive.ubuntu.com/ubuntu/ raring main restricted     deb-src http://gb.archive.ubuntu.com/ubuntu/ raring main restricted          ## Major bug fix updates produced after the final release of the     ## distribution.     deb http://gb.archive.ubuntu.com/ubuntu/ raring-updates main restricted     deb-src http://gb.archive.ubuntu.com/ubuntu/ raring-updates main restricted          ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu     ## team. Also, please note that software in universe WILL NOT receive any     ## review or updates from the Ubuntu security team.     deb http://gb.archive.ubuntu.com/ubuntu/ raring universe     deb-src http://gb.archive.ubuntu.com/ubuntu/ raring universe     deb http://gb.archive.ubuntu.com/ubuntu/ raring-updates universe     deb-src http://gb.archive.ubuntu.com/ubuntu/ raring-updates universe          ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu      ## team, and may not be under a free licence. Please satisfy yourself as to      ## your rights to use the software. Also, please note that software in      ## multiverse WILL NOT receive any review or updates from the Ubuntu     ## security team.     deb http://gb.archive.ubuntu.com/ubuntu/ raring multiverse     deb-src http://gb.archive.ubuntu.com/ubuntu/ raring multiverse     deb http://gb.archive.ubuntu.com/ubuntu/ raring-updates multiverse     deb-src http://gb.archive.ubuntu.com/ubuntu/ raring-updates multiverse          ## N.B. software from this repository may not have been tested as     ## extensively as that contained in the main release, although it includes     ## newer versions of some applications which may provide useful features.     ## Also, please note that software in backports WILL NOT receive any review     ## or updates from the Ubuntu security team.     deb http://gb.archive.ubuntu.com/ubuntu/ raring-backports main restricted universe multiverse     deb-src http://gb.archive.ubuntu.com/ubuntu/ raring-backports main restricted universe multiverse          deb http://security.ubuntu.com/ubuntu raring-security main restricted     deb-src http://security.ubuntu.com/ubuntu raring-security main restricted     deb http://security.ubuntu.com/ubuntu raring-security universe     deb-src http://security.ubuntu.com/ubuntu raring-security universe     deb http://security.ubuntu.com/ubuntu raring-security multiverse     deb-src http://security.ubuntu.com/ubuntu raring-security multiverse          ## Uncomment the following two lines to add software from Canonical's     ## 'partner' repository.     ## This software is not part of Ubuntu, but is offered by Canonical and the     ## respective vendors as a service to Ubuntu users.     # deb http://archive.canonical.com/ubuntu raring partner     # deb-src http://archive.canonical.com/ubuntu raring partner          ## This software is not part of Ubuntu, but is offered by third-party     ## developers who want to ship their latest software.     deb http://extras.ubuntu.com/ubuntu raring main     deb-src http://extras.ubuntu.com/ubuntu raring main


title: ntpd takes 9 hours to sync

text: I had a situation lately with a host that need up to date ntp servers. We had during the weekend a crash of our internet router. When everything came back to hte normal our application was still complaining about NTP. We discovered that the ntp client took 9h to get sync. Here is the ntpd's logs :               Aug 19 15:31:15 host ntpd[26550]: kernel time sync status 0040     Aug 19 15:31:15 host ntpd[26550]: frequency initialized 97.149 PPM from /tmp/drift     Aug 20 00:29:24 host ntpd[26550]: synchronized to 192.168.10.13, stratum 3     Aug 20 00:29:24 host ntpd[26550]: kernel time sync disabled 0001      When the issue occured here is the output of peers state :               # ntpq     ntpq> peers     remote refid st t when poll reach delay offset jitter     ==============================================================================     srv1 145.238.203.10 3 u 31 64 377 0.714 -685.16 6.388     srv2 145.238.203.10 3 u 5 64 377 0.652 -1385.7 12.165      Someone told me that I should use minpoll and maxpoll settings to solve this issue. What should I do to avoid 9H NTP synchronisation ?


title: Indexing and modifying Bash parameter array $@

text: Is it possible to refer to indexes in `$@`? I can't find any reference to use like the following anywhere in GrayCat's wiki, and the Advanced Scripting Guide and others assign this to a different variable before modifying that instead.               $ echo ${@[0]}     -bash: ${@[0]}: bad substitution      The goal is DRY: The first argument is used for one thing, and the rest for something else, and I'd like to avoid duplicating either the code to normalize, the `$@` array, or to create a separate function for this (although at this point it's probably the easiest way out). Clarification: The object was to modify the values of the _variable-length_ `$@` to make the code easier to debug. The current version is a bit too hacky for my liking, although it works even for bizarre paths like               $'--$`\! *@ \a\b\e\E\f\r\t\v\\\"\' \n'      **Update** : Looks like this isn't possible. The code now uses both code and data duplication, but at least it works:               path_common()     {         # Get the deepest common path.         local common_path="$(echo -n "${1:-}x" | tr -s '/')"         common_path="${common_path%x}"         shift # $1 is obviously part of $1         local path              while [ -n "${1+defined}" ]         do             path="$(echo -n "${1}x" | tr -s '/')"             path="${path%x}"             if [[ "${path%/}/" = "${common_path%/}/"* ]]             then                 shift             else                 new_common_path="${common_path%/*}"                 [ "$new_common_path" = "$common_path" ] && return 1 # Dead end                 common_path="$new_common_path"             fi         done         printf %s "$common_path"     }      Bounty goes to anyone who can get rid of the **duplication of code** to collapse duplicate slashes or **duplication of data** to hold `$1` and the other parameters, or both, while keeping the code a reasonable size and succeeding all the unit tests:               test "$(path_common /a/b/c/d /a/b/e/f; echo x)" = /a/bx     test "$(path_common /long/names/foo /long/names/bar; echo x)" = /long/namesx     test "$(path_common / /a/b/c; echo x)" = /x     test "$(path_common a/b/c/d a/b/e/f ; echo x)" = a/bx     test "$(path_common ./a/b/c/d ./a/b/e/f; echo x)" = ./a/bx     test "$(path_common $'\n/\n/\n' $'\n/\n'; echo x)" = $'\n/\n'x     test "$(path_common --/-- --; echo x)" = '--x'     test "$(path_common '' ''; echo x)" = x     test "$(path_common /foo/bar ''; echo x)" = x     test "$(path_common /foo /fo; echo x)" = x     test "$(path_common $'--$`\! *@ \a\b\e\E\f\r\t\v\\\"\' \n' $'--$`\! *@ \a\b\e\E\f\r\t\v\\\"\' \n'; echo x)" = $'--$`\! *@ \a\b\e\E\f\r\t\v\\\"\' \n'x     test "$(path_common /foo/bar //foo//bar//baz; echo x)" = /foo/barx     test "$(path_common foo foo; echo x)" = foox     test "$(path_common /fo /foo; echo x)" = x


title: Linux apache set custom launch page Virtualhosts

text: I set up DNS and virtualhosts on my Linux system but when surfing to ex: www.vb1.be it shows the correct directory (home/vb1/) and their subdirectories. I know this is because the main html file that should be loaded isn't named index.html but homepage.html. So how can I set this homepage.html to launch every time someone surfs to www.vb1.be?               <VirtualHost *:80>         ServerAdmin webmaster@example.com         DocumentRoot /home/vb1.be         ServerName vb1.be         ServerAlias www.vb1.be         ErrorLog logs/vb1.be-error_log         CustomLog logs/vb1.be-access_log common     </VirtualHost>


title: How to redirect to my squid proxy using iptables since DNAT target: only valid in nat table

text: I want to redirect the traffic in my lan network through squid proxy but I am having some problems with `iptables` rules. When I use the following rule:               # iptables -I FORWARD -s 192.168.1.0/255.255.255.0 -p tcp --dport 80 -j DNAT --to-destination 192.168.1.196:3128      I get the following error:               x_tables: ip_tables: DNAT target: only valid in nat table, not filter      I have tried using `PREROUTING` chain but there is nothing like this in my iptables:               # iptables -I PREROUTING -s 192.168.1.0/255.255.255.0 -p tcp --dport 80 -j DNAT --to-destination 192.168.1.196:3128     iptables: No chain/target/match by that name.      I am using iptables version `v.1.4.10`               # iptables -t nat -L PREROUTING     Chain PREROUTING (policy ACCEPT)     target     prot opt source               destination              prerouting_rule  all  --  anywhere             anywhere                 zone_lan_prerouting  all  --  anywhere             anywhere                 zone_wan_prerouting  all  --  anywhere             anywhere      my whole `iptables -nLv`               root@OpenWrt:~# iptables -L -n -v     Chain INPUT (policy ACCEPT 0 packets, 0 bytes)      pkts bytes target     prot opt in     out     source               destination                776 93902 ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0           ctstate RELATED,ESTABLISHED          0     0 ACCEPT     all  --  lo     *       0.0.0.0/0            0.0.0.0/0                 3231  164K syn_flood  tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp flags:0x17/0x02       7098  429K input_rule  all  --  *      *       0.0.0.0/0            0.0.0.0/0                 7096  429K input      all  --  *      *       0.0.0.0/0            0.0.0.0/0                     Chain FORWARD (policy DROP 0 packets, 0 bytes)      pkts bytes target     prot opt in     out     source               destination                  0     0 DROP       udp  --  *      *       0.0.0.0/0            0.0.0.0/0           MAC XX:XX:XX:XX:XX:XX udp spt:22509           0     0 DROP       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           MAC XX:XX:XX:XX:XX:XX tcp spts:59000:65399          0     0 DROP       udp  --  *      *       0.0.0.0/0            0.0.0.0/0           MAC XX:XX:XX:XX:XX:XX udp spts:49950:65399       8271 3071K ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0           ctstate RELATED,ESTABLISHED        451 44484 forwarding_rule  all  --  *      *       0.0.0.0/0            0.0.0.0/0                  451 44484 forward    all  --  *      *       0.0.0.0/0            0.0.0.0/0                    5   276 reject     all  --  *      *       0.0.0.0/0            0.0.0.0/0                     Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)      pkts bytes target     prot opt in     out     source               destination               7408  581K ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0           ctstate RELATED,ESTABLISHED          0     0 ACCEPT     all  --  *      lo      0.0.0.0/0            0.0.0.0/0                  206 13814 output_rule  all  --  *      *       0.0.0.0/0            0.0.0.0/0                  206 13814 output     all  --  *      *       0.0.0.0/0            0.0.0.0/0                     Chain forward (1 references)      pkts bytes target     prot opt in     out     source               destination                446 44208 zone_lan_forward  all  --  br-lan *       0.0.0.0/0            0.0.0.0/0                    0     0 zone_wan_forward  all  --  eth1   *       0.0.0.0/0            0.0.0.0/0                     Chain forwarding_lan (1 references)      pkts bytes target     prot opt in     out     source               destination                   Chain forwarding_rule (1 references)      pkts bytes target     prot opt in     out     source               destination                   Chain forwarding_wan (1 references)      pkts bytes target     prot opt in     out     source               destination                   Chain input (1 references)      pkts bytes target     prot opt in     out     source               destination                515 43070 zone_lan   all  --  br-lan *       0.0.0.0/0            0.0.0.0/0                 6560  385K zone_wan   all  --  eth1   *       0.0.0.0/0            0.0.0.0/0                     Chain input_lan (1 references)      pkts bytes target     prot opt in     out     source               destination                   Chain input_rule (1 references)      pkts bytes target     prot opt in     out     source               destination                   Chain input_wan (1 references)      pkts bytes target     prot opt in     out     source               destination                   Chain output (1 references)      pkts bytes target     prot opt in     out     source               destination                206 13814 zone_lan_ACCEPT  all  --  *      *       0.0.0.0/0            0.0.0.0/0                  203 13301 zone_wan_ACCEPT  all  --  *      *       0.0.0.0/0            0.0.0.0/0                     Chain output_rule (1 references)      pkts bytes target     prot opt in     out     source               destination                   Chain reject (5 references)      pkts bytes target     prot opt in     out     source               destination               3249  166K REJECT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           reject-with tcp-reset       3257  198K REJECT     all  --  *      *       0.0.0.0/0            0.0.0.0/0           reject-with icmp-port-unreachable           Chain syn_flood (1 references)      pkts bytes target     prot opt in     out     source               destination               3231  164K RETURN     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp flags:0x17/0x02 limit: avg 25/sec burst 50          0     0 DROP       all  --  *      *       0.0.0.0/0            0.0.0.0/0                     Chain zone_lan (1 references)      pkts bytes target     prot opt in     out     source               destination                515 43070 input_lan  all  --  *      *       0.0.0.0/0            0.0.0.0/0                  515 43070 zone_lan_ACCEPT  all  --  *      *       0.0.0.0/0            0.0.0.0/0                     Chain zone_lan_ACCEPT (2 references)      pkts bytes target     prot opt in     out     source               destination                  3   513 ACCEPT     all  --  *      br-lan  0.0.0.0/0            0.0.0.0/0                  515 43070 ACCEPT     all  --  br-lan *       0.0.0.0/0            0.0.0.0/0                     Chain zone_lan_DROP (0 references)      pkts bytes target     prot opt in     out     source               destination                  0     0 DROP       all  --  *      br-lan  0.0.0.0/0            0.0.0.0/0                    0     0 DROP       all  --  br-lan *       0.0.0.0/0            0.0.0.0/0                     Chain zone_lan_REJECT (1 references)      pkts bytes target     prot opt in     out     source               destination                  0     0 reject     all  --  *      br-lan  0.0.0.0/0            0.0.0.0/0                    5   272 reject     all  --  br-lan *       0.0.0.0/0            0.0.0.0/0                     Chain zone_lan_forward (1 references)      pkts bytes target     prot opt in     out     source               destination                446 44208 zone_wan_ACCEPT  all  --  *      *       0.0.0.0/0            0.0.0.0/0                    5   272 forwarding_lan  all  --  *      *       0.0.0.0/0            0.0.0.0/0                    5   272 zone_lan_REJECT  all  --  *      *       0.0.0.0/0            0.0.0.0/0                     Chain zone_wan (1 references)      pkts bytes target     prot opt in     out     source               destination                 64 21010 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0           udp dpt:68          0     0 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0           icmp type 8       6496  364K input_wan  all  --  *      *       0.0.0.0/0            0.0.0.0/0                 6496  364K zone_wan_REJECT  all  --  *      *       0.0.0.0/0            0.0.0.0/0                     Chain zone_wan_ACCEPT (2 references)      pkts bytes target     prot opt in     out     source               destination                644 57237 ACCEPT     all  --  *      eth1    0.0.0.0/0            0.0.0.0/0                    0     0 ACCEPT     all  --  eth1   *       0.0.0.0/0            0.0.0.0/0                     Chain zone_wan_DROP (0 references)      pkts bytes target     prot opt in     out     source               destination                  0     0 DROP       all  --  *      eth1    0.0.0.0/0            0.0.0.0/0                    0     0 DROP       all  --  eth1   *       0.0.0.0/0            0.0.0.0/0                     Chain zone_wan_REJECT (2 references)      pkts bytes target     prot opt in     out     source               destination                  0     0 reject     all  --  *      eth1    0.0.0.0/0            0.0.0.0/0                 6496  364K reject     all  --  eth1   *       0.0.0.0/0            0.0.0.0/0                     Chain zone_wan_forward (1 references)      pkts bytes target     prot opt in     out     source               destination                  0     0 forwarding_wan  all  --  *      *       0.0.0.0/0            0.0.0.0/0                    0     0 zone_wan_REJECT  all  --  *      *       0.0.0.0/0            0.0.0.0/0


title: How can I know if a virtual package is "installed" on a Debian system?

text: Some packages, have a `Provides:` header. For example, the package `postfix` on Debian Wheezy has `Provides: mail-transport-agent`. The package `mail-transport-agent` which doesn't exist physically is considered as a "virtual" package. **How can I know, on a Debian based system, if a given virtual package is "installed" (or "provided")? Can I list every "provided" virtual package?** _Hint_ : to list every existing virtual package, installed or not, do: `aptitude search "~v"`


title: What is the referent of a file descriptor?

text: My understanding is that a _file descriptor_ is an integer which is a key in the kernel's per-process mapping to objects such as `open()`ed files, pipes, sockets, etc. Is there a proper, short, and specific name for “open files/sockets/pipes/...”, the referents of file descriptors? Calling them “files” leads to confusion with unopened files stored in the file system. Simply referring to file descriptors does not adequately describe the semantics (e.g. copying _the integer_ between processes is useless). Consulting The Open Group Base Specifications and my own system's manpages leads me to the conclusion that the referent of a file descriptor is an _object_ and when it is specifically an open file it is, well, an _open file_. Is there a more specific term than _object_?


title: Why do deleted files continually reappear?

text: I've been having a strange issue recently, where I would delete files from a location (i.e. Desktop), and then empty the Trash. However, a day or so later (I'm not sure exactly what triggers it), the files reappear with new permissions (644). How do I either figure out what's causing it, or stop it completely? It's been going on for quite sometime now, and it's rather annoying considering I spent ~1 hour cleaning my home folder, and now it's back to the way it was. P.S. I'm running Linux Mint 15 Olivia The cron jobs, as requested:               # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ luckybackup entries ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     @reboot    sleep 180;    /usr/bin/luckybackup -c --no-questions --skip-critical /root/.luckyBackup/profiles/Jason.profile > /root/.luckyBackup/logs/Jason-LastCronLog.log 2>&1     # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ end of luckybackup entries ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      and               0 21 * * * fwbackups-run -l 'Daily Backup' # autogenerated by fwbackups


title: What does the "s" mean in the following permission:"-rwsr-x---"

text: I know about the different permissions and how to change permissions, etc. But I have just seen one of my files has the permissions: > -rwsr-x--- 1 root scott 26974 Dec 8 2010 extjob What does the "s" mean, in the permissions? There is another question on U&L that has a little to do with the same permissions, but doesn't explain what they mean.


title: generating CSR correctly

text: When generating a CRS for private purposes (non-comercial) which of the fields are mandatory?                  Country Name (2 letter code) [US]: US        State or Province Name (full name) []: Texas        Locality Name (eg, city) []: Houston        Organization Name (eg, company) []: Your Company Inc        Organizational Unit Name (eg, section) []: Your Department        Common Name (eg, YOUR name) []: secure.yourcompanyname.com        Email Address []:      According to some sources, `Organization Name` is a required filed, but I am not part of any organization. Can I leave this empty?


title: list the timestamp of the files in "find" command

text: In bash, if I use `$ find ./ -name "*.sqlite"` , it will list all the sqlite files in current directory. I also want to see the modified time of the files, can anybody give me some help?


title: What linux kernel is arch linux using?

text: What is the version of the linux kernel that arch linux is using? Is it 3.0 or lower or higher? I couldn't find the info anywhere, I'm hoping someone else knows.


title: How to run a process with a specific group?

text: I have to start an application with my own user rights, but the group must be different. So, instead of:               $ ps -eo "user,group,args" | grep qbittorrent     morfik   morfik      /usr/bin/qbittorrent      it should be for example:               $ ps -eo "user,group,args" | grep qbittorrent     morfik   p2p      /usr/bin/qbittorrent      It also has to be done without asking about password. Is there a way to achieve this?


title: Return Carriage not working (Screen)

text: When I execute the command `screen -S myscreen -X stuff $'search add $1 \015'` from a shell it works perfectly. If I put it in a .sh file and run it as `sh /test.sh variablehere` it sends it to screen as `$'search add variablehere'`. Why would it normally work but not from `sh`? Im on Ubuntu Server if it matters.


title: Why is vlc not syncing audio and video correctly?

text: max@linux-vwzy:~> vlc --version     VLC media player 1.1.11 The Luggage (revision exported)     VLC version 1.1.11 The Luggage (exported)     Compiled by abuild on messiah (Aug 17 2011 15:23:16)     Compiler: gcc version 4.5.1 20101208 [gcc-4_5-branch revision 167585] (SUSE Linux)      This program comes with NO WARRANTY, to the extent permitted by law.     You may redistribute it under the terms of the GNU General Public License;     see the file named COPYING for details.     Written by the VideoLAN team; see the AUTHORS file.      Every file I seem to play requires me to bring the audio back about 0.4 of a second. I would post if this was for a couple video, but this is my entire video library which was encoded in different ways and created at different times. This only seemed to happen when I switched my window manager from KDE to dwm; it worked fine in vlc before that


title: What does Grep */* mean in KSH

text: In `ksh`, what does `grep */*[myPattern]` mean?


title: Run my own HTTP fast-browsing proxy a la Opera Mini?

text: Opera Mini is a great browser that works well on feature phones and iPhones. Unlike most browsers, it uses Opera's servers to transcode every page you browse to into a small, easy-to-render chunk that's sent to Opera Mini. What's a simple way for me to set up something similar on a very fast VPS out there so I can browse more comfortably on a 10KBps connection? I have no idea where to start, but I'm most comfortable in the NodeJS world.


title: Match a simple Regex

text: I need to match this: (tt\d{1,10}) in a file with the file ending txt. I have tried grep and ack-grep but without results.               ack-grep -G \.txt$ -g "(tt\d{1,10})"


title: Slacko vs Precise vs Lucid Puppy Linux

text: On **this site** you will find the 3 flavors of Puppy Linux in the question. I am not looking for an exhaustive list, but just a few differences between the three. This way I can make an informed decision on which to go with, instead of randomly picking or just getting the smallest one.


title: Where did Redhat derive from?

text: Where did Redhat derive from? Did it derive directly from Linus Torvaldis linux distro (2 years earlier) or did it have roots in BSD or System-V ?? I am just wondering how to classify Redhat in the Linux world.               1991     Linus Torvalds releases the Linux® kernel.     1993     Bob Young incorporates ACC Corporation, a catalog business      that sells Linux and UNIX software accessories and books,      and distributes a magazine called New York UNIX.     1994     Marc Ewing creates his own distribution of Linux, which he     names Red Hat® Linux. Released in October, it becomes known      as the Halloween release.


title: Is it normal that Fedora's yum list kernel-* shows two versions of kernel being used?

text: Is it true that the following shows that two versions of the kernel are being used? (Is the bold face -- the one enclosed in `**` showing what is currently loaded / used). Basically, I just created a VM using VMWare Fusion on a Macbook Pro, downloaded Fedora (the current one, which is 17), installed it and did the upgrade it prompted me to do in a window. (The ones I see are **kernel.x86_64** 3.3.4-5.fc17 and **kernel.x86_64** 3.6.10-2.fc17, so 3.3.4 and 3.6.10 are both running? How come the other kernel parts like `headers`, `modules`, or `tools` don't need to be running?)               $ yum list kernel-*     Loaded plugins: langpacks, presto, refresh-packagekit     (1/2): fedora/primary_db                                 |  14 MB     00:13          (2/2): updates/primary_db                                | 7.3 MB     00:06          Installed Packages     **kernel.x86_64**                       3.3.4-5.fc17    @koji-override-0/$releasever     **kernel.x86_64**                       3.6.10-2.fc17   @updates                         Available Packages     kernel-debug.x86_64                 3.6.10-2.fc17   updates                          kernel-debug-devel.x86_64           3.6.10-2.fc17   updates                          kernel-debug-modules-extra.x86_64   3.6.10-2.fc17   updates                          kernel-devel.x86_64                 3.6.10-2.fc17   updates                          kernel-doc.noarch                   3.6.10-2.fc17   updates                          kernel-headers.x86_64               3.6.10-2.fc17   updates        kernel-modules-extra.x86_64         3.6.10-2.fc17   updates                          kernel-tools.i686                   3.3.4-5.fc17    fedora                           kernel-tools.x86_64                 3.6.10-2.fc17   updates             [...]


title: Less-than sign after done in a shell script

text: Should be easy but want to know why the “left arrow” `<` is used instead of right arrow.                  if        fi        done < a.txt      What does it mean by left arrow? I thought since I am done with the condition, the output should be saved in a.txt with right arrow like done > a.txt Why we use left arrow for if-statement?


title: when is it safe to remove `/dev/.tmp-block-*` files

text: i'm currently experimenting with temporary lvm-snapshots (that is: create a snapshot of an LV, do something with the snapshot (e.g. run a backup), then destroy the snapshot. something along the lines:               lvcreate --snapshot --name "SNAP" --size 2GB lv01     dobackup /dev/VG1/SNAP     lvremove -f /dev/VG1/SNAP      the new `SNAP` "disk" has been created as with devicenumber `254:10`. now today i discovered, that i got a hidden device-file `/dev/.tmp- block-254:10` in my device-directory. i _assume_ that this is a left-over from the LV creation/removal. i ran `lvdisplay` but the device doesn't show up. also it seems that now process is currently using it (checked with `fuser /dev/.tmp-block-254:10` and `lsof /dev/.tmp-block-254:10`). can i safely remove this file (`rm /dev/.tmp-block-254:10`)?


title: frequency of occurence

text: I have a tab-delimited text file, that is around 3K lines long. I want to calculate frequency of data appearing in it, in 10,000 ranges. Input.txt               Price       500         1500        10001        15000       17000       25000       33000       39000       :     :     8000000       Output.txt               Pricerange      pricerangecount       0-10000          2                    10000-20000      3                    20000-30000      1                    30000-40000      2      :     :


title: PekWM doesn't List Minimized Windows

text: I recently installed the PekWM. I noticed when I minimize any window,it will be removed from `ATL+TAB` List. In other words "the minimized windows are not listed in `ALT+TAB` menu."   I want to know it is by design or it is a bug. If it is a bug is there any workaround to fix it.


title: Is there an approach to have feh --thumbnails do not display filename?

text: I have many pictures which are screen shots created from shutter and downloaded from web. These pictures have long file names. When I create thumbnails on these pictures via `feh -t`, these long file name will prevent `feh` to display many pictures in one row. And I did not find a solution for this on the `feh` man page. What can I do to display many pictures in a row?


title: Where did /usr/lib64 go and what is /usr/lib/x86_64-linux-gnu?

text: I have two Ubuntu-x86_64 systems. One is version 10.04, the other 12.04 and there is a difference in the structure of the lib directories. This doesn't surprise me, but I'm curious if anyone knows why. Is there a good™ reason why? **10.04** `2.6.32-38-server #83-Ubuntu SMP Wed Jan 4 11:26:59 UTC 2012 x86_64 GNU/Linux`               /usr/lib     /usr/lib32     /usr/lib64      **12.04** `3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012 x86_64 GNU/Linux`               /usr/lib     /usr/lib/x86_64-linux-gnu


title: How to get brightness keys working inside openbox session?

text: I'm using **Openbox** window manager **without DE**. I'd like to get **`fn + [brightness up/down icon]`** working like it is in GNOME/KDE, but i'm looking for lightweight solution without gnome-power- manager and similar. I know about `xbacklight` console program, but it takes little time to adjust brightness.


title: Why isn't my application receiving broadcast packets?

text: I have written a Qt application that listens for UDP broadcast packets on the network interface `p2p1`. I have installed the application in Fedora 17 i386 in a VirtualBox VM. For some reason, the application is not receiving any broadcast packets that I am sending. I installed and ran Wireshark and verified that the broadcast packets are indeed arriving on `p2p1`: ![image description](http://i.stack.imgur.com/Y1wOU.png) Does anyone have any idea why the application (which is listening for UDP packets on port `41720`) isn't receiving any of the packets? Some security setting or something?


title: Is there a standard command that always exits with a failure?

text: I want to test my script with a command that fails. I could use an existing command with bad arguments. I could also write a simple script that immediately exits with a failure. Both of these are easy to do and work for me, but if there is a standard command for this purpose, I'd like to use that instead.


title: How can I convert a chroot into a GRUB2 bootable ISO image?

text: Say I have a chroot containing what will be a working Linux system, and some additional init scripts to mount an overlay filesystem (e.g. AUFS) over it. I've also generated a GRUB2 boot menu. What commands would I use to:   * Install the requisite GRUB2 binary files into $CHROOT/boot, **without modifying the host MBR**   * Generate a bootable ISO from $CHROOT, with GRUB2 as the bootloader Note that I would rather use GRUB2 than syslinux, because syslinux does not automatically detect kernel and initrd versions.


title: Debian fails to boot after installing xfce 4.10, "lp: driver loaded but no device found" error

text: I decided to install xfce 4.10 on wheezy. However after rebooting I am getting stuck at some screen beginning with the line"               lp: driver loaded but no device found      Thing is, I can't do anything at this point. Does anyone have an idea on what the problem might be an how to solve it? ![I added a pic if the screen](http://i.stack.imgur.com/6EPxL.jpg)


title: I installed eclipse 4.4 on Slackware 14.1, but it has a bug in the Eclipse interface, how can I solve?

text: I downloaded through slackbuilds.org, but the interface is with square buttons and menus. ![Eclipse Luna](http://i.stack.imgur.com/nUQcO.png) I have no idea how to fix this defect, could someone help me?


title: Is there any media player that can browse Shoutcast streams?

text: I read that `exaile`, `banshee` (`banshee-extension-liveradio`), and `VLC` previously had tools allowing users to browse from a vast selection of Shoutcast streams for listening. I found some articles suggesting that these features may no longer be available, due to changes with Shoutcast. Are there any media players that are updated to work with Shoutcast, not just allowing playing of the audio, but browsing of the stations?


title: Is there any way attacker could use mkdir to compromise a system?

text: I'm setting up a restricted user account for user `ricardo`, a troublesome user on my system. I want to grant him the right to make directories using `sudo`, which he sometimes needs to do. I'm considering this rule in my `/etc/sudoers` file:               ricardo   ALL=(root) NOPASSWD: /bin/mkdir      Using only this rule, is there any way ricardo could intentionally or accidentally compromise the system?


title: linux boot manager has been blocked [SOLVED]

text: I've just installed arch linux on a UEFI motherboard. as bootloader I installed "gummiboot". I've got the following problem, when the computer stars I recive the message:               "Linux Boot Manager has been blocked due to current privacy policy."      and then starts Windows 8. I disabled the secure boot from the bios, but still not working. what should I do? SOLUTION: I've found in the settings of my Windows 8 (was installed when I bought the laptop) something that says: "total disable secure boot". I have pressed it and then it worked to boot the arch linux bootloader.


title: Linux GUI to track connections made from/to this computer

text: Is there a GUI to track any socket connection sent to this computer and which program that initiates it? Also if possible track any incoming connection sent to this computer and which program that handles it (as a realtime popup indicator if possible) ? For example:               "/bin/x owned by user x tries to connect to x.x.x.x:x"     "x.x.x.x connected to your computer on port 80 handled by /usr/bin/apache"      or at minimum, what should I learn to create this kind of software?


title: crontab error with (No MTA installed) but I use >/dev/null 2>&1

text: I'm new on linux user I try to run crontab to backup my database with vagrant user               * * * * * /usr/bin/mysqldump -h localhost -u root -p root mydb | gzip > /var/backup/all/database_`date +%Y-%m-%d`.sql.gz >/dev/null 2>&1      when the crontab runs there is no backup file in the folder (my backup/all has the permission scheme `755`). This is error from `/var/log/syslog`               Aug 16 11:55:01 precise64 CRON[2213]: (vagrant) CMD (/usr/bin/mysqldump -h localhost -u root -p root mydb | gzip > /var/backup/all/database_`date +%Y-%m-%d`.sql.gz >/dev/null 2>&1)     Aug 16 11:55:01 precise64 CRON[2212]: (CRON) info (No MTA installed, discarding output)      So I think   1. it's about crontab can't create backup file because of Permission denied.   2. it's about I'm didn't install MTA but I use `>/dev/null 2>&1` to disable crontab to sent it to email why it error ?


title: installing synaptic package manager from outside the repos

text: I have been facing some problems in installing software with ubuntu software center, due to the fact that I have not been able to run no proxy for the whole system, I have tried all methods prescribed in various websites to do the same but i always get `407 Proxy Authentication Required`. So I want to install synaptic package manager through source code or .deb file which can be downloaded from the internet and then installed manually. Please post the link from which the same can downloaded and also steps to install it manually. A little detail would be of great help as I am a beginner and unaware of the nuances. As suggested in one of the answers when i download the .deb package and perform `sudo dpkg -i synaptic_0.81.2_amd64.deb` in the terminal this is what happens... ![enter image description here](http://i.stack.imgur.com/sZePa.png) I am not able to make out where there has been a mistake.


title: How to parse XML to CSV with a shell script?

text: What is the ideal way to parse an `.xml` file into a `.csv` file that I could include with my shell scripts. I know bash cant do it but I'm unsure if I should try in `awk` or `sed`. I imagine a language would be the best solution such as python but I do not know python nor have I touched it.


title: What are all of the SSH Key files?

text: There are six key files in `/etc/ssh` directory for private and public keys. 4 of them are for DSA and RSA public & private keys. but there are two more files named `ssh_host_key` and `ssh_host_key.pub`, what are these keys?


title: change root account username

text: In windows it is possible to change `administrator` username for security reasons. Is it possible to change `root` username in Linux too?


title: Black Screen after log-in in linux Mint 17 Cinnamon Qiana

text: Installed Linux Mint 17 Cinnamon Qiana on my Toshiba Satellite M55. Every once in a while I get a Black Screen after I log-in and I all see is the Mouse pointer. I checked and double checked the Driver Manager but all I get is for the modem, nothing else.


title: Sabayon - mysql (and other services) won't start

text: It's a fresh install of Sabayon Linux. I installed mysql (equo install dev- db/mysql), configured it (emerge --config ...), but it doesn't start using /etc/init.d script:               # /etc/init.d/mysql start      * WARNING: mysql is already starting     # /etc/init.d/mysql status      * You are attempting to run an openrc service on a      * system which openrc did not boot.      * You may be inside a chroot or you may have used      * another initialization system to boot this system.      * In this situation, you will get unpredictable results!      * If you really want to do this, issue the following command:      * touch /run/openrc/softlevel     # /etc/init.d/mysql stop      * ERROR: mysql stopped by something else      Touching /run/openrc/softlevel causes even more errors. Googling doesn't advise much. I remember recent OpenRC migration on my Gentoo box, but there I'm still using init.d scripts. Anything else changed I didn't notice?


title: Boot linux on pendrive error: No configuration file found

text: I created a bootable flash drive using Universal USB Installer. However, the error message appears to start it: `No configuration file found` How to solve this problem? I've got sometimes with this USB and BIOS settings a few months ago and never had this problem. I tried to format it using FAT 64bytes and not solved the problem.


title: xorg.conf gamma setting gets reset one minute after boot

text: I set custom gamma on Ubuntu in xorg.conf. It applies at boot. But then after a minute or so, screen colour resets back. I tired googling this, found 2 threads not answered by anyone. There is no error in Xorg log. How do I troubleshoot this?


title: AWK : Converting Row Formated Data into Columnar

text: I have a dataset as such:               Name:      Jim Bean     Vice:      Dice     ID:        AFDSDFDSFDSFASFA     LoginTime: 12343314          Name:      Bob Dylon     Vice:      Trumpets     ID:        AFD232SFDSFASFA     LoginTime: 12343314          Name:      Mary Jane     Vice:      Gambling     ID:        EWDSFDSFASFA     LoginTime: 12343314          .....      I need to arrange this into a columnar format. My first thought is to use `awk`. But I'm a bit stuck. The labels will always appear in the same order, also it will always show the same number of label/value pairs in each group (headers aren't important). My question is: How would I do this? I've seen hints that the command `rs` may be able to do something like that, but its not standard on all systems.