title: Is there a way to find out why tmux crashed

text: I am trying to shift from using VNC to tmux. My tmux keeps crashing at least once in a week and I am clueless why this happens. VNC rarely crashed and this weekly crash is a strong detrimental for me to completely switch. Is there a way I can find out the reason tmux crashes ? My .tmux.conf is pretty simple                #Don't show the green ribbon below      set -g status off                                                                                #Select panes by mouse click                                                                                set -g mouse-select-pane on                                                                                #enable scrolling by mouse in tmux                                                                                set-window-option -g mode-mouse on                                                                                #enable resize of pane by mouse                                                                                set -g mouse-resize-pane on       I use iterm2 with terminal mode set to 256 color and heavily use vim plugins and colorschemes(Lid, nerdtree, tagbar, indentLine, molokai etc.,). To adjust terminal color I had following setting in my .vimrc but I am not sure if these are in any way related to tmux crash               set t_ut=     set t_Co=256      Also, I have enabled mouse in my vim `set mouse=a` Is there a way to find why my tmux session is crashing ? EDIT: Attaching the final logs from my tmux-server               found key 0x1001: ""     input_parse: ' ground     input_c0_dispatch: '     input_parse: ' ' ground     input_parse: ' ground     input_c0_dispatch: '     keys are 1 ()     complete key  0x1001     writing key 0x1001     found key 0x1001: ""     input_parse: ' ground     input_c0_dispatch: '     input_parse: ' ' ground     input_parse: ' ground     input_c0_dispatch: '     keys are 1 ()     complete key  0x1001     writing key 0x1001     found key 0x1001: ""     input_parse: ' ground     input_c0_dispatch: '     input_parse: ' ' ground     input_parse: ' ground     input_c0_dispatch: '     keys are 1 ()     complete key  0x1001     writing key 0x1001     found key 0x1001: ""     input_parse: '' ground     input_c0_dispatch: '     got 5 from client 6     writing 4 to client 6     got 13 from client 6


title: nc not waiting for server disconnect on OS X

text: How to make `nc` client on OS X Mavericks keep socket open and read data until server disconnects the socket? I want to send data to a server through `nc` and then use the response. Problem is that `nc` disconnects the socket after the data has been sent, without waiting for the server's response. This will just write the data then exit:               $ echo "my instruction here" | nc 127.0.0.1 $MY_PORT      This will write the data and then not exit even though the server has disconnected:               $ cat <(echo "my instruction here") - | nc 127.0.0.1 $MY_PORT      The `nc` man page on OS X Mavericks have the following example for sending a `HTTP GET` request and printing the response, but it's not working. It just sends the request then exits without waiting for the server's response. Seems like the man page's information is incorrect?               $ echo -n "GET / HTTP/1.0\r\n\r\n" | nc host.example.com 80


title: Why does this shell script fail in bash, but the commands work in SSH?

text: I'll first admit to being quite the noob in Linux/SSH/etc. What I'm trying to write is a shell script that will back up a website and all the MySQL DBs that support it. I found examples all over the 'net, but when I run the script in bash in a jailed SSH session, it fails. If I type the commands straight into the SSH session, they work fine.               #!/bin/sh          DB1="first_db"     THEDATE=$(date +"%Y-%m-%d")     THEUSER=user     THEDBPW=password          mysqldump -u $THEDBUSER -p$THEDBPW $DB1 > dbbackup_$DB1_$THEDATE.sql          tar -czf sitebackup_website_$THEDATE.tar /home/website/public_html     gzip sitebackup_website_$THEDATE.tar      This script lives on the web server, so for testing purposes, I SSH into the server, `cd` into the directory, and run `bash backup.sh`. `mysqldump` isn't connecting, seeming to fail to pass the password in (it returns an error reporting 'using password: NO'). Then the tar command fails, reporting that it can't stat `/home/website/public_html` with a 'no such file or directory'. `tar` then reports it is exiting with error status due to previous errors. What am I missing here?


title: How can I partition and format my disk to an accuracy of "LBA" by commands?

text: How can I partition `/dev/sdb` into `/dev/sdb1` and `/dev/sdb2`, and then format `/dev/sdb1` to exFAT ( or FAT32 ) from LBA=1 to 2097152 by commands? ( LBA=0 is reserved for MBR )


title: Putting two accounts in group not giving read access to group members

