title: How to delete a directory automatically when an executable is killed

text: Quite often we run an executable that needs to write / read some temporary files. We usually create a temporary directory, run the executable there, and delete the directory when the script is done. I want to delete the directory even if the executable is killed. I tried to wrap it in:               #!/bin/bash     dir=$(mktemp -d /tmp/foo.XXXXXXX) && cd $dir && rm -rf $dir     /usr/local/bin/my_binary      When `my_binary` dies the last process the kernel will delete the directory, as the script is the last process holding that `inode`, but I can't create any file in the deleted directory.               #!/bin/bash     dir=$(mktemp -d /tmp/foo.XXXXXXX) && cd $dir && rm -rf $dir     touch file.txt      outputs `touch: file.txt: No such file or directory` The best I could come with is to delete the temp directory when the process dies, catching the most common signals, and run a cleanup process with cron:               #!/bin/bash     dir=$(mktemp -d /tmp/d.XXXXXX) && cd "$dir" || exit 99     trap 'rm -rf "$dir"' EXIT     /usr/local/bin/my_binary      Is there some simple way to create a really temporary directory that gets deleted automatically when the current binary dies, no matter what?


title: HPUX: changing LVM paths or disk device names

text: Our installed HPUX system has a VG called "vg00" whose data was stored in partition "/dev/dsk/c3t5d0s2" Now that disk failed and we have an exact copy of that disk. However when we use the new disk, the system assigns it the name "/dev/dsk/c3t4d0s2", regardless of the physical slot in the machine where we install the disk. Is there a way to change the path where the system tries to find the physical disk (that seems to be stored in the /etc/lvmtab file but it's a binary file), or if that's not possible, change the names that the system assigns to devices?


title: Unable to Pull EPEL repository Metadata

text: Installing Nginx on Scientific Linux according this documentation fails:               [vagrant@localhost ~]$ sudo su -c 'rpm -Uvh http://dl.fedoraproject.org/pub/epe     l/6/x86_64/epel-release-6-8.noarch.rpm'     Retrieving http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch     .rpm     warning: /var/tmp/rpm-tmp.gdSOR9: Header V3 RSA/SHA256 Signature, key ID 0608b89     5: NOKEY     Preparing...                ########################################### [100%]        1:epel-release           ########################################### [100%]     [vagrant@localhost ~]$ sudo yum install nginx     Loaded plugins: security     Error: Cannot retrieve repository metadata (repomd.xml) for repository: epel. Pl     ease verify its path and try again     [vagrant@localhost ~]$      **Version information**               [vagrant@localhost ~]$ uname -a     Linux localhost.localdomain 2.6.32-431.el6.x86_64 #1 SMP Thu Nov 21 13:35:52 CST      2013 x86_64 x86_64 x86_64 GNU/Linux     [vagrant@localhost ~]$ cat /etc/*{release,version}     Scientific Linux release 6.5 (Carbon)     Scientific Linux release 6.5 (Carbon)     cat: /etc/*version: No such file or directory     [vagrant@localhost ~]$      **Note:** `sudo yum update -y` was issued before starting the installation of nginx **Installation of other packages disabled**               [vagrant@localhost ~]$ sudo yum install vim -y     Loaded plugins: security     Error: Cannot retrieve repository metadata (repomd.xml) for repository: epel. Pl     ease verify its path and try again     [vagrant@localhost ~]$      **URLGRABBER Debugger Log**               2014-08-03 14:22:44,437 attempt 1/10: https://mirrors.fedoraproject.org/metalink     ?repo=epel-6&arch=x86_64     INFO:urlgrabber:attempt 1/10: https://mirrors.fedoraproject.org/metalink?repo=ep     el-6&arch=x86_64     2014-08-03 14:22:44,438 opening local file "/var/cache/yum/x86_64/6.5/epel/metal     ink.xml.tmp" with mode wb     INFO:urlgrabber:opening local file "/var/cache/yum/x86_64/6.5/epel/metalink.xml.     tmp" with mode wb     * About to connect() to mirrors.fedoraproject.org port 443 (#0)     *   Trying IP... * connected     * Connected to mirrors.fedoraproject.org (IP) port 443 (#0)     * Initializing NSS with certpath: sql:/etc/pki/nssdb     * NSS error -8018     * Closing connection #0     * Problem with the SSL CA cert (path? access rights?)     2014-08-03 14:22:50,071 exception: [Errno 14] PYCURL ERROR 77 - "Problem with th     e SSL CA cert (path? access rights?)"     INFO:urlgrabber:exception: [Errno 14] PYCURL ERROR 77 - "Problem with the SSL CA      cert (path? access rights?)"     2014-08-03 14:22:50,072 retrycode (14) not in list [-1, 2, 4, 5, 6, 7], re-raisi     ng     INFO:urlgrabber:retrycode (14) not in list [-1, 2, 4, 5, 6, 7], re-raising     Error: Cannot retrieve repository metadata (repomd.xml) for repository: epel. Pl     ease verify its path and try again      **Output yum update before and after attempt to install nginx**               [vagrant@localhost ~]$ sudo yum update -y     Loaded plugins: security     Error: Cannot retrieve repository metadata (repomd.xml) for repository: epel. Pl     ease verify its path and try again     [vagrant@localhost ~]$      **yum --disablerepo="epel" update**               [vagrant@localhost ~]$ sudo yum --disablerepo="epel" update     Loaded plugins: security     Setting up Update Process     No Packages marked for Update


title: Why Putty inserting ~ into my Fedora bash shell

text: Recently while working in Putty logged into my Fedora system I have started getting random ~ characters on my shell. Additionally, while I am editing in VIM I'll have characters randomly change to upper case. This only happens while I am logged int using Putty. I've never had this happen before so I am wondering if an update to Fedora has turned on some sort of keep alive feature in SSH that is causing this. I re-installed putty and trashed my preferences just to be sure. I'm not sure where to start digging to find the culprit. Any pointers?


title: How to make an unallocated space "exist"?

text: I have Ubuntu and Windows installed together. I'm going to install Arch also along with them. For now, I what them to live there all together in my computer. I have the following: ![enter image description here](http://i.stack.imgur.com/POjC0.png) I'd like to install Arch to unallocated space being between /dev/sda2 and /dev/sda3. But it's not see-able. Look:               $ lsblk     NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT     sda      8:0    0 931.5G  0 disk      ├─sda2   8:2    0  48.6G  0 part      ├─sda3   8:3    0     1K  0 part      ├─sda5   8:5    0   3.6G  0 part [SWAP]     └─sda6   8:6    0 745.4G  0 part /     sdb      8:16   1  14.6G  0 disk      └─sdb1   8:17   1  14.6G  0 part      sr0     11:0    1  1024M  0 rom                     ~$ sudo fdisk -l     [sudo] password for alex:           Disk /dev/sda: 1000.2 GB, 1000204886016 bytes     255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 4096 bytes     I/O size (minimum/optimal): 4096 bytes / 4096 bytes     Disk identifier: 0x000a1bc4             Device Boot      Start         End      Blocks   Id  System     /dev/sda2   *        2048   101832703    50915328    7  HPFS/NTFS/exFAT     /dev/sda3       382826494  1953523711   785348609    5  Extended     Partition 3 does not start on physical sector boundary.     /dev/sda5      1946028032  1953523711     3747840   82  Linux swap / Solaris     /dev/sda6       382834688  1946025983   781595648   83  Linux      So what should I do to make it see-able and be able to install there Arch?


title: Compare two text files and find matching lines

text: I have two files A and B. A looks like this (4 to 6 lines):               GAGA     CAGA     GGGT     TATT      file B is a really big file with thousands of lines, here is a short example:               AAATGTCAAGAGACAGAAATGTCAAGAGGGT     AAGGGGGTTTATAATCATAAATCAAAGAAAT     ATATACAGAAATGTCAAGAGACAGAAATGTC     TCAAGAGACAGAAATGTCAAGAGGGTCTATA     AAGAGGGTCTATAATCATAAATCAAAGAAAT     AAGAGGGTCTATAATCATAAATCAAAGAAAT     ATACAGAAATGTCAAAACAGAAATGTCAAGG     ATATACAGAATATACAGAAATGTCAAGTTAT     ACAGAATATACAGAAATGTCAAGTTATATAC     ATATACAGAAATGTCAAGAGACAGAAATGTC     TCAGAATATAGTATTCTATTATATACAGAAA     AATATAGTATTCTATTATATACAGAAATGTC     GAATATACAGAAATGTCAAGTTATATACAGA     TATACAGAATATAGTATTCTATTATATACAG     CAGAATATAGTATTCTATTATATACAGAATA     AGTTATATACAGAATATAGTATTCTATTATA     TACAGAATATAGTATTCTATTATATACAGAA     CAGAAATGTCAAGTTATATACAGAATATAGT      I need to search every string in file A in all the lines in file B, and recover the first 10 lines from file B that contain each string from A. I have tried grep and awk but not with good results. Thanks


title: conio.h file missing error

text: I want to execute a `.cpp` file while contains the `#include <conio.h>` header file, but while executing I'm getting the following error: > "program.cpp:4:20: fatal error: conio.h: No such file or directory > compilation terminated." I've tried with the `curses.h` header file also, but still showing the same error as above. I need to use this header file because I'm using the `clrscr()` and `getch()` functions which require it. Can anybody tell me how to rectify this problem?


title: KDE: temporarily changing sound system

text: A little time ago, I reported a bug related to Phonon/pulseaudio. For debugging purposes I was told to disable pulseaudio so phonon can use the hardware directly. So I searched about how to disable pulseaudio on KDE, but only found solutions in the form `apt-get purge pulseaudio*`, but since I'm not planning on disabling pulseaudio permanently I do not appreciate that solution. Is there any way to tell Phonon (or the VLC backend I'm using) not to use pulseaudio? My system: OS: Debian jessie   Graphical interface: KDE   Phonon backend: VLC


title: Need to grep for specific lines from ongoing log and save it in some file

text: So, let me start with the overall outcome that i want to achieve. There is just one log, which will have info on certain devices, that i am upgrading. I use "tailf log" to monitor the log. Now, say, I am upgrading 10 devices, the log will go on populating lines pertaining to ips of each 10 devices. I am not concerned about all lines of the logs, but very few lines, like, image being copied to device, image deleted, image uploaded, device reload issued and so on.. what i am looking for is.. a script which will parse the ongoing logs, and grep for the txts that i am concerned about, like "image deleted", "device reload issued" and go on populating these grepped outputs to files named image_deletion_messages, device_reload_messages and so on.. and again, parse these files (image_deletion_messages, device_reload_messages) to determine ips from the logged messages and then save those ips to files named image_deleted_devices, reload_devices........... And in turn, i'll monitor these files (image_deleted_devices, reload_devices) using tailf, instead of monitoring the entire log.               tailf log |grep "image deleted" >> image_deletion_messages          tailf image_deletion_messages |grep (a list of ips) >> image_deleted_devices      And the same way for other messages............ Above set of commands as part of a script.. and finally, i'll just monitor the below files alone..               tailf image_deleted_devices      and so on...... I tried the above way and it doesn't seem to work. Maybe i am doing it wrong. Please advise.


