title: Send Email without any settings fast?

text: I am looking something like this on dummy comp, sending email fast without any login. I mean that I do not want to set up any .muttrc or any other settings. I want just a short msg to person A from noReply@something.com. Is it possible and how?               sendMail -r A@gmail.com -msg "I am coming, x"          sendmail -r B@gmail.com -msg "here is the project" -a file.tgz      Is there any easy-to-use -unix-program for this kind of spontaneuous communication (without any extra hassle)? **[Update]** Suppose that I have only Network connection to the internet, now I want to send a msg fast to my friend to some email XYZ. I can ping it and I can use morse. Can I combine morse/ping to transmit msg to my friend? Or is there some easier way to transmit a msg without hassle to set up all kind of postfix etc? If there was some service that collected all morse-ping msgs and then sent them to emails -- yes then it would be possible, investigating.


title: Not compiled gcc, failed configure-target-libquadmath

text: Trying to compiling gcc-4.8.2 after downloading:               ../gcc-4.5.2/configure \         --target=$LFS_TGT --prefix=/tools \         --disable-nls --disable-shared --disable-multilib \         --disable-decimal-float --disable-threads \         --disable-libmudflap --disable-libssp \         --disable-libgomp --enable-languages=c \         --with-gmp-include=$(pwd)/gmp --with-gmp-lib=$(pwd)/gmp/.libs \         --without-ppl --without-cloog          make      results in:               Error: recipe for target 'configure-target-libqaudmath'      How can I solve this?


title: Ubuntu 13.10 has suddenly failed to boot!

