yum update presents hponcfg-4.2.0-0.x86_64 conflict

I am in the process of trying to get Cacti installed onto an HP DL360 running Centos 6.3.   Running `yum update` presents me with a few updates but when entering `y` it returns an error. How can I solve this?                   [root@Server hponcfg]# yum update     Loaded plugins: fastestmirror, priorities, security     Repository rpmforge is listed more than once in the configuration     Loading mirror speeds from cached hostfile      * base: **.***.**.**      * contrib: **.***.**.**      * dell-omsa-indep: **.***.**.**      * epel: **.***.**.**      * extras: **.***.**.**      * hp-sdr: **.***.**.**      * updates: **.***.**.**     87 packages excluded due to repository priority protections     Setting up Update Process     Resolving Dependencies     --> Running transaction check     ---> Package centos-release.x86_64 0:6-3.el6.centos.9 will be updated     ---> Package centos-release.x86_64 0:6-5.el6.centos.11.2 will be an update     ---> Package cpqacuxe.x86_64 0:9.10-22.0 will be updated     ---> Package cpqacuxe.x86_64 0:9.40-12.0 will be an update     ---> Package dracut.noarch 0:004-284.el6_3.1 will be updated     ---> Package dracut.noarch 0:004-336.el6_5.2 will be an update     ---> Package dracut-kernel.noarch 0:004-284.el6_3.1 will be updated     ---> Package dracut-kernel.noarch 0:004-336.el6_5.2 will be an update     ---> Package hp-health.x86_64 0:9.1.0.42-54.rhel6 will be updated     ---> Package hp-health.x86_64 0:9.40-1602.44.rhel6 will be an update     ---> Package hp-smh-templates.noarch 0:9.1.0.33-32.all will be updated     ---> Package hp-smh-templates.noarch 0:9.4.0-1327.37 will be an update     ---> Package hp-snmp-agents.x86_64 0:9.1.0.57-51.rhel6 will be updated     ---> Package hp-snmp-agents.x86_64 0:9.40-2506.37.rhel6 will be an update     ---> Package hpacucli.x86_64 0:9.10-22.0 will be updated     ---> Package hpacucli.x86_64 0:9.40-12.0 will be an update     ---> Package hpdiags.x86_64 0:9.1.0-301 will be updated     ---> Package hpdiags.x86_64 0:9.5.0-938 will be an update     ---> Package hponcfg.noarch 0:4.0.0-0 will be updated     ---> Package hponcfg.x86_64 0:4.2.0-0 will be an update     ---> Package hpsmh.x86_64 0:7.1.0-16 will be updated     ---> Package hpsmh.x86_64 0:7.2.2-8 will be an update     --> Finished Dependency Resolution          Dependencies Resolved          =======================================================================================================================================================      Package                                 Arch                          Version                                    Repository                      Size     =======================================================================================================================================================     Updating:      centos-release                          x86_64                        6-5.el6.centos.11.2                        updates                         20 k      cpqacuxe                                x86_64                        9.40-12.0                                  hp-sdr                         5.6 M      dracut                                  noarch                        004-336.el6_5.2                            updates                        122 k      dracut-kernel                           noarch                        004-336.el6_5.2                            updates                         24 k      hp-health                               x86_64                        9.40-1602.44.rhel6                         hp-sdr                         316 k      hp-smh-templates                        noarch                        9.4.0-1327.37                              hp-sdr                         3.5 M      hp-snmp-agents                          x86_64                        9.40-2506.37.rhel6                         hp-sdr                         963 k      hpacucli                                x86_64                        9.40-12.0                                  hp-sdr                         6.5 M      hpdiags                                 x86_64                        9.5.0-938                                  hp-sdr                          15 M      hponcfg                                 x86_64                        4.2.0-0                                    hp-sdr                          40 k      hpsmh                                   x86_64                        7.2.2-8                                    hp-sdr                          13 M          Transaction Summary     =======================================================================================================================================================     Upgrade      11 Package(s)          Total size: 45 M     Is this ok [y/N]: y     Downloading Packages:     Running rpm_check_debug     Running Transaction Test               Transaction Check Error:       file /usr/share/doc/hponcfg/readme.txt from install of hponcfg-4.2.0-0.x86_64 conflicts with file from package hponcfg-4.0.0-0.noarch          Error Summary     -------------


How can I simulate keyboard shortcuts in a bash alias?

For example, one of my bash aliases is this               alias p='clear;ls -lt;pwd;'      `clear` also clears the history which I don't want. I just want to clear the screen momentarily. `Ctrl`+`L` however does exactly what I want. How can I use it in my alias?


Get a list of directory names with find

I know I can do this to get a list of directory names:               find . -type d -maxdepth 1       The output looks like this:               .     ./foo     ./bar      I prefer the listing without `./`. Is there a way to get find to output just the raw names? I tried sending the list to stat to format it but that just gives me the same result:               find . -type d -maxdepth 1 -print0 | xargs -0 stat -f '%N'


Incrementally backup FTP to local computer

I want to backup a FTP directory (not backup _to_ ) with a cron script running daily. I'd prefer a solution that could sync the FTP to my local computer; only copy files changed and remove files that have been deleted. Is there such an application?


Testing intranet network

This is probably a question already discussed here and there. I'd like to try to gathering here all the information. Suppose I'm on a machine connected to a network. This network has access to the internet. I'd like to write a `bash` script to detect the maximum information possible in order to   1. Map the network around me      1. Number of devices connected     2. Types of services offered by each device   2. Know how many devices I must run through in order to reach the router to the internet (counting hops)   3. Latency between each step   4. Strength of signal if the link between A and B is wireless    5. Maximum uplink and downlink speed between two devices on the intranet I don't need the final script, I'd like to get dirty doing this, but I need tips on the right approach. I've got a good knowledge of network theory but really a poor knowledge of the practical side and the best I have come up with is flooding the subnet with pings and trying to reverse engineer the network using it.. rubbish!


Where do executables look for shared objects at runtime

The title is pretty explicit. I understand how to define include shared objects at linking/compile time. However I still wonder how do executables look for the shared object (*.so libraries) at execution time. For instance my app `a.out` calls functions defined in the `lib.so` library. After compiling, I move `lib.so` to a new directory in my `$HOME`. How can I tell `a.out` to go look for it there?


How can I fix "cannot find a valid baseurl for repo" errors on CentOS?

I finished installing CentOS 6, but when I tried running `yum update` I got:               [root@centos6test ~]# yum update     Loaded plugins: fastestmirror, refresh-packagekit     Determining fastest mirrors     Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=i386&repo=os     error was 14: PYCURL ERROR 6 - "" Error: Cannot find a valid baseurl for repo: base      Why is that happening? How can I fix it?


Converting a history to a script?

Often times I've typed in a bunch of commands when I realize that I am going to keep typing them in and that I would really like a script. Now I understand that no matter how I save my history, I am going to have to edit it to clean things up, but would like to hear suggestions on how to save my history so that it is close to a usable script.


Can't access to miniDLNA

I wanted to install a dlna server on my asus eeepc, and tried minidlna. My eeepc runs Wheezy, so I just had to run apt-get install to install minidlna on it. The first time I ran it, everything worked fine, but once I restarted the service, I could never access it from VLC (running in Squeeze) again. My config file:               media_dir=V,/home/media/vid     media_dir=P,/home/media/pic     media_dir=A,/home/media/aud          db_dir=/home/user/.minidlna     log_dir=/var/log          network_interface=wlan0     port=8200          inotify=no      Thanks in advance for helping!


Missing Firmware for Wired NIC on Debian

I'm trying to install debian 64bit from a debian live image using YUMI on my usb drive. I'm installing it on an Inspiron 6400, and there is missing firmware. I can't connect to the internet whatsoever, and am at a loss. I've tried configuring it myself to no avail. I downloaded the drivers, transferred them to the laptop, and it wouldn't run the install file because none of the networking directories seemed to exist. Does anybody have experience with this, or could anybody nudge me in the right direction? Thanks. EDIT: So guys, here's what I did. I figured it out eventually. What I did was download the firmware for the wireless card, put it on a usb drive, bring it to my laptop, and install it. Then I painstakingly downloaded every package and every dependency for wicd-curses, and installed that. Then I connected to my wireless with that, and got internet at this point. I tried getting the wired card to work but after many days I gave up and settled for wireless.


Providing ftp access (of selected files) to users from a hashed repository of unique files

We have a portal where each user has an account and a file repository that goes with it. Whenever any user uploads a file using a form, the php app hashes the file contents first and checks to see if the file already exists in the system (even if uploaded by a different user). If the file exists, no new file is stored, instead the system only saves a row with the details of the uploading user and links to the original file. This method eliminates file duplicates and saves space . But we are encountering a problem now; every user also gets an ftp account, which can be utilized to download his repository files. Since only unique files are stored, we need a way to show to every user all files from his repository. Since this isn't a simple ftp folder it requires tinkering around. We have seen symlinks and file mounts, both are not practicable because the former blocks access on permission grounds and latter requires thousands of files to be mounted individually at runtime.


Regarding separate a single file into multiple files according to line separation