text: I have an Apache based web site and am trying to allow the user to upload files to a drop box on one machine and then have them transferred to another. So I form a group for two users: www-data which is the Apache web user and OtagoHarbour which has a key to transfer files from one machine to another. The existence of the group and its members is confirmed thus.               OtagoHarbour@WebServer:/var/www$ egrep -i "www-OtagoHarbour" /etc/group     www-OtagoHarbour:x:1002:OtagoHarbour,www-data      However, this does not appear to give OtagoHarbour group permissions to a group owned by www-data.               OtagoHarbour@WebServer:/var/www$ sudo ls -ld dropbox     drwx-wx-wx 2 www-data root 4096 2014-01-20 23:25 dropbox     OtagoHarbour@WebServer:/var/www$ sudo chmod g+r dropbox     OtagoHarbour@WebServer:/var/www$ sudo ls -ld dropbox     drwxrwx-wx 2 www-data root 4096 2014-01-20 23:25 dropbox     OtagoHarbour@WebServer:/var/www$ scp /var/www/dropbox/*.cel 192.168.1.6:/var/www/dropbox     /var/www/dropbox/*.cel: No such file or directory     OtagoHarbour@WebServer:/var/www$ sudo chmod o+r dropbox     OtagoHarbour@WebServer:/var/www$ scp /var/www/dropbox/*.cel 192.168.1.6:/var/www/dropbox     whatever1.cel                    100%   11MB  11.3MB/s  00:01         whatever2.cel                    100%   11MB  11.2MB/s  00:01         whatever3.cel                    100%   11MB  11.2MB/s  00:01        So, despite www-data and OtagoHarbour being in the same group, g+r does not appear to give OtagoHarbour read access to a group owned by www-data (but o+r does). Update               OtagoHarbour@WebServer:/var/www$ sudo chgrp -R www-OtagoHarbour /var/www/dropbox     OtagoHarbour@WebServer:/var/www$ sudo chmod o-r dropbox     OtagoHarbour@WebServer:/var/www$ sudo chmod g+r dropbox     OtagoHarbour@WebServer:/var/www$ scp /var/www/dropbox/*.cel 192.168.1.6:/var/www/dropbox     /var/www/dropbox/*.cel: No such file or directory      Update 2               OtagoHarbour@WebServer:/var/www$ ld     ld: no input files     OtagoHarbour@WebServer:/var/www$ ls -l /var/www/dropbox/*.cel     ls: cannot access /var/www/dropbox/*.cel: No such file or directory     OtagoHarbour@WebServer:/var/www$ ls -l /var/www/dropbox     ls: cannot open directory /var/www/dropbox: Permission denied     OtagoHarbour@WebServer:/var/www$


title: How can I comment out snmpmibd and snmpd in rc.tcpip in AIX using sed?

text: I need to comment out an entry in rc.tcpip file inside /etc > # Start up the snmpmibd daemon   >  start /usr/sbin/snmpmibd "$src_running" > > # Start up the Simple Network Management Protocol (SNMP) daemon   >  start /usr/sbin/snmpd "$src_running" How do I comment these lines using `sed`?


title: libstdc++.so.6: open failed: No such file or directory

text: I'm trying to run my first C++ program on Solaris. Just a simple Hello World program. When I try to run. I get the error `libstdc++.so.6:open failed:No such file or directory`. Of course I did some googling and found out that I can solve this by setting the environment variable:               export LD_LIBRARY_PATH=/usr/local/lib      After relog, I found out that it was not a permanent way to solve it. I'm guessing this have something to do with linking the libstdc++.so.6 during compile. Here are the step that I did from the beginning:               bash-3.2# gcc -c test.cpp          bash-3.2# gcc -o test test.o -lstdc++          bash-3.2# ./test        libstdc++.so.6:open failed:No such file or directory          bash-3.2# ldd test | grep not        libstdc++.so.6 =>        (file not found)          bash-3.2# /usr/ccs/bin/elfdump test | grep RUNPA          bash-3.2# find /usr -name libstdc++.so.6        /usr/local/lib/libstdc++.so.6      Did I miss a flag or something during compile? How do I create a softlink so that it knows where to look for when running that program? This is the platform that I'm using:               bash-3.2# uname -a        SunOS ms-sparc8 5.8 Generic_108528-13 sun4u sparc SUNW,Sun-Blade-100          bash-3.2# gcc -v        Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.3.2/specs        Configured with: ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --disable-nls --disable-libgcj --enable-languages=c,c++        Thread model: posix        gcc version 3.3.2


title: Detecting RHEL/RPM based distros

text: I'm trying to write a script to detect if it's being run on RHEL/RPM based distros. I've faced some odd systems configured such that both `dpkg` and `rpm` are installed, so doing a `which rpm` isn't a solution. I attempted this:               if [[ "$(cat /etc/*[_-][rv]e[lr]*)" == (CentOS|Fedora) ]]; then       #...     fi      but this requires me to know the names of all distributions that are based on RHEL/RPM.


title: awk getline not working as expected on first loop iteration

text: Consider this simple awk calculator program and its output               $ awk '{while (getline) {n=0;for(i=NF;i>0;i--)n+=$i; print "sum: " n;}}'     1 1     2 2     sum: 4     3 3     sum: 6      Note how the first input line `1 1` produces no sum. All successive lines work as expected. Why is no sum being printed for the first line of input?


title: Programmatically creating .desktop file to autostart application

text: Using a Java program, I added a `.desktop` file in `/etc/xdg/autostart` to run a script when a user logs in. The script didn't run at user login, and when I checked the start up applications dialog manually, it wasn't added to it. The file I added is `/etc/xdg/autostart/Startup.desktop`, and the script I want to be run on user login is `/usr/bin/Startscript`. The code I wrote to add the desktop file is as follows:               private void writeDesktopFile() {                  File f = new File("/etc/xdg/autostart/Startup.desktop");             if (!(f.exists())) {                 try {                     f.createNewFile();                     BufferedWriter bw = new BufferedWriter(new FileWriter(f, true));                     bw.write("[Desktop Entry]");                     bw.newLine();                     bw.append("Name=Startup");                     bw.newLine();                     bw.append("Exec=Startscript");                     bw.newLine();                     bw.append("Type=Application");                     bw.newLine();                     bw.append("Terminal=false");                     bw.newLine();                     bw.append("Categories=GNOME;GTK;Utility;");                     bw.newLine();                     bw.append("X-Ubuntu-Gettext-Domain=Startscript");                     bw.newLine();                     bw.flush();                     bw.close();                     Runtime.getRuntime().exec("chmod +x /usr/bin/Startscript");                 } catch (IOException ex) {                     Logger.getLogger(LinuxStartup.class.getName())                             .log(Level.SEVERE, null, ex);                 }             }      Why isn't my script being run on start up?


title: From where does printenv command read environment variables which I have not defined?

text: The printenv command lists a number of environment variables most of which I have not defined. From where does it read these values? Where are the environment variables stored in Linux? **strace printenv** gave an indication to me that it opens /usr/lib/locale/locale-archive but I did not get a clear idea.


title: How to override custom mouse cursor with Xcursor?

text: When I use `rdesktop` to connect to a Microsoft Windows server, the mouse cursor is set to a monochrome version of the Windows true-colour cursor. This ends up being a white arrow with no outline, so it's very difficult to see it over a white surface. I don't want to change the cursor on the Windows machine, but my understanding of how Xcursor works is following: When any cursor is set, it is looked up by filename (using a hash of the cursor image) so that if a match is found, that Xcursor is used instead of the original monochrome one. My idea is that if I can supply this file and put a clearer cursor image in it (like the default arrow) then it will solve my problem by using the default arrow most of the time. Plus it will still allow `rdesktop` to change the cursor to something else (like a resize arrow) if the remote machine needs to.   * How can I find out what hash to use for the `rdesktop` cursor image I am getting?   * How can I map that hash to the normal arrow cursor in the theme I am using?


title: watch command to delete files in a directory every N secs

text: I thought of using watch command to delete files in a directory every N seconds with the command running in background. This is what I was planning to use:               nohup watch -n1200 rm -rf /var/log/radius/radacct/8.44.25.17/detail-2013* &      It works, but when I see the running process, it shows me the following output -               [root@Free-Radius 8.44.25.17]# ps -aef | grep watch     root     27326 10649  0 15:23 pts/0    00:00:00 watch -n1200 rm -rf /var/log/radius/radacct/8.44.25.17/detail-20130816     root     27404 10649  0 15:24 pts/0    00:00:00 grep watch      Now there will be a new file `detail-20130817` tomorrow, which will not get deleted. Is there a way to achieve it using watch command. I know its easily doable using a simple bash script or cron job, but just wanted to know if it can be done using watch.


title: Log in as one user but authenticate as another

text: This might be a weird question but I wonder if there are possibilities to this. When I'm configuring a system I prefer to be root so that I don't have to sudo everything. However, the root account is not my personal account so other people might get anoyed if I change settings in the root account (like the bashrc and vimrc). Therefor, I would want to go back using my personal account to do the configuration, but then I don't have permissions. I don't have problem this with the root account only, sometimes I need to do stuff on another user account too. What would be ideal is that I can authenticate myself as a different user (or the root account) but not be logged in as it. I know I can also log in as a certain user and then manually execute my personal profile's config files (like the bashrc and vimrc), but that seems like an annoying task to do every time. Does anyone know ways to efficiently do what I am describing here? Or do you guys think it is weird and shouldn't be done?


title: Why is this empty directory 3.5MB?

text: I've just read this question: What does size of a directory mean in output of 'ls -l' command? ...which doesn't quite answer my question. Basically, I'm moving files onto a NAS. The folders I've already moved are completely empty, with no hidden files or anything, and yet `du` still reports their size at 3.5MB. Admittedly, they previously contained a large number of files, with long filenames. Is this size simply because of the quantity and name-length of files that were in that directory? Why hasn't the size decreased now that the folders are empty (ext4 filesystem)?


title: Verbose output of ./configure not verbose at all

text: I have a problem installing OpenOCD:               checking for ftd2xx.h... yes     checking for library containing FT_GetLibraryVersion... no      Said library is installed and tested. In hopes of seeing where is `configure` looking for the library, I passed the `verbose` command switch. No change at all! Is there a way to check where and under what name is configure looking for said library?


title: Faster way to find matching patterns from external file grep -f {patternfile} {source} in BASH

text: In *nix terminal (Bash) os there any other faster way to find a pattern (or excluding them - egrep -v option) than using this:               grep -f {patternfile} {source}      Using this option is painfully slow for larger files.


title: sed: N command does not read single line

text: Why sed's `N` command does not read single line?               # single line without \n     $ echo -en 'abc' | sed -n 'N;p'     $     # I expected 'abc'          # single line with \n     $ echo -en 'abc\n' | sed -n 'N;p'     $     # I expected 'abc'          # two lines     $ echo -en 'abc\n_' | sed -n 'N;p'     abc     _$      # works as expected


title: GNOME-Terminal: Create new terminal tab on remote machine

text: Is there a way to open a new terminal tab in GNOME-Terminal when working on a remote machine that is connected via ssh?


title: How stable are Unix shell "stdin/stdout APIs"?

text: grepping, awking, sedding, and piping are day-to-day routine of a user of any Unix-like operating system, may it be on the command line or inside a shell script (collectively called _filters_ from now on). At their essence, when working with "standard" Unix CLI programs and shell builtins (collectively called _commands_ from now on), filters need a precise expected format for stdin, stdout, and stderr in each filter step in order to work correctly. I call this precise expected format of some command an API of this command in the following. As someone with web development background, I compare this kind of data collecting and data processing technically with web scraping - a technique which is very instable whenever there is the slightest change in data presentation. My question now relates to the stability of Unix command APIs.   1. Do commands in a Unix-like operating systems adhere to a formal standardization with respect to their input and output?    2. Have there been instances in history where updates to some important command caused to break the functionality of some filter that was built using an older version of said command?    3. Have Unix commands matured over time that it is absolutely impossible to change in such a way that some filter could break?    4. In case filters may break from time to time due to changing command APIs, how can I as a developer protect my filters against this problem?


title: Can we patch an already patched font?

text: **Powerline** is some sort of plugin for Vim and Gvim. In order to be more useful it uses fonts that has some pictures (symbols) added to them. In other words they've "patched" the font set. Recently Powerline stated that the code has been changed and you have to patch your fonts again. The link to the same can be found here. ### Questions   * Can I patch my already patched font, again, or should I get a fresh source font?    * What kind of fonts can be patched. (TTF for example or ...)?


title: Create Relative Symlink Inside Relative Symlink

text: I've been browsing for a minute now trying to find a way to create a relative symlink inside a relative symlink, and what I mean by that is this... I have my CakePHP Templates Skeleton as a symlink inside one of my projects, inside my skeleton, I have a symlink to a plugin outside the skeleton folder, the idea being, I can symlink my CakePHP CMS Skeleton inside my projects, create an "Application" plugin outside the CMS skeleton symlink, and and the skeleton symlink point to my projects "Application" plugin. By that I mean the following. I have a CakePHP CMS Skeleton at the following path               /mnt/proj/libs/cakephp/lib/Cake/Console/Templates/skel      The path to my project folder is below               /mnt/proj/mysite.com/      I then symlink the CakePHP CMS Skeleton inside my project folder like so               /mnt/proj/mysite.com/cms-skel -> /mnt/proj/libs/cakephp/lib/Cake/Console/Templates/skel      Inside the skeleton I have a symlink pointing to an Application plugin               /mnt/proj/libs/cakephp/lib/Cake/Console/Templates/skel/Plugin/Application -> ../../Application      So inside the CakePHP CMS symlinked folder in mysite.com folder I have               /mnt/proj/mysite.com/cms-skel/Plugin/Application -> ../../Application      The issue is, that the above symlink points to               /mnt/proj/libs/cakephp/lib/Cake/Console/Templates/Application      And I need it to point to               /mnt/proj/mysite.com/cms-skel/Plugin/Application      Any ideas on how I can do the above with symlinks is greatly appreciate, I am not even sure what to google at this point.


title: can't open netbeans IDE in Fedora 17

text: my linux version is: Fedora 17   I installed Netbeans IDE 7.1.2 and it was working fine, but now, when I try to open it, nothing happens after double clicking on it.   I think updating the kernel may be the reason, my current kernel version is : 3.4.3   do you know the exact reason and how to solve it?


title: Swap not mounting

text: I have just installed SolydX (Debian based) onto a laptop with the following specs: -Toshiba Tecra A4 -800MHz Centrino CPU -nVidia 6600 GPU -512MB RAM After installing Conky to monitor my system, I noticed that there is no Swap space showing. I made a 2GB Swap partition on install. I have checked the `fstab` file and all looks good (it was populated by the installer). Most answers I've found so far use the `swapon` command, however when I try these commands, I get a 'command not found' error. How can I get my system to use the Swap space? Below is my `fstab` file               proc                                        /proc       proc    defaults    0   0     UUID=49f4751f-4ad9-4f3e-baa8-853d3d43153c   /           ext4    rw,errors=remount-ro    0   1      UUID=b4e77f64-86d7-4a72-888d-fbbcc5d1045c   /home       ext4    rw,errors=remount-ro    0   0     UUID=3b3aec73-825f-4ec0-96c5-f9c79d599f9e   swap        swap    sw  0   0


title: Fastest way to convert a large amount of FLACs to MP3s

text: I'm looking for something that can take advantage of my GPU or at the very least, multiple cores of my CPU to convert a few terabytes of FLAC to mp3 (VBR v0) very quickly while preserving all of the tags. Any advice is greatly appreciated.


title: setting default permissions with setfacl

text: I am trying to set default permissions on my directory structure using `acl`. I would like to have following default permissions for directories and for files respectively:               drwx--x---     -rw-r-----      but when I set default permissions for `group` to `x` only:               setfacl -R -d -m g::x my_dir      then newly created directories have my desired permissions, but newly created files have `-rw-------` instead of `-rw-r-----`. In other words, I am trying to remove `r` permission from directories, while preserving `r` permission on files. How can I achieve this ?


title: Tomcat does not get enough memory

text: i'm trying to setup a jira instance on my vServer. I've got min. 1 GB ram and max. 2 GB ram. It was runing on my friends Server with only 512 MB ram. The first error was:               java.lang.OutOfMemoryError: unable to create new native thread      I fixed this with               ulimit -u 2048      After that, the error:               Java HotSpot(TM) 64-Bit Server VM warning: Exception java.lang.OutOfMemoryError occurred dispatching signal SIGTERM to handler- the VM may need to      be forcibly terminated occured. My environment:               ___ Environment _____________________________           JIRA Build                                    : 5.0.6#733-sha1:f48fab7a0abaa0a316c14a3fc86cdf5a6805ba12      Build Date                                    : Thu May 31 00:00:00 CEST 2012      JIRA Installation Type                        : Standalone      Application Server                            : Apache Tomcat/6.0.32 - Servlet API 2.5      Java Version                                  : 1.7.0_05 - Oracle Corporation      Current Working Directory                     : /tmp/atlassian-jira-5.0.6-standalone      Maximum Allowable Memory                      : 742MB      Total Memory                                  : 247MB      Free Memory                                   : 210MB      Used Memory                                   : 37MB      Any suggestions?


title: High Availability of Services

text: I want to monitor a couple of services in linux. In case they go down I want to restart them. I'm writing a crontab which will get the name of the services using jps command every 60 seconds, and if they're not present in the resultset, issue a restart command specific to each of these services. I want these services to be always available so in case they go down I'm able to get them up and running again. I'm worried that in case any of these services hang up how will I know. Is there a way to know about hung services and kill them? Is there a clean way of implementing auto restart of services which will handle both "services that go down" and "services that hang up".


title: Does the command-line interpretor interface with the kernel/device drivers the same way as a normal GUI-program would?

text: For example, unmounting is implemented in a filesystem. Changing video resolution is implemented in a computer program that keeps track of and manages the display on a monitor with use of video rendering hardware. In the command-line you can change the resoultion (I have done so in Ubuntu, which is essentially Linux under the hood). Does parsing the command interface the Linux Kernel API similar to doing so in a GUI-program to alter the resolution, or does the CLI differ in this form? Hopefully my question is not too confusing. If it is, I will edit appropriately.


title: Sending message from one terminal user to another user

text: I have a user of name x in tty1 and y in tty2. Now x wants to write some message to y and vice-versa. Now I typed in tty1 terminal `write y tty2` It is showing write:write:you have write permission turned off write:y has messages disabled Same thing is showing when y's sending message to x instead it is 'x' in the last line. What should I do?


title: ls does not show a hidden file (OS X)

text: I am using `lsof` to view the list of open files. One such file that it displays open is :               Google    3864 malaykeshav   46u     REG                1,1 470455334 32578671 /Users/malaykeshav/Library/Application Support/Google/Chrome/Default/Pepper Data/Shockwave Flash/.com.google.Chrome.CiGbDZ      But when I go to the location and run a `sudo ls -al` no such file is displayed. How do I access this file? My current directory where I am executing `ls` is               $pwd     /Users/malaykeshav/Library/Application Support/Google/Chrome/Default/Pepper Data/Shockwave Flash       `lsof` displays this file open after exectuing `ls`.


title: Data Extraction from SCO Open server 5

text: We have a very old database running on SCO Openserver 5 and we need to export data in CSV format for Excel in order to import to a Windows based system.   * How do I access the system to start exporting?   * Do I need to contact the database provider (datapower, now Infocomm) for this?


title: Create a log file with the same name as input file

text: I'm new to linux shell scripting. I have few input files that I have to parse one by one. So in my "work in progress" WIP folder I have one input file at a time. While one file is under processing I want a log file to be created in the LOG folder with the same name as that of input file but with the extension .log . Any inputs on how I can create another file with the same name of a different file? So what I actually want to do is - copy the filename and store it in a variable, then use the variable to create a $variable.log file and write log to it.


title: Recovering data of an formatted ext4 partition

text: An ext4 partition of Hard Disk is formatted to ext2 and then again to ext4 using GParted. Is there a way to recover the original data? I want to reconver .webm files. I could not do this with testdisk.


title: Reinstalling Ubuntu: Shall I back-up dot files from my home directory?

text: I'm removing my Ubuntu 13.04 as I'm reinstalling latest version. So, I have taken back up of my home partition using `tar`. The back-up includes hidden files (dot files) like below:               $ tar -tvf ubuntu_home.tar          drwxr-xr-x ravbholua/ravbholua 0 2014-06-08 16:11 home/ravbholua/     drwx------ ravbholua/ravbholua 0 2013-07-04 04:41 home/ravbholua/.compiz/     drwx------ ravbholua/ravbholua 0 2014-06-07 13:27 home/ravbholua/.compiz/session/     -rw-rw-r-- ravbholua/ravbholua 94 2013-07-17 21:09 home/ravbholua/.compiz/session/10cb5b0e6473b31966137407039559636600000017000031     -rw-rw-r-- ravbholua/ravbholua 94 2014-03-30 23:13 home/ravbholua/.compiz/session/10827bd50247533452139619877576376200000017730032     -rw-rw-r-- ravbholua/ravbholua 94 2014-03-26 17:58 home/ravbholua/.compiz/session/1045273c9617fd9fd4139583223634115900000020210032     -rw-rw-r-- ravbholua/ravbholua 93 2013-07-18 19:07 home/ravbholua/.compiz/session/103af463f1638372f413741493305265900000017040031     -rw-rw-r-- ravbholua/ravbholua 94 2013-10-02 21:14 home/ravbholua/.compiz/session/10731c70d9dfbc841d138072379649671100000018220032     -rw-rw-r-- ravbholua/ravbholua 94 2013-07-25 21:20 home/ravbholua/.compiz/session/10178ce07333091a04137476677623131400000017150031     .................     .................     .................     drwx------ ravbholua/ravbholua         0 2014-01-09 08:52 home/ravbholua/.speech-dispatcher/log/     -rw------- ravbholua/ravbholua         0 2014-01-09 08:52 home/ravbholua/.speech-dispatcher/log/dummy     .log     -rw------- ravbholua/ravbholua        42 2014-01-09 08:52 home/ravbholua/.speech-dispatcher/log/festi     val.log     -rw------- ravbholua/ravbholua         0 2014-01-09 08:52 home/ravbholua/.speech-dispatcher/log/espea     k.log     drwx------ ravbholua/ravbholua         0 2014-01-09 08:52 home/ravbholua/.speech-dispatcher/log/debug     /     -rw-rw---- ravbholua/ravbholua      7522 2014-01-09 08:52 home/ravbholua/.speech-dispatcher/log/speec     h-dispatcher.log     drwx------ ravbholua/ravbholua         0 2014-01-09 08:52 home/ravbholua/.speech-dispatcher/pid/     -rw-rw---- ravbholua/ravbholua         5 2014-01-09 08:52 home/ravbholua/.speech-dispatcher/pid/speec     h-dispatcher.pid     drwx------ ravbholua/ravbholua         0 2013-07-16 20:47 home/ravbholua/.synaptic/     -rw-rw-r-- ravbholua/ravbholua       237 2013-08-19 08:53 home/ravbholua/.synaptic/synaptic.conf     -rw-rw-r-- ravbholua/ravbholua         0 2013-08-19 08:53 home/ravbholua/.synaptic/options     -rw-rw-r-- ravbholua/ravbholua         0 2013-09-03 19:01 home/ravbholua/.Xauthority.IJTU2W     -rw-r--r-- ravbholua/ravbholua     12679 2013-07-04 03:14 home/ravbholua/.face      What I feel is it's not required to take-up back up of all these files. Rather it may be dangerous to back-up these dot files. Are they really needed? When I reinstall the new Ubuntu, then my home partition may have many dot files (I suppose). I may like to recover the backed-up files in the home partition of the new OS. So while recovering (say using `tar`), the already existing dot files will be overwritten by the backed up files which may be **_dangerous_**. Because my intention would be to recover the files (pdf, audio/video, text, etc from my home partition) that I had intentionally created & not the dot files which automatically gets created. So, how to back-up my home partition?


title: Subdomain for Nagios

text: I have a subdomain forwarding at ip xxx.xxx.xxx.xxx (domain.com) Lets call it **nagios**.domain.com Nagios worked at **xxx.xxx.xxx.xxx/nagios** but now it's not working due to a fact that **app**.domain.com took over **default** **apache** **port** (: **80** ) So how to solve my problem? :) I have **almost** default nagios config in **httpd** vhost except i've added <VirtualHost *:80 > and ServerName.               <VirtualHost *:80>         ServerName nagios.domain.com              ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"              <Directory "/usr/local/nagios/sbin">         #  SSLRequireSSL            Options ExecCGI            AllowOverride None            Order allow,deny            Allow from all         #  Order deny,allow         #  Deny from all         #  Allow from 127.0.0.1            AuthName "Nagios Access"            AuthType Basic            AuthUserFile /path/file            Require valid-user         </Directory>              Alias /nagios "/usr/local/nagios/share"              <Directory "/usr/local/nagios/share">         #  SSLRequireSSL            Options None            AllowOverride None            Order allow,deny            Allow from all         #  Order deny,allow         #  Deny from all         #  Allow from 127.0.0.1            AuthName "Nagios Access"            AuthType Basic            AuthUserFile /path/file            Require valid-user         </Directory>     </VirtualHost>      PS: httpd -t -D DUMP_VHOSTS                   VirtualHost configuration:              wildcard NameVirtualHosts and _default_ servers:     *:80                   is a NameVirtualHost              default server domain-alias.com (/etc/httpd/conf.d/app.conf:1)              port 80 namevhost domain-alias.com (/etc/httpd/conf.d/app.conf:1)              port 80 namevhost nagios.domain.com (/etc/httpd/conf.d/nagios.conf:8)     Syntax OK      Sorry for "domain-alias.com" but it's kind of private information :)


title: How to get CentOS 6.5 gui?

text: After, I've installed CentOS 6.5, I just have a terminal with a black background and I can't get gui for it. Any recommendations?


title: Disabling screen blanking in GNOME 3

text: We are using a Debian 7 machine with the default GNOME 3 installation to display content on an information display. This display needs to remain on until the connected computer is switched off. However, GNOME 3 switches the display off after a few minutes. I can't seem to find a way to control this behaviour in either the system settings tools nor using dconf-editor. There is a prominent Google hit suggesting to change the               org.gnome.settings-daemon.plugins.power sleep-display-ac     org.gnome.settings-daemon.plugins.power sleep-display-battery     org.gnome.desktop.session idle-delay      keys, but this did not change anything. So, how does one control and disable screen blanking in GNOME 3?


title: Can't search for flags in qalter's man page?

text: I was trying to find out what `qalter`'s `-r` flag does, but I can't search for `-r` when viewing the man page for it (pattern not found). Yet it's clearly there. If you scroll down a bit you'll see it. Why can't I search for flags in this man page? This online version seems to work fine though.


title: How to use one distro's live CD to install another distro?

text: I'm trying to install Mint Linux to a USB stick, but the Mint live CD doesn't fit on a normal CD and I don't have any DVDs available. The Ubuntu live CD does fit on a CD, so I want to use the Ubuntu LiveCD to install Mint. Is that possible?


title: hosts.allow: Not required when using iptables?

text: I am trying to configure the box I am using as a gateway/proxy/firewall to allow IP masquerading and finally switch over from using a proxy. It's a debian squeeze system. Currently, my hosts.allow file is empty (and hosts.deny says `ALL: PARANOID`), because squid allows requests on the required ports anyway (and also, I can ssh to the box just fine). Does iptables work the same way, i.e. can the hosts.allow file remain empty when iptables is set up properly?


title: Variable as command; eval vs bash -c

text: I was reading a bash script someone made and I noticed that the author doesn't use eval to evaluate a variable as a command   The author used               bash -c "$1"      instead of               eval "$1"      I assume using eval is the preferred method and it's probably faster anyway. Is that true?   Is there any practical difference between the two? What are notable differences between the two?


title: Use FindBugs in Eclipse from terminal on Ubuntu

text: Is there any way I could use Findbugs from terminal to get all the bugs in my Java code and print it out to a text file? I want to write a script that goes through 100 java files ( this is already done) As I iterate through these java files, I want to use Findbugs. I did read that manual, but it does not show what I want to do.


title: batch rename files

text: I have multiple photo files with inconsistent name format.   * beach north.JPG   * beach south sm.jpg   * Bryce windsurfing sm.jpg   * DSC01031 1024x.jpg   * DSC02652 ed sm.jpg   * DSC03229 sm.jpg   * Kayak kids 2.jpg   * Maui 5-05 (31) 1024.jpg   * Maui fall 05 (41) sm.jpg   * maui whale (2) sm.jpg   * maui whale (6) ed.jpg   * P1000018 sm.jpg   * P1000030 sm.jpg   * P1000056 sm.jpg   * P1000148 sm.jpg   * P1000397 sm.jpg   * P1000490 sm.jpg   * P1000629 sm.jpg   * P1000995 sm.jpg   * P1010006 1024.jpg   * P1010089 1024x.jpg   * P1050988 ed sm.jpg I don't want to rename the extensions, but rename the first .jpg on the list as 1.jpg, second 2.jpg, third 3.jpg, etc. How do I do this with one command?


title: Allocated Memory difference in xen guests after using Linux 3+ kernel

text: Can someone explain to me why there is a memory difference in Guests with the same configuration?   * **Hypervisor** : xen 4.2 64 bit   * **VM1** : Centos 5.7 with 2.6.18-274.el5xen Assigned memory from xen is exactly the same as memory inside guest, 524288k (512m):               free -k              total       used       free     shared    buffers     cached     Mem:        524288     445004      79284          0      18040     182652     -/+ buffers/cache:     244312     279976     Swap:       524280          0     524280      despite showing:               " Memory: 500984k/524288k available (2533k kernel code, 23212k reserved, 1746k data, 196k init) "      `dmesg`: http://pastebin.com/FmVRniLJ **Question1:** Why does `free` show exact memory, while `dmesg` clearly showed 2.5MB for kernel code and 23MB as reserved?   * **VM2:** Ubuntu 12.04 ,3.2.0-48- For the same resources Ubuntu 12.04 with pvopskernel is showing 501236k.               free -k              total       used       free     shared    buffers     cached     Mem:        501236     147188     354048          0      12588      87668     -/+ buffers/cache:      46932     454304     Swap:            0          0          0      `dmesg`: http://pastebin.com/jgNfcxc5               Memory: 481820k/524288k available (6553k kernel code, 448k absent, 42020k reserved, 6642k data, 924k init)      **Question2:** What might be the reason for this behavior, can this have something to do with with pvops kernel, or is it because of changes in Linux 3.0+ Memory Management?


title: Were all Unix commands re-written in Linux?

text: I would like to know which commands were re-written for Linux and which were retained from Unix? I'm new to Linux.


title: Gnome Shell window snap to quarters of screen

text: I love the window snap feature of the Gnome 3 shell. However, it only allows you to maximize windows or to snap to the left or right half of the screen. Is there a way to snap to quarters of the screen? Maybe some shell extension I'm unaware of?


title: Programmatically obtain LILYPOND_DATADIR for execlp() call

text: I wrote an application that calls `lilypond` by `execlp()`ing it. However, when my app executes this line, the following error occurs:               GNU LilyPond 2.16.2     warning: not relocating, no 2.16.2/ or current/ found under <app_dir>/share/lilypond/     ERROR: In procedure primitive-load-path:     ERROR: Unable to find file "lily.scm" in load path      I currently allow my user to inform his/her `lilypond` executable path inside the app. Is there any way I can programmatically set this to values that will always work, no matter where my executable is located?


title: Any interface for building a server in Linux Xubuntu. (not desktop)

text: Is there any interface or program that I could install on my Linux Xubuntu that would help me set up a server using the terminal as little as possible?


title: Cgroups - memory subsystem

text: I want to set the `memory.limit_in_bytes` parameter for a control group and disable OOM, so processes freeze when the limit is reached. But i want to change that limit dynamically, if there is more available memory. I managed to get a test process to reach the limit and it got paused (as expected), but when I tried to change the `memory.limit_in_bytes` with `echo` command I could not do it. Can the memory limit change dynamically, so processes can resume their works? Thanks in advance and sorry for my bad English.


title: Assigning the output of a SQL query to variable

text: I am connecting to oracle database and firing a query and assigning the output to variable But when I echo the value of the variable it doesn't get printed correctly.               count=`sqlplus -s $configuser/$configpass@$ORACLE_SID <<END                set pagesize 0 feedback off verify off heading off echo off;                select max(cust_id) from cutomers                exit;                END`                echo $count      The query return correct result when fired on database. But "count" variable has incorrect value.


title: Curl not found (Glype)

text: I'm trying to install proxy software called Glype on my server. It continues to tell me that "Glype requires cURL/libcurl". I have the latest version of curl installed. Why might this be happening? Glype runs with PHP, and the curl binary is in /usr/bin and is `rwxrwxrwx`.


title: Backup script permission issue

text: I have a server with a user named `deploy-user` and have written a backup script to backup a number of websites associated with this user. However one of the sites I'm trying to backup has a directory `/home/usera/web/www.example.com/some/random_dir` is owned by `apache-data- user`. What permissions would I give `deploy-user` to be able to backup that directory. Options I am aware of are either:   * Running the script as `root`, which I don't really want to do.   * Adding `apache-data-user` and `deploy-user` to the same group. But then `apache-data-user` will have to many permissions. Has anyone got a suggestion of the best way to backup this directory?


title: How to run e2image to backup a remote CentOS server?

text: Our server is hosted out of the country, I just have SSH access. I want to take an image backup of my server. I found the `e2image` utility to take an online backup of that server, but when I run `e2image -r /dev/sda1 sda1image`, the command does not run, instead it shows this error:               [root@server ~]# e2image -r /dev/sda1 image     e2image 1.39 (29-May-2006)     e2image: Bad magic number in super-block while trying to open /dev/sda1     Couldn't find valid filesystem superblock.      Could any one help me, how I can take my whole server backup?


title: How can I instruct BSD sed to interpret escape sequences like \n and \t?

text: I have a sed replacement command that I would like to be compatible with BSD `sed` as well as GNU `sed`. Extended regular expressions are not an issue as I do not need them in this case. My primary problem is difference in the way that the two `sed`s interpret character escape sequences in the _replacement_ strings. My replacement string contains tabs and newlines and I'd like them to be visible in the command strings for ease of maintenance, however, BSD `sed` doesn't interpret the escape sequences and GNU `sed` _does_. What is the appropriate way to instruct `sed` to interpret these escape sequences on BSD? The following two snippets epitomize my problem: **GNU`sed`**               echo ABC | sed 's/B/\n\tB\n'      yeilds               A         B     C      **BSD`sed`**               echo ABC | sed 's/B\n\tB\n'      yields               AntBnC      Clearly, `\n` and `\t` aren't interpreted as escape sequences by BSD `sed` Now, to my question. According the BSD `sed` manpage: > To specify a newline character in the replacement string, precede it with a > backslash. Does this imply that I'd need to precede a _literal_ newline by a backslash? What is the appropriate way to instruct `sed` to interpret escape sequences like `\n` in the replacement text?


title: Keep only successful commands in BASH history

text: Sometimes I misunderstand the syntax of a command:               # mysql -d test     mysql: unknown option '-d'     # echo $?     2      I try again and get it right:               # mysql --database test     Welcome to the MySQL monitor.     mysql >     ...      How do I prevent the first command, with error code different than 0, to enter the history?


title: How to redirect tty1 to an X11 (KDE) Konsole shell?

text: I would like to see what is going on at `tty1` - the console I was booting from - while I am now on `tty7` running X11 with KDE4, without switching back to `tty1` (`Ctrl`+`Alt`+`F1`). I would like to see it inside KDE's Konsole, if possible. I would like to have `tty1` redirected into Konsole, including all boot history that was scrolling down while I was booting. Is that possible?


title: KDE System Tray Organizer

text: Is it possible to organize order of icons or lock them in KDE system tray? It's very confusing with a lot of shuffled application icons. Edit: Does anybody know where are system tray configuration files?


title: Remove empty configuration section

text: Files like `~/.config/vlc/vlcrc` are 99% junk if you want to version control only the configuration options. I've got a script to remove the comments, but there's a ton of empty configuration sections left over. My `sed`- and `awk`-fu is not up to speed, so how can I remove the empty configuration sections? The first line of a configuration section matches `^\\[.*\\]$`, and it is _empty_ if the first line is followed by any number of lines consisting only of whitespace, then followed by another line matching `^\\[.*\\]$` or `EOF`.


title: 1000 iptables entries on CentOS?

text: I just got a new dedicated server with CentOS and I'm trying to debug some network problems. In doing so, I found _over one thousand_ iptables entries. Is this the default on a CentOS system? Is there some firewall package that might be guilty of doing that?


title: Is there a downside to ksplice?

text: `ksplice` is an open source extension of the Linux kernel which allows system administrators to apply security patches to a running kernel without having to reboot the operating system. (From Wikipedia.) Is there a downside to using ksplice? Does it introduce any kind of instability? If not, why is it not included by default in more Linux distributions?


title: knock on Scientific Linux 6.1? (perl script for knocking?)

text: I have an OpenWrt router where I installed knockd:               knockd.conf      [options]         logfile = /var/log/knockd.log          [openSSH]         sequence    = 7000,8000,9000         seq_timeout = 5         command     = /usr/sbin/iptables -I INPUT -s %IP% -p tcp --dport 22 -j ACCEPT         tcpflags    = syn          [closeSSH]         sequence    = 9000,8000,7000         seq_timeout = 5         command     = /usr/sbin/iptables -D INPUT -s %IP% -p tcp --dport 22 -j ACCEPT         tcpflags    = syn      and I'm having a notebook with Scientific Linux 6.1 from where I want to knock.. but seems there isn't any "knock" package for SL 6.1.. Where can I get the RPM for the knock binary? (Or are there any alternatives for knock? A perl script maybe?)


title: What package managers do popular Unix Distributions Use?

text: I am creating a Script and I need to know what package manager each Popular Unix Distribution Uses _(especially those distros that are commonly-used for Servers)_... **I mean:**   _Debian uses apt-get   Fedora uses yum_


title: Setting CPU governor to on demand or conservative

text: I'm struggling with `cpupower` on ArchLinux. I want to set governor to `ondemand` or even to `conservative`. First if I do `$ sudo cpupower frequency-info --governors`, I only get `performance powersave`. So I look for available modules like this               ls -1 /lib/modules/`uname -r`/kernel/drivers/cpufreq/      ...and I get               acpi-cpufreq.ko.gz     amd_freq_sensitivity.ko.gz     cpufreq_conservative.ko.gz     cpufreq_powersave.ko.gz     cpufreq_stats.ko.gz     cpufreq_userspace.ko.gz     p4-clockmod.ko.gz     pcc-cpufreq.ko.gz     powernow-k8.ko.gz     speedstep-lib.ko.gz      So, first of all no modules for "ondemand" seems to be available. What do I miss? Then I try to enable at least conservative:               $ sudo modprobe cpufreq_conservative      then I check the module is actually loaded               $ lsmod | grep cpufreq      and check if it is now avaliable               $ sudo cpupower frequency-info --governors      but unfortunately I still get the same: `performance powersave` only, and if I try to enable conservative               $ sudo cpupower frequency-set -g conservative      It says that the module is not avaliable. So basically I have two questions:   1. What do I need to install in order to have ondemand module   2. How can I enable it?


title: echo keywords found

text: I'm trying to figure out which keywords are being found for [each] file in the script below. I tried adding echo $keywords and it just outputs every keyword. Code:               keywords=("Alachua" "ALACHUA" "alachua" "Archer" "Gainesville" "Hawthorne" "High Springs" "Newberry" "Waldo" "LaCrosse" "PA-LOCKA" "PALMETTO BAY" "PINECREST" "34997")     IFS=$'\n'     find . -size +1c -type f ! -exec grep -qwF "${keywords[*]}" {} \; -exec truncate -s 0 {} \;         * * * Update: My issue is I have far more keywords than in this example and I'm not sure which one(s) are being found in EVERY file and I need to remove it from $keywords as it's messing up my results.


title: Why is it better to use "#!/usr/bin/env NAME" instead of "#!/path/to/NAME" as my shebang?

text: I notice that some scripts which I have acquired from others have the shebang `#!/path/to/NAME` while others (using the same tool, NAME) have the shebang `#!/usr/bin/env NAME`. Both seem to work properly. In tutorials (on Python, for example), there seems to be a suggestion that the latter shebang is better. But, I don't quite understand why this is so. I realize that, in order to use the latter shebang, NAME must be in the PATH whereas the first shebang does not have this restriction. Also, it appears (to me) that the first would be the better shebang, since it specifies precisely where NAME is located. So, in this case, if there are multiple versions of NAME (e.g., /usr/bin/NAME, /usr/local/bin/NAME), the first case specifies which to use. My question is why is the first shebang preferred to the second one?


title: Assigning a command to variable

text: I assign command `ls` to my variable `my_File` but when I run it as `$my_File` it does not work. Can you please explain why?               #!/bin/bash     my_File='ls -f | grep -v '\/''     $my_File


title: Samba mount isnt mounting when switching to wireless

text: I have a notebook with Scientific Linux 6.1. I have a wireless router with OpenWrt 10.03 - Wrt160NL. I have a HDD on the router that I share via samba:               cat /etc/samba/smb.conf.template     [global]     workgroup = workgroup     guest account = nobody     security = share     browseable = yes     guest ok = yes     guest only = no     log level = 2     log file = /tmp/log/smbd.log     max log size = 100     encrypt passwords = yes     dns proxy = no     host allow = 192.168.1.0/24     netbios name = Router     server string = Linksys WRT160NL Router     socket options = TCP_NODELAY     client code page = 852     dos charset = 852     unix charset = UTF-8     display charset = UTF-8     character set = ISO8859-2          [SHARE]     comment = SHARE     path = /mnt/hdd/PUB     browseable = yes     public = yes     guest ok = yes     writable = no      and on client side:               cat /etc/fstab     //192.168.1.1/SHARE /home/USERNAME/Desktop/SHARE cifs ro,noexec,nosuid,nodev,noatime,password=,nolock 0 0      This WORKS GREAT!     * When someone is connecting to the router via ethernet cable then it could see the share on the router.    * When someone is connecting to the router via wireless then it could see the share on the router.  BUT -> the problem -> when someone is using the ethernet cable, and plugs it out, and switches to wireless the share dissapears, and it can't mount it: mount -vvv //192.168.1.1/SHARE /home/USERNAME/Desktop/SHARE -o ro,noexec,nosuid,nodev,noatime,password=,nolock -t cifs because the command times out. But if we plug back the ethernet cable and go in to the "SHARE" directory under GNOME2 it automatically mounts. **QUESTION** : how can I mount the SHARE after switching to wireless? (are there some kind of cache that stores that the SHARE is only available via the ethernet? - I tried to umount/mount the SHARE but it didn't worked. )


title: Boot in rescue mode with vlan support in RHEL

text: I am trying to restore **RHEL** OS (5.3.1.1) from network, where we have VLANs configured on our switches. So the only way to get to shared folder on remote server with backup image is to configure VLAN. I booted a machine with Red Hat Recovery CD and ran `linux rescue`. But in this mode there is no VLAN support. No file under `/proc/net/vlan/config` and there is no module loaded (`lsmod|grep 802` gives nothing). Is there a way to boot from CD/DVD with 8021q support? `modprobe 8021q` in a regular `linux rescue` mode gives error due to missing folders with `modules.dep`.   On official web site I found some info that we can add more keys after `linux rescue` command in order to include support of other things. Does anybody knows how to make `linux rescue` boot with VLAN support (8021q)?


title: How to use DD to clone a partition off a disk image?

text: I have a disk image, it's a "whole" disk image, e.g., contains multiple partitions, and I want to clone just _one_ of them (not the first one..) onto a partition on an external drive with multiple partitions on it (I'm also not cloning it onto the first partition of the disk...) FDisk'ing the image gives this:               # fdisk -l 2013-02-09-wheezy-raspbian.img           Disk 2013-02-09-wheezy-raspbian.img: 1939 MB, 1939865600 bytes     255 heads, 63 sectors/track, 235 cylinders, total 3788800 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x00014d34                                   Device Boot      Start         End      Blocks   Id  System     2013-02-09-wheezy-raspbian.img1            8192      122879       57344    c  W95 FAT32 (LBA)     2013-02-09-wheezy-raspbian.img2          122880     3788799     1832960   83  Linux     # and the block device looks like this:               # fdisk -l /dev/sdc          Disk /dev/sdc: 8014 MB, 8014266368 bytes     247 heads, 62 sectors/track, 1022 cylinders, total 15652864 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x00000000             Device Boot      Start         End      Blocks   Id  System     /dev/sdc1            2048      131071       64512    e  W95 FAT16 (LBA)     /dev/sdc2          131072    15652863     7760896   83  Linux     # I want the second partition of the image to replace the second partition of the block device. Don't worry about the trailing corrupted free space, I'll use GParted to clean that up, and I need it for something else anyway.


title: How to activate t1lib?

text: Using CentOS el6.x86_64. I installed `t1lib` this way:   1. Installing RPMForge Repository              wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm     rpm -Uvh rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm        2. Importing RPMForge Repository Key               wget http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt     rpm --import RPM-GPG-KEY.dag.txt        3. Finally install `t1lib`              yum --enablerepo=rpmforge install t1lib      Package installed - no problem Q. Do I need to do anything else to "activate" `t1lib`? When I check `phpinfo`, isn't it suppose to show under "GD" heading? I'm not seeing it there.


title: Appending a string containing escape character with sed

text: Currently I use:               sed -i -e "5a\\     ${text}" $filename      to append something to a certain line, where the variable text contains a string such as "\epsilon". When using               echo -E $text      the string is displayed just fine, but when I expand it in the string I pass to `sed`, all escape characters get expanded and the result is not what I would want. How can I get sed to use the raw contents of that string without escaping anything?


title: Bash: What does ">|" do?

text: I have just seen this written down;               $ some-command >| /tmp/output.txt      Vertical pipes are used in standard redirects "piping" the output of one command to another, is `>|` in fact completely useless as it would be the same as just `>` in this scenario?


title: zsh notification of email (in maildir)

text: How can I modify the following so that it reads maildir and not just mailbox format?               typeset -a mailpath     for i in ~/Mail/Lists/*(.); do        mailpath[$#mailpath+1]="${i}?You have new mail in ${i:t}."     done      Currently, I get:               /home/XXX/.zshrc:77: no matches found: /home/XXX/.Mail/Lists/*(.)


title: Given vmlinuz and initrd.gz, how do I find out, where the kernel is going to load / (root) file system from?

text: I'm trying various ways of Linux installation (from iso, flash, iso on flash, kernel on flash, root FS in iso-file on flash...) and want to understand what's going on. My question is: is it possible, given the built kernel and ramfs files from a distribution (vmlinuz and initrd), to find out, where they are going to look for the "/" file system? Is it possible to configure this without re-compiling the kernel? And one more: when kernel loads the root filesystem from loopback device, created from .iso-filesystem, how can I configure this process? Thanks! **EDIT:** In fact, GRUB configuration contains GRUB root, which is not the real kernel root filesystem location, but just a folder that contains GRUB's belongings,. The real root is configured in `init` script in `initrd` as described here. That's how Debian kernel finds an ISO file on hard drive, when booting from it - initramfs finds it: http://www.debian.org/releases/stable/i386/apas02.html.en#howto-getting- images-hard-disk; note that GRUB configuration doesn't contain any reference to ISO location.


title: Copy/paste across vim without X

text: In vim, `"``+``p` pastes from the system clipboard. However, when working remotely over SSH on a non-GUI box, this is not available. Is it possible to implement copy/paste in this environment? Merely copying text from the terminal is not sufficient, because it will also copy stuff that's beyond the scope of the file (for example, if using tmux, it copy the full screen because it's all plain text).


title: Keep kerberos ticket across sudo invocation

text: On a regular linux machine, when I use `sudo -s` as a normal user, I become root but `HOME` still points to `~user`, so every admin has his own environment etc. (this is without `env_reset` or `always_set_home` set). On a system where the home directories live on an AFS file system, this also works, if the environment variable `KRB5CCNAME` is preseved, as root can read this file in `/tmp`. But if I use `sudo` on such a system to change a local non-root user (e.g. the dedicated user for a certain service), the new user cannot access the kerberos cache (as it is owned by the old user and has mode 600). But if I `unset KRB5CCNAME && kinit user && aklog && exec bash`, I have access to my environment again. So the question is: Is there a clean way to make sudo take the kerberos tickets that I had before and add them to the kerberos ticket cache of the new user?


title: How can I tell if I have a bug with my kernel or with my UEFI firmware?

text: I have a dz77ga-70k motherboard with version 0049 of the Intel firmware on it. Linux and elilo will not boot in uefi mode. The symptoms are that when I run `bzImage.efi initrd=initrd.img ro debug loglevel=8 earlyprinkt=vga root=/dev/sda2` from the uefi shell, it hangs. And elilo will reboot after selecting the kernel. Then I compiled the latest kernel source and that failed too. I have added some debugging output to the source, specifically `arch/x86/boot/compressed/eboot.c` and what _seems_ to be happening is that the call to `exit_boot_services` is failing all the time. This also happens with elilo. From the uefi spec, the only reason that `exit_boot_services` should fail is because the memory map has "changed" between `get_memory_map` and exit_boot_services. I'm usually a graphics programmer and don't know much about the kernel/bios stuff, so how can I tell if this is a bug with the firmware or the kernel? I don't mind doing some testing. It seems that other people are having a similar problem with a similar motherboard: http://comments.gmane.org/gmane.linux.redhat.fedora.devel/167170 Looking at the 8 segment led status codes on the mb, it goes C6 -> start kernel -> F8 -> B1 then hangs. F8 is ExitBootServices and B0 to BF is "detecting and initing fixed media" so maybe it is getting past ExitBootServices? Any clues?


title: Why is this OSX/BSD/GNU sed workaround not working

text: So sed behaves differently depending on if it is the OSX/BSD or GNU version. OSX requires               sed -i '' <pattern> <file>      whereas this works with GNU sed:               sed -i <pattern> <file>      So I have this:               darwin=false;     case "$(uname)" in         Darwin*) darwin=true ;;     esac          if $darwin; then         sedi="sed -i '' "     else         sedi="sed -i"     fi      And then I try to call it on OSX               $sedi "s/VERSION =.*;/VERSION = \"${lver}\";/g" Version.java      And it works except for it creates a backup file named Version.java''. I'm not sure why this isn't working because if I do it explicitly from the CLI:               sed -i '' "s/VERSION =.*;/VERSION = \"${lver}\";/g" Version.java      It works without creating the backup file. Any thoughts?


title: Removed /var/lib. Can't open Desktop

text: Well, I'm pretty scared now.   I was trying to delete a folder by               sudo rm /var/lib/texmf -r      but instead, wrote               sudo rm /var/lib -r      I read some documentation about it, and found this thread. I tried to follow all the steps from the last comment (2nd page), but I didn't know how to do some of the things listed there.   So this is all I did: First, I created these folders:               mkdir /var/lib/dpkg/alternatives/  /var/lib/dpkg/info/  /var/lib/dpkg/methods/  /var/lib/dpkg/parts/  /var/lib/dpkg/  triggers/  /var/lib/dpkg/updates/  /var/lib/apt/  /var/lib/aptitude  /var/lib/binfmts/  /var/lib/misc/      I had to do it by sudo, and had to create subfolders first, in order to create all the folders. Then I did:               aptitude update && aptitude upgrade      Here is where confusion started.   First of all, the warnings listed by user @marco.org didn't appear to me (I'm not even sure in what language they're written), but instead another error appeard, saying that it couln't create some-file because some-folder (a subfolder in /var/lib) didn't exist.   I created the folder (using sudo mkdir), the process finished (with some errors I don't remember). Then I moved the file dpkg.status.0, mentioned in the link above, by:               sudo cp /var/backups/dpkg.status.0 /var/lib/dpkg/status      (Again, I had to create the folder. I'm not really sure why I did this, I just read about it somewhere) So apparently the first problem was solved. I then tried installing some program, using               sudo apt-get install some_program      and even though it showed some warnings (all about files missing from sub directories of /var/lib), the program was installed, and I could use it with no problem. A few minutes later, I wanted to relax a little bit and watch some video on youtube (I had installed the latest version of Google Chrome), but instead of relaxing, I got yet another reason to panic:   There was no sound output for the video, or for any other application on Chrome (other programs did have sound). So I panicked and shutdown my computer.   Then, when I turned it on, and after Linux started, I didn't see my desktop, but a console screen asking me for a login and password.   I gave the information, and some message appeared, saying it couldn't creat a file, because a folder was missing. I created it with:               sudo mkdir /var/lib/ubuntu-release-upgrader      Then another message said that it couldn't move the file, so I moved it manually with:               sudo mv /usr/lib/ubuntu-release-upgrader/release-upgrader-motd -t /var/lib/ubuntu-release-upgrader/      Then I restarted the system, hoping to see my desktop. But instead, the same console screen showed, saying, after giving my login and password:               Last login: Tue Apr 8 13:19:16 CST 2014 on tty1     Welcome to Linux Mint 15 Olivia (GNU/LINUX 3.8.0-26-generic i686)          Welcome to Linux Mint     * Documentation: http://www.linuxmint.com      Now I can't get back to GUI mode, or use any of my programs. I guess there should be a way of getting the folder I deleted from the installation dvd, but I'm kind of new with this, and am not sure of how to do it.   Could anybody please help me? I would really appreciate it. * * * P.S: Also, after deleting /var/lib, whenever I used sudo, a line appeared saying something like:               couldn't mkdir /var/lib/sudo, file not existing      but it got solved after the               aptitude update && aptitude upgrade


title: has someone fixed libssl.so.1.0.0 undefined symbols'SSL_load_error_strings' issue or know how to fix

text: looks like there's a broken libssl build which is missing items python CGI needs to work. I'm getting this error               ...symbol SSL_load_error_strings, version OPENSSL_1.0.0 not defined in file libssl.so.1.0.0 with link time reference       in apache errors.log when I run this cgi script:               #!/usr/bin/python           import cgi      import cgitb          ...     cgitb.enable()      I've narrowed it down to `/lib/x86_64-linux-gnu/libssl.so.1.0.0` as the error still occurs if I mv `/opt/lampp/lib/libssl.so.1.0.0` to a save file and run the cgi.               # locate libssl.so.1.0.0     /lib/x86_64-linux-gnu/libssl.so.1.0.0     /opt/lampp/lib/libssl.so.1.0.0      should I try to rebuild `libsssl.so` from source or ????. thanks in advance. raf


title: unable to ping gateway and CLAN in Linux but pingable in Windows PC

text: We're installing RHEL 5.5 for our Voice Portal (Avaya). After configuring the IP address, gateway IP, and netmask we tried to ping it so we could see if it was pingable/active or not. Sadly its wasn't. The only message we received said "Destination Host Unreachable". When we tried to connect to it through a Windows PC with the same network gateway, CLAN are pingable. We've already implemented this kind of system for our other client but this was the first time that we encountered this kind of problem. Is it possible that the OS (Linux) was having the problem? We didn't see any failures during our installation process. Perhaps it's the switch port config or our client?


title: Replace the shortest match of a string pattern

text: I have this string:               update mytable set mycol=myvalue where mycol=yourvalue;      I need to convert it to:               insert into mytemp select * from mytable where mycol=youvalue;      I can accomplish it like this and it works just fine:               sed -e 's/^Update.*where//ig' -e "s/^/insert into mytemp select * from mytable where  /g" n.txt      **BUT** : If the string is:               update mytable set mycol=myvalue where mycol=(select yourcol from yourtable where youcol=yourvalue);      I get:               insert into mytemp select * from mytable where youcol=yourvalue);      Whereas I want:               insert into mytemp select * from mytable where mycol=(select yourcol from yourtable where youcol=yourvalue);      What can I do?


title: Luna OS Overheating/ how to install TLP

text: I have a problem regarding overheating with my newly installed Elementary OS Luna. This used to happen before, when i was using Ubuntu, as well as on Linux Mint. On earlier versions of Ubuntu I used Jupiter, and then on later versions transferred to TLP. Does anyone know what to type in Luna OS terminal in order to install TLP and manage heat?


title: Preventing propagation of SIGINT to Parent Process

text: Considering a scenario where a Parent program (could be a C++ program or a Shell Script) executes a Child shell script, when we hit Control+C (or whatever character is configured to be the INTR character) while the Child Shell Script is executing, a SIGINT is sent to all processes in the foreground process group. This includes the parent process. Source : POSIX.1-2008 XBD section 11.1.9 Is there a way to override this default behavior? That the CHILD Process alone handles the SIGNAL without it propagating to the parent? Reference : Stack Overflow Post - Parent Process not Completing when Child is Interrupted (TRAP INT)


title: Task bar, close, minimize, maximize etc. disappeared on Linux mint cinnamon

text: Yesterday, While logging in to my Linux Mint(cinnamon) I noticed that my task bar has been missing. And when I open any window, there is no close/minimize/maximize button. All this sounds weird to me. I tried rebooting. No change. I have no issue while logging in using gnome classic. All works. I did not remember of something that I had changed recently. While digging on the internet for this I just found an odd question on mint forum. But unfortunately no answers. Can someone show some light into this? Additional information: While logging to my system i got window saying /tmp is not present or cannot recover /tmp - i dont remember it. Hardware:   * Asus P53E   * Core i5-2nd generation   * 4GB DDR3 RAM   * Windows 8 PRO dual boot.


title: Setting up a unix powered network

text: I want to set up several computers on a LAN, all connecting to one unix server. The primary goal being that the **user accounts** should only exist on the server. So that any user could access his normal interface through any of the given computers. What different ways are there of doing this, and what are pros and cons for these methods? sidenote: I'm looking for a method that is simplistic, requires an absolute minimum work done on the individual terminals. If the user can play games and do resource intensive stuff, it would be a bonus.


title: What happens after loading the linux kernel image into RAM

text: I just to want to know the flow of activities happening after loading the linux kernel image into the RAM after boot process.


title: How to find the BSP sections in the Linux source code?

text: I would like to know how can i search for the BSP(Board Specific Packages) sections in the Linux Source code? All comments are welcomed.


title: Anyway to navigate percentage-wise in vim?

text: I often open large files, looking through logs for finding info. As all lines have timestamp in my case and I am sure of in which part of the whole file the info is present which I am interested in. For example,   * in the bottom half of the file contents(50% or beyond) or    * about 10% more towards the end of file or    * scroll down more 20% of original file. So, to navigate quickly in this fashion i.e. with percentage-wise - Is there any existing functionality already available in `vim`?


title: Filter output of command by color

text: I am running a utility that doesn't offer a way to filter its output. Nothing in the text of the output indicates that a particular function failed but it does show in red. The output is so long that at the end when it reports some # of errors I can't always scroll to see the output where the error occurred. How can I filter out non-red text? pseudo code: `dolongtask | grep -color red` ## Edit The command outputs other colors as well and I need to be able to filter _out_ all text that _isn't_ red. Also the text coloring is multiline.


title: Does tmpfs automatically resize when the amount RAM changes, and does it compete when there's multiple tmpfs?

text: If I have a tmpfs set to 50%, and later on I add or remove RAM, does tmpfs automatically adjust its partition size? Also what if I have multiple tmpfs each set at 50%. Do multiple tmpfs compete against each other for the same 50%? How is this managed by the OS?


title: Are there any alternatives to Media Lovin' Toolkit (MLT)?

text: I'm looking for command-line Linux tools for creating video slideshows from images and video clips. I would also like to implement a variety of transitions and effects. So far, Media Lovin' Toolkit (MLT) seems to be the obvious choice, but are there any viable alternatives?


title: Is this a typo in Bash manual's redirection section?

text: Note that the order of redirections is significant.  For example, the command                    ls > dirlist 2>&1             directs both standard output and standard error to the file dirlist,         while the command                    ls 2>&1 > dirlist             directs  only  the  standard  output  to  file  dirlist,  because the         standard error was duplicated from the standard output before the standard        output was redirected to dirlist.      Now, that last part is confusing to me. In that case, any standard error would be printed to the terminal and any STDOUT would go to the dirlist file. That is what would happen, but that is not how I understand the manual. It seems like it should say "because the standard error was duplicated from the standard output AFTER the standard output was redirected to dirlist". If STDERR was sent to STDOUT before STDOUT was directed to a file, then wouldn't the file contain STDOUT AND STDERR? Can someone please clear this up for me? Is it just poor reading comprehension on my part? The use of the word duplication seems a little strange to me in this context. Perhaps that is throwing me.


title: Can system calls be interrupted?

text: Please comment on the following sentence: > On the standard Linux kernel without the rt patch, interrupts can't > interrupt ongoing system calls. The reason why our machine doesn't stop > working when data is fetched from the hard disk is because the system call > we used for that operation is blocking. Blocking means that once it issues > the request to the hard disc it changes the process state to blocked, and > willingly gives up the processor time. There are no means to interrupt an > ongoing system call on a non real time kernel. This is my understanding of the topic, I am however, not sure if it is correct.


title: Grub video memory settings?

text: I have three monitors. Only two have a display. The solution that worked in the past was to increase the video memory in grub. I lost my old `grub.conf`file. So, instead of three displays, I only have two. I have been searching and I cannot find the option to add to the vmlinux line to increase the memory reserved for video. I tried `vga=2400`, but that didn't work (note: I have 3 1280x1024 displays). All I remember is that the last two times I had to do this, I searched for many days before finding it and then, magically, all three displays worked fine. Does anyone know what option that I'm missing might be? Update: I have been investigating and I've found that the error is a core dump from xrdg, loaded from /etc/xdg/xfce4/xinitrc:               cat /dev/null $XRESOURCES | xrdb -nocpp -merge -      If I comment that out, other files try to run xrdb, which core dump. So, apparently, it is xrdb which is trying to get more memory than is available. I'm trying to use that to figure out the kernel parameter for increasing the memory available.


title: How to make directory modication date change when files from that dir change?

text: For example, if a file has been changed in that directory, then directory modification date should be updated. Basically any changes that happen in that directory should trigger a "touch" on the directory. Can I make the system do that automatically when these file operations are performed? If yes, could also the parent directories be 'touched', until root?


title: Get lines with maximum values in the column using awk, uniq and sort

text: I have a file with next format               2011-12-01 user1 access1     2011-12-01 user1 access2     2011-12-01 user2 access2     2011-12-01 user4 access2     2011-12-02 user1 access1     2012-01-01 user3 access1     2012-01-01 user4 access2      I would like to have an output that for every user shows the last date, so               2011-12-02 user1 access1     2011-12-01 user1 access2     2011-12-01 user2 access2     2012-01-01 user3 access1     2012-01-01 user4 access2      I tried something like this:               less myfile.txt | sort -k1r | uniq -f 1  | sort -b -k1      but it isn't seems to work right. Thank you for help!


title: What's the fastest (CPU time) way to get my current git branch?

text: I'm trying to improve the performance of my fish prompt, and since my prompt includes my current git branch, I'm wondering if there may be a way to make it faster. Right now I'm using `git symbolic-ref HEAD | sed 's/refs\/heads\///'`, and when I first `cd` into a git repo, it sometimes hangs for a little while. I'm wondering if there is a known faster method, or how I could find out. Whenever I run `time git symbolic-ref HEAD`, it simply outputs `0.00 real`.


title: unzip a file from another folder

text: How can I unzip a file from another folder?               gunzip -d /home/tomcat_dev/HN/radd/input.txt.gz       unzips that file to the same folder. But if I want to bring it to my folder? When I do this:               gunzip -d /home/tomcat_dev/HN/radd/o.txt.gz /home/tomcat_dev/       it gives me a: `gunzip: /home/tomcat_dev/ is a directory -- ignored`


title: How to get the maximum virtual set size of a unix process during its lifetime?

text: The `time` command includes a format parameter "M", which according to the `time` man page on Linux is used for the following:               Maximum resident set size of the process during its lifetime, in Kilobytes.      However, it does not look like `time` is able to measure the maximum virtual set size of a process during its lifetime. How can I achieve this on Linux? Just to be clear, I have control over the processes being profiled, so if I need to make this child process emit a signal at the end of its execution that indicates it is ready to terminate, so that the parent process can read its VSZ via `ps` or `pmap`, and then have the parent process explicitly terminate the child after the memory has been read, I can do it, but it would be painful, so I was hoping there might be a simpler solution that did not involve instrumenting the code of the program being profiled - something like a drop-in equivalent for `time` that can also measure maximum virtual set size would be ideal. I can write a custom C program to launch the child process, though, if need be. However, if I were to go the C route, I'm not sure what system calls I would use to enable kernel tracing of VSZ in the child process. Any guidance would be appreciated. EDIT: This turns out to be nontrivial. Possible solutions here: http://stackoverflow.com/questions/774556/peak-memory-usage-of-a-linux-unix- process/10957355#10957355


title: Precedence of stdin and stdout redirection in Bash

text: My question is about redirection precedence is bash. Suppose you have a command: `cmd1 < cmd2 > cmd3` Would it translate to: `(cmd1 < cmd2) > cmd3` Or `cmd1 < (cmd2 > cmd3)`


title: IANA image format string from binary stream

text: How can I get the official IANA Image Media Type (if any) of a binary stream? I'd like to avoid trusting to file extensions and vague guesses when handling images. Preferably some command using common tools like ImageMagick's `identify`, or some programming language if necessary.


title: bind's path to 'named.pid' looks a bit weird after a not-so-smooth package installation

text: I had a fresh VPS hosting account running Ubuntu LTS (Lucid Lynx) with Plesk 10.2.0 (and _etckeeper_ package) I used Plesk's web interface to install _Plesk Health Monitor_. It took two attempts because the first time it was aborted half way through. Unnerved by the fact that the first installation was aborted, I went to _etckeeper_ (a tool that puts `/etc/` directory under version control with git) to see what changes had occurred. I noticed a diff in a file called `/etc/init.d/bind9` where a line had changed from:               PIDFILE=/var/named/run-root/var/run/named/named.pid      to               PIDFILE=/var/named/run-root/var/named/run-root/var/run/named/named.pid      It might be nothing, but I just thought it was a bit weird to see the path having so many repetitions in it. So, I'm interested in knowing : **Should I be concerned about seeing its path change in such a way after a not-so-smooth installation?** * * * Here's some background info if you're interested... Shortly after my first login to the fresh server, I installed _etckeeper_ (with git) to watch changes in my `/etc` directory. _etckeeper_ has been both a curse and a blessing. When I first set it up, I made the mistake of uncommenting the `#AVOID_COMMIT_BEFORE_INSTALL=1` line in the `/etc/etckeeper/etckeeper.conf`. This change caused a problem when I, then, used Plesk's _Update or Install Plesk Products Tool_ to add a _Plesk Health Monitor_. The installation of that package was aborted with the message:               ** etckeeper detected uncommitted changes in /etc prior to apt run     ** Aborting apt run. Manually commit and restart.      I went back into the `/etc/etckeeper/etckeeper.conf` and commented out the `#AVOID_COMMIT_BEFORE_INSTALL=1` line. I then re-tried using Plesk's _Update or Install Plesk Products Tool_ to add a _Plesk Health Monitor_. This time the installation was successful. It was then that I used `etckeeper` to check the diffs, mentioned above.


title: cp --no-target-directory explained

text: **Question:** I need a simple example of how to use `cp --no-target- directory`. I do experience some difficulties in understanding `cp --no-target-directory`. I do understand the explanation for `mv --no-target-directory`, but I can't really imagine a way to use it for `cp`. > For example, when the command `mv /tmp/source /tmp/dest` succeeds, there is > no guarantee that `/tmp/source` was renamed to `/tmp/dest`: it could have > been renamed to `/tmp/dest/source` instead, if some other process created > `/tmp/dest` as a directory. However, if`mv -T /tmp/source /tmp/dest` > succeeds, there is no question that `/tmp/source was renamed to`/tmp/dest`. > (source)


title: How to understand the kernel panic core dump output?

text: This is the output I get when I run one of my applications:               Kernel bug detected[#1]:     Cpu 0     $ 0   : 00000000 00000000 0fffff00 0fffff00     $ 4   : c6800000 850b7780 8b0043c0 00000040     $ 8   : 000004ac 000004ac 00000002 844e8000     $12   : 00000000 feced300 8430d2ac 0000000a     $16   : 00000040 000000fc 8b759300 00000001     $20   : 00000012 84370000 00000004 00000009     $24   : 00000000 8403d4f4                       $28   : 8b1c0000 8b1c3ee0 0000000a 84255764     Hi    : 003d08ef     Lo    : 79432700     epc   : 840a754c 0x840a754c         Tainted: P               ra    : 84255764 0x84255764     Status: 1100dc03    KERNEL EXL IE      Cause : 00800034     PrId  : 00019749 (MIPS 74Kc)     Modules linked in: em8xxxcursor(P) em8xxxfb em8xxxcopybit(P) pmem_rua em8xxx(P) llad(P)     Process events/0 (pid: 4, threadinfo=8b1c0000, task=8b0323d8, tls=00000000)     Stack : 8b0323d8 8402d074 843d0c68 843d10e8 8b1c3f80 8b0323d8 843d0cc8 8b2d6de8             8b2d6de8 8402d194 00000003 00000000 00000000 84300000 84374104 8b124c80             84255238 fffffffc efffffff 8431d16c 8431d1a4 00000000 00000000 8404c364             8404cc6c 00000001 8b124c88 8b124c80 8b124c88 8b124c80 8b1c3f80 00000000             00000000 00000000 00000000 8404cc04 8b03254c 8b03254c 84051638 00000000             ...     Call Trace:[<8402d074>] 0x8402d074     [<8402d194>] 0x8402d194     [<84255238>] 0x84255238     [<8404c364>] 0x8404c364     [<8404cc6c>] 0x8404cc6c     [<8404cc04>] 0x8404cc04     [<84051638>] 0x84051638     [<84051b14>] 0x84051b14     [<8404cba8>] 0x8404cba8     [<84051650>] 0x84051650     [<8401504c>] 0x8401504c               Code: 3c030fff  3463ff00  00431024 <00028036> 09029cfd  24050001  27bdffc8  0085102b  afb7002c      Kernel panic - not syncing: Fatal exception in interrupt      Am I able to get some info from this dump regarding the issue which is making this happen?


title: Universal extractors

text: With an increasing number of archive/compression file formats, is there a single free/open-source command line tool to rule them all? Perhaps something with a consistent / unified set of flags? (note my friendly implicit reference to tar) I once run into a set of aliases meant to largely simplify the task of compressing/de-compressing files with bindings to `tar` and other utils, but I can't find this anymore. **Update:** How can I configure something like `atool` to not use `unzip` to extract zip files (which apparently can't handle files larger than 4GB) and to use `gunzip` instead?               $ aunpack large_file.zip     error:  Zip file too big (greater than 4294959102 bytes)     Archive:  large_file.zip     warning [large_file.zip]:  1491344848 extra bytes at beginning or within zipfile       (attempting to process anyway)     error [large_file.zip]:  start of central directory not found;       zipfile corrupt.       (please check that you have transferred or created the zipfile in the       appropriate BINARY mode and that you have compiled UnZip properly)     aunpack: unzip ...: non-zero return-code


title: Having an independent console to kill rogue process?

text: Sometimes a flash plugin starts using all the mem and CPU or an app is also behaving "naughtily" and my system starts to crawl until i finally get a terminal with `htop` up and kill the rogue process, but having to wait 2 or 3 minutes until the terminal opens. Is there a way to have a responsive, second console with a separate assignation of memory and cpu resources to quickly open it up to kill process that affect the rest of my system?


title: Stochastic version of seq for generating sequence of random numbers/words?

text: Some time ago I used a seq-like tool for printing a sequence of pseudo random generated numbers to stdout. You could specify a range, seed, and the number of samples and much more. I've just forgotten the name of this tool. Can anyone help me out? Perhaps you know even a more advanced tool that, for example, supports different probability distributions or even the generation of a sequence of random words under different alphabets and length/character distributions.


title: Manipulating `/dev/video`

text: I'd like to take the video stream from `/dev/video0`, apply some effects or changes and make the result available on `/dev/video1`. `/dev/video0` ---> Apply Effects ---> `/dev/video1` For example, `mplayer tv:// -vo caca` will display the output of `/dev/video` in ascii art. I would like to make that available on `/dev/video1` so that I could send that through skype instead of my default webcam feed.... Any suggestions?


title: Quickest way to change dir from /xxxxx/foo/yyyyyy to /xxxxx/bar/yyyyyy

text: Using bash, what is the easiest way to 'replace' a given part of the current path with something else? If my current path is of the form `/xxxxx/foo/yyyyy`, how can I jump to the `/xxxxx/bar/baz/yyyyy` directory with the shortest command?


title: multigateway routing for specific src port

text: I have two gateway to access internet, somehow I want to load balancing it, so far its working, but some connection or service need persistent gateway IP to be used, so the client should never change its gateway once it have connected to dest., my current implementation seems to be round-robin or whatever it is. this is my iproute               ...     ...     default         nexthop via 192.168.1.1 dev eth0 weight 1         nexthop via 192.168.1.2 dev eth0 weight 1      now i want to fix it somehow the gateway the client will use is predetermined, for example by using source port, if the source port is even number we use gw.1 and odd number go through gw.1, can we do that using ip route? *note that I only have one outbound interface : eth0 here.


title: Adding a line of text to multiple files

text: So, I have a bunch of files in a directory, and I need to insert a line of text into each of them. They have essentially the following format:                    <VirtualHost *:80>             ServerAdmin gabe@localhost             DocumentRoot /var/www/test1             ServerName test1.local             ServerAlias test1             <Directory "/var/www/test1">                     Options All                     AllowOverride All             </Directory>     </VirtualHost>           And I'd like to insert a line before the closing > </VirtualHost> tag. My first assumption is that I should be able to do this with sed, probably matching and replacing that tag. I'm going to start attempting this now, but if anyone has a existing way to do this, I'd love to hear it.


title: connecting laptop to LCD TV via VGA cable

text: I'm trying to connect my laptop (Acer Aspire 5315 having Ubuntu 13.04) to Samsung LCD HDTV. I connected the VGA cable; one end on my laptop VGA socket & the other on the TV VGA socket. But when I boot my laptop, nothing appears on the TV as well as laptop. On laptop directly the login screen appears. My intention is to get the display on the TV. _For this I had googled & came across really same question that I mentioned above_. But those threads couldn't resolve my issue. I've a few doubts. Please assist me in that. 1) While googling, I came across a solution that says to install NVIDIA graphics driver. Now whether this will work for me as the below command shows that my graphic card is not NVIDIA?               ravbholua@ravbholua-Aspire-5315:~$ lspci | grep VGA     00:02.0 VGA compatible controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (primary) (rev 03)     ravbholua@ravbholua-Aspire-5315:~$       In other words, will NVIDIA graphic driver work for all systems irrespective of the graphic card the system has? 2) In google, I found many had given the solution to install the NVIDIA driver via 'Additional drivers' tab as shown below. But in my system there isn't any driver listed!! ![enter image description here](http://i.stack.imgur.com/yrtG1.png) So, I will try to install via CLI. I will follow the Dedoimedo site also for this. (I'm assuming the the NVIDIA driver will work for me) > EDIT#1 I tried changing the settings on the `display` application under `System Settings` but I couldn't get the display on the LCD TV. I checked the sources available on the TV but the 'PC' option was disabled. > EDIT#2 This edit is w.r.t. the answer posted by @mo_roodi. I installed the Intel Linux Graphics Drivers from the link he had in his answer. I hope I did it rightly. I installed the Linux Graphic Installer. Then I opened the application & a window popped up named "Intel Driver Manager". Then it upgraded the system. Below I answer to his questions: 1) Yes everything is fine on the laptop screen. 2) I haven't connected ever my laptop to any external display. This is the 1st time I'm connecting to SAMSUNG LCD TV. 3) I haven't connected the TV via PC connection with any external device. 4) I can't say regarding the dual-head capability of the graphics card. 5) I can't say yet whether the VGA cable is O.K. or not. But I did something to test it. Using a multimeter, I checked the continuity. It's a 15 pin VGA connector. I put one probe on one of the pins & the other on the external surrounding metal (trapezoidal in shape) of the same plug (connecter). And it showed continuity!! Does it seem to be a problem? This means the pin & the outer metal boundary is short. Also I found that a pin on one plug was in "continuity" with the outer boundary of the other plug at other end of the cable. Is it really like this!! In RCA cable, it means defective cable. Still, I will try to check this cable at some other place. I ran               $ xrandr -q      Screen 0: minimum 320 x 200, current 1024 x 768, maximum 8192 x 8192     LVDS1 connected 1024x768+0+0 (normal left inverted right x axis y axis) 331mm x 207mm        1280x800       60.0 +        1024x768       60.0*         800x600        60.3     56.2          640x480        59.9       VGA1 connected 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm        1024x768       60.0*         800x600        60.3     56.2          848x480        60.0          640x480        59.9       TV1 unknown connection (normal left inverted right x axis y axis)        848x480        59.9 +        640x480        59.9 +        1024x768       59.9          800x600        59.9      One point I would like to share. After connecting my laptop with TV via cable, my TV has the `PC input` option still disabled. Is it that the option should have become enabled after connecting the cable & booting the laptop? I had checked a youtube video. In that the guy showed how he connected his TV with laptop. There after connecting via cable & booting, he clicked on 'source' button on TV & selected 'PC input'. He was able to select that because it was enabled for him. Still he wasn't getting the display on TV. Then he change the resolution under 'display' menu in his laptop & then it worked. > EDIT#3 Just attaching below the photo of my TV showing that only 1st 2 options (TV & AV) are enabled. 'PC' input is disabled. ![enter image description here](http://i.stack.imgur.com/XE9PX.jpg)


title: Bizzarre behaviour of "echo !!" under interactive Bash. Is this a feature?

text: I wanted to test something in shell and I've typed `echo "!!"` instead of typical `echo "foo"`. I didn't get the `!!` for output. Instead, (and very unexpectedly!) it produced the output of my previous command issued for Bash. I tried to google the phrases `bash !!` (and permutations like `bash +"!!"`), but I couldn't find any reference for this feature. Can someone tell me something about the exclamation marks' stuff and Bash? At least how to find extra info? I use Bash 4.2.45 on Linux Mint 16 64 bit.


title: How to create bootable USB drive from DVD

text: I have a DVD with fedora 20 in it. My DVD drive doesn't work so I need to boot from an USB. I have copied the contents of the DVD into a USB drive and now how can I make this drive bootable?


title: change the panel font color of the numix theme

text: So I loved numix and I installed it in lubuntu 13.10 and now, when I apply it, it does into show the name of the minimized app. ![enter image description here](http://i.stack.imgur.com/M7286.png) it does not even have option to edit.


title: Debian Stable with one install ever

text: Please this is not duplicate in this entire universe . After a lot research on distros I got more confused. I was happily living with my lubuntu and `apt-get` for years. Then I came across a system format and my digging started. Finally I arrived to Debian stable. **Now if I install Debian 7 stable and there happens to be a release of Debian 8 stable, would I be able to switch it without booting installing any other distro? I really do not want to go to testing or unstable.** So one line my purpose is to fully avoid reinstall nix system after a year or two. My purpose is simple programming. I heard about arch, but I have not much time to get deep learn.


title: Startx results in a black screen

text: I recently wanted to solve a problem with using a second monitor from my laptop that is running debian (jessie) but because I lack knowledge things didn't go as planned. Now I am getting booted into `tty1`, without any kind of graphical environment starting. I got a Dell XPS17 laptop, using an Intel HD 2nd gen chipset and a Nvidia gt555m graphic card. What I initially did was install some drivers (some nvidia drivers iirc) and then creating an `xorg.conf`. When I now execute `startx` only a black screen appears, but no errors are printed in the `/var/log/Xorg.0.log`. My goal is to make the default laptop display run again, using the Intel hd graphic card and an additional monitor using the Nvidia card (but I would be happy as well if only the laptop display would work again). What do? I'm not that familiar with Linux/unix and I would appreciate any stp- by-step solution available.


title: What is the state of new format packages (pkgng) in recent FreeBSD

text: So, I was searching around with no results about what is the state with new format packages on FreeBSD. As I understand after this spring's security issue package building has been postponed. And they are not available to current date, right? Any idea when new package's repositories will be available?