text: Yesterday evening, I don't know what happened but my system (Ubuntu 13.10) didn't boot. Since then I tried many times but the same issue as I explain below. See I boot my system. GRUB menu comes; I select ubuntu (to boot); then as normal the Ubuntu symbol comes but it takes a long time there & then prompt appears in a terminal with the messages as shown below:               Gave up waiting for root device. Common problems:          - Boot args (cat /proc/cmdline)             -check rootdelay = (did the system wait long enough?)             -check root = (did the system wait for the right device?)          - Missing modules (cat /proc/modules ; ls /dev)          ALERT! /dev/disk/by-uuid/da5b7ccd-e161-4460-4012-1b54eaf31faa doesn't exist.     Dropping to a shell!          BusyBox v1.20.2 (Ubuntu 1:1.20.0-8.1 ubuntu1) built-in shell (ash)          Enter 'help' for a list of built-in commands.          (initramfs)_      From the message, I felt to check whether the root device (/dev/sda5 is root partition in my case) is O.K. or not. I booted live usb of Ubuntu 14.04.1 (that I downloaded yesterday). I mounted all the partitions of the hard-disk installation having Ubuntu 13.10 (/home, /, /var/, /boot, /tmp). To my surprise, root partition didn't contain anything but others had data. **_root partition was empty !!!!_** As the above output mentioned `ALERT! /dev/disk/by- uuid/da5b7ccd-e161-4460-4012-1b54eaf31faa doesn't exist`, I thought to check if that's the UUID of the root partition & that partition is what it is saying that doesn't exist!               ubuntu@ubuntu:~$ sudo lsblk -o name,mountpoint,label,size,uuid     NAME    MOUNTPOINT LABEL             SIZE UUID     sda                                111.8G      ├─sda1             System Reserved   100M 6E60F4D460F4A3CD     ├─sda2             c_drive          31.2G 0E441C8F441C7BA1     ├─sda3             d_drive          36.9G 100EECEB0EECCB34     ├─sda4                                 1K      ├─sda5             root               14G 5dd68245-345c-44f4-8c22-a6779472e388     ├─sda6             boot              314M 84e87924-cc93-45d9-82d3-39a925110a2b     ├─sda7                               2.1G      ├─sda8             var               1.9G f607795c-5f8c-4c14-a4d8-2d0e71d0319a     ├─sda9             tmp               1.9G a3f24d77-7c45-4a3d-b153-478d8261c338     └─sda10            home             23.7G 735de76f-65f3-4963-ad0e-44a4a2b34e97     sdb                                  1.9G      └─sdb1  /cdrom                       1.9G bc426250-9c5d-4d9e-8b15-43bafa7bb4ac     sr0                                 1024M      loop0   /rofs                        952M      ubuntu@ubuntu:~$      And I find that the UUID of the root partition is not that what the system mentioned while booting. To reconfirm I checked the listing of the directory `/dev/disk/by-uuid`. (This is the directory that the above output mentioned in "ALERT")               ubuntu@ubuntu:~$ ll /dev/disk/by-uuid     total 0     drwxr-xr-x 2 root root 220 Jul 29 22:35 ./     drwxr-xr-x 6 root root 120 Jul 29 22:35 ../     lrwxrwxrwx 1 root root  10 Jul 29 22:35 0E441C8F441C7BA1 -> ../../sda2     lrwxrwxrwx 1 root root  10 Jul 29 22:35 100EECEB0EECCB34 -> ../../sda3     lrwxrwxrwx 1 root root  10 Jul 29 22:35 5dd68245-345c-44f4-8c22-a6779472e388 -> ../../sda5     lrwxrwxrwx 1 root root  10 Jul 29 22:35 6E60F4D460F4A3CD -> ../../sda1     lrwxrwxrwx 1 root root  11 Jul 29 22:35 735de76f-65f3-4963-ad0e-44a4a2b34e97 -> ../../sda10     lrwxrwxrwx 1 root root  10 Jul 29 22:35 84e87924-cc93-45d9-82d3-39a925110a2b -> ../../sda6     lrwxrwxrwx 1 root root  10 Jul 29 22:35 a3f24d77-7c45-4a3d-b153-478d8261c338 -> ../../sda9     lrwxrwxrwx 1 root root  10 Jul 29 22:35 bc426250-9c5d-4d9e-8b15-43bafa7bb4ac -> ../../sdb1     lrwxrwxrwx 1 root root  10 Jul 29 22:35 f607795c-5f8c-4c14-a4d8-2d0e71d0319a -> ../../sda8     ubuntu@ubuntu:~$       So, what's that alert - `ALERT! /dev/disk/by- uuid/da5b7ccd-e161-4460-4012-1b54eaf31faa doesn't exist`? What doesn't exist? Just to troubleshoot: Yesterday before the issue happened, I'd booted live usb of Ubuntu 14.04.1. Then I mounted the partitions of Ubuntu 13.10 of my hard disk. Can the problem occur had I not unmounted them before shutting down my system or was it that the system wasn't properly shutdown !! I don't know what had happened. I was going to install Ubuntu 14.04.1 on my laptop to get the things working back but thought to see if it it can be resolved now only because I never expected my system to get broken this way. I'd earlier faced issues with booting but that was bootloader thing that I learned to resolve; this issue I want to get it resolved too so that suppose next time anything like this happens, I do have the solution. It was fortunate that I'd bootable usb having Ubuntu 14.04.1 beside me this time from which I've booted (live install) & writing this Question. > EDIT#1 This edit is after I tried resolving the issue from GRUB menu. As the earlier message said that root device couldn't be located, so I when I entered GRUB menu, there I selected Ubuntu O.S. & pressed "e" to edit the commands before booting. Below is what the commands are for the O.S. (I've typed by hand the below, so a typo can be there)               setparams 'Ubuntu'          recordfail             load_video             gfxmode $linux_gfx_mode             insmod gzio             insmod part_msdos             insmod ext2             set root='hd0,msdos6'     if [$feature_platform_search_hint=xy];     then              search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci\     0,msdos6 84e87924-cc93-45d9-82d3-39a925110a2b          else     search --no-floppy --fs-uuid --set=root 84e87924-cc93-45d9-82d3-39a925110a2b          fi          linux /vmlinuz-3.11.0-12-generic root=UUID=da5d7ccd-e161-4460-4012-1b54eaf31faa.ro quiet splash                   $vt_hand off              initrd /initrd-img-3.11.0-12-generic      Now, see here the command in the end `linux /vmlinuz-3.11.0-12-generic root=UUID=da5d7ccd-e161-4460-4012-1b54eaf31faa.ro quiet splash` Here the UUID it mentions for root is the one it has shown in error previously in BusyBox shell. That UUID only it told that doesn't exist. So, now I replaced this UUID with the one that `lsblk` command has output for root device (sda5).i.e., I replace that with 5dd68245-345c-44f4-8c22-a6779472e388. Now when I boot with this setting, the previous errors didn't come. Shortly the BusyBox shell appeared signifying that this time it had no problem locating the root device. This BusyBox shell has the below content:               BusyBox v1.20.2 (Ubuntu 1:1.20.0-8.1 ubuntu1) built-in shell (ash)          Enter 'help' for a list of built-in commands.          (initramfs)_      So, no error or alert this time!! That's a good sign. Also, I checked by replacing the root device from 'hd0,msdos6' to 'hd0,msdos5'. See, my root device (as is clear from the previous command outputs) is sda5, but the GRUB menu command line showed it as sda6. (I suppose hd0,msdos6 means sda6) Also in the command line, there is reference for the boot device having UUID 84e87924-cc93-45d9-82d3-39a925110a2b. This way I've made a positive advancement towards resolving the issue but what next!! I have to install Ubuntu 14.04.1 LTS on my system. So, I don't have much time to try & check different methods. I will appreciate if I get quick reply.


title: what's the format spec for `ss -D `?

text: Background of the question: I am trying to sum up the total bandwidth, but `ss -i` cleverly converted numbers to more readable format like Kbps/s or Mbps/s, which is not accurate. So does `ss -o` with timers. I looked the source code and find the conversion is hardcoded. So I need raw number from somewhere. From `man ss`               -D FILE     Do not display anything, just dump raw information about TCP sockets to FILE after applying filters. If FILE is - stdout is used.      I don't see the format documented anywhere, I am pretty n00b in C so quickly got lost track in iproute2 source code jungle. Also this raw dump is heavily depends on kernel I think. Any kernel guru can give me some hints?


title: Name resolution doesn't work, but nslookup does

text: I am having a very strange problem with my installation of Solaris 11. DNS resolution just won't work, but strangely enough, nslookup does and connectivity is fine:               root@solarisxyz:~# ping stackexchange.com     ping: unknown host stackexchange.com     root@solarisxyz:~# nslookup stackexchange.com     Server:         10.x.x.x (DNS)     Address:        10.x.x.x#y          Non-authoritative answer:     Name:   stackexchange.com     Address: 64.34.119.12          root@solarisxyz:~# ping 64.34.119.12     64.34.119.12 is alive      Relevant sections of files:   * **/etc/resolv.conf** : (this is the same thing our Linux boxes have)              domain us.oracle.com     nameserver 10.x.x.x     nameserver 10.x.x.x          * **/etc/hosts** :              # ::1 solarisxyz localhost (commented out)     127.0.0.1 localhost loghost solarisxyz        * **/etc/nsswitch.conf** :              hosts:    files dns     # pretty much everything else set to files


title: gnome-shell-extension-dock doesn't work in Fedora 16

text: This extension is supposed to make a Unity-like launch bar appear in the Fedora 16 desktop. I installed it from the Fedora repositories, logged out, logged in, and it doesn't appear. gnome-tweak-tool doesn't even list it as installed: ![gnome-tweak-tool screenshot](http://i.stack.imgur.com/UUKmL.png) The file listing for gnome-shell-extension-dock is:               /usr/share/glib-2.0/schemas/org.gnome.shell.extensions.dock.gschema.xml     /usr/share/gnome-shell/extensions/dock@gnome-shell-extensions.gnome.org     /usr/share/gnome-shell/extensions/dock@gnome-shell-extensions.gnome.org/extension.js     /usr/share/gnome-shell/extensions/dock@gnome-shell-extensions.gnome.org/metadata.json     /usr/share/gnome-shell/extensions/dock@gnome-shell-extensions.gnome.org/stylesheet.css


title: Remote support: routing RDP over ssh tunnel?

text: I want to replace TeamViewer with a FOSS solution. I need to support some remote computers. I have a working SSH tunnel set up between two computers using a middleman server like this:               Kubuntu_laptop--->nat_fw--->Debian_Server<--nat_fw<--Kubuntu_desktop      This SSH tunnel is working now. Next I want to connect to the desktop on "Kubuntu_desktop" from "Kubuntu_laptop" using the SSH tunnel. Regarding the connection for this leg:               Debian_Server<--nat_fw<--Kubuntu_desktop      Here is how it is established:               autossh -M 5234 -N -f -R 1234:localhost:22 user@mydebian.com -p 22      I cannot change the existing monitoring port (5234) or the remote (- R) port number (1234 in this example). Can vnc tunnel over this existing SSH connection? **UPDATE:** the answer is `no`; I need to set up a new SSH tunnel for use with vnc as described here. Regarding the connection for this leg:               Kubuntu_laptop--->nat_fw--->Debian_Server      I can use any SSH parameters required. I cannot open up any ports on the routers/firewalls. x11vnc server was recommended to me, so I'm testing with that. It is running on the desktop and listening on port 5900. However, I did not use any command line options when starting x11vnc, so it probably isn't configured correctly yet. Will vnc work over this existing SSH connection? Notice that there are no ports 5900 defined. And note that I cannot change the port number for the -R option as I mentioned above. I have a lot of questions about how to get this working, but one is whether vnc can listen on the existing port (-R 1234 in the example above). And if so, can I still ssh into that box as I do now? **Here's what I tried so far:** On remote desktop (where x11vnc server is installed):               tester@Kubuntu_desktop:~> autossh -M 5234 -i ~/.ssh/my_id_rsa -fNR 1234:localhost:5901 user@mydebian.com      make sure x11vnc server is running on port 5901:               tester@Kubuntu_desktop:~> x11vnc -autoport 5901      On my laptop:               sudo ssh -NL 5901:localhost:1234 -i ~/.ssh/admin_id_rsa admin@mydebian.com      connect local vnc client to localhost port 5901 Open KRDC in Kubuntu_laptop and connect to (vnc)               localhost:5901      I'm getting a failed connection - `server not found`.


title: IO redirection and the head command

text: I was trying to quickly edit an `.hgignore` file from the Cygwin bash shell today, and I added a line that was a mistake. I'm not sure if this was the best way to do it, but I quickly thought of using `head -1 .hgignore` to remove the offending line (I had previously only had one line in the file). Sure enough, when executed it gives the first line as the only output. But when I tried to redirect the output and rewrite the file using `head -1 .hgignore > .hgignore`, the file was empty. Why does this happen? If I try appending instead, `head -1 .hgignore >> .hgignore`, it appends correctly but this is obviously not the desired result. Why does a truncating redirect not work in this case?


title: Why does `cat`ing a file into itself erase it?

text: > **Possible Duplicate:**   >  IO redirection and the head command I just wanted to remove all but the first line of a file. I did this:               head -1 foo.txt      ... and verified that I saw only the first line. Then I did:               head -1 foo.txt > foo.txt      But instead of containing only the first line, `foo.txt` was now empty. Turns out that `cat foo.txt > foo.txt` also empties the file. Why?


title: How to write to ext2 image without having root access

text: I have been able to mount a ext2 image without having root access by adding an entry to /etc/fstab. However, I am not able to modify this image (copy a new file to it) without having sudo permissions. Is there a way to achieve this without having sudo permissions?


title: Create alias to change directory and list contents

text: I want to change the behavior of the cd command so that it changes to a directory and lists the files in that directory, but I can't seem to get it to work. I have tried the following with no success:                % alias cd='cd $@; ls'      It lists the files of the directory as if it had changed directory but when it is done executing it leaves me in the same directory.


title: How do I check the network speed right now?

text: I know about `vnstat` and that tracks over the hour/day/months. I would like to see the network speed right now. As in for a duration of a second or at most a minute. Kind of like how top can show me the current CPU usage. How might I check that? My port is not called `eth0`, it's `em2`, so I hope that doesn't conflict with anything.


title: how to pipe audio output to mic input

text: I've looked all over the internet for a clean way to reroute the audio output of my computer (i.e. what I'd hear from the speaker) to my microphone's input. Possibly, I'd like to do this at low level (e.g. using ALSA). I'm basically looking for an equivalent of               pacmd move-sink-input #index #sink      that gets some audio input and pipes it to the microphone. If it's still not clear, my final goal would be, for example to play a video on Youtube and let a friend of mine listen through Skype. I'd like that kind of flexibility.


title: Save lines to different files based on the date

text: How can I force a re-evaluation of this each time?               cat > $(date '+%H-%M-%S').log      So that when I first output something it gets written to one file, and after a few seconds I make another ouput and it will be saved in a new file. `cat` just symbolizes a always running program


title: Being kicked out upon logging in using ssh

text: Does anyone know why I am kicked out immediately after everytime I log in? Here is the output: > $ ssh tim@xxxx.xxx.xxx.xxx > > Password: > > Linux xxxx 2.6.32-24-server #43-Ubuntu SMP Thu Sep 16 16:05:42 UTC 2010 > x86_64 GNU/Linux Ubuntu 10.04.1 LTS > > Welcome to the Ubuntu Server! > >   * Documentation: http://www.ubuntu.com/server/doc > > > You have mail. > > Last login: Fri Oct 1 10:24:01 2010 from xxxx.xxx.xxx > > You are not authorized to log into this server > > Connection to xxxx.xxx.xxx.xxx closed. If I am indeed not authorized to log into this server, why I receive the typical information upon logging in, such as the information about the server, the welcome message and the last time I logged in? How can I solve this problem? Thanks and regards!


title: mapping <C-F9> in gvim: no response

text: I'm trying to map `<C-F9>` in gvim (note the "g"). No response. Neither `<C-V><C-F9>` nor `<C-K><C-F9>` produce any response either so I suspect it's not sending any keycode at all if that's possible? How would I set this up correctly? I've tagged this X11 for now as I suspect it's not gvim at fault here but something lower-level and I don't think it's a termcap issue as there's no terminal involved. That leaves X11 as a likely culprit.               $uname -a     Linux box 2.6.32-45-generic #102-Ubuntu SMP Wed Jan 2 22:38:04 UTC 2013 x86_64 GNU/Linux     $gvim -version     VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Nov 15 2012 00:32:35)     Included patches: 1-330     Compiled by buildd@     Huge version with GTK2-GNOME GUI.      ...      Can post more info on request.


title: Loop through array

text: I have records in `list.txt` (INPUT) as               List of animals SET 1=Dog 2=Crow 3=Snake Pet,bird,reptile     List of Countries SET 1=France 2=Singapore 3=Columbia Europe,Asia,SouthAmerica     List of Parts SET 1=KeyBoard 2=Speaker 3=LEDpanel Computer,AudioPlayer,Television     List of Cities SET 1=Amsterdam 2=KualLumpur 3=Paris Netherlands,Malaysia,France      Want the last column of each line to be used as array for replacing the numbers 1,2,3 For eg. Use `Pet,bird,reptile` of first line to make `Pet=Dog` `bird=Crow` and `reptile=Snake`. So, the OUTPUT file would be               List of animals SET Pet=Dog bird=Crow reptile=Snake     List of Countries SET Europe=France Asia=Singapore SouthAmerica=Columbia     List of Parts SET Computer=KeyBoard AudioPlayer=Speaker Television=LEDpanel     List of Cities SET Netherlands=Amsterdam Malaysia=KualLumpur France=Paris      Using `awk`, I could split the last column as string of array. But unable to use the same to replace the numbers 1,2,3.


title: Command to output file content to stdout?

text: I know `cat` can do this, but its main purpose is to concatenate rather than just displaying the content. I also know about `less` and `more`, but I'm looking for something simple ( **not a pager** ) that just outputs the content of a file to the terminal and it's made specifically for this, if there is such thing.


title: Want to assign dedicated default gateway on Two NIC card on linux server

text: We have one server having two nic cards. Here we configured two separate networks on both nics and having different gateway. However our one sub-net is able to communicate to outside network second one not able to communicate with outside network.


title: How to search file based on DAY of week

text: Actually I need to search for files and folder that were created in 2012 on Friday of every month. I did some attempts using the FIND command but it didn't work.


title: how to pass the result of `find` as a list of files?

text: The situation is, I have an MP3 player `mpg321` that accepts a list of files as argument. I keep my music in a directory named "music", in which there are a few more directories. I just want to play all of them, so I run the program with               mpg321 $(find /music -iname "*\.mp3")      . The problem is, some file names have whitespace in them, and the program breaks those names into smaller parts and complains about missing files. Wrapping the result of `find` in quotes               mpg321 "$(find /music -iname "*\.mp3")"      does not help because all will become one big "file name", which is obviously not found. How can I do this then? If that matters, I am using `bash`, but will be switching to `zsh` soon.


title: Linux Mint advantages

text: recently a co-worker told me about his USB - bootable Linux Mint pendrive machine and I got interested in Linux Mint. As I am using mainly Ubuntu and ArchLinux I have to ask, is there any reasonable advantage or difference between Linux Mint (besides the Cinnamon or Mate desktop environments) and other distributions? Or in other words, why should I use Linux Mint?


title: Why pidof and pgrep are behaving differently?

text: I have a init script in `/etc/init.d/myservice` for initialize a service like this:               ...     start() {       ...       daemon /usr/sbin/myservice       ...     }          stop() {       ...       pgrep myservice       pidof myservice       ps -ef | grep myservice       ...     }      And when I try to stop the service, this is the output:               10000 10001     10000     root      10000     1  0 09:52 ?        00:00:02 /usr/sbin/myservice     root      9791   9788  0 10:06 pts/1    00:00:00 /bin/sh /sbin/service myservice stop     root      10001  9791  1 10:06 pts/1    00:00:00 /bin/sh /etc/init.d/myservice stop      root      9805   9796  0 10:06 pts/1    00:00:00 grep myservice      Is this expected? Why `pidof` is returning only the correct PID of the service that I want to stop and `pgrep` is returning the service PID and the PID of the init script? Can I rely on that `pidof` will always ignore the PID from the init script?


title: Disabling xscreensaver when firefox is playing HTM5 video

text: I find some questions talking about disabling xscreensaver with flash but no one about HTML5. Then, how to disable xscreensaver when firefox is playing an HTML5 vidieo and, if possible, only for some domain?


title: Zsh completion that is insensitive between `_` and `-`

text: I don't like typing underscores, and would like to type a dash instead, and have zsh autocompletion treat it like it could be either a dash or an underscore. Is this possible with built-in zsh capabilities, oh-my-zsh or something else? Would it be possible globally, and if not, would it be possible for a single autocompletion function? _Aside: I currently have a customized completion function for bashmarks that just translates underscores to dashes when providing possible completions, and would like to replace/improve it._


title: Keyboard-bound applications in Openbox

text: Following the template of another stack user I've bound a keyboard shortcut to toggle an application between hidden and fullscreen. The only problem is, **no matter what application I apply it to** , I have to manually focus it after it pops up. Here's the relevant portions of my config:               <keybind key="F10">       <action name="Execute">         <execute>wmctrl -x gvim -a gvim.alwayson -b toggle,fullscreen,hidden</execute>       </action>     </keybind>     ...     <application name="gvim"                  class="alwayson">       <focus>yes</focus>       <maximized>true</maximized>       <decor>no</decor>       <skip_taskbar>yes</skip_taskbar>     </application>      I've played with all the relevant-seeming openbox actions and wmctrl flags. ## Update A wmctrl solution remains elusive. However xdotool and a bashscript can toggle any application in a single command, which can then be bound to a key.


title: How to grep top most frequent error messages in a unix logfile

text: If I have a file example apache log file How to extract the top most frequent error messages in a unix log file with no timestamps the key is most frequent error message should come on top of the list


title: dmesg flooded with firewall logs

text: In my iptables, I have a rule which logs dropped packets:               -A INPUT -i eth0       -j   LOG  --log-prefix "FW: " --log-level 7     -A INPUT -i eth0       -j   DROP      And in `/etc/rsyslog.conf`, I have another rule which sends these logs to a dedicated file `/var/log/firewall.log`.               :msg, contains, "FW: "                    -/var/log/firewall.log     & ~      The `& ~` deletes the logs immediately, so that they don't flood `syslog` or other log files. This works well, except that it floods `dmesg` with those firewall logs (not `/var/log/dmesg` but the output of command `dmesg`). Is there a way to prevent these logs being shown in `dmesg` ?


title: Cannot mount filesystem under luks. Device does not exist

text: I made one big luks device and re-used it on my debian install, then i ran into some boot problems and i need to acess the filesystem. The problem is, i decrypt the luks device and when i try to mount the filesystem i cant.. it happened on debian rescue and another system rescue cd. What im missing here? Seems something simple.               root@sysresccd /root % mkdir /media/linux     root@sysresccd /root % cryptsetup luksOpen /dev/sda2 linux     Enter passphrase for /dev/sda2:      root@sysresccd /root % fdisk -l          Disk /dev/sda: 1000.2 GB, 1000203804160 bytes, 1953523055 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: 0x00002616          /dev/sda1   *        2048      616447      307200   83  Linux     /dev/sda2          616448  1851971583   925677568   83  Linux     /dev/sda3      1851971584  1953521663    50775040    7  HPFS/NTFS/exFAT               ...... **Luks \/**          Disk /dev/mapper/linux: 947.9 GB, 947891732480 bytes, 1851351040 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: 0x0005063d                  Device Boot      Start         End      Blocks   Id  System     /dev/mapper/linux1            2048    29102079    14550016   83  Linux     /dev/mapper/linux2        29102080  1851351039   911124480   83  Linux      There is 2 file systems under this luks device, / and /home               root@sysresccd /root % mount /dev/mapper/linux1 /media/linux      mount: special device /dev/mapper/linux1 does not exist      Actually, when i press tab to auto complete there is no linux1 and linux2. Whats wrong? Ive mounted lvm's this way before and nothing of this happened.


title: trigger udev rules from systemd

text: I have one of those hdds, that have a very aggressive power management. To prevent load cycles from rising in to critical numbers I wrote an udev rule:               SUBSYSTEM=="block", SUBSYSTEMS=="scsi", ATTRS{model}=="TOSHIBA MK2555GS", RUN+="/usr/bin/hdparm -B 200 /dev/%k"      The problem is, that this rule is not triggered aftr i wake my notebook from sleep. Therefore i have the following systemd service:               [Unit]     Description=root resume actions     After=suspend.target          [Service]     Type=simple     ExecStart=/bin/hdparm -B 200 /dev/sda          [Install]     WantedBy=suspend.target      I'd prefer the `ExecStart` command to be something like `/bin/udevadm trigger --subsystem-match="block"`. So I don't have to state the kernel name explicitly. If I do this command manually the power managment is adjusted correctly but it doesn't work from the systemd service. Is there a way to do this? btw I'm using arch-linux


title: Hewlett-Packard ScanJet 2200c on Scientific Linux 6.1 64bit

text: I have a:                 Bus 006 Device 002: ID 03f0:0605 Hewlett-Packard ScanJet 2200c      Scanner plugged in via USB to my notebook.   When I launch this command (no matter that I use it with a normal user or root, does the same):                 scanimage --format=tiff --resolution=150 --mode=color > a.tiff      The scanner just waits for ~30 sec then starts actually scanning, but it stops after going about ~8cm's.. (so it's scanning just the ~1/3 part of an A/4 paper..) but the scanned part looks good. So the problem is that why doesn't this scanner scans a full A4 paper size?      I can't find relevant logs..   UPDATE: I wanted to try out the scanner on a Win7Pro64bit machine.. I didn't found any drivers to it :D


title: Setting up a development environment in Ubuntu

text: I'm a long time Window user. Recently, I learned JavaScript/PHP/mySql and considered that Ubuntu Server will be the choice. I'll still work on Windows XP/7, though. Here's my idea   * Development Machine (XP/7): Where I do all the programming. The IDEs will be Spket (JavaScript) and Aptana (PHP). Along with other software like PhotoShop, Office...   * Server (Ubuntu Lucid): This is where I store my data, run my HTTP, email, FTP server... It will be a VPS. So simply put, I'll be working with Windows as a client (IDE, Client Email Software, FTP...) and Ubuntu as a server to manage my data (Mercurial, Apache, mySql...) I'm new, I wonder if there is already someone doing this and working with this mix of client/server. What are the possible downsides of this method? Is working over FTP with a VPS a good idea or not? I'm a solo-developer, I was thinking in the last few days of the best approach to work with the cloud. I do web development. Please reply with anything related and helpful, I would appreciate a lot developers that will write lengthy post about their working environment. I have exactly no specific idea in mind, just looking to make better. Thank you!


title: linux multiple internet connections load balancing with fail handling

text: I have two ISP connections and need automatic load balancing between them. I also need to handle failed connections (not use one that does not work). First link is a PPTP connection (`ppp0`), second is usual Ethernet. The system is Gentoo Linux. Currently, I achieved basic balancing with `ip route`, but looks like it is not working very well. Here's what I've used:               ip rule $ADD from $IP1 table rt_link1     ip rule $ADD fwmark 1 lookup rt_link1     ip rule $ADD from $IP2 table rt_link2     ip rule $ADD fwmark 2 lookup rt_link2     $NET2 dev eth2 src $IP2 table rt_link2     default via GW2 table rt_link2     $NET2 dev eth2 src $IP2     $NET1 dev ppp0 src $IP1 table rt_link1     default via GW1 table rt_link1     $NET1 dev ppp0 src $IP1     default scope global nexthop via $GW1 weight 1 nexthop via $GW2 dev eth2 weight 1


title: scp: localhost password not accepted

text: I'm attempting to copy a public key to a remote server. I'm logged in locally as [localname] and the key resides locally at `~/.ssh/`. I'm also ssh'd into [remote.com] as [remotename], and attempting to upload the key thusly:               scp [localname]@localhost:~/.ssh/id_rsa.pub [remotename]@[remote.com]:/home/[remotename]/.ssh/uploaded_key.pub      I see the welcome message for [remote.com], but then I'm asked:               [localuser]@localhost's password:      But [localuser]'s password (the one [localuser] uses to log in to the local machine) isn't accepted:               Permission denied, please try again.      Here's the verbose output:               Executing: /usr/bin/ssh '-v' '-x' '-oClearAllForwardings yes' '-n' '-l' '[localname]' 'localhost' 'scp -v' '~/.ssh/id_rsa.pub' '[remotename]@[remote.com]:/home/[remotename]/.ssh/uploaded_key.pub'     OpenSSH_5.3p1 Debian-3ubuntu7, OpenSSL 0.9.8k 25 Mar 2009     debug1: Reading configuration data /etc/ssh/ssh_config     debug1: Applying options for *     debug1: Connecting to localhost [127.0.0.1] port 22.     debug1: Connection established.     debug1: identity file /home/[remotename]/.ssh/identity type -1     debug1: identity file /home/[remotename]/.ssh/id_rsa type -1     debug1: identity file /home/[remotename]/.ssh/id_dsa type -1     debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3p1 Debian-3ubuntu7     debug1: match: OpenSSH_5.3p1 Debian-3ubuntu7 pat OpenSSH*     debug1: Enabling compatibility mode for protocol 2.0     debug1: Local version string SSH-2.0-OpenSSH_5.3p1 Debian-3ubuntu7     debug1: SSH2_MSG_KEXINIT sent     debug1: SSH2_MSG_KEXINIT received     debug1: kex: server->client aes128-ctr hmac-md5 none     debug1: kex: client->server aes128-ctr hmac-md5 none     debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent     debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP     debug1: SSH2_MSG_KEX_DH_GEX_INIT sent     debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY     debug1: Host 'localhost' is known and matches the RSA host key.     debug1: Found key in /home/[remotename]/.ssh/known_hosts:5     debug1: ssh_rsa_verify: signature correct     debug1: SSH2_MSG_NEWKEYS sent     debug1: expecting SSH2_MSG_NEWKEYS     debug1: SSH2_MSG_NEWKEYS received     debug1: SSH2_MSG_SERVICE_REQUEST sent     debug1: SSH2_MSG_SERVICE_ACCEPT received            *****************************************       ** This is [remote.com] server **       **  Unauthorized access is PROHIBITED  **       *****************************************          debug1: Authentications that can continue: publickey,password     debug1: Next authentication method: publickey     debug1: Trying private key: /home/[remotename]/.ssh/identity     debug1: Trying private key: /home/[remotename]/.ssh/id_rsa     debug1: Trying private key: /home/[remotename]/.ssh/id_dsa     debug1: Next authentication method: password     [localname]@localhost's password:      debug1: Authentications that can continue: publickey,password     Permission denied, please try again.     [localname]@localhost's password:      Can anyone verify that this is the correct usage of scp, or offer troubleshooting tips? Localhost: Terminal 2.1.2 on Mac OS X 10.6.8 | Remote: Ubuntu 10.04


title: What problems to expect when running Docker with libcontainer and lxc on the same host?

text: Simple question. Can I use the `lxc` userland tools and `docker` with its new "native" `libcontainer` in parallel on the same host? I can see how for some scenarios I could benefit from the `docker` way of doing things, but want to stay a bit conservative for some other requirements I have.


title: Extract information from a text file

text: I have a text file, i want to search for tags such as the following:               <category="SpecificDisease">Type II human complement C2 deficiency</category>     <category="Modifier">Huntington disease</category>     <category="CompositeMention">hereditary breast and ovarian cancer</category>     <category="DiseaseClass">myopathy</category>      and produce the following and write them to a new text file.               Type II human complement C2 deficiency     Huntington disease     hereditary breast and ovarian cancer     myopathy


title: Extracting information between tags

text: I have a text file, the following shows a sample of file contents: > 1234 A novel homeodomain-encoding gene is associated with a large CpG island > interrupted by the <category="Modifier">myotonic dystrophy</category> > unstable (CTG)n repeat. <category="SpecificDisease">Myotonic > dystrophy</category> ( <category="SpecificDisease">DM</category> ) is > associated with a ( CTG ) n trinucleotide repeat expansion in the > 3-untranslated region of a protein kinase-encoding gene , DMPK , which maps > to chromosome 19q13 . 3 . Characterisation of the expression of this gene in > patient tissues has thus far generated conflicting data on alterations in > the steady state levels of DMPK mRNA , and on the final DMPK protein levels > in the presence of the expansion . The <category="Modifier">DM</category> > region of chromosome 19 is gene rich , and it is possible that the repeat > expansion may lead to dysfunction of a number of transcription units in the > vicinity , perhaps as a consequence of chromatin disruption . We have > searched for genes associated with a CpG island at the 3 end of DMPK . > Sequencing of this region shows that the island extends over 3 . 5 kb and is > interrupted by the ( CTG ) n repeat . Comparison of genomic sequences > downstream ( centromeric ) of the repeat in human and mouse identified > regions of significant homology . These correspond to exons of a gene > predicted to encode a homeodomain protein . RT-PCR analysis shows that this > gene , which we have called <category="Modifier">DM</category> locus- > associated homeodomain protein ( DMAHP ) , is expressed in a number of human > tissues , including skeletal muscle , heart and brain . I need to extract what in between tags: for example,               <category="SpecificDisease">Myotonic dystrophy</category>      I need to extract _"Myotonic dystrophy"_ and write to a new text file.


title: Minimalistic terminal music player that can play all my files randomly

text: I'm looking for a terminal music player. `mpg321/mpg123` is quite what I need, but it can't play all my music directory (which contains child directories). `cmus` seems to be a bit of an overkill, as there are a lot of features I never use. I just need a program, that I can give it my music directory and perhaps a `\--random` flag, then it will play everything with random orders. Can someone point out what options I have?


title: giving grep output to rm

text: I'm trying to pipe `grep` output to `rm`, but it outputs useless stuff. Is any switch required for `rm`? Or can `rm` can be provided a regexp directly?               ls | grep '^\[Daruchini'| rm      rm: missing operand Try `rm --help' for more information.