Currently, I have a plain text file, A, such as               lowest priority     very high significance.     outstanding     very novel      In this file, every line contains a sentence. I want to separate this file into multiple files, and each file is composed of a single line of the original file, A. For instance, with respect to the example file A, I want to generate four files:   * A1, which has single line, `lowest priority`   * A2, which has single line, `very high significance`   * A3, which has single line, `outstanding`   * A4, which has single line, `very novel`. How to do that under linux?


Killing multiple GNU screen sessions with the same name

Sometimes my script bugs out and multiple screen sessions with the same name get created. Is there a way to kill all of these with this name in one command?               Rx:/scripts# screen -S haydoz-script -X quit     There are several suitable screens on:             13372.haydoz-script     (09/10/11 07:44:05)     (Detached)             12287.haydoz-script     (09/10/11 07:30:45)     (Detached)             12230.haydoz-script     (09/10/11 07:17:42)     (Detached)             7824.haydoz-script      (09/09/11 11:42:26)     (Detached)             7764.haydoz-script      (09/09/11 11:35:40)     (Detached)             15753.haydoz-script     (09/04/11 15:00:27)     (Detached)             15744.haydoz-script     (09/04/11 15:00:26)     (Detached)      There are other screens running besides these ones that I do not want to kill.


DTrace to trap any chmod applied to certain files

Underneath the Mac OS X directory /audit I have certain files which users can access and chmod to their liking. I need to audit any chmod done on any files by recording the time, user and file being chmod, especially the latter. I can dtrace -n 'syscall::chmod:entry' and detect the events, how do I read the first argument to chmod? man 2 chmod tells me the path is in the first argument:               chmod(const char *path, mode_t mode);      but how can I read args[0]? I think I am doing this the wrong way around.. perhaps entry doesn't correspond to the actual syscall? If I have a probe I can monitor, how can I check which parameters it offers for access and what types they are? I am assuming some pointers will need to be dereferenced based on their data layout..


The result of ls * , ls ** and ls ***

I know using the command `ls` will list all the directories. But what does the `ls *` command do ? I used it and it just lists the directories. Is the star in front of `ls` means how deep it can list the directories?


Select between given characters in vim

Given three sample lines:               some('lorem _ ipsum');     $some['lorem _ ipsum'];     <span class="some _ class">      (cursor is in `_` position) Which is the fastest way to select (for pasting in other place):   * text between `'` quotes   * expand the selection to include the parenthesis   * text between parenthesis   * text between `<` and `>`


How to build a new OS on top of a Linux OS

I'd like to build my own operating system (really just the Ubuntu distro as I know the task is difficult) But what I mean by this is I wish to build atop of the Ubuntu operating system as like Apple has done with OS X building it atop of UNIX. I would like to do the same thing with a distribution of Ubuntu Linux except my business would be in control of everything, instead of Canonical Ltd. This question is different from just an Ubuntu Live CD because I don't want to create an almost entirely different OS then Ubuntu. In fact that is why I say that "I'd like to build my own operating system".


netstat command doesnt work anymore on the new dedicated server

I was using the following command on my previous dedicated server with the same version of the FreeBSD installation:               # uname -a     FreeBSD 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Thu Sep 26 22:50:31 UTC 2013     root@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64      The command is following:               netstat -ntu -f inet      Output:               netstat: illegal option -- t      Why doesn't it work anymore? I dont have an access to my previous dedicated server so I can't use the `man` to check the differences...


No syntax highlighting when editing crontab

I am trying to figure out why I don't have syntax highlighting when editing my crontab. I have both `$EDITOR` and `$VISUAL` set to `/usr/bin/vim`:               > echo $EDITOR     /usr/bin/vim     > echo $VISUAL     /usr/bin/vim      If I save the crontab to a file and edit it with vim syntax highlighting is enabled.               > crontab -l > saved_cronab     > /usr/bin/vim saved_crontab      And if I use `:syntax on` while editing the crotab nothing changes How can I enable highlighting when editing crontab with `crontab -e`?


decreasing "reserved block count" does not show up in df output

By default my ext3 file system had 122060 blocks(5%) reserved. I decreased this to 24412(1%), but there were no changes in `df` output:               root@t60:~# df -P     Filesystem         1024-blocks      Used Available Capacity Mounted on     /dev/sda1              9611492   9611492         0     100% /     tmpfs                  1032740         0   1032740       0% /lib/init/rw     udev                   1028300       212   1028088       1% /dev     tmpfs                  1032740       272   1032468       1% /dev/shm     /dev/sda6            294079488  84665932 194475140      31% /home     root@t60:~# tune2fs -m 1 /dev/sda1     tune2fs 1.41.12 (17-May-2010)     Setting reserved blocks percentage to 1% (24412 blocks)     root@t60:~# df -P     Filesystem         1024-blocks      Used Available Capacity Mounted on     /dev/sda1              9611492   9611492         0     100% /     tmpfs                  1032740         0   1032740       0% /lib/init/rw     udev                   1028300       212   1028088       1% /dev     tmpfs                  1032740       272   1032468       1% /dev/shm     /dev/sda6            294079488  84665932 194475140      31% /home     root@t60:~#       Any ideas why is this so?


Problem creating a bootable USB stick

I have tried to make a bootable USB stick on my netbook using Universal USB Installer for Fedora Desktop. But it can't find my pendrive. I thought the problem is my pendrive, so I change it. Unfortunately,the problem still the same. Whats wrong exactly?   I am using Zorin 8 OS on my netbook.


nmcli freedesktop DBus warnings and errors

As soon as I do `nmcli con up id <ESSID>`, I experience some warnings/errors: > ** (process:4841): WARNING **: async_got_type: could not read properties for > /org/freedesktop/NetworkManager/ActiveConnection/5: Method "Get" with > signature "ss" on interface "org.freedesktop.DBus.Properties" doesn't exist > > ** (process:4841): WARNING **: async_got_type: could not read properties for > /org/freedesktop/NetworkManager/ActiveConnection/5: Method "Get" with > signature "ss" on interface "org.freedesktop.DBus.Properties" doesn't exist > > ** (process:4841): WARNING **: async_got_type: could not read properties for > /org/freedesktop/NetworkManager/ActiveConnection/5: Method "Get" with > signature "ss" on interface "org.freedesktop.DBus.Properties" doesn't exist > > Error: Connection activation failed: Creating object for path > '/org/freedesktop/NetworkManager/ActiveConnection/5' failed in libnm-glib.   * How can I fix this error?   * What causes this? I have (X)Ubuntu 13.10. This might have to do something with some `freedesktop` related issues, I have with recently. Please have a look at it, too: Gnome programs (eog/gnome- terminal) have a slow start and produce a DBus.Error.NoReply Warning.


How can I be notified about state changes to a VPN adapter

