title: How to quote a string containing dollar sign $ and single quote '?

text: My directory's name contains a `$` and `'`, for example               :~$ export DIR=\$my\'dir     :~$ sh -c "ls $DIR"      How can I run above command without `$my` being expanded? I know the single quote doesn't work since the `$DIR` contains one. Sorry if my question above is not clear. Actually, the question came from using `find` command as follows:               :~$ find ./\$my\'dir -type d -exec sh -c 'ls "{}"' \;      It says `./\'dir: No such file or directory`, if I remove the double quotes then it says `unexpected EOF while looking for matching '`.


title: Solaris 11.1 and ipfilter

text: I'm trying to get IP Filter to work on Solaris 11.1. I'm following the official Solaris 11.1 guide. When the host is booted it doesn't pick up the `ipf.conf` that I expect. Here's the contents of `svccfg -s ipfilter:default listprop` :               config                                        application     config/ipf6_config_file                      astring     /etc/ipf/ipf6.conf     config/ipnat_config_file                     astring     /etc/ipf/ipnat.conf     config/ippool_config_file                    astring     /etc/ipf/ippool.conf     firewall_config_default                       com.sun,fw_configuration     firewall_config_default/apply_to             astring     firewall_config_default/exceptions           astring     firewall_config_default/open_ports           astring     firewall_config_default/value_authorization  astring     solaris.smf.value.firewall.config     firewall_config_default/version              count       1     firewall_config_default/policy               astring     custom     firewall_config_default/custom_policy_file   astring     /etc/ipf/ipf.conf     firewall_config_override                      com.sun,fw_configuration     firewall_config_override/apply_to            astring     firewall_config_override/policy              astring     none     firewall_config_override/value_authorization astring     solaris.smf.value.firewall.config     general                                       framework     general/complete                             astring     general/enabled                              boolean     true     restarter                                     framework                 NONPERSISTENT     restarter/logfile                            astring     /var/svc/log/network-ipfilter:default.log     restarter/contract                           count       7951     restarter/start_pid                          count       4031     restarter/start_method_timestamp             time        1354809979.642008000     restarter/start_method_waitstatus            integer     0     restarter/auxiliary_state                    astring     dependencies_satisfied     restarter/next_state                         astring     none     restarter/state                              astring     online     restarter/state_timestamp                    time        1354809979.645753000      From the above I'm expecting that it will pick up `/etc/ipf/ipf.conf` and use that. It doesn't ! Instead it use an empty rule set. After boot I have:               $ svcs network/ipfilter     STATE          STIME    FMRI     online         17:06:19 svc:/network/ipfilter:default     $ ipfstat -io     empty list for ipfilter(out)     empty list for ipfilter(in)      I can enable my config file manually with `ipf -Fa -f /etc/ipf/ipf.conf` and that works fine so it is solely the SMF stuff I cannot get to work as I expect. I've been trying to read and also look trough the script that SMF executes wrt IPFilter. But I'm stuck. It is far more complex than what I can comprehend. :-( Perhaps it has something to do with Solaris' automatic network configuration feature? It would have been great if the fairly complex SMF script would make some output to console (and thus to SMF logfile) as to the choices it is making. Unfortunately it doesn't. My host is a non-global zone with exclusive IP stack. What have I overlooked? Pls help.


title: Are there any Workload Management subsystems for Linux?

text: Asked this on superuser, got no response: Can anyone tell me of the status/state of WLM (Workload Management) kernel scheduler systems in Linux? Alternatively, any user-space process goal-based load management programs? This is a good start, but I'm not aware if these proposals are implemented? http://www.computer.org/plugins/dl/pdf/proceedings/icac/2004/2114/00/21140314.pdf http://ckrm.sourceforge.net/downloads/ckrm-linuxtag04-paper.pdf AIX has inclusive WLM, anything comparable for Linux?


title: Installing Tor on Backtrack 5R3

text: I've been trying to install Tor on my Backtrack 5 R3 laptop, and I believe it should be installed, however, when Vidalia starts it says it's unable to start Tor and asks me to check the location and name of the executable. I used the guide on ethicalhack3r as it's been a while since I've used Linux and the tor executable file ended up in `root/tor-0.2.2.39/src/or/tor`. After Tor had finished bootstrapping at the end of the guide it didn't do anything for a long while so I ended the process. I suspect this is the problem, but I'm not sure.


title: How to install apt-get without a package manager

text: How can I install apt-get on a 32-bit Linux System if I don't have an existing package manager, like yum? What do I need to get?


title: Extracting characters after a particular text

text: I am extracting a page from website using cURL command.               curl "www.google.com" -s |  w3m -dump -T text/html > foo.txt      The w3m command outputs the HTML page in a much more simpler format so that the string manipulation in the `foo.txt` is simpler now. Now, I have some values in my `foo.txt` which get extracted as below.               Assistant director at Hollywood studios     Student at University of Texas at Arlington      Now, I need to extract only the values after **at** to store in my database. How can I do it? For example, for the above input, I need the values as,               Hollywood Studios     University of Texas at Arlington


title: Groups of workspaces in XMonad

text: I've modified my XMonad config to add additional workspaces, each corresponding to a keyboard key, but I've run out of keys which are easily reachable from the home row finger resting position. Can I have groups of workspaces? For an example use case, assuming state-machine semantics for the workspace groups, I might do `Mod-G-1` to enter `Group 1`, then do `Mod-1` to enter `(Group 1).(Workspace 1)`. Later, I might do `Mod-G-2` to enter `Group 2`, then do `Mod-1` to enter `(Group 2).(Workspace 1)`. I'm guessing it wouldn't be too hard to code this myself, but I'd rather use an existing solution if one is available. And yes, I do need all those workspaces.


title: get approximate size of directory (recursively including all files and sub-directories)

text: Is there a way to quickly get an accurate size for a directory (including, recursively, all its sub-directories)? I don't want the sizes of the subdirs, I just mean that they should be recursively included in the total size reported. Failing that, a way to get an approximate size? I am thinking something along the lines of `df` that produces a quick response for the entire file system, but this time for a specific directory (and it's subdirectories). Solutions using `du` seem to take ages when given a directory contains thousands of sub-dirs.


title: How to traverse a file and extract words using their index?

text: The given file must **not** be stored in variable and then traversed due to memory size restrictions: Example:               var=$(cat FILE)     for i in $var     do       echo $i     done      How do you traverse all strings in a file in the same way as the example above but extract each whitespace-separated directly from the file? Example:               fileindex=1     totalfilecount=$(cat FILE | wc -w)     while (( ${fileindex} <= ${totalfilecount} ))     do       onefilename= ??? missing command using fileindex       ((fileindex+=1))     done      Is there a command that can view a file as an array and allow you to extract words using their index positions? The idea is to process every word in the file as though the file were an array. Input file example:               one two     three four     five six      Here is the scenario that requires the above funtionality:   * we have server_A and server_B   * server_A needs to connect to server_B via sftp (sftp only) and 'get' some files   * BOTH 'ls' or 'ls -l' commands in sftp can be using wild cards to filter specific files   * each file needs to be processed individually (for various reasons) on the fly   * the files cannot be copied as a group to server_B and then processed individually    * a list of files must first be created on server_A and then each file in that list is copied from server_B and processed one file at a time Where is the problem? The problem is how the 'ls' command can create a dual column list of words if the list is long thus not allowing simple processing as with 'ls -l' which always creates a single column list. This leads us to my initial question, if such a solution exists.


title: Which parameters were used by apt-get to install init scripts for a package?

text: After removing the init script for hdparm with `# update-rc.d hdparm remove`, the wish is to re-install/fix/repair the hdparm init script. In other words to undo the update-rc.d removal. Calling `# update-rc.d hdparm defaults` doesn't seem right:               # update-rc.d -n hdparm defaults     update-rc.d: using dependency based boot sequencing     update-rc.d: warning: hdparm start runlevel arguments (2 3 4 5) do not match LSB Default-Start values (S)     update-rc.d: warning: hdparm stop runlevel arguments (0 1 6) do not match LSB Default-Stop values (none)      Another internet resource shows that `# update-rc.d hdparm start 07 S .` might be the correct re-installation command for hdparm. But how to find out how the currently installed `apt-get install -t unstable hdparm` did exactly install its init script(s)?


title: intersection of two files according to the first column

text: I have two files in file A, there are sequence_numbers in the other file B, there are many columns, and the first column is sequnce numbers, I want to get a files with all the lines in the B with the sequence numbers which are in the A how can I achieve this? thanks like file A               1     3     8     9     20      file B               1 kfjk 3243424     2 fkdkf 23543592     3 iefjk 21493402     7 dlafdl 23435231     8 kfkdlkf 309834


title: Awk not rendering any result

text: My goal is to get the file created in the current month in a directory. It seems that the command is correct but not rendering any result:               Date=`date '+%b'`          echo $Date     Oct          ls -l | awk -v d="$Date" '/d/ {print $NF}'


title: add fields from different files

text: I have two files A and B with the same number of lines. Each of them has multiple columns. I want to add field 6 in file A with field 3 in file B for each line. e.g.: file A:               2769 RUT10EKl3fY 0 0.00483891 1352626500270 2      2773 0XbIZqg4v7w 0 0.00360106 1352626851193 3     2777 j1tuJt5IyUw 0 0.00460544 1352627235337 4      file B:               2769 RUT10EKl3fY 1     2773 0XbIZqg4v7w 8     2777 j1tuJt5IyUw 9      Result (1+2, 3+8, 9+4):               3     11     13      How can I achieve this?


title: Increase space between icons in xfce notification area

text: Is it possible to increase the space between the icons in the _xfce notification area_? I want to change the spacing so that the _notification area_ looks like the _indicator plugin_ on the left (see the picture). Right now it looks horrible with this inconsistency. Maybe there is a solution in the xfce forums, but i hope that i don't have to compile the whole notification plugin only for such a small change. ![xfce-panel](http://i.imgur.com/YtPEQ2O.png)


title: Screen in bash script

text: I am using a bash script and I need to create a screen, execute a specific command with a memory limit and detach the screen. I have been trying something similar:               #!/bin/bash     for i in 1 2 3 4 5 6 7     do         test="test"$i         screen -dmS test         screen -r test -X ulimit -v 2199552         screen -r test -X ./my_command $i     done      ...but it doesn't work. In particular, the screen is created, but ./my_command is not executed. Any hint?


title: How can I make Krusader show real size of symlinked files?

text: In the "size" column in Krusader, there is a link's size noted, instead of the size of the actual file. This is the same as what _ls -l_ shows (the full address of the target file, e.g. 64 B instead of 3.4 kB in one particular case). Is there a way how to change this to show the size of the target file? ![The selected file is an actual file, the others are symlinks to similar- sized files](http://i.stack.imgur.com/YKhKu.png)


title: Live boot GUI convert a primary partition to a logical partition?

