title: Difficulties to establish a ppp connection to a GSM provider

text: I want to establish a ppp link to a GSM provider with my cell phone modem. The modem gets recognized and I can send AT commands just fine, but I can not get the connection established. My chat script looks like:               #######################################     SAY 'Setting the abort string\n'     SAY '\n'     # Abort String ------------------------------     ABORT 'NO DIAL TONE' ABORT 'NO ANSWER' ABORT 'NO CARRIER' ABORT DELAYED          #######################################     SAY 'Initializing modem\n'     # Modem Initialization     '' AT     OK ATZ          #######################################     SAY '\n'     SAY     'Setting APN\n'     # Access Point Name (APN)     # Incorrect APN or CGDCONT can often cause errors in connection.     # Below are a bunch of different popular APNs          #REG:\s1 AT+cgdcont=1,"IP","proxy"     #OK     'AT+CGDCONT=0,"IP","proxy"'     #OK     'AT+CGDCONT=1,"IP","proxy"'     #OK     'AT+CGDCONT=2,"IP","proxy"'     OK     'AT+CGDCONT=1,"IP","m2mstatic.apn"'     #OK     'AT+CGDCONT=1,"IP","ISP.TELUS.COM"'     #OK     'AT+CGDCONT=1,"IP","INTERNET.COM"'     #OK     'AT+CGDCONT=1,"IP","ISP.CINGULAR"'     #OK     'AT+CGDCONT=2,"IP","ISP.CINGULAR"'        ""      and in `/var/log/messages` I get the following messages:               Jan 11 04:08:49 ariag25 pppd[2518]: pppd 2.4.5 started by root, uid 0     Jan 11 04:08:50 ariag25 chat[2520]: abort on (NO DIAL TONE)     Jan 11 04:08:50 ariag25 chat[2520]: abort on (NO ANSWER)     Jan 11 04:08:50 ariag25 chat[2520]: abort on (NO CARRIER)     Jan 11 04:08:50 ariag25 chat[2520]: abort on (DELAYED)     Jan 11 04:08:50 ariag25 chat[2520]: send (AT^M)     Jan 11 04:08:50 ariag25 chat[2520]: expect (OK)     Jan 11 04:08:50 ariag25 chat[2520]: AT^M^M     Jan 11 04:08:50 ariag25 chat[2520]: OK     Jan 11 04:08:50 ariag25 chat[2520]:  -- got it     Jan 11 04:08:50 ariag25 chat[2520]: send (ATZ^M)     Jan 11 04:08:51 ariag25 chat[2520]: expect (OK)     Jan 11 04:08:51 ariag25 chat[2520]: ^M     Jan 11 04:08:51 ariag25 chat[2520]: ATZ^M^M     Jan 11 04:08:51 ariag25 chat[2520]: OK     Jan 11 04:08:51 ariag25 chat[2520]:  -- got it     Jan 11 04:08:51 ariag25 chat[2520]: send (AT+CGDCONT=1,"IP","m2mstatic.apn"^M)     Jan 11 04:08:51 ariag25 chat[2520]: expect (OK)     Jan 11 04:08:51 ariag25 chat[2520]: ^M     Jan 11 04:08:51 ariag25 chat[2520]: AT+CGDCONT=1,"IP","m2mstatic.apn"^M^M     Jan 11 04:08:51 ariag25 chat[2520]: OK     Jan 11 04:08:51 ariag25 chat[2520]:  -- got it     Jan 11 04:08:51 ariag25 chat[2520]: send (ATDT*99#^M)     Jan 11 04:08:51 ariag25 chat[2520]: expect (CONNECT)     Jan 11 04:08:51 ariag25 chat[2520]: ^M     Jan 11 04:08:51 ariag25 chat[2520]: ATDT*99#^M^M     Jan 11 04:08:51 ariag25 chat[2520]: CONNECT     Jan 11 04:08:51 ariag25 chat[2520]:  -- got it     Jan 11 04:08:51 ariag25 chat[2520]: send (^M)     Jan 11 04:08:51 ariag25 pppd[2518]: Serial connection established.      **Edit** I don't think things are wrong with my chat script but my modem instead. notice that on the bottom of the messages, the context switched from chat to pppd - why is that? May my power supply be too weak? That's what I suspect now. Any ideas? Also, if I do a `killall pppd` after this and try to connect with screen `screen /dev/modem 9600` the modem doesn't reply anymore until I power cycle it. However, I'm surprised! I hooked it up to a 2.1A USB power supply. **Edit2** My `/etc/ppp/options` looks like:               debug     /dev/ttyUSB1     9600     modem     crtscts     lock     connect /etc/ppp/net-connect     asyncmap 0     defaultroute      and `/etc/ppp/peers/provider` like this:               connect "/usr/sbin/chat -v -f /etc/chatscripts/pap -T *99***1#"          # Serial device to which the modem is connected.     /dev/modem          # Speed of the serial line.     9600          # Assumes that your IP address is allocated dynamically by the ISP.     noipdefault     # Try to get the name server addresses from the ISP.     usepeerdns     # Use this connection as the default route.     defaultroute          # Makes pppd "dial again" when the connection is lost.     persist          # Do not ask the remote to authenticate.     noauth


title: Installing Fedora 17 on Mac Book Pro from mid-February

text: I have problems installing Fedora on my friend's Mac Book Pro. After a boot, I get a blank screen. Forcing `nomodeset` helps:               nomodeset xdriver=efifb      However, I still cannot get into either X or text mode. Regardless of whether I try alternative drivers for X (such as vesa) or I try to enter into text mode (by adding `text` to kernel options) it fails. Does anybody have any idea how to boot the system?


title: SD card reader not working on Elementary OS

text: I have a Lenovo S210 with a Realtek card reader installed (rts5139), but it does not work. I have tried restarting Elementary while I have an SD card inside, but I am unable to view the SD card contents. When I run **dmesg** in terminal, I get the following pertaining to the rts5139:               [    8.802265] rts5139: module is from the staging directory, the quality is unknown, you have been warned. [    8.803732] Initializing rts5139 USB card reader driver...       [    8.810760] scsi6 : SCSI emulation for RTS5139 USB card reader       [    8.811011] usbcore: registered new interface driver rts5139       [    8.811015] Realtek rts5139 USB card reader support registered.       [    8.811027] scsi 6:0:0:0: Direct-Access     Generic- xD/SD/M.S.       1.00 PQ: 0 ANSI: 0 CCS       [    8.811643] sd 6:0:0:0: Attached scsi generic sg1 type 0       [    8.877009] EXT4-fs (sda5): re-mounted. Opts: errors=remount-ro      When I run **sudo lshw** , I get this:                *-scsi           physical id: 1                 bus info: usb@3:4                 logical name: scsi6                 capabilities: emulated scsi-host                 configuration: driver=rts5139               *-disk                    description: SCSI Disk                    product: xD/SD/M.S.                    vendor: Generic-                    physical id: 0.0.0                    bus info: scsi@6:0.0.0                    logical name: /dev/sdb                    version: 1.00                    serial: 3                    capabilities: removable                  *-medium                       physical id: 0                       logical name: /dev/sdb      **lsmod | grep rts5139** , brings up:               rts5139               351188  0      From my limited knowledge and research online, it seems that this driver has been an issue with anything running kernel 12.04 along with a few older distros. However, due to Elementary not being fully supported with a newer kernel, I was wondering if there was a way to possibly just upgrade the one driver. Any advice would be much appreciated.


title: Alternatives to Nautilus that support a list of files to hide in .hidden

text: Are there any good alternatives to Nautilus that support the same `.hidden` file? That is a file in which I can write file and directory names, and then the file manager hides them. I have already tried to use Thunar, but it doesn't support using the `.hidden` file to hide other files and folders. Are there any alternatives which will? I am currently using Debian (wheezy if it matters). Note that this isn't a question about dot files: I want to customize the set of hidden files.


title: Resolving an alias to a remote server