On Ubuntu 12.04 - actually Kubuntu, but I am using NetworkManager, so the configuration should be the same - I have configured a few VPN connections. Now, if I have a long-running up- or download, how can I ensure that all network traffic is stopped immediately and unconditionally if the VPN connection breaks off? What I am looking for is some method of getting notified (I don't want to poll!) of the change. The rest (e.g. inserting netfilter rules) I can handle myself. I just need to find out how to get notified about a change to an established connection. In case it matters, the configuration I am using is based on `tun0`. If other details are required, let me know in a comment and I'll add them to the question. * * * What I have tried so far:   * configure the main LAN connection (this is inside a VM, so there is only a LAN connection) to be manual   * configure the VPN to be automatic then I figured that this isn't the route I want to take anyway, because I want to start my script/program to get notified only whenever I activate the VPN. I am not running on VPN all the time, but most of the time. So basically I need to register for some notification as soon as a particular VPN connection is established and then get notified if something happens to it in order to tear down the main connection automatically in response.


Postfix error: not yet authorized to deliver mail

I am running a private postfix server for my domain `mydomain.com`, on server `111.111.111.111` (IP and domain sanitized for privacy reasons) I have sent an email to `info@example.com` which is on server `222.222.222.222`. The message was deferred, and in my postfix logs, I could see following error:               postfix/smtp  9D055EA: host mail1.example.com[222.222.222.222] said:      451-111.111.111.111 is not yet authorized to deliver mail from 451      <martin@mydomain.com> to <info@example.com>. Please try later. (in      reply to RCPT TO command)      My domain has reverse DNS record set up, and I am using SPF record. Both are configured correctly, I can send emails all right, this is the first case when I have seen these errors. This leads me to believe, that this error is caused by misconfiguration on the destination server. But since I am not sure what these errors mean, I would like if somebody could explain it.


Command substitution - single quotes and spaces

How can I make command substitution pass a list of single-quoted POSIX paths separated by spaces?               command1 $(command2)     command1 '/path/to/file 1' '/path/to/file 2' '/path/to/file 3'      How can I trace the expansion?


How to trigger error using Trap command

I am using Ubuntu 12.04.2. I am trying to use "trap" command to capture abnormal or error in my shell script but I am also trying to manually trigger "Error" exit. I have tried exit 1, but it won't trigger "Error" signal.               #!/bin/bash          func()     {         exit 1     }          trap "echo hi" INT TERM ERR     func      Not sure how to manually trigger "Error" exit signal?


Generate a list of files from a file containing a series of globbing patterns

I am looking for a way to build a list of files by parsing a file that contains a sequence of `zsh` globbing patterns. The final goal is to pass this list of files to `hg add` in mercurial. For those interested in this specific part, my question is motived by this other question that I asked in StackOverflow:   * Mercurial “hginclude”? (globbing syntax to specify which files to track) A sample file (let's call it `.hginclude`) would look as follows:               .zshrc                                                                                .zprofile                                                                                .less*                                                                                .emacs*/**                                                                                src*/**                                                                                .hg*                                                                                .bash*                                                                                .inputrc                                                                                .ssh      and the output from the script should be a list of **files** obtained by collecting the output of `print globbing_pattern` on every line, where `globbing_pattern` refers to each line in the file `.hginclude` above. Ultimately, the list of files should be a list that I can pass to `hg add` to track those files in mercurial. The assumption for this part is that I have an `.hgignore` with the following:               syntax: glob     *      which means: don't track anything unless explicitly added via an `hg add` command.


bash script check if variable is is [A-Z]

How do I check if a variable is in [A-Z] I want something like this:               read var          while [ $var in [A-Z] ]     do      #code here     done      How to achieve this?


Interesting numbers when apache benchmarking

[root@NOTEBOOK ~] time for i in 128 321; do sleep 302; ab -n $i -c $i https://EXAMPLE.COM/ 2>/dev/null | egrep '^Complete requests:|^Failed requests:|^Requests per second:|^Time taken for tests:'; echo '______________________'; done     Time taken for tests:   87.538 seconds     Complete requests:      128     Failed requests:        0     Requests per second:    1.46 [#/sec] (mean)     ______________________     Time taken for tests:   58.507 seconds     Complete requests:      321     Failed requests:        490     Requests per second:    5.49 [#/sec] (mean)     ______________________      **Q:** how could the Failed requests > Complete requests? p.s.: The "sleep 302" is needed, because somehow if I do too many ab's then the outputs will be 100% fails..


Do I just need to include a .netrc file to have UNIX pick it up?

I have a .netrc with the following format in a directory using a bash terminal on OSX:               machine m...         login l...         password p...      I have chowned and cmoded the file like this, as suggested in this help file               $ chown myusername .netrc     $ chmod +600 .netrc      When I am in the directory, I issue the following command:               $ftp m...      Based on this tutorial (see section "useage of the .netrc") it seems like unix should automatically detect that there is a .netrc file in the directory when I type `ftp m..`, see that the .netrc gives credentials for machine . and pass them along to ftp. This is not happening. Instead, I see this output               Connected to server.domain.com     220 Microsoft FTP Service     Name (file.server.domain.com:My_OSX_Username): #I would expect it would pull my username off the .netrc file      Am I using the .netrc file incorrectly?


Finding all kinds of extensions referenced in a html file

Here is my problem statement : There is a folder with many html and text files. I need to recursively go through each one of them and find all kinds of file extensions referenced in these html/text files like .jpg, .tif, .png etc The problem is I don't have a defined list of the extensions I want to search for. What would be the best way to achieve this using a shell script ? Coming up with a Reg-ex which would essentially search for all occurrences of a dot followed by 3 or 4 letters, and filtering out the ones which end with a space or a comma, or a quote etc ?? Any suggestions would be helpful.


`grep -l .. | xargs vim` generates a warning, why?

If I run a command like               grep -rl test . | xargs vim      I get a warning "Vim: Warning: Input is not from a terminal." But I am still able to edit the files. Why the warning?


Is there a way to pass a variable from an awk statement to a bash function as an argument?

I am trying to look a for some specific values from (such as 1 or 4 and 2 or 3) a text file using an `awk` statement in a bash script. If this value is found in the file (within the `awk` statement), then I want to call a function from outside the `awk` statement and pass it the found value as an argument. My questions: (1) Is this possible? If so then how? (2) If it is not possible or there is a better way, then how? Note that I am skipping the first two lines of the text file when searching the file. I am using GNU AWK. Let me know if further explanation is required. **I apologize in advance for the cross-post but I did not get the answer I am looking for. file.txt               Name  Col1  Col2  Col3       -----------------------     row1  1     4     7             row2  2     5     8              row3  3     6     9       The actual `retrieve` functions are much more complex than in this simplified example. So I need to make a call to this function because I don't want to put this in the `awk` statement.               function retrieve {         if [[ "$1" == "1" ]]; then             echo "one beer on the wall"         elif [[ "$1" == "4" ]]; then             echo "four beers on the wall"         fi     }          function retrieve2 {         if [[ "$1" == "2" ]]; then             echo "two beers on the wall"         elif [[ "$1" == "3" ]]; then             echo "three beers on the wall"         fi     }          awk -F '\t' '         FNR < 2 {next}         FNR == NR {             for (i=2; i <= NF; i++)              {                 if (($i == 1) || ($i == 4))                     printf(%s, "'retrieve "$i" '")    # Here is the problem                      if (($i == 2) || ($i == 2))                     printf(%s, "'retrieve2 "$i" '")    # Here is the problem             }         }          ' file.txt


Find out if files in a folder exist under other name in other folder

_Possibly a little incorrect English ahead:_ There are at least 2 folders. For this, **A** contains files without extension, usually usernames, and **B** contains similar files, with '.yml' extension or possibly without extension, or even other extension, that's not always the case. How to find out if the files in the **A** folder exist in **B** , possibly under a different extension, without using scripting language such as Python ? It'd not be much of an issue for me to make a Python script, but for portability I'd prefer shell scripting, which I suck at. Not to mention I don't know all the commands. It's only good if this can be done in non-Linux systems too, particularly BSD. _**EDIT 0:_** The difference in name isn't always just the extension, the name could have characters before or after the same text. For example, if **A** had a file called `foobar`, it could be named `location_foobar` in **B**. Otherwise the name wouldn't be more different, like `foo1bar`, that's entirely different thing, so the script wouldn't be looking for such differences.


Why does mencoder output still images if I try to encode them under 3 FPS, while mencoder outputs dynamic images if I output them at 3 FPS or over?

If I try...               mencoder mf://@NetSWLW12MA.txt -mf w=800:h=600:fps=1.5:type=png -ovc lavc     -lavcopts vcodec=mpeg4:mbd=2:trell -oac copy -o NetSWLW12MA2.avi      I just get a bunch of still images of the first frame. if I try...               mencoder mf://@NetSWLW12MA.txt -mf w=800:h=600:fps=4:type=png -ovc lavc     -lavcopts vcodec=mpeg4:mbd=2:trell -oac copy -o NetSWLW12MA2.avi      then I get mencoder to robustly play all the images. (there are 145 separate image frames contained in the txt file). Is there a way to put all 145 images as separate images in the mencoder file when I encode it at 1 FPS?


How to save email sorted by date?

I seem to remember a patch to mutt that allowed to modify the path of the mailbox in mbox-hook in include the date. For example, you could have this:               mbox-hook Maildir +Archive/%y/%m/maildir      Which would save the emails in Archive/2011/12/maildir if they were send during December 2011. Anyone knows what it was called or if it still is supported? I seem to remember that there was an option in the BSD ports to enable it but cannot find it now. If not, does anyone know how I could achieve the same thing?


What exactly does rmdir -p do?

> -p, --parents remove DIRECTORY and its ancestors; e.g., `rmdir -p a/b/c' is > similar to`rmdir a/b/c a/b a' Yeah - I'm definitely not going to risk testing that out myself. ;)


External Hard-Drive not visible in /media

I cannot seem to ssh into my external Hard-drive on "/media" it used to show up there, but now it doesn't. I have erased the Disk and verified it (on MAC OSX) and it still does not show. I have executed the command "lsusb" and got the following: > 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub > > Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. > > Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. > > Bus 001 Device 004: ID 0bc2:3312 Seagate RSS LLC This looks fine to me, as though it is picking it up, however, now showing the drive. Does anyone know what could be the problem? EDIT: fdisk -l output:               Disk /dev/sda: 2000.4 GB, 2000398933504 bytes     255 heads, 63 sectors/track, 243201 cylinders, total 3907029167 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x00000000     Device Boot      Start         End      Blocks   Id  System     /dev/sda1               1  3907029166  1953514583   ee  GPT      blkid output:               /dev/mmcblk0p1: SEC_TYPE="msdos" UUID="3312-932F" TYPE="vfat"      /dev/mmcblk0p2: UUID="b7b5ddff-ddb4-48dd-84d2-dd47bf00564a" TYPE="ext4"      /dev/sda1: LABEL="EFI" UUID="70D6-1701" TYPE="vfat"      /dev/sda2: UUID="ae48face-7d6e-3ce9-9f8c-77d8a605d00a" LABEL="Untitled" TYPE="hfsplus"


lshw and lscpu disagree on caches - which is right?

I am trying to find out specifics about caches (in particular which caches are shared between cores and which are not) and have stumpled onto a inconsistency. `sudo lshw` says               *-cache:0          description: L1 cache          physical id: a          slot: Internal Cache          size: 64KiB          capacity: 64KiB          capabilities: synchronous internal write-back     *-cache:1          description: L2 cache          physical id: b          slot: External Cache          size: 8MiB          capabilities: synchronous internal write-back      but `lscpu` claims               L1d cache:   32K     L1i cache:   32K     L2 cache:   256K     L3 cache:  8192K      I do not worry too much about instruction and data cache being added together, but where did L2 go? Observed on a machine running Ubuntu 10.10, or to let `uname -a` speak:               Linux name 2.6.35-32-generic #66-Ubuntu SMP Mon Feb 13 21:04:32 UTC 2012 x86_64 GNU/Linux      This is a general question, but note that neither the most precise manufacturer spec I could find nor Wikipedia do have the necessary detail. Unrelated bonus question: does `External Cache` mean the cache is shared between the (four) cores (and `Internal Cache` the opposite)?


personal document management system

I'm looking for a personal document management system that would:   * track changes in documents in a configured directory tree   * save new files to a content repository (thus allowing of their versioning)   * offer some kind of web gui for browsing the repository - ideally it would allow tracking changes in documents etc The files I'd like it to support are:   * microsoft word files (doc, docx, xls)   * open office files   * pdf files   * txt files I've looked through a couple of such systems (DMS-grade) but haven't noticed them having the autonomous scanning option. What I'd like to have is a unobtrusive solution that wouldn't require users to upload documents through web gui. All the versioning, backing up stuff should be transparent to them. Only if they were actually interested in downloading the older version they would fire up the web gui. Any comments and suggestions are welcomed.


How to copy to a formatted image without root privileges?

I have formatted an image file using the `mkfs` command, and I would now like to copy files to that image file without root privileges. I have already tried to mount the image to a local directory, which did require root privileges for some reason. (feel free to comment why) Is there a widely supported way to copy files into a formatted image without requiring root privileges. _Edit:_ The image is formatted as FAT-32.


Activating Audio System in Arch Linux

I wanted to get the audio system going on Arch Linux, and I followed the very concise instruction I found on Archlinux.org, but it didn't help. Has anyone done this personally, therefore knowing the practical shortcut? I'd be glad to know of it. Thank you.


Mutt: can I define my own rules for quoted message detection?

I recently started using mutt with my gmail IMAP mail address. Because I loved it so much, I also set it up with my college email address. This, sadly, is hosted by the college ICT team under Outlook Webapp, which seems not to adhere to some vary basic standards such as message quoting. On every mail service I've used (not many but hey), a message is quoted using the following method:               This is my new message     >this is      >a quoted message     >> this is a      >> quoted message inside the quoted message      or something similar. Mutt seems to pick this up and colorize them appropriatly. However, the Outlook Webapp has following qutoing scheme:               This is my new message          -----Original Message-----     From: Foo@Bar     Subject: Foobar     Date: 1st of Foo, 2012 20:18     To: Bar@Baz          this is      a quoted message          -----Original Message-----     From: Bar@Baz     Subject: Foobar     Date: 1st of Foo, 2012 20:13     To: Foo@Bar          this is     a quoted message inside the quoted message      Is there a way to tell mutt how to pick this up? Note that when different users have different languages set in the web app this will also reflect in the quoting, eg a Dutch person will have `-----Oorspronkelijk bericht-----` instead of it's english counterpart, and it will be sent around like that. So there will be some mixing up. It feel saddened by the lack of respect for simple standards like this, because they make life so much harder than it has to be. Note: I have renounced using the outlook webapp, and thus I set up a new gmail account. My outlook webmail get's forwarded to this gmail account and I can reply to it using my normal college email adress from the gmail webapp or mutt. The bad quotin remains a problem though.


Can't get out of foreground mode in STunnel

I was trying to debug an STunnel installation on my Raspberry Pi (using Raspbian) and so I set the foreground mode to yes (which is something suggested in the official documentation). Unfortunately, now every time the Raspberry Pi boots up, it will present the log to me in the foreground, with no way for me to run any other command, browse the file system, etc. I tried `Ctrl`+`Z`, but that didn't work. The only thing that seems to work is `Ctrl`+`Alt`+`Delete`, but that just reboots the Raspberry Pi.


How to enable TCP connection in Debian Squeeze?

I need enable TCP connections to my system, for use graphical applications in marionnet, network simulation system, in debian squeeze. In older versions of debian it is achieved with System|Administration|Login Window -> uncheck “Deny TCP connections to the Xserver”. but in squeeze I have no idea. ?? EDIT: I have the answer: take a look here


Trying customize Fedora rescue image - how do I go about this?

Most of what I've found on this involves changing install discs - which I don't really need. I just want to install a handful of extra packages and maybe some helpful scripts onto the Fedora rescue image and burn it to a disc for me and my boss to use when we image or tinker with computers (our imaging process is over NFS). Is there a good straightforward process to this or am I looking at rolling my own whole setup? Thanks for any input!


Disable scroll lock

We have a shell/tty based application that has ~1,000 users. It is running in an environment where X Server is not available. If a user accidently turns on the `Scroll Lock`, it makes it seem as if the application is frozen because it quits responding to keyboard input. Is there a way to disable the `Scroll Lock` or remap it to something less intrusive for this use-case?


ls -ld list files inside a folder which is having only execute permission

In Linux, I gave only `execute` permission to a directory named `test`. after switching to the directory `test`, when I run `ls -ld` it was showing some hidden files. Please explain this.


User preferences not saved in Nemo file browser in Linux Mint 14 Cinnamon edition

I started using Linux Mint 14 (Nadia) recently, and kind of like it better for the Gnome experience its gives using Cinnamon DE. My question is, the file browser (NEMO 1.1.1) fails the save the defaults - the way I want it to display the folders and stuff. For example, I would like to have the folders listed in the 'List' form instead of the icon format, and would also like to have the "Location Entry" as default, instead of the bread crumbs model address bar in the file browser. I tried updating the preferences using the Edit > Preferences tool, however the updates are not stored, or getting reflected. I tried restarting Cinnamon, no effect. Also, I see that there is a toggle button to toggle between the bread crumbs mode and full address typing mode for the address bar, however I couldn't find a place which lets me select which one I need by default. Please suggest where I need to edit so that these settings can be saved permanently.


Why using rpm if there's yum?

As we know yum is a package management system which was built on top of rpm. It's also a command line utility which is a(rudely speaking) broader version of rpm, it resolves many problems(the main is obviously dependencies) which rpm doesn't care of. Is there any particular case when using rpm command would be more appropriate than yum?


Parse and remove a series of html files

I'd like to remove a series of elements like:               div-id="st-head" class="noprint"      from a html file.


Binding Shift-Enter to insert a newline without evaluating the current expression

I try to bind `Shift-Enter` to insert a newline without evaluating the current expression in the terminal and in repl modes. Reading through the ArchWiki, I tried setting this in my `~/.Xmodmap` file and reloading `~/.Xmodmap` with `xmodmap ~/.Xmodmap`. This however, does not work. Here is my detailed setup: content of:                   ~/.Xmodmap:         keysym Return = Return Linefeed      `~/.Xmodmap` is automatically resourced when logging in by setting:                   if [ -s ~/.Xmodmap ]; then             xmodmap ~/.Xmodmap              fi      in my `~/.xinitrc`. _Additional relevant info:_ (1) I set vi editing mode on in my `~/.bashrc` and my `~/.inputrc`. However, results did not differ when taking these options out. (2) Using `keysym Return = Return Linefeed` was suggested here.* Other methods did not work either. (3) My `$TERM` is set to `xterm-256color`. Thanks for any help! * * * *Update: The solution suggested on this page (if still to be found) cannot work in the specific case discussed there as the programming language is using its own repl implementation. So this does not have any bearing on the case at hand.


Java plugin not working with FireFox 24.3.0 on Red Hat Enterprise Linux 5.10

In the about:plugin tab, there is not Java plugin. I have created the symbolic link as suggested. The output of the 'ls -al' command is:               lrwxrwxrwx 1 shehab shehab   58 Jun  4 11:21 libnpjp2.so ->     /export/tools/oracle/jdk1.7.0_60/jre/lib/amd64/libnpjp2.so      The permission of the libnpjp2.so file is `-rwxr-xr-x` When I run the Java verifier at www.java.com I am getting the following error. > We are unable to verify if Java is currently installed and enabled in your > browser. > > If you have installed Java and there is an error with the verification, > there could be a configuration issue (eg. browser, Java control panel, > security settings). Try restarting your browser before trying to verify the > installation again. The Java console is not also available in the FF Tools menu. In the `~/.mozilla/firefox/lcus6cpf.default/pluginreg.dat` file I see the following:               [INVALID]     /import/projects/FPGA_tools/tools/linux/sun/jdk1.7.0_60/jre/lib/amd6/libnpjp2.so:$     1399495476000:$      Any clues what is going on? My Linux admin can run FireFox with Java with his account.


Is it possible to compress a very large file (~30 GB) using gzip? If so, what commands, switches, and options should I use? Or is there another program (preferably one commonly available on Ubuntu distributions) that I can use to compress/zip very large files? Do you have any experience with this?


What's the right way to reuse this one-liner?

I recently came up with the following one-liner:               for f in *.mp3; do sha1sum $f | sed -r 's/[a-z]//g' | cut -c1-2 | awk '{ print ($1 >= 255) ? $1 - $1 + (1/3)*$1 : $1 }' | xargs -i id3v2 -T {} $f; done      I needed it because I've got an MP3 player that does not have a shuffle function. It was the only way I could find (in about an hour of trying) to give a suitably random distribution to track names. (At first I used `jot`, but this program does not update its random seed often enough to produce anything like random results. By the way, if anyone can think of a good way of doing this that actually works, I'm interested to hear about it.) I tried storing it as an alias and got:               awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:           ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                   ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                                  ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:           ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                   ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                                  ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:           ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                   ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                                  ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:           ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                   ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                                  ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:           ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                   ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                                  ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:           ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                   ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                                  ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:           ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                   ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                                  ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:           ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                   ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                                  ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:           ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                   ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                                  ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:           ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                   ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                                  ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:           ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                   ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                                  ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:           ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                   ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                                  ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:           ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                   ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                                  ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:           ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                   ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                                  ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:           ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                   ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                                  ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:           ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                   ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                                  ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:           ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                   ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                                  ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:           ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                   ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                                  ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:           ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                   ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                                  ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:           ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                   ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                                  ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:           ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                   ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                                  ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:           ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                   ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                                  ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:           ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                   ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                                  ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:           ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                   ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                                  ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:           ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                   ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                                  ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:           ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                   ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                                  ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:           ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                   ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                                  ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:           ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                   ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                                  ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:           ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                   ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                                  ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:           ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                   ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                                  ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:           ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                   ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                                  ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:           ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                   ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                                  ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:           ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                   ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                                  ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:           ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                   ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                                  ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:           ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                   ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                                  ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:           ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                   ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                                  ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:           ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                   ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                                  ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:           ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                   ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                                  ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:           ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                   ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                                  ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:           ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                   ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                                  ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:           ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                   ^ syntax error     awk: cmd. line:1: { print ( >= 255) ?  -  + (1/3)* :  }     awk: cmd. line:1:                                  ^ syntax error      It just seems like there should be a suitably easy way of storing it in my `.bashrc`. I'm aware that I could write it to a file and `chmod +x` it inside my `$path` with a shebang, but I prefer to use my `.bashrc` for things wherever possible.


How to configure an OpenWrt 10.03 router to forward an IPv6 connection to the clients?

So I have a TL-WR1043ND router with OpenWrt 10.03 on it. I have clients connected to it through the LAN ports. My ISP provides me a /64 IPv6 block, and I'm using PPPoE authentication. How can I configure this "average" set-up? (IPv6 day is coming! :) ) so that the connecting clients can use (visit sites over) IPv6 and IPv4 too? (no I don't want to use any tunneling)


History of Bash globbing

Is there a historical reason why Bash "globbing" and regular expressions are not identical? For example, I believe that in Bash `[1-2]*` matches anything that starts with a 1 or a 2 followed by anything else, while as a regular expression `[1-2]*` would match only a sequence of 1s and 2s. My Bash scripting and REGEX foo are both pretty weak and I regularly run into problems associated with these differences which made me curious was to why they are different.


What's the most appropriate directory where to place files shared between users?

Or: **where can I put files belonging to a group?** Suppose there are two users on a Unix system: _joe_ and _sarah_. They are both members of the _movies-enthusiast_ group. Where should I put their movie files?   * `/home/{joe,sarah}/movies` are not appropriate because those directories belongs to _joe_ / _sarah_ , not to their group;   * `/home/movies-enthusiast` is not appropriate too, because _movies-enthusiast_ is a group, not a user;   * `/var/movies-enthusiast` might be an option, but I'm not sure this is allowed by the FHS;   * `/srv/movies-enthusiast` might be an option too, however movies are not files required by system services.


dircolors on zsh: Unrecognized keywords: MULTIHARDLINK, RESET & CAPABILITY

I am trying to get the solarized color theme to work in my terminal. I read the instructions here but I get the following dircolors error:               dircolors: `/home/avazquez/.dircolors_zsh':90: unrecognized keyword RESET     dircolors: `/home/avazquez/.dircolors_zsh':94: unrecognized keyword MULTIHARDLINK     dircolors: `/home/avazquez/.dircolors_zsh':103: unrecognized keyword CAPABILITY      when running:               if [ -x /usr/bin/dircolors ]; then         test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"     fi      from my `.zshrc` in zsh (latest version) (which I remotely access `ssh -X` from `gnome-terminal` in Ubuntu). The path to the `.dircolors` file in question is here and the troubling lines seem to be some of the special files definitions:               ## Special files          NORMAL 00;38;5;244 # no color code at all     #FILE 00 # regular file: use no color at all     RESET 0 # reset to "normal" color     DIR 00;38;5;33 # directory 01;34     LINK 01;38;5;37 # symbolic link. (If you set this to 'target' instead of a      # numerical value, the color is as for the file pointed to.)     MULTIHARDLINK 00 # regular file with more than one link     FIFO 48;5;230;38;5;136;01 # pipe     SOCK 48;5;230;38;5;136;01 # socket     DOOR 48;5;230;38;5;136;01 # door     BLK 48;5;230;38;5;244;01 # block device driver     CHR 48;5;230;38;5;244;01 # character device driver     ORPHAN 48;5;235;38;5;160 # symlink to nonexistent file, or non-stat'able file     SETUID 48;5;160;38;5;230 # file that is setuid (u+s)     SETGID 48;5;136;38;5;230 # file that is setgid (g+s)     CAPABILITY 30;41 # file with capability     STICKY_OTHER_WRITABLE 48;5;64;38;5;230 # dir that is sticky and other-writable (+t,o+w)     OTHER_WRITABLE 48;5;235;38;5;33 # dir that is other-writable (o+w) and not sticky     STICKY 48;5;33;38;5;230 # dir with the sticky bit set (+t) and not other-writable     # This is for files with execute permission:     EXEC 01;38;5;64


Centos 6.4 (64) skype 4.2 no sound notification

Everything works fine. I can hear and others can hear me. But no sound notification. In options -> sound devices "Make a test sound" button is disabled. Other button show "PulseAudio server (local)". At the bottom:It appears your system has PulseAudio running: to change sound settings you need to use your desktop manager volume control or PulseAudio volume control. In gnome volume control alert is on and is unmuted. How can I fix that?


grub-install no bias drive

While trying to fix this problem, I came up with tyring to use a live CD and running grub-install. I mount the directory holding my new linux install files (in /dev/sda7) with:               su -     mkdir /mnt/tmp     mount /dev/sda7 /mnt/tmp      Then I when I try grub-install I get this:               [root@localhost tmp]# grub-install --root-directory=/mnt/tmp/ /dev/sda     /dev/sda does not have any corresponding BIOS drive.      I read that the problem can be solved with the recheck flag, but I get:               Probing devices to guess BIOS drives. This may take a long time.     /dev/mapper/../dm-0 does not have any corresponding BIOS drive.      How can I fix this problem?


Application-specific keymapping

In general, I want to make specific keymaps for application, that working only in it and doesn't affect any other app. For example, I already use my Caps key to toggle input language (via xorg.conf), but I want Capslock to behave like Esc in vim. Looks like xmodmap doesn't have any options related to that. I use Gnome and would also appreciate any third-party applications.


Alternative for "locate" on debian

I often use "locate" command on CentOs to find files. What's the alternative for this command on Debian ?


How to have a pop-up window for password appear when opening application?

We have build `wireshark` adding some functionality related to our use, in Scientific Linux 6 system. After this when I start this using normal user, it will not allow me to use the network interface. I have to login via root to do the same. Is there any way that when I click on `wireshark`, and before the application starts a GUI will appear asking for the password for root? The same as when we open `Firewall`. Can I do this using a shell script?


change owner of a file and it's parent directories

I have a file that has 10 parent directories. When I change the file's owner with `chown` command new owner still can't write to file because the file's parent directories still have a different owner. Is there a way to also change parent directories' owner? If not, what's the best way to temporarily grant a user permission to change a file inside nested directories?


How to get mplayer to play from stdin?

Why doesn't this work?               cat /dev/video1 | mplayer -      If I could get that to work, then I could play & record video at the same time using 'tee' to feed mplayer and mencoder. I want to play live video (from /dev/video1:input=1:norm=NTSC) and record it at the same time without introducing lag. mplayer plays the video fine (no noticeable lag). mencoder records it fine. But I can't figure out how to "tee" the output from /dev/video so that I can feed it to both at the same time. (I know ways to encode it, then immediately play the encoded video, but that introduces too much lag). If mplayer and mencoder would read from stdin, then I could use 'tee' to solve this. How can I do it? [BTW, I'd be happy with ANY solution that plays & records at the same time, as long as it doesn't add lag - I'm not wedded to mplayer. But encoding first and then playing adds lag.]


Pop-up event reminders in Korganizer, when synchronizing with Google Calendar

I have "connected" my Google Calendar with Korganizer. I create an event within my Google account. I want pop-up reminders to show up when I go home, even though the events weren't create by KOrganizer but were synced. I don't know if I did something wrong, but the events created by Korganizer don't have pop-ups either. I did check toggle reminder on. Any ideas?


Granting SAMBA rights and privileges requires root password

Given a default Ubuntu installation, I get the following               myusername@EARTH:~$ sudo bash     root@EARTH:~# net rpc rights grant myusername SePrintOperatorPrivilege     Enter root's password:     Failed to grant privileges for myusername (NT_STATUS_ACCESS_DENIED)      Is there any workaround or do I really have to resort to unlocking the root account and setting its password?


Software distribution

I have a set of servers with Red Hat on board and an internal software (it is set of many files with configs and so on) that is in permanent development. There are several types of servers:   * development   * testing   * post-testing   * production There are up to 10 servers in each category, but each server works separately and doesn't depend from others. Furtermore in each stream I can have a minor subversions that are tagged in cvs repository. So I can't just build an testing.rpm for all testing servers and prod.rpm for all productions. Anyway I can see several ways to do that:   * Make own rpm repository, automatically build a set rpm packages for every server type and its subversion and use a cron to update a package.   * Use a shell script with own config on each server to do that   * Make update manually :) Which one is better? Or all of them are completely wrong and there is another way? :)


