title: Gnome 3 UI menus are duplicated

text: Just upgraded from Debian "Squeezy" to "Wheezy". When I logged in the menus were fancier as I expected with _Gnome Display Manager 3_. **However the issue that occurred was the duplicate UI-elements**. The UI- elements such as "Applications", "Places", the Clock and so forth had two instances each. **What I've tried so far:**   * Though it had something to do with me having a two monitor setup so I ran `nvidia-settings` and reconfigured `/etc/X11/xorg.conf`. However as I rebooted the UI elements had increased and now there were three instances. I think this number increases with each reboot...   * Tried to manually rewrite the `xorg.conf` by saving in my home folder and then pushing it into `/etc/X11/xorg.conf   * Renaming `~/.gnome2` to `~/gnome2_backup` Why do I get the duplicate menus and is there a way to remove them/make them not appear after each reboot? **My xorg.conf file:**               # nvidia-settings: X configuration file generated by nvidia-settings     # nvidia-settings:  version 304.88  (pbuilder@cake)  Wed Apr  3 08:58:25 UTC 2013          Section "ServerLayout"         Identifier     "Layout0"         Screen      0  "Screen0" 0 0         Screen      1  "Screen1" 1920 0         InputDevice    "Keyboard0" "CoreKeyboard"         InputDevice    "Mouse0" "CorePointer"         Option         "Xinerama" "1"     EndSection          Section "Files"     EndSection          Section "InputDevice"         # generated from default         Identifier     "Mouse0"         Driver         "mouse"         Option         "Protocol" "auto"         Option         "Device" "/dev/psaux"         Option         "Emulate3Buttons" "no"         Option         "ZAxisMapping" "4 5"     EndSection          Section "InputDevice"         # generated from default         Identifier     "Keyboard0"         Driver         "kbd"     EndSection          Section "Monitor"         # HorizSync source: edid, VertRefresh source: edid         Identifier     "Monitor0"         VendorName     "Unknown"         ModelName      "DELL S2740L"         HorizSync       30.0 - 83.0         VertRefresh     56.0 - 76.0         Option         "DPMS"     EndSection          Section "Monitor"         # HorizSync source: edid, VertRefresh source: edid         Identifier     "Monitor1"         VendorName     "Unknown"         ModelName      "Samsung SMBX2440"         HorizSync       30.0 - 81.0         VertRefresh     56.0 - 75.0         Option         "DPMS"     EndSection          Section "Device"         Identifier     "Device0"         Driver         "nvidia"         VendorName     "NVIDIA Corporation"         BoardName      "GeForce GT 430"         BusID          "PCI:1:0:0"         Screen          0     EndSection          Section "Device"         Identifier     "Device1"         Driver         "nvidia"         VendorName     "NVIDIA Corporation"         BoardName      "GeForce GT 430"         BusID          "PCI:1:0:0"         Screen          1     EndSection          Section "Screen"         Identifier     "Screen0"         Device         "Device0"         Monitor        "Monitor0"         DefaultDepth    24         Option         "Stereo" "0"         Option         "metamodes" "DFP: nvidia-auto-select +0+0"         SubSection     "Display"             Depth       24         EndSubSection     EndSection          Section "Screen"         Identifier     "Screen1"         Device         "Device1"         Monitor        "Monitor1"         DefaultDepth    24         Option         "Stereo" "0"         Option         "nvidiaXineramaInfoOrder" "CRT-1"         Option         "metamodes" "CRT: nvidia-auto-select +0+0"         SubSection     "Display"             Depth       24         EndSubSection     EndSection          Section "Extensions"         Option         "Composite" "Disable"     EndSection


title: Expand cracklib-check's dictionary

text: I've started using `cracklib-check` to ensure users' passwords are suitably strong, rather than relying on my own algorithms. However, since my project is Pokémon-themed, I get a lot of passwords like "pokemon", "pikachu123", etc. Is it possible to expand `cracklib-check`'s dictionary to include these and other thematic words and names?


title: using awk for subsetting fastq file based on length of sequence

text: I have a fastq file. I will explain what it is. It is something like this               @SRR1024120.7 DBRHHJN1:259:D0PM7ACXX:1:1101:1386:1189 length=100     GATACAGGATGCCTGGGTCTAGGCTGTGTGACCTTGGGCCAGTTCCTCTC     +SRR1024120.7 DBRHHJN1:259:D0PM7ACXX:1:1101:1386:1189 length=100     DDDFFDDBGFEHEHGIGC9F>HG9EH8?DF4?:DF<?3:D?DHIGGDDFH     @SRR1024120.25 DBRHHJN1:259:D0PM7ACXX:1:1101:1752:1149 length=100     CTGCTGCTCATGCTCAT     +SRR1024120.25 DBRHHJN1:259:D0PM7ACXX:1:1101:1752:1149 length=100     BDDDDD<<CC:C+AFFE     @SRR1024120.42 DBRHHJN1:259:D0PM7ACXX:1:1101:2482:1096 length=100     AGCGTGTGCCACCCTACGCCGGC     +SRR1024120.42 DBRHHJN1:259:D0PM7ACXX:1:1101:2482:1096 length=100     DD>DAA@AA@@?2C8AB)?@:DD     @SRR1024120.1 DBRHHJN1:259:D0PM7ACXX:1:1101:1200:1120 length=100     AGACAGAAGGGGAGTACAGCTCTCTGGAACATGAGAGTGCAAGGGGTTGAGTGTTT     +SRR1024120.1 DBRHHJN1:259:D0PM7ACXX:1:1101:1200:1120 length=100     DDDFFFCFGEHI@CGFADFGCCFFGHFGCFFFHGGDGHIFHDFGGI<BF=DHIHHH      Now 4 lines correspond to 1 read so               @SRR1024120.7 DBRHHJN1:259:D0PM7ACXX:1:1101:1386:1189 length=100     GATACAGGATGCCTGGGTCTAGGCTGTGTGACCTTGGGCCAGTTCCTCTC     +SRR1024120.7 DBRHHJN1:259:D0PM7ACXX:1:1101:1386:1189 length=100     DDDFFDDBGFEHEHGIGC9F>HG9EH8?DF4?:DF<?3:D?DHIGGDDFH      corresponds to 1 read which is **GATACAGGATGCCTGGGTCTAGGCTGTGTGACCTTGGGCCAGTTCCTCTC** I showed you the fastq file above. What i want to do is I want to extract only those reads in which length of the read seq is <= 25, So my output should be               @SRR1024120.25 DBRHHJN1:259:D0PM7ACXX:1:1101:1752:1149 length=100     CTGCTGCTCATGCTCAT     +SRR1024120.25 DBRHHJN1:259:D0PM7ACXX:1:1101:1752:1149 length=100     BDDDDD<<CC:C+AFFE     @SRR1024120.42 DBRHHJN1:259:D0PM7ACXX:1:1101:2482:1096 length=100     AGCGTGTGCCACCCTACGCCGGC     +SRR1024120.42 DBRHHJN1:259:D0PM7ACXX:1:1101:2482:1096 length=100     DD>DAA@AA@@?2C8AB)?@:DD      I want to use awk for this purpose. I tried something like this               awk 'NR % 2 == 0 {if(length($1) <= 25) print $0}; NR % 2 == 1' test.fastq      BUT this prints something like this               @SRR1024120.7 DBRHHJN1:259:D0PM7ACXX:1:1101:1386:1189 length=100     +SRR1024120.7 DBRHHJN1:259:D0PM7ACXX:1:1101:1386:1189 length=100     @SRR1024120.25 DBRHHJN1:259:D0PM7ACXX:1:1101:1752:1149 length=100     CTGCTGCTCATGCTCAT     +SRR1024120.25 DBRHHJN1:259:D0PM7ACXX:1:1101:1752:1149 length=100     BDDDDD<<CC:C+AFFE     @SRR1024120.42 DBRHHJN1:259:D0PM7ACXX:1:1101:2482:1096 length=100     AGCGTGTGCCACCCTACGCCGGC     +SRR1024120.42 DBRHHJN1:259:D0PM7ACXX:1:1101:2482:1096 length=100     DD>DAA@AA@@?2C8AB)?@:DD     @SRR1024120.1 DBRHHJN1:259:D0PM7ACXX:1:1101:1200:1120 length=100     +SRR1024120.1 DBRHHJN1:259:D0PM7ACXX:1:1101:1200:1120 length=100      Clearly I don't want               @SRR1024120.7 DBRHHJN1:259:D0PM7ACXX:1:1101:1386:1189 length=100     +SRR1024120.7 DBRHHJN1:259:D0PM7ACXX:1:1101:1386:1189 length=100     @SRR1024120.1 DBRHHJN1:259:D0PM7ACXX:1:1101:1200:1120 length=100     +SRR1024120.1 DBRHHJN1:259:D0PM7ACXX:1:1101:1200:1120 length=100      in my output. Any help would be appreciated Thanks


title: Evolution keeps disappearing?

text: I am running Debian 6.0.3 (squeeze) and Evolution 2.30.3. I keep noticing that evolution disappears (gmail account). It never throws up a crash dialog. What is going on? How can I tell what is happening?


title: Recording audio output

text: I've been following these instructions for recording the output of a program I wrote (that uses rtaudio to synthesize music) http://jordilin.wordpress.com/2006/07/28/howto-recording-audio-from-the- command-line/ However, when I try to use arecord I just record the microphone, not the output of my program. Using arecord -l to list capture devices I see :               **** List of CAPTURE Hardware Devices ****     card 0: Intel [HDA Intel], device 0: ALC269VB Analog [ALC269VB Analog]       Subdevices: 1/1       Subdevice #0: subdevice #0      Does this look like it's giving me the option to record the output of another program? And if so, how do I do that?


title: UFW Limit does not appear to work

text: I have my ssh port changed to XXX. Then I did               ufw limit XXX/tcp      However, when I try to login, after 5/6 failed attempts I get thrown back to prompt, but I can try again. Is that supposed to be the way it works?


title: TFTP configuration problems

text: I can not get TFTP to work properly on my system. I have set `/etc/default/tftpd-hpa` to `/srv/tftp/` which I have set to permissions `777` like all the contents as well (and `/srv/` too) however, whenever I do a `get test` I get a timeout, (and I'm connected on my localhost to 127.0.0.1). I don't think TFTP logs somewhere, does it? Any assistance on how to debug this would be greatly appreciated! **edit:** This is on a (K)Ubuntu system and `/srv` and its contents were owned by `root:root`, I changed this now to `nobody:nogroup` but I still get the same timeout:               $ ls -la     total 12     drwxrwxrwx 3 nobody nogroup 4096 Nov  5 08:47 .     drwxrwxrwx 3 nobody nogroup 4096 Nov  5  2013 ..     drwxrwxrwx 2 nobody nogroup 4096 Nov  5  2013 artifacts     -rwxrwxrwx 1 nobody nogroup    0 Nov  5 08:48 test     -rw-r--r-- 1 reg    reg        0 Nov  5 08:47 vx.bin     reg@ubuntu:/srv/tftp$tftp 127.0.0.1     tftp> get test     Transfer timed out.      **edit2** After realizing that seemingly there'ss no instance of `tftp` running, I tried to launch it with `#tftp` and then Ubuntu told me, that I should do `apt-get install cobbler` to install cobbler, that's what I did and then I tried again and got the following:               # tftpd     Traceback (most recent call last):       File "/usr/sbin/tftpd", line 51, in <module>         import tornado.ioloop as ioloop     ImportError: No module named tornado.ioloop     root@ubuntu:/srv#       What does this mean, I'm wondering, any clues?


title: Triggering an action when a specific volume is connected

text: I have a USB key that contains my keepass2 password database and I'd like to perform some actions when it is plugged into my computer, namely:   * Auto-mount it to some specific location   * When the mounting is done properly, launching keepass2 on the password database file Simple tasks I guess, but I can't find how to do that. I'm using Ubuntu 12.10, and it auto-mounts the device as a "media usb-key" and tries to open the images on it (even though there are none). What is the best way to do that and to disable the ubuntu auto-mounting (so it doesn't conflict) ?