text: Is Gparted Live unable to convert a primary partition to a logical partition? i.e. to make an extended partition and make that primary partition a logical partition within the newly created extended partition? (or to move a primary partition to an existing extended partition) What GUI alternative is there to Gparted Live that can? I don't see any option here e.g. in the partition menu, for converting a primary to a logical. ![enter image description here](http://i.stack.imgur.com/0OkCj.png)


title: Need help on this bash auto completion script

text: I'm trying to setup autocompletion for a command, which takes only one parameter, a folder name, In `/secure/kernel_builds/`, I have the three following subfolder: `3.5.6/ 3.6.2/ source/` Now I want auto completion, that lists all sub folder name possible, but not the one named `source`, right now I'm using a pretty stupid way to do it, by checking if the completion word is started with a number,               _avail_kernel_builds()     {         case $COMP_CWORD in             1)                 if [[ "${COMP_WORDS[COMP_CWORD]}" =~ ^[0-9] ]];then                     COMPREPLY=( /secure/kernel_builds/"${COMP_WORDS[COMP_CWORD]}"* )                 else                     COMPREPLY=( /secure/kernel_builds/"${COMP_WORDS[COMP_CWORD]}"[0-9]*/ )                 fi                 COMPREPLY=( "${COMPREPLY[@]#/secure/kernel_builds/}" )                 COMPREPLY=( "${COMPREPLY[@]%/}" )                 ;;         esac         }      Is there a better way of doing so?


title: How to get pid of su --session-command file thats ran on there

text: This line ran in a script               su --session-command="$javaCommandLine & >>$serviceLogFile 2>&1 & echo \$! >$pidFile" $serviceUser || return 1     pid="$(<$pidFile)"     echo $pid      The Pid is increased by one from the Pid the program ran by su really is.   How I do I get that program's pid?


title: How to view the read and write from the application

text: I won't sudo the application I am using, as I do not trust it. But it is still able to read and write to the files in the /home/{username} when I run it. How can I see what files the application is reading and writing?


title: Debian Squeeze/MySQL error

text: I am a Unix/Linux noob, so please bear with me. I installed lighttpd and PHP on MySQL using the instructions in the accepted answer here:               http://raspberrypi.stackexchange.com/questions/1164/how-to-install-lighttpd-with-php      Then I tried to configure my.cnf to allow remote access to MySQL using the instructions here:               http://www.cyberciti.biz/tips/how-do-i-enable-remote-access-to-mysql-database-server.html      When I type `mysqld start` or `mysqld stop` I get a seemingly never-ending stream of errors. It is too long to paste here, so I will mention a few:               [Note] Plugin 'FEDERATED' is disabled     InnoDB: Unable to lock ./ibdata1, error: 11     InnoDB: Check that you do not already have another mysqld process     InnoDB: Using the same InnoDB data or log files.     InnoDB: Retrying to lock the first data file     InnoDB: Unable to lock ./ibdata1, error: 11     .     .     .     InnoDB: Error in opening ./ibdata1     InnoDB: Error number 11 means 'Resource temporarily unavailable'.     InnoDB: If you tried to add new data files, and it failed here, you should now edit innodb_data_file_path in my.cnf back to what it was, and remove the new ibdata files InnoDB created in this failed attempt. InnoDB only wrote those files full of zeros, but did not yet use them in any way. But be careful: do not remove old data files which contain your preciious data!     [ERROR] Plugin 'InnoDB' init function returned error.     [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.     mysqld: Too many arguments (first extra is 'start').     [ERROR] Aborting      What should I do?


title: How to change background and text colors in Yakuake?

text: I like Yakuake, but I don't like the grey background color. I want to change the background and text colors of the Yakuake terminal. I checked the options, but the background color option is only changing the bottom tab bar.


title: What graphical programming language does OpenBox use primarily?

text: Is there a specific graphical language that OpenBox uses for most of it's apps, or one that it likes to run with? For example how KDE uses primarily QT for it's apps, and also includes a large numbers of libraries to run with it. The reason I ask, is that I have a program I wrote for KDE, and I would like it so people on OpenBox could also run it. I'm just not sure how well OpenBox would handle it, if at all.


title: Range of possible value returned by cksum

text: I am looking for the range of possible values that could be returned by `cksum`. E.g.               echo -n '/my/path/filename' | cksum | cut -d' ' -f1      returns `2379496500`. What is the range (min and max) of the possible values that can be returned? BTW, the parameter above is the string value of a fully qualified file path, not the contents of the file specified thereby.


title: Does using full-disk encryption affect the probability of losing data in case of storage errors?

text: So.. if there is a bad block on the HDD, what can survive better?   1. not using FDE (full disc encryption)   2. using FDE - since the whole disk has "1 partition" - the encrypted one, isn't it more likely to loose all data if there is a HDD error, ex.: bad block?


title: OS X: how to keep the computer from sleeping during a http connection

text: An application I use downloads data from a specific server, and I need it to sleep after the download has finished and the socket is closed. However downloads take place at random days, the app that downloads checks for updates and only downloads if there is one               Proto Recv-Q Send-Q  Local Address          Foreign Address        (state)         tcp4       0      0  192.168.1.29.51005     8.8.8.8.80      ESTABLISHED      Pretend 8.8.8.8 is server where data is downloaded from. Is there a way to prevent the computer sleeping while there is HTTP session to a specific server in progress? Now please excuse my pseduo script, but it's the best way I could try               netstat -anp tcp      IF Foreign Address = 8.8.8.8 & state = ESTABLISHED     then         WAIT AND CHECK IN 10 MINUTES     else         pmset sleepnow     fi


title: Why does time/ident/daytime/comsat run after an OpenBSD 5.2 install?