Excluding a directory when zipping files

I've got a bash script that does something like this:               zip -0 ../backup/backup.zip \     -r ./* \     -x \*CVS\* \     -x *Thumbs.db* \      The directory it's backing up is a SVN archive (it used to be CVS back in the day). I've been unable to get it to exclude .svn and it's contents. What's the cleanest way to exclude .svn (recursively through the entire tree)?


How can I randomize file names in a given directory?

Ok, this may sound like an odd request but it really has a good purpose! I have a Panasonic Plasma TV with an SD card slot, via which I can display a slideshow of JPEG photos. This is useful for preventing burn-in, if I step away from the TV for a few moments while cooking, or if I answer the phone, or whatever, it's handy to just start the slideshow to prevent a static image from showing up, and also let me see photos while I do something else. The problem is the slideshow always starts from the first photo alphabetically, meaning I always see the same images and never get to the end. What I'd like to do is have a script on my Unix machine which I can run on the SD card (mounted at `/media/sdcard`) and have it randomize the names of all the files under that directory. Doesn't _really_ matter how it randomizes them but I'd _prefer_ purely numeric names (for no apparent reason) Is there an easy way to accomplish this? Something like `find /media/sdcard -exec mv {} rand() \;`? For bonus points, any way to prevent the script from _overwriting_ two files in the event that there's a collision? These are copies of photos so if I lose one I still have the original, but still that would be inconvenient...