title: What are the parameters in sudoers file

text: The sudoers file has the following line:               root ALL=(ALL) ALL      I have read that the first field is the user. Then first `ALL` is all terminals, and `(ALL)` means as any user, and last `ALL` means any commands.   1. What happens when we don't have this line in sudoers file? Then root couldn't do anything?   2. `username ALL= /bin/passwd` like this, whether it could be interpreted as "username" can run passwd from ALL terminals   3. What values can be given instead of first `ALL`?


title: Why can't I `tail -f /proc/$pid/fd/1`?

text: I wrote a simple script which `echo`-es its PID:               #/bin/bash          while true; do         echo $$;         sleep 0.5;     done      I'm running said script (it says `3844` over and over) in one terminal and trying to `tail` the file descriptor in another one:               $ tail -f /proc/3844/fd/1      It doesn't print anything to the screen and hangs until `^c`. Why? Also, all of the STD file descriptors (IN/OUT/ERR) link to the same pts:               $ ls -l /proc/3844/fd/     total 0     lrwx------ 1 mg mg 64 sie 29 13:42 0 -> /dev/pts/14     lrwx------ 1 mg mg 64 sie 29 13:42 1 -> /dev/pts/14     lrwx------ 1 mg mg 64 sie 29 13:42 2 -> /dev/pts/14     lr-x------ 1 mg mg 64 sie 29 13:42 254 -> /home/mg/test.sh     lrwx------ 1 mg mg 64 sie 29 13:42 255 -> /dev/pts/14      Is this normal? Running Ubuntu GNOME 14.04. Also, if you think this question belongs to SO or SU instead of UL, do tell.


title: How to add repository from shell in Debian?

text: In Ubuntu one can add a repository to `apt-get` via the following command -               sudo add-apt-repository ppa:yannubuntu/boot-repair      As Ubuntu is based on Debian code base, I was expecting that the same would work in Debian too, but it doesn't.   * What is the reason for this?   * Is there some other shell command I can use to achieve the same? _Note: I already know I can edit`/etc/apt-get/sources.list`, but I want to achieve this from shell. I also want to know why the same command won't work when the code base is the same._


title: Creating alias to domain name with /etc/hosts

text: I have a domain setup to point to my LAN's external IP using dynamic DNS, because my external IP address changes frequently. However, I want to create an alias to this host, so I can access it with `home`. So I appended the following to my `/etc/hosts`: `domain.com home` However, it doesn’t seem to like the domain name. If I change it to an IP: `0.0.0.0 home` … then it works, but of course this defeats the purpose of dynamic DNS! Is this possible?


title: What's the difference between pasting with middle mouse button, and Shift+Ins?

text: My middle mouse button pastes text I've highlighted. Shift+Ins also pastes text, but sometimes it differs in what it pastes to what is pasted by clicking the middle mouse button. What is the difference between pasting with the middle mouse button and Shift+Ins? Is Shift+Ins accessing the same buffer as Ctrl+V? (I'm using Linux Mint distribution, if that makes any difference.)


title: What is the difference between "&&" and ";" when chaining commands

text: What is the difference between the following methods of chaining commands?               cmd1; cmd2     cmd1 && cmd2


title: How to specify command line options for XAMPP for Mac?

text: Per the answer to this question: Can I have conditional statements, based on server, in .htaccess file? I want to specify a command-line option when starting up Apache on my Mac. But my Apache is part of XAMPP-- I'm using the XAMPP app, where I click a button and Apache just starts. How can I specify a command line option? (I was hoping clicking that button trigged a script that I could edit, but I'm not able to find anything that looks like a startup script in the XAMPP folder.)


title: How to see which pacman updates are major?

text: I like to keep track of what's on my system and what is getting updated. However, there's a lot of tiny updates, e.g. gedit 3.6.2-1 to 3.6.2-2 that I don't want to think too much about. Is there a simple way to make pacman highlight major updates, e.g. changes to the first or second segments in the version number? (Of course I realise that such a heuristic isn't very useful, but this seems like a problem that someone would have solved already.) Here is an example with a lot of tiny updates:               automake            1.12.5-1      1.12.6-1     0.00 MiB                      bison               2.6.5-1       2.7-1        0.03 MiB                      cdrtools            3.01a09-1     3.01a10-1    0.00 MiB                      cifs-utils          5.7-1         5.8-1        0.00 MiB                      icu                 50.1-2        50.1.1-1     -0.04 MiB                     isl                 0.11-1        0.11.1-1     0.01 MiB                      lib32-libpulse      2.1-1         3.0-1        0.03 MiB                      lib32-sqlite        3.7.14.1-1    3.7.15-1     0.00 MiB                      libpulse            2.1-1         3.0-2        0.16 MiB                      libwbclient         3.6.9-1       3.6.10-1     0.00 MiB                      linux               3.6.9-1       3.6.10-1     0.01 MiB                      ntp                 4.2.6.p5-11   4.2.6.p5-13  -0.05 MiB                     pixman              0.28.0-1      0.28.2-1     0.00 MiB                      pulseaudio          2.1-1         3.0-2        -0.05 MiB                     python2-beaker      1.6.3-2       1.6.4-1      0.03 MiB                      python2-distribute  0.6.30-1      0.6.32-1     0.02 MiB                      python2-mako        0.7.2-2       0.7.3-1      0.00 MiB                      python2-pyparsing   1.5.6-3       1.5.7-1      0.00 MiB                      python2-xdg         0.23-2        0.25-1       0.02 MiB                      samba               3.6.9-1       3.6.10-1     0.02 MiB                      sbc                               1.0-1        0.24 MiB                      smbclient           3.6.9-1       3.6.10-1     0.00 MiB                      sqlite              3.7.14.1-1    3.7.15-1     0.01 MiB                      vlc                 2.0.4-5       2.0.5-1      -1.42 MiB                     wesnoth-data        1.10.5-1      1.10.5-2     98.07 MiB                     xorg-server         1.13.0.902-2  1.13.1-1     0.00 MiB                      xorg-server-common  1.13.0.902-2  1.13.1-1     0.00 MiB         Pulse Audio 2.1 -> 3.0 and a kernel update are hidden in there, and I'd like them to stand out more.


title: Force mysqldump encoding

text: I have two mysql servers, viewed from the same mysql client, right_server is rendering the french characters correctly, wrong_server is not. Encoding is the same :               $ mysql -h right_server -NBe "SHOW VARIABLES LIKE 'character_set_%'"     $ mysql -h wrong_server -NBe "SHOW VARIABLES LIKE 'character_set_%'"      give same results :               character_set_client     utf8     character_set_connection utf8     character_set_database   utf8     character_set_filesystem binary     character_set_results    utf8     character_set_server     utf8     character_set_system     utf8      I use mysqldump to check tables structures are the same :               $ mysqldump -h right_server db MY_TABLE | grep MY_COL     $ mysqldump -h wrong_server db MY_TABLE | grep MY_COL      but one of the comment is not rendered correctly :                 `MY_COL` varchar(7) COLLATE utf8_bin COMMENT 'associé à',       `MY_COL` varchar(7) COLLATE utf8_bin COMMENT 'associ. .',      (result with `mysqldump --default-character-set=UTF8 --no-data` is the same) In `wrong_server` characters seem correctly stored :               [wrong_server]$ mysql -e 'show create table db.MY_TABLE\G'       `MY_COL` varchar(7) COLLATE utf8_bin COMMENT 'associé à',      **How to force mysqldump encoding ?** Note: the only difference I see between servers is               character_sets_dir      /.../mysql.../share/charsets/ in `SHOW VARIABLES LIKE 'character_set_%'` of one server and no utf file defined in this directory.


title: Which are the standard commands available in every Linux based distribution?

text: I would like to know which are the standard commands available in every Linux system. For example if you get a debian/ubuntu/redhat/suse/arch/slackware etc, you will always find there commands like: cd, mkdir, ls, echo, grep, sed, awk, ping etc. I know that some of the mentioned commands are shell-builtin but others are not but they are still always there (based on my knowledge and experience so far). On the other hand commands like gawk, parted, traceroute and other quite famous commands are not installed by default in different Linux distributions. I made different web searches but I haven't found a straight forward answer to this. The purpose is that I would like to create a shell script and it should make some sanity checks if the commands used in the script are available in the system. If not, it should prompt the user to install the needed binaries.


title: Install apache,php and mysql on CentOS VPS

text: I try to install apache,php and mysql server by these commands.               yum install httpd     yum install php     install mysql-server mysql     service httpd start     service mysqld start to start your mysql server      after that,they were install completely,because I can make php file and run it by               php test.php command. now I want to see this page with out ssh and in my browser,I type my VPS ip address in browser but it doesn't response to me. test.php file is in var/www folder with 777 permission.


title: Installing Fedora from USB key

text: How do I load a Fedora DVD iso onto USB so I can install it from there. I've tried `dd` as in here: Fedora instructions but for some reason this didn't work. Here's what I've tried:               sudo dd if=Fedora-15-x86_64-netinst.iso of=/dev/sdb1      and               sudo dd if=Fedora-15-x86_64-netinst.iso of=/dev/sdb      The USB key contains DVD information - I've looked it up, but the laptop simply skips the USB key and boots from harddrive. I've obviously configured BIOS to boot from USB first and I also tried selecting USB key from `F12` menu. What am I doing wrong? Has anyone tried installing from USB key using `dd` before?


title: Install bz2 lib from source

text: I want to install bz2 lib from ssh to my CentOS server. I get it from here and use               tar -xvf      command to extract it,but it does't have configure file to compile and install it. I need this lib to install apt-get on CentOS and it needs this lib. How can I install it from ssh? (sorry if my question is so simple,I start linux so late I think)


title: Why does 'make' complain about a missing rule when I try to build a program from source?