title: Adding useraccount as root using "usermod -G root useraccount"?

text: I'm on CentOS. I try to add an useraccount as root using "usermod -G root useraccount". But this does not seem to work. Any way to fix this without having to use visudo?


title: CentOS 7.0 live USB cannot be recognised

text: Wish to dual boot Ubuntu 14.04 LTS and CentOS 7.0, I have planned to first install Ubuntu 14.04 LTS by live USB into a laptop computer (boot both UEFI and legacy with UEFI first), followed by CentOS 7.0 in another live USB. The Ubuntu installation was smooth. However the computer cannot recognise the CentOS 7.0 USB and directly boot into the installed Ubuntu whenever I restarted the machine. For preparing the CentOS 7.0 USB I have tried both (1) "dd" method as illustrated in the CentOS wiki page (http://wiki.centos.org/HowTos/InstallFromUSBkey), also (2) Using Unetbootin Linux version (http://www.tecmint.com/centos-7-installation/) (although from the CentOS wiki page it said Unetbootin is not recommended). Thinking it was something wrong about the CentOS 7.0 USB I have tried Mageia 4 USB. It worked well. I would like to know what is the reason behind?


title: Add multiple subdirectories under the same parent directory to PATH

text: I have installed some tools and put it under $HOME/tools/ and each tool has its own /bin directory that contains the executable program. I now have the path to each individual /bin in my $HOME/.bashrc file like this:               export PATH=$PATH:$HOME/tools/tool1/bin     export PATH=$PATH:$HOME/tools/tool2/bin     ...      I'm wondering if it's OK to write the following for all the tools?               export PATH=$PATH:$HOME/tools      If it doesn't work, what is the best way to do this?


title: Shell one-liner for adding a line in the middle of a pipe

text: I write a script which sends the input file to CPP, then to grep, then to a certain program:               cpp $1 | grep -v "#" | theprogram      But, "theprogram" requires the input to start with a certain constant line "theprogram-1.0". So, I want to prepend that constant line to the output of grep, just before it is sent to "theprogram". Of course, I can do all this using a temporary file... but I am sure there is a way to do such a simple task in a single line of shell pipes, without temporary files. What is the trick?


title: Netboot error: Invalid kernel argument

text: I'm trying to install Arch using the Netboot Live System following these steps:   * Install Syslinux on a SD card according to its wiki.   * Copy the iPXE kernel image to the SD card.   * Create an syslinux.cfg file. In the last step I used this content:               LABEL archnetboot     MENU LABEL Arch Linux Netboot Environment     KERNEL /ipxe.lkrn      But when the notebook starts it says:               SYSLINUX 6.02 EDD Copyright (C) 1994-2013 H. Peter Anvin et al     Loading /ipxe.lkrn... ok     Booting kernel failed: Invalid argument     boot:      So it seem like I need to pass some network kernel parameters or something like that, because I tried the image with Qemu and it works fine. The notebook is connected to the net by its Ethernet port, and I enabled the Network Boot in the BIOS although as far I know it is irrelevant when you try to boot from iPXE. Any ideas?


title: Linux mint 13: Error starting MATE

text: My Linux Mint installation seemed to work fine an hour ago, then I switched into Windows 7 which is installed on the same machine. When I restarted back into Mint, I got the following errors and can't continue: > Could not update ICEauthority file, problem with the configuration server. > > /usr/lib/mateconfig/mateconfig-sanity-check-2 exited with status 256. > > The panel encountered a problem loading OAFIDD:Mate_mintMenu (do you want to > delete the file?) And something about caja settings as well. After I click OK on all those, and say no to deleting the file I can see the desktop, with no icons and the applications menu is not working. How do I fix this?


title: Hopelessly stuck on making Nvidia Driver work on Debian

text: Before I posted question here, I'd been hacking around for the solution for my problem, but none of them worked. Here is my situation. I had a Win7 OS before I put a Debian Squeeze on it, now I got a dual-boot. However, I tried both ways to install driver for my Nvidia Quadro 1000M card on this machine, Debian ways,               http://wiki.debian.org/NvidiaGraphicsDrivers       and the Nvidia driver script from its website, both yielded the same result.               "failed to initialize the nvidia graphic device, none of the screen has been configured."(From var/log/Xorg.log)      and one thing I realized was that after tweaking the linux version of Nvidia driver from above, my windows Navidia driver broke as well when I logged into windows, and I had to reinstall to get it back working again. This seemed odd because they are on different partitions and filesystems. Does it mean that I can't get two drivers on the same machine even there are for different OSs and are in different partition? Or those above solutions only worked for standalone linux machine? Sorry about my incomplete knowledge for drivers, but please help cuz I am going nuts here. Thank you ini advance.


title: Why might these values not be uniq'ed together?

text: I am trying to figure out which IP addresses hit the server most often. I received this surprising output from `uniq`:               $ cat access_log | awk '{print $1}' | uniq -c | sort -bnr | head      26 73.23.5.25      25 73.23.5.25      24 73.23.5.25      23 73.23.5.25      23 73.23.5.25      23 73.23.5.25      22 73.23.5.25      21 73.23.5.25      19 73.23.5.25      18 73.23.5.25      Why might these addresses not be considered the same address by `uniq`? I have looked at the source file and there are no crazy tabs or other whitespace. These are fairly common Apache access logs.


title: Getting emacs to convert latex on the fly?

text: What's really nice about posting in the math stackexchange, and other forums, is that you can view the latex symbols right below as you're typing your post. Is there a way to do this in emacs? That is, can I type "$\in$" and have it immediately convert the code to the "element of" symbol (in the position where I typed it)?


title: Owner & Group setting for OpenCart install on CentOS 6.3

text: I'm setting up a development server on a HP microserver with CentOS 6.3. I'm relatively new to Linux and have ran into some issues/confusion. I have the server fully setup/updated with yum. It's a headless server & I'm connecting via PuTTY. For the following installs of OpenCart, I'm logged in via SSH as a regular non-root user. I'm trying to do a clean install of OpenCart 1.5.4.1. I tried setting OC up with Yum first and came up against permission/ownership issues, so I forgot about doing it that way. Then I just extracted the files locally on my windows machine and FTP'ed them into my required directory. I was still getting folder unwritable errors when trying to install OC. I set the req'd folders to their recommended permissions (755) and temporarily turned off SELinux. It still wouldn't allow me to install, I was still getting the folder unwritable errors. I eventually changed the owner of these directories to Apache and this seemed to allow it to install. Is this correct? Can anyone help me with what the group and owner should be set to? I know it's only a dev server but I want to try and simulate a live server and have it as secure as possible and learn to do things the correct way. Even a link to a page/tutorial that would point me in the right direction would be great. I've trawled the web & posted a Q on the OpenCart forums but got no reply. As i'm quite new to the Linux world my knowledge is limited & I just can't figure it out. Thanks.


title: Force TreeSheets to open a new file in a new window instead of tabbing?

text: I am using the application TreeSheets, which is something like Excel on steroids. And I want to be able to view two "spreadsheets" side-by-side. Sadly, the application itself does not offer this as an option, and automatically puts each newly opened document in a new tab, without even the possibility to "arrange windows" within the main application window as known from Microsoft Office products. Is there any trick to trick the application into starting a second time? Maybe something on a window manager level? (I am using KDE + xmonad; it is OK if it is a hack which happens to produce something ugly like a tab without visible menus or window decorations). Or maybe somehow forcing the program to start in a second, different process. I don't need the two instances of the program to somehow "know" each other (as opposed to Excel spreadsheets where you can refer to the cells of a different spreadsheet file). All I need between the two is simple clipboard functionality for copying and pasting plain text. I don't mind using inelegant tricks as long as it works. My current solution is to open the second spreadsheet on a second computer with Synergy; anything less painful is welcome.


title: VNC from host PC to Android phone running Ubuntu

text: While I know how to do this from my phone itself, where it loads the GUI on Ubuntu and I have a desktop environment, it's not as useful for what I'm trying to accomplish, which is to have a development environment for writing ARM assembly code. So, I was hoping to see if anyone would be able to offer some suggestions/advice or point to resources where I could use my desktop PC to VNC into my Android phone while it's running Ubuntu.


title: What could be causing this weird buzzing when using my usb headset for 48khz audio?

text: I have a Logitech USB headset ( I think it's a H330, but I don't remember the model number right). Occasionally, on Linux there would be a loud buzzing noise in the right ear that was many times louder than the audio. This happened in different apps with different files at different times. I wasn't able to narrow it down until recently, when I found out that it appears to be an issue with 48khz audio. I have two video files. The first has mpeg audio at 44.1khz, the second has mpeg audio at 48khz. The second causes the weird buzzing, the first does not. The results:   * 44.1khz audio, VLC on Linux, headset plugged in - no buzzing   * 48khz audio, VLC on Linux, headset plugged in - has buzzing   * 48khz audio, mplayer, headset plugged in - buzzing   * 48khz audio, VLC on Windows, headset plugged in - no buzzing   * 48khz, VLC on Linux, headset plugged out - no buzzing So it appears to be an issue at a driver level or something to do with pulse. I think I've ruled out hardware problems or issues with the video file with this testing (although it wasn't a issue with the file anyway, as this happened on some youtube videos too) Any idea what's causing this and how I can fix it?


title: SVN error message: "E200030: sqlite: database disk image is malformed" on checkout

text: The `.svn` folder doesn't exist yet. I tried deleting it after it was created, but I get the same issue again               @:/var/www/htdocs$ svn checkout https://host/svn/trunk/ .     svn: E200030: sqlite: database disk image is malformed     svn: E200030: sqlite: database disk image is malformed               @:/home/pi# svn --version     svn, version 1.7.5 (r1336830)        compiled Jun 27 2012, 11:28:48          @:/home/pi# ldd /usr/bin/svn             libsqlite3.so.0 => /usr/lib/arm-linux-gnueabihf/libsqlite3.so.0 (0x404f2000)      I have no idea how to fix this.


title: cat corrupts serial port data

text: I have an application which writes some bytes to a serial port. When I do `cat /dev/ttyS0` to see what is being transferred, I find that the data is corrupted by the `cat` command. Is there any other way to see what is being sent on the serial port? Does anyone know why `cat` changes the data? **Edit** : There is another application on the other side and I want to intercept the data in order to check its content but the application must continue to work.


title: program needs to be run as root by any user and can be located anywhere

text: I have some program called foo that needs root privileges when it executes. foo needs to be able to be run by any user and can be located at any path. The reason this program can be at any path is because our company is developing program foo and each user may have a personal version of the program in some personal directory while they work on it. My question is this, what is the most secure way to handle this? I have been researching the sudoers file and have basically 2 ideas.   1. List all paths the program can be at in the sudoers file. This is problematic because it requires frequent editing of the sudoers list and also still poses a security risk since non root users will own their individual copy of foo and could copy some system program over foo and then use it as root.   2. Write a script called start_foo which performs some input validation on the passed program such as size and name and then starts the passed in foo. start_foo could live in `/usr/bin` and owned by root but runnable by anyone. This option still includes the security hole of being able to write over the users foo program with another root requiring program but hopefully the size check would catch some malicious cases. Is there a "cannonical" way to solve this problem I haven't found or thought of? If not which of the above or possibly other solution is the best way to handle the problem?


title: Error mounting a CF card

text: How can I fix this? It showed up when mounting a CF card on Ubuntu Linux. Error mounting /dev/sdb1 at /media/mohamed/1258-C98A: Command-line `mount -t "vfat" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush" "/dev/sdb1" "/media/mohamed/1258-C98A"' exited with non-zero exit status 32: mount: /dev/sdb1: can't read superblock


title: Terminal emulators and btsync behavior

text: I've downloaded the BitTorrent Sync binary. The program only provides a Web UI interface. I'm trying to create a window for the daemon, using a terminal emulator, because I don't need an always online `btsync`. When I execute:               cd ~/.btsync/; konsole -e "./btsync --nodaemon"      the `btsync` daemon EXITS when i CLOSE the konsole window clicking the X button. When I run:               cd ~/.btsync/; uxterm -e "./btsync --nodaemon"      the `xterm` window STILL RUNS when I click the window close button. When I execute:               cd ~/.btsync/; urxvt -e "./btsync --nodaemon"      and I close the `rxvt` window, the `btsync` DAEMON STILL RUNS in background. I was trying to use `urxvt` to assign an icon and a title to the "daemon window" and my only solution was execute this script:               #!/bin/sh     cd ~/.btsync/     echo BitTorrent Sync Web UI: http://127.0.0.1:8888/gui/en/index.html     echo     exec ~/.btsync/btsync --log ~/.btsync/sync.log --nodaemon      using this command line in a `.desktop` file:               Exec=/usr/bin/urxvt -fn "xft:Inconsolata" -icon ~/.btsync/btsync.png -iconic -title "BitTorrent Sync" -e btsync; /bin/kill $(cat ~/.btsync/.sync/sync.pid)      using `/bin/kill` to close the daemon when the `rxvt` window closes. My question is: somebody knows why `konsole`, `xterm`, `rxvt` doesn't share the same behavior in this case? I can't use `x-terminal-emulator` to generalize my code for this reason, and I have multiple clients with different Linux desktop environments in use.


title: many many dpkg errors while upgrading

text: I am using Ubuntu 14.04, newly upgraded from 12.04. I was trying to upgrade my software, but it is showing many, many dpkg errors regarding `texlive-*`. When I type following command:               sudo apt-get upgrade      I get the following error:               Ignoring /etc/texmf/texmf.d/05TeXMF.cnf during generation of texmf.cnf, please remove manually!     Ignoring /etc/texmf/texmf.d/15Plain.cnf during generation of texmf.cnf, please remove manually!     Ignoring /etc/texmf/texmf.d/45TeXinputs.cnf during generation of texmf.cnf, please remove manually!     Ignoring /etc/texmf/texmf.d/55Fonts.cnf during generation of texmf.cnf, please remove manually!     Ignoring /etc/texmf/texmf.d/65BibTeX.cnf during generation of texmf.cnf, please remove manually!     Ignoring /etc/texmf/texmf.d/75DviPS.cnf during generation of texmf.cnf, please remove manually!     Ignoring /etc/texmf/texmf.d/80DVIPDFMx.cnf during generation of texmf.cnf, please remove manually!     Ignoring /etc/texmf/texmf.d/85Misc.cnf during generation of texmf.cnf, please remove manually!     Ignoring /etc/texmf/texmf.d/90TeXDoc.cnf during generation of texmf.cnf, please remove manually!     Ignoring /etc/texmf/texmf.d/95NonPath.cnf during generation of texmf.cnf, please remove manually!     Running mktexlsr. This may take some time... done.     Running updmap-sys. This may take some time...      updmap-sys failed. Output has been stored in     /tmp/updmap.kk3Qciew     Please include this file if you report a bug.          Sometimes, not accepting conffile updates in /etc/texmf/updmap.d     causes updmap-sys to fail.  Please check for files with extension     .dpkg-dist or .ucf-dist in this directory          dpkg: error processing package tex-common (--configure):      subprocess installed post-installation script returned error exit status 1     dpkg: dependency problems prevent configuration of latex-sanskrit:      latex-sanskrit depends on tex-common (>= 3); however:       Package tex-common is not configured yet.          dpkg: error processing package latex-sanskrit (--configure):      dependency problems - leaving unconfigured     dpkg: dependency problems prevent configuration of texlive-latex-base:      texlive-latex-base depends on tex-common (>= 3); however:       Package tex-common is not configured yet.      and many more of such types. How can I fix this? @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ The output of the command :: apt-get install tex-common is following :: find: `/etc/texmf/texmf.d': No such file or directory Running mktexlsr. This may take some time... done. Running updmap-sys. This may take some time... updmap-sys failed. Output has been stored in /tmp/updmap.8Lse0Bt5 Please include this file if you report a bug. Sometimes, not accepting conffile updates in /etc/texmf/updmap.d causes updmap-sys to fail. Please check for files with extension .dpkg-dist or .ucf- dist in this directory dpkg: error processing package tex-common (--configure): subprocess installed post-installation script returned error exit status 1 dpkg: dependency problems prevent configuration of latex-sanskrit: latex-sanskrit depends on tex-common (>= 3); however: Package tex-common is not configured yet. dpkg: error processing package latex-sanskrit (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of texlive-latex-base: texlive-latex-base depends on tex-common (>= 3); however: Package tex-common is not configured yet. dpkg: error processing package texlive-latex-base (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of texlive-generic-recommended: texlive-generic-recommended depends on tex-common (>= 3); however: Package tex-common is not configured yet. dpkg: error processing package texlive-generic-recommended (--configure): dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure.dpkg: dependency problems prevent configuration of texlive-pstricks: texlive- pstricks depends on texlive-generic-recommended (>= 2013.20130512); however: Package texlive-generic-recommended is not configured yet. texlive-pstricks depends on tex-common (>= 3); however: Package tex-common is not configured yet. dpkg: error processing package texlive-pstricks (--configure): dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure. No apport report written because MaxReports is reached already No apport report written because MaxReports is reached already dpkg: dependency problems prevent configuration of asymptote: asymptote depends on texlive-latex-base; however: Package texlive-latex-base is not configured yet. asymptote depends on texlive-pstricks; however: Package texlive-pstricks is not configured yet. asymptote depends on tex-common (>= 3); however: Package tex-common is not configured yet. dpkg: error processing package asymptote (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of texlive-latex-recommended: texlive-latex-recommended depends on texlive-latex- base (>= 2013.20130512); however: Package texlive-latex-base is not configured yet. texlive-latex-recommended depends on tex-common (>= 3); however: Package tex-common is not configured yet. No apport report written because MaxReports is reached already dpkg: error processing package texlive-latex-recommended (--configure): dependency problems - leaving unconfigured No apport report written because MaxReports is reached already dpkg: dependency problems prevent configuration of cm-super- minimal: cm-super-minimal depends on tex-common (>= 3); however: Package tex- common is not configured yet. cm-super-minimal depends on texlive-latex- recommended; however: Package texlive-latex-recommended is not configured yet. dpkg: error processing package cm-super-minimal (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of cm-super: cm-super depends on tex-common (>= 3); however: Package tex-common is not configured yet. cm-super depends on texlive-latex- recommended; however: Package texlive-latex-recommended is not configured yet. cm-super depends on cm-super-minimal (= 0.3.4-9); however: Package cm-super- minimal is not configured yet. No apport report written because MaxReports is reached already dpkg: error processing package cm-super (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of texlive- metapost: texlive-metapost depends on tex-common (>= 3); however: Package tex- common is not configured yet. No apport report written because MaxReports is reached already dpkg: error processing package texlive-metapost (--configure): dependency problems - leaving unconfigured No apport report written because MaxReports is reached already dpkg: dependency problems prevent configuration of context: context depends on texlive-metapost (>= 2013); however: Package texlive-metapost is not configured yet. context depends on tex-common (>= 4); however: Package tex-common is not configured yet. dpkg: error processing package context (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of context-modules: context-modules depends on context (>> 2011); however: Package context is not configured yet. context-modules depends on tex-common (>= 3); however: Package tex-common is not configured yet. dpkg: error processing package context-modules (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of texlive-font-utils: texlive-font-utils depends on tex-common (>= 3); however: Package tex-common is not configured yet. dpkg: error processing package texlive-font-utils (--configure): dependency problems - leaving unconfigured No apport report written because MaxReports is reached already dpkg: dependency problems prevent configuration of texlive- extra-utils: texlive-extra-utils depends on tex-common (>= 3); however: Package tex-common is not configured yet. texlive-extra-utils depends on texlive-latex-base (>= 2013.20130512); however: Package texlive-latex-base is not configured yet. No apport report written because MaxReports is reached already dpkg: error processing package texlive-extra-utils (--configure): dependency problems - leaving unconfigured No apport report written because MaxReports is reached already No apport report written because MaxReports is reached already dpkg: dependency problems prevent configuration of feynmf: feynmf depends on tex- common (>= 3); however: Package tex-common is not configured yet. feynmf depends on texlive-latex-base; however: Package texlive-latex-base is not configured yet. feynmf depends on texlive-font-utils; however: Package texlive-font-utils is not configured yet. feynmf depends on texlive-extra- utils; however: Package texlive-extra-utils is not configured yet. dpkg: error processing package feynmf (--configure): dependency problems - leaving unconfigured No apport report written because MaxReports is reached already dpkg: dependency problems prevent configuration of latex-xcolor: latex-xcolor depends on texlive-latex-recommended; however: Package texlive- latex-recommended is not configured yet. latex-xcolor depends on tex-common (>= 3); however: Package tex-common is not configured yet. dpkg: error processing package latex-xcolor (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of latex-beamer: latex-beamer depends on tex-common (>= 4); however: Package tex- common is not configured yet. latex-beamer depends on latex-xcolor (>= 2.00-1); however: Package latex-xcolor is not configured yet. latex-beamer depends on texlive-latex-base; however: Package texlive-latex-base is not configured yet. dpkg: error processing package latex-beamer (--configure): dependency problems - leaving unconfigured No apport report written because MaxReports is reached already No apport report written because MaxReports is reached already dpkg: dependency problems prevent configuration of latex-cjk-common: latex-cjk- common depends on texlive-latex-base; however: Package texlive-latex-base is not configured yet. latex-cjk-common depends on texlive-font-utils (>= 2007.dfsg.2-1); however: Package texlive-font-utils is not configured yet. latex-cjk-common depends on tex-common (>= 4); however: Package tex-common is not configured yet. dpkg: error processing package latex-cjk-common (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of latex-cjk-chinese: latex-cjk-chinese depends on latex-cjk- common (= 4.8.3+git20120914-2ubuntu1); however: Package latex-cjk-common is not configured yet. latex-cjk-chinese depends on tex-common (>= 3); however: Package tex-common is not configured yet. No apport report written because MaxReports is reached already dpkg: error processing package latex-cjk-chinese (--configure): dependency problems - leaving unconfigured No apport report written because MaxReports is reached already dpkg: dependency problems prevent configuration of latex-cjk-japanese: latex-cjk-japanese depends on latex-cjk-common (= 4.8.3+git20120914-2ubuntu1); however: Package latex-cjk-common is not configured yet. latex-cjk-japanese depends on tex-common (>= 4); however: Package tex-common is not configured yet. dpkg: error processing package latex-cjk-japanese (--configure): dependency problems - leaving unconfigured No apport report written because MaxReports is reached alreadydpkg: dependency problems prevent configuration of latex-cjk- korean: latex-cjk-korean depends on latex-cjk-common (>= 4.8.3+git20120914-2ubuntu1); however: Package latex-cjk-common is not configured yet. latex-cjk-korean depends on tex-common (>= 4); however: Package tex-common is not configured yet. dpkg: error processing package latex-cjk-korean (--configure): dependency problems - leaving unconfigured No apport report written because MaxReports is reached alreadydpkg: dependency problems prevent configuration of texlive- lang-other: texlive-lang-other depends on tex-common (>= 3); however: Package tex-common is not configured yet. dpkg: error processing package texlive-lang-other (--configure): dependency problems - leaving unconfigured No apport report written because MaxReports is reached already dpkg: dependency problems prevent configuration of latex-cjk- thai: latex-cjk-thai depends on latex-cjk-common (>= 4.8.3+git20120914-2ubuntu1); however: Package latex-cjk-common is not configured yet. latex-cjk-thai depends on texlive-latex-base; however: Package texlive-latex-base is not configured yet. latex-cjk-thai depends on tex-common (>= 4); however: Package tex-common is not configured yet. latex-cjk-thai depends on texlive-lang-other (>= 2013.20130523-1); however: Package texlive- lang-other is not configured yet. dpkg: error processing package latex-cjk-thai (--configure): dependency problems - leaving unconfigured No apport report written because MaxReports is reached already dpkg: dependency problems prevent configuration of latex-cjk- all: latex-cjk-all depends on latex-cjk-common (>= 4.8.3+git20120914-2ubuntu1); however: Package latex-cjk-common is not configured yet. latex-cjk-all depends on latex-cjk-chinese (>= 4.8.3+git20120914-2ubuntu1); however: Package latex-cjk-chinese is not configured yet. latex-cjk-all depends on latex-cjk-japanese (>= 4.8.3+git20120914-2ubuntu1); however: Package latex-cjk-japanese is not configured yet. latex-cjk-all depends on latex-cjk-korean (= 4.8.3+git20120914-2ubuntu1); however: Package latex-cjk-korean is not configured yet. latex-cjk-all depends on latex-cjk-thai (= 4.8.3+git20120914-2ubuntu1); however: Package latex-cjk-thai is not configured yet. dpkg: error processing package latex-cjk-all (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of latexmk: latexmk depends on texlive-latex-base; however: Package texlive-latex-base is not configured yet. No apport report written because MaxReports is reached already dpkg: error processing package latexmk (--configure): dependency problems - leaving unconfigured No apport report written because MaxReports is reached alreadydpkg: dependency problems prevent configuration of m-tx: m-tx depends on tex-common (>= 4); however: Package tex-common is not configured yet. dpkg: error processing package m-tx (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of musixtex: musixtex depends on tex-common (>= 4); however: Package tex-common is not configured yet. No apport report written because MaxReports is reached already dpkg: error processing package musixtex (--configure): dependency problems - leaving unconfigured No apport report written because MaxReports is reached already dpkg: dependency problems prevent configuration of pmx: pmx depends on tex- common (>= 4); however: Package tex-common is not configured yet. pmx depends on texlive-latex-base; however: Package texlive-latex-base is not configured yet. dpkg: error processing package pmx (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of purifyeps: purifyeps depends on texlive-metapost; however: Package texlive- metapost is not configured yet. No apport report written because MaxReports is reached already dpkg: error processing package purifyeps (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of texlive-fonts- recommended: texlive-fonts-recommended depends on tex-common (>= 3); however: Package tex-common is not configured yet. No apport report written because MaxReports is reached already dpkg: error processing package texlive-fonts-recommended (--configure): dependency problems - leaving unconfigured No apport report written because MaxReports is reached already dpkg: dependency problems prevent configuration of texlive: texlive depends on texlive-latex-recommended (>= 2013.20130512); however: Package texlive-latex-recommended is not configured yet. texlive depends on texlive-fonts-recommended (>= 2013.20130512); however: Package texlive-fonts- recommended is not configured yet. texlive depends on texlive-latex-base (>= 2013.20130512); however: Package texlive-latex-base is not configured yet. dpkg: error processing package texlive (--configure): dependency problems - leaving unconfigured No apport report written because MaxReports is reached already dpkg: dependency problems prevent configuration of texlive-bibtex- extra: texlive-bibtex-extra depends on tex-common (>= 3); however: Package tex-common is not configured yet. texlive-bibtex-extra depends on texlive- latex-base (>= 2013.20130512); however: Package texlive-latex-base is not configured yet. dpkg: error processing package texlive-bibtex-extra (--configure): dependency problems - leaving unconfigured No apport report written because MaxReports is reached already dpkg: dependency problems prevent configuration of texlive- fonts-extra: texlive-fonts-extra depends on tex-common (>= 3); however: Package tex-common is not configured yet. dpkg: error processing package texlive-fonts-extra (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of texlive-fonts-extra-doc: texlive-fonts-extra-doc depends on tex-common (>= 3); however: Package tex-common is not configured yet. No apport report written because MaxReports is reached already dpkg: error processing package texlive-fonts-extra-doc (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of texlive-fonts-recommended-doc: texlive-fonts-recommended-doc depends on tex- common (>= 3); however: Package tex-common is not configured yet. No apport report written because MaxReports is reached already dpkg: error processing package texlive-fonts-recommended-doc (--configure): dependency problems - leaving unconfigured No apport report written because MaxReports is reached already dpkg: dependency problems prevent configuration of texlive- formats-extra: texlive-formats-extra depends on tex-common (>= 3); however: Package tex-common is not configured yet. texlive-formats-extra depends on texlive-latex-base (>= 2013.20130512); however: Package texlive-latex-base is not configured yet. dpkg: error processing package texlive-formats-extra (--configure): dependency problems - leaving unconfigured No apport report written because MaxReports is reached already dpkg: dependency problems prevent configuration of texlive- lang-polish: texlive-lang-polish depends on texlive-latex-base (>= 2013.20130512); however: Package texlive-latex-base is not configured yet. texlive-lang-polish depends on tex-common (>= 3); however: Package tex-common is not configured yet. dpkg: error processing package texlive-lang-polish (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of texlive-generic-extra: texlive-generic-extra depends on tex- common (>= 3); however: Package tex-common is not configured yet. No apport report written because MaxReports is reached already dpkg: error processing package texlive-generic-extra (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of texlive-lang-indic: texlive-lang-indic depends on tex-common (>= 3); however: Package tex-common is not configured yet. No apport report written because MaxReports is reached already dpkg: error processing package texlive-lang-indic (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of texlive-lang-spanish: texlive-lang-spanish depends on tex-common (>= 3); however: Package tex-common is not configured yet. No apport report written because MaxReports is reached already dpkg: error processing package texlive-lang-spanish (--configure): dependency problems - leaving unconfigured No apport report written because MaxReports is reached already dpkg: dependency problems prevent configuration of texlive-omega: texlive-omega depends on texlive-latex-base (>= 2013.20130512); however: Package texlive-latex-base is not configured yet. texlive-omega depends on tex-common (>= 3); however: Package tex-common is not configured yet. dpkg: error processing package texlive-omega (--configure): dependency problems - leaving unconfigured No apport report written because MaxReports is reached already dpkg: dependency problems prevent configuration of texlive- lang-cyrillic: texlive-lang-cyrillic depends on tex-common (>= 3); however: Package tex-common is not configured yet. texlive-lang-cyrillic depends on texlive-latex-base (>= 2013.20130512); however: Package texlive-latex-base is not configured yet. dpkg: error processing package texlive-lang-cyrillic (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of texlive-humanities-doc: texlive-humanities-doc depends on tex-common (>= 3); however: Package tex-common is not configured yet. No apport report written because MaxReports is reached already dpkg: error processing package texlive-humanities-doc (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of texlive-lang-english: texlive-lang-english depends on tex-common (>= 3); however: Package tex-common is not configured yet. No apport report written because MaxReports is reached already dpkg: error processing package texlive-lang-english (--configure): dependency problems - leaving unconfigured No apport report written because MaxReports is reached already dpkg: dependency problems prevent configuration of fragmaster: fragmaster depends on texlive-latex-base; however: Package texlive-latex-base is not configured yet. fragmaster depends on texlive-latex-recommended; however: Package texlive-latex-recommended is not configured yet. fragmaster depends on texlive-extra-utils; however: Package texlive-extra-utils is not configured yet. fragmaster depends on texlive-font-utils; however: Package texlive-font-utils is not configured yet. dpkg: error processing package fragmaster (--configure): dependency problems - leaving unconfigured No apport report written because MaxReports is reached alreadydpkg: dependency problems prevent configuration of texlive-latex-extra- doc: texlive-latex-extra-doc depends on tex-common (>= 3); however: Package tex-common is not configured yet. dpkg: error processing package texlive-latex-extra-doc (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of texlive-publishers-doc: texlive-publishers-doc depends on tex-common (>= 3); however: Package tex-common is not configured yet. No apport report written because MaxReports is reached already dpkg: error processing package texlive-publishers-doc (--configure): dependency problems - leaving unconfigured No apport report written because MaxReports is reached alreadydpkg: dependency problems prevent configuration of texlive-lang- european: texlive-lang-european depends on tex-common (>= 3); however: Package tex-common is not configured yet. dpkg: error processing package texlive-lang-european (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of texlive-pictures-doc: texlive-pictures-doc depends on tex- common (>= 3); however: Package tex-common is not configured yet. No apport report written because MaxReports is reached already dpkg: error processing package texlive-pictures-doc (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of texlive-metapost-doc: texlive-metapost-doc depends on tex-common (>= 3); however: Package tex-common is not configured yet. No apport report written because MaxReports is reached already dpkg: error processing package texlive-metapost-doc (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of texlive-science-doc: texlive-science-doc depends on tex-common (>= 3); however: Package tex-common is not configured yet. No apport report written because MaxReports is reached already dpkg: error processing package texlive-science-doc (--configure): dependency problems - leaving unconfigured dpkg: too many errors, stopping No apport report written because MaxReports is reached already Errors were encountered while processing: tex-common latex-sanskrit texlive-latex-base texlive-generic- recommended texlive-pstricks asymptote texlive-latex-recommended cm-super- minimal cm-super texlive-metapost context context-modules texlive-font-utils texlive-extra-utils feynmf latex-xcolor latex-beamer latex-cjk-common latex- cjk-chinese latex-cjk-japanese latex-cjk-korean texlive-lang-other latex-cjk- thai latex-cjk-all latexmk m-tx musixtex pmx purifyeps texlive-fonts- recommended texlive texlive-bibtex-extra texlive-fonts-extra texlive-fonts- extra-doc texlive-fonts-recommended-doc texlive-formats-extra texlive-lang- polish texlive-generic-extra texlive-lang-indic texlive-lang-spanish texlive- omega texlive-lang-cyrillic texlive-humanities-doc texlive-lang-english fragmaster texlive-latex-extra-doc texlive-publishers-doc texlive-lang- european texlive-pictures-doc texlive-metapost-doc texlive-science-doc Processing was halted because there were too many errors. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ and the output of the command apt-cache policy tex-common is as follows :: tex-common: Installed: 4.04 Candidate: 4.04 Version table: _*_ 4.04 0 500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages 100 /var/lib/dpkg/status @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@


title: SLIM login manager Causes Urxvt window to loose Transparent/Opacity effect

text: On Gentoo.... This is strange.... when I start X through SLIM I loose the opacity(transparent look) on my urxvt windows. It's only when I start X through SLIM. If I start X with xinit directly, without SLIM, then my `urxvt` windows correctly have the opacity as they should. The window manager is started the same way regardless with or without slim...through the .xinitrc file:               compiz --replace ccp&      xterm       There are no issues with `compiz` ether way...only the transparency with `urxvt`. The transparency with `urxvt` is set in `.Xdefaults` wtih:               urxvt*borderColor: rgba:0000/0000/0000/dddd      URxvt*background: rgba:0000/0000/0000/dddd


title: Resize window button panels in Cinnamon

text: I am having a hard time figuring out how to re-size the window control buttons in cinnamon. Can anyone point me in the right direction of how to change this? Specifically the padding/margin. See the images blow: The button pannels are far to tall and take up a large amount of unnecessary space. ![enter image description here](http://i.stack.imgur.com/9Dlum.png) ![enter image description here](http://i.stack.imgur.com/zSMiB.png)


title: How to write to RAID 1 disks on Raspberry PI

text: I'm using Arch Linux on my Raspberry Pi, though I'm not sure that's relevant. I followed this tutorial to set up a RAID 1 array with 2 USB HDs. I then mounted the array (md0) in /media. What I can't find is how to write to this array. Do I write to /media/md0? Or do I write to one of the disks and mdadm then copies it to the second? md0 has only root write privileges. When I wrote a test file to it, it creates the file like it would for a normal file system, but I don't see that file when I cd to the disks. Shouldn't I be able to see the file on the disks? Below is the output of mdstat, which is how the tutorial suggests to monitor the disks:               $awk '/^md/ {printf "%s: ", $1}; /blocks/ {print $NF}' </proc/mdstat     md0: [_U]


title: Move files to multiple folders

text: I've searched for this function, and there are lots of answers, but I haven't been able to find anything that works for me. I have a folder with about 30,000 files, and I want a terminal command or bash script that will move these files into different folders. About 3000 files for each folder. Some of the filenames have underscores, spaces and hyphens, so the command should allow me to move those files as well as the files without underscores, spaces, and hyphens. The files are .jpgs, but I'd like a command that I can customize for any file type and file amount, in case I need to use it in the future for different formats and quantities. **UPDATE:** I found a bash script that answers my needs. It will move files in a folder into subfolders. It works with any type of file. The number "3001" represents the number of files you want moved to each subfolder. This number can be changed. So if you have a folder with 20000 files and you want the 20000 files divided into batches of 500 and moved to subfolders then you would replace "3001" with "500". You can also modify the script to only move particular file types, e.g.: to move only .jpg files, change "for file in *" to "for jpg_file in *.jpg". Also change "$file" to "$jpg_file".               #!/bin/bash          c=1; d=1; mkdir -p dir_${d}          for file in *     do             if [ $c -eq 3001 ]             then                     d=$(( d + 1 )); c=0; mkdir -p dir_${d}             fi             mv "$file" dir_${d}/             c=$(( c + 1 ))     done


title: rsync: continue or in random order

text: I use `rsync` over `tor`. It works for a while, then it drops the connection. That in itself is not a big problem and I suppose it is not entirely unexpected when running long sessions over `tor` that takes many minutes to complete. When I restart `rsync` it goes through the files in the same order as last time. That is a problem because some of these files change often (think of /var/spool of a busy mail server and you get the idea). This means that the files it gets to first get updated often, while files it never gets around to are never transferred. What I would prefer is to have `rsync` either continue where it left off or at least transfer the files in random order. Is there a general way of doing that?


title: Why does the while cycle skips and only reads the first line?

text: $ ls     testscript.sh  testservers.txt     $ cat testservers.txt      serverA IMM 10.2.3.4    USERID  PASSW0RD     serverB IMM 10.2.3.5    USERID  PASSW0RD     $      $      $ cat testscript.sh      #!/bin/bash          # test them..     egrep -vi '^#|^$' testservers.txt | while read ONELINE; do         # variables..         SERVER=`echo "$ONELINE" | awk 'BEGIN {FS="\t"} {print $1}'`         RSATYPE=`echo "$ONELINE" | awk 'BEGIN {FS="\t"} {print $2}'`         IP=`echo "$ONELINE" | awk 'BEGIN {FS="\t"} {print $3}'`         USER=`echo "$ONELINE" | awk 'BEGIN {FS="\t"} {print $4}'`         PWD=`echo "$ONELINE" | awk 'BEGIN {FS="\t"} {print $5}'`          if [ "$RSATYPE" = "IMM" ]; then         # main testing part for IMM             timeout 5 tsocks nc -z -w 3 "${IP}" 80 > /dev/null 2>&1; if [[ $? -eq 0 ]];                  then WEBINTOK="true"                 else WEBINTOK="false"                 fi                  IMMSSH=`(timeout 5 tsocks sshpass -p "${PWD}" ssh -l "${USER}" -o StrictHostKeyChecking=no "${IP}" exit)`             if echo "${IMMSSH}" | grep -q "tty name check failed"; then                  ${WEBINTOK} && echo -e "${SERVER} ${USER} - OK" || echo -e "${SERVER} ${USER} - ERROR"             else                  ${WEBINTOK} && echo -e "${SERVER} ${USER} - ERROR" || echo -e "${SERVER} ${USER} - ERROR"             fi     fi          done     $      $ bash testscript.sh      serverA USERID - OK     $       **Our quesiton** : why does the script only reads the first line?? It suppose to read all the lines in the testservers.txt .. UPDATE: the testservers.txt has correct TAB's, I don't really think that is the problem :\               $ cat -vte testservers.txt     serverA^IIMM^I10.2.3.4^IUSERID^IPASSW0RD$     serverB^IIMM^I10.2.3.5^IUSERID^IPASSW0RD$     $


title: Is there a command line tool for validating RDF files?

text: I am looking for a substitution of the W3C RDF Validator, as it is broken, in addition I want something a bit more automated, such as a command line tool. I have been using `xmllint` for checking XML files in the past. Are there any command line tools similar to that?


title: How to build AVR cross-compler under Gentoo Linux?

text: I need to install AVR cross-compiler on my PC. Some time ago I have used `crossdev -S avr` to build one, but it doesn't work anymore. I get following:               Calculating dependencies   * Missing digest for '/var/lib/layman/calculate/cross-avr/binutils/binutils-9999.ebuild'      * Missing digest for '/var/lib/layman/calculate/cross-avr/binutils/binutils-2.23.51.0.9.ebuild'      * Missing digest for '/var/lib/layman/calculate/cross-avr/binutils/binutils-2.23.51.0.8.ebuild'      * Missing digest for '/var/lib/layman/calculate/cross-avr/binutils/binutils-2.23.51.0.7.ebuild'      * Missing digest for '/var/lib/layman/calculate/cross-avr/binutils/binutils-2.23.51.0.6.ebuild'      * Missing digest for '/var/lib/layman/calculate/cross-avr/binutils/binutils-2.23.51.0.5.ebuild'      * Missing digest for '/var/lib/layman/calculate/cross-avr/binutils/binutils-2.23.51.0.3.ebuild'      * Missing digest for '/var/lib/layman/calculate/cross-avr/binutils/binutils-2.23.51.0.2.ebuild'      * Missing digest for '/var/lib/layman/calculate/cross-avr/binutils/binutils-2.23.51.0.1.ebuild'      * Missing digest for '/var/lib/layman/calculate/cross-avr/binutils/binutils-2.23.1.ebuild'      * Missing digest for '/var/lib/layman/calculate/cross-avr/binutils/binutils-2.23.ebuild'      * Missing digest for '/var/lib/layman/calculate/cross-avr/binutils/binutils-2.22.90.ebuild'      * Missing digest for '/var/lib/layman/calculate/cross-avr/binutils/binutils-2.22.52.0.4.ebuild'      * Missing digest for '/var/lib/layman/calculate/cross-avr/binutils/binutils-2.22-r1.ebuild'      * Missing digest for '/var/lib/layman/calculate/cross-avr/binutils/binutils-2.21.1-r1.ebuild'      * Missing digest for '/var/lib/layman/calculate/cross-avr/binutils/binutils-2.20.1-r1.ebuild'      * Missing digest for '/var/lib/layman/calculate/cross-avr/binutils/binutils-2.19.1-r1.ebuild'     ... done!          !!! All ebuilds that could satisfy "cross-avr/binutils" have been masked.     !!! One of the following masked packages is required to complete your request:     - cross-avr/binutils-9999::calculate (masked by: corruption)     - cross-avr/binutils-2.23.51.0.9::calculate (masked by: corruption)     - cross-avr/binutils-2.23.51.0.8::calculate (masked by: corruption)     - cross-avr/binutils-2.23.51.0.7::calculate (masked by: corruption)     - cross-avr/binutils-2.23.51.0.6::calculate (masked by: corruption)     - cross-avr/binutils-2.23.51.0.5::calculate (masked by: corruption)     - cross-avr/binutils-2.23.51.0.3::calculate (masked by: corruption)     - cross-avr/binutils-2.23.51.0.2::calculate (masked by: corruption)     - cross-avr/binutils-2.23.51.0.1::calculate (masked by: corruption)     - cross-avr/binutils-2.23.1::calculate (masked by: corruption)     - cross-avr/binutils-2.23::calculate (masked by: corruption)     - cross-avr/binutils-2.22.90::calculate (masked by: corruption)     - cross-avr/binutils-2.22.52.0.4::calculate (masked by: corruption)     - cross-avr/binutils-2.22-r1::calculate (masked by: corruption)     - cross-avr/binutils-2.21.1-r1::calculate (masked by: corruption)     - cross-avr/binutils-2.20.1-r1::calculate (masked by: corruption)     - cross-avr/binutils-2.19.1-r1::calculate (masked by: corruption)      Since all the packages are masked by corruption, it is not possible to unmask them common way; while manual manifest generation is considered to be bad practice.


title: When do I need to specify add_efi_memmap as kernel argument in UEFI/EFI boot?

text: I am reading some tutorials how to EFI stub (efistub) load the Linux kernel. These instructions often use kernel boot parameter `add_efi_memmap`. The intended hardware is Intel x64 having 8GB of RAM. My current setup is running `grub-efi` bootloader and kernel v3.13. **GRUB** boot **without** the `add_efi_memmap` boot argument:   * `23` BIOS-e820 lines counted by `dmesg | grep BIOS-e820: | wc -l`   * `243` EFI memory lines counted by `dmesg | grep efi:\ mem | wc -l`   * DMA zone: `24` pages reserved   * Memory: 7840568K/8283384K available   * 442816K reserved **GRUB** boot **with** `add_efi_memmap` and the EFI memory map size does seem to differ:   * `23` BIOS-e820 lines   * `57` EFI memory lines   * DMA zone: `22` pages reserved   * Memory: 7885076K/8283384K available   * 398308K reserved **EFI stub** boot **without** `add_efi_memmap`:   * `22` BIOS-e820 lines   * `60` EFI memory lines   * DMA zone: `21` pages reserved   * Memory: 7885012K/8283384K available **EFI stub** boot **with** `add_efi_memmap`:   * `22` BIOS-e820 lines   * `66` EFI memory lines   * DMA zone: `21` pages reserved   * Memory: 7882124K/8283384K available After reading more information - as inlined below - I can't figure out whether to add `add_efi_memmap` or not. It does something extra which doesn't seem absolutely necessary to boot. On the other hand it can give to give a better (more complete) view of usable memory. In which cases should this **add_efi_memmap** boot argument be used for EFI stub booting? Would that increase/decrease EFI stub boot speed, and increase or decrease free memory, available for applications? How to (better) check if my EFI memory map includes more entries then my E820 map? > **add_efi_memmap** : include EFI memory map of available physical RAM.   > If the EFI memory map has additional entries not in the E820 map, you can > include those entries in the kernels memory map of available physical RAM by > using the following kernel command line parameter. - > https://www.kernel.org/doc/Documentation/x86/x86_64/uefi.txt > > * * * > > Instead of always adding EFI memory map entries (if present) to the memory > map after initially finding either E820 BIOS memory map entries and/or > kernel command line memmap entries, -instead- only add such additional EFI > memory map entries if the kernel boot option: `add_efi_memmap` is specified. > - http://www.gossamer-threads.com/lists/linux/kernel/937817 > > * * * > > **Boot freezes** - If booting gets stuck without any error message after > GRUB loading the kernel and the initial ramdisk, try removing the > add_efi_memmap kernel parameter. - > https://wiki.archlinux.org/index.php/GRUB#Boot_freezes > > * * * > > This patch changes the behavior of the kexec loader when the > `add_efi_memmap` option is present on the currently running kernel's command > line, to read the kernel memory map from `/proc/iomem` instead of > `/sys/firmware/memmap`. > > On EFI systems, sometimes the e820 table is missing or incomplete. Systems > like these use the `add_efi_memmap` option to add EFI's memory table entries > to the kernel's memory table to build a complete picture of the system's > memory; however, using the option does not add these entries to the table > used to populate `/sys/firmware/memmap`, which is meant to be a pristine > original copy. > > The kexec loader uses the pristine memory map by default, which causes > problems when the loader doesn't have a complete picture of the system and > incorrectly loads the kernel or ramdisk in places that aren't actually > usable. This change makes the kexec loader check the running kernel's > command line for the `add_efi_memmap` option and if it finds it, will use > the modified map instead of the original map. - > http://lists.infradead.org/pipermail/kexec/2011-April/005014.html > > * * * > > The solution (hack), arrived at by the Linux kernel developers in 2009 after > a number of false starts was to add a kernel command line option, > `add_efi_memmap` – to tell the kernel to look at the EFI memory map and use > it to fix up various entries in the E820 memory map. - > http://blog.fpmurphy.com/2012/08/uefi-memory-v-e820-memory.html


title: Converting update-rc.d redis_6379 defaults to chkconfig command

text: I'm trying to run the commmand below to Centos and of course I get command not found. How do I then convert it to **chkconfig** ? > update-rc.d redis_6379 defaults


title: Is there a way to define the preferred merge or diff tool under Unix?

text: I know that you can define the preferred editor by setting the `EDITOR` environment variable. My question is if there is a similar solution for setting the preferred merge or diff tool.


title: Will g++ build 64bit on 64bit system?

text: If I am using automake to build a library if there are no specific flags specifying target system will the result be according to the system that the build is happening on? Meaning compiler on 64bit OS will produce 64bit result and 32bit will produce 32bit? (I am using Fedora 16 and g++ compiler)


title: How to setup iptables rules to allow skype

text: Here are my iptables rules to allow Squid to connect to a web server:               # Accept internally-requested input     iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT          #http,https traffic only through Squid - nobody user     iptables -A OUTPUT -p tcp -m multiport --dports 80,443 \         -m state -m owner --uid-owner nobody --state NEW,ESTABLISHED -j ACCEPT      Squid itself is listening 3128 port on localhost. In skype options I told it to use squid proxy and to use port 58215 for incoming connections. I added these lines for skype:               #skype incoming connections     iptables -A INPUT -p udp --dport 58215 -m state --state NEW,ESTABLISHED -j ACCEPT     iptables -A INPUT -p tcp --dport 58215 -m state --state NEW,ESTABLISHED -j ACCEPT      But it didn't work. Then I turned off the firewall:               iptables -P OUTPUT ACCEPT     iptables -P INPUT ACCEPT      Skype started working. So, I looked, what ports does it use:               # netstat -a -ptcp | grep skype     tcp     0    0 *:58215              *:*                     LISTEN      2944/skype     tcp     0    0 pc.home.org:56369    157.55.130.140:40031    ESTABLISHED 2944/skype     tcp     0    0 pc.home.org:54316    db3msgr5011307.ga:https ESTABLISHED 2944/skype     tcp     0    0 pc.home.org:34778    193.120.199.14:12350    ESTABLISHED 2944/skype          # netstat -a -pudp | grep skype     udp        0      0 *:58215                 *:*           2944/skype               udp        0      0 localhost:42865         *:*           2944/skype             But when I set restrictive policy:               iptables -P OUTPUT DROP     iptables -P INPUT DROP      Skype stops working. What should I do to make it work?


title: Quick access to work directory of background job

text: Minimal effort to reproduce what I am looking for, is as follows               /$ sleep 1h &     [1] 6564     /$ cd     ~$ jobs     [1]+  Running                 sleep 1h &  (wd: /)      When I use `jobs` to manage my background processes, the working directory (wd) is also displayed when it is different from the current directory. Is there an easy way to easily change into this displayed work directory? I am using bash 3.2. I am not looking for wrapper functions using `awk` or similar tools, I am specifcally looking for a shell built in solution.


title: How to package software in Funtoo/Gentoo?

text: I am new in Funtoo/Gentoo. Where do I start learning how to create my own "packages"? For example, I have done the following to get the source code of Bespin, a _Style for Qt4, derived from the Style for the Oxygen project_ and compile it:   1. `svn checkout svn://svn.code.sf.net/p/cloudcity/code/ cloudcity-code`   2. `cd cloudcity-code/` and `less INSTALL`, `q` when done with reading   3. `mkdir build` && `cd build`   4. Configure Bespin using ccmake: `ccmake ../`   5. Press `c` for a general configuration -- _assuming all requirements are satisfied_   6. Optionally, adjust some paths to your wishes   7. Press `c` for the final config run   8. Press `g` to generate makefiles   9. Run the compiler: `make` At this point, I am hesitant to execute (as root) `sudo make install`. In other distributions I'd use checkinstall to create a .deb package, for example, which I could easily remove anytime. What is the right way to do this in Gentoo? ebuilds?


title: Man folders and MANPATH

text: This thread What do the numbers in a man page mean? answers the question of the significance of the **numbers between parentheses within a man page**. My question is related. I have a local installation of a package called `ffmpeg`. The build folder has the typical `bin`, `lib`, etc. and then the folder: **`man/man1/`** with the following files:               ffmpeg-bitstream-filters.1  ffmpeg-scaler.1  libavdevice.3     ffmpeg-codecs.1             ffmpeg-utils.1   libavfilter.3     ffmpeg-devices.1            ffmpeg.1         libavformat.3     ffmpeg-filters.1            ffplay.1         libavutil.3     ffmpeg-formats.1            ffprobe.1        libswresample.3     ffmpeg-protocols.1          ffserver.1       libswscale.3     ffmpeg-resampler.1          libavcodec.3      My questions are:   1. Why is there a subfolder under `man` called `man1`? Why not just in `man`? And why the suffix `1`?   2. Which path should I add to `MANPATH`? The one pointing to `man` ? or `man/man1`?   3. What do the suffices in the files above mean? Are they the same numbers within parentheses described in the thread I mentioned above?


title: Using rsync to sync two directories on server and localhost, but size is different

text: I'm using rsync to sync a directory from server to localhost:               rsync -avz --delete ./Stuff user@host:/Stuff      This all works fine, but how come when I type 'du -s' in both the server and the localhost I get different numbers?


title: Screen shot in Lubuntu

text: I'm using Lubuntu 11.10 and when I press the `PrtSc` key I get a screen-shot automatically, without confirmation. The problem is that sometimes I press it accidentally and a lot of JPEG files are created on my home directory. So I would like to install a program to control screen-shots. What is the best LXDE native one for this? I don't want to install many libraries or Gnome ones.


title: Rsyslog Central Log Host

text: I'm moving from a syslog-ng central log host to rsyslog. I can't even seem to find syslog-ng in the CentOS repos these days. I want to filter logs by hostname and facility. Here is how I do it in syslog-ng               destination std {          file("/var/log/HOSTS/$HOST/$YEAR/$MONTH/$DAY/$FACILITY_$HOST_$YEAR_$MONTH_$DAY"              owner(root) group(root) perm(0600) dir_perm(0700) create_dirs(yes)         );      };      Is there a simple way to do this with rsyslog?


title: How to change "date modified" of multiple folders, to be the same of that of a .mkv that's inside each one, using Cygwin

text: How to change "date modified" of multiple folders to be the same of that of the .mkv that's inside each one. eg. there's folder1 which contains a file 1.mkv               folder1: 2/17/14     1.mkv: 1/6/12      I want folder1 to get "date modified" 1/6/12 there's also               folder2: 20/9/13     2.mkv: 1/1/10      I want folder2 to get "date modified" 1/1/10 etc Maybe some modification of this touch command from http://unix.stackexchange.com/a/1526 would help?               touch -r **/*(Dom[1]) .      (I can't understand what it does) Here are some sample paths (using Cygwin of course):               Kostas@Kostas-pc /cygdrive/f/movies     $ ls -l          drwx------+ 1 Kostas None     0 Feb 18 17:03 Serpico (1973)     drwx------+ 1 Kostas None     0 Feb 21 01:13 The Rite (2011)      eg               Kostas@Kostas-pc /cygdrive/f/movies     $ ls -l The\ Rite\ \(2011\)/     total 5730596     -rwx------+ 1 Kostas ???????? 5867505504 Apr 27  2011 The Rite (2011).mkv     -rwx------+ 1 Kostas ????????      12968 Feb 16 20:03 The Rite (2011).nfo     -rwx------+ 1 Kostas ????????      79757 Apr 26  2011 The Rite (2011).srt     -rwx------+ 1 Kostas ????????     264745 Oct  8  2011 The Rite (2011).tbn     -rwx------+ 1 Kostas ????????     255667 Oct  8  2011 The Rite (2011)-fanart.jpg


title: Arch Linux failed to install libproxy for invalid signature

text: The following message is from my terminal:               resolving dependencies...     looking for inter-conflicts...          Targets (1): libproxy-0.4.7-2          Total Installed Size:   0.29 MiB          Proceed with installation? [Y/n]      (1/1) checking package integrity                                                                  [###############################################] 100%     error: libproxy: signature from "Evangelos Foutras<evangelos@foutrelis.com>"  is invalid     error: failed to commit transaction (invalid or corrupted package (PGP signature))     Errors occurred, no packages were upgraded.      How can I fix this problem?


title: Cannot connect to printer hosted on a Belkin print server

text: I tried to tap into Belkin Home Base (model #F5L049au) print server. I want to access a printer hosted by it. I set it up as a CUPs printer with the below specifications:               Description:    Via Belkin @ 192.168.1.10     Location:   Peter's Bedroom     Driver: Brother HL-4050CDN BR-Script3 (color, 2-sided printing)     Connection: socket://192.168.1.10     Defaults:   job-sheets=none, none media=iso_a4_210x297mm sides=one-sided      I attempt to print and get an error:               'Printer may not be connected'      But it definitely is connected and I just printed from a Windows machine elsewhere on the network. (Aside: On Windows, the Belkin print server-hosted resources are managed in a dedicated control panel, which obviously is not made to work with Linux.) If you require other information, tell me what and how to retrieve it and it shall be posted in this space also. Please help me to access the printer Brother HL-4050CDN via the Belkin print server. `192.168.1.10` appears to be the print server's address, so in my failed attempt to set up the printer above I use IPP protocol. ![enter image description here](http://i.stack.imgur.com/tydgm.png) The print server has 4 ports, so the 4 variations below are an attempt to contact the printer on all 4 ports. I'm not even sure which port the printer is occupying in terms of 9100, 9101, 9102 or 9103. The print server itself responds to pings:               peter@Peter-OldPC:~$ ping 192.168.1.10:9100     ping: unknown host 192.168.1.10:9100     peter@Peter-OldPC:~$ ping 192.168.1.10:9101     ping: unknown host 192.168.1.10:9101     peter@Peter-OldPC:~$ ping 192.168.1.10:9102     ping: unknown host 192.168.1.10:9102     peter@Peter-OldPC:~$ ping 192.168.1.10:9103     ping: unknown host 192.168.1.10:9103     peter@Peter-OldPC:~$ ping 192.168.1.10     PING 192.168.1.10 (192.168.1.10) 56(84) bytes of data.     64 bytes from 192.168.1.10: icmp_seq=1 ttl=64 time=7.73 ms     64 bytes from 192.168.1.10: icmp_seq=2 ttl=64 time=1.37 ms     64 bytes from 192.168.1.10: icmp_seq=3 ttl=64 time=1.32 ms     64 bytes from 192.168.1.10: icmp_seq=4 ttl=64 time=1.29 ms     64 bytes from 192.168.1.10: icmp_seq=5 ttl=64 time=1.32 ms     64 bytes from 192.168.1.10: icmp_seq=6 ttl=64 time=1.51 ms     ...      @Caleb ![enter image description here](http://i.stack.imgur.com/rq07V.png) ![enter image description here](http://i.stack.imgur.com/pfUgJ.png)


title: Update HP-UX 11i software

text: I have an old HP-UX 9000/800 PA-RISC B.11.11 (11i) on hands and I'd like to update its services to newer version. Actually, I'd like to update LD from current version `B.11.18` to `B.11.32`; and Apache-based Web Server from `B.2.0.55.0` to `B.2.0.59.` How can I do that? I've googled about but there aren't many resources that talk about HP-UX.


title: root owned program with setuid bit on

text: Ping is a a program owned by root with the user id bit set.               $ ls -l `which ping`     -rwsr-xr-x 1 root root 35752 Nov  4  2011 /bin/ping      As I understand it, if a user runs the ping process, then the effective user id will change from the real user id (i.e. the user id of the person who launched the process) to the user id root. However when I try this and look at the output of ps to see if the ping process is running as the root user, I still get the real user id showing.               ps -e -o user,ruser,euser,cmd,args | grep ping     sashan   sashan   sashan   ping -i 10 -c 1000 www.goog ping -i 10 -c 1000 www.google.com


title: How to control the page parameters (margins, brochurisation) of `man -t` PostScript output?

text: I want to print several `man` pages as several booklets. I need to tweak the output of the `man -t` command so the resulting PostScript file will have the brochurised page numbering, pages must be numerated on 'outer' edges, and 'inner' margin must be wider than 'outer'. How can I achieve this? P.S. By "brochurised" ("booklet") numbering I mean such kind of numbering so if several printed pages are folded in half at once, the result will look like a book with proper sequental page numbering.


title: 'script' session logging makes me exit twice

text: I'm using a solution described here to log my shell sessions, by adding this to the end of `/etc/bash.bashrc`:               test "$(ps -ocommand= -p $PPID | awk '{print $1}')" == 'script' || (script -f /var/log/shellog/$USER-$(date -u +%Y.%m.%d-%H:%M:%S).${HOSTNAME:-$(hostname)}.$$.log)      This works fine, however, when I exit the shell, I have to exit twice: once from the script, and once from the shell:               Last login: Wed Aug  6 12:43:29 2014 from *****     Script started, file is /var/log/shellog/camilstaps-2014.08.06-10:43:40.cs.localdomain.16048.log     camilstaps@cs:/$ exit     exit     Script done, file is /var/log/shellog/camilstaps-2014.08.06-10:43:40.cs.localdomain.16048.log     camilstaps@cs:/$ exit     exit      I found this, and tried modifying the line in `/etc/bash.bashrc` accordingly, but this doesn't change anything:               test "$(ps -ocommand= -p $PPID | awk '{print $1}')" == 'script' || (script -f /var/log/shellog/$USER-$(date -u +%Y.%m.%d-%H:%M:%S).${HOSTNAME:-$(hostname)}.$$.log && exit)      I suppose it's because I have to `test` that I'm not in `script` already (without the `test` it keeps making new `script`s). But how can I make that I don't have to exit twice?


title: RedHat Enterprise Edition Kernel Support

text: Is there support for Kernel versions 2.4-2.6 in RedHat Enterprise Linux versions 4 and 5?


title: sed one-liner to delete word-medial spaces

text: I have a text file that consists of some N ORMAL E NGLISH W ORDS in all-caps. Unfortunately, these words all have a space between the first and following letters, which is not acceptable. I tried writing a `sed` expression that would match these occurrences `sed` `'s/[A-Z] [A-Z][A-Z]*/`, and I was successful. However, I was not successful in writing the replacement part.


title: Second monitor doesn't wake after kernel update in Fedora Core 20

text: I have an odd problem with my dual monitor setup. The base system is a Dell 6005 desktop with an ATI Radeon card. My primary monitor is an HP 23", while the second monitor is an HP 20". The primary is connected via VGA, while the second is connected via a DisplayPort-to-VGA adaptor. With kernel 3.14.9-200.fc20.x86_64, everything works fine. After updating to kernel 3.15.8-200.fc20.x86_64, the second monitor is no longer taken out of standby (sleep) mode. xrandr reports two monitors and the output is identical for both kernels. The only difference I see is that I see the following errors in dmesg when running the 3.15 kernel...               [    1.914501] [drm:radeon_dp_link_train_cr] *ERROR* clock recovery reached max voltage     [    1.914502] [drm:radeon_dp_link_train_cr] *ERROR* clock recovery failed      I found one other post that was similar to this, but there was no solution. Has anyone else seen and solved this, or can anyone give me a place to look further as far as logs/configs are concerned?


title: Why am I not receiving any system e-mails?

text: In my crontab, I have the following:               * * * * * sh /home/rimmer/test.sh      In `/home/rimmer/test.sh` I have the following:               #!/bin/bash     echo 'test';      I have also set `chmod +x /home/rimmer/test.sh`, of course. The file gets executed as it should, however, I receive no mail in `/var/mail/`. Why is that? The file is sending an output to STDOUT, which isn't redirected anywhere, so I should catch it in `/var/mail/`, right? What's going on, then?


title: issues with resolv.conf

text: I was tinkering with my `resolv.conf` file. I logged in to root and made the changes to it there. All of a sudden, I cannot get through to any websites using my Firefox browser. The file looks like this               #Generated by NetworkManager     nameserver 8.8.8.8     nameserver 8.8.4.4     nameserver 192.168.1.1      Can someone please help me fix this!


title: How package managers update packages installed using git-packages?

text: If I install a git-package via packer or pacaur, then it will pull the current source-tree of the repo, compile, and install it. But how are updates handled? Is there a specific way to upgrade all my AUR-Git Packages?


title: using regex with find

text: Let's say I need to find all files in `/var/log/` except `btmp`, `lastlog`, `wtmp`. And I only need depth 1. I tried with the following `find` command, but that does not work as expected:               find /var/log/ -maxdepth 1 -type f \! -name '(btmp|lastlog|wtmp)'      Can somebody please advise how to do it?


title: Using wget, download a website translated by google translate

text: I want to download(recursively) http://e-maxx.ru/algo , after it has been translated to english using Google translate.


title: CentOS 5.5 server dropping & blocking connection

text: I'm running a _CentOS release 5.5 (Final)_ server running the LAMP stack amongst other things. When working on a web project with numerous active connections to the server box (Plesk over HTTP, SSH and FTP), the server randomly drops the connection. When this happens, the box essentially becomes invisible to me from my current location until I reset my local broadband connection. It does not respond to ping via hostname or IP. It does however, remain accessible from all other locations. I have tested this numerous times by successfully accessing the server using TOR despite being unable to connect directly. For example, trying to reconnect directly over SSH after the connection has been dropped:                ssh root@xxxxxxx.al      ssh: connect to host xxxxxxx.al port 22: Operation timed out      My uneducated guess would be to suspect some type of upper connection limit that I am exceeding by having numerous connections active at one time, after which I am placed on a hammer list until I reconnect from a new location? Thoughts and suggestions greatly welcomed.


title: What does the dot in regex "^[A-Za-z]{2}[1-9]{2}.*" do?

text: I am very new with regexp. I would like to know the pattern defined by this regexp :               ^[A-Za-z]{2}[1-9]{2}.*      It starts with 2 alphabetic characters then 2 numeric characters then a `.` and `*` which is for 0 or several occurences of the last characters. What I don't understand is what is the dot used for?


title: Get CPU usage for single process

text: I've got a problem getting a real-time CPU usage of a single process (by its PID). I'd like to setup a watchdog for the CPU usage of a process because it's suddenly reaching 100% of the CPU usage sometimes. **What I have tried** : `top -p $PID`, `top -pid $PID` - seems like those two are not working on FreeBSD `ps h -p $PID -o %cpu` - works, but returned CPU usage percentage is always `0`. The question is - how can I get a real time CPU usage for a single process by its PID **on FreeBSD**?


title: Privileged mode in bash

text: I've used bash for years but I 've stuck with the"privileged mode" that it can be configure with the set command. For example:               set -p      I've read the bash man page but it's somewhat obscure. For example let's considere the following script               #! /bin/bash -p     ping 192.168.1.1      the permission of this file is as follows: -rwxr-xr-x. 1 root operador 80 mar 2 23:20 /scripts/privileged.sh And then as a non-root user I run /scripts/privileged.sh So I run:                ps -Cping -ocomm,egroup,euser,ruser,ruser,rgroup     COMMAND         EGROUP   EUSER    RUSER    RUSER    RGROUP     ping            operador operador operador operador operador      OK, you can change the mode, but anyway Linux drops privileges:               [root@server ~]#  chmod 4755 /scripts/privileged.sh      [root@server ~]# ls -l /scripts/privileged.sh     -rwsr-xr-x. 1 root operador 79 mar  2 23:33 /scripts/privileged.sh      So I run the script as non-root user, and then I get:               [root@server ~]# ps -Cping -ocomm,egroup,euser,ruser,ruser,rgroup     COMMAND         EGROUP   EUSER    RUSER    RUSER    RGROUP     ping            operador operador operador operador operador      So I've found this option useless, please could you correct me, if I misunderstood anything?


title: livecd-tools - ext4 errors

text: I'm using livecd tools to build an ISO image customized to my liking. It appears to build fine, but after booting up, I get a bunch of ext4fs errors indicating referenced inodes were deleted. My custom post section copies some configuration files as well as manually installs some software. How can I get rid of these errors? ### EDIT #1 During the build process, I get these errors (I'm wondering if this may be causing the ext4 errors later on, of it is of no concern):               /etc/selinux/targeted/contexts/files/file_contexts: line 190 has invalid context system_u:object_r:nsd_conf_t:s0     /etc/selinux/targeted/contexts/files/file_contexts: line 263 has invalid context system_u:object_r:ctdbd_var_t:s0     /etc/selinux/targeted/contexts/files/file_contexts: line 389 has invalid context system_u:object_r:kdump_crash_t:s0     /etc/selinux/targeted/contexts/files/file_contexts: line 467 has invalid context system_u:object_r:condor_etc_rw_t:s0     /etc/selinux/targeted/contexts/files/file_contexts: line 609 has invalid context system_u:object_r:nsd_zone_t:s0     /etc/selinux/targeted/contexts/files/file_contexts: line 1166 has invalid context system_u:object_r:pesign_var_run_t:s0     /etc/selinux/targeted/contexts/files/file_contexts: line 1355 has invalid context system_u:object_r:nsd_zone_t:s0     /etc/selinux/targeted/contexts/files/file_contexts: line 1356 has invalid context system_u:object_r:openvpn_var_lib_t:s0     /etc/selinux/targeted/contexts/files/file_contexts: line 1375 has invalid context system_u:object_r:neutron_var_lib_t:s0          Exiting after 10 errors.      NOTE: I get these errors whether SELinux is enabled or not. I'm not sure what SELinux is blocking, if anything as I don't get any SELinux notifications that there were any problems. Also, if I do `dmesg | tail`, I notice that SELinux is setup for the loopback devices for the ext4 sparse file:               SELinux: initialized (dev loop5, type ext4), uses xattr     SELinux: initialized (dev loop6, type vfat), uses genfs_contexts     SELinux: initialized (dev loop6, type hfsplus), uses genfs_contexts     SELinux: initialized (dev loop6, type hfsplus), uses genfs_contexts


title: Cannot create root jail

text: I just tried to play around with chroot command only for testing purposes, in order to create a temporary root jail, but I didn't managed to. The platform is CentOS 6.4. and I have done it numerous times so far except for now. I followed the procedure in that order:   1. Create `bin`, `etc`, `home`, `lib`, and `var` directories.   2. `ldd /bin/bash`   3. Copy all libraries in above mentioned `lib` directory plus `/bin/bash` binary in `bin`.   4. Then ran `chroot /path/to/the/jail` and the following appeared:              chroot: failed to run command `/bin/bash': No such file or directory      Please advise, since I am not able to establish where this error comes from and also I have never had such a problem. The same procedure works just fine in Ubuntu server. The problem occurs only on this particular server. Per comments below, here is some output from debugging commands:               [root@localhost chroot]# find -printf '%M %p\n'      drwxr-xr-x .      drwxr-xr-x ./bin      -rwxr-xr-x ./bin/bash      drwxr-xr-x ./var      drwxr-xr-x ./var/var      drwxr-xr-x ./home      drwxr-xr-x ./lib      -rwxr-xr-x ./lib/libdl.so.2      -rwxr-xr-x ./lib/libc.so.6      -rwxr-xr-x ./lib/libtinfo.so.5      -rwxr-xr-x ./lib/ld-linux-x86-64.so.2      drwxr-xr-x ./etc                    [root@localhost bin]# ldd /mnt/proba1/chroot/bin/bash      linux-vdso.so.1 => (0x00007fff6fe00000)      libtinfo.so.5 => /lib64/libtinfo.so.5 (0x00007f12cdd40000)      libdl.so.2 => /lib64/libdl.so.2 (0x00007f12cdb38000)      libc.so.6 => /lib64/libc.so.6 (0x00007f12cd7a0000)      /lib64/ld-linux-x86-64.so.2 (0x00007f12cdf70000)


title: How to improve quality of microphone input

text: I am both new to linux and "sound processing" and I'm sorry if this looks like a question being answered with the first entry on Google. Because I don't even know what to google for. A friend of mine and I are trying to program an intelligent personal assistant that should do all kinds of stuff for us like google stuff, play music, tell us jokes... But that doesn't matter at this point. The voice will be translated into text and text will be translated to speech via Google translate API which doesn't cause too much trouble. However our mic is kind of bad and we want to improve the quality of our sound input e.g. remove background noise and/or filter our voices from other disturbing noises. It would be brilliant if that would happen on the fly. We are using Ubuntu and Raspbian at the moment.


title: Vim: What is difference between motion mark shotcut `. and `"?

text: While reading vim info motion marker says:               |`quote|   `"           go to the position when last editing this file     |`.|       `.           go to the position of the last change in this file      Above two shortcuts seem to be same. I tried both on a new file. first is taking me to the start of file(incorrect, unexpected behaviour), while later is working correctly as written. What is difference between two shortcuts?


title: How to Prefix a column values with an apostrophe ( ' )?

text: I have a CSV file with multiple columns and 1000's of records, I need to prefix all the values of one of the columns (lets say 2nd column) with an apostrophe **`'`** except in the first line or header line, There might be an easy one liner for this. How could I achieve this using `awk` or `sed`? Please note, I might have multiple commas in the values which are enclosed in double quotes. Sample data:               "col1","col2","col3","col4","col5"     "value11","value12","value13","value14","value15"     "value21","value22","value23","value24","value25"     "value31","value32","value33","value34","value35"      Expected output:               "col1","col2","col3","col4","col5"     "value11","'value12","value13","value14","value15"     "value21","'value22","value23","value24","value25"     "value31","'value32","value33","value34","value35"


title: Shutdown log Linux UserName

text: Can I know who issued the `shutdown` command on any *nix system in a multi- user system? I want to know the name of the user who issued the particular command.


title: How can I stub out an audio interface in jack?

text: I've got a Tascam US-800 8-in/4-out audio interface that I use to record into Ardour. The setup is great, but I like to do my mastering and mixdowns elsewhere and I always have to drag around the audio interface because if it's not connected, Ardour won't open up. I'm wondering if there's some way to stub out the audio interface in jack so that I can trick ardour into thinking it's connected when it's really not. I looked into the connections, but I can't figure it out. When the interface is plugged in and ardour is running, this is what the connections pane looks like (I've collapsed ardour's connections because there are about 35 of them and the important part is the four system capture sources being used): ![jackd connection panel with US-800 connected](http://www.bizlunch.net/craigslist/jackd_connections.png) I imagine that there's some way to fake system/capture_[1-8], right? Any tips?


title: How can I split Openbox `rc.xml` into multiple files?

text: I don't like big text configuration files. So, I would like to split my **`rc.xml`** file into multiple files:               rc.xml     rc.keyboard.xml     rc.mouse.xml


title: Can't Login to phpmyadmin without using password

text: I would like to logging into phpmyadmin without using password. However I changed `AllowNoPassword` to `TRUE` in `/etc/webapps/phpmyadmin/config.inc.php` :               $cfg['Servers'][$i]['user'] = 'root';     $cfg['Servers'][$i]['AllowNoPassword'] = true;      But, phpmyadmin asks me for password again! **P.S:** MySQL `root` user has no password.


title: How do I define a samba share so that every user can only see its own home?

text: I would like to make every user's home directory from Debian machine to be available by its owner only (using Samba) but for now (with default Samba configuration) I can access other users `/home`s. Here is the `[home]` config part :               [homes]     comment = Home Directories     browseable = no     public = no     read only = no     create mask = 0700     directory mask = 0700     valid users = ashley joe %S      By logging on ashley's account from Windows 7 machine I can browse joe's home. How should I configure this ?


title: Qmake not working in a mounted smb dir

text: I'm trying to use qmake in a samba mounted directory. Here is what I get               jj@deb32-6:~/smbShare$ qmake .     QFSFileEngine::currentPath: stat(".") failed     QFSFileEngine::currentPath: stat(".") failed     QFSFileEngine::currentPath: stat(".") failed     QFSFileEngine::currentPath: stat(".") failed     Cannot find file: ..      qmake works in any other directory. I'm using debian 6.0.4 32-bits with kernel 2.6.32-5-686. My qmake is from Qt 4.7.4 built from sources. Any idea ?


title: Complete only at the beginning of the word

text: I've got an issue with ZSH autocompletion, and I can't find the right keyworks to get rid of it. For instance, with files like               $ ls     Accelion, titi toto tata      I would like to write:               $ ls cc<TAB>      and get _ _no_ _completion, instead of `Accelion`. Here are the option currently set:               $ set -o | grep " on"     alwaystoend           on     autocd                on     autonamedirs          on     autopushd             on     nobeep                on     cdablevars            on     extendedhistory       on     noflowcontrol         on     nohistbeep            on     histexpiredupsfirst   on     histignoredups        on     histignorespace       on     histverify            on     incappendhistory      on     interactive           on     interactivecomments   on     nolistambiguous       on     nolistbeep            on     longlistjobs          on     nonomatch             on     promptsubst           on     pushdignoredups       on     shinstdin             on      let me know if you need further details like `zle` options (and how to dump it!) **EDIT:** zsh _4.3.17_ (x86_64-redhat-linux-gnu)


title: What are the pros and cons of Vim and Emacs?

text: How would you compare these editors? What are the pros and cons of each? [ **note** ] This is not meant to be answered by those who "hate one and love another" or those who haven't used both.