text: I installed an OpenBSD 5.2 using "-* & +etc* & +base* & +bsd". After finished with the install, I rebooted, then `netstat -at | grep LISTEN`, this is what I get for output: ![partial netstat output](http://i.stack.imgur.com/3Nz1h.png) **Why does so many unneeded services running on the most secure OS (*stated to be the most secure) in the world?** Can someone tell my why are these:               egrep -i '^time|^daytime|^ident|comsat' /etc/inetd.conf         ident          stream  tcp     nowait  _identd /usr/libexec/identd     identd -el         ident          stream  tcp6    nowait  _identd /usr/libexec/identd     identd -el         127.0.0.1:comsat dgram udp     wait    root    /usr/libexec/comsat     comsat         [::1]:comsat   dgram   udp6    wait    root    /usr/libexec/comsat     comsat         daytime                stream  tcp     nowait  root    internal         daytime                stream  tcp6    nowait  root    internal         time           stream  tcp     nowait  root    internal         time           stream  tcp6    nowait  root    internal         daytime        dgram   udp     wait    root    internal         daytime        dgram   udp6    wait    root    internal         time           dgram   udp     wait    root    internal         time           dgram   udp6    wait    root    internal      important in the default install to be enabled? **UPDATE: from the obsd mailing list:**               frantisek holop's answer is the most logical yet:          ---------     hi,          i seem to recall reading in some RFC or maybe in     one of the stevens books that these services are     required for a "server".  i look at it as being     a good internet neighbour, a bit like "can you tell     me the time please" when someone stops you on the street...     ---------


title: How to find files that are not owned by any package?

text: In my system I have files that not belong to any package, they are mine or from compiled programs installed with `make install`. How can I find all files that do not belong to any package?


title: Mapping C-1 does not work in VIM

text: I'm trying to bind `1gt` to `CTRL` + `1`, so in vimrc I added `nmap <c-1> 1gt` But pressing these keys in normal mode does not work. Either VIM (konsole) or gVIM Anything wrong with my command?


title: Why doesn't the tilde (~) expand inside double quotes?

text: According to this answer and my own understanding, the tilde expands to the home directory:               ➜  ~  echo ~     /home/braiam      Now, whenever I want the shell expansion to work, i. e. using variable names such `$FOO`, and do not break due unexpected characters, such spaces, etc. one should use double quotes `"`:               ➜  ~  FOO="some string with spaces"     ➜  ~  BAR="echo $FOO"     ➜  ~  echo $BAR     echo some string with spaces      Why doesn't this expansion works with the tilde?               ➜  ~  echo ~/some/path     /home/braiam/some/path     ➜  ~  echo "~/some/path"     ~/some/path


title: Running linux script on remote linux system using putty

text: I would like to copy certain logs from a remote linux system to the windows system. I'm trying to make a batch file, that will connect to the linux system using putty like:               putty.exe -ssh user@192.168.1.1 -pw password       How will I add the linux command to be run to this? Is it possible or should I look for some other software


title: Compiling ImageMagick with special path to librairies

text: I have been compiling ImageMagick 3.1.2 with the following options               ./configure --prefix=/usr/local/imagick-3.1.2/ --with-php-config=/usr/local/php-5.3.13/bin/php-config --with-imagick=/usr/local/ImageMagick-6.8.8-6/ --libdir=/usr/local/apache/lib/      This is working great but I would like to put all librairies (libMagickCore-6.Q16.so.2, libjpeg.so.62 ....) needed for imagick.so in one folder such as /usr/local/apache/libs Then I would export the environment variable LD_LIBRARY_PATH="/usr/local/apache/lib:" Any idea ?


title: Route wlan0 to openVPN tunnel and rest to eth0

text: I'm having problems to create route/iptables rules for following configuration:   1. I have an openVPN server (tun type) running on my raspberry machine at home   2. At work i have company pc (behind proxy) that creates tunnel using openVPN to my home machine   3. At work i have USB Wifi dongle (wlan0) connected to my company pc that should provide internet using the tunnel to machine at my home Now i need to create rules for: 1. All traffic going via wlan0 to route to tunnel 2. Rest of the traffic route to eth0 - company network behind proxy Default route rule at company pc (linuxmint 15) for all traffic going via eth0 - proxy:               Kernel IP routing table     Destination Gateway Genmask Flags Metric Ref Use Iface     default 10.131.4.1 0.0.0.0 UG 0 0 0 eth0      --> that rule must stay on eth0


title: UUID in /etc/mtab

text: In some versions of Ubuntu. Disks are mounted by UUID. in My machine, `/proc/mounts`               /dev/disk/by-uuid/UUID / ext4 rw,relatime,errors=remount-ro,barrier=1,data=ordered 0 0      `/etc/fstab`               UUID=U-U-I-D  /   ext4  errors=remount-ro        0  1        But in `/etc/mtab`               /dev/sda1 / ext4 rw,errors=remount-ro,commit=0 0 0      So is it guaranteed that there will be no UUID in `/etc/mtab` ?


title: Chain loading kernel without a boot loader

text: I am working on an embedded project that will do in-place upgrades. There may come a time when an upgrade will need to reinstall everything. Since this is a pretty risky thing, I would like to have some kind of failsafe fall-back mode to reattempt the upgrade. I am thinking of adding a very basic kernel that has just enough to attempt another upgrade. I want to always boot into this basic kernel, check GPIOs, and then boot into the other kernel or continue booting depending on the state of the GPIOs. I'll install a button on the case to signal the appropriate GPIO. I don't know how the boot loader works, and grub/syslinux isn't available AFAIK. Is this sort of thing possible? Am I over-complicating the problem?


title: Zsh style arrays with Bash

text: Does Bash have a way to access arrays similar to Zsh, something like               $ foo=(dog cat mouse)          $ echo $foo[1]     cat      instead of               $ echo ${foo[1]}      perhaps using some `shopt` setting?


title: No Connections tab in Mint 17 network settings(???)

text: I'm trying to get this old Dell laptop (Model not handy at the moment) to connect to wi-fi, but the **Network settings only shows "General" "DNS" and "Posts" but no "CONNECTIONS" tab (as shown in the help files), _so there are just the three tabs_** and no list of available connections. Any clues as to why this is the case?


title: get rsync to dereference symlinked dirs presented on cmdline like find -H

text: I'd love rsync to copy symlinks to dirs specified on the cmdline as dirs but leave all symlinks in the copied tree as is - like `find -H`, but the only way is a nasty hack of               rsync -aR --rsync-path='cd /sender/parent/dir/of/tree; rsync' symlinkeddir/ target      the issue there is that this becomes an exception in my rsync backup scripts just for this one set of paths so I can't use the same command (or more so, just ONE `rsync`) to do what I want. `find -H` -like behaviour would do it very nicely. :/


title: How can I upgrade pip on Ubuntu 10.04?

text: On Ubuntu 10.04 I've used `apt-get install pip` to install `pip` after which I installed `django`. Then I tried to uninstall `django` with `pip` via `pip uninstall django` which gives me:               pip: error: No command by the name pip uninstall      From doing some research that is because I'm using an older version.               $pip --version     pip 0.3.1 from /usr/lib/python2.6/dist-packages (python 2.6)      I first realized that this version of `pip` did not have uninstall when I installed the wrong version of `django` and tried to uninstall it with               pip uninstall django      and ended up with               pip: error: No command by the name pip uninstall      From another article: > pip 0.3.1 is over two years old, and indeed it does not include the > uninstall command. The current version of pip is 1.0.1. > > I presume you're using an OS-packaged version of pip; those tend to be quite > out of date. Quite a few bugs have been fixed and features added in the last > couple years. So what is the correct way to upgrade it on Ubuntu 10.04 so that I can gain access to the `uninstall` command?


title: Can't access Rasperberry Pi over the internet

text: I set up an R-Pi 3G Modem combo with wvdial and it's working perfectly. I can access everything on the internet from the Pi. But when I try to access the Pi from the internet there is nothing, zero connection. As far as I can tell there is no firewall so I have no idea what blocks the data. If I connect the Pi to my LAN I can access it through my local network.


title: xmodmap KeyPress Event to ButtonPress event

text: I just got a logitech t400 mouse and everything is working well, except I want to remap the "top" part of the middle mouse to actual middle mouse function. When I run `xev`, and capture the clicks, all the mouse buttons return a `ButtonPress`/`ButtonRelease` event but the top part of the middle button returns a `KeyPress`/`KeyRelease` event as :               KeyPress event, serial 35, synthetic NO, window 0x5200001,     root 0x31d, subw 0x0, time 630089839, (80,128), root:(2871,588),     state 0x10, keycode 133 (keysym 0x31d, (no name)), same_screen YES,     XLookupString gives 0 bytes:      XmbLookupString gives 0 bytes:      XFilterEvent returns: False          KeyRelease event, serial 36, synthetic NO, window 0x5200001,     root 0x31d, subw 0x0, time 630089983, (80,128), root:(2871,588),     state 0x50, keycode 133 (keysym 0x31d, (no name)), same_screen YES,     XLookupString gives 0 bytes:      XFilterEvent returns: False      The bottom part of the middle button works fine, and returns :               ButtonPress event, serial 37, synthetic NO, window 0x5200001,     root 0x31d, subw 0x0, time 630137726, (10,171), root:(2801,631),     state 0x10, button 2, same_screen YES          ButtonRelease event, serial 37, synthetic NO, window 0x5200001,     root 0x31d, subw 0x0, time 630138960, (10,171), root:(2801,631),     state 0x210, button 2, same_screen YES      I would like the remap the top part the same way as the bottom part, is this possible with xmodmap ? thanks!


title: Can't view Chinese chars in evince or xpdf

text: Instead, I get white squares. I have no idea if they are used, but I installed "xfonts-intl-chinese" (didn't work). I googled this issue, and there was a lot of talk about some bug in poppler. But, that was so long ago so I should have the more recent version without the bug, right? I'm on Debian if that helps.


title: How to change focus in X-window by terminal

text: I got the window id by using xwininfo command. I want to change the focus of this window by a terminal command. How can I do it?


title: Create recovery medium from Windows 7 recovery partition

text: Many laptops are delivered with `Windows 7` recovery partition (but without CD or DVD) which takes place on the harddrive that could contain some Linux distribution or serve for data storage. I don't want to format it because sister paid for this partition and has a license key. But she would like to backup it to some medium and use it in time she will need to use this system. Is there a command in Linux that will backup this recovery partition or make a bootable DVD from this partition? Note: The content of the partition is not so important. Important is to make a backup of this partition to some medium (best would be CD or DVD) and show how to restore from that medium.


title: Is Debian stable a rolling release?

text: The question is really that simple: is Debian stable a rolling release? If it's not a rolling release type OS, does a rolling release distro exist which is based on Debian stable? I know Debian unstable and Debian testing rolling release distros exist already.


title: Running a pbk file in Linux

text: To connect to my university's network, they provided me with a .pbk file. The file is made for windows of course and I have no idea how to use it in Fedora (I'm using Fedora 15)


title: Need to Zoom in permanently

text: I have a notebook with Ubuntu/Linux. When I'm at home I plug it into my 20" monitor that’s hooked up to a switch. Occasionally I need to use it remotely and the screen is so small I need to zoom in numerous times on every page. Is there a way to set "zoom" command into the `.kshrc` so it will automatically be larger? Kinda doubt it but thought I would ask.


title: Narrow characters

text: It would be awesome to modify spark to print narrow characters in for example Gnome Terminal. Is this at all possible with Bash / Python?


title: Can someone explain what hunzip is for?

text: I understand what `hunspell` is for, but I was browsing the source code and the `man`, and I'm not sure: Does `hunzip` compress text files or just dictionaries ?


title: PS: what does "ps -o comm= -p $PPID" do

text: I have a script which does `ps -o comm= -p $PPID`. The explanation says this gets the parent process name. From the man page I found out `-o` means user defined format, `comm` means command and `-p` means select the process by the given PID - in this case `$PPID`, which means parent PID.   * What does `comm= -p $PPID` mean?   * How does this command work?


title: How to bind super key to Ctrl+Shift using xmodmap?

text: I have read the xmodmap documentation. I could only find information on how to bind one key to another. How do I bind one modifier key to a combination of other modifier keys? Can I do this using some other software (like autokey)?


title: Can sudo replace su?

text: There is much duplication of functionality on Linux-based systems, for example these do the same thing:               sudo --login --user <user>     sudo su - <user>      The **`sudo`** -only approach looks more elegant. Can one do without **`su`** without breaking too many things?


title: NFS file with same name but different content depending on host

text: I have cluster using NFS with a program `myprogram` which writes to a fixed location, e.g. `/home/sharedfs/somedir/somefile.txt`. This means that if you run `myprogram` from each node, they all write to the shared `/home/sharedfs/somedir/somefile.txt`, but this is not desirable. So, I was thinking: is there a way to create a file for each node, and make a soft link in NFS such that the link on each node points to a different node- specific file? That is, having               /home/sharedfs/somedir/somefile.node0.txt     /home/sharedfs/somedir/somefile.node1.txt     /home/sharedfs/somedir/somefile.nodeN.txt      and               /home/sharedfs/somedir/somefile.txt -> link to somefile.node0.txt only on node0     /home/sharedfs/somedir/somefile.txt -> link to somefile.node1.txt only on node1     /home/sharedfs/somedir/somefile.txt -> link to somefile.nodeN.txt only on nodeN      Is this possible? Another option is to have different directories `somedir` which are mounted differently for each node, so that `somedir/somefile.txt` points to a different (non shared) directory on each node. Any idea is welcome!


title: How to remove all FIFO files with a shell command

text: I can't find a shell command to remove all the FIFO files inside a directory. In fact, for the removal of directories, the `rm` command offers the options `-d, --dir`, but for FIFOs it offers no option. For now, the only workaround found is to call the FIFO like `foo.fifo` so that it is easy to remove them with `rm *.fifo`.


title: Debian: plymouth for plugin video card

text: I'm running Debian 6.0.7 I installed Plymouth so I can have a splash screen show instead of the GRUB system calls. When I'm connected to the integrated video card via the VGA port, then I can see the Plymouth THEME that is selected. I installed an external graphics card and now have my monitor connected to the Dell-like DVI port. When I boot, I now see a blue progress bar on the bottom of the screen as opposed to the THEME i had selected. Q: How do I have Plymouth recognize the installed graphics card so I can continue to see my theme?


title: Environment variables are not set when my function is called in a pipeline

text: I have the following recursive function to set environment variables:               function par_set {       PAR=$1       VAL=$2       if [ "" != "$1" ]       then         export ${PAR}=${VAL}         echo ${PAR}=${VAL}         shift         shift         par_set $*       fi     }      If I call it by itself, it both sets the variable and echoes to stdout:               $ par_set FN WORKS     FN=WORKS     $ echo "FN = "$FN     FN = WORKS      Redirecting stdout to a file also works:               $ par_set REDIR WORKS > out     cat out     REDIR=WORKS     $ echo "REDIR = "$REDIR     REDIR = WORKS      But, if I pipe stdout to another command, the variable doesn't get set:               $ par_set PIPE FAILS |sed -e's/FAILS/BARFS/'     PIPE=BARFS     $ echo "PIPE = "$PIPE     PIPE =      Why does the pipe prevent the function from exporting the variable? Is there a way to fix this without resorting to temp files or named pipes? # Solved: Working code thanks to Gilles:               par_set $(echo $*|tr '=' ' ') > >(sed -e's/^/  /' >> ${LOG})      This allows the script to be called thusly:               $ . ./script.sh PROCESS_SUB ROCKS PIPELINES=NOGOOD     $ echo $PROCESS_SUB     ROCKS     $ echo $PIPELINES     NOGOOD     $ cat log     7:20140606155622162731431:script.sh:29581:Parse Command Line parameters.  Params must be in matched pairs separated by one or more '=' or ' '.       PROCESS_SUB=ROCKS       PIPELINES=NOGOOD      Project hosted on bitbucket https://bitbucket.org/adalby/monitor-bash if interested in full code.


title: Live replacement, while viewing log using LESS

text: It's very convenient to monitor logs using _less_ command - you see what is going with your system as it happening. The bad thing is that my logs are optimized for _grep_ tool: each atomic action is always printed in a single line (I can easily lookup for actions performed by certain user then). Still, actions contain incoming messages, which are more user-friendly if being printed multiline. If I want to filter log "offline", it's easy:               cat ./log/system.log | tail -50 | tr '\\n' '\n'      Can I do those replacements "online"? What I mean is that replacements are done as new text being appended to log and shown to the screen like _less + G_.


title: Running up to X commands in parallel

text: I'm running something like this:               find . -maxdepth 1 -type f -note -iname "*.gpg" | sort | while read file ; do         echo "Encrypting $file..."         gpg --trust-model always --recipient "me@myself.com" --output "$file.gpg" \             --encrypt "$file" && rm "$file"      done      This runs great, but it seems that GPG is not optimized to use multiple cores for an encryption operation. The files I'm encrypting are about 2GB in size and I have quite a bit of them. I'd like to be able to run X jobs in parallel to encrypt the files and then remove them. How can I do this, setting a limit to, say, 8 jobs at a time?


title: Reset a PCI Device in Linux

text: Is there a generic way to reset a PCI device in Linux from the command line? That is, cause the PCI bus to issue a reset command.


title: Can I start a background process with a specific working directory?

text: Say I have this structure               /masterscript     /a/script1     /a/b/script2      In masterscript I spawn the other scripts as background processes:               "/a/script1" &     "/a/b/script2" &      The problem is that script1 and script2 inherit the working directory of masterscript. Is there a way to start these scripts with working directories the directories where they are?


title: Extract download progress from curl output

text: I'm trying to extract the download progress of a file that's being retrieved by `curl`. I tried this, but this doesn't work:               curl --progress-bar http://127.0.0.1/test.tar.bz2 -o test.tar.bz2 2>/dev/stdout | sed -r 's/[# ]//g;s/^/#/g'      The `sed` expression seems to be fine though:               $ echo '########                      10.2%' | sed -r 's/[# ]//g;s/^/#/g'     #10.2%      Can anyone please point out what I'm doing wrong?


title: How to provide a customized function 'complete' to readline of socat

text: Is this possible to provide a customized 'complete' function to the `readline` library that goes inside `socat`? I mean something quicker than recompiling the `readline`, some hook or text file configuration?               socat readline EXEC:application      In the example above, I want to be able to do tab completion of a set of predefined commands.


title: Filetype and dereference when listing directory with LS command

text: I'm trying to combine arguments to the `ls` command to list a directory content. What I'm basically trying to achieve is listing the directory dereferencing all links, but showing explicitly that the item listed is a link. I've tried combining the `\--dereference` and `\--classify` options, but instead of showing the link symbol (`@`) I get a `*` since the link targets an executable file. Any thoughts on how I can get such result? I'm open to alternatives other than `ls` command. **EDIT:** I actually use other options from the `ls` command. My current command along with their options is the one bellow:               ls -ogq -LB --group-directories-first --time-style=long-iso      I intend to parse the output inside an application I'm building and can't use the default link output with the arrow (`->`). Other items on the directory (e.g. folders and files) must also be listed. **EDIT (2):** Just to clarify, I'm developing a Java apllication that uses a SSH2 API to connect to servers and list directories. The result from the listing is then used to populate a tree using the jsTree jQuery plugin . Currently The command I cited above give's me the following output:               felipe@simba:/mnt/drive$ ls -ogq --group-directories-first --time-style=long-iso      total 12     drwxr-sr-x 2 4096 2014-06-11 18:04 folder1     drwxr-sr-x 6 4096 2014-06-27 19:35 folder2     dr-Sr-s-wt 2 4096 2014-06-27 13:51 folderWithPermissions     -rw-r--r-- 1    0 2014-06-30 10:42 file.txt     lrwxrwxrwx 1   49 2014-06-30 11:36 linkTeste -> folder2/dir/otherfile.txt      By applying a regular expression I can identify what is a folder, file or link by looking at the permissions. But when I have a link I need to list only the link name, instead of `name -> destination`. If I use the `-L` option for the `ls` command only the link name is outputed and I get the referenced destination's permissions (what is a good thing), since the `-L` option dereferences the link, but this way I can't know that the link is actually a link.               felipe@simba:/mnt/drive$ ls -ogq -L --group-directories-first --time-style=long-iso      total 12     drwxr-sr-x 2 4096 2014-06-11 18:04 folder1     drwxr-sr-x 6 4096 2014-06-27 19:35 folder2     dr-Sr-s-wt 2 4096 2014-06-27 13:51 folderWithPermissions     -rw-r--r-- 1    0 2014-06-30 10:42 file.txt     -rwxr-xr-x 1    0 2014-06-27 18:40 linkTeste      I need to list only the link name, know it is a link and know what the destination is (file, folder or link). I can handle different kinds of output since I'm going to apply a regular expression anyway. Alternatives using `find` or `stat` are also welcome.


title: "inode_size (128) * inodes_count (0) too big for a filesystem with 0 blocks" while creating a file system

text: My partition table looks like this:                Device Boot      Start         End      Blocks   Id  System     /dev/sda1   *        2048    32505855    16251904   83  Linux     /dev/sda2        32505856    33554431      524288   83  Linux      When I went to lay down a filesystem on `sda2`, it threw this error:               sudo mkfs -t ext4 /dev/sda2     mke2fs 1.42.9 (4-Feb-2014)     mkfs.ext4: inode_size (128) * inodes_count (0) too big for a     filesystem with 0 blocks, specify higher inode_ratio (-i) or lower inode count (-N).      I have tried both with an extended partition and a primary partition and get the same error. I have Ubuntu 14.04TLS. What to do?


title: How do I choose specific files in a different directory using bash?

text: I want to list (or delete, or do some other operation) on certain files in a directory, like this:               $ ls /opt/somedir/     aa  bb  cc  aa.txt  bb.txt  cc.txt     $ ls /opt/somedir/(aa|bb|cc)  ## pseudo-bash :p     aa  bb  cc      How can I achieve this (without cd-ing to the directory first)?


title: Ignore a specific ip for fail2ban

text: I am using fail2ban with ipfw on FreeBSD. Is there a way to ignore a specific ip address, making sure that fail2ban never blocks or reports it?


title: Memory reporting issues

text: When I view the system monitor it reports that I'm only using 48% of ram. Same with gkrellm. But all of the command line utilities report different. Here is the output to free and /proc/meminfo. The only reason I can think of is the graphical utilities neglect to count the cache. But isn't that still stored in physical memory. Why is there such a distinction between the two (graphical and cmd-line). Is cache not important? Thanks in advance free -o                            total       used       free     shared    buffers     cached     Mem:       1915936    1831836      84100          0      11280     874072     Swap:      3866620     146944    3719676      cat /proc/meminfo               MemTotal:        1915936 kB     MemFree:           81740 kB     Buffers:           11900 kB     Cached:           869224 kB     SwapCached:         4128 kB     Active:           722020 kB     Inactive:         887300 kB     Active(anon):     669976 kB     Inactive(anon):   235424 kB     Active(file):      52044 kB     Inactive(file):   651876 kB     Unevictable:       50812 kB     Mlocked:               0 kB     SwapTotal:       3866620 kB     SwapFree:        3719680 kB     Dirty:               460 kB     Writeback:             0 kB     AnonPages:        776964 kB     Mapped:            52052 kB     Shmem:            126384 kB     Slab:              77824 kB     SReclaimable:      37580 kB     SUnreclaim:        40244 kB     KernelStack:        2800 kB     PageTables:        33836 kB     NFS_Unstable:          0 kB     Bounce:                0 kB     WritebackTmp:          0 kB     CommitLimit:     4824588 kB     Committed_AS:    2622452 kB     VmallocTotal:   34359738367 kB     VmallocUsed:      560312 kB     VmallocChunk:   34359122920 kB     HardwareCorrupted:     0 kB     AnonHugePages:    118784 kB     HugePages_Total:       0     HugePages_Free:        0     HugePages_Rsvd:        0     HugePages_Surp:        0     Hugepagesize:       2048 kB     DirectMap4k:       12288 kB     DirectMap2M:     1949696 kB


title: Terminal charset / font

text: I want to write a game which runs in a terminal. I do some terminal coloring and wanted to use some unicode characters for nice ascii art "graphics". But a lot of unicode characters aren't supported in the linux terminal (the non-X terminal, I don't know how you call it... VT100? I mean the terminal which uses the text mode for output, no graphic mode, so the same font as in bios is used to display the text.) For example, I wanted to draw half character "pixels" using the "half block" characters U+2580 (▀) and U+2584 (▄) but these are not supported in the terminal. (These are only examples - I want to use a lot more special characters...) Which characters does this font support? Is there any document or table listing these characters? Is this device-dependent or is there any "standard"? Thanks in advance! Leemes


title: Boot Linux while running Windows

text: I will be traveling for a month, without bringing my computer. I might only have access to public computers running Windows in Internet cafes. While I'm traveling, I would like to SSH to my Linux server to fix some bugs if occurs. What is the easiest way for me to run Linux on a Windows machine, and have access to the Internet without rebooting the computer. Once I run Linux on top of Windows, I will also have Internet access immediately without the need to reconfigure. In fact, a Linux with terminal is enough. Preferably to run this on a USB flash drive.


title: How do I resume booting process after sulogin procedure

text: I upgraded Arch Linux today and systemd stopped booting again. So I logged in with sulogin, mounted the drive. How do I resume the booting process? Like in old days, `init 3` somethings like that.


title: How to mount a windows/samba windows share under Linux?

text: Under Linux (Ubuntu 12.04) I want to mount a windows share / windows partition named `//winshared` on the network. I do not know the IP or anything else. On one Ubuntu system, I am able to mount a directory with               mount  //winshared/mypath /mnt/win      while on one other Ubuntu system the exact same command just gives               mount error: could not resolve address for winshared: Unknown error      Network settings seem to be same on both systems, and I installed `smbfs` and `samba` (the latter with errors). Do I need to instal something else? Do I need to configure something? How to find out the crucial differences between both systems to get the same mount work on both systems? Additional information:   1. When I use `smbclient` to connect to the windows partition/share/whatever, it works on the first system but not on the other system. The error is:              Connection to winshared failed (Error NT_STATUS_BAD_NETWORK_NAME)        2. Following this tutorial I installed `smbfs` and `cifs-utils`, but the `mount` command from above still gives the same error, which is NOT described in the tutorial.    3. I also have an entry in `/etc/fstab` reading              //winshared/mypath /mnt/win cifs uid=alexander,credentials=/etc/samba/wincred 0 0      with the file `/etc/samba/wincred` identical to a same file on the system the mount works. The md5sum of both files are identical. Therefore, an error regarding credentials can be excluded.


title: How does GLOBIGNORE work?

text: According to bash's manual page:                  GLOBIGNORE               A colon-separated list of patterns defining the set of filenames               to be ignored by pathname expansion.  If a filename matched by a               pathname  expansion  pattern also matches one of the patterns in               GLOBIGNORE, it is removed from the list of matches.      However in practice...               $ bash --noprofile --norc     bash-4.2$ touch .bar     bash-4.2$ echo .*     . .. .bar     bash-4.2$ GLOBIGNORE=.     bash-4.2$ echo .*     .bar      Why is `..` removed from the list of matches? As far as I know, the pattern `.` does NOT match `..`, does it?


title: Read the files in shell script doesn't print out anything?

text: I am trying to read a file from shell script line by line. Below is my file content -               hello=world      And below is my shell script that I have written -               #!/bin/bash          while read -r line; do            echo "$line"         done < test.txt      But somehow whenever I am running from my cygiwn terminal, I don't see any result printing out on the console - I run it like this -               $ sh read.sh      And it doesn't print out anything. And I am not sure what wrong I am doing here.


title: Every package "has no installation candidate"

text: While attempting to install `openssh-server` on Ubuntu 14.04 64-bit, I get the following error:               Package openssh-server is not available but is referred to by another package.     This may mean that the package is missing, has been obsoleted, or     is only available from another source          E: Package 'openssh-server' has no installation candidate      I see the same error when trying to install any package. This is the `sources.list` file:               deb http://archive.canonical.com/ubuntu hardy partner     deb-src http://archive.canonical.com/ubuntu hardy partner


title: Machine readable number of updates? Alternative to /usr/lib/update-notifier/apt-check?

text: `/usr/lib/update-notifier/apt-check` (from update-notifier-common package) was a fine tool. But it's going to be removed from Debian.               /usr/lib/update-notifier/apt-check --human-readable     28 packages can be updated.     0 updates are security updates.          /usr/lib/update-notifier/apt-check     28;0  ~/whonix_dot/Whonix $      Are there any machine readable (for shell scripts) alternatives to this tool?


title: "history" stops working when run inside bash script

text: I am writing a simple script to grep my bash history to find a particular string. On the command line, I can do the following, which works fine:               history | grep git      However, when I create a bash script with the same command as above, suddenly `history` returns nothing:               #!/bin/bash     history | grep git      When I remove the first line `#!/bin/bash`, my script works again. What is happening here? How can I use `history` inside a bash script?


title: Helo command rejected: need fully-qualified hostname Error

text: My mail server is in some blacklist cause of spams. I reconfugured postfix. Aften then My customers get this error they can't send emails.               404 4.5.2 <PLLAMNAZIFE>: Helo command rejected: need fully-qualified hostname      In Mail.log:               postfix/smtpd[9853]: NOQUEUE: reject: RCPT from unknown[xx.xx.xx.xx]:      404 4.5.2 <PLLAMNAZIFE>: Helo command rejected: need fully-qualified hostname;      from=<info@domain.com> to=<mail@mail.com> proto=ESMTP helo=<PLLAMNAZIFE>      In my main.cf:                  # rules restrictions     smtpd_client_restrictions =             permit_sasl_authenticated      smtpd_helo_restrictions =             permit_mynetworks,             reject_non_fqdn_helo_hostname,             reject_invalid_helo_hostname,             permit     smtpd_sender_restrictions =     smtpd_recipient_restrictions =              permit_sasl_authenticated,              reject_unauth_pipelining,             reject_non_fqdn_recipient,             reject_unknown_recipient_domain,             permit_mynetworks,              reject_unauth_destination,              reject_invalid_hostname,              reject_non_fqdn_sender,              reject_unknown_sender_domain,             reject_rhsbl_client blackhole.securitysage.com,              reject_rhsbl_sender blackhole.securitysage.com,              reject_rbl_client zen.spamhaus.org,              reject_rbl_client bl.spamcop.net,              reject_rbl_client blackholes.easynet.nl,              reject_rbl_client cbl.abuseat.org,              reject_rbl_client proxies.blackholes.wirehub.net,              reject_rbl_client dnsbl.njabl.org          smtpd_helo_required = yes     unknown_local_recipient_reject_code = 550     disable_vrfy_command = yes     smtpd_data_restrictions = reject_unauth_pipelining


title: PCI passthrough without VT-d

text: My CPU is Intel T9300, it supports VT-x, but it does not support VT-d. I am using Xen pvops virtualization. I have a PCI device, and my host system can work without it. So I am thinking if it is possible to pass it to my guest vm.


title: How different is Elvis from Vim?

text: I've been using Slackware for a while now, which ships with Elvis as its default editor. Most other Linux distributions seem to ship with Vim, instead of Elvis. Having gotten quite used to Elvis, will I face a learning curve when moving to a distro which uses vim? What are the advantages and disadvantages of Elvis compared to Vim?


title: Scanner assumes document feeder is legal-sized

text: I have a Brother MFC-J630W all-in-one printer-scanner-fax. I have the sane software installed, along with the sane driver provided by Brother. The scanner has a document feeder. I'm using this command:                scanimage --device-name "$device" --resolution 300 > $output_file      Everything was working well until I used the document feeder to scan a legal- sized page. Now, if I put any letter-sized page into the document feeder, I end up with a legal-sized scan. The biggest problem is, I don't (yet) know if this is a problem on the scanner side, or on the software side. All I know for certain is that the pnm file created by scanimage is legal-sized. Does anybody have any ideas for troubleshooting and/or fixing this problem?


title: Symlinks and EncFS

text: I am trying to secure my Dropbox account by using EncFS. My strategy is as follows:   * I store all my files in a folder called `~/Public/`.   * The encrypted counterpart of `~/Public/` is `~/Private/`.   * Use EncFS: `encfs ~/Private/ ~/Public/` Now the problem is that I'd like to use Dropbox for backing up my dotfiles as well. So I tried symlinking `~/.rc/` (the folder containing my dotfiles) into `~/Public`. But EncFS seems to treat the symlink as a file and it shows up in `~/Private` as 0 byte file. Any way I can get EncFS to follow symlinks?


title: Unable to burn 2 DVDs

text: Today I purchased 2 DVDs today of Sony company. I tried burning them with some s/w but failed. Please see below for the error log produced. I used Brasero Disk Burner of Ubuntu13.04. Then I used different CD and it worked properly. Also earlier I had successfully burned the same s/w in different DVDs of Sony. So, it's almost clear that the problem is with the 2 DVDs. Still I would like to post the error log below so that one can confirm.               Checking session consistency (brasero_burn_check_session_consistency brasero-burn.c:1739)     BraseroBurnURI called brasero_job_get_action     BraseroBurnURI called brasero_job_get_action     BraseroBurnURI called brasero_job_set_output_size_for_current_track     BraseroBurnURI stopping     BraseroBurnURI called brasero_job_get_action     BraseroBurnURI called brasero_job_get_session_output_size     BraseroBurnURI output set (IMAGE) image = /tmp/brasero_tmp_LPVE6W.bin toc = none     BraseroBurnURI called brasero_job_get_session_output_size     BraseroBurnURI called brasero_job_get_action     BraseroBurnURI called brasero_job_get_current_track     BraseroBurnURI no burn:// URI found     BraseroBurnURI stopping     BraseroLocalTrack called brasero_job_get_action     BraseroLocalTrack called brasero_job_get_action     BraseroLocalTrack called brasero_job_set_output_size_for_current_track     BraseroLocalTrack stopping     BraseroLocalTrack called brasero_job_get_action     BraseroLocalTrack called brasero_job_get_session_output_size     BraseroLocalTrack output set (IMAGE) image = /tmp/brasero_tmp_7XUE6W.bin toc = none     BraseroLocalTrack called brasero_job_get_session_output_size     BraseroLocalTrack called brasero_job_get_action     BraseroLocalTrack called brasero_job_get_current_track     BraseroLocalTrack no remote URIs     BraseroLocalTrack stopping     BraseroChecksumImage called brasero_job_get_current_track     BraseroChecksumImage called brasero_job_get_action     BraseroChecksumImage called brasero_job_get_flags     BraseroChecksumImage called brasero_job_get_action     BraseroChecksumImage called brasero_job_get_action     BraseroChecksumImage called brasero_job_get_fd_in     BraseroChecksumImage called brasero_job_set_output_size_for_current_track     BraseroChecksumImage stopping     BraseroChecksumImage called brasero_job_get_current_track     BraseroChecksumImage called brasero_job_get_action     BraseroChecksumImage called brasero_job_get_flags     BraseroChecksumImage called brasero_job_get_action     BraseroChecksumImage called brasero_job_get_session_output_size     BraseroChecksumImage output set (IMAGE) image = /tmp/brasero_tmp_K0TE6W.bin toc = none     BraseroChecksumImage called brasero_job_get_session_output_size     BraseroChecksumImage called brasero_job_get_action     BraseroChecksumImage called brasero_job_get_action     BraseroChecksumImage called brasero_job_get_current_track     BraseroChecksumImage called brasero_job_get_input_type     BraseroChecksumImage called brasero_job_set_current_action     BraseroChecksumImage called brasero_job_get_fd_in     BraseroChecksumImage called brasero_job_get_current_track     BraseroChecksumImage called brasero_job_get_current_track     BraseroChecksumImage Starting checksuming file /media/ravbholua/0E441C8F441C7BA1/Users/Ravi/Downloads/ubuntu-12.10-desktop-i386.iso (size = 789884928)     BraseroChecksumImage called brasero_job_get_fd_out     BraseroChecksumImage called brasero_job_get_current_track     BraseroChecksumImage Setting new checksum (type = 2) d1d8b7d13604bbe0416fc16dbe901297 ((null) before)     BraseroChecksumImage Finished track successfully     BraseroChecksumImage stopping     BraseroLibburn called brasero_job_get_action     BraseroLibburn called brasero_job_get_action     BraseroLibburn unsupported operation     BraseroLibburn deactivating     BraseroLibburn called brasero_job_get_action     BraseroLibburn called brasero_job_get_action     BraseroLibburn called brasero_job_get_device     BraseroLibburn Drive (/dev/sr0) init result = 1     BraseroLibburn called brasero_job_get_flags     BraseroLibburn called brasero_job_get_media     BraseroLibburn called brasero_job_get_fd_in     BraseroLibburn called brasero_job_get_tracks     BraseroLibburn Setting multi 0     BraseroLibburn Setting burnproof 1     BraseroLibburn Setting dummy 0     BraseroLibburn called brasero_job_get_session_output_size     BraseroLibburn called brasero_job_set_current_action     BraseroLibburn burn_drive_convert_fs_adr( /dev/sr0 )     BraseroLibburn Writing     BraseroLibburn called brasero_job_set_dangerous     BraseroLibburn called brasero_job_set_current_action     BraseroLibburn called brasero_job_get_session_output_size     BraseroLibburn called brasero_job_set_current_action     BraseroLibburn burn_drive_is_enumerable_adr( /dev/sr0 ) is true     BraseroLibburn called brasero_job_get_session_output_size     BraseroLibburn called brasero_job_set_current_action     BraseroLibburn Async START UNIT succeeded after 0.1 seconds     BraseroLibburn called brasero_job_get_session_output_size     BraseroLibburn called brasero_job_set_current_action     BraseroLibburn mmc_set_streaming: end_lba=2298495 ,  r=11080 ,  w=11080     BraseroLibburn called brasero_job_get_session_output_size     BraseroLibburn called brasero_job_set_current_action     BraseroLibburn Allocating buffer via mmap()     BraseroLibburn called brasero_job_get_session_output_size     BraseroLibburn called brasero_job_set_current_action     BraseroLibburn dvd/bd Profile= 11h , obs= 32768 , obs_pad= 1     BraseroLibburn called brasero_job_get_session_output_size     BraseroLibburn called brasero_job_set_current_action     BraseroLibburn DVD pre-track 01 : get_nwa(0), ret= 1 , d->nwa= 0     BraseroLibburn called brasero_job_get_session_output_size     BraseroLibburn called brasero_job_set_current_action     BraseroLibburn called brasero_job_get_session_output_size     BraseroLibburn called brasero_job_set_current_action     BraseroLibburn called brasero_job_get_session_output_size     BraseroLibburn called brasero_job_set_current_action     BraseroLibburn called brasero_job_get_session_output_size     BraseroLibburn called brasero_job_set_current_action     BraseroLibburn called brasero_job_get_session_output_size     BraseroLibburn called brasero_job_set_current_action     BraseroLibburn called brasero_job_get_session_output_size     BraseroLibburn called brasero_job_set_current_action     BraseroLibburn called brasero_job_get_session_output_size     BraseroLibburn called brasero_job_set_current_action     BraseroLibburn called brasero_job_get_session_output_size     BraseroLibburn called brasero_job_set_current_action     BraseroLibburn called brasero_job_get_session_output_size     BraseroLibburn called brasero_job_set_current_action     BraseroLibburn called brasero_job_get_session_output_size     BraseroLibburn called brasero_job_set_current_action     BraseroLibburn called brasero_job_get_session_output_size     BraseroLibburn called brasero_job_set_current_action     BraseroLibburn called brasero_job_get_session_output_size     BraseroLibburn called brasero_job_set_current_action     BraseroLibburn called brasero_job_get_session_output_size     BraseroLibburn called brasero_job_set_current_action     BraseroLibburn called brasero_job_get_session_output_size     BraseroLibburn called brasero_job_set_current_action     BraseroLibburn called brasero_job_get_session_output_size     BraseroLibburn called brasero_job_set_current_action     BraseroLibburn called brasero_job_get_session_output_size     BraseroLibburn called brasero_job_set_current_action     BraseroLibburn called brasero_job_get_session_output_size     BraseroLibburn called brasero_job_set_current_action     BraseroLibburn called brasero_job_get_session_output_size     BraseroLibburn called brasero_job_set_current_action     BraseroLibburn called brasero_job_get_session_output_size     BraseroLibburn called brasero_job_set_current_action     BraseroLibburn called brasero_job_get_session_output_size     BraseroLibburn called brasero_job_set_current_action     BraseroLibburn called brasero_job_get_session_output_size     BraseroLibburn called brasero_job_set_current_action     BraseroLibburn called brasero_job_get_session_output_size     BraseroLibburn called brasero_job_set_current_action     BraseroLibburn called brasero_job_get_session_output_size     BraseroLibburn called brasero_job_set_current_action     BraseroLibburn called brasero_job_get_session_output_size     BraseroLibburn called brasero_job_set_current_action     BraseroLibburn called brasero_job_get_session_output_size     BraseroLibburn called brasero_job_set_current_action     BraseroLibburn called brasero_job_get_session_output_size     BraseroLibburn called brasero_job_set_current_action     BraseroLibburn SCSI error condition on command 2Ah WRITE(10): See MMC specs: Sense Key 4 "Drive error", ASC 44 ASCQ D9.     BraseroLibburn called brasero_job_get_session_output_size     BraseroLibburn called brasero_job_set_current_action     BraseroLibburn Libburn reported an error SCSI error on write(784,16): See MMC specs: Sense Key 4 "Drive error", ASC 44 ASCQ D9.     BraseroLibburn called brasero_job_error     BraseroLibburn finished with an error     BraseroLibburn asked to stop because of an error         error       = 1         message = "SCSI error on write(784,16): See MMC specs: Sense Key 4 "Drive error", ASC 44 ASCQ D9."     BraseroLibburn stopping     Session error : SCSI error on write(784,16): See MMC specs: Sense Key 4 "Drive error", ASC 44 ASCQ D9. (brasero_burn_record brasero-burn.c:2856)


title: Command Line Tool for monitoring Java Heap

text: Is there any command line tool for monitoring the heap size usage of Java in CentOS?


title: Facility on AIX to ZIP a list of files

text: I'm working with an external company who is using AIX (version unknown) as their platform. They are required to FTP me a ZIP file containing multiple files. Does the UNIX utility zip exist on a standard AIX install? I ask this question because they are telling me it does not, but I find this hard to believe, as my UNIX in a nutshell book tells me that zip is a common UNIX utility. I found this page that alludes to a toolbox that can be installed to allow a developer to use zip: aix linux toolbox, which implies it may not come as standard. If zip turns out to not actually available, what utilities could be used in its place to create a zip of files? I actually need ZIP format, so tarballs etc. are not an option. EDIT: To summarise:   1. Does AIX come with zip by default?   2. If not, can zip be installed on AIX? Is the aix toolbox an option?   3. If zip is unavailable, and can't be installed, are the any other options for creating a zip archive? I'm aware that one of the systems has to change, and that it would have been better to take what AIX can easily produce; I'm just trying to "get things done", and it doesn't seem a big deal to me to get zip installed on AIX, but maybe I'm missing something. Licensing perhaps?


title: String length limitation for user input

text: There is simple korn shell (bash has the same behavior) script:               #!/bin/ksh          read userInput      I have two Solaris 9/10 servers. On one of the server i can type long string while read is running. But on another server i can't type string with length more than 257 symbols. What kind of limitation is this?


title: Should I use http or ftp links in apt sources.list

text: Should I use `http` or `ftp` links in `/etc/apt/sources.list`? What I mean is is using something like,               deb ftp://ftp.debian.org/debian/ squeeze main contrib non-free     deb-src ftp://ftp.debian.org/debian/ squeeze main contrib non-free      better or worser than using,               deb http://ftp.debian.org/debian/ squeeze main contrib non-free     deb-src http://ftp.debian.org/debian/ squeeze main contrib non-free      I guess as `apt` uses `wget` to fetch things, this is same as asking if `wget` is faster on `ftp`. Thanks!


title: Updating the desktop icons after moving a manually-installed program

text: I'm new here. I've installed a program manually and now I've moved the program files to a new location. How do I update the path of the program for my old launcher icons to work properly? -- without symlinking. I'm using Elementary OS.


title: What is the rtsbpp-polling process doing?

text: In Ubuntu 12.04 LTS when I run the `top` command I see a process called `rtsbpp-polling`. Googling it gives only just a few hits to the Gentoo Linux forum that does not seem to be relevant (they don't mention the process).               $ ps ax | grep rtsbpp     541 root 20 0 0 0 0 S 0 0.0 0:37.08 [rtsbpp-polling]           $ ps aux | grep rts     root       536  0.0  0.0      0     0 ?        S    17:41   0:00 [rts_bpp]     root       541  0.6  0.0      0     0 ?        S    17:41   0:38 [rtsbpp-polling]      Googling `rts_bpp` indicates it may be drivers for my card reader, but I am not sure it has anything to do with the `rtsbpp-polling` process. So what does it do? Edit: Following Sim's advice in the answer below it seems `rts_bpp` is indeed a driver:               $ sudo lspci -k | less     04:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. Device 5289 (rev 01)         Subsystem: ASUSTeK Computer Inc. Device 1447         Kernel driver in use: rts_bpp         Kernel modules: rts_bpp`      `rtsbpp-polling` does not show up on that list and does not seem to do anything on the network, but it does seem to use some files. I am not sure what to make of it:               $ lsof -p 726     COMMAND   PID USER   FD      TYPE DEVICE SIZE/OFF NODE NAME     rtsbpp-po 726 root  cwd   unknown                      /proc/726/cwd (readlink: Permission denied)     rtsbpp-po 726 root  rtd   unknown                      /proc/726/root (readlink: Permission denied)     rtsbpp-po 726 root  txt   unknown                      /proc/726/exe (readlink: Permission denied)     rtsbpp-po 726 root NOFD                                /proc/726/fd (opendir: Permission denied)      `


title: How to identify the wireless network card on my laptop?

text: bash-4.1# lspci     00:00.0 Host bridge: Intel Corporation Mobile PM965/GM965/GL960 Memory Controller Hub (rev 0c)     00:02.0 VGA compatible controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 0c)     00:02.1 Display controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 0c)     00:1a.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #4 (rev 03)     00:1a.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5 (rev 03)     00:1a.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 (rev 03)     00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)     00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 03)     00:1c.1 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 2 (rev 03)     00:1c.2 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 3 (rev 03)     00:1c.3 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 4 (rev 03)     00:1d.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 (rev 03)     00:1d.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 (rev 03)     00:1d.2 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #3 (rev 03)     00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 03)     00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev f3)     00:1f.0 ISA bridge: Intel Corporation 82801HEM (ICH8M) LPC Interface Controller (rev 03)     00:1f.1 IDE interface: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) IDE Controller (rev 03)     00:1f.2 SATA controller: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) SATA AHCI Controller (rev 03)     00:1f.3 SMBus: Intel Corporation 82801H (ICH8 Family) SMBus Controller (rev 03)     05:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8039 PCI-E Fast Ethernet Controller (rev 14)     07:00.0 Network controller: Broadcom Corporation BCM4312 802.11b/g (rev 01)     08:09.0 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 IEEE 1394 Controller (rev 05)     08:09.1 SD Host controller: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 22)     08:09.2 System peripheral: Ricoh Co Ltd R5C843 MMC Host Controller (rev 12)     08:09.3 System peripheral: Ricoh Co Ltd R5C592 Memory Stick Bus Host Adapter (rev 12)     08:09.4 System peripheral: Ricoh Co Ltd xD-Picture Card Controller (rev ff)      Platform:               bash-4.1# cat /etc/slackware-version && uname -a     Slackware 13.1.0     Linux anisha 2.6.33.4-smp #2 SMP Wed May 12 22:47:36 CDT 2010 i686 Intel(R) Pentium(R) Dual  CPU  T2370  @ 1.73GHz GenuineIntel GNU/Linux      which entry shows the wireless card?


title: Why Xnest server has different glxinfo than normal Xorg server?

text: I've run Xnest server. It appears Xnest doesn't use my graphic card or at least it doesn't use direct rendering. Normal Xorg `glxinfo`               OpenGL vendor string: Tungsten Graphics, Inc     OpenGL renderer string: Mesa DRI Intel(R) Sandybridge Mobile      OpenGL version string: 3.0 Mesa 8.0.3      Xnest Xorg `glxinfo`               OpenGL vendor string: VMware, Inc.     OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 0x301)     OpenGL version string: 2.1 Mesa 8.0.3


title: find/grep outputs two lines for each file it finds match

text: I search my code base to find string patterns and list all the files where the pattern is found but only the file and not the lines on which it is found:               find . -name *.java -exec grep -l 'someText' {} \; -print 2>/dev/null      However, it outputs two lines for each file found. Why does that happen and how should I modify the command to list unique file names?


title: Make apt-get update and upgrade automate and unattended

text: I have about 7 Debian servers I manage, and I would like to set them to automatically update themselves. So, I created a script as such:               #!/bin/sh     apt-get update     apt-get upgrade      and placed it on the `root`'s crontab list. Unfortunately, it always hangs on the Upgrade section, asking if I'm sure I want to upgrade. Because it's a cron job, I don't see the output until it emails me saying it's failed. Is there a way to have it skip that prompt, and just do the upgrade automatically?


title: Shell script not working to open LimeChat through the terminal

text: I created a shell script that I will execute in the morning to open up all the apps that I want **startup.sh**               #!/bin/sh          open /Applications/Firefox.app &     open /Applications/Messages.app &     open /Applications/iTerm.app &     open /Applications/Screenhero.app &     open /Desktop/LimeChat.app &          exit 0      The other apps work. But not the LimeChat application. I get this error:               The file /Desktop/LimeChat.app does not exist.      It does not show up in my applications folder, it only shows up in the desktop Desktop. And here it is very clearly on my desktop. ![screenshot](http://i.stack.imgur.com/fYzgh.png)


title: GPT + BIOS legacy + LVM - how to make right GRUB partition

text: I'm preparing to install Arch Linux on my netbook (Samsung N130). I want to use GUID Partition Table. I have BIOS (not UEFI) on my motherboard. I want also to use LVM. On Arch Linux Wiki, I've red that GRUB must have a separate partition on the first sectors of my hard drive. And in that connection (GPT + LVM) I can't find any informations about how to do it. Can You help me? Ps. I'm writing from Fedora 20 LiveUSB - after installing Arch, I want also to install Fedora.


title: Programmatic way to install xkb keyboard layout

text: I have a new keyboard layout that is working so far. I want to ship this to users who most probably will have minimal knowledge of Linux. Trouble is to install this layout I have to do a lot of copy paste inside the files in `/usr/share/X11/xkb` directory. Here are the steps that I am needing to perform.   * Add the keyboard layout to /usr/share/X11/xkb/symbols/in   * Add the language to base.xml   * Add the language to evdev.xml   * Add the layout to base.lst How do I make it so that user double clicks on the layout file and it is installed. I am familiar with shell scripting, so I could do some file manipulation using awk or sed. But, I am not sure I should be doing that.


title: Cannot execute binaries in Ubuntu : file not found

text: When I try to run any executable file a `file not found` error occurs. Sometimes it says nothing but doesn't do anything. For example, when I execute `./blah-blah.bin` it fails finding the file when it is clearly there. When I execute `./blah-blah-file-2.sh`, it is silent. Note 1: files have +x.   Note 2: root also cannot execute.   Note 3: everything from /usr/bin executes.   Note 4: I can't try it from GUI, I have only access to its console. What's the problem? Upd: suddenly some commands (e.g. `ls`) begin fail with a `file not found`. They worked yesterday...


title: How can I have pulseaudio always load a USB soundcard as the same sink every time I boot?

text: I have 9 identical soundcards connected via USB to a PC running various audio rendering servers. Each card is loaded in /etc/pulse/default.pa by disabling module-udev-dectect and manually loading module-alsa-card with device_id=[0-8] and card_name=various descriptive names e.g. sink_a. These audio rendering servers need to connect to pulse sinks with the name corresponding to the function they provide (e.g. server_a needs to connect to sink_a, not sink_b,c,d...etc. so that audio is routed played on card_a to room_a) The problem is that the cards change their device_id every boot, so if sink_a was device_id=0 on one boot, it might be device_id=1 on the next, causing playback through the wrong physical card. What can I do to ensure that cards loaded with descriptive names in default.pa remain the same physical device on EVERY boot?


title: Simple server that triggers script and responds

text: I need to have a very simple server running that can:   1. Take rest call. It triggers a script when a call is made   2. The script checks if database is running or not.   3. If running then reply back to client as `Success` else reply back as failure I do not wish to use apache or any other major web server. Even simple scripts running on port will do. I am aware of `python -m SimpleHTTPServer` but I guess it only provides file access. I can write a simple Java program that runs on a port and replies, but I am looking some simple solution


title: Installing newest Wine in Debian Wheezy

text: edit: solved by installing Ubuntu again. I've need to newest wine. How could I install it into my Debian Wheezy? If I try from there Gdebi says that I must have `libc6 2.17` or greater. Is there any way install it?


title: Shell command to get all the files from a complex directory structure

text: I'm looking for a shell command in order to get all the files in a complex directory structure. By complex directory structure I mean that there's a root folder with more than 150 subfolders and for each subfolder there are minimum 3 subfolders.


title: Delete files in directory without erroring if it's already empty

text: As part of a deployment script, I want to dump some cached stuff from my temp directory. I use a command like:               rm /tmp/our_cache/*      However, if `/tmp/our_cache` is empty (fairly common when pushing many changes in quick succession to our testing server), this prints the following error message:               rm: cannot remove `/tmp/our_cache/*': No such file or directory      It's not a big deal, but it's a little ugly and I want to cut down the noise- to-signal ratio in the output from this script. What's a concise way in unix to delete the contents of a directory without getting messages complaining that the directory is already empty?


title: Looking for a list of modules that are used during boot sequence

text: I'd like to use _deferred init calls_. This function allows to load modules in userland, that should actually be loaded during the boot sequence. Just for testing I'd like to modularize as many entries as possible of the startup. For applying this method the `module_init()` in those modules has to be renamed to `deferred_module_init()`, easy so far. Now my question is: where can I find all these files with `module_init()`? Because I already wrote a bash script, that replaces this string with the defered_module_init in the whole kernel source - unfortunately it covers some other functions too, which made it impossible to compile the kernel afterwards. Is there a directory or a list with the modules that should be used during startup? I found that passing `initcall_debug` to the kernel command line generates a list with the modules, that then can be viewed with this command, that tells me the name of the module               dmesg -s 128000 | grep "initcall" | sed "s/\(.*\)after\(.*\)/\2 \1/g" | sort -n      But it looks like these names are spread all over the kernel source :/. Is there an easy way to catch all of these entries, so that i can apply my bash script to replace that specific string? Doing this by foot seems like a job that can take forever. Here's a sample output:               286 usecs [    0.910000] initcall arc4_init+0x0/0x1c returned 0        287 usecs [    0.910000] initcall aes_init+0x0/0x1c returned 0        288 usecs [    0.900000] initcall crypto_wq_init+0x0/0x4c returned 0


title: Where does rsyslog keep facility local0?

text: I added to rsyslog.conf a lines               ModLoad imudp     UDPServerRun 514     local0.* /var/log/dlink.log      With tcpdump I can see the packets from dlink somethimes local0 somethimes local1 even local2. Nothing appeared in /var/log/ dir. Which steps i missed to log my network device? I tried local1 local2 point to the same log file, but this didn't make the trick.


title: d-link dongle does not work

text: hello guys i've been searchin on the web but with no succes so im here im runnig wheezy with lxde . my dongle get listed when i run lsusb and it gives this then after a few seconds if i type again lsusb i dont see it               Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub     Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub     Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub     Bus 001 Device 041: ID 04e8:6881 Samsung Electronics Co., Ltd      Bus 001 Device 071: ID 07d1:3c06 D-Link System DWA-111 802.11bg Wireless Adapter [Ralink RT2571W]      i found out on the web that its natively supported but in reality it does not work with network manager and when i run dmesg i get this               [  997.166739] usb 1-3: New USB device found, idVendor=07d1, idProduct=3c06     [  997.166746] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=4     [  997.166751] usb 1-3: Product: 802.11 bg WLAN     [  997.166754] usb 1-3: Manufacturer: Ralink     [  997.280045] usb 1-3: reset high-speed USB device number 20 using ehci_hcd     [  997.446605] usb 1-3: device firmware changed     [  997.446652] phy881 -> rt2x00usb_vendor_request: Error - Vendor Request 0x09 failed for offset 0x0000 with error -19.     [  997.446679] phy881 -> rt73usb_init_eeprom: Error - Invalid RT chipset detected.     [  997.446684] phy881 -> rt2x00lib_probe_dev: Error - Failed to allocate device.     [  997.446859] usb 1-3: USB disconnect, device number 20     [  997.465142] scsi 5:0:0:0: Direct-Access     SAMSUNG  GT-S5570 Card    0100 PQ: 0 ANSI: 2     [  997.467643] sd 5:0:0:0: Attached scsi generic sg2 type 0     [ 997.469861] sd 5:0:0:0: [sdb] Attached SCSI removable disk     [  997.560054] usb 1-3: new high-speed USB device number 21 using ehci_hcd     [  997.726618] usb 1-3: too many configurations: 60, using maximum allowed: 8      and of course i followed the wiki http://wiki.debian.org/WiFi/rt73 but still nothing's workin PS: the DONGLE its tested on a widows box and workin thanks in advance


title: How to stop Fetchmail marking messages as read

text: When `fetchmail` checks my IMAP inbox, it downloads any unread messages and removes the message 'unread' flag on the mail server. Is there a way to have `fetchmail` download new messages **without** marking them as read? I use `procmail` to automatically process new mail messages and run scripts based upon mail rules, so I want the messages downloaded, but would prefer it if the "new message" flag was preserved on messages I have not yet read in my e-mail client. This is my `.fetchmailrc` file:               poll mail.domain.com protocol IMAP         user "user@domain.com"         password 'password'         folder 'INBOX'         keep         ssl         mda "/usr/bin/procmail -f %F"


title: Qemu 2.0 Windows guest - mouse stops working (vnc) when using usb-passthrough

text: I have installed Qemu 2.0 on an Ubuntu Server 14.04 LTS computer. I use Qemu to run multiple virtual machines. One of them is using Windows 8.1 Pro (x64) and is used for back-ups. The guest runs fine without any problems. But when I start passing through an usb-device (external hard drive) the mouse (keyboard still works fine) stops working on the vnc client. Reconnecting to the vnc-server does not work. Only a guest reboot will fix this issue. It appears that this 'bug' only starts when I make the vnc client inactive (clicking somewhere else on another program/service) on the local computer where i run the vnc client from. When I get back (make it active again) to the vnc client/viewer, the mouse stops working/does not respond anymore. It only happens when I use usb2 controller-mode and only when I add a new usb passthrough device. As long as I don't connect/pass through that usb-device, the mouse still works. But I need this usb2 controller in order for my external hard drives to work properly. If the guest is on and I connect the external usb hard drive to reproduce this bug, I also notice that if I remove the device then the mouse starts working again. It's like the guest thinks the device is in place of the mouse input device. Still, the hard drive is working fine once it's connected, only the mouse is not. I can't find any related problems on the internet and I hope someone here can help me solve this problem.


title: How to Test if a file has characters in it?

text: So i have a part of this code and U want it to output "No such player" if only the names file is empty, i've tried using the test -s command but it gives an output of 0 even if the file is empty or not. how would i go about solving this issue.                      if [ $Target = m -o $Target = M ]            then            cut -c12-26,31-43 ./emplist > names            grep $Name ./names            if            **[ -s  names ]**            then               :            else            echo "No such player"            fi      Basically i want it to output the names w.o outputting " no such player" if there are names in the file. and out put " no such players" if there are no names in the file.


title: Is there a way to boot linux directly from MBR?

text: Inspired by UEFI, I want to skip the stage of the bootloader (grub, lilo, syslinux) and boot linux directly. Is this possible? Cant I just boot the kernel directly, or have a minimalistic bootloader that fits in the MBR?


title: Why does rsyslogd not honor the following lines in rsyslog.d

text: This is somewhat related to my previous question here. I have three files in `/etc/rsyslog.d` which is included from `/etc/rsyslog.conf`:   * `00-iptables.conf`   * `50-default.conf`   * `postfix.conf` The first one is one that I created. My assumption is/was, that due to the naming it will be included before `50-default.conf`, but I also tried putting the filter lines directly into `50-default.conf` and remove my custom file (`00-iptables.conf`).               :msg, startswith, "ipt:" /var/log/iptables.log     & stop      Replaced `~` with `stop` as running `rsyslogd` with `-N1` as described on the man page and in the troubleshooting steps gave a warning, saying `~` is deprecated in favor or `stop`, which means the available (official!) documentation seems to be outdated/lagging behind. Now the idea here is that any message prefixed with `ipt:` will go into the named log file and no other log file will receive these lines (I tried also `contains` instead of `startswith`). That is in particular `syslog` and `kern.log` mentioned in `50-default.conf` shouldn't receive those messages anymore:               auth,authpriv.*            /var/log/auth.log     *.*;auth,authpriv.none     -/var/log/syslog     kern.*                     -/var/log/kern.log      I read the rsyslog documentation, but documentation for the property-based filters (also here) isn't exactly the most enlightening. The example given in the documentation (also found elsewhere) and their Wiki gives a similar example:               # From documentation     *.* /var/log/allmsgs-including-informational.log     :msg, contains, "informational"  ~     *.* /var/log/allmsgs-but-informational.log     # From Wiki     :syslogtag, startswith, "MSWinEventLog#011" /var/log/messages;fixsnareFormat     & @192.168.1.8;fixsnareForwardFormat     & ~      While the example from the documentation isn't as close to my two-liner, it still explains the meaning of the `~` better. What am I doing wrong? Bonus points if someone can answer whether there is a way to combine selectors and properties. E.g.:               :msg, startswith, "ipt:" kern.* /var/log/iptables.log      NB: I use version 7.4.4 of `rsyslog`. And yes, I did `service rsyslog restart` after the changes and then waited for it to take effect. * * * ### Edit Some more info. When running the daemon in debug mode (`RSYSLOG_DEBUG=LogFuncFlow RSYSLOG_DEBUGLOG=~/rsl.log $(which rsyslogd) -f /etc/rsyslog.conf -d`), I can see that the ruleset after optimization looks like this, which seems to indicate it's exactly the way I want it (leading prefix stripped for brevity):               ruleset 'RSYSLOG_DefaultRuleset' after optimization:     ruleset 0x214a640: rsyslog ruleset RSYSLOG_DefaultRuleset:     PROPFILT        Property.: 'rawmsg'        Operation: 'contains'        Value....: 'ipt:'     THEN       ACTION 0x215c070 [builtin:omfile:/var/log/iptables.log]       STOP     END PROPFILT     PRIFILT 'auth,authpriv.*'     pmask:  X  X  X  X FF  X  X  X  X  X FF  X  X  X  X  X  X  X  X  X  X  X  X  X  X       ACTION 0x215e840 [builtin:omfile:/var/log/auth.log]     END PRIFILT     PRIFILT '*.*;auth,authpriv.none'     pmask: FF FF FF FF  X FF FF FF FF FF  X FF FF FF FF FF FF FF FF FF FF FF FF FF FF       ACTION 0x215f030 [builtin:omfile:-/var/log/syslog]     END PRIFILT      I should also add that from the behavior I see, I can deduce that the filter has an effect, as it clearly writes into the file `/var/log/iptables.log` as expected. However, the messages aren't dropped as expected after writing them to that particular file. Here's an example line the way it ends up in all of `kern.log`, `syslog` and `iptables.log` as opposed to only the latter. Details have been redacted for privacy reasons:               Jun  1 02:23:01 hostname kernel: [70025.211497] ipt:drop IN=eth0 OUT=virbr0 MAC=dd:cc:bb:aa:99:88:77:66:55:44:33:22:11:00 SRC=9.8.7.6 DST=1.2.3.4 LEN=60 TOS=0x00 PREC=0x00 TTL=47 ID=59201 DF PROTO=TCP SPT=47626 DPT=23 WINDOW=4380 RES=0x00 SYN URGP=0


title: what is the original command to create a file?

text: we can create a file by a lot of commands:               cat > foo.txt          echo 'This is a test' > foo.txt          touch foo.txt          vi foo.txt (or any text-editor)      my questions are:   * What is the original command to create a file when they first created Linux (Unix)?   * Is there any differences if I used any of the command above to create a new file?


title: command like wc but with tee behaviour

text: I want to backup a database using `psql` and `COPY` command. here is my script:               psql "user=${USERNAME} host=${HOSTNAME} dbname=${DBNAME} password=${PASSWORD}" -c \     "COPY (SELECT * FROM tbl) ORDER BY id ASC) TO STDOUT WITH CSV HEADER;" | \     bzip2 -z -f --best -c > /home/${DBNAME}-${FILENAME}.csv.bz2      Also I want to know how many lines are copied from database but psql does not have such feature. so I need external command. I need something like this:               psql ... | wc -l | bzip2      Is there any solution? The only solution I have found is to use fifo:               mkfifo /home/backup.fifo     psql ... | tee /home/backup.fifo | bzip2      Now from another terminal window I can use `wc`:               wc -l /home/backup.fifo


title: bottomless tee?

text: I was just playing around in the terminal and I did this:               printf 'some string\n' | {         tee /dev/fd/3 | {             : && sed 's/some/string/'         }     } 3>&0      I was really surprised when I was met with a screen full of:               string string     string string     string string     ...      It went on pretty much forever. I pared it down some, and to better demonstrate, maybe try this:               echo | tee /dev/fd/0 | sed =      For me, it presents output like:               <num>     #blank     <num+1>     #blank     ...      And so on. The few times I've tried it by the time I could hit `CTRL`+`C` I was at line 200k+. I tried this in `bash`, `dash`, `sh`, and `zsh` and all present the same results. What is going on there? How are the file-descriptors passing over that `|pipe` between, what I thought were, separate processes? Is this reliable and/or expected behavior? Are there other ways to generate this effect? For reference:               echo '#blank' | {         uname -r         readlink -f /dev/fd/0         tee /dev/fd/0     } | sed '=;5q'      ### OUTPUT               1     3.14.6-1-ARCH     2     /proc/24925/fd/pipe:[5851017]     3     #blank     4     #blank     5     #blank


title: How can I get this java command to act on each file found by a find command?

text: I have this command inside a Bash shell script, the intention of which is to apply a java command, htmlcompressor, to each HTML file found in a directory:               find $DIR -type f -name '*.html' -exec java -jar $BASEDIR/Upload/htmlcompressor-1.5.3.jar --remove-intertag-spaces {} \;      However, while the output at the command line seems to indicate that it is finding each file and doing something with it, it's not actually writing the results to the files. According to the documentation for htmlcompressor, the usage is this: > Usage: java -jar htmlcompressor.jar [options] [input] So there's supposed to be an input file at the named at the end, but I thought the `find` command took care of that. Seems I'm wrong about that, though. What can I do to make it actually act on the files I find?


title: Shell script to detect PDFs with non-ASCII contents

text: I need a shell script to detect valid PDFs. That is, I need to retain only plain ASCII PDFs. Other PDFs which contain non-ASCII contents and malicious scripts need to be deleted. How could I go about doing that? Is there any script available to do it?


title: searching multiple strings in multiple files inside a directory and printing the string and corresponding file name where it was found

text: I have around 500 strings and I want to search for the files which contain them inside a directory and get the file names which contain the strings. So far I've been using:               find -name 'LYFNRE.*' -exec grep -f file1.txt {} \; -print      but the problem is a string can be found in many files so it is difficult to find which strings are present and which are missing due to the huge output. Can you help me in printing the strings with their corresponding file names where they were found.


title: Rosetta Stone for Linux Distributions?

text: Is there is something like a Rosetta Stone for the different Linux Distributions? Perhaps a site where you can look up a commands, configuration files or problem solutions for a specific task organized as translations of ones of another distribution (you know well). For example you know Debian based distributions well and you want to know the Fedora equivalent to               dpkg -S /bin/bar      or               dpkg --get-selections > foo     dpkg --set-selections < foo      or               apt-cache search foobar --names-only      etc. There is a Rosetta Stone for different Unices, but it is not that detailed and does not really differentiates between different Distributions.


title: GNU Parallel slows down

text: I'm learning GNU parallel usage and did the following:               $ for i in {1.txt,2.txt}; do time wc -l $i; done     100 1.txt          real    0m0.010s     user    0m0.000s     sys     0m0.010s     10000012 2.txt          real    0m0.069s     user    0m0.050s     sys     0m0.018s      Then reran the above command with `parallel` but it slowed things down. Why?               $ for i in {1.txt,2.txt}; do time parallel --nonall wc -l $i; done     100 1.txt          real    0m0.325s     user    0m0.192s     sys     0m0.042s     10000012 2.txt          real    0m0.305s     user    0m0.220s     sys     0m0.043s


title: How to change speed limit of running trickle instance

text: I started a program throttled using trickle as `trickle -d 10 -u 5 program`. Now I want to change change the throttling speed to `-d 50 -u 40`. How can I change it without closing the program ? `tricklectl` sounds well but I can't use it. In the manual they says it will be ready soon but I can't see any development for the last 10 years. So I think someone else should have made it. I'm also interested in editing the .c code but I have little knowledge in C .