text: I am a Linux novice, and I am attempting to compile scientific software called DL_POLY_Classic. I downloaded the zip file **dl_class_1.6.tar.gz** and unzipped it using the command `tar xvzf dl_class_1.6.tar.gz`. It gives me a series of folders containing various files for the program operation, which are described in the program manual. One of these directories, called **source** contains many **.f** files, among other things. The manual says that to compile the code, one needs to take one of the sample/template Makefiles and modify the paths therein to direct the `make` program to the appropriate directory containing the compiler. (This DL_POLY_Classic program is written in, and must be compiled with, Fortran [Fortran 90, I believe].) Based on the recommendation of a colleague, I am attempting to compile this code using an Intel Fortran compiler (ifort) that we have on our cluster. I have modified one of the targets in the template Makefile; this target now has the following text in the Makefile:               #========== mpich-c2     mpich-c2: dpp         cp /opt/mpich/ch-p4/include/mpif.h mpif.h         $(MAKE) LD="/opt/mpich_intel/ch-p4/bin/mpif90 -O3 -o" \         LDFLAGS="-L/opt/mpich_intel/ch-p4/lib64 -lmpich" \         TIMER="" \         FC=/opt/intel_fc_80/bin/ifort \         FFLAGS="-c " \         MPICH_F90="/opt/mpich_intel/ch-p4/bin/mpif90" \         CPFLAGS="-D$(STRESS) -DMPI -P -D'pointer=integer'\         -I/opt/mpich_intel/ch-p4/include" \         EX=$(EX) BINROOT=$(BINROOT) $(TYPE)      I place the Makefile in the **source** directory, as the manual directs. Then while in the **source** directory, I type the command:               make mpich-c2      However, I get the following error message:               cp /opt/mpich/ch-p4/include/mpif.h mpif.h     make LD="/opt/mpich_intel/ch-p4/bin/mpif90 -O3 -o" \             LDFLAGS="-L/opt/mpich_intel/ch-p4/lib64 -lmpich" \             TIMER="" \             FC=/opt/intel_fc_80/bin/ifort \             FFLAGS="-c " \             MPICH_F90="/opt/mpich_intel/ch-p4/bin/mpif90" \             CPFLAGS="-DSTRESS -DMPI -P -D'pointer=integer'\             -I/opt/mpich_intel/ch-p4/include" \             EX=D.X BINROOT=./ 3pt     make[1]: Entering directory `/export/home/myusername/dlc1_16/dl_class_1.6/source'     make[1]: *** No rule to make target `dl_params.inc', needed by `angfrc.o'.  Stop.     make[1]: Leaving directory `/export/home/myusername/dlc1_16/dl_class_1.6/source'     make: *** [mpich-c2] Error 2      So, the `make` program is telling me that there is `No rule to make target dl_params.inc, needed by angfrc.o.` My question is, what is the software telling me? Is it likely saying that it cannot find a file **dl_params.inc** , or is it likely that it is saying that it cannot find a file **angfrc.o**? Or, is it saying that I should have some sort of command in my Makefile to create a _new_ file called **dl_params.inc**? When I search in my Makefile (which, as I mentioned, is essentially exactly the template provided by the authors, but just with the directories in the `mpich-c2` target entries modified for the particular Fortran compiler to which I have access), I see only these mentions of **dl_params.inc** :               # Declare dependency on parameters file          $(OBJ_ALL): dl_params.inc     $(OBJ_RRR): dl_params.inc     $(OBJ_4PT): dl_params.inc     $(OBJ_RSQ): dl_params.inc     $(OBJ_NEU): dl_params.inc     $(OBJ_RIG): dl_params.inc     $(OBJ_EXT): dl_params.inc     $(OBJ_SPME): dl_params.inc     $(OBJ_HKE): dl_params.inc      I am not sure what this means. On the other hand, when I search in my Makefile for **angfrc.o** , I see only one mention, in the first line of the following (after `OBJ_ALL`):               # Define object files          #=====================================================================          OBJ_ALL = angfrc.o bndfrc.o cfgscan.o corshl.o coul0.o coul4.o \         coul2.o coul3.o conscan.o dblstr.o dcell.o diffsn0.o \         diffsn1.o dlpoly.o duni.o error.o ewald1.o ewald3.o \         exclude.o exclude_atom.o fldscan.o exclude_link.o forces.o\         exitcomms.o extnfld.o fbpfrc.o fcap.o freeze.o gauss.o \         gdsum.o getrec.o gimax.o gisum.o gstate.o images.o initcomms.o \         intlist.o intstr.o invert.o invfrc.o jacobi.o lowcase.o lrcmetal.o \         lrcorrect.o machine.o merge.o merge1.o merge4.o \         npt_b1.o npt_b3.o parset.o npt_h1.o npt_h3.o nve_1.o \         nvt_b1.o nvt_e1.o nvt_h1.o parlst_nsq.o parlink.o parlst.o passcon.o \         passpmf.o pmf_1.o pmf_shake.o primlst.o quench.o rdf0.o rdf1.o \         rdshake_1.o result.o revive.o scdens.o shellsort.o shlfrc.o \         shlmerge.o shlqnch.o shmove.o simdef.o splice.o static.o strip.o \         strucopt.o sysdef.o sysgen.o systemp.o sysbook.o sysinit.o \         tethfrc.o thbfrc.o timchk.o traject.o vertest.o vscaleg.o \         warning.o xscale.o zden0.o zden1.o \      I am not sure what this means, either. Interestingly, when I use the `find` command to search by name--for example, `find -name angfrc.o`, `find -name *.o`, and `find -name dl_params.inc`--I can find nothing anywhere in the program directories with these names. When I try `find -name *.inc`, I do find that a file **comms.inc** exists in the **source** directory. This particular file says in its header that it is the "dl_poly include file for MPI, PVM and SHMEM." It is a relatively short file (only 42 lines long), and it appears that it contains both "parameters for message tags" and "MPI tagsizes"--although, I do not really have a clue as to what I should be looking for in there. If you have time, can you please give me advise as to what I should try next? I am not so sure what the error message `No rule to make target dl_params.inc, needed by angfrc.o.` is telling me; do you have any ideas? Thank you very much for your time.


title: In KDE, how can I create a custom keyboard shortcut that prints the current date?

text: I often need to print the current date in lots of different programs. Right now, I always type it per hand which is error prone. I'm using KDE 4.8, and it has customisable keyboard shortcuts. For example, it is possible to create keyboard shortcuts that print out a predefined string. But is it somehow possible to print out the output of some executable to the keyboard?


title: Windows 8.1 not appearing on grub after Linux Mint 16

text: I had followed a tutorial to install Linux Mint 16 Cinnamon and it works perfectly fine, currently using it to post this question. But when grub loads the only 3 options I am given, are Linux Mint, Linux Mint (Compatibility Mode) and system startup. My computer has come pre-installed with windows 8 on it, both the recovery and windows partition are still visible on the disk usage analyzer. When I installed Linux I had legacy mode turned on but if I turn it off, Linux still works fine. I've tried the "sudo update-grub" command and it reads as follows               Generating grub.cfg ...     Found linux image: /boot/vmlinuz-3.11.0-12-generic     Found initrd image: /boot/initrd.img-3.11.0-12-generic       No volume groups found     Adding boot menu entry for EFI firmware configuration     done      I would still like to dual boot Linux alongside Windows, what do I need to do to achieve this?


title: How should I enable the trace log for ALSA hda_unsol_event?