how to multiply column of one file by column of anothe file?

I want your help in multiplying columns of one file by column of other another file where both files have the same number of columns and rows. I want the script to multiply the first column of the first file by the first column of the second file, the second column of the first file and the second column of the second file and so on. Here is my sample data and the required output below file1               2 3 4 4 . . .      5 6 7 8 . . .     . . . . . . .      file2               3 4 8 10 . . .      5 10 5 9 . . .     . . . . . . .       Required output file will be file1.file2               6 12 32 40 . . .      25 60 35 72 . . .


How many files is equal to 1 inode

I am quite confused about the i-nodes. They say delete files to reduce the i-nodes but I have deleted 100s of log files from different cpanels on my server but inode count is still the same.


No manual page for regex in section 3 - where is it?

I found What do the numbers in a man page mean? which explains the sections for command/library documentation quite nicely, and I was looking at the output for `man regex` and noticed the See Also referred to `regex(3)`. I tried to run `man 3 regex`, but got the following message:               No manual page for regex in section 3      My question is - where is it? This is on Ubuntu 10.04 if that makes a difference.


Only output most recent 10 (or n) lines of a lengthy command output

I have currently worked alot with shell and bash on linux.   I have made tons of backups scripts and much more. In many cases I have a command that outputs thousands of lines. I actually need these lines in order to see the progress of the command. But I do not need to see more than the 10 most recent lines. How can I do that? I already tried using a `pipe` and `tail`. But it did not work. I just got the last ten lines after the original command finished:               whatever command that has too much output | tail -f      It is important that the console does not get cleared or something like this because there is some important infomation that gets printed right before the command with the lengthy output.   An example:               echo "Very important information. MUST BE VISIBLE!"          # This gives me about 10,000 lines of output pretty fast!     # This output should be shrinked down to the most recent 10     tar -cvf "Bckup.tar" "folder to backup/"          # More code      I hope this clears it up. **EDIT:** The problem with `multitail` is that it takes up the entire screen. So if I had more than just one output (which I have. Multiple commands with important information are run before this. And I need to use it multiple times). Something like running this in screen with just 10 lines to display would be perfect. (I know that does not work). You could imagine that like there is some output from other commands. Then I call the command with the lengthy output. This output stays in a screen that only can display something like 10 lines. After the command is finished more output goes to the console and this should be right beneth it like normal output.               Output     Important Information     Other commands output     ----------------------------------------     some lines for the tar command                              ----------------------------------------     More output     ....     ....      _(Just without the lines)_