title: Adding a user who can only execute scripts remotely

text: I would like to create a user who can only do one thing: via ssh specify a script ( and commandline arguments to the script ) that resides in one particular folder ( for the purposes of this question let us call it `/local/remote_only_scripts/foo` ) and have that script execute and return it's output. To be clear some examples of things I do not want the user to be able to do:   * Locally log in to the account. The login application is `/bin/login`. It is not a script in the `/local/remote_only_scripts/foo` folder, so should not be called by the user.   * Remotely log in to the account. Again login ( is that what is called by ssh? ) is not a script in the relevant folder.   * List the contents of the directory. ls is in `/bin/ls`. It is not a script in the appropriate directory.   * Edit a file in that directory. emacs, vi, gedit most other editors are not scripts in that directoy.   * View the contents of a file in that directory.   * Execute a file in that directory that he does not have permission to execute. Note that these are _examples_ there are many other actions which I do not want the user to be able to do. In considering an action, ask "is this being done by a script in `/local/remote_only_scripts/foo`?" if the answer is no the user should not be able to do it. If the answer is yes then the user should be able to do it. PS: Let me clarify what I mean by "adding a user". I do not mean adding a user to some ssh subsystem. Rather I mean adding a user to the computer system. So, for example, I have a system running debian stable, call it by it's address, www.hg.bar.com. I want to add a user ( via kuser, users-admin or useradd or some similar way ) call him hg_guest. hg_guest cannot login locally or do any of the things in the above list. All hg_guest can do is execute scripts "remotely". I said he should be able to do so via ssh, but thinking about it now, maybe allowing him to use ssh may allow him to login in locally, so some other mechanism may be required.