text: I have reported an ALSA kernel bug and have been asked to "enable tracepoints" and "check the response of hda_unsol_event". I was directed to the kernel docs for instruction, which say: > ![enter image description here](http://i.stack.imgur.com/BYPdJ.png) Except when I ran the commands (as root), I did not get the desired output (what I got) (what I was supposed to get). I don't know exactly what the differences between the two logs but it seems that:   * The desired output should only have the tasks `alsa-sync` or `kworker`; and entries in the FUNCTION column that begin with `hda_`, and    * Mine has lots of tasks, like `plasma-desktop`, `knotify`, and tons of other tasks, and in the FUNCTION column the only thing is `do_sys_open`. What am I supposed to do to trace `hda_unsol_event`? The docs are not very clear, as you can see...


title: mcrypt, EPEL and CentOS 6.4

text: I am having issues installing php-mcrypt. I am not an administrator of any level. I have performed the following. Installed EPEL Installed REMI Configured EPEL Updated YUM Cleaned YUM Installed mcrypt Installed libcrypt YUM still cannot find php-mcrypt I have performed a search: "yum list php* | grep mcry" with no results Thanks for your time.


title: nohup sends eof (or some other data) info my app when running recursively. How to make it stop or not send at all?

text: I have a simple small app that suports `cin`/`cout` interaction. But there are times (lots of them) when I do not care about that interaction and just want to run my app in background. So I start it with command like               nohup ./myServer >& /dev/null &      but it eats 100% of one of my cores because `nohup` sends `eof` then `endl` or something like that to my app, my app thinks that this is dull user and proposes him with list of interaction commands and waits for new commad, nohup sends `eof` then `endl` again and so on recursively. So one core gets eaten up with this crappy interaction. I want to start nohup so that it would send no data at all to my app - no `eof`, `endl`, etc how to do such thing? How to make nohup send no data at all to my app after it started it?


title: Is there any way to rsync absolute symlinks alone?

text: I want to sync a big folder hierarchy between two machines. I want to copy the contents of the symlinks if they are absolute, for eg it points to `/some/folder/someFile` I want to retain the symlinks if they are relative, for eg, it points to `../../somefolder` How do I do this? **Edit:** Basically I try to avoid recursion. I tried --copy-unsafe-links option, it copies absolute links but skips internal or relative links, does not retain the link.


title: removing data from txt file

text: I have a comma-delimited giant file that was exported from a database. The file has this format               Date,n1,n2,n3,n4,n5,n6,color,type,reference     10-Jan-2000,344,13,21,2,55,3,"rose garden" ,3444,32     11-Jan-2000,324,3,1,21,5,23,"space green fox" ,3444,11     12-Jan-2000,34,23,31,22,5,34,"bourbon mars" ,3444,88      Notice that the color field is surrounded by quotes and has a space at the end. Don't ask me why. I would like to end with a file that is just this:               n1,n2,n3,n4,n5,n6     344,13,21,2,55,3     324,3,1,21,5,23     34,23,31,22,5,34      what magic command should I type on terminal to get rid of the date, color, type and reference on all lines of that txt file?


title: Using wget, What is the right command to get gzipped version instead of the actual html

text: I stumbled upon this website which talk about this. So when downloading whole website by getting the gzipped version, what is the right command? I've tested this command, but I dont know if wget really getting the gzipped version:               wget --header="accept-encoding: gzip" -m -Dlinux.about.com -r -q -R gif,png,jpg,jpeg,GIF,PNG,JPG,JPEG,js,rss,xml,feed,.tar.gz,.zip,rar,.rar,.php,.txt -t 1 http://linux.about.com/


title: Is there any way to get Intel i915 graphics without ACPI?

text: I've got an old tablet PC that panics on boot with ACPI GPE storms. It boots just fine with `acpi=off` in the kernel arguments, however I've never been able to get the Intel i915 accelerated graphics working (Intel 855GM chipset). I have no idea why the two should be related but I've come across a few reports of `i915` being dependent on `acpi`:   * https://bugzilla.redhat.com/show_bug.cgi?id=582708   * http://forums.debian.net/viewtopic.php?f=20&t=84527 How can I verify this dependency and is there any way to get accelerated graphics with my busted ACPI?


title: What could be the bottleneck on this AIX machine?

text: My kernel usage is running up to 54%. What could that mean? What could be eating resources on this AIX 6.1.0.0 machine? ![enter image description here](http://i.stack.imgur.com/RTNsS.png)


title: Does WINE support .wma playback through MCI?

text: This application (zip file) extracts .wma file but fails to play it under WINE. I have installed Windows Media Player 10 and it is able to play this embedded audio file under WINE, but it could use different API. In the past I tried to configure MCI registry keys so that "wma"="MPEGVideo" in various ways trying to interpret available information, but always failed. Call to `mciSendCommandW` I believe should return 0 in order to succeed. Can this possibly work? Does it work for anyone?               14118.930:002c:Ret  KERNEL32.GetDriveTypeW() retval=00000001 ret=7ecc7f66     14118.930:002c:trace:mci:mciSendCommandW => 00000119     14118.930:002c:Ret  winmm.mciSendCommandW() retval=00000119 ret=7e7bd553     14118.930:002c:Call user32.SetCursor(00000000) ret=7e7bd567     14118.930:002c:trace:cursor:SetCursor (nil)     14118.930:002c:Call winex11.drv.SetCursor(00000000) ret=7eb82fc6     14118.930:002c:Ret  winex11.drv.SetCursor() retval=00000000 ret=7eb82fc6     14118.930:002c:Ret  user32.SetCursor() retval=00020054 ret=7e7bd567     14118.930:002c:Call winmm.mciGetErrorStringW(00000119,0034bd44,00000100) ret=7e7b      ... and error message that will show up in message box:               14118.930:002c:trace:resource:LoadStringW L"Cannot determine the device type from the given filename extension." loaded !


title: USB Media filesystem problem

text: My USB is not detected recently, I tried `mount`, `fdisk`, `dd`, `gparted`, `mkfs.vfat`               :~# tail -f /var/log/syslog     Oct 27 12:54:29 mohammad-Inspiron-N5110 kernel: [18843.105772] usb 3-2: New USB device strings: Mfr=0, Product=0, SerialNumber=0     Oct 27 12:54:29 mohammad-Inspiron-N5110 kernel: [18843.107485] scsi31 : usb-storage 3-2:1.0     Oct 27 12:54:29 mohammad-Inspiron-N5110 mtp-probe: checking bus 3, device 13: "/sys/devices/pci0000:00/0000:00:1c.4/0000:0b:00.0/usb3/3-2"     Oct 27 12:54:29 mohammad-Inspiron-N5110 mtp-probe: bus: 3, device: 13 was not an MTP device     Oct 27 12:54:30 mohammad-Inspiron-N5110 kernel: [18844.104912] scsi 31:0:0:0: Direct-Access     USBest   USB2FlashStorage 0.00 PQ: 0 ANSI: 2     Oct 27 12:54:30 mohammad-Inspiron-N5110 kernel: [18844.107132] sd 31:0:0:0: Attached scsi generic sg2 type 0     Oct 27 12:54:30 mohammad-Inspiron-N5110 kernel: [18844.108857] sd 31:0:0:0: [sdb] Attached SCSI removable disk          :~# mount /dev/sdb /mnt     mount: no medium found on /dev/sdb          :~# fdisk -l          Disk /dev/sda: 640.1 GB, 640135028736 bytes     255 heads, 63 sectors/track, 77825 cylinders, total 1250263728 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: 0x00051f45             Device Boot      Start         End      Blocks   Id  System     /dev/sda1   *        2048   200000094    99999023+  83  Linux     /dev/sda2       200001534  1250263039   525130753    5  Extended     /dev/sda5       200001536  1250263039   525130752   83  Linux          :~# dd if=/dev/zero of=/dev/sdb bs=512 count=1     dd: opening ‘/dev/sdb’: No medium found          :~# gparted /dev/sdb     ======================     libparted : 2.3     ======================     Error opening /dev/sdb: No medium found          :~# lsusb     Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub     Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub     Bus 003 Device 002: ID 09da:000a A4 Tech Co., Ltd Optical Mouse Opto 510D     Bus 003 Device 013: ID 1307:0163 Transcend Information, Inc. 256MB/512MB/1GB Flash Drive          :~# mkfs.vfat /dev/sdb     mkfs.vfat 3.0.14 (23 Jan 2023)     /dev/sdb: No medium found      testdisk also returns :               :~# testdisk /dev/sdb     TestDisk 6.13, Data Recovery Utility, November 2011     Christophe GRENIER <grenier@cgsecurity.org>     http://www.cgsecurity.org          Unable to open file or device /dev/sdb      Any idea? Any suggestion?


title: Installing ack on cpanel

text: I need to install ack on an instance of whm/cpanel (I have root access as it is a VPS) but I have not found any information on how to do that. I tried to install it using the WHM RPM manager, but the install failed:               Loaded plugins: fastestmirror     Loading mirror speeds from cached hostfile      * base: centosk3.centos.org      * epel: linux.mirrors.es.net      * extras: centosi5.centos.org      * updates: ftp.osuosl.org     Excluding Packages in global exclude list     Finished     Setting up Install Process     Resolving Dependencies     --> Running transaction check     ---> Package ack.noarch 0:1.96-1.el5 set to be updated     --> Processing Dependency: perl(File::Next) >= 0.40 for package: ack     --> Finished Dependency Resolution     ack-1.96-1.el5.noarch from epel has depsolving problems       --> Missing Dependency: perl(File::Next) >= 0.40 is needed by package ack-1.96-1.el5.noarch (epel)      You could try using --skip-broken to work around the problem      You could try running: package-cleanup --problems                             package-cleanup --dupes                             rpm -Va --nofiles --nodigest     The program package-cleanup is found in the yum-utils package.      Any advice?


title: Turn off beep of Xorg

text: How should I disable beep permanently? I know `xset b off` can do this, but what's the corresponding option in `xorg.conf`? Or any other way to do this?


title: Store restored files and directories in a separate directory

text: I have backup files in the form `backup-date.tar` and these files will be in a directory called `backup`. I am performing a restore by using `tar -xvf backup-date.tar` but the restored file is placed in the backup directory. I want the restored files to be stored in another directory called `restore`. How can I do this?


title: ungzip the gizpped war

text: I am totally new to linux. I have gzipped a war file like this `gzip mytest.war`. I try to ungzip it like it `\--ungzip mytest.war.gz`, it said command can't be found. How can I ungzip it? Moreover, how can gzip and ungzip a particular folder?


title: Magic file that redirects to standard output

text: Is there a magic file name that gives the following effect?               $ mkfifo /tmp/fifo1 && cat /tmp/fifo1 &     $ foo --log-file /tmp/fifo     # now I can see the log as the program runs      I want something like               $ foo --log-file /proc/to_stdout


title: Delete lines containing repeated text

text: I have a file containing two paths on each line. I want to remove the lines containing the same path twice. I work on Linux and Solaris. I would like a one-liner in sed or awk or perl. Example input file:                    /usr/lib/libgmp.so.3.3.3 /usr/lib/libgmp.so.3.3.3          /usr/lib/libxslt.so.1.1.17 /usr/lib/libxslt.so.1.1.17          /usr/lib/sse2/libgmp.so.3.3.3 /usr/lib/sse2/libgmp.so.3.3.3          /usr/local/swp-tomcat-6.0/lib/commons-logging-1.1.1.jar /usr/local/swp-tomcat-6.0/lib/commons-logging-1.1.1.jar          /usr/share/doc/libXrandr-1.1.1 /usr/share/doc/libXrandr-1.1.1          /usr/share/doc/libxslt-1.1.17 /usr/share/doc/libxslt-1.1.17          /etc/3.3.3.255 /etc/172.17.211.255          /etc/1.1.1.255 /etc/172.17.213.255      Expected output:                    /etc/3.3.3.255 /etc/172.17.211.255          /etc/1.1.1.255 /etc/172.17.213.255


title: What is the best place to put php files above server root directory?

text: I am running a web application and I want to move a directory containing my php files above the server root directory. Where would be the best place to put them? On my web server I rent from Namecheap, there is a directory called php in the same directory where public_html is. Is this a good place to put my php files? The php directory has some directories such as data, docs, and ext. Or is this directory merely for configuration files? FYI, this server is using Apache.


title: Changing the server name

text: I changed the name of the hosts in `/etc/hosts` to               IP.GOES.HERE newname      Apache does recognize the new server name; but still, via `ssh` i get this on the `ssh` prompt:               [root@oldname]      Why? Where else do I need to change the server name? I'm using **CentOS 6.3**


title: What is the "cost" of deeply nested folders in ext4?

text: I was running into performance problems with hundredthousands of files in single directories when I needed to do certain wildcard matches. From my applications point of view, a simple solution is to place the files in deeply nested folders. The expected upper bound for the total number of folders across the whole hierarchy is 9^30. It can be assumed that this limit will never be reached (see comment below). The number of folders will just simply grow as files are added. Question: Are there any implications from filesystem perspective, when vast ammounts of folders are created on an ext4 filesystem? How much space is consumed by eg. a folder just containing another folder? Will I run into trouble because of too much metadata? _(There are certain advantages from my apps perspective with above structure compared to for example hash-based folders in a more simple hierarchy, I am aware of "better" methods to organise data)_


title: Can I search bash history across all users on a server?

text: I want to see all bash commands that have been run on a Linux server across multiple user accounts. The specific distribution I'm using is CentOS 5.7. Is there a way to globally search .bash_history files on a server or would it be a more home-grown process of `locate | cat | grep`? (I shudder just typing that out).


title: How do I search for Linux distro build tools?

text: After having worked through Linux From Scratch, I get the eerie feeling that in practice, this is not how new distros are built. How do I search for tools that other distributions are built with? Is Debian really built from scratch? Googling "Linux distro build tools" have not been very fruitful. The following are some questions that I have not been able to find on either LFS or Google:   * What tools are used to build Debian?   * What are some popular tools people use to automate the compilation process?   * Is it possible for me to simply build the entire system from precompiled binaries?   * How do I create a live iso of my working system? What about an automated installer? Are there automation tools for making live iso and installer?   * If I wanted to use another distro as a base, where would I start? Are there specialized tools for branching from existing distros? LFS is cool, but it doesn't answer many practical questions that I have. Where can I find more information? In particular, what key words can I use in my google searches to find information on tools I can use to build a linux distro? Is there a book like LFS that focuses more on branching an existing distro rather than learning the build process? PS I have come across SUSE studio, and the like, but those tools require you to be locked in to that particular distribution, and can only offer as much flexibility as the program will allow. How did people branch from SUSE linux before SUSE studio?


title: What is an appropriate naming structure for storing application packages?

text: I need to determine an appropriate directory naming structure for a package management system. The original directory structure was not POSIX-compliant in any way and certainly not UNIX-style (you'll notice it's similar to GoboLinux). The structure looked somewhat like this:   * `/Applications` - applications for users (but that users have not themselves installed)   * `/System/AppResolve` - application resolution (effectively `/bin`)   * `/System/LibResolve` - library resolution (effectively `/lib`)   * `/System/Utilities/Applications` - essential applications for system operation   * `/System/Utilities/Libraries` - essential libraries for system operation Now I need to find a way to represent this directory structure on a more UNIX- like system. AppResolve and LibResolve aren't an issue since `/lib` and `/bin` work fine for this, the issue is with the other directories. Under each of the other directories, applications live in their own folder, so for example you might have this kind of path:               /System/Utilities/Applications/Tar/1.22/bin/tar      Of course, the `/bin/tar` symlink would resolve to this binary. **So the question is this** , I need to take this kind of structure and rearrange it to fit within the UNIX-style of naming directories (particularly so that it works with the existing structure on Linux). I thought of the following, but I think it's repetitive and not very nice:   * `/usr/app/user/applications/...`   * `/usr/app/system/applications/Tar/1.22/bin/tar`   * `/usr/app/system/libraries/...` Suggestions? **FOR CLARIFICATION:** This isn't asking for a mapping to existing UNIX directories; it's asking for the most appropriate leading path for those "user" and "system" directories given the UNIX-naming convention (3-letter directories, etc.)


title: find a file within a tar.gz archive

text: Is it possible to use the `find` command so that it searches the files within a tar.gz archive also using wildcards? like               find archive.tar.gz --name *foo*


title: linux mint: waiting for network configuration

text: I went to another place and my network(either wired or wi-fi) starts not working... For now, I have a workaround solution that every time I logged in I have to run `sudo service network-manager start` which give me the following information:               stop: Unknown instance:      network-manager start/running, process 2410      Before I start network-manager, I ran `status network-manager` which give me this:               network-manager stop/waiting      Before I log in, I'm stuck here for around 1 and half minutes.. Here is a screenshot: ![screenshot](http://i.stack.imgur.com/aCibi.jpg) I Googled and found a workaround solution to change `/etc/init/failsafe.conf`, but since I didn't touch it before and my wifi works... there must be something wrong somewhere else... BTW, this is my content of `/etc/network/interfaces`               # This file describes the network interfaces available on your system     # and how to activate them. For more information, see interfaces(5).          # The loopback network interface     auto lo     iface lo inet loopback          # The primary network interface     auto eth0     iface eth0 inet dhcp


title: How can I find the process ID of a command started in another terminal?

text: If I run `sleep 30` in one PuTTY window, how can I find the process ID of the sleep command from another PuTTY window?


title: Installing development tools in RHEL 6

text: I have admin privilege on my office computer (running RHEL 6) which is connected in a network. I was trying to install development tools using the command: `sudo yum groupinstall "Development Tools"` but I got an error message saying:               Updating certificate-based repositories.     There was an error communicating with RHN.     RHN Satellite or RHN Classic support will be disabled.          Error Message:      Please run rhn_register as root on this client      Error Class Code: 9      Error Class Info: Invalid System Credentials.      I tried to run rhn_register, it said `"It appears this system has already been registered for software updates"`. Scrolling down, I found following lines:               Setting up Group Process     Warning: Group development does not have any packages.       No packages in any requested group available to install or update      Are these two things connected? Or the installation process of development tools have changed?


title: cron is ignoring MAILTO

text: I have big trouble with cron. On Debian 6, it is ignoring the `MAILTO` variable. Is there some other variable that has to be to set for cron to send emails to a different email address then local root? I just added `MAILTO=user@hostname` to `/etc/crontab`, restarted cron, then restarted the entire machine. Still, the mail daemon is receiving root as recipient. Edit: This is what comes from cron:               From: root (Cron Daemon)     To: root     Subject: Cron <root@core>   [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -delete     Content-Type: text/plain; charset=UTF-8     X-Cron-Env: <SHELL=/bin/sh>     X-Cron-Env: <HOME=/root>     X-Cron-Env: <PATH=/usr/bin:/bin>     X-Cron-Env: <LOGNAME=root>      And the exec line:               -i -FCronDaemon -oem root


title: gzip - redirection or piping?

text: I will be backing up a large (750GB) disk to an external USB disk using dd.   Should I be using redirection or piping? Which is more efficient? Or is there a difference? Also, what is the best block size? USB is likely to be the bottleneck here.               dd if=/dev/sda bs=1M | gzip -c > /mnt/sdb1/backups/disk.img.gz          gzip -dc /mnt/sdb1/backups/disk.img.gz | dd of=/dev/sda bs=1M      vs               dd if=/dev/sda bs=1M | gzip -c | dd of=/mnt/sdb1/backups/disk.img.gz          dd if=/mnt/sdb1/backups/disk.img.gz | gzip -dc | dd of=/dev/sda bs=1M      Thanks.


title: Removal of extra spaces but not the newline from csv files

text: I have to compare 2 files by using comm command like the below               comm -23 csv1 csv2 > csv3      I seem to face the problem that both the csv are generated from different sources (csv1 is extracted from another csv containing many columns and first column is extracted from it and csv 2 is generated from DB and consists of some extra spaces) csv2 contains data like below               Vp1234▒▒▒▒     vp4567▒▒▒▒     vp6789-v2▒▒▒      (where `▒` indicates a space). While csv1 contains similar data (which is why I have to compare to find the data only existing in csv1) but without spaces. Hence its difficult to compare both. I have tried sed but it didn't work or tried wrongly.


title: How can I install tactile audio keys on my latitude?

text: I have a Dell latitude 6430u which has three tactile keys for mute/audio decrease/audio increase. On debian (sid), either with xfce or gnome, these keys don't work well. The mute key has never work. The two others work sometimes, but not well (I have to press twice, sometimes nothing happens, ...) Is it possible to have a better support for these keys? I don't know anything about drivers for tactile keys. When I use `xev` and using this shortcut I've got:               FocusOut event, serial 37, synthetic NO, window 0x4c00001,         mode NotifyGrab, detail NotifyAncestor          FocusIn event, serial 37, synthetic NO, window 0x4c00001,         mode NotifyUngrab, detail NotifyAncestor          KeymapNotify event, serial 37, synthetic NO, window 0x0,         keys:  2   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0                   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0             FocusOut event, serial 37, synthetic NO, window 0x4c00001,         mode NotifyGrab, detail NotifyAncestor          FocusIn event, serial 37, synthetic NO, window 0x4c00001,         mode NotifyUngrab, detail NotifyAncestor          KeymapNotify event, serial 37, synthetic NO, window 0x0,         keys:  2   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0                   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0


title: How to use uniq Unix command and specify input and output file?

text: I'm confusing use of `uniq` command, can anyone **explain this command** and how to use it? How to use `uniq` without specifying any option? Any example would be helped and appreciated


title: msmtp alternative that understands /etc/aliases

text: I'm looking for a simple smtp daemon, that supports aliases (due to issues with daemons, that refuse to send emails to anyone else than root). If you don't know msmtp, then basically, I just want to configure an external SMTP that will handle all mail delivery.


title: How long does a ssh connection last?

text: I've been looking around stackoverflow and it seems that SSH connections will disconnect when it doesn't see any packets for a while (2 hours?). Also, I looked in my /etc/ssh/ssh_config file and there doesn't seem to be anything there that would persist my current connection. My question is: Even after 48 hours, why would a SSH connection persist? (my computer is turned off, but the server that I SSH to is presumably still online)


title: Why use "nohup &" rather than "exec &"

text: I know that, `nohup` being a binary, it can be reached from any shell. But the `exec` built-in probably exists in every shell. Is there a reason to prefer one of them, to the other?


title: How do I run a sock proxy via ssh on a non-standard port?

text: I am running into a bit of trouble accessing a web application running on port 9293 on a remote server only accessible via ssh on port 5634. I've configured FoxyProxy to route all traffic meeting the remote host's IP address (wildcard white listed like so *remoteip*) to port 1234. The end to this story is it's not working, here is the ssh command I'm running:               ssh -D 1234 user@remoteip -p 5634      Then when I attempt to connect to the web app via the following address, it timesout (ssl is enabled):               https://remoteip:9293      Any ideas where I'm going wrong? Also the remote host is running Debian 7.5, if that's relevant.


title: can xsp4 run .net 4.5 based application using mono framework?

text: I have installed mono 3.2.8 package into centOS 6.5 to run web application using mod-mono module. I have also installed apache 2, mod-mono 2.10 and xsp 2.10.2 in that system. Then I have tried to run .net 4 based web service which is working fine without any issue. But when I have tried to run service which is compiled into .net 4.5 framework, then it gives like System.TypeLoadException Could not load type 'System.Web.Http.WebHost.HttpControllerHandler' from assembly is there any one has idea about how to solve this type of error?


title: How to mount NFS shares via /etc/fstab - Access denied by server while mounting

text: I am trying to mount a NFS share to my OpenSUSE 13.1 Server on startup using /etc/fstab file with the following entry:               l00nim10:/export/werk/        /home/smbshares/nimshare_03/    nfs     vers=3  0 0      Unfortunately, this does not work! Using the command mount -a I keep on getting the error message               mount.nfs: access denied by server while mounting l00nim10:/export/werk/      I already tried adjusting the option attributes in fstab with a bunch of combinations such as rw, defaults, guest, vers=2, etc... All in general leading to the presented error or to an "I/O error mounting". The strange thing about this is, that using the su command               mount -t nfs l00nim10:/export/werk /home/smbshares/nimshare_03 -o vers=3      works fine without any trouble. The thing is that I need to restore the mounts at startup in case the server goes down. Appreciate any help!!


title: FreeBSD is not Unix. But its Unix-Like Unix. Where is then the main Unix to read the source code?

text: I want to really understand System V, the main origin of Unix (not Unix-like nor modified Unix to Linux). The main origin which is very confusing and not really with care its written somewhere. Is it true FreeBSD is not Unix? But what is Unix or where is it then? Where can I find the origin source code to read it and see how the legend was born. http://upload.wikimedia.org/wikipedia/commons/7/77/Unix_history-simple.svg Follow up: http://www.lemis.com/grog/Documentation/Lions/index.php http://v6.cuzuco.com/


title: X11 forwarding an OpenGL application from a machine running an NVIDIA card to a machine with an AMD card

text: I'm interested in forwarding an X11 session over SSH, in order to launch a remote process that utilizes OpenGL (specifically, gazebo for anyone familiar.) The problem that I seem to be running into is that gazebo crashes due to a mismatch in the graphics cards; it can't find "NV-GLX" extensions. The exact error output:               Xlib:  extension "NV-GLX" missing on display "localhost:10.0".     Xlib:  extension "NV-GLX" missing on display "localhost:10.0".     X Error of failed request:  GLXUnsupportedPrivateRequest       Major opcode of failed request:  149 (GLX)       Minor opcode of failed request:  16 (X_GLXVendorPrivate)       Serial number of failed request:  24       Current serial number in output stream:  25      The remote machine is running with an NVIDIA card, and my local machine is using an AMD card. I've tested X11 forwarding of gazebo between two machines with NVIDIA cards. It works just fine. As near as I can tell, it seems that one of three things are happening:   1. I'm doing something wrong,   2. What I want to do is impossible,   3. Gazebo doesn't build in an agnostic manner with branching codepaths for different hardware; whatever your system looks like when it builds is what you get. I'm really hoping it's #1, and I'm really hoping someone here can help me out. If it makes any difference, the remote machine is running Ubuntu and my local machine is a Mac running 10.8.2; I already know that I have x11 forwarding set up properly for normal use as I can get things like xclock to open up in XQuartz just fine. The solution (if it exists) would also preferably work for other OS's including Windows over WinSCP.


title: Find out where $PATH got corrupted

text: I'm using OSX Mountain Lion 10.8.2 `$echo $PATH` prints this:               /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/Users/myusername/.rvm/bin      I've commented out everything in `~/.bash_profile` and `~/.bashrc` and restarted the computer, but the last part in the `$PATH` variable(`/Users/myusername/.rvm/bin`) does not go away. How can I find out where that last part gets added to my `$PATH` variable?


title: Text editor with indented word wrapping

text: I've been using Notepad++ in windows for a while and it has a cool feature for word wrapping so that the wrapped text is indented. That is the start of the sentence starts at column 1, but wrapped text starts at column 3 (or 4 or whatever). I believe it is called Indent style for word wrapping. Very convenient when you have long lines. I played with vim, but didn't have success getting similar behavior. Does any text editor in Linux support this type of word wrapping?


title: Grey background in vncviewer remote desktop

text: I keep getting a grey background in my VNC viewer on my VPS, like so: ![enter image description here](http://i.stack.imgur.com/2VzAv.png) My `.vnc/xstartup` is as follows:               #!/bin/sh          unset SESSION_MANAGER     exec /etc/X11/xinit/xinitrc          gnome-session --session=gnome-classic &     [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup     [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources          xsetroot -solid grey     xrdb $HOME/.Xresources     xsetroot -solid grey     vncconfig -iconic &          x-terminal-emulator -geometry 1280x1024+10+10 -ls -title "$VNCDESKTOP Desktop" &     x-window-manager &      My server has the tightvncserver and everything else properly installed and configured to port 1. What is going wrong? I'm on Debian 6.0.4


title: Command line: <<< instead of <<

text: Why is the command `md5sum <<< 'ddd'` (output: `d6d88f2e50080b9602da53dac1102762 -`) right, and `md5sum << 'ddd'` not? What does `<<<` mean?


title: ssh config wildcards to avoid typing username

text: I frequently ssh into openstack instances. All of the instances are on a dedicated vlan and subnet (10.2.x.x). All of the instances have the same username (bob) I connect like so:               ssh bob@10.2.x.x      or sometimes like this               ssh 10.2.x.x -l bob      **Is it possible to configure my laptop to automatically use the name bob when I ssh into any vm on the 10.2.x.x subnet?** I don't want to automatically use bob when sshing into a machine on any other subnet. It looks like ssh config doesn't support wildcards. (Correct me if I am wrong). I'm thinking maybe an alias could do this, but I'm not sure what the syntax would be.


title: Process priority and cpu speed

text: In some devices the cpu speed is dynamic, being faster when there is more load. I was wondering if it is possible to set nice level or priority of a process so that it does not influence an increase in cpu speed when it is running flat out. i.e. Process is running flat out, but only using spare cpu cycles as low priority. But also not causing an increase in cpu speed. When cpu is off process stops. When cpu is slow process may have some cpu, maybe most of it. When cpu is fast, because another process is running at 90%, process gets the remaining 10% of fast cpu. Then other process stops, so low priority process gets 100% of cpu, but the frequency controller does not see this low priority process and drops the frequency.


title: What can I do when apt-get/aptitude doesn't create a menu item for an installed program?

text: Obviously, this question is specific to Debian-based setups. I find that, often, packages I install using aptitude or apt-get only _say_ that a menu item has been created. No menu item actually appears. Obviously, I can create one myself, but that requires knowing what the binary was actually called (in many cases different from the package name). There must be a simple way to know which directories things have been installed in. So,   1. Does anyone know why the creation of menu entries fails?   2. How can I get info about where the binaries reside/what they're called, in order to create my own menu entry?


title: Xorg partially working for a font error

text: in my Debian stable, when I execute: `startx` as normal user the Xorg server begin to work, but after some second I recive in console this error: > FreeFontPath: FPE "/usr/share/fonts/X11/misc" refcount is 2, should be 1; > fixing. (I cut the stacktrace :)) When I execute Xorg as root, I haven't got this error! I tried to:   1. change permission in same file ->useless;   2. reinstall XOrg -->useless   3. file config not existing? -> what? I have see the doc in the Net but I found the root of the problem: for you, what's (better, what can be) the problem? EDIT: my /var/log/log.0 ---> http://pastebin.ca/1998075


title: Tunnel through a NAT

text: I have a router that provides internet connection to a single client device via a wireless cellular data network. This network provides non-public IP addresses which gets natted. I would like to get a static IP address outside of the network that will route everything back to the device on the cell network. Because this is an embedded device, space is limited (about 500kB to work with here). Because the network is expensive, it has to not consume too much traffic. First I tried creating an IPIP tunnel using iproute2. From the server, I used the router's egress IP for the remote IP, not the private address the router received. I hoped that once the router communicated over the tunnel to the server, the server could communicate back. This was not the case. I tried dropbear SSH and found it won't do a generic tunnel, but I thought I could probably get around that using iptables. However, it seems that just having the ssh link open consumes about 150 bytes/sec. I also tried nc, but the communication is only one direction, so I can initiate a connection to the server, but can't get anything back. OpenSSH and OpenVPN are too big to fit on the device (both around 1MB). My next attempt will probably be to write a program that keeps a persistent socket open to the server, and to use iptables to route the traffic to that program. I wanted to see if there were any other ideas first. So, any ideas?


title: Sharing Mobile Internet To Others

text: Currently I am using a mobile internet connection using an USB cable. How do I share this connection with my peer who only has a wireless card on his macbook? So far what I have tried: Internet Connection Sharing Over Wifi With Fedora, but I'm unsure as to how to validate that it is working.


title: How to make a USB storage device undetectable in u-boot?

text: I need to do a test in an embedded system where I plug in the USB storage device and do "usb start" but the USB storage device is not detected. I have a working pendrive. How to make it undetectable in u-boot?


title: Need some type of shortcut

text: So first thing, I am not good Linux really beyond mildly advanced commands. I need some type of short cut from one fake folder called SD-card to a real folder called system/advt so whenever something writes to SD-card it's saved to advt. This has been bugging me with symlinks and stuff and I just need help.


title: Shell script for auto exceute and shut-down of application based on system time

text: I need to implement auto start-up and shutdown of a application in Suse Linux based on system time. Eg. Start the application at 10am. Shutdown the application at 5pm. Can this be done using shell scripting?


title: What is the pathname (the directory and file name) of the configuration file used for the DHCP client (not the server!)

text: (This question refers to the IPv4 client, not the IPv6 client.) (Hint: configuration files are kept under the directory `/etc`.) It is for a school assignment. I have to use `man` pages to find it. I believe it is the `/etc/dhcp/dhclient.conf` and I believe it is the dhclient(8) man page, but there is also the dhclient.conf(5) man page. Am I right?


title: When using 'yum list available' why are some entries in blue?

text: Using iTerminal on Mac OS X 10.8 to connect via SSH to a CentOS 6.4 server, running `yum list available` will show a list of packages available from the various repositories on that machine. Some of the entries' names are shown in blue. I'm not sure what significance that formatting has. Why are some installed packages shown in blue? ![ss of terminal w/ colored rpms](http://i.stack.imgur.com/oweY4.png)


title: Find: who write backups

text: I have some daemon which writes Mongo and MySQL backups to the directory `/opt/BACKUP`, but I dont know - what kind of daemon, when it works and where i can find its settings? These files are in the directory:               -rwxrwxrwx 1 root  root 10954766682 Aug 30 21:02 history_2013-08-26.sql.bz2     -rw-r--r-- 1 root  root 22707064861 Sep 19 07:07 history.sql     drwx------ 2 root  root       16384 Dec 24  2012 lost+found     drwxr-xr-x 3 root  root        4096 Sep 19 03:12 mongodb     -rw-r--r-- 1 root  root  6708923175 Sep 18 04:16 mongodb.0.tgz     -rw-r--r-- 1 root  root  6685715560 Sep 17 04:16 mongodb.1.tgz     -rw-r--r-- 1 root  root  6733542547 Sep 19 04:17 mongodb.tgz     drwxr-xr-x 5 mysql root        4096 Sep 19 06:25 mysql     drwxr-xr-x 2 root  root        4096 Dec 24  2012 nobacula     drwxr-xr-x 2 root  root        4096 Aug 29 04:05 tmp      How I can find who writes mongodb.* and history_2013-08-26.sql.bz2?


title: Shortcut keys that are independent to keyboard layout

text: Is there a way to define an association of a particular _physical_ key of the keyboard to some action, independently of the letter that this key is associated to in any layout? **Example** : In most default Gnome shortcut key associations, pressing `Alt` + `Ctrl` + `T` opens a terminal. But only in the Latin keyboard layout. Doing the same _physical_ action while in Greek layout does not work, since the associated letter is then the **"Greek` T`"**, not the **"Latin` T`"**. Therefore, one has first to switch to the Latin layout and then press the shortcut key, which may be frustrating since one is never sure if the key has not been pressed correctly at the first place, so probably tries several times until realizing that the problem was in the layout. A solution could be defining the same association for the same key in all layouts one uses - but then one would have to do this for all shortcuts, so this solution does not scale well.


title: Jittery mouse pointer when using high sensitivity mouse with high "Constant Deceleration" in xinput

text: I'm on Linux Mint 15 (MATE edition) (based on Ubuntu 13.04), and I'm using a Logitech G700 mouse. Since the mouse has a pretty high sensitivity, and I don't like mouse pointer acceleration, I use the following bash script to get a well behaved mouse pointer:               #!/bin/bash          xinput set-prop 9 'Device Accel Profile' -1     xinput set-prop 9 'Device Accel Constant Deceleration' 2.5          # I'm not sure this does anything:     xinput set-prop 9 'Device Accel Velocity Scaling' 1.0      This removes all mouse acceleration, and turns down the pointer speed to a level I think is good. The problem is that the mouse pointer movement is kind of jittery and erratic. I can't really explain it, but it makes the pointer hard to control. I use the same mouse on Windows 7, where I turn of mouse acceleration using the SetPoint software, and there the pointer movement is perfect and very easy to control. I tried lowering the sensitivity on the mouse itself and lowering the Constant Deceleration, but the problem persists. Does anyone know if there's any other way to fix this? I found an option called "Softening" in the Xorg documentation, but I don't really know how to enable it. I'm guessing I have to edit the Xorg config file, but I'm unsure of how to do this.


title: what is `env <command>` doing?

text: What is the command `env ls -al` doing? I had a Linux test and there was question: "How to run command directly, but not its alias?"   I knew that there exists solution like prefixing command with some special symbol, but I forgot it. Now I know that it is `\`. (read from this post). But I also remember that somewhere I read that to get rid of alias we can prefix a command with `env`. I did it and it seems works, but my answer was qualified as wrong. I read `info` and `man` on `env`, but didn't understood too much. What is `env` doing and exactly in `env <command>` without any arguments for `env` itself?


title: How to change GNOME default screen rotation

text: How do I change the **default screen rotation** for my gnome desktop? Is there anyway I can change the monitor settings without logging in? ![Two monitors rotated](http://i.stack.imgur.com/HeHfT.png)


title: Get common name (CN) from SSL certificate?

text: I have a SSL CRT file in PEM format. Is there a way that I can extract the common name (CN) from the certificate from the command line?


title: Search for file permisions other than 755

text: In AIX really, how can I search in several directories and those below it, for files that are not of the specific permissions of 755. So I want to search `/path/to/`, `/path/to/mydir`, `/path/to/mydir/andthisoneto`, etc., but not `/path`.


title: Why does rsync fail to copy files from /sys in Linux?

text: I have a bash script which uses `rsync` to backup files in Archlinux. I noticed that `rsync` failed to copy a file from `/sys`, while `cp` worked just fine:               # rsync /sys/class/net/enp3s1/address /tmp         rsync: read errors mapping "/sys/class/net/enp3s1/address": No data available (61)     rsync: read errors mapping "/sys/class/net/enp3s1/address": No data available (61)     ERROR: address failed verification -- update discarded.     rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1052) [sender=3.0.9]          # cp  /sys/class/net/enp3s1/address /tmp   ## this works      I wonder why does `rsync` fail, and is it possible to copy the file with it?


title: Chainload syslinux from GRUB2 - show syslinux.cfg menu

text: I am using a Clonezilla live USB disk to reimage systems. In accordance to what is explained in http://clonezilla.org/fine-print-live- doc.php?path=clonezilla-live/doc/99_Misc/00_live-boot-parameters.doc my disks prompts me with the menu contained in `syslinux.cfg` for all systems except the very latest ones that are UEFI machines (and have the BIOS configured to boot from UEFI devices first) where I am prompted with the `grub.cfg` menu.      Given that I heavily customized my `syslinux.cfg` menu I would like to modify the `grub.cfg` file to only automatically chainload to syslinux so to show the `syslinux.cfg` menu in all cases.      Is this possible at all? How?      On the disk there is GRUB2 and my understanding (from looking around on the Internet) is that is shall be possible, but I did not understand yet how. Any help is appreciated.       **Edit:**   I would like to clarify that the system boots using grub without issues selecting any of the options that are in the `grub.cfg` menu by default as provided by Conezilla download, but what I would like to do is to show the menu of syslinux (in `syslinux.cfg`) instead of the default menu in `grub.cfg`      **Second edit, how I did it:**   In the end the proposed solutions did not work for me, so I simply made the 'EFI\boot' folder "unavailable" (renamed it); this way the UEFI boot fails and the system boots from syslinux as on the older system: no modification to the BIOS, no new menu, no chainload...


title: How do I know which library and man page will be found first?

text: With binaries, I can always do `which foo` to know which binary I am invoking with `$ foo`, but what about man pages? Is there a way to know the path of the man page will be loaded by default? Similarly, what about dynamic libraries? Is there any to find out the path of the `.so` file that will be loaded for a given library name? ## Update: I just learned about pkg-config, but I didn't see an option to ask it to output paths. Also, it looks like it requires having `.pc` files that specify paths. Still is this something that could help with this problem?


title: Stuck at "Attached SCSI removable disk" trying to install Linux Mint

text: I bought a new laptop the other day, and now i'm trying to dual boot Linux Mint with Windows 7, which is already installed. I initially used UNetBootin to put the .iso onto a USB. Rebooted with the USB, and chose the Live boot option. The install seemed to be running fine judging by the rapid rate of text that was flowing past my screen. It stopped at "[sdc] Attached SCSI removable disk" and refused to continue. the google search led me to this page, which also has no clear solution. http://ubuntuforums.org/showthread.php?p=11792569 I've installed fedora 16 via USB before, so I have at least a little experience. Here are my specs Toshiba Qosmio x770 i7 2670 QM NVIDIA GeForce GTX 560M TOSHIBA SSD 128GB TOSHIBA HDD 750GB I've tried 2 USB's so far in different ports and using other software to transfer the files to USB as well. I've also tried disconnecting everything but the USB from the other ports as well. Are there any other options that I haven't considered?


title: ZSH %m prompt escape not working as documented under Debian Linux

text: The `zshmisc` man page on my new Debian Squeeze install states, under `SIMPLE PROMPT ESCAPES`:               %m     The hostname up to the first `.'. An integer may follow the '%' to specify how     many components of the hostname are desired. With a negative integer, trailing     components of the hostname are shown.      When I include `%2m` in my prompt, I see differing behaviour between OSX and Linux. On OSX (10.7.3), running zsh 4.3.11, the prompt behaves as expected, showing the two leading components of the system hostname. On Debian, running zsh 4.3.10, the prompt still only shows the bare hostname. `hostname -f` on this system confirms that the full hostname is set correctly. Note also that the manpage for this zsh release says that %2m should be supported. Does anyone have any suggestions as to where to start debugging this?


title: Is there a list of NICs that work with linux?

text: I built a new computer and want to install Linux on it. I loaded a couple different flavors and they detect there is a NIC but it won't connect to the network. It looks like it tries and tries but never connects. Network is using DHCP so not getting an address shouldn't be the issue. I figured the drivers might be an issue but the NIC on the mobo didn't have linux drivers so I bought a PCI NIC that people seemed to not have issues with, by searching the internet. I bought a D-Link DGE-530T. I put it in and it's acting the same way. I install windows and the intgrated NIC works fine so it can't be the hardware itself. Anyone use this D-Link card before or anyone have any advice on what to try? Went to the D-Link site to get the latest drivers too. Also, looking at the README in the drivers folder, it references files that aren't even included so I don't get what that's about.


title: Is there a way to make git commit have -v as a default?

text: I have               git () { [ $1 = commit ] && command git commit -v "${@:2}" || command git "$@"; }      It makes `git commit` have `-v` as a default, otherwise pass on the params and do whatever the `git` command is. But it seems like something that could be shortened? fyi, I'm slimming down my `.bashrc` file. Down to 28 (mostly readable still) lines so far.


title: How can I unmount bad mounting?

text: I have did a wrong thing. I mounted `/dev/mapper/vgpool-lvstuff7` to `/` , that is bad. How can I unmount that thing?


title: Limiting access to a website based on IP address when .htaccess is not allowed

text: I am trying to limit access to a website to a small set of IP addresses. I am a regular user on the Mac OSX web server. My first attempt at limited access was to create an `.htaccess`               order deny,allow     deny from all     allow from 192.168.0.1      where 192.168.0.1 is the IP address of the machine I want to allow in the sub directory of the website that I want to limit access to. As far as I can tell, the `.htaccess` file does nothing since I can access files in the sub- directory from both 192.168.0.1 and 192.168.0.2. Presumably the administrators of the web server have not enabled .htaccess override. In the top level directory of the website is a file called `.www_access`:               Options +Includes      I cannot find any information about this file. Copying the file to the sub- directory and adding the `.htaccess` stuff to give a `.www_access` of:               Options +Includes     order deny,allow     deny from all     allow from 192.168.0.1      sort of works. I can access the files in the sub-directory from 192.168.0.1 and cannot access them from 192.168.0.2, but when I try and access from 192.168.0.2 I get a "500 internal server error" and I was expecting a "403 access forbidden". Adding an error document redirect to `.www_access`               Options +Includes     ErrorDocument 500 http://www.google.com     order deny,allow     deny from all     allow from 192.168.0.1      has no effect. Given I have no idea what `.www_access` is doing, I am not sure I should be going down this route. Is it possible to limit access to a website to a small set of IP addresses if the web server does not support `.htaccess` files? The web server has PHP installed, but doesn't see to allow web pages to use it. If I create a php test file               #! /usr/bin/php     <?php     phpinfo();     ?>      and then ssh into the web server I can run it from the command line and get lots of information. If I then try and accesses it from a browser, I just get the code back. I think there are other scripting languages installed on the webserver, but as far as I can tell none are accessible from the web.


title: Shell Script to capture file name and file size in CSV format

text: I have number of zip files in a certain folder. I want to capture file name and the size of the file in a csv format containing file names and sizes, one file per day. The file names do contain the date. Files are in `/somedirectory/archive/test`               -rw-rw-r--+ 1 AAAA AAAA 9.3M May  30 17:09 XXXXX_20140530_0401_28.txt.gz     -rw-rw-r--+ 1 AAAA AAAA 9.3M May  30 17:09 XXXXX_20140530_0401_29.txt.gz     -rw-rw-r--+ 1 AAAA AAAA 9.3M May  31 17:09 XXXXX_20140531_0401_01.txt.gz      Now I want to crate a cronjob to run everyday and capture the same csvs. test30052014.csv               "XXXXX_20140530_0401_28.txt.gz","9.3","May 30"     "XXXXX_20140530_0401_29.txt.gz","9.3","May 30"      test31052014.csv               "XXXXX_20140531_0401_01.txt.gz","9.3","May 31"


title: Netcat (nc6) - Minimal IPv6 only TCP Server and Client

text: Im am trying to set up a basic IPv6 only echo-server using netcat (or rather nc6). Client and server are both in the same local network. However, the client quits immediately: * * * IPv6-Server:               $ nc6 -6 -vv --continuous --exec cat -l -p 5555     nc6: listening on :: 5555 ...      IPv6-Client:               $ nc6 -6 -vv fe80::213:33ff:feab:ff5d 5555     nc6: fe80::213:33ff:feab:ff5d (fe80::213:33ff:feab:ff5d) 5555 [5555] open     nc6: using stream socket     nc6: using buffer size of 8192     nc6: error reading from remote: Transport endpoint is not connected     nc6: connection closed (sent 0, rcvd 0)     nc6: readwrite returned -1     nc6: closed local     nc6: closed remote     $       Whats the issue?   Should I configure the server to listen to incoming connections only on one of its interfaces? (how?) * * * IPv4 Version works just fine: IPv4-Server:               nc6 -vv --continuous --exec cat -l -p 5555     nc6: listening on :: 5555 ...     nc6: listening on 0.0.0.0 5555 ...     nc6: connect to 192.168.1.35 5555 from xyrobert.local (192.168.1.35) 37928 [37928]     nc6: using stream socket     nc6[7502]: executing 'cat'     nc6[7502]: using buffer size of 8192     nc6[7502]: read 4 bytes from remote     nc6[7502]: wrote 4 bytes to local     nc6[7502]: read 4 bytes from local     nc6[7502]: wrote 4 bytes to remote      IPv4-Client:               nc6 -vv 192.168.1.35 5555     nc6: kearney.local (192.168.1.35) 5555 [5555] open     nc6: using stream socket     nc6: using buffer size of 8192     Hi!     nc6: read 4 bytes from local     nc6: wrote 4 bytes to remote     nc6: read 4 bytes from remote     Hi!     nc6: wrote 4 bytes to local


title: Remove all lines except D

text: I have scenario where my three huge files `Test.txt` , `Test1.txt` and `Test2.txt` has following details.               H|||||||||||||||||||||||     D||||||||||||||||||||||||     D|||||||||||||||||||||||     H|||||||||||||||||||||     D||||||||||||||||||||||||     D||||||||||||||||||||||||     T||||||||||||||||||||||||      I have to delete all except D lines. It should look like below in all my three files.(more than 10 GB)               D||||||||||||||||||||||||     D|||||||||||||||||||||||     D||||||||||||||||||||||||     D||||||||||||||||||||||||      So after retaining only D's lines in `Test.txt`, `Test2.txt` and `Test3.txt`, I have to merge those into new file. I have done the above operation using sed.               sed '/^\('D'\)|/!d' $Filename.txt >>  $NewFilename.txt      But because of huge file its taking very long time. Can we do this operation using any other command in efficient way?


title: Need to add virtual interface in Suse Enterprise Server edition permanently

text: How can I add virtual interface in SUSE Linux Enterprise Server 11 permanently?


title: How do I start smbclient from a script in Linux?

text: I want to be able to quickly start smbclient to a specific directory without typing or copying it to the shell command line, but just sticking it in a script doesn't seem to work...               #!/bin/csh     smbclient -W blah -U name -D "really long directory location" server/service      I've made it executable, but when I run it via ./smbcommand it does nothing. Normally if I execute it from the command line, it asks for a password.


title: How to set up FAX modem card on OpenBSD?

text: I found a modem card in a dumpster yesterday. It's a Conexant RD01-D270 also marketed as "Dell / Conexant N11846 Modem Card". It still works, I've tested this on Linux, but I'd like to use it in my OpenBSD machine, that handles all my routing, firewalling, access-pointing (is that even a word?). All I have to do, is connect a telephone cable to it. But how do I talk to it from OpenBSD (to get into AT-command mode), and how do I set things up so I can send faxes (both ASCII and `.ps` or something) and receive them? Pointing me to a tutorial, etc. would be great. It seems there's quite a lot of them around, although the technology is clearly past its prime. They're sold on eBay in large numbers for next to nothing.


title: Are there any ways or tools to dump the memory cache and buffer?

text: As the title, I want to check out what files are loaded in buffer. Just so it's clear, the buffers & cache I'm referring to are what show up when you run the `free -m` command:               $ free -m                  total       used       free     shared    buffers     cached     Mem:          7800       7671        128          0        291        724     -/+ buffers/cache:       6655       1144     Swap:         5823        613       5210


title: How does this su -c "..." command seem to pass two commands instead of one?

text: I am trying to understand the script below and I am confused about the su line. I understand the postgres command line arguments. when I do `man su` the manual says > -c, --command=COMMAND pass a single COMMAND to the shell with -c However the line with the `su - postgres -c ...` seems to contain two commands   * first one setting the LD_LIBRARY environment variable    * second one calling pg_ctl  So are there two commands being passed with -c or one ?               start()     {             echo $"Starting PostgreSQL 9.1: "             su - postgres -c "LD_LIBRARY_PATH=/opt/PostgreSQL/9.1/lib:$LD_LIBRARY_PATH /opt/PostgreSQL/9.1/bin/pg_ctl -w start -D \"/opt/PostgreSQL/9.1/data\" -l \"/opt/PostgreSQL/9.1/data/pg_log/startup.log\""                  if [ $? -eq 0 ];             then                     echo "PostgreSQL 9.1 started successfully"                     exit 0             else                     echo "PostgreSQL 9.1 did not start in a timely fashion, please see /opt/PostgreSQL/9.1/data/pg_log/startup.log for details"                     exit 1             fi     }


title: Bash: Zipping/grouping files by common substring

text: I have about 100 files. They are named like this.               3000_ABCD_XXXXXXX.csv     3000_ABCD_YYYYYYY.csv     3000_ABCD_XYXYZYZ.csv          3000_EFGH_XXXXXXX.csv     3000_EFGH_YYYYYYY.csv     3000_EFGH_XYXYZYZ.csv          3000_IJKL_XXXXXXX.csv     3000_IJKL_YYYYYYY.csv     3000_IJKL_XYXYZYZ.csv      Currently I'm zipping each file individually but I want to group them based on their common substring like for example `ABCD.zip` will store               3000_ABCD_XXXXXXX.csv     3000_ABCD_YYYYYYY.csv     3000_ABCD_XYXYZYZ.csv      `EFGH.zip` will store               3000_EFGH_XXXXXXX.csv     3000_EFGH_YYYYYYY.csv     3000_EFGH_XYXYZYZ.csv      etc. I'm very new to Unix/Bash scripting. Could anyone point me in the right direction? Edit: `ABCD`,`EFGH`,`IJKL` are not known in advance. Their position and width within the file name is guaranteed, though.


title: Cryptsetup: pre-fill the partition with random data

text: It says it is an optional step, but it is recommended to do this, it improves encryption to pre-fill the partition with random data. What brings security filled with random data? Is it more difficult to decrypt the partition? I do not understand why it provides better security. That provide greater security aspects.


title: How can I determine if running tar will cause disk to fill up

text: If I run `tar -cvf` on a directory of size 937MB to create an easily downloadable copy of a deeply nested folder structure, do I risk filling the disk given the following `df -h` output:               /dev/xvda1            7.9G  3.6G  4.3G  46% /     tmpfs                 298M     0  298M   0% /dev/shm      Related questions:   * If the disk might fill up, why i.e. what will Linux (Amazon AMI) and/or `tar` be doing under the hood?    * How can I accurately determine this information myself without asking again?


title: troubleshooting bip proxy server configuration: FATAL: mkdir($HOME/.bip/logs) No such file or directory

text: I am trying to set up `bip` on a proxy server (ie AWS EC2 instance - a virtual private server) and when I try running it with the command:               'sudo /usr/bin/bip -f .bip/bip.conf`      from my `/home/user` directory, I receive the following message:               FATAL: mkdir($HOME/.bip/logs) No such file or directory      I believe my `~/.bip/bip.conf` file is incorrect, because I can run the command from `~/.bip/bip_copy.conf` where `bip_copy.conf` is the default configuration file. My `~/.bip/bip.conf` file is below. `echo $HOME` returns `/home/ubuntu` (where I have been calling my commands). Also my `~/.bip/` directory contains my `bip.conf` file and `logs` directory. I have been following these tutorials as a guide, but they have not helped me troubleshoot this situation: http://blog.dustinkirkland.com/2011/08/keep-one-ssh-tunnel-to-bip-proxy- server.html http://nerderati.com/2010/11/perpetual-irc-the-proxy-edition/ https://wiki.linaro.org/Resources/HowTo/BIP My `bip.conf`:               # bip default config file.     # Thou shoult change thy password          ip = "0.0.0.0";          # To connect a client to bip, try the port below, and     # be sure to set the password to the value     # specified in the network you want to connect to.      port = 6667;          # If you set this to true, you'll only be able to connect to bip     # with a SSL capable IRC client. Be sure to generate a certificate     # for bip with 'make cert'     client_side_ssl = false;          log_level = 2;          pid_file="$HOME/.bip/bip.pid";          # This is where logs go. Channel and private messages will use that     # configuration value as a prefix, and then log_format to determine     # full log filename.     log_root = "$HOME/.bip/logs";          # Log format allows you to make log filenames depend on the log line's     # attributes. Here's a list :     # %u -> user name     # %n -> network name     # %Y -> 4 digit year     # %m -> 2 digit month     # %d -> 2 digit day     # %c -> destination (#chan, privates, ...)     #log_format = "%n/%Y-%m/%c.%d.log";          # Sets the frequency (in seconds) of log syncing (real write to kernel)     log_sync_interval = 5;          # Makes bip send the log of each channel and privates while     # you were not connected to the proxy upon connection.      #backlog = true;        # enable backlog     # backlog_lines = 10;       # number of lines in backlog, 0 means no limit     # backlog_always = true;        # backlog even lines already backlogged     backlog = true;     backlog_lines = 200;      backlog_always = false;     backlog_reset_on_talk = false;     # backlog_reset_connection = false;     backlog_msg_only = true;           # If blreset_on_talk talking on an irc network has the same effect of issuing     # /bip blreset, meaning that stuffed logged before the command won't be read     # back on backlog     #blreset_on_talk = false;          # Network definition, a name and server info          network {         name = "freenode";         server { host = "irc.freenode.net"; port = 6667; };     };               # Configuration example with one user who connects to two irc networks     # To use the multi-server feature:     #  - define the connections     #  - chose and setup a different login for each connection     # on your irc client:     #  - Use the multi server feature of your client, the server beeing each time     #    the server where bip is running. In your client setup server password to:     #      username:password:connectionname     #  - do not store the password in clear here, use the bipmkpw util to generate     # a hash          # User structure is grouping information for a given user     user {         # The name in bip of the user         # This is used by bip only         name = "lucas";              # this user's password (md5(md5("tata"))) with seed - generated by bipmkpw         password = "f3d93275fa....";                   # SSL certificates checking mode for user:         # - "none" to accept anything;         # - "basic" to accept if the certificate is contained in the store;         # In "basic" mode, encountered untrusted certificates can be added to         # the store interactively by connecting a client and "trusting" them.         # - "ca" to do a complete certificate chain checking with the objects         # in the store below (you have to put in it every cert, CRL, up to the         # root CA). You have to build your store manually, so you may prefer         # using "basic" unless you're a crypto zealot...         ssl_check_mode = "none";              # Location of the user's store for SSL certificate check         # In "basic" mode, that must point to a single file with all trusted         # certs concatenated together (the interactive "trust" appends to this         # file).         # In "ca" mode, it's a directory of a standard openssl store; you must         # put PEM objects (certificates, CRLs...) with .pem extension and run         # `c_rehash .' in it         # ssl_check_store = "/home/bip`debian/.bip/trustedcerts.txt";              # These will be the default for each connections         default_nick = "testNickname";         default_user = "testNickname";         default_realname = "lucas";                        connection {             name = "freenode";              # used by bip only             network = "freenode";           # which IRC network to connect to          # Autojoined channels:             channel { name = "#gslug"; };             channel { name = "#help"; };     #       channel { name = "#help"; backlog = false; };         };     };


title: Why am I getting a Non-existent class error in PHP on Fedora?

text: I've set up an Nginx/PHP (both installed from Yum) environment on my Fedora 15 install, but I've run into a strange issue. I have some projects that use Codeigniter (1.6), but they keep getting the following error: > Non-existent class: Content The full output almost looks as if PHP starts parsing the Content.php file, but then stops partway through: > {$var})) { $this->{$var} = ''; } $this->{$var} .= ob_get_clean(); } } > > An Error Was Encountered > > Non-existent class: Content The contents of Content.php are:               <?          class Content {              function capture() {         ob_start();         }              function __get($name) {         return '';         }              function content_for($var) {         if (!isset($this->{$var})) { //It stops on this line             $this->{$var} = '';         }         $this->{$var} .= ob_get_clean();         }          }      What's odd to me is that this exact same setup works just fine on Ubuntu (the projects using this setup have been live for some time, I've also set it up on several Ubuntu machines for development and have never run into this problem. I also know that PHP itself works, in general, as I can run a basic site that uses a little bit of PHP, as well as some projects that use a different framework. From what I can tell, it runs through a number of other PHP files before getting to Content.php (it has to, just to even get to the point that tells it to load Content to begin with), so PHP works, at least for a time, but then it seems to suddenly die. There aren't any other errors in the log files, either. What is causing this error, and how can I fix it?


title: Every time I restart my computer I need to restart Bluetooth service, how can I fix this?

text: Every time I turn on, restart or wake up my notebook or I have to restart my Bluetooth service in order for me to use it. But once I restart the service everything is fine. How can I delay the start of the Bluetooth service to keep me from having to restart it? OS/ Linux Mint 11


title: How to I fetch the very latest DNS records from a recently updated domain?

text: I recently updated my domain and added CNAME and TXT records, and don't want to wait for the changes to propogate. How can I go directly to the source and query the DNS records to verify everything is correct? I tried               dig @dns1.name-services.com mydomain.com any      because that is my name service (enom.com), but it still displayed the old info. Here are my settings that will not propogate: http://i.imgur.com/MvYJUTq.png


title: vim regex not need \ to escape

text: In Vim is there an option to write regexs in the same style as Awk for example      `/sp\\{0,\\}/`   Would be   `/sp{0,}/`


title: Can I use tail with a file both as input and destination?

text: I have a log file that gets big fast. I tried using `tail` with this syntax but it didn't work.               tail logfile.log -n 100000 > logfile.log      The output file is 0 bytes and blank. What am I doing wrong? Will I need to use an intermediary file?