Exception handling when using tail -f to monitor a log

I have a main script calling the script to do the monitoring. I am trying to catch the exception that the log is missing or not accessible anymore. `tail -f` is used instead of `-F` since the logs are named with the current date. `trap` may be working but I am not sure what signal `tail -f` would return if the log being monitored is no longer there. Otherwise, should I just do a loop checking in the main script checking for `[ -r $Log]`?


Truncated result returned by JOIN

I'm using join command under linux, but the results vary between different machines. I have two simple files:               cat 1.txt       a aaa,0.2     b bbb,0.3     c ccc,0.5          cat 2.txt     a aaa,0.2     b bbb,0.3     c ccc,0.6      I'm running the following command               join -a 1 -1 1 -2 1 -t "," -o 1.1' '1.2' '2.2 <(cat 1.txt| sort -t ",") <(cat 2.txt| sort -t ",")       Result on machine 1:               ,0.2a,0.2     ,0.3b,0.3     ,0.6c,0.5          join --version     join (GNU coreutils) 8.13          locale     LANG=en_US.UTF-8     LANGUAGE=en_US.UTF-8     LC_CTYPE="en_US.UTF-8"     LC_NUMERIC="en_US.UTF-8"     LC_TIME="en_US.UTF-8"     LC_COLLATE="en_US.UTF-8"     LC_MONETARY="en_US.UTF-8"     LC_MESSAGES="en_US.UTF-8"     LC_PAPER="en_US.UTF-8"     LC_NAME="en_US.UTF-8"     LC_ADDRESS="en_US.UTF-8"     LC_TELEPHONE="en_US.UTF-8"     LC_MEASUREMENT="en_US.UTF-8"     LC_IDENTIFICATION="en_US.UTF-8"     LC_ALL=en_US.UTF-8      Result on machine 2:               a aaa,0.2,0.2     b bbb,0.3,0.3     c ccc,0.5,0.6          join --version     join (GNU coreutils) 5.97          locale     LANG=en_US.UTF-8     LC_CTYPE="en_US.UTF-8"     LC_NUMERIC="en_US.UTF-8"     LC_TIME="en_US.UTF-8"     LC_COLLATE="en_US.UTF-8"     LC_MONETARY="en_US.UTF-8"     LC_MESSAGES="en_US.UTF-8"     LC_PAPER="en_US.UTF-8"     LC_NAME="en_US.UTF-8"     LC_ADDRESS="en_US.UTF-8"     LC_TELEPHONE="en_US.UTF-8"     LC_MEASUREMENT="en_US.UTF-8"     LC_IDENTIFICATION="en_US.UTF-8"     LC_ALL=      Clearly, the result on the first machine is wrong. It's been truncated. I've tried to use different locale settings but had no success.


how to change a complete line with sed c option

The sed command below is supposed to change the country for Sergio Oliva to Cuba from USA, but as you can see in the output that it's still USA. The book I'm using uses this example to illustrate using the `c` option to change a complete line. Can you explain why this example is not working as intended. command `sed '/\<Oliva\>/ c \ Sergio Oliva Cuba 1967 1968 1969' mrolympia.dat` output               Larry Scott USA 1965 1966      Sergio Oliva USA 1967 1968 1969      Arnold Schwarzenegger Osterreich 1970 1971 1972 1973 1974 1975      Franco Columu Argentinien 1976 1981      Chris Dickerson USA 1982      Samir Bannout Libanon 1984      Lee Haney USA 1984 1985 1986 1987 1988 1989 1990 1991      Dorian Yates Grossbritannien 1992 1993 1994 1995 1996 1997      Ronnie Coleman USA 1998 1999 2000 2001 2002 2003 2004


Thunderbird: hide tag notification in the message header