title: Can splice()/tee() be made to work with sockets, and not merely pipes?

text: On Linux, the system calls splice(2) and tee(2) are used to transfer data between two file descriptors. One or both of the file descriptors must be a pipe, according to documentation. Why? Can this be made to work with sockets? Does it work currently, or would kernel modifications be required?


title: MySQL different database location

text: I do not have enough space on my root partition to store the database.               $ df -h     Filesystem                         Size  Used Avail Use% Mounted on     /dev/mapper/ManjaroVG-ManjaroRoot   29G   21G  6.4G  77% /     dev                                1.9G     0  1.9G   0% /dev     run                                1.9G  852K  1.9G   1% /run     tmpfs                              1.9G   76K  1.9G   1% /dev/shm     tmpfs                              1.9G     0  1.9G   0% /sys/fs/cgroup     tmpfs                              1.9G  596K  1.9G   1% /tmp     /dev/mapper/ManjaroVG-ManjaroHome  197G   54G  133G  29% /home     /dev/sda1                          247M   88M  147M  38% /boot     tmpfs                              383M  8.0K  383M   1% /run/user/1000      Changing datadir in my.`cnf` to a new location caused a permission problem ([Warning] Can't create test file `/home/u/tmp/mysql/acpfg.lower-test` ) How is it possible change the directory where MariaDB/MySQL stores the database under Linux (for example to /home/u/tmp/mysql)?


title: Can't login using serial on ttyO0 - BeagleBone Black

text: I boot Beaglebone Black, connected to my desktop by serial. It was working great, until now. Beagle is booting, output shows up on the console, but at the end I can't log in.   I can't type the login, nor anything (nothing, that I type shows on the screen). I am using Angstrom distribution.   This is the end of output from the Putty:               Starting Console Manager...     [  OK  ] Found device /dev/ttyO0.          Starting Serial Getty on ttyO0...     [  OK  ] Started Console Manager.     [   15.076001] tilcdc 4830e000.fb: mode 832x624@75 is blacklisted     [   15.163885] tilcdc 4830e000.fb: mode 832x624@75 is blacklisted          .---O---.     |       |                  .-.           o o     |   |   |-----.-----.-----.| |   .----..-----.-----.     |       |     | __  |  ---'| '--.|  .-'|     |     |     |   |   |  |  |     |---  ||  --'|  |  |  '  | | | |     '---'---'--'--'--.  |-----''----''--'  '-----'-'-'-'                     -'  |                     '---'          The Angstrom Distribution beaglebone ttyO0          Angstrom v2012.12 - Kernel 3.8.13          beaglebone login: [  OK  ] Reached target Sound Card.     [  OK  ] Found device /dev/ttyGS0.              Starting Serial Getty on ttyGS0...     [  OK  ] Started Serial Getty on ttyGS0.     [  OK  ] Reached target Login Prompts.     [  OK  ] Reached target Multi-User.     [  OK  ] Reached target Graphical Interface.     [   18.974513] tilcdc 4830e000.fb: mode 832x624@75 is blacklisted     [   19.034955] tilcdc 4830e000.fb: mode 832x624@75 is blacklisted     [   19.089415] tilcdc 4830e000.fb: mode 832x624@75 is blacklisted     [   19.296647] tilcdc 4830e000.fb: mode 832x624@75 is blacklisted     [   31.664635] EXT4-fs (mmcblk0p2): re-mounted. Opts: commit=0     [   43.655795] tilcdc 4830e000.fb: mode 832x624@75 is blacklisted     [   43.698762] tilcdc 4830e000.fb: mode 832x624@75 is blacklisted     [   43.759312] tilcdc 4830e000.fb: mode 832x624@75 is blacklisted     [   43.796401] tilcdc 4830e000.fb: mode 832x624@75 is blacklisted     [   44.038548] fuse init (API version 7.20)


title: using mergecap for set of files

text: Im trying to use mergecap to merge 15 old pcap files in a folder. I tried to use               FILES=($(find /mnt/md0/capture/DCN/ -maxdepth 1 -type f -name "*.pcap"  -print0 | xargs -0 ls -lt | tail -15 | awk '{print $8}'))      and use mergecap command as `mergecap -w Merge.pcap ${FILES[@]}` but the mergecap doesnt run when I put it on crontab. Is there any method to combine these two commands to work properly. I tried as answer suggested `@l0b0 tried find /mnt/md0/capture/DCN/ -maxdepth 1 -type f -name "*.pcap" -print0 | tr '\0\n' '\n\0' | tail -15 | tr '\0\n' '\n\0' | xargs -r0 mergecap -w /mnt/md0/capture/DCN/Merge_"${TAG1}".pcap` in order to get the name of the oldest file to be merged into the output files name. But it gives gibberish as the file name. Am I doing anything wrong? Following scripts gets me the file names               FILES=($(find /mnt/md0/capture/DCN/ -maxdepth 1 -type f -name "*.pcap"  -print0 | xargs -0 ls -lt | tail -15 | awk '{print $8}'))          TAG1=$(basename "${FILES[0]}" | sed 's/.pcap//')


title: ATI driver and boot problem “Starting Timidity alsa midi emulation”

text: **It has been resolved. See answer bellow..** Asked this on askubuntu, but they knocked me down as off-topic and sent me here.. After upgrade I can no longer boot into gui. It stops on "Starting Timidity alsa midi emulation", but it's possible this has nothing to do with alsa. Could it just be that my boot is messed up somehow?? I also tried removing and reinstalling fglrx, but no changes. I've been to many forum questions already but no one seems to have solved this...               http://ubuntuforums.org/archive/index.php/t-1871360.html     http://askubuntu.com/questions/120430/ubuntu-fails-on-boot-up      This is really frustrating. All my mind is on that computer.. :( My specs: ElementaryOS, Dell Studio 1550


title: Plugins for playing clips don't work properly

text: I am going to see some clips over youtube or other web sites like that. But there is a problem and I can't see clips. I think the problem is my plugings. How do I fix it? The sites that don't show me clips are: 1) ![enter image description here](http://i.stack.imgur.com/2Wryh.png) 2) ![enter image description here](http://i.stack.imgur.com/narw0.png)


title: Debian bridge doesn't accept IPv6 config

text: I'm currently trying to configure my bridge in Debian 7. I do have a working `config` for IPv4:               auto eth0     iface eth0 inet manual     auto br0     iface br0 inet static       address xx.xx.xx.131       netmask 255.255.255.192       gateway xx.xx.xx.129       bridge_ports eth0       bridge_stp off       bridge_fd 1       bridge_hello 2       bridge_maxage 12          iface br0 inet6 static       address xx:xx:xx::2       netmask 64       gateway xxxx::1      But on boot my interface only comes up with a IPv4 address. I also tried adding               up ip -6 addr add xx:xx:xx:2/64 dev br0     up ip -6 route add default via xxxx:1 dev br0      to the IPv4 config. No success either. If I execute the `ip -6` commands listed above after the reboot IPv6 works just fine. Caveat: I'm running a clean minimal install of Debian 7 nothing has yet been added.


title: Please help explain this bash output redirection

text: This script was posted as answer to a Question. And I'm trying to work out what's going on.               result=$(       {         {           ssh host app-status >&3 3>&-; echo "$?"         } | {           until read -t1 ret; do             printf . >&2           done           exit "$ret"         }       } 3>&1     )      Here's my explanation, but I'm sure it's wrong.   1. The outer `{...} 3>&1` : fd 3 is opened as a duplicate of stdout   2. Then second half of pipe, '| { }` no redirection   3. In read loop printf's stdout is duplicated with stderr, so in 2. (above) all output actually comes via stderr.   4. Now the first half of pipe, `{ ssh ... } |` : stdout of ssh is dupped onto fd3 (which is in fact stdout from 1. fd 3 is closed with `3>&-` so stdout is re-opened onto what it was originally and this is piped into 2.   5. finally, `echo` just prints to stdout So my question (problem with understanding) is; Is the result of this the same as just printf to stderr ? What does the _voodo_ redirect to 3 actually achieve? Is there anything asynchronous in here ?


title: displaying page 2 etc of multipage tiff

text: I have a multi-page TIFF file produced from scanning. When I open the file (Image Viewer), Next goes to the Next image file in the folder not the next image in the file. Is there a hidden option to see each of the images (Ubuntu 13.10). I don't really want to split/convert the file.


title: Does linux have pause/resume feature like in Windows 8?

text: I'm looking for some feature which will allow me to pause/resume copy-paste process similar to windows 8. Is there any file manager that will allow this process? Is it extension to file-manager. Does this process have anything to do with file-manager? I'm also searching for portable and best file-manager too. I'm little bit confused choosing between PCMan and Krusader. Any suggestion which to choose between them.


title: how to install yoono-desktop-1.8.43.tar.bz2 in linux

text: I recently yoono-desktop from http://www.yoono.com/desktop_features.html .How to install this file.


title: Why are 666 the default file creation permissions?

text: As I've found out, when using umask, the highest permissions you can give to files are 666. Which is done by `umask 0000`. That's because of the default file creation permissions, which appear to be 666 on every system that I know. I know for files we need executable rights to show their contents.   But why do we limit the default file creation permissions on 666?


title: How can find support large files?

text: I would like to find all the files of my system, which sizes are more than a couple gigabits. I thought I would use `find -size`, but the man page states: > The size does not count indirect blocks If I understand this correctly, the search is only relevant when the size is below `(number of direct blocks)×(size of a block) = 10*4096 = 40MiB`. So how can I list files larger than that? **EDIT** : I must be wrong somewhere as the man page supports _Gigabits_ as a size unit. Anyone can see where I would be wrong? Changed the title to reflect this.


title: How can I make tmux monitor a window for inactivity?

text: I've switched from GNU Screen to tmux. They're both similar, except that tmux is still maintained. GNU Screen has a `C-a _` ("silence") command. This command makes GNU Screen monitor the current window and alert me when there's been 30 seconds of inactivity. This is quite useful: for example, GNU Screen can watch a long `apt-get dist-upgrade` process and alert me when dpkg has a question for me. Does tmux have an equivalent command? I tried searching the Web but didn't find an answer.


title: Removing duplicate files but ignoring certain lines (e.g. embedded timestamp)

text: I have a bunch of gzipped text files. I am trying to remove duplicate files (using `fdupes`) but the problem is these files contain a line that has their timestamp in them, and the files are identical otherwise. I'd like to be able to find duplicates, ignoring this line, but _not_ remove the line from the files that I keep. In my case the line is of the following form:               -- Dump completed on 2014-07-12 10:00:01      Right now I am using the following script, which works but removes the timestamp line from the kept files:               #!/bin/sh          # Remove timestamp line from all gzipped text files by temporarily unzipping     # them, removing the line then rezipping. Preserve file system timestamp.     for a in *.sql.gz ; do         gunzip -c $a | sed -e 's/^-- Dump completed.*//g' | gzip -c -9 > temp.gz         touch -r $a temp.gz         mv temp.gz $a     done          # Duplicates can now be removed.     fdupes . -dN      I want to find a solution that doesn't involve modifying the original files, leaving the timestamp line in. Is there some way I can do this?


title: How do I increase the overall font size in GnuCash on Linux Mint?

text: Apparently GnuCash has no built-in way of increasing font size (I have absolutely no idea why). Googling suggests I should be able to increase system-wide gtk app font size with gnome-control-center, but on Linux Mint, there is no "appearance" or font size section to g-c-c. I tried fiddling with Menu->Applications->Preference->Appearance->Fonts but that did not change GnuCash's font size. I'm on Mint 13 with gnucash 2.4.10.


title: Compare files that are in directory 1 but not directory 2?

text: I'm having trouble with a bash script I want to make I know ls will list files that are in a directory but I want it to list directories that are in directory1 but NOT in directory2, and then list files in directory2 that are NOT in directory1. In a feeble attempt, I tried:               ls -al | diff directory1 directory2      Quickly I realized why it didn't work. Can anyone help out a total bash nerd out?


title: Linux kernel support for USB gamepads?

text: I've got an old Logitech USB gamepad that worked well under both Windows and Mac OS X. That is, the gamepad was totally "plug and play" for games run by a Super Nintendo emulator (SNES9X). Does Linux support such gamepads out of the box? Or any other controller for that matter? Thanks.


title: USB storage devices aren't automatically mounted when inserted on a fresh install of Debian 6.0

text: I installed Debian 6.0 (squeeze) a few days ago on my machine. I installed the default GNOME desktop, standard settings. Unfortunately, I just noticed that when I plug in USB storage devices (external hard drivers, USB sticks, etc.), they don't get automatically mounted, like they used to (and presumably still should). I noticed that the usb-storage module wasn't loaded automatically, either, so no device nodes were getting created either. So, I loaded that module, so at least now the device nodes get created automatically, it's just a case of mounting them manually. But that's not the point! In nautilus's preferences, I have "Browse media when inserted" checked, (i.e., the default), but just nothing in the UI happens when I insert something. The device never appears in the Computer view. Watching the kernel logs shows that the insertions are definitely being registered, and after manually loading usb-storage first (what is that about? Why isn't that happening automatically?), device nodes get created, but that's it. So. My question is, from here, how do I go about finding out what's wrong?


title: Location on disk to write a byte-flag?

text: I am writing an update utility for an embedded Linux device for which I am responsible. I'm creating a basic side-by-side setup, where updates are applied to a staging partition and then the bootloader is switched to the staging partition, changing the primary partition into the new staging one. However, the embedded device uses a CF card, which are known for sometimes writing data out of order, etc. For this reason, if I mount a file system as read/write, there's a chance of corruption. Therefore, I cannot mount my bootloader partition RW in order to point to the new partition. **Is there a location on disk to which I can safely write a single byte** , where the byte represents a 0 for the first partition or a 1 for the second? Even a CF card can't screw up a single byte write, which should happen atomically. I'm using a plain-old DOS MBR format disk.


title: How do I create a ZIP archive that preserves only the structure of the target directory and below?

text: I need to create a zip archive where the unzipped result preserves the directory structure _from_ the specified directory down. I also need to do this _without_ actually switching to the directory. My question is _similar_ to this. After having read a great deal on the issue, I don't feel that anything has completely answered my question. For example, I have:               /tmp         /sub_dir             /pertinent_dir                 /sub_folder_1/                     stuff.pdf                     stuff.xls                 /sub_folder_2/                     stuff.pdf                     stuff.xls                 /sub_folder_3/                     stuff.pdf                     stuff.xls           I need to be able to perform `zip -r /tmp/sub_dir/pertinent_dir.zip /tmp/sub_dir/pertinent_dir/*` such that the result only contains `pertinent_dir` and below. Again, I need to do this _regardless_ of my current directory context. I've tried `-j`, but that doesn't seem to work. Perhaps it's not possible. Is there something I'm missing?


title: Converting Webserver Logged IP Addresses to DNS

text: I'm trying to use a bash script to process a webserver log file and replace any IP's it finds with their corresponding DNS hostnames. An example entry of a single line from the log file is:               <12>1 2013-11-04T15:04:05+00:00 networkname kernel - - - kernel: [161030.740000] ACCEPT IN=br0 OUT= MAC=00:11:22:33:44:11:00:11:11:11:11:11:11:11 SRC=192.168.1.6 DST=192.168.1.1 LEN=71 TOS=0x00 PREC=0x00 TTL=64 ID=30324 DF PROTO=UDP SPT=43729 DPT=53 LEN=51       (I have changed all private details in the above line for example purposes). So above, the two fields SRC=192.168.1.6 and DST=192.168.1.1 contain IP addresses, that I need to convert into DNS hostnames (I understand they are just internal addresses, this is just as an example). This is what I have come up with so far for my script:               #!/bin/bash          logFile=$1          while read line     do         for word in $line         do                      # if word is ip address change to hostname                 if [[ $word =~ 'DST='^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]                 then                         # check if ip address is correct                         ip=($word) | cut -d'=' -f 2                         echo -n `nslookup $word | grep Name | cut -d' ' -f 8`                         echo -n " "                 # else print word                 else                         echo -n $word                         echo -n " "                 fi         done         # new line         echo     done < "$logFile"      The part that is throwing me is interpreting the DST= and SRC= fields as an IP address, I'm not really sure of the syntax to strip this off prior to DNS processing, then adding it back on following DNS processing, or if there is a better way? I did search the forums in advance and found the following article: resolve all ip addresses in command output using standard command line tools However it didn't seem to work, potentially given the format of my log files.


title: How do I power down on reboot?

text: I am programming for a Linux ARM device and have some situations where I need to reboot the device after a user prompt. Whenever I run `reboot -f` or `shutdown -r now` though, the system starts up with a kernel panic error. If I manually reboot by unplugging the power it reboots perfectly fine. Is there a way to power down on reboot? I feel like it might help me avoid a lot of grief.


title: VLAN setup on CentOS

text: I have two networks I want to separate from each other (no inter-routing). I'm using a Linux host as a router and I have a Juniper switch as the switch (obviously). My LAN interface on the Linux router is `eth1`, so I created a VLAN called `eth1.2` and gave it an IP in a separate subnet.               eth1   => 192.168.1.1/24     eth1.2 => 192.168.2.1/24      I have the juniper configured so that there are two VLANs, default and wifi. I did the following commands:               set vlans wifi vlan-id 2     set interfaces ge-0/0/12.0 unit 0 family ethernet-switching vlan members wifi     set vlans wifi interface ge-0/0/12.0      **Question** I have the WAN interface on the Wireless Router connected to port 12. The Linux router can't see its static IP. Any ideas what I might be doing wrong? **Update** I think part of my problem is that I didn't give the router's port on the juniper any VLAN memberships. It should be seen as a trunk according to Juniper's tutorials on youtube. I think I might have to create another VLAN to act as the "default" since I don't think I can use default anymore. What gives me this idea is that I added the VLAN memberships to the router's port on the juniper and everyone's networking broke.


title: Arch Linux PowerPC installation guide for absolute beginners

text: I was wondering if there was an Arch Linux installation guide for absolute beginners for PowerPC. I've been using the one on the website, and I receive errors such as "the Linux kernel package could not be installed". I think I'm not following the instructions correctly.


title: console space eaten up by file contents

text: see the example below to understand my problem ; consider my console prompt look like this               user@server $ ls     "I opened a file temp"     user@server $ vi temp      "temp will open in the same window, when I close temp, I dont come back to "               user@server $ ls     user@server $ vi temp     user@server $      instead I come back to something like this               user@server $ ls     user@server $ vi temp     "temp file content"     "temp file content"     "temp file content"     user@server $      Its eating up my visible screen space, and I may end up losing some important output because of this file content.


title: How can you change ident, which shows up as ident@hostname.com on ircll?

text: I know the nickname and the real name field can be changed with environment variables such as IRCNICK and IRCNAME. However, the documentation does not tell you how the ident is changed. (The ident is the name that's used when you /whois nickname, and it shows up as part of **ident** @username.com in the host field, and the bolded part is what I'm trying to figure out how to change) I'm wondering if this is possible on the ircll client.


title: Get client hostnames from DHCP

text: I have a voyage 2.6.38 machine running DNSMASQ for a DHCP server and I would like to get the hostnames of the clients that acquire DHCP leases. How would I go about doing this?


title: A clever way to defragment a FAT filesystem?

text: What is the best way to defragment a FAT filesystem when running Linux/Unix (on usb stick for instance)?   * Copy all content elsewhere, format, copy back again?   * Use FreeDOS defrag utility, in a KVM command?   * Boot with Partition Logic?   * other?


title: Linux distribution that offers a good KDE experience

text: I have been a Gnome user for years (8 years), and I'm looking for recommendations and comparisons of Linux distributions that offers good KDE integration/experience. Some details to mention:   * the environments speed,   * selection of default apps   * whether it's a modified KDE   * what makes the distro special regarding KDE and KDE/QT apps?   * Employed or active KDE developers who are also distro developers   * integration with gtk apps   * how friendly is it for a novice user (e.g. all cli, do it yourself, or pretty much set up to just work) Thanks


title: Debian PXE Preseeding: Can I clone my existing Debian system instead of using the Internet?

text: I'm currently working on PXE booting 10 or so machines to install Debian on them over the network from a centralized DHCP + TFTP server. I'm using the TFTP server to serve the Debian netboot image to the PXE clients. I'm also serving them a preseeding file via FTP. So far (after hours of Google, trial and error) so good. The thing is, while reading the preseeding file, the hosts seem to be trying to fetch packages over the Internet; which is quite logical since the netboot image is only 8-9 MB in size. The problem with that is that the Internet connection in that environment is currently unreliable so I was wondering if there's a way I can direct the hosts (via the preseed file or a kernel boot parameter) to clone my existent Debian system (i.e. the one on the DHCP/TFTP server). I would appreciate any help and I'm willing to share further information about my setup if you think they'd be helpful to you either to help you set up a similar environment or to help you suggest a solution to me :)


title: How do I list all installed programs?

text: How do I list both programs that came with my distribution and those I manually installed?


title: Encfs error: `/bin/umount: unrecognized option `--no-canonicalize'`

text: I just installed `encfs` from source on a synology disk-station (DSM 4.1) and it seems to work fine. But when I try to `unmount` my `encfs` directory via `fusermount -u` I get the error message:               fusermount -u myencfstestdir     /bin/umount: unrecognized option `--no-canonicalize'     BusyBox v1.16.1 (2012-09-26 03:30:23 CST) multi-call binary.          Usage: umount [OPTIONS] FILESYSTEM|DIRECTORY          Unmount file systems          Options:     -n Don't erase /etc/mtab entries     -r Try to remount devices as read-only if mount is busy     -l Lazy umount (detach filesystem)     -f Force umount (i.e., unreachable NFS server)     -d Free loop device if it has been used      However the directory seems to be unmounted. I can mount it with `encfs` afterwards without problems. Should I care about this error message? If not, how can I suppress it, or even better, how can I fix it?


title: How can I most simply transparently bridge traffic between wlan0 and eth0?

text: I am looking to do this on a Raspberry Pi, but I don't mind which operating system I have to install, so the easiest most out-of-the-box solution for Pidora (Fedora 20 Remix), Raspbian (Debian) or Arch is the one I'd like. I am living in a university building where internet access is supplied via a protected wireless network. This wireless network is authorised using WPA2-Enterprise PEAP and requires me to supply a username, password, and authentication certificate. The university provides a script to automatically configure a Linux machine for this network, and the script is happy working with either wpa_supplicant or network-manager - I've tried both. I have a lot of machines (a mixture of Linux and Windows) which all talk to one another via my own private wireless router. This router has a WAN port meant to face an internet connection, so as to share that connection with all machines on its wireless network. My aim is to have my Raspberry Pi connect to the university's protected wireless network and then provide an internet connection to the WAN port on my private wireless router. I've decided to use a Raspberry Pi because it's the lowest overhead device I have access to that is able to connect to my university's protected wireless network. I do not need to be able to see my Raspberry Pi on my private wireless network (if I could that would be fine, but I'm really after the simplest configuration possible). All I need is for my Raspberry Pi to handle authentication to the university wireless network, and then transparently pass data between eth0 and wlan0. To any device plugged into my Raspberry Pi using an ethernet cable, the Raspberry Pi should just look like straight-forward internet gateway. To summarise, I'm looking for, (University Wi-Fi with WPA2 PEAP) -> (RPi wlan0)---(RPi eth0) -> (WAN on Private Router) I've tried using bridge-utils on Debian, but this always seems to knock out my Raspberry Pi's wireless connection. I've also read about using iptables and ebtables but, as yet, I don't really understand what I'm meant to be doing there, and some of the configurations I've found on the internet seem to conflict with one another. I should add that the university wireless network dynamically assigns my Raspberry Pi an IP address on wlan0 each time it connects. My private router handles dynamic IP address assignment for all of my machines. I would be so grateful if anyone could outline some simple clear instructions for achieving the setup I'm after. I am of course willing to read up on and learn anything I need to get this running, but I am interested in keeping the solution as simple and easy to reproduce as possible. The only device I want to configure is the Raspberry Pi. I note that what I'm trying to do should be possible, because it's perfectly simple to share my university wireless network via my ethernet port on my Windows laptop! Many thanks in advance!


title: How to get mouse click position?

text: I know I can get the position of the mouse pointer by executing `xdotool getmouselocation`. What I need is program that will run and let me know the position where the mouse pointer clicks.


title: Monitor Disk Usage per directory/file

text: I have a huge java app that drives my disk crazy. As I think that this issue is only due to 3-5 small things I would like to monitor what is written to/read from disk within an hour sorted by size and actions. Is there any app that runs under ubuntu 1204 that could help me with this issue and give me an average report after an hour of profiling or so? Or would you handle the whole issue differently?


title: Why absolute symlink on SAMBA share is followed directly by CIFS mount?

text: If an SMB share has a symlink with an absolute path `/share/latest/dir -> /share/data/201407` then Windows clients can access files by link with no problem.               dir \\smbserver\share\latest\dir\     Directory: \\smbserver\share\latest\dir\     file a ...      However unix clients get an error on the cifs mount of same share.               ls /mnt/share/latest/dir/      /mnt/share/latest/dir/ : No such file or directory      Why does Samba mount not follow the symlink? How can I get a CIFS mount to follow symbolic links?


title: Union of two files and unique in new file

text: I have two files with few similar column one, two and third column with small variation and few other columns as follows. file 1:               AT1  AT22  24  1 ATAGATA ATTATAT     AT2  AT24  22  0 ATAGATA ATTATAT     AT3  AT23  263 3 ATAGATA ATTATAT     AT4  AT28  252 6 ATAGATA ATTATAT      Similarly in file 2:               AT1  AT22  22  1 ATAGATA ATTATAT     AT3  AT23  265  1 ATAGATA ATTATAT     AT4  AT28  253  1 ATAGATA ATTATAT      The output should be Union and unique of these files with relaxation of +or -2 of the third column and if first three matches with these criteria, the fourth column has to be added from the both the files and other should be printed as usual which is like               AT1  AT22  24  2 ATAGATA ATTATAT     AT2  AT24  22  0 ATAGATA ATTATAT     AT3  AT23  263 4 ATAGATA ATTATAT     AT4  AT28  252 7 ATAGATA ATTATAT


title: Installing RHEL6.5 by swapping RPMs

text: **BACKGROUND** So I've been tasked with updating a system from RHEL6.0 to RHEL6.5 via a bootable USB. Due to size limitation, I've stripped (using the `rpm -e` command to prevent dependency errors) approximately 30 rpms from the text version of 6.5 (significantly smaller than the fuller GUI version). I've swapped the `Packages/` of the RHEL6.0 with the slimmer RHEL6.5 and created the bootable USB. **ISSUE** Unfortunately, I'm having problems with the installation of the new OS. When I boot from the USB, RHEL initializes properly (passes all the dependency checks) but when it starts the actual installation, it runs into a error. The error says that a certain RPM is missing. However, that specific rpm is in fact loaded in the `Packages/` but with an updated version number. For example, it will ask for `passwd-0.77.**4***.rpm` (which exists on 6.0) but I need to update it to `passwd-0.77.**5***.rpm` (may not be exactly those numbers, but you get the idea). **SOLUTION** Is there some master file that the installer checks for the version number of the RPMs? Or perhaps there is a certain RPM that contains the version numbers for all the other RPMs? I've check the `repodata/*.xml` with little success (it appears to most have files pertaining to different world languages as well as the database entry for each of the RPMs). **BONUS** Is there a list of 'mandatory' RPMs that Red Hat needs to have in order to install the OS? I've seen the mandatory keyword pop up in `repodata/*-comps- rhel6-Workstation.xml` (you might need to `gunzip` it beforehand) but the file seems to be focused mainly on the RPMs based on world languages. There's a bunch of these 'mandatory' RPMs located under a section called 'core'. Can anyone reassure me that these are the RPMs needed to install the most basic text version of Red Hat? **TL;DR** How do I change the version number that Red Hat looks for during installation of the OS?


title: Randomize external port when doing NAT with iptables

text: I want to configure a NAT behavior different from the default one implemented by `iptables`. In this example:               iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to-source 193.49.142.107:2000-400      The default behavior of NAT implemented by `iptables` is Endpoint independent. This means, all sessions initiated from the same host will have the same 'external' (IP, Port Number) even if there's a range of ports. I need to know what are the flags or options to be modified in order to have a different port number for each session.


title: Compiled, can't access with sudo

text: So I compiled FFmpeg from this guide as a standard user and it works fine as the user I compiled with but if i do `sudo ffmpeg` the program can't be found. Is it possible to make it accessible by root or do I need to rebuild logged in as root?


title: How to remove duplicate entries from a file?

text: I have a comma-separated list of domain-names in a file; unfortunately there are duplicate entries for some domain-names. Is there a way to find and remove the duplicate entries from the file? The sample output is as below:-               culturaurbanashop.com,remaxcorn.info,enjoygoing.com,full-kit-wankers.co.uk,paracaballo.com,radiopozarica.com,sprinklermaps.com,unlock-any-phone.com,voipbillingplus.com,yedincicadde.net,klasseaparte.com,allfortheweb.com,indulgesolutions.com,fastextcafe.info,titi.sickworldhosting.com,kebeico.com,facemowi.it,mellat.info,sal-gov.info,hindustan4848.com,nawaopls.co.za,familie-ries.de


title: what does the @ mean in ls -l?

text: I am using Mac OSX. When I type `ls -l` I see something like               drwxr-xr-x@ 12 xonic  staff    408 22 Jun 19:00 .     drwxr-xr-x   9 xonic  staff    306 22 Jun 19:42 ..     -rwxrwxrwx@  1 xonic  staff   6148 25 Mai 23:04 .DS_Store     -rw-r--r--@  1 xonic  staff  17284 22 Jun 00:20 filmStrip.cpp     -rw-r--r--@  1 xonic  staff   3843 21 Jun 21:20 filmStrip.h      What do the @'s mean?


title: What does @ sign mean in 'ls' output on Mac OSX Lion terminal?

text: > **Possible Duplicate:**   >  what does the @ mean in ls -l? What does the @ sign mean in the following "ls" output?               -rw-r--r--@ 1 root wheel 489 Jan 4 13:14 boot.plist


title: Explain the "@" symbol in this permissions example

text: I have a file on my Darwin system and the permissions are:               -rwxr-xr-x@      User: read, write, execute Group: read, execute Other: read, execute What is the 11th notation the `@` mean? In addition to this, I was led to believe that files/directories only had 10 places for their permissions? This, including the missing `d` from the front, would make 11.


title: What does the "@" (at) symbol mean on OSX ls?

text: When I check permission of less files from the command line on my Snow Leopard OSX system using Bash I see `-rw-r--r--@` for certain files and for others I just see `-rw-r--r--` What does the @ mean here?


title: File Permissions mode ending in @ or +

text: I was changing file permissions and I noticed that some of the permissions modes ended in `@` as in `-rw-r--r--@`, or a `+` as in `drwxr-x---+`. I've looked at the man pages for chmod and chown, and searched around different help forums, but I can't find anything about what these symbols mean.


title: continuous reading from named pipe (cat or tail -f)

text: I have configured `rsyslog` to log certain log events to `/dev/xconsole`:               *.*;cron.!=info;mail.!=info      |/dev/xconsole      `/dev/xconsole` is a named pipe (`fifo`). If I want to see what is being logged, I can do `cat /dev/xconsole`. I am surprised to see, that the command `cat /dev/xconsole` does not finish after reading the file, but instead acts as `tail -f`. in other words, the two commands behave the same:               cat /dev/xconsole     tail -f /dev/xconsole      Can somebody please explain why is that? Is there any difference between the two?


title: Configure remote control Zydacron

text: I have found an old infrared remote controller with the receptor connected as USB. I connect it into my Linux box (Mint LMDE kernel 3.2.0-4-amd64). It's recognized with `lsusb` as "Zydacron HID Remote Control". It works ... almost ... I can change the volume, start/stop the media player, choose the track in the playlist. But some key seems to not react (not configured).   * How can configure all the keys?   * Should I install "lirc"?


title: Cannot access any files Manjaro Linux

text: I cannot open any files on my Manjaro Linux laptop. I really can't remember why it happened but I restarted my computer and now I dont have read/write access to any folder or file even though I've logged in.


title: How to print apparently hidden environment variables?

text: Environment variables can be shown with `env`; but, some are not shown. For example... `echo $EUID` might produce as result of `1000` yet `env | grep EUID` produces no result. What is this type of variable? A read-only environment variable? Do all shells set the same variables by some convention? How does one go about listing these hidden variables?


title: AIX install Mercurial no root

text: Is is possible to install Mercurial on AIX system without root? I'm an ordinary user of our colleges IBM cluster and in there I fond no version control software. Could you show a brief guide of how to build mercurial from the source code on AIX? **Update** The python on the system is incomplete. When use               python setup.py install --user      to install Mercurial, I get error               "Couldn't import standard bz2 (incomplete Python install)."      I also tried to compile python 2.6.8 and get the error:               Failed to find the necessary bits to build these modules:     _sqlite3           bsddb185           dl                   imageop            linuxaudiodev      ossaudiodev          spwd               sunaudiodev                             To find the necessary bits, look in setup.py in detect_modules() for the module's name.               Failed to build these modules:     _bsddb             _ctypes            _curses              _curses_panel      _tkinter           fcntl


title: Avoiding busy waiting in bash, without the sleep command

text: I know I can wait on a condition to become true in bash by doing:               while true; do       test_condition && break       sleep 1     done      But it creates 1 sub-process at each iteration (sleep). I could avoid them by doing:               while true; do       test_condition && break     done      But it uses lot of CPU (busy waiting). To avoid sub-processes and busy waiting, I came up with the solution bellow, but I find it ugly:               my_tmp_dir=$(mktemp -d --tmpdir=/tmp)    # Create a unique tmp dir for the fifo.     mkfifo $my_tmp_dir/fifo                  # Create an empty fifo for sleep by read.     exec 3<> $my_tmp_dir/fifo                # Open the fifo for reading and writing.          while true; do       test_condition && break       read -t 1 -u 3 var                     # Same as sleep 1, but without sub-process.     done          exec 3<&-                                # Closing the fifo.     rm $my_tmp_dir/fifo; rmdir $my_tmp_dir   # Cleanup, could be done in a trap.      Note: in the general case, I cannot simply use `read -t 1 var` without the fifo, because it will consume stdin, and will not work if stdin is not a terminal or a pipe. Can I avoid sub-processes and busy waiting in a more elegant way ?


title: "Recently used" directories and files in bash

text: In Firefox under Ubuntu, when I try to save some webpages to my local computer by Ctrl+S, there will be a window popping out for me to select the destination, where I can choose "Recently Used" directories and files. I believe "Recently Used" is maintained by Ubuntu. Some questions:   1. I found that only those directories or files that are recently created or changed will be shown under "Recently Used". For those recently visited without being modified, they seem not be counted as recently used, but sometimes I hope they can be counted.   2. Also there is a very limit length of history for what have been recently used, but sometimes I want to have a longer history.   3. Can I view a list of recently used directories and files in terminal? I am using bash.


title: wpa_supplicant: connect to WLAN in the background (during boot)

text: I am using manual configuration to connect to my WLAN. In my wpa_supplicant.conf, I have something like this:               network={         ssid="mywifi"         key_management=WPA-EAP         ...     }      and then, in my `/etc/network/interfaces` I have               auto wlan0         iface wlan0 inet dhcp      When I start my laptop, the connection to my WLAN is established automatically. The problem is, it takes sometimes 10 - 15 seconds until the connection is established and the whole boot process is blocked and waiting. I was wondering whether it is possible to configure, so that the connection is established in the background, so that the boot process can go on booting, without waiting for the WLAN to be ready. I am using Debian Wheezy


title: What GPG agent does Elementary Luna use?

text: Whenever I try decrypting or signing files with GPG in Elementary Luna, I see a graphical password prompt come up for my GPG key. The key is then cached in memory for future requests for some time. My first thought was to use `gpg-agent` to purge it from memory or to configure the TTL, but to my surprise, it wasn't installed. `seahorse` also isn't installed. What is being used as a GPG agent on Elementary Linux?


title: Removing non printable characters from expect logs?

text: How can I either strip the following character sequences from my files? `^[[64;8H`, `^[[?25h`, `^[[1;64r` etc or avoid having expect add them in the first place? _Background:_ I'm using a collection of expect scripts for certain tasks. The output files I'm collecting often contain the above type of characters (as displayed in emacs / vi / cat -v). I've tried a number of tr commands like the following but it only makes the [64;8H etc visible.               tr -dc '[:print:]\n' < input      EDIT: The results from above on a problematic line               [1;64r[64;1H[64;1H[2K[64;1H[?25h[64;1H[64;.....


title: My ~/.Xresources is disabling gtk antialiasing

text: When booting into my window manage (xmonad), gtk fonts are anti-aliased, but for some reason urxvt has problems with variable names in my `~/.Xdefaults` (it fails to parse the variable names as colors and thus everything is pink). This is fixed by running `xrdb -merge ~/.Xdefaults`. However, doing this seems to disable anti-aliasing for fonts in gtk apps, but not in urxvt. What would be causing this? I've since moved my `~/.Xdefaults` to `~/.Xresources`, and now, gtk antialiasing seems to not be working from the get-go, but I still need to run `xrdb -merge ~/.Xresources` to get urxvt to parse the color variables. My `~/.Xresources`:               Xft.dpi: 96     Xft.lcdfiler: lcddefault     Xft.antialias: true     Xft.hinting: true     Xft.hintstyle: hintfull          URxvt.font: xft:Dejavu Sans Mono:size=11:antialias=true:hinting=true          URxvt*scrollBar: true     URxvt*scrollBar_right: true     URxvt*scrollstyle: plain          URxvt.urgentOnBell: true          ! From https://bbs.archlinux.org/viewtopic.php?id=164108     URxvt.intensityStyles: false          ! From https://raw.github.com/solarized/xresources/master/solarized     ! Solarized color scheme for the X Window System     !     ! http://ethanschoonover.com/solarized               ! Common          #define S_yellow        #b58900     #define S_orange        #cb4b16     #define S_red           #dc322f     #define S_magenta       #d33682     #define S_violet        #6c71c4     #define S_blue          #268bd2     #define S_cyan          #2aa198     #define S_green         #859900               ! Dark          #define S_base03        #002b36     #define S_base02        #073642     #define S_base01        #586e75     #define S_base00        #657b83     #define S_base0         #839496     #define S_base1         #93a1a1     #define S_base2         #eee8d5     #define S_base3         #fdf6e3               ! Light          ! #define S_base03        #fdf6e3     ! #define S_base02        #eee8d5     ! #define S_base01        #93a1a1     ! #define S_base00        #839496     ! #define S_base0         #657b83     ! #define S_base1         #586e75     ! #define S_base2         #073642     ! #define S_base3         #002b36               ! To only apply colors to your terminal, for example, prefix     ! the color assignment statement with its name. Example:     !     ! URxvt*background:            S_base03          *background:              S_base03     *foreground:              S_base0     *fading:                  40     *fadeColor:               S_base03     *cursorColor:             S_base1     *pointerColorBackground:  S_base01     *pointerColorForeground:  S_base1          *color0:                  S_base02     *color1:                  S_red     *color2:                  S_green     *color3:                  S_yellow     *color4:                  S_blue     *color5:                  S_magenta     *color6:                  S_cyan     *color7:                  S_base2     *color8:                  S_base03     *color9:                  S_orange     *color10:                 S_base01     *color11:                 S_base00     *color12:                 S_base0     *color13:                 S_violet     *color14:                 S_base1     *color15:                 S_base3


title: Update manager updated without prompting for a password

text: As far as I'm aware, I'm supposed to be prompted for a password before anything installs, but just now, I told update manager to install updates, and it proceeded to installing them without prompting me for a password. This happened right after I logged on, so I wasn't prompted for my password beforehand for anything else either. Is this normal and would it pose any kind of security risk?


title: How to add/replace only modified/updated files recursively for some 2 folders?

text: So I currently do stuff like:               rm -rf ../../../$CLOUD_INSTALL_SUBDIR/lib_boost     mkdir ../../../$CLOUD_INSTALL_SUBDIR/lib_boost     cp -r ../../../$BOOST_ROOT_DIR/$BOOST_INSTALL_SUBDIR/lib/* ../../../$CLOUD_INSTALL_SUBDIR/lib_boost/      Which sucks... So I wonder how to update/remove/add only updated files between 2 folders (in demo we have the folder with the latest stuff `../../../$BOOST_ROOT_DIR/$BOOST_INSTALL_SUBDIR/lib/` and a folder with stuff that may be outdated `../../../$CLOUD_INSTALL_SUBDIR/lib_boost`)?


title: Signing/Checksumming the kernel to prevent/detect manipulation

text: All my partitions are encrypted (`/` and `/home`), but the `/boot` partition has to remain unencrypted and is open for manipulation. I was thinking about hashing the kernel on bootup and checking the result against a stored value (generated on compile, saved on my encrypted drive) to see if someone, somehow manipulated the kernel since the last boot (maybe even physically). Is there a problem with writing such a script? Are there programs that do this already?


title: How to display a (zenity/GUI) dialog to the user after a root cron task has completed

text: I have a simple periodic cron task that must run as root. I want to use Zenity (or similar) to display a GUI informational dialog to user 1000 (or logged in user or all users) when the cron task finishes. I'm looking for a simple, easy, quick solution. I'll adapt to the requirements of such a simple solution. Here's where I am so far. My bash script works fine if run manually, but when Anacron runs it, nothing happens and I see `Gtk-WARNING **: cannot open display` in the logs. I hoped it would display my dialog to the user after being run by cron. I realize (after reading related questions) that cron needs to be decoupled from the GUI. If user 1000 is not logged in, I could take one of several options:   1. do nothing (possibly acceptable because I want to keep it simple)   2. display the dialog with completion message to the user when they log in next time (best)   3. display some other type of notification (NOTE: the computer is a desktop system without a mail server installed) I found these related questions: x11 - Anacron job complains "Gtk-WARNING **: cannot open display" - Unix & Linux Stack Exchange Anacron job complains "Gtk- WARNING **: cannot open display" shell - How to pass data outside process for zenity progress? - Unix & Linux Stack Exchange How to pass data outside process for zenity progress? Example Code (from other question which is essentially the same as mine):               #!/bin/bash     # Backs up the local filesystem on the external HDD          sleep 60          DISPLAY=:0.0          zenity --question --text "Do you want to backup? Be sure to turn on the HDD."     if [ $? -ne 0 ]         then exit 1     fi          *Do backup stuff here*      Error:               (zenity:9917): Gtk-WARNING **: cannot open display:      run-parts: /etc/cron.daily/backup-on-external exited with return code 1      (I'm running Kubuntu, so a KDE solution would be even better than Zenity, but I already installed Zenity, so I can keep using it.)


title: How can I setup mail server with ipv6, pam and db?

text: I'm looking for solution for a specific problem: I want to setup a good and secure mail server but I need ipv4 + ipv6, some kind of autouser mapping (if I add new user to machine, system should automatically create a mailbox for added user with the same credentials which user uses for ssh) and ability to create custom mailbox (maybe stored in MySQL somehow) without having to add user do machine (test@mydomain.com). Also ability to use clients like Thunderbird via POP and SMTP (optionally additionally IMAP) is crucial. Any suggestions which approach/system should I use? Links are more than welcome. Much appreciated.


title: How to install MySql on Red Hat 6.1?

text: I am trying to install `MySQL-server-5.6.12-1.el6.i686.rpm` on a Red Hat Enterprise 6.1 server. I receive the following error:               rpm -Uvh MySQL-server-5.6.12-1.el6.i686.rpm     error: Failed dependencies:             libaio.so.1 is needed by MySQL-server-5.6.12-1.el6.i686             libaio.so.1(LIBAIO_0.1) is needed by MySQL-server-5.6.12-1.el6.i686             libaio.so.1(LIBAIO_0.4) is needed by MySQL-server-5.6.12-1.el6.i686             libc.so.6 is needed by MySQL-server-5.6.12-1.el6.i686             libc.so.6(GLIBC_2.0) is needed by MySQL-server-5.6.12-1.el6.i686             libc.so.6(GLIBC_2.1) is needed by MySQL-server-5.6.12-1.el6.i686             libc.so.6(GLIBC_2.1.2) is needed by MySQL-server-5.6.12-1.el6.i686             libc.so.6(GLIBC_2.1.3) is needed by MySQL-server-5.6.12-1.el6.i686             libc.so.6(GLIBC_2.10) is needed by MySQL-server-5.6.12-1.el6.i686             libc.so.6(GLIBC_2.2) is needed by MySQL-server-5.6.12-1.el6.i686             libc.so.6(GLIBC_2.2.3) is needed by MySQL-server-5.6.12-1.el6.i686             libc.so.6(GLIBC_2.3) is needed by MySQL-server-5.6.12-1.el6.i686             libc.so.6(GLIBC_2.3.3) is needed by MySQL-server-5.6.12-1.el6.i686             libc.so.6(GLIBC_2.3.4) is needed by MySQL-server-5.6.12-1.el6.i686             libc.so.6(GLIBC_2.4) is needed by MySQL-server-5.6.12-1.el6.i686             libc.so.6(GLIBC_2.7) is needed by MySQL-server-5.6.12-1.el6.i686             libc.so.6(GLIBC_2.8) is needed by MySQL-server-5.6.12-1.el6.i686             libcrypt.so.1 is needed by MySQL-server-5.6.12-1.el6.i686             libcrypt.so.1(GLIBC_2.0) is needed by MySQL-server-5.6.12-1.el6.i686             libdl.so.2 is needed by MySQL-server-5.6.12-1.el6.i686             libdl.so.2(GLIBC_2.0) is needed by MySQL-server-5.6.12-1.el6.i686             libdl.so.2(GLIBC_2.1) is needed by MySQL-server-5.6.12-1.el6.i686             libgcc_s.so.1 is needed by MySQL-server-5.6.12-1.el6.i686             libgcc_s.so.1(GCC_3.0) is needed by MySQL-server-5.6.12-1.el6.i686             libgcc_s.so.1(GLIBC_2.0) is needed by MySQL-server-5.6.12-1.el6.i686             libm.so.6 is needed by MySQL-server-5.6.12-1.el6.i686             libm.so.6(GLIBC_2.0) is needed by MySQL-server-5.6.12-1.el6.i686             libm.so.6(GLIBC_2.1) is needed by MySQL-server-5.6.12-1.el6.i686             libpthread.so.0 is needed by MySQL-server-5.6.12-1.el6.i686             libpthread.so.0(GLIBC_2.0) is needed by MySQL-server-5.6.12-1.el6.i686             libpthread.so.0(GLIBC_2.1) is needed by MySQL-server-5.6.12-1.el6.i686             libpthread.so.0(GLIBC_2.2) is needed by MySQL-server-5.6.12-1.el6.i686             libpthread.so.0(GLIBC_2.3.2) is needed by MySQL-server-5.6.12-1.el6.i686             librt.so.1 is needed by MySQL-server-5.6.12-1.el6.i686             librt.so.1(GLIBC_2.2) is needed by MySQL-server-5.6.12-1.el6.i686             libstdc++.so.6 is needed by MySQL-server-5.6.12-1.el6.i686             libstdc++.so.6(CXXABI_1.3) is needed by MySQL-server-5.6.12-1.el6.i686             libstdc++.so.6(GLIBCXX_3.4) is needed by MySQL-server-5.6.12-1.el6.i686             libstdc++.so.6(GLIBCXX_3.4.11) is needed by MySQL-server-5.6.12-1.el6.i686      I recognize that these are programs I need to install. My question is where should I look to download these programs to install or should I just look for an older version of MySQL? **EDIT** : In the end it was actually a system architecture problem. System architecture should always be kept in mind when installing components in linux. I was using a i686 rpm when it was a x86_x64 system


title: FreeBSD or PC-BSD?

text: After years of Linux I would like to give *BSD a try, but I'm uncertain if I should use FreeBSD or PC-BSD. With KDE out-of-the-box and graphical package-manager and such, PC-BSD strikes me as simple to set-up and use. On the other hand, more people uses FreeBSD and it seems to be better documented, so it sets the standard. I'm leaning towards FreeBSD, but would still like something similar to GUI-goodness from PC-BSD. So my question, can FreeBSD be set-up to work similar to PC-BSD? With KDE, GUI log-in prompt and GUI managing tools? Is it difficult, or just a matter of making the relevant packages from the port-tree? Would it perhaps even be possible to install PC-BSD packages directly on FreeBSD?


title: What is the difference between ls and l?

text: I accidentally typed `l` instead of `ls` today and found that the command still printed a list of the files in my current directory. Trying `l --help` brings up the help file for `ls` suggesting that `l` is just an alias of `ls`. Howver, each file was suffixed by a `*`. Why is this and what does it mean? In case it makes a difference, this is when running the latest stable version of Ubuntu.


title: Create iso image of ext3 type

text: I want to create an ISO image which can be mounted with an ext3 partition type. How can I do that? I am using this command:               [root@manage upload]# dd if=testParti.txt of=./diskImage.iso     41+1 records in     41+1 records out      And then when I try to mount that using the following command:               /bin/mount -o loop -t ext3 diskImage.iso /tmp/upgrade      I get this error:               mount: wrong fs type, bad option, bad superblock on /dev/loop0,            or too many mounted file systems            (aren't you trying to mount an extended partition,            instead of some logical partition inside?)


title: How to remove KDE and XFCE applications from GNOME menu?

text: I am new to Linux. I installed `kubuntu-desktop` and `xubuntu-desktop` over the default Ubuntu 10.10.   I want to unclutter the menu, so that applications related to a particular desktop appear in menu only during their respective sessions. (i.e., No KDE and XFCE apps in menu during Ubuntu GNOME session. Similarly in KDE and XFCE sessions.) How can this be done via command line? (I want to learn things the command- line way.)   Should I backup anything before I do this? Extra Information:   I googled and found this and other solutions in forums, but these address only the KDE on GNOME scenario. Perhaps this can be modified to include XFCE as well, but since I am a newbie, I couldn't figure out how to do it. I have also cross-posted at askubuntu. Gracias! Thanks!


title: Booting the already installed Windows from the VirtualBox installed in Ubuntu

text: I want to boot the Windows which is installed in laptop's internal harddisk(/dev/sda1) from the VirtualBox installed in my Ubuntu. Can somebody tell me how to do this in VirtualBox.


title: Reason for ksh obsoleting -eq

text: The latest version of ksh obsoletes using `-eq` within `[[ ]]` blocks, prefering `(( ))` instead. Why is this? I can't find any documentation on the advantages of `(( ))` over `[[ ]]` anywhere, and I find that syntax considerably more obvious. For example:               #!/bin/ksh     var=1     if [[ $var -eq 1 ]]     then       echo ALPHA     fi      gives               [adam@hendrix test]$ ksh -n test.sh     test.sh: warning: line 3: -eq within [[...]] obsolete, use ((...))


title: Tool to create recipe to preseed partitioning

text: I want to preseed an Ubuntu 12.04 installer using a custom partitioning recipe. My disk layout is reasonably complex, and so is the recipe syntax itself. Hand-crafting such a recipe seems tedious and error prone. Is there a tool to simply create a recipe from an existing disk, including its partitions and LVM configuration?