text: I have what I think is called an IP alias, which is used to access a Windows file server from a Unix server. The path on Unix looks something like:               /folder/file.txt      which is somehow resolved as:               \\server\folder\file.txt      This is used within an ftp command from a SAS program running on Unix. I know very little about Unix, but I believe the alias is configured on Unix itself (not by the SAS server). As a normal (non-root) user, is there a way of looking up this alias and seeing the IP address it refers to? Or even better, a list of aliases and their IP addresses? Perhaps I'm using the wrong terminology? My Google searches have turned up command aliases, but otherwise I've found very little helpful information. _(I originally asked this on SU, but didn't get an answer:http://superuser.com/q/561921/113542)_


title: Why does this command to copy files in a for loop work in bash but not in zsh?

text: I'm trying to copy a bunch of files with the same name, but in different subdirectories, to a single directory, changing the names to ones based on the paths to the original files. I use a for loop that does what I intend in bash, but behaves very oddly in zsh. Command (linebreaks added for legibility):               for f in */Flavors/*/stuff1/filename.txt;         do l=$(echo $f | cut -d'/' --output-delimiter '' -f1,3);         dest=/stuff2/${l}.utf8.txt;         echo $f $dest;         cp -v -- $f $dest;     done      Output in zsh. I intend the output file names to be e.g. "EnglishAU.utf8.txt" but instead they are just "English", "French" and "Spanish". Note that the `echo` in the loop shows `$dest` containing the correct path, and then the `cp` uses the wrong one!               English/Flavors/AU/stuff1/filename.txt /stuff2/EnglishAU.utf8.txt     `English/Flavors/AU/stuff1/filename.txt' -> `/stuff2/English'     English/Flavors/UK/stuff1/filename.txt /stuff2/EnglishUK.utf8.txt     `English/Flavors/UK/stuff1/filename.txt' -> `/stuff2/English'     English/Flavors/US/stuff1/filename.txt /stuff2/EnglishUS.utf8.txt     `English/Flavors/US/stuff1/filename.txt' -> `/stuff2/English'     French/Flavors/CA/stuff1/filename.txt /stuff2/FrenchCA.utf8.txt     `French/Flavors/CA/stuff1/filename.txt' -> `/stuff2/French'     French/Flavors/FR/stuff1/filename.txt /stuff2/FrenchFR.utf8.txt     `French/Flavors/FR/stuff1/filename.txt' -> `/stuff2/French'     Spanish/Flavors/ES/stuff1/filename.txt /stuff2/SpanishES.utf8.txt     `Spanish/Flavors/ES/stuff1/filename.txt' -> `/stuff2/Spanish'     Spanish/Flavors/OT/stuff1/filename.txt /stuff2/SpanishOT.utf8.txt     `Spanish/Flavors/OT/stuff1/filename.txt' -> `/stuff2/Spanish'      As mentioned above, this works as intended in bash. What's zsh doing?


Rename filename.JPG to filename .jpg recursively I want all the files with .JPG extension to be changed as .jpg


title: Renaming files to have lower case extensions with 'rename'

text: I'm trying to currently rename a large set of files and have been using quite kludgy methods to do so, such as:               rename 's:(.*)\.MOV:$1.mov:g' *.MOV     rename 's:(.*)\.JPG:$1.jpg:g' *.JPG      What I'd really like to do is to be able to combine all of these commands using the 'y' `sed` operator. Evidently, using this operator, you can transform items to lower case. The problem is that I need to convert only the extensions. Is there a way to do this using this command? I need to essentially transform the capture group in the following expression to lowercase: `^.+\\.(.+)$`. Is there a way to do this? I'm kind of new to these kinds of transformations.


title: Failed to open netctl@.service configuration file

text: I have installed Network Manager, I don't have netctl installed. Whenever I boot my Linux computer I get the following error message: > systemd[1]: Failed to open configuration file > '/usr/lib/systemd/system/netctl@.service': No such file or directory I assumed this meant that the service was still activated somehow, but by executing `systemctl list-units | grep netctl` I got no results. What is causing this error message?


title: IPv6 firewall rules seem to impede all connections

text: After deciding that my small server needed a firewall, I used ferm to configure iptables and ip6tables for me (this question should be tagged ferm, but I cannot create the tag). I am using the same rules for both ipv4 and ipv6, but as soon as I put up the firewall, IPv6 connections (on all ports) stop working and I have to drop to IPv4. Why could that be? My /etc/ferm.conf               domain (ip ip6) table filter {         chain INPUT {             policy DROP;                  # connection tracking             mod state state INVALID DROP;             mod state state (ESTABLISHED RELATED) ACCEPT;                  # allow local connections             interface lo ACCEPT;                  # respond to ping             proto icmp icmp-type echo-request ACCEPT;                  # allow SSH connections             proto tcp dport ssh ACCEPT;                  # allow all my lovely server stuff             proto tcp dport (http https smtp imap imaps) ACCEPT;                  # Teamspeak 3 Server             proto tcp dport (10011 30033) ACCEPT;             proto udp dport 9987 ACCEPT;                  # Prosody XMPP             proto tcp dport (5222 5269) ACCEPT;                  # ident connections are also allowed             proto tcp dport auth ACCEPT;                  # the rest is dropped by the above policy         }              # outgoing connections are not limited         chain OUTPUT policy ACCEPT;              # this is not a router         chain FORWARD policy DROP;     }      ip6tables -vnL               Chain INPUT (policy DROP 0 packets, 0 bytes)      pkts bytes target     prot opt in     out     source               destination         0     0 DROP       all      *      *       ::/0                 ::/0                 state INVALID        24  8224 ACCEPT     all      *      *       ::/0                 ::/0                 state RELATED,ESTABLISHED         0     0 ACCEPT     all      lo     *       ::/0                 ::/0         0     0 ACCEPT     icmpv6    *      *       ::/0                 ::/0                 ipv6-icmptype 128         0     0 ACCEPT     tcp      *      *       ::/0                 ::/0                 tcp dpt:22         0     0 ACCEPT     tcp      *      *       ::/0                 ::/0                 tcp dpt:80         0     0 ACCEPT     tcp      *      *       ::/0                 ::/0                 tcp dpt:443         0     0 ACCEPT     tcp      *      *       ::/0                 ::/0                 tcp dpt:25         0     0 ACCEPT     tcp      *      *       ::/0                 ::/0                 tcp dpt:143         0     0 ACCEPT     tcp      *      *       ::/0                 ::/0                 tcp dpt:993         0     0 ACCEPT     tcp      *      *       ::/0                 ::/0                 tcp dpt:10011         0     0 ACCEPT     tcp      *      *       ::/0                 ::/0                 tcp dpt:30033         0     0 ACCEPT     udp      *      *       ::/0                 ::/0                 udp dpt:9987         0     0 ACCEPT     tcp      *      *       ::/0                 ::/0                 tcp dpt:5222         0     0 ACCEPT     tcp      *      *       ::/0                 ::/0                 tcp dpt:5269         0     0 ACCEPT     tcp      *      *       ::/0                 ::/0                 tcp dpt:113          Chain FORWARD (policy DROP 0 packets, 0 bytes)      pkts bytes target     prot opt in     out     source               destination          Chain OUTPUT (policy ACCEPT 24 packets, 8224 bytes)      pkts bytes target     prot opt in     out     source               destination


title: How do I let an SDL app (not running as root) use the console

text: I want to use an SDL-based program to display graphics on the console, without having to log on from the console, and without running the program as root. For example, I want to be able to run it via ssh. The target OS is raspbian. Here is a short example in python to illustrate the problem:               import os, pygame     os.environ['SDL_VIDEODRIVER'] = 'fbcon'     pygame.init()     s = pygame.display.set_mode()     print "Success"      This works (runs to completion, does not throw exceptions) if I run it from the console, and it works via ssh if I run it as root. I have checked that my user is in the audio and video groups. I have used strace to see what is different between running it from the console (which works), running it as root via ssh (also works), and running it as a regular user via ssh (doesn't work). The first difference was that my user did not have permission to access /dev/tty0. I created a new group (tty0), put my user in that group, and added a udev rule to give that group access to /dev/tty0. The strace output diverges at this ioctl call - the failure is show here; ioctl returns 0 when the program is run from the console or run from ssh as root:               open("/dev/tty", O_RDWR)                = 4     ioctl(4, VT_GETSTATE, 0xbeaa01f8)       = -1 EINVAL (Invalid argument)      (The addresses also differ, but that isn't important.) Given that my program works when it runs as root, I think this means I have a permissions problem. How do I give the necessary permissions to my user to be able to run this program without logging on at the console (and without running as root)?


title: If a buggy application underperforms, it it possible server tuning could have no affect?

text: To set the stage, imagine if you will: A read-heavy Tomcat Application with MySQL on Red Hat Enterprise Linux with some problematic Java Class files which resulted in the application performing a lot of time-wasting operations and causing the application to perform very slowly. The server, a blade server with 10K SAS disk, 32GB RAM and 8 core xeon @ 3 GHZ. I tried tuning MySQL and Tomcat, but the page loads got no faster no matter what types of optimizations were made. **My question is:** if the bottleneck of an application is caused by the code itself, is it possible, and in what circumstances, would it render and type of server configuration useless? My loose theory is that, if you have headroom in terms of resources, and the application itself is simply slow due to inefficiencies such as useless recursions, useless DB reads, etc.. then you are at that point limited by your transfer rate, clock speed, disk read speeds, etc.. things that tuning will not help, only new, faster hardware would address at that point. Is that accurate? Could someone elaborate on this?


title: What tool to use to monitor network issues?

text: I need a network analysis tool that can help me to find if there are some issues regarding:   * packet transmission   * sessions   * any other stuff is welcome. I'm connected to the appliance I need to check with a cross cable, so I have to check the traffic client-side. It would be great if it could have a gui and/or multiplatform.


title: Why are network interfaces not in /dev like other devices?

text: I'm mostly curious, but why aren't network interfaces in /dev? Are there any other kinds of devices that aren't represented as a node under /dev?


title: Switch users with sudo or su in a shell script

text: I inherited this. Long story short I have an XML file that is calling a shell to run some commands. Everything I have tried has failed at the second su in the script. Here are some of the failure messages:               sudo: no tty present and no askpass program specified      Or               su: must be run from a terminal      Or               usage: sudo [-D level] -h | -K | -k | -V blah blah blah      Here is snippet of my script. It only fails at the second `su` attempt:                 <script language="shell"><![CDATA[                       echo Doing some stuff                       sudo -u adminuser /path/to/a/script/script                       echo Emailing this stuff...                   su emailuser -c "mutt -e 'set content_type=text/html' -s 'Your stuff is ready' -- ${WHOEVER_PARAM_RECIPIENT} < /tmp/emailingstuff.html"                     ]]></script>      I've played around with permissions so much that I forgot where I was with them. Here they are currently in sudoers:               # See the man page for details on how to write a sudoers file          Defaults:emailuser !authenticate          adminuser ALL=NOPASSWD: /bin/su - emailuser     adminuser ALL=NOPASSWD: /bin/su emailuser     adminuser ALL=NOPASSWD: /usr/bin/sudo su emailuser          # Host alias specification          # User alias specification          # Cmnd alias specification          # User privilege specification     root    ALL=(ALL:ALL) ALL          # Members of the admin group may gain root privileges     %admin ALL=(ALL) ALL          # Allow members of group sudo to execute any command     %sudo   ALL=(ALL:ALL) ALL          # See sudoers(5) for more information on "#include" directives:          #includedir /etc/sudoers.d


title: How to count how many shell/terminals are running?

text: I´m trying to count how many shell or terminal windows are currently running. I tried `ps a|grep bash;` `ps a|grep tty;` But it can be inaccurate.


title: Add new packages to repository server

text: I'm using CentOS I've built a repository and put packages on it ,testing from another server and all things are fine. When I added new packages on repository and execute:               $ createrepo -v /var/www/html/centos/6.5/updates/x86_64/Packages/      Trying to install the last package recently added from a server that added my repository but it's not working until I execute on the same server:               $ yum clean all      Is this a normal situation?


title: Download ALL rpms for a product

text: I have two CentOS machines, one 6.3 box ( **A** ), and another CentOS 6.1. ( **B** ) 6.3 box is with internet connection, 6.1 box is without internet connection. I want to download ALL dependencies of a product on Box A, then copy those n Box B, and install the product. I tried with               yum --downloadonly --downloaddir=*~/downloadrepo* -y install *product*`     cd *~/downloadrepo*     createrepo .      Then I disabled all repos (with --disablerepo), except my repo, and installed product on the same machine (Box A). No errors.   * `yum install *product*` Now when I copied this repo to Box B, and tried to install with same command, it starts installing, but then gives lot of errors like below: > **Error: Missing Dependency: libldap-2.3.so.0()(64bit) is needed by package > php-ldap-5.1.6-27.el5_5.3.x86_64 (installed)** As there any way I can achieve what I need? **UPDATE** By the time I started working with option suggested by @rkosegi ( _-- releasever=version_ ), I was given a new box with same version CentOS 6.1 ( **C** ) I tried above mentioned commands on Box C, and copied repo it to Box B. Still it failed. The reason: though both boxes are 6.1, those are not identical ( **uname -r** returns different strings). Yum does not download dependencies, if those are already installed. So my repo did not contain some of the dependencies (including OpenJDK). So, when I try to install on Box B, it fails. Quite frustrating!!! But then I found command ' **repotrack** ' here.               cd ~/downloadrepo     repotrack -p . -a x86_64 product     createrepo .      I got a lot more files than with yum, hopefully it will do the trick. I'll update, once I try install. **UPDATE** Command repotrack did not work for me. When I tried to install from repository created with 'repotrack', got following errors:               Error: Package: perl-CGI-3.51-127.el6.x86_64 (repo-local)            Requires: perl = 4:5.10.1-127.el6            Installed: 4:perl-5.10.1-119.el6_1.1.x86_64 (@anaconda-CentOS-201112102333.x86_64/6.2)                perl = 4:5.10.1-119.el6_1.1     Error: Package: audit-libs-python-2.2-2.el6.x86_64 (repo-local)            Requires: audit-libs = 2.2-2.el6            Installed: audit-libs-2.1.3-3.el6.x86_64 (@anaconda-CentOS-201112102333.x86_64/6.2)                audit-libs = 2.1.3-3.el6      I tried removing these two files from folder, and rebuilding repository with 'createrepo'. It gave another set of errors. Not sure what options I have at the moment...


title: Error while trying to create RPM for java app

text: I'm new to RPM packaging and I got stuck for quite a long time and cannot find root cause of the problem. I'm not quite sure I fully understand the concept of `BuildRoot` in the spec file. My RPM packaging happens in my home dir: `/home/virtual/rpmbuild`. I'm trying to package a java application located in `/home/virtual/rpmbuild/tmp/BDHistProcessor` with the structure:               BDHistProcessor      lib      bin      conf      deploy      Here is my spec file I created:               %define _tmppath  /home/virtual/rpmbuild/tmp          Name:           BDHistProcessor     Version:        1.0.0     Release:        1%{?dist}     Summary:        component which feed data into DB          Group:        Applications/System        License:      GPL       URL:          https://www.tem.com/       BuildRoot: %{tmppath}/%{name}          %description     Component which feed data into DB          %prep          %build          %install     rm -rf $RPM_BUILD_ROOT     cp -r  /home/virtual/rpmbuild/tmp/BDHistProcessor $RPM_BUILD_ROOT           %files     %defattr(-,root,root)     %{buildroot}/BDHistProcessor/lib     %{buildroot}/BDHistProcessor/bin     %{buildroot}/BDHistProcessor/conf     %{buildroot}/BDHistProcessor/deploy     %{buildroot}/BDHistProcessor/README.txt          %doc     %changelog      Running `rpmbuild -v -bb -clean SPECS/myRPM.spec` returns output:               [virtual@virtual rpmbuild]$ rpmbuild -v -bb --clean SPECS/myRPM.spec     Executing(%prep): /bin/sh -e /home/virtual/rpmbuild/tmp/rpm-tmp.t2AMGe     + umask 022     + cd /home/virtual/rpmbuild/BUILD     + exit 0     Executing(%build): /bin/sh -e /home/virtual/rpmbuild/tmp/rpm-tmp.1unXP8     + umask 022     + cd /home/virtual/rpmbuild/BUILD     + exit 0     Executing(%install): /bin/sh -e /home/virtual/rpmbuild/tmp/rpm-tmp.SoaH02     + umask 022     + cd /home/virtual/rpmbuild/BUILD     + rm -rf /home/virtual/rpmbuild/BUILDROOT/BDHistProcessor-1.0.0-1.el6.x86_64     + cp -r /home/virtual/rpmbuild/tmp/BDHistProcessor /home/virtual/rpmbuild/BUILDROOT/BDHistProcessor-1.0.0-1.el6.x86_64     + /usr/lib/rpm/check-rpaths /usr/lib/rpm/check-buildroot     + /usr/lib/rpm/brp-compress     + /usr/lib/rpm/brp-strip     + /usr/lib/rpm/brp-strip-static-archive     + /usr/lib/rpm/brp-strip-comment-note     Processing files: BDHistProcessor-1.0.0-1.el6.x86_64     error: File not found: /home/virtual/rpmbuild/BUILDROOT/BDHistProcessor-1.0.0-1.el6.x86_64/home/virtual/rpmbuild/BUILDROOT/BDHistProcessor-1.0.0-1.el6.x86_64/BDHistProcessor/lib     error: File not found: /home/virtual/rpmbuild/BUILDROOT/BDHistProcessor-1.0.0-1.el6.x86_64/home/virtual/rpmbuild/BUILDROOT/BDHistProcessor-1.0.0-1.el6.x86_64/BDHistProcessor/bin     error: File not found: /home/virtual/rpmbuild/BUILDROOT/BDHistProcessor-1.0.0-1.el6.x86_64/home/virtual/rpmbuild/BUILDROOT/BDHistProcessor-1.0.0-1.el6.x86_64/BDHistProcessor/conf     error: File not found: /home/virtual/rpmbuild/BUILDROOT/BDHistProcessor-1.0.0-1.el6.x86_64/home/virtual/rpmbuild/BUILDROOT/BDHistProcessor-1.0.0-1.el6.x86_64/BDHistProcessor/deploy     error: File not found: /home/virtual/rpmbuild/BUILDROOT/BDHistProcessor-1.0.0-1.el6.x86_64/home/virtual/rpmbuild/BUILDROOT/BDHistProcessor-1.0.0-1.el6.x86_64/BDHistProcessor/README.txt               RPM build errors:         File not found: /home/virtual/rpmbuild/BUILDROOT/BDHistProcessor-1.0.0-1.el6.x86_64/home/virtual/rpmbuild/BUILDROOT/BDHistProcessor-1.0.0-1.el6.x86_64/BDHistProcessor/lib         File not found: /home/virtual/rpmbuild/BUILDROOT/BDHistProcessor-1.0.0-1.el6.x86_64/home/virtual/rpmbuild/BUILDROOT/BDHistProcessor-1.0.0-1.el6.x86_64/BDHistProcessor/bin         File not found: /home/virtual/rpmbuild/BUILDROOT/BDHistProcessor-1.0.0-1.el6.x86_64/home/virtual/rpmbuild/BUILDROOT/BDHistProcessor-1.0.0-1.el6.x86_64/BDHistProcessor/conf         File not found: /home/virtual/rpmbuild/BUILDROOT/BDHistProcessor-1.0.0-1.el6.x86_64/home/virtual/rpmbuild/BUILDROOT/BDHistProcessor-1.0.0-1.el6.x86_64/BDHistProcessor/deploy         File not found: /home/virtual/rpmbuild/BUILDROOT/BDHistProcessor-1.0.0-1.el6.x86_64/home/virtual/rpmbuild/BUILDROOT/BDHistProcessor-1.0.0-1.el6.x86_64/BDHistProcessor/README.txt      I'm not quite sure how the paths get cycled in the error report. Can someone please clarify what I'm doing wrong here?


title: Removing /home LVM and merging in to /

text: [root@host.com ~]# pvdisplay -s       Device "/dev/sda2" has a capacity of 0     [root@host.com ~]# vgdisplay -s                                                                                "vg_vpsny23" 1.36 TiB  [1.36 TiB  used / 0    free]     [root@host.com ~]# df -h     Filesystem            Size  Used Avail Use% Mounted on     /dev/mapper/vg_vpsny23-lv_root                            50G  4.0G   43G   9% /     tmpfs                  16G     0   16G   0% /dev/shm     /dev/sda1             485M   65M  395M  15% /boot     /dev/mapper/vg_vpsny23-lv_home                           1.3T  300M  1.3T   1% /home     [root@host.com ~]# umount /home                                                                                [root@host.com ~]# vgdisplay       --- Volume group ---       VG Name               vg_vpsny23       System ID       Format                lvm2       Metadata Areas        1       Metadata Sequence No  4       VG Access             read/write       VG Status             resizable       MAX LV                0       Cur LV                3       Open LV               2       Max PV                0       Cur PV                1       Act PV                1       VG Size               1.36 TiB       PE Size               4.00 MiB       Total PE              357314       Alloc PE / Size       357314 / 1.36 TiB       Free  PE / Size       0 / 0      I ran umount /home now do I destroy the /home and then merge all the space to the / point?


title: Startscript: using $! to create pidfile - returning wrong pid (off by one) occasionally

text: We have 3 instances of redis running on a test server. For some reason, our start script which starts redis can write the wrong pid to a file. Here is what it's doing:               su redis -c "redis-server /redis.conf & echo \$! > /var/run/redis_6379"      If I chain together `redis_6379 start && redis_6380 start && redis_6381` start and then I stop them like that and start them like that, after 10 or 15 iterations I'll encounter a pid in the start file that is off by 1. Does anyone know why that may occur?


title: How and where is the at command configured?

text: When I install a new Linux system, one of my first tasks is to have crontab send all its email to a designated email address, not root. I want to do the same for the `at` command. That is I would like the `at` command to send its _job concluded_ email to a different email than the user who invoked the at command. However, I cannot find where `at` is configured. I have been poking around my CentOS 6.4 system to no avail.


title: Compiling python .py to .pyc doesn't happen

text: I have read that python will compile the source file **.py** by itself to produce **.pyc** , but this doesn't happen in my case. I have the source file inside `/opt/osqa` folder where I always have to use sudo privileges. How can I compile this source file manually. I am using ArchLinux. Do I need any specific package?


title: Sorting Photos using shell script

text: The majority of my photo files have the following naming convention / format IMG_20131204_120000.JPG, showing date and time the photo was taken (iPhone/Apple naming convention). However, not all my photos follow this naming convention. With the help of this forum I developed the following script to categorize my photos into date directories:               cd '/photos/'      for x in *.JPG *.jpg *.TIF *.tif *.PNG *.png *.BMP *.bmp *.GIF *.gif *.IMG *.img *.JPEG *.jpeg *.TIFF *.tiff; do       d=$(date -r "$x" +%Y%m%d)" - Family Photos"       t=$(expr substr "$x" 1 4)       if [ "$t" == "IMG_" ]; then         d=$(expr substr "$x" 5 8)" - Family Photos"       fi       mkdir -p "$d" >/dev/null 2>&1       mv -- "$x" "$d/" >/dev/null 2>&1     done      PS. I use the IF statement to take the date from the File name itself if the filename is in the format IMG_20131204_120000.JPG as this date most accurately reflects the date the photo was actually taken, but if the file doesn't follow this naming convention I take the operating system date of when the file was last modified/created. It works fine for the most part except where there are files that start with "IMG_" but then don't conform to the naming convention IMG_20131204_120000.JPG, for example a file called IMG_001.JPG or IMG_Photo1. Is there a better way to structure the IF statement here so that it checks not only that the file starts with "IMG_" but also the next 8 characters are numbers / a date format?


title: Check ping statistics without stopping

text: Is there a way to tell `ping` to show its usual termination statistics without stopping the execution? For instance, I'd like to quickly view:               --- 8.8.8.8 ping statistics ---     2410 packets transmitted, 2274 received, +27 errors, 5% packet loss, time 2412839ms     rtt min/avg/max/mdev = 26.103/48.917/639.493/52.093 ms, pipe 3      without having to stop the program, thus losing the accumulated data.


title: How can a user run a program in kernel mode?

text: Is it possible for a user to run their own program in kernel mode? How could a user accomplish this? What weakness in the system's protection mechanism would they have to bypass? I'm thinking that a user program can switch the mode bit from user mode to kernel mode in the interrupt vector and then it can execute any interrupt handlers that it wants. Am I on the right track?


title: Make my own basic shell

text: I know there are a hundred ways of doing this, but I'm just asking what is the most common way: How do I make my own terminal prompt? In other words, I want something like the shell where I type a command and it returns another prompt, but I don't want to be bound by the constraints of any existing shell's syntax. I welcome answers using BASH, Perl, Ruby, Python, JS, or whatever... as long as it's bare-bones and fits in nicely with *nix conventions.


title: Opening Firefox from terminal

text: When I type `firefox` in terminal, it starts Firefox but the terminal "hangs". What is happening behind the scenes? Can I open Firefox from terminal and keep on using the same terminal tab for other things without closing Firefox?


title: How to have back the command prompt after calling an application

text: In terminal I just type `firefox` and then Firefox starts, but I can not return to _command mode_ anymore. How can I come back to _command mode_?   I have already tried `:q` or `exit`, but neither work.


title: Log the dropped packets by IPTables only if its DROPPED by a specific rule

text: I have IPTables rules set on a Linux device. I have a particular rule to drop the packets, and I wish to log the packets only if they're dropped by that specific rule, and not by the other rules. Hence not written out to the syslog.


title: How can a user restrict their own group rights without being root?

text: How can I change my user rights from `rwx` to `r-x` at the group level? I'm trying to ensure that I cannot touch any data belonging to other users when I am developing and debugging my scripts. Once I've verified my scripts work correctly I want to go back to `rwx` to run my scripts in production mode. However, I have no specific sudo/root rights


title: Centos Crontab not responding

text: I was learning and experimenting with **crontab** today. The default editor was just too difficult for me to figure out which caused me to remove my crontab by running **crontab -r**. Now, when I run **crontab -e** and input my new cron task, nothing happens. I suspect it's the **_crontab -r_** command I executed earlier. Can anyone help, please?


title: Is there a shell utility for printing the contents of a plist? Preferably for a jailbroken iOS device?

text: I need a tool that prints the actual text in a plist file (plutil changes the format, cat prints gibberish, and there is no defaults command for iOS). It needs to be in a script, so text editors don't work. This is what I need it for:               apps="$(find /var/mobile/Applications -name "Info.plist" | grep "\.app/Info\.plist")"     mkdir /var/mobile/rmnames     for app in $apps; do          newplist="$(echo $app | sed 's|/var/mobile/Applications/[^/]*/||' | sed 's|\.app/Info\.plist|.txt|')"         #1# $app | sed 's|<string>#2#</string>|<string></string>|' > "/var/mobile/rmnames/"$newplist         mv "/var/mobile/rmnames/"$newplist $app      done     rm -rf /var/mobile/rmnames      What I hope for this to do is delete all of the app store app names on my springboard without having to do it by hand. Where "#1#" is a plist printing utility, and "#2#" is a regex to find the CFBundleDisplayName. Also, if you are wondering why I don't just get a Cydia tweak that does this, I despise Mobile Substrate.. haha, thanks ahead of time! Example of what I mean by gibberish:               mobile:Flixster.app> cat Info.plist     bplist00?#               !"#$%&'()*+,(4567(9:;    <=>CDEVWXY[\]^_bc_CFBundleSignatureYDTSDKName_DTPlatformBuild_BuildMachineOSBuil  d_UIPrerenderedIcon_MedialetsUseTestServers_CFShortVersionString_CFBundleExecuta  ble_CFBundleIconFiles_LSRequiresIPhoneOS]NSMainNibFile^MedialetsAppID_CFBundlePackageTypeZDTSDKBuild_UIRequiresPersistentWiFi\DTXcodeBuild_NSMainNibFile~ipad_CFBundleResourceSpecificationZDTCompiler_CFBundleDisplayName_%UISupportedInterfaceOrientations~ipad_CFBundleDevelopmentRegion^DTPlatformName_CFBundleURLTypes\CFBundleName_CFBundleVersion_DTPlatformVersion_CFBundleSupportedPlatformsWDTXcode_FLXReleaseCandidate_MinimumOSVersion_CFBundleIdentifier^UIDeviceFamily_CFBundleIconFile_CFBundleInfoDictionaryVersionT????[iphoneos5.0U9A334V10K549 T5.20XFlixster?-./012XIcon.png[Icon@2x.png[Icon-72.png_Icon-Small-50.png^Icon-Small.png_Icon-Small@2x.png    ZMainWindow_(83e69fab771f958d7de70ada6ba32ff334b9eec1TAPPLU9A334    U4C199_MainWindow-iPad_ResourceRules.plist_com.apple.compilers.llvmgcc42P??@AB_#UIInterfaceOrientationLandscapeLeft_$UIInterfaceOrientationLandscapeRight_UIInterfaceOrientationPortrait_(UIInterfaceOrientationPortraitUpsideDownUen_USXiphoneos?F?GHIJ_CFBundleURLName_CFBundleURLSchemes_com.jeffreygrossman.moviesapp?  KLMNOPQRSTUXflixster\fb2558160538\fb2373897986\fb2446021478]fb55312797380\fb5769  273609\fb2352444510\fb2451978556]fb16478767641]fb87604592406\fb2532675812XFlixst  erT5.20S5.0?ZXiPhoneOST0420R10S4.0_com.jeffreygrossman.moviesapp? `aXIcon.pngS6.Qeo??????(7MXs??????)<I[o???????%+2349BIR^j~?????????? 238^????????.:CP]┘│??????????????!␍%└⎺␉␋┌␊:F┌␋│⎽├␊⎼.▒⎻⎻>


title: SSH ignores characters after correct password string?

text: Remote machine 10.10.10.1 has password "asdFGH12" for user named "user". I'm able to log in even if I type in password "asdFGH12dasdkjlkjasdus" or any other characters after the "asdFGH12" string.               $ ssh -v 10.10.10.1     OpenSSH_5.2p1 FreeBSD-20090522, OpenSSL 0.9.8k 25 Mar 2009     debug1: Reading configuration data /etc/ssh/ssh_config     debug1: Connecting to 10.10.10.1 [10.10.10.1] port 22.     debug1: Connection established.     debug1: identity file /home/user/.ssh/identity type 0     debug1: identity file /home/user/.ssh/id_rsa type -1     debug1: identity file /home/user/.ssh/id_dsa type 2     debug1: Remote protocol version 1.99, remote software version OpenSSH_4.1     debug1: match: OpenSSH_4.1 pat OpenSSH_4*     debug1: Enabling compatibility mode for protocol 2.0     debug1: Local version string SSH-2.0-OpenSSH_5.2p1 FreeBSD-20090522     debug1: SSH2_MSG_KEXINIT sent     debug1: SSH2_MSG_KEXINIT received     debug1: kex: server->client aes128-ctr hmac-md5 none     debug1: kex: client->server aes128-ctr hmac-md5 none     debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent     debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP     debug1: SSH2_MSG_KEX_DH_GEX_INIT sent     debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY     debug1: Host '10.10.10.1' is known and matches the RSA host key.     debug1: Found key in /home/user/.ssh/known_hosts:58     debug1: ssh_rsa_verify: signature correct     debug1: SSH2_MSG_NEWKEYS sent     debug1: expecting SSH2_MSG_NEWKEYS     debug1: SSH2_MSG_NEWKEYS received     debug1: SSH2_MSG_SERVICE_REQUEST sent     debug1: SSH2_MSG_SERVICE_ACCEPT received     debug1: Authentications that can continue: publickey,keyboard-interactive     debug1: Next authentication method: publickey     debug1: Offering public key: /home/user/.ssh/id_dsa     debug1: Authentications that can continue: publickey,keyboard-interactive     debug1: Trying private key: /home/user/.ssh/id_rsa     debug1: Next authentication method: keyboard-interactive     Password:     debug1: Authentication succeeded (keyboard-interactive).     debug1: channel 0: new [client-session]     debug1: Entering interactive session.     Warning: untrusted X11 forwarding setup failed: xauth key data not generated     Warning: No xauth data; using fake authentication data for X11 forwarding.     debug1: Requesting X11 forwarding with authentication spoofing.     Last login: Tue Apr 23 14:30:59 2013 from 10.10.10.2     Have a lot of fun...     user@server:~>       Is this a known behavior of (certain) SSH server versions?


title: IBM V7000 scripts for monitoring

text: Hello (I'm no hard core coder:), I try to develop a script to do some very basic monitoring on an IBM SVC. My goal is to get some information about the nodes and my quroum status and then send this information by mail. here's my code so far (I understood that grep command doesn't "work" on CLI for SVC).               #check nodes of the cluster with lsnodes and parse status     ssh admin@SVCName superuser>svcinfo lsnode | while read id name sn wwnn status temp;do echo $name" "$status;done          #check quorum status with lsquorum and parse status     ssh admin@SVCName superuser>svcinfo lsquorum | while read quorum_index status id name controller_id controller_name active temp; do echo $controller_name" "$active;done      My problem is sending an email from the CLI to designed users. I don't find any valuable information anywhere on the internet. HINT: this script will be deployed on a jumppoint server (probably a windows server) in production, I cannot allow the installation of any exectution environment such as cigwin or perl or anything). Could you help me with that ?


title: How to run systemd user service to trigger on sleep (aka. suspend, hibernate)?

text: Based on various sources I have cobbled together `~/.config/systemd/user/screenlock.service`:               [Unit]     Description=Lock X session     Before=sleep.target          [Service]     Environment=DISPLAY=:0     ExecStart=/usr/bin/xautolock -locknow          [Install]     WantedBy=sleep.target      I've enabled it using `systemctl --user enable screenlock.service`. But after rebooting, logging in, suspending and resuming (tested both with `systemctl suspend` and by closing the lid) _the screen is not locked and there is nothing in`journalctl --user-unit screenlock.service`_. **What am I doing wrong?** Running `DISPLAY=:0 /usr/bin/xautolock -locknow` locks the screen as expected.               $ systemctl --version     systemd 215     +PAM -AUDIT -SELINUX -IMA -SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ +SECCOMP -APPARMOR     $ awesome --version     awesome v3.5.5 (Kansas City Shuffle)      • Build: Apr 11 2014 09:36:33 for x86_64 by gcc version 4.8.2 (nobody@)      • Compiled against Lua 5.2.3 (running with Lua 5.2)      • D-Bus support: ✔     $ slim -v     slim version 1.3.6      If I run `systemctl --user start screenlock.service` the screen locks immediately and I get a log message in `journalctl --user-unit screenlock.service`, so `ExecStart` clearly is correct. Relevant `.xinitrc` section:               xautolock -locker slock &      **Creating a system service with the same file _works_** (that is, `slock` is active when resuming):               # ln -s "${HOME}/.config/systemd/user/screenlock.service" /usr/lib/systemd/system/screenlock.service     # systemctl enable screenlock.service     $ systemctl suspend      But I do not want to add a user-specific file outside `$HOME` for several reasons:   * User services should be clearly separated from system services   * User services should be controlled without using superuser privileges   * Configuration should be easily version controlled


title: Syncing time with Windows Server Dual Booting systems

text: I am about to work on getting the workstations on my network here to be connected to the Active Directory on my Windows 2003 server using Likewise Identity Service. One of the security requirements is a good time sync, so I am trying to setup my Windows server time server on my CentOS machines. These machines dual boot Windows 7 and CentOS 5.5. I am using the Windows server as a time server and it's getting its time from its CMOS. Following a microsoft Knowledge Base article, I removed all the time servers from the CentOS box I am experimenting with and added the IP of my Windows server. It seems to connect OK but the time never gets updated. This network has no connection to the Internet, it's cut off from the world, so cannot get Internet time! Any ideas?


title: If processes inherit the parent's environment, why do we need export?

text: I read here that the purpose of `export` in a shell is to make the variable available to sub-processes started from the shell. However, I have also read here and here that _"Processes inherit their environment from their parent (the process which started them)."_ If this is the case, why do we need `export`? What am I missing? Are shell variables not part of the environment by default? What is the difference?


title: Asking rsync to delete files on the receiving side that don't exist on the sending side, with exceptions on the receiving side

text: I have read these threads:   * rsync --delete --files-from=list / dest/ does not delete unwanted files   * Delete extraneous files from dest dir via rsync? But, as far as I can tell (maybe I am missing something), they don't cover the following question: How do you ask `rsync` to copy files and delete those on the receiving side that do not exist on the sending side, with exceptions? (e.g. don't remove a mercurial repository `.hg` on the receiving side, even if there is no repository on the sending side). ## One possibility? Borrowing from @Richard Holloway's answer below. Say I have the following line:               rsync -av --exclude=dont_delete_me --delete /sending/path /receiving/path      As far as I understand, this line would make `rsync` delete everything on the receiving path that does not exist on the sending path, except those things matched by `dont_delete_me`. My question now is: Would rsync keep files on the receiving side that are matched by `dont_delete_me` **even if nothing on the sending side matches`dont_delete_me`?**


title: Block SSH to all but root user

text: How can I modify my `sshd_config` so that it blocks access to all users except the root user? I've had a look and I tried               AllowUsers root     DenyUsers *      But that doesn't do anything


title: Expansion of a shell variable and effect of glob and split on it

text: This post actually contains two separate questions but I think grouping them together will give some more context. I have gone through this question on quotes around variables but I do not quite understand what _variable expansion_ mean in the first place. So my first question is :   1. What is _variable expansion_ in unix/linux speak? A second part of my question relates to the following terms :   1. _glob_   2. _split_ What do the above mean and how do they affect variable expansion? The answer to the original question mentions the following: > Think of the absence of quotes (in list contexts) as the split+glob > operator. > > As if echo $test was echo glob(split("$test")). I couldn't find any answers that directly addresses the concept of _globbing_ and _splitting_ but rather uses those terms directly in answering other questions like this recent one.


title: How to rebuild /etc/cron.d on CentOS?

text: I installed an RPM on a CentOS machine that was supposed to merge its own files contained in a `/etc/cron.d` structure with the current `/etc/cron.d`. However it replaced the current contents. I believe `cron.d` is a symlink. How can I retrieve the original `/etc/cron.d`?


title: How to check if /proc/ is mounted

text: How can I check if /proc/ is mounted?   * Using /etc/mtab is discouraged as it might be inconsistent.   * Using /proc/mounts is also not an option as might not exist if /proc/ is not mounted (although checking for its existence may be a way to do this check. What is the best way to do this check?


title: Set Xorg to use only part of the screen

text: My screen has 1280 x 1024 resolution. But unfortunately, rightmost belt of 200 pixels is damaged and unable do display any image. How can I set that the Xorg will treat my screen as 1080 x 1024 device? Now I have tried:               Virtual 1080 1024     Viewport 0 0      It doesn't work right - image is scaled to fit vertically, and horizontally I can pan with the mouse.


title: putting extra hops into traceroute6 on OpenBSD

text: I'm running OpenBSD, or maybe FreeBSD. I don't have lots of IPv4 addresses to waste, but who doesn't have a few billion of IPv6 ones? How do I add some extra IPv6 hops to a `traceroute6`, around `pf(4)` on OpenBSD? Similar to how Ryan Werber of Beagle Networks did it:               # traceroute -f2 -m255 -q1 -w2 obiwan.scrye.net     traceroute to obiwan.scrye.net (204.244.252.35), 255 hops max, 40 byte packets     Skipping 1 intermediate hops      2  hos-tr1.juniper1.rz13.hetzner.de (213.239.224.1)  0.224 ms      3  core22.hetzner.de (213.239.245.121)  1.115 ms      4  core1.hetzner.de (213.239.245.177)  4.802 ms      5  core1.hetzner.de (213.239.245.177)  4.836 ms      6  juniper1.ffm.hetzner.de (213.239.245.5)  5.366 ms      7  10gigabitethernet1-4.core1.lon1.he.net (72.52.92.81)  22.797 ms      8  10gigabitethernet10-4.core1.nyc4.he.net (72.52.92.241)  112.799 ms      9  10gigabitethernet10-4.core1.nyc4.he.net (72.52.92.241)  148.894 ms     10  100gigabitethernet7-2.core1.chi1.he.net (184.105.223.161)  109.669 ms     11  100ge9-1.core1.sea1.he.net (184.105.223.193)  157.816 ms     12  10ge1-1.core1.yvr1.he.net (184.105.222.2)  176.844 ms     13  10ge1-1.core1.yvr1.he.net (184.105.222.2)  160.813 ms     14  216.218.185.138 (216.218.185.138)  215.201 ms     15  gi4-0-528.bbr3.yyz.epikip.net (206.214.255.9)  152.165 ms     16  216.81.55.118.epikip.net (216.81.55.118)  195.530 ms     17  216.81.55.118.epikip.net (216.81.55.118)  167.154 ms     18  206.214.251.27 (206.214.251.27)  186.840 ms     19  A.NEW.HOPE (206.214.251.6)  208.222 ms     20  It.is.a.period.of.civil.war (206.214.251.9)  171.58 ms     21  It.is.a.period.of.civil.war (206.214.251.9)  184.470 ms     22  Rebel.spaceships (206.214.251.14)  178.100 ms     23  have.won.their.first.victory (206.214.251.22)  158.662 ms     24  against.the.evil.Galactic.Empire (206.214.251.25)  203.261 ms     25  against.the.evil.Galactic.Empire (206.214.251.25)  177.668 ms     26  During.the.battle (206.214.251.30)  172.850 ms     27  to.steal.secret.plans (206.214.251.38)  203.746 ms     ...


title: How do I retrieve email with Exim4?

text: I successfully installed and configured Exim4 on my Debian/Squeeze machine, so now I am able to send outgoing emails with a command like this:               exim4 -v recipient@domain.com     From: sender@domain.com     To: recipient@domain.com     Subject: Test email          Body of the email     .      Is there a similar command to RETRIEVE emails into the Maildir folder? NOTE: The emails I want to retrieve are from another email server on the same network. Typically, I use a regular email client to connect to the server via IMAP and SSL.


title: Export from KWD (old KWord/KOffice document format) to anything else

text: I've got 75 documents in KWD format, from my old days using KDE 3.x. I'd like to convert them to ODT or RTF, so I can edit them with Open Office, Abiword or the newer KWord, but I haven't found a good/quick way to do it. Opening them in an old version of KWord and exporting them works, but if I have to do it for the 75 of them it'll take me ages. I've tried using `koconverter`, a batch converter for KOffice documents included in KDE libs, but neither the one from KOffice 1.6.x nor the one from 2.2.x works. Any suggestions? Thanks in advance.


title: How to rename directory from all user accounts

text: Let say that more users have a `tmp` directory in their home directory. I want to rename each `tmp` directory in each user home directory. What is the easiest way? Something like this:               sudo mv /home/*/tmp /home/*/temp      is not ok. And something like this:               for dir in /home/*; do         if [ -d $dir/tmp ]; then             mv $dir/tmp $dir/temp         fi     done      seems too much.


title: netctl: multiple Wifi APs with same SSID

text: Yesterday I travelled by train and there were multiple Wifi APs with the same SSID. I had no problem connecting to the Wifi; I'm just curios how netctl handles such a case. Which of the available APs will it connect to, and does it seamlessly switch between the available APs if one of them gets out of range?


title: Process substitution over ssh with sudo in Bash shell

text: What is the proper way to do something like this:               diff <( ssh -t myuser@hosta 'sudo httpd -M') <(httpd -M)      When I want to compare the output of the 2 commands, the first on a remote host the second local? Is this the proper method?


title: Piping data to a process's stdin without causing EOF afterward

text: I have an executable that starts a user-interactive shell. I would like to, upon launch of the shell, inject a few commands first, then allow the user to have their interactive session. I can do this easily using `echo`:               echo "command 1\ncommand 2\ncommand3" | ./shell_executable      This _almost_ works. The problem is that the echo command that is feeding the process's stdin hits EOF once it's done echoing my commands. This EOF causes the shell to terminate immediately (as if you'd pressed Ctrl+D in the shell). Is there a way to inject these commands into stdin without causing an EOF afterwards?


title: IRC user configuration for irssi/ircd-hybrid on Debian

text: Running programs as root is dangerous, What's the best way to create a new low privileged user for Irssi and ircd-hybird on Debian?


title: Completing avfs fake directories in zsh

text: How can I tweak zsh's completion system to complete “fake” files in some circumstances? More precisely, the AVFS filesystem exposes archives as directories by creating a “fake directory” next to every archive. By default, it replicates the whole directory hierarchy under its mount point `~/.avfs`. Furthermore, under `~/.avfs`, for every archive file such as `/tmp/foo.zip`, besides the archive file itself `~/.avfs/tmp/foo.zip`, there is a directory called `~/.avfs/tmp/foo.zip#` which exposes the content of the archive. However this extra directory does not appear in the listing of `~/.avfs/tmp`: it only exists when explicitly requested. (This is similar to how some automounters operate.)               mountavfs     cd ~/.avfs/tmp/foo.zip\#      When I type a command like the one above, `foo.zip#` doesn't appear as a completion under `~/.avfs/tmp/`, since there is no such directory. How can I tell zsh that whenever there is a file whose full path `$arc` matches `~/.avfs/**/*.(tgz|zip)`¹, it should pretend that there is a directory called `${arc}#`? (Note that I want the completion to work with every call to `_files` or `_dirs`, not just for the `cd` command. I'd prefer not to have to duplicate the code of the `_files` function, if possible.) ¹  and all the rest of the extensions


title: Is it possible to find out what program or script created a given file?

text: Three files have suddenly appeared in my home directory, called "client_state.xml", "lockfile", and "time_stats_log". The last two are empty. I'm wondering how they got there. It's not the first time it has happened, but the last time was weeks ago; I deleted the files and nothing broke or complained. I haven't been able to think of what I was doing at the time reported by `stat $filename`. Is there any way I can find out where they came from? Alternatively, is there a way to monitor the home directory (but not sub- directories) for the creation of files?


title: Logging hidden file creations

text: > **Possible Duplicate:**   >  Is it possible to find out what program or script created a given file? Can I find somewhere in logs the times of creation of hidden files or directories under the _/home/username/_ directory? If not, can I use some application to log this for me? It should contain time of creation, file or directory name and who created it (app or user) sorted by time and date.


title: audit dir content removing / deletion

text: > **Possible Duplicate:**   >  Is it possible to find out what program or script created a given file? _A peasant needs thunder to cross himself and wonder_. A few minutes I get lost wp blog content the files in dir were deleted. I posted related question to [url]http://wordpress.stackexchange.com/questions/84266/my-blog- get-403-access-error-what-i-have-to-do-the-first-the-second-the-third [/url] wordpress forum. I wonder if there is a way to track file removals/deletions? Any suggestion welcome.


title: How can I log who creates a directory?

text: > **Possible Duplicate:**   >  Is it possible to find out what program or script created a given file? Is it possible to log which process/user/IP created a directory? I only found out that the `syslog.conf` is responsible for that. But how can I manage my goal?


title: Open-Source Audio Playlist 'Standard'

text: I know there are quite a few types of audio/music playlists out in the wild. Are there any that are specifically approved as FLOSS? That is, are there are that are particularly encouraged by the FSF, like how .ogg is an encouraged audio container format?


title: Mounting a device without read permissions

text: It is possible mount a flash drive without read permission?


title: Reliable way to jail child processes using `nsenter:`

text: I know that Linux namespaces, among many other things, can be leveraged to handle restricting and jailing child processes securely without any chance of their being zombied and dumped on `init`. But I'm fuzzy on implementation details. How might I use the tools provided by `util-linux` such as `mount` and `nsenter` to watch, monitor, and ensure that all processes launched are the direct namespace descendants of another process?


title: awk - to add a column after matching the remaining columns

text: I have a file ( ** _file1.txt_** ) with the contents as below.               8145216 3377090 1.5     1405541 53595498 1.53637      I need to generate all the possible combinations for the first 2 columns in the above file. I use a `php` program as discussed in this answer to generate all the combinations. After finding out the combinations, I have my file as below.               3377090 8145216     1405541 8145216     1405541 3377090     53595498 8145216     53595498 3377090     53595498 1405541      In the above file, I need to append the 3rd column values from **_file1.txt_** and if the value is not present in the **_file1.txt_** I need to append 0 as the 3rd column. The final output that am trying to get is,               3377090 8145216 1.5     1405541 8145216 0     1405541 3377090 0     53595498 8145216 0     53595498 3377090 0     53595498 1405541 1.53637


title: Prime New GlusterFS Cluster w/ 24GB of Files

text: I am attempting to load my new glusterfs cluster on AWS with my existing files that total in size of over 24GB. From my calculations, it is going to take 8 days to transfer all the files via the client... Is there someway to copy the files to the brick directory and sync the nodes from there?


title: byobu-config not working

text: I installed Byobu 5.73 (latest port available) on _"FreeBSD seer.fclar.unesp.br 9.1-RELEASE-p6 FreeBSD 9.1-RELEASE-p6 #0: Wed Aug 21 20:40:52 UTC 2013"_ without a problem. However, when I try to run `byobu- config` I get the error below:               # byobu-config     .: cannot open /usr/lib/byobu/include/common: No such file or directory      If I use F9 inside byobu, the screen just opens and closes, so I guess the error occurs there too. What am I doing wrong? The directory sure doesn't exists, shouldn't it be created during the installation?


title: PCI pass through of Matrox G450 eTV video adapter to Win2K guest opsys on openSUSE 13.1rc2

text: I'm having trouble with my Win2K guest VM recognizing the Matrox G450 eTV video adapter such that the video driver install fails. Any ideas?


title: rndc addzone failed: not found

text: I installed bin 9.8.4 (default) on Debian Wheezy. after configuration I tried to add a slave zone with the following command:               rndc addzone test.zone '{ type slave; file "test.zone"; masters { ns.master; }; };'      the command failed with the response:               rndc: 'addzone' failed: not found      in the log file nothing was mentioned (even with debug log on). The last log lines are:               16-May-2014 21:32:31.002 general: debug 1: received control channel command 'null'     16-May-2014 21:32:31.002 general: info: received control channel command 'addzone test.zone { type slave; file "test.zone"; masters { ns.master; }; };'      the same thing already happens if I use the command:               rndc addzone test.zone '{};'      My questions are: What is wrong here and what do I need to change to make `rndc addzone` work? Some additional information about my configuration setup: `named.conf`               controls { inet 127.0.0.1 allow { localhost;}; };          include "/etc/bind/named.conf.options.global";          view "internal" {         match-clients { internal; };              include "/etc/bind/named.conf.zone.localhost";   // 127.0.0.*         include "/etc/bind/named.conf.zone.internal";    // 192.168.*         include "/etc/bind/named.conf.zone.local";       // external master zones     };          view "external" {         match-clients { external; };              include "/etc/bind/named.conf.zone.root";         // . hint         include "/etc/bind/named.conf.zone.local";        // external master zones     };      `named.conf.options.global`               options {         directory "/var/cache/bind";         dnssec-validation auto;         auth-nxdomain no;    # default no; conform to RFC1035         listen-on-v6 { any; };         allow-new-zones yes;         allow-transfer { secondaryns; };         allow-recursion { internal; };         version none;     };      This is no `chroot` setup; I did not change `/etc/default/bind`; ufw is setup, but ports 53 and 953 are open. I did also run the `rndc addzone` command with a valid and existing subzone that is hosted on another name server (transfer on etc) with no different result.


title: How can I allow applications to bind to any address in a subnet assigned to an interface?

text: I recently got a static IPv6 /56 prefix of my own from Freenet6, and am trying to allow applications to bind arbitrary addresses in the prefix. I modified the tunnel creation script that `gogoc` uses in order to assign both the client address (here we'll call it `2001:5c0:1000::cccc/128`) and the entire subnet I have allocated (here called `2001:5c0:2000:5800::/56`) to `tun` and `tun:1`, respectively. I can bind an application to listen on `2001:5c0::cccc` or `2001:5c0:5800::` just fine, and using IPv6 open port testers indicates that the connection is succeeding. However, the dilemma lies in that I am unable to bind an address like `2001:5c0:2000:5800:1111:2222:3333:4444`, which is part of the subnet I assigned to `tun:1`, getting `EADDRNOTAVAIL` as an error code. `socat` reads:               2014/05/10 12:12:06 socat[16940] E bind(3, {AF=10 [2001:5c0:2000:5800:1111:2222:3333:4444]:9876}, 28): Cannot assign requested address      The application I wish to use does not support `IP_FREEBIND` or `IP_TRANSPARENT`. Is there a kernel setting I can use to implicitly free-bind sockets? Or perhaps a way to intercept socket creation from a given process, and attach socket options to that creation? `ip addr`:               1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default          link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00         inet 127.0.0.1/8 scope host lo            valid_lft forever preferred_lft forever         inet6 ::1/128 scope host             valid_lft forever preferred_lft forever     2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000         link/ether 04:7d:7b:XX:XX:XX brd ff:ff:ff:ff:ff:ff     3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000         link/ether 9c:b7:0d:XX:XX:XX brd ff:ff:ff:ff:ff:ff     5: wlan1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000         link/ether 00:c0:ff:XX:XX:XX brd ff:ff:ff:ff:ff:ff         inet 192.168.2.8/24 brd 192.168.2.255 scope global wlan1            valid_lft forever preferred_lft forever         inet6 fe80::2c0:ffff:feff:70d1/64 scope link             valid_lft forever preferred_lft forever     11: tun: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1280 qdisc pfifo_fast state UNKNOWN group default qlen 500         link/none          inet6 2001:5c0:1103:5800::/56 scope global             valid_lft forever preferred_lft forever         inet6 2001:5c0:1000:b::5225/128 scope global             valid_lft forever preferred_lft forever


title: sed script to insert line after the last matching line in a file

text: I'd like to write a script in sed to insert line to a file after all similar lines in the file. So I need to locate the last match for a pattern and insert immediately after it. It's very unlikely that this would be the last line in the file. I've seen a number of solutions that employ multiple piped calls to sed or use other tools such as tac. These are not appropriate - I need a pure sed solution that can be embedded inside a larger script that makes other changes to the same file. I've been searching for a while but suspect it isn't possible. I thought I'd ask on here before giving up! In case specifics help explain, I want to locate the last "Include" directive in an Apache http.conf file and insert another one beneath the last one.


title: how to install HAL on Puppy Linux barebone 5.7.1

text: On other linux distros I have to install `hal` for certain flash player videos to work. youtube works fine with the adobe flash. Just can't find anything on installing `hal` in puppy linux.


title: unable to create SCCS file

text: I am working on Ubuntu13.04. I created a file named quit.c I am trying check- in this file in to its SCCS file, s.quit.c I am creating the SCCS file as below using `admin` command:               ravbholua@ravbholua-Aspire-5315:~/CCPP/HelloWorld/das/das1/sccs$ admin -i quit.c s.quit.c     admin: quit.c is an invalid name.  SCCS file names must begin `s.'          admin: The 'i' keyletter can't be used with multiple files.     ravbholua@ravbholua-Aspire-5315:~/CCPP/HelloWorld/das/das1/sccs$      I think the syntax has changed from what it was earlier. Is it so? How to create the SCCS file for check-in?


title: udev GROUP and MODE assignments on symbolic link have no effect

text: I'm trying to connect my velleman k8055 board per usb to my pc. For this I have the udev rule               SUBSYSTEM !="usb_device", ACTION !="add", GOTO="velleman_rules_end"          ATTRS{idVendor}=="10cf", ATTRS{idProduct}=="5500", MODE="0660", GROUP="k8055", SYMLINK+="k8055_0"     ATTRS{idVendor}=="10cf", ATTRS{idProduct}=="5501", MODE="0660", GROUP="k8055", SYMLINK+="k8055_1"     ATTRS{idVendor}=="10cf", ATTRS{idProduct}=="5502", MODE="0660", GROUP="k8055", SYMLINK+="k8055_2"     ATTRS{idVendor}=="10cf", ATTRS{idProduct}=="5503", MODE="0660", GROUP="k8055", SYMLINK+="k8055_3"          LABEL="velleman_rules_end"      from jeremyz's k8055 github repo. After plugging the board in, I even get the k8055_0 symlink, but it's rights are root:root. But I want that users from the group k8055 can access this link (which is not possible with root:root permissions).


title: Execute script after period of inactivity

text: I'm looking for a way to execute certain script after period of inactivity and after completion of that period. By 'inactivity' I mean lack of mouse and keyboard events. E.g. I want:   1. execute first script after X min. of inactivity;   2. execute second script when that period is interrupted by mouse or keyboard. It will be best if that method will not be tied to the X-system and also will work in terminal (when X is not started).


title: Making tar split archives as it compresses?

text: I want to compress a file with `tar` but I'd like to know if its possible to do it while splitting the files. I know that in windows is possible to do this with winrar, I also know I can use `split` but I would then have to unsplit this from Linux


title: Is there a command line method by which I can check whether a downloaded file is complete or broken?

text: I'm writing a script that involves downloading and manipulating a file, and I want to ensure that the file is not incomplete (due to e.g. a dropped connection) before I work on it.


title: what does `-t` option of named command stands for?

text: What does `-t` option of `named` stands for? It looks like `-d` is already taken by `debug-level`, but where is the `t` come from? Is it from `chrooT`?


title: Boot - How does unix or linux boot?

text: How does the linux bootup process work? What is the file that is executed by the machine first to initialize all files and folders, like android, android use manifest for initializing?


title: How to return either "on" or "off" for: chkconfig --list | grep httpd

text: To ensure httpd is automatically started on reboot. I simply run this command               chkconfig httpd on      what I am looking for is a way to be told if this setting is               on or off      instead of this command               chkconfig --list | grep httpd      which returns this               httpd           0:off   1:off   2:off   3:off   4:off   5:off   6:off      I understand about the levels but really what I need is                on or off      so I can insert it onto a script and visually see on or off daily rather than something complex as above.


title: ssmtp: Cannot open mail:25

text: I've installed ssmtp and then edited the ssmtp.conf file so could try sending a mail but says cannot open mail:25 however in the conf file I set it to gmail port 467 and I am pretty sure everything else is right. What specifically do I need to look for with this error or could it be any number of settings in and outside of the configuration file?               #     # /etc/ssmtp.conf -- a config file for sSMTP sendmail.     #     # See the ssmtp.conf(5) man page for a more verbose explanation of the     # available options.     #          # The person who gets all mail for userids < 500     # Make this empty to disable rewriting.     root=postmaster          # The place where the mail goes. The actual machine name is required     # no MX records are consulted. Commonly mailhosts are named mail.domain.com     # The example will fit if you are in domain.com and your mailhub is so named.     mailhub=mail          # Example for SMTP port number 2525     mailhub=smtp.gmail.com:465     # Example for SMTP port number 25 (Standard/RFC)     # mailhub=mail.your.domain     # Example for SSL encrypted connection     # mailhub=mail.your.domain:465          # Where will the mail seem to come from?     #RewriteDomain=          # The full hostname     #Hostname=          # Set this to never rewrite the "From:" line (unless not given) and to     # use that address in the "from line" of the envelope.     #FromLineOverride=YES          # Use SSL/TLS to send secure messages to server.     UseTLS=YES     UseSTARTTLS=YES     AuthUser=user@gmail.com     AuthPass=xxxxxx          # Use SSL/TLS certificate to authenticate against smtp host.     #UseTLSCert=YES          # Use this RSA certificate.     #TLSCert=/etc/pki/tls/private/ssmtp.pem     TLS_CA_File=/etc/pki/tls/certs/ca-bundle.crt          # Get enhanced (*really* enhanced) debugging information in the logs     # If you want to have debugging of the config file parsing, move this option     # to the top of the config file and uncomment     #Debug=YES      Interestingly all the files in `/etc/pki/tls/certs/` are the exact same ones I deleted in my /etc/ssl folder! haha Now I know a certain amount of business happened when creating an untrusted cert.


title: Is it possible to login to a Linux machine with AD credentials without the machine beeing member of the AD?

text: I'm asking because as far as I know this is not possible with Windows machines since it's mandatory that a Windows machine is known to the AD in order to login with AD credentials. Is it possible to achieve that with Linux machines through LDAP?


title: How do I better read man pages?

text: How do I search `man` pages for options? I currently do this: `/-<option>` Example: To see what `grep -i` does, I do this: `man grep` and then `/-i`. Or, I can do this: `man grep | grep .-i` Is there a better way of searching `man` pages for options?


title: How can I determine user base page limit for a printer?

text: I'm using Debian Linux. I want to determine user base page limit, different page limit for different users, for a printer. I can determine page limit for printer with CUPS but can not determine page limit for single user. How can I achieve this?


title: Compiling C++11 code on old machines

text: I'm trying to compile a C++11 project on a bunch of old machines with old kernels. They're running CentOS 6.2, 6.3 Alt Linux 4.1. Others are unknown but similarly old. The machines won't let me install a newer version of GCC. 4.4 is the max they can run, and rewriting the project isn't an option. I somehow managed to build GCC 4.6 locally on one machine, and used it to compile my project, but I don't want to repeat that on every machine. Is there a painless way to compile or run the code on all the machines?


title: How can I get Mumble's overlay working?

text: Mumble and Team Fortress 2 (TF2) both work fine for me individually, but I cannot get mumble-overlay working, either independently or within TF2. I've tried putting the following launch options into TF2's properties in Steam, none of which have worked. (N.B. I'm also using bumblebee, and a 64-bit computer.)               mumble-overlay primusrun %command%     mumble-overlay primusrun %command% -nod3d9ex     mumble-overlay primusrun %command% -d3d9ex -32bit     LD_PRELOAD=/usr/lib/mumble/libmumble.so.1.2 primusrun %command%      TF2 is in windowed mode, so I'd be happy with mumble producing its own overlay that wasn't injected into TF2.


title: cannot create regular file 'filename': File exists

text: I've been getting this strange error message in one of my build scripts - `cp` fails, returning the error "File exists". I've even tried using `cp -f`, which should overwrite the file if it exists, but the error still shows up. Running `cp` to overwrite existing files works perfectly when I do it manually. What could cause this error?


title: Validating an OpenSSL Cipher List

text: Are there any tools that can validate an OpenSSL cipher list both syntactically and semantically? For example, `ALL:!LOW:!SSLv2:!EXP:!aNULL` is both syntactically and semantically valid cipher list. On the other hand, `FOO:!BAR:!SSLv2:!EXP:!aNULL` is semantically invalid since `FOO` and `BAR` are not valid cipher strings while it is syntactically valid. Is there any tool (whether in the OpenSSL package or from a 3rd party) that can validate a cipher list in both scenarios? Of course it is possible to write a tool from scratch using the cipher list format and cipher strings that can be fetched from `openssl ciphers` command output, but I don't like reinventing the wheel if I don't have to.


title: Execute a command within 'sed'

text: I have a list of random memory addresses saved in a text file, and I need to `sed` them out, decode them, and save them back to my file. However, the decoding operation I'm trying to perform is handled in a C++ program I've created some time ago. The problem I am encountering now is executing the C++ within the `sed` command; that is, I want to back-reference the part that needs to be decoded and use it as an argument in my C++ program. I have written the following command:               cat $1 | sed -r 's/(0[Xx])([0-9A-Za-z]{1,8})/\1`./convAddrs \2`/g';      before I had the chance to read an answer in this post saying that `sed` does NOT execute commands. Is it true that `sed` doesn't allow the execution of commands? If so, assuming the command I've written is a valid `sed` sequence, how would I write it in `perl`?


title: How many different ways can you create an "alias" in Bash?

text: I only know of two ways: `alias foo=bar` and `function foo() { bar }`. The reason I'm asking is that - all of a sudden in one of my bash sessions - I cannot run the `ln` command because `bash` is erroring out with `-bash: /usr/local/.../ln: No such file or directory` (where the `/usr/local/.../` is one of the entries in my `PATH` environment variable). It's not a `PATH` issue though, because If I run `which ln` it outputs the expected binary of `/usr/bin/ln` (which I can run fine if I specify the absolute path). I also checked for `ln` in my `alias` and `function` declarations, and there is nothing:               $ declare -f | grep ln     $ alias | grep ln      The problem is just occurring in one bash session. If I start a new shell, it works fine again, but I want to know what caused this problem all of a sudden in this one particular session of bash. Any ideas as to what could be causing this?


title: If some program is not working in Ubuntu, how to uninstall and reinstall

text: I'd be specially interested in a solution that covers the dependencies of this program, and not only the program as such. I have several programs that don't work after I updated to Ubuntu 13.04 from 12.10; and I suspect that they have a common problem in some package that all use. Note: what's not working is Evolution, Unity Tweaks, Ubuntu Tweaks, and Bleach (it freezes after running). I've tried apt-get purge and install, to no avail. I wonder whether the problem is solvable, maybe these programs won't run in Ubuntu 13.04. I get following messages:               (evolution:25416): Gtk-CRITICAL **: gtk_entry_set_text: assertion `text != NULL' failed          (evolution:25416): Gtk-CRITICAL **: gtk_entry_set_text: assertion `text != NULL' failed          (evolution:25416): Gtk-CRITICAL **: gtk_entry_set_text: assertion `text != NULL' failed          (evolution:25416): Gtk-WARNING **: Attempting to read the recently used resources file at `/home/k4/.local/share/recently-used.xbel', but the parser failed: Failed to open file '/home/k4/.local/share/recently-used.xbel': Permission denied.          (evolution:25416): IBUS-WARNING **: The owner of /home/k4/.config/ibus/bus is not k4!      and then I get the               segmentation fault (core dumped).      message (after it asks me to configure the email).


title: OpenGL acceleration stopped working after upgrading to Wheezy

text: After upgrading recently from Squeeze to Wheezy, my 3D acceleration suddenly stopped working. I'm using IBM Thinkpad T60 with ATI M52 [Mobility Radeon X1300]. I found in Xorg.0.log:               [ 48286.173] (EE) AIGLX error: r300 does not export required DRI extension     [ 48286.174] (EE) AIGLX: reverting to software rendering     [ 48286.180] (II) AIGLX: Loaded and initialized swrast     [ 48286.180] (II) GLX: Initialized DRISWRAST GL provider for screen 0      But I have no clue how to solve the problem. _Update:_ Possibly related: http://bugs.debian.org/639621


title: Cron job still running when deleted

text: On a server I inherited, there is a `cron` job running hourly on one of the Debian servers. It sends an email out to a non-existent email, but bounces back to my account since I listed myself as the `root` email in `/etc/aliases`. The cron job has been deleted from `/etc/cron.hourly` (it was `ntupdate`), as it's listed in the email. I reloaded the `crontab` daemon, but I am still getting hourly reports that the file failed to launch, and the email address does not exist! The output that is getting emailed:               /etc/cron.hourly/ntpdate:     run-parts: failed to exec /etc/cron.hourly/ntpdate: Exec format error     run-parts: /etc/cron.hourly/ntpdate exited with return code 1      Currently, there is just the `.placeholder` hidden file in `/etc/cron.hourly`. I also ran `crontab -l`, and the only 3 jobs listed are expected to be listed, and are running about 10 minutes after this email keep arriving; so I know it is not one of those. **Where can I look next to stop getting these emails?** **EDIT #1**               # ls -l /var/spool/cron     total 4     drwx-wx--T 2 root crontab 4096 Jan 25  2012 crontabs      **EDIT #2**               # ls -l /var/spool/cron/crontabs/     total 4     -rw------- 1 root crontab 311 Jan 25  2012 root     # more /var/spool/cron/crontabs/root     # DO NOT EDIT THIS FILE - edit the master and reinstall.     # (/tmp/crontab.4nUf85/crontab installed on Wed Jan 25 10:11:10 2012)     # (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)     2 1 * * * /etc/webmin/cron/tempdelete.pl     0 22 * * * /etc/init.d/gnugk stop     0 23 * * * /etc/init.d/gnugk start      This is on Debian Squeeze, using just `cron`, as far as I can tell


title: How to rename a file into a random GUID?

text: The task is to replace a file's (actually of all the files in a directory) name (but leave extension intact) with a random UUID/GUID. Any ideas on how to do this?


title: Colored man pages not working on gentoo

text: I have a problem using **these methods** to get colors in my man pages in gentoo. I've asked already in the gentoo forums but it still doesn't work, and the comments in a bug report (Bug 184604) don't work either. Can someone help me to get colours in my man pages? **EDIT** : Yes, I'm using less as pager and urxvt-unicode as terminal emulator **EDIT2** : I already asked in the gentoo forums but it didn't help, this is the link I couln't post before (because of my reputation) http://forums.gentoo.org/viewtopic-t-819833-start-0.html.


title: SSH Copy Limit?

text: So I have a small little Ubuntu server set up, with some rather large files that I've allowed a few people to copy from their putty window. Anyways 2 questions: Lets say a person on windows wants to copy a file using putty from an Ubuntu server. how would they do it? and what directory would it default too? (what would the command be even? would I use SCP?) Second question: is there like a limit? these are mostly 1-2gb files. would that cause any issues? Thanks


title: How to get only files created after a date with ls?

text: With `ls` command, does it possible to show only file created after a date, hour... I'm asking it because I have a directory with thousand of files. I want files created since yesterday. I use `ls -ltr` but I have to see all files... There is an equivalent of `DIRECTORY/SINCE=date` from OpenVMS ?


title: Program to keep track number of login attempts

text: Is there any way to keep track of number of attempts made by a user to login into his system?


title: The Right Distro for text-based needs

text: I'm searching for the right Linux Distro. My four current ideas are:   * Gentoo   * Grml   * Arch   * Debian But I'm absoluty open to more alternatives. Now a little bit more about my needs:   * I want it to be really small by default, so I can customize the hell out of it.   * I want to use text-tools only, I don't need any graphics on that OS   * I'm going to use ZSH, Vim, the NEO Layout and maybe XMonad   * I want to have a really nice package manager   * The OS will mainly be used for programming My CPU is an Intel Core 2 Duo, 64 Bit, of course. My questions are now:   * Which package manager is the most advanced: APT, Portage or Pacman?   * Which distro fits my needs best?   * What is the easiest way to run it from an USB-Flashdrive?


title: cp and mv if the file named already exists

text: What happens when you give the following commands if the file named done already exists?               $ cp to_do done     $ mv to_do done


title: Examine exported binary gpg key

text: The commands `gpg --export` and `gpg --export-secret-keys` can be used to export keys in a binary format. Is there any command available to examine these exported binary key files? I need to see if the exported files contain some extra fields or any other incompatibility problems.


title: Turning off default video output with xrandr when external monitor is connected

text: I'm new to bash scripting, and I'm trying to configure my video outputs so that my laptop display gets turned off when I connect an external monitor via VGA. That's the script I came up with, pretty straightforward:               #!/bin/bash     myvar="$(xrandr -q)"     if [[ $myvar == *"VGA connected"* ]]         then             xrandr --output VGA --auto;             xrandr --output LVDS --off;         else             xrandr --output LVDS --auto;     fi      All is working as it should except for the `xrandr --output LVDS --off` bit, as my laptop display simply adjusts its resolution to match the external monitor's one and stays on. Can't figure out the bug on this one. Any help is appreciated.


title: Yum: assume yes if install size < 1MB

text: What the title says: I don't want to use `\--assume-yes` option, but I'm fine with small installs (less than 1MB) to be processed without asking. Is there any way how to achieve that? I'm on Fedora 20.


title: Generate .asoundrc

text: Is there any way to generate .asoundrc? I know that by default this file does not exist and system generates one on the go like Xorg does. But is there any way to see how the content will look like?


title: Batch rename image files by age plus add date and variable to filename

text: _The question is completely rewritten due to things learned from the first two answers and comments that I was unaware of when first asking._ * * * After a photo shoot I come home with files that look like `_DSC1234.NEF`. `NEF` is Nikon's camera raw file format, so `EXIF` data is present in the files. I would like to automatically rename them with three parts:   1. Creation date in the format `YYYYMMDD`   2. Name of Shoot   3. Number of Image So the final file name should look like this `20140707_NameOfShoot_0001.NEF` There are a few issues: **ad 1. Creation date** sometimes I can only copy and rename the files a few days after shooting, so the date should reflect the date the picture was taken, not the date it was copied. `mtime` seems like the best bet here or if possible creation date from `EXIF`. **ad 2: Name of Shoot** This would ideally be a variable I could set as a parameter on calling the script. **ad 3. Number of Image** This should reflect the age of the image, the oldest having the lowest number. The problem is that cameras usually restart numbering at `0000` after they hit `9999`. So `9995-9999` can potentially be older than `0000-0004`. I am looking for a solution that reflects file age and in this special case would rename   * _DSC0000.NEF -> 20140707_FOO_0004.NEF   * _DSC0001.NEF -> 20140707_FOO_0005.NEF   * _DSC0002.NEF -> 20140707_FOO_0006.NEF   * ...   * _DSC9997.NEF -> 20140707_FOO_0001.NEF   * _DSC9998.NEF -> 20140707_FOO_0002.NEF   * _DSC9999.NEF -> 20140707_FOO_0003.NEF Again, either `mtime` or if possible creation date from `EXIF` seem right. * * * From here I have a working solution which renames all .NEF-files in a folder by date:               find -name '*.NEF' |      gawk 'BEGIN{ a=1 }{ printf "mv %s %04d.NEF\n", $0, a++ }' |      bash       Hard coding file-modification-date and the shootname works well, but it would be great if it could be automated. For the timestamp I find articles on `strftime()`, `mktime()`, `systime()` but I don't understand how to use them to return file modification date. I also tried to add `DATE=$(date +"%Y%m%d")` and add `$DATE` to the gawk-line, which leads to deletion of all files in current folder (and probably is systime anyway and not change time). For the variable, I tried               gawk 'BEGIN{ a=1 }{ printf "mv %s $1_%04d.NEF\n", $0, a++ }' |       and call the script with `./rename FOO`, but FOO is ignored in renaming.


title: How do I properly allow user jenkins to write to a specific directory under user minecraft home directory?

text: I am using Jenkins, I want to copy a file from the Jenkins directory in to the _minecraft_ user directory, but I am not sure how to go about this, as when I run               cp build/versions/*.info /home/*minecraft*/www/files/Minecraft/versions      I get 'Permission Denied'


title: Why does Linux come with SELinux?

text: If SELinux was created by NSA and published by United States Department of Defence then why the hell does it come with the barebone Linux kernel? Isn’t Linux all about security and privacy? Also, is SELinux not open source?


title: Gentoo Live CD from Hard Drive: No Mountable Filesystems on root after modules loaded

text: I am attempting to install Gentoo on my PowerPC Mac. I have reached the point where I can boot the Live CD (I have no functional CD Drive, so it is from a spare Hard Drive), but after the kernel is loaded, I get a message `"No root found at /dev/hda`. It then gives me the options: `shell to get into a shell, q to skip, enter to try the same again`. q to skip doesn't work, but it prints a nice warning `>> Skipping. This will likely cause a boot error.` Then it `can't find /newroot in /etc/SOMETHING` (I can't remember). The shell won't really help me, if I try: dev/hda (the only thing I can find in /dev that looks like the second internal harddrive I am booting from), I only get the nice warning No mountable filesystems!. Within the /boot/yaboot.conf file, the root is by default: `root=/dev/ram0`. Am I possibly missing a swap partition? I changed the `device` within the yaboot.conf file to `ultra0:` as it is for that drive. I used dd to copy the entire disk image to the drive, and it acknowledges itself to be a Live CD. The 40 GB hard drive even thinks it only has a 143.2MB capacity with 0 KB free. The only issue is: `/dev/cdrom` (which it seems to want to access) doesn't exist due to the hardware failure of my internal drive. The kernel will only even consider mounting valid drives within the /dev structure, so any advice on how to make the CD point to my drive?


title: How can I switch window managers in Gnome 3?

text: I normally enjoy using Gnome 3 and gnome-shell in Fedora 16. However, I would like to temporarily run a non-compositing window manager such as metacity so that some wine games can have full control of the display. I have metacity installed. When I run `metacity --replace`, instead of switching window managers I get a gnome-shell failure display that forces me to logout. I also cannot find a way to choose a different session from the login prompt. There are no buttons, options, arrows or anything to choose. Just username and password. I'm about to resort to desperate measures involving systemd runlevels to disable X and start it manually via `startx`. Is that going to be my only option? I hope not.


title: xdg-open opens a different application to the one specified by xdg-mime query

text: I run Debian Jessie without a desktop environment (I use the tiling window manager i3) and like to use `xdg-open` to quickly open files using a preferred application. I have an ongoing problem setting the preferred app for PDF files though. This is my problem in a nutshell:               $ xdg-mime query filetype ~/Downloads/document.pdf     application/pdf          $ xdg-mime query default application/pdf     /usr/share/applications/qpdfview.desktop          $ xdg-open ~/Downloads/document.pdf     [opens gimp!]      Any ideas would be hugely appreciated - this has been plaguing me for about a year. The only way I've ever managed to (temporarily) fix it is by directly editing the `mimeinfo.cache` and removing the reference to `gimp` from the `application/pdf` record. And yes, `/usr/share/applications/qpdfview.desktop` exists and contains the correct location of the `qpdfview` binary. (Indeed, this .desktop file is used when I hand-edit `mimeinfo.cache`.)


title: Package management without the need of root permission

text: Am looking for a way to install packages in home folder. This thread suggests using               apt-get source      ./configure --prefix=$HOME      However, it doesn't provide a way to manage dependencies like apt-get install does. Tools like Homebrew have a limited number of packages. Is there a way to use apt-get, but to install in home folder.


title: Does BIOS read directly the bootloader or load it into RAM?

text: I'm trying to understand the very first steps of the boot process.   1. The CPU read the BIOS     * It reads a fixed address instruction     * It will jump to the first BIOS instructions address     * It will execute the code     * It will do the "Power-On Selt Test", check devices and find first bootable device   2. The Bios will then _read_ the MBR to _load_ the primary boot loader   3. The primary boot loader will execute the loader's second stage (ex: Grub)   4. The loader's second stage will load the Kernel in memory My question are:   * When the BIOS **read** and **load** the primary boot loader in memory, are we talking the RAM memory?    * Can the CPU **address directly** (read instructions) from the HDD without loading the content into RAM (we disregard performance issue here)?   * Same question for the BIOS: is it read directly or loaded in RAM before execution?


title: What is meant by "a system call" if not the implementation in the programing language?

text: I would like to understand the term "system call". I am familiar that system calls are used to get kernel services from a userspace application. The part i need clarification with is the difference between a "system call" and a "C implementation of the system call". Here is a quote that confuses me: > On Unix-like systems, that API is usually part of an implementation of the C > library (libc), such as glibc, that provides wrapper functions for the > system calls, often named the same as the system calls that they call What are the "system calls that they call"? Where is their source? Can I include them directly in my code? Is the "system call" in a generic sense just a POSIX defined interface but to actually see the implementation one could examine the C source and in it see how the actual userspace to kernel communication actually goes? Background note: I'm trying to understand if, in the end, each c function ends up interacting with devices from `/dev`.


title: Figuring out what OS is on which partition?

text: So I have both Ubuntu and Crunchbang installed on my laptop, and I'm trying to figure out which one is on which partition. I'm going to install another OS (probably BT) and need to know what partition can safely be wiped. Any tips ? My partitions at the moment: ![enter image description here](http://i.stack.imgur.com/Z2B7C.png)


title: understand the output of stty -a and change ctril backspace to just backspace

text: I am working in bash shell on a **Solaris** environment and whenever I type "backspace" it clears out the entire line. Do you have any suggestions for me to change the backspace clearing entire line to just a character which is the expected behavior of it? And also please guide me also on how do I interpret the output of `stty -a` command in my local **cygwin** environment:               $ stty -a <br/>     speed 38400 baud; rows 34; columns 125; line = 0;     intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = ^Z; start = ^Q; stop = ^S;     susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;     -parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts     -ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc ixany imaxbel     opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0     isig icanon iexten echo echoe echok -echonl -noflsh -tostop echoctl echoke


title: rkhunter /usr/bin/ssh && /usr/sbin/sshd [Warning]

text: My last rkhuter scan reported a couple of warnings that deserve to be checked(for my noob eyes). Main reason for my suspect is that i wasn't on the machine at (03-Apr-2014 01:12:12) ->AM I googled for understand what's the purpose of the 2 files i mentioned in question title, but i didn't find very helpfull answers. Can anybody tell me what's the aim of those files, and maybee also why/when it would be modified by the system itself?               [10:17:11] Warning: The file properties have changed:     [10:17:11]          File: /usr/sbin/sshd     [10:17:11]          Current hash: 900e153506754ceb7b19f3a01a3ad5e36d43d958     [10:17:11]          Stored hash : 55a1a63a46d84eb9d0322f96bd9a61f070e90698     [10:17:11]          Current inode: 149998    Stored inode: 142248     [10:17:11]          Current file modification time: 1396480332 (03-Apr-2014 01:12:12)     [10:17:11]          Stored file modification time : 1360359087 (08-Feb-2013 22:31:27)      * * *               [10:17:34] Warning: The file properties have changed:     [10:17:34]          File: /usr/bin/ssh     [10:17:34]          Current hash: 60366d414c711a70f9e313f5ff26213ca513b565     [10:17:34]          Stored hash : 1b410fb0de841737f963e1ee011989f155f41259     [10:17:34]          Current inode: 150030    Stored inode: 142203     [10:17:34]          Current file modification time: 1396480332 (03-Apr-2014 01:12:12)     [10:17:34]          Stored file modification time : 1360359087 (08-Feb-2013 22:31:27)      the apt logs files making me worry, i censured couple of info. Apparently in the 03-Apr-2014 i didnt installed nothing.               Start-Date: 2014-04-01  15:49:18     Commandline:  ***********     Install:  ***********     End-Date: 2014-04-01  15:49:29          Start-Date: 2014-04-08  14:03:52     Commandline:  ***********     Install:  ***********     End-Date: 2014-04-08  14:04:04      By the way i think(hope) they are false positives [edit:not anymore]. Maybee Files edited by some process of the system and normally not recorded in the .dat file of rkhunter because i didn't updated. I came here to find some confirmation :) or some more Parania