When message is tagged in Thunderbird, not only has it different color, but the tag also appears in the message header. ![enter image description here](http://i.stack.imgur.com/6QFK5.png) I find this completely useless. I can already see that the message is tagged, I don't need to be reminded twice. The message header is already to big, and now yet another line is wasted. Is it possible to remove the tag notification from the message header? I am looking for a solution that does not require to install some obscure addon. An ideall solution would be for example editing `about:config` or `userContent.css/userChrome.css` I am using Thunderbird (Icedove) 24.6.0 on Debian Wheezy


rsync vs mtime and ctime

I've been using `rsync` for Android to backup my phone to a remote NTFS filesystem on a Linux system for a while. Recently, the HDD containing the NTFS filesystem has started to fail (or throw "I/O Errors") so I took the opportunity to copy all the files onto a new HDD and new NTFS filesystem. In this instance I used the "FastCopy v2.11" tool for Windows. My problem is that when I do an rsync "dry run" I can see that it wants to recopy files which already exist on the remote rsync folder. For example, when I run with "-iv" I get this kind of output: Which, as I understand it means that rsync wants to copy this file to the remote rsync because of a timestamp difference. The strange thing is that if I use "Astro" for Android to look at the local file properties, I can see that the file's size, modified time, and MD5 checksum are exactly the same as that of the remote file (using `ls -l` to check the modified time). Given that I recently copied the remote rsync files from an old NTFS filesystem, the remote file's ctime is different (using `ls -lc`). Does `rsync` look at the remote ctime, and if so is there any way I can use `rsync`, or `ntfs-3g` to get around this problem?


LVM + LUKS + SSD + Gentoo -- making it all work together

I'm finding a lot of conflicting information out there, and as of yet haven't found anyone trying to pull together all of the components that I'm trying to do, so I'm hoping someone who understands SSD, encrypted LVMs and so on can stop by and help out. Basically, my system is a laptop with:   * /dev/sda: 32 GB SSD   * /dev/sdb: 256 GB SSD   * /dev/sdc: 1000 GB HD Generally my Linux installs consist of three partitions:   * ~50 mb /boot   * large /home   * ~30 gb "everything else" So effectively I'd like   * `/dev/sda1 -> /boot`   * `/dev/sda2 -> /`   * `/dev/sdb1 -> /home`   * `/dev/sdc1 -> /swap`   * `/dev/sdc2 -> /mnt/storage` The catch is I'd like to encrypt all of this (except for `/boot` and `/mnt/storage` which can stay unencrypted). I've read that when encrypting SSDs there can be issues with things like TRIM, and that ideally I'd want to use EXT4 with some particular options set, and that I must be very careful with partition alignment, and some just claim that encrypted LVMs really don't play well with SSDs and I should just use EncFS or eCryptfs (although people seem unclear and/or polarized on whether these should be used to encrypt "mount-at-boot" partitions like / and /home). Is there any canonical information on this?


make networkmanager not prompt for password after failed connection?

While it's only an intermittent annoyance, occasionally I'm on a flaky wifi network, and each time networkmanager reconnects, it asks for the wifi password. This wouldn't be a huge issue, but the password is not pre-filled- in, so I have to go lookup up the password elsewhere, then enter it. If I hit cancel, it won't try to reconnect, and if I just hit "ok", then it will store the blank password over what it already has! Is there any way to mark a connection as "I'm sure this is the right password!" so it will just try again (perhaps with exponential backoff) if the connection fails? Thanks!!


Using archlinux on vmware error 8000

I have been playing around with Linux a bit and I wanted to try using Arch Linux so I downlaoded the `.iso` and I set up vmware player saying that it was another Linux 2.6x kernel. As soon as I launched it, I got this error `EDD: Error 8000 reading sector 269058` does anyone know what is wrong and how I can fix this?   **My System Info:**   * OS:Windows 7 Home Premium<   * Processor: Intel(R) Core(TM) i5-2410m CPU @ 2.30GHz 2.30 GHz   * System Type: 64-bit Operating System   * Virtualization: Enabled _Feel free to ask anymore info if it helps_


NFS to clients with different uid:s than on the server, where the client uid:s shall not show up in the server

I have a problem with a embedded Linux device that is mounting its root filesystem over NFS. But for different reason the embedded device is a single user device running as root (and later it will not even have a network connection). On the pc I would like that my normal user own all the files, so I can modify them with out being root (or using sudo) all the time. But right now as soon as the client create a new file on the nfs mount the user id is set to root and I get a problem on the server. So my question is if there is a flag I can set in the /etc/export solves this problem? So that when the client creates a file, the uid on the server is not root but that of the user (maybe 500 or 1000). This is my current /etc/export on the server               /opt/eldk/armVFP  *(rw,sync,no_root_squash)


Bash Script Detects Key Down At Boot

I want to customize my run level scripts based upon a key combo pressed at boot. How to I test for key presses as early as possible from boot? Do I need to do something special, like for example: lock the computer at run level 1 so I can prepare run level 5 scripts? How do I go about this?


List all software installed from particular component (non-free, contrib)

Is there a way to list all `non-free` and `contrib` software installed in Debian via `apt`? `/etc/apt/sources.list` is as follows               deb http://ftp.us.debian.org/debian/ wheezy main non-free contrib     deb-src http://ftp.us.debian.org/debian/ wheezy main non-free contrib          deb http://security.debian.org/ wheezy/updates main non-free contrib     deb-src http://security.debian.org/ wheezy/updates main non-free contrib          # wheezy-updates, previously known as 'volatile'     deb http://ftp.us.debian.org/debian/ wheezy-updates main     deb-src http://ftp.us.debian.org/debian/ wheezy-updates main      I added `non-free` and `contrib` years ago because I needed a non-free driver for my video-card, which has now been replaced with a new one that doesn't require a non-free driver. I'd like to get rid of the non-free stuff, but I'm afraid I might have installed other non-free software over the years which I cannot afford to uninstall.


Xubuntu Mouse sensitivity way too high

I am pretty new to Linux, this is my first real time using Xubuntu (used Ubuntu before, and raspbian on my RPI), and I have a mouse that is way too sensitive. If I move my mouse 1cm it's on the other side of the screen, that sensitive. I have turned all mouse sliders as far down as I can, and I don't even notice anything becoming less sensitive. For some reason the mouse settings menu also displays that I have two Razer Deathadder 2013's plugged in, even though I only have one. Sliders are down on both, tried some things with `xset m 5 1` but it only gets worse. How do I get a human level of mouse sensitivity?


Improve execution time for recursive md5sum check?

This recursive md5sum check for 40000 items of 11.8 GB takes 2 minutes:               ret=$(find "${target}"/ -name ".md5sum" -size +0 | while read aFile; do cd "${aFile%/*}"; md5sum -c ".md5sum"; done | grep -v "OK";)      Can any obvious speed improvements be made, that I have not noticed?


Multi-Distro boot DVD with SystemRescueCD 2.8.0 fails to boot the SRCD portion

I'm trying to create a multi-distro mutli-boot dvd image containing (amongst others) the SystemRescueCD iso. I'm using GRUB as the boot loader and I've managed to get most of the other ISOs booting fine (testing in VirtualBox before I burn to disc). But the RescueCD iso fails to boot fully and just drops me out to a mini console. It starts to load the kernel image and initram.igz okay, then after it prompts for the keymap it attempts to locate the `sysrcd.dat` file (which contains the file system image) by trying to mount `/dev/sr0` and `/dev/sd0` but this is the wrong place. I need it to mount `/dev/scd0` \-- the .dat file is located in `/distro/systemrescuecd` on the CD image. Does anyone please know what file I need to edit to correct the mount paths and/or what command(s) I can append to the kernel load string in GRUB to point it at the right folder/mount point? Thanks


Can I use an SSH key generated on Linux from Putty?

I have been asked to generate a pair of SSH keys so that I can access a remote server for development. To generate the keys, I used the `ssh-keygen` tool on our CentOS box, which I successfully did. Now I have 2 files: `~/.ssh/id_dsa`, `~/.ssh/id_dsa.pub`. I will give the admin the `.pub` file so that he can place it on the remote server. However, I want to use my own personal windows PC (using PuTTY) to access this remote server. So my question is this: even though I generated the SSH keys on a Linux server (that has no relation whatsoever to the remote server and my pc), can I still access the remote server with my Windows PC using the private key that was created? The reason I'm a little unsure is because while I was creating the keys, it said "The key fingerprint is: xxxxxxxx" which made me think that since the "fingerprint" is CentOS's fingerprint, it won't let me use the private key on my Windows machine. Am I right that it won't work, or as long as I have the private key it doesn't matter what machine I use to log in to the remote server?


How big is the pipe buffer?

As a comment in I'm confused as to why "| true" in a makefile has the same effect as "|| true" user cjm wrote: > Another reason to avoid | true is that if the command produced enough output > to fill up the pipe buffer, it would block waiting for true to read it. Do we have some way of finding out what the size of the pipe buffer is?


Linux fails to mount Android device in USB MSC mode

I was referred here from android.stackexchange.com. I wish to mount my Sony Xperia ST21i (Android 4.0.4) under Linux (Debian) via USB. However, I get this error:               # mount /dev/sdb /mnt     mount: no medium found on /dev/sdb      For more context see http://android.stackexchange.com/questions/52932/linux- fails-to-mount-android-device-in-usb-msc-mode. Is this more an Android or a Linux issue?


How to use adduser command with a bash script

I'm trying to find the way to use adduser this way:               adduser $username $password      or something like this too:               adduser -u $username -p $password      I know I could use useradd and so, but right now I want to use adduser. Thanks!


How can I execute a shell script that exists in a longish path with a single command without first cd'ing to the directory?

In Linux I always `cd` to a longish path and then run the script:               cd /scratch/someDir/someOthernestedDir/     ./shellscriptName.sh       How can I avoid achieve typing this longish path and then executing the command with a single step? Some thing like the below from any path should do what I want:               executeMyCommand      P.S: I am using C-shell.               [subhrcho@slc04lyo bin]$ echo $0     csh


Can I see in history output from which directory I had actually issued a command?

`CTRL+R` allows me to reverse search through the command history which is great but can I also find out from which directory that command was run? I am using C-shell in Linux.


Menu not shown in GTK applications

The menu bar is hidden for all my GTK applications (LXTerminal, Leafpad, Thunar...). How can I show it? I have the issue with OpenBox, and with Gnome- shell.


Awesome not showing up in GDM?

I recently installed debian with xfce. Once installed, I upgraded to Debian testing and installed awesome, then rebooted. When I click the list of session options at GDM's login screen, the only options are xfce and "default" (xfce). Awesome has a desktop file in /usr/share/xsessions, but GDM can't find it for whatever reason.


Can not off output by xrandr

I have 2 monitors, one connect by VGA, one connect by HDMI. When I unplug VGA, the status is still "connected". Xrandr cannot off output VGA. Do you resolve this problem?


VMap Fedora 12 equivalent

I'd like to see how Fedora manages the Virtual Memory. I was used to VMap on Windows, however I can't find anything to download on Fedora 12 that could fit my needs. I can't find something like `memstat` for example. Do you happen to know which package I could use? Is there a software I can download on the internet maybe?


How to convert a video file from mp4 to mp2

I have been searching a lot and I can't find a solution. How do you convert a video from MPEG-4 to MPEG-2? That shouldn't be too hard. But the `avconv` man pages don't give enough info to do this right. If I just do               avconv -i input.mp4 output.mpeg      it does create an MPEG-2 file, but it's unwatchable - the image quality is horrible. The size of the file on disk also is about a third of the size of the input file.   So obviously I need to set some parameter to some value that preserves the quality, and that's where the troubles start. I began with trying the `-b` parameter, like so               avconv -i input.mp4 -b 384k output.mpeg      but that didn't really improve things. It was possible to decrease the quality even further, by using a lower number, but higher than 384k always gave me an error. So `-b` is not the right parameter to use, obviously. I tried many other things, and I could post everything here, and the results, what went wrong, which pages I read trying to find the solutions, but that would be a long and boring list of parameters and error messages and frustrations, so I will spare you these. By now I just want to know what I should use to get a decent picture.


printing to "One Single CUPS Server" can not find queues if 'ServerName' is a CNAME

Running "OpenSuSE 11.4" with "cups-client-1.4.6-6.1.i586" installed, I try to use one single CUPS-server to do all my printing jobs / to manage my queues. In **YaST -> printer** I've selected > [x] Do All Printing Directly via One Single CUPS Server and next to the field "name or IP Address" I enter `print` (as a CNAME for our print server), but no queue comes up in main window. If I change the ServerName to print server's hostname `dom-print`, everything works fine and queues are appearing properly. * * * Additional info: nslookup tells the following about `print` ( `x`/`y`/`z` -> yeah, it's all top secret, you know.. ): > Server: 10.0.x.y   >  Address: 10.0.x.y#53   >   >  print.dom.tld canonical name = dom-print.dom.tld.   >  Name: dom-print.dom.tld   >  Address: 10.0.x.z   >


Very basic Linux for educational purposes

I want to play with Linux to better understand how it works. Thus, I am looking for a very basic and small Linux to play with. I tried small Linux distributions (which copy themselves to RAM), but they have their own structure (like Live CD). Instead, I wish to have a minimal but standard Linux structure. I installed minimal version of Debian on USB and setup GRUB to separate this experiment from my main computer. However, Debian (even minimal) is far more advanced than what I need. What is the best method to copy a very minimal version of Linux on USB and boot with GRUB? Each distribution has its own features and options, but I prefer to be closer to the standard Linux (Linux kernel) without customization of a distribution.


chroot jail that can access the filesystem

chroot jails seem to be simply a different world, with no interaction with the actual filesystem. Thus, the entire environment has to be replicated inside the chroot, which would mean making a full installation of a system inside it. However, is there some way to make the chroot jail have read access to the main filesystem? Additionally, I would also like to have the ability of the chroot preferring its own files. For example, if `/usr/bin/wget` exists within it, then that should be preferred over the system's `/usr/bin/wget`. (I'm actually looking for something that behaves like Sandboxie.) Is the above feasible?


tar files from another directory without copying them

This should be very simple for experts in here. I have a Linux account with user disk quota of only 6GB. There is some data- folder in `/opt` with about 3GB of data with when compressed comes up 1GB. There are some symbolic links within `data-folder`. Usually for taking a work backup I used to do the following.               cp -rvfL /opt/data-folder ~/     cd ~/     tar -zcvf data-folder.tar.gz data-folder     rm -rvf data-folder      Now I have already consumed 2.5GB in my user disk quota, I have just enough space to copy files to my home, but not to `tar` it again. Is there any way to tar and copy the folder with in a single command, say by using a pipe. P.S. I cannot tar in `/opt` because I have only read access to `/opt`.


Bash globbing of multi-part argument

Below are some examples of a `find` command I'm trying to run. I'm looking for different ways that I might be able to use globbing to generate (as an example) a find command with predicates joined together. Doesn't work because `find` needs a -name before each one and a -o between each.               find . -name \*.{sh,pl,sql}     #find . -name *.sh *.pl *.sql      Doesn't work because of trailing `-o`. Could pull a guaranteed to fail argument there, but not ideal. Also, my shortcut is now longer than my output.               find . `for X in {sh,pl,sql}; do echo -name \\\*.$X -o ;done`     #find . -name \*.sh -o -name \*.pl -o -name \*.sql -o      Fails because they're grouped as one argument (`find: unknown predicate '-name *.sh'`). Also, still exhibiting a lack of joining with -o.               find . -name\ \*.{sh,pl,sql}      Works, but doesn't involve globbing (re: non-answer):               find .  -regex '.*\(sh\|pl\|sql\)'


Corosync & Pacemaker IPTables Rules

When using Corosync with two rings via multi-cast addresses 226.94.1.1 (Port 5405) & 226.94.1.2 (Port 5406) what iptables rules are required to allow two nodes to communicate optimally without giving any undue access and making the rules too lenient? I currently have:               iptables -A INPUT -p udp -m multiport --dports 5404,5405,5406 -j ACCEPT      Will that allow all the communication a Corosync/Pacemaker setup requires for both rings? I have heard arguments that something like:               iptables -I INPUT 1 -m pkttype --pkt-type multicast -j ACCEPT      is required. However I cannot seem to replicate a situation where this assists if the first rule I listed above is already in place. The Red Hat documentation would seem to support the first approach. There is some IBM documentation espousing the second but is it just a case of a rule that is far too lenient when the first would do the job equally well whilst leaving no unnecessary ports open? I'm leaning more towards the first rule being sufficient but wanted to get some more opinions on the matter.


Newly compiled kernel not booting up (vanilla kernel 3.12.14)

I downloaded, configured and installed kernel downloaded from kernel.org. While booting up this new kernel for the first time, this error screen shows which is pointing towards a missing or wrongly mentioned root device probably. But I didn't mention it explicitly, installation scripts did it. So if this is the error, can someone please tell how to fix? Or if the cause may be something else, please tell what it can be? NOTE: I am using VirtualBox for all this process. Don't want my laptop to become unbootable for this experiment.![enter image description here](http://i.stack.imgur.com/pqPMi.jpg) NOTES:   1. Grub entries are fine, as it is same for another kernel running on this system and other kernel is working fine.   2. DEVTMPS is just creating a warning, I think programmers care about errors only, not warnings, so hopefully this is not the major cause as well.   3. TSC is giving an error, I investigated, it is probably a clock mode, nothing very related to root device.   4. Again UUID is not an issue, because other working kernel grub entry is using same ID and booting up correctly.


Asrock H61M-ITX sensors

I just installed a small home server with Ubuntu 12.04.01 but I have a problem with the fan that run on full all the time. The server specs are:   Linkworld Mini ITX 920-01   Asrock H61M-ITX mITX USB3 SATA6   i3 2120 3.3Ghz 3MB Output from `sensors` shows               $ sensors     coretemp-isa-0000     Adapter: ISA adapter     Physical id 0:  +41.0°C  (high = +82.0°C, crit = +102.0°C)     Core 0:         +41.0°C  (high = +82.0°C, crit = +102.0°C)     Core 1:         +41.0°C  (high = +82.0°C, crit = +102.0°C)          nct6776-isa-0290     Adapter: ISA adapter     Vcore:         +0.97 V  (min =  +0.00 V, max =  +1.74 V)     in1:           +0.22 V  (min =  +0.00 V, max =  +0.00 V)  ALARM     AVCC:          +3.44 V  (min =  +2.98 V, max =  +3.63 V)     +3.3V:         +3.42 V  (min =  +2.98 V, max =  +3.63 V)     in4:           +0.55 V  (min =  +0.00 V, max =  +0.00 V)  ALARM     in5:           +1.74 V  (min =  +0.00 V, max =  +0.00 V)  ALARM     3VSB:          +3.42 V  (min =  +2.98 V, max =  +3.63 V)     Vbat:          +3.49 V  (min =  +2.70 V, max =  +3.30 V)  ALARM     fan1:            0 RPM  (min =    0 RPM)  ALARM     fan2:         2673 RPM  (min =    0 RPM)  ALARM     fan3:            0 RPM  (min =    0 RPM)  ALARM     fan4:            0 RPM  (min =    0 RPM)  ALARM     fan5:            0 RPM  (min =    0 RPM)  ALARM     SYSTIN:        +39.0°C  (high =  +0.0°C, hyst =  +0.0°C)  ALARM  sensor = thermistor     CPUTIN:       +127.5°C  (high = +80.0°C, hyst = +75.0°C)  ALARM  sensor = thermistor     AUXTIN:        -35.5°C  (high = +80.0°C, hyst = +75.0°C)  sensor = thermistor     PECI Agent 0:  +40.5°C       cpu0_vid:     +0.000 V     intrusion0:   ALARM     intrusion1:   ALARM      Anyone with same motherboard that knows if its possible to config so Ubuntu can control my fans according to the temperature.