Why don't I see the XAMPP page on Linux Mint?

I am trying to install PHP MySQL on Mint 12. I downloaded and installed XAMPP. According to the tutorial, when I go to `localhost` in a browser I should see this: ![](http://www.apachefriends.org/images/380.jpg) Instead, I see:               It works!     This is the default web page for this server.     The web server software is running but no content has been added, yet.      I realize this is the Apache success page, but why am I seeing it instead of the XAMPP page? How do I fix it? Where should PHP source files be stored on Mint?


How to do multiple brace expansions without combinatorial explosion?

I often use brace expansion on the command line, because it's handy. ### Example               {foo,bar}      expands to:               foo bar      Multiple brace expansion also expand, e.g.:               {foo,bar}Q{foo,bar}      would expand to:               fooQfoo fooQbar barQfoo barQbar      This is expected behavior, where the brace expansions are used in order. ### My Question Now, I'd like the output of any brace expansion (or other short command line trick) to be:               fooQfoo barQbar      Note: I'm using `bash 3.2`


What does the jargon filesystem mean?

I know this question sound quite stupid. Sometimes when I go through sections of Linux books about **filesystem** , it may turn out that it is a chapter talking about the directory structure of a standard Linux system, like /proc, /dev, /etc, /usr directories, with a brief explanation. Sometimes it may be about filesystem types like ext3, ext4 and nfs, dos, etc. I feel quite confused about that. Which one is correct? Or did I miss something? In short, my question is: The word **filesystem** means directory structure of Linux system or things like ext3, ext4, fat32, etc.?


Command-line software for playlist syncing to Android Phone?

I'm looking for a way to sync music to my Android Phone without having to load something like banshee. I know there are plenty of ways to sync _files_ , but I'm interested in syncing _playlists_ and having the playlists dictate which files are synced.


Automatically adjust window width in tmux

Is there a way to set tmux so that it automatically adjusts window width when I switch to the pane so that it will be wide axactly as the longest (visible on screen) line in the file I have open? I'm doing this manually with the command      `:resize-pane -R 10`   or   `:resize-pane -L 10`      I always have to guess the number and when I switch to another pane I have to do it again Note that this functionality is relevant only to vertical panes.


Does Debian's dpkg store the time/date of package changes (.i.e. installation/purges)?

I know that `dpkg` and `dpkg-query` are good tools to find out about packages currently installed on a Debian system. Besides the information logged to the files `/var/log/dpkg.log.*` is there any other place that would allow me to know _when_ a change took place (i.e. the _time_ and _date_ of an installation of a package)? Assuming that this question here says that Debians package system does not care about storing information about the origin of a deb file (and well how should it do so?) I am beginning to think that `/var/log/dpkg.log.*` is the only place where information about when something dpkg related happend is stored at all. Maybe somebody can confirm this. Or else tell me if the time information regarding package installs is stored (indeed that would be great!) where to find them (which file?)


Undo rm -r, restore data

I was playing around with zip and accidentally deleted my /home/ folder (I wanted to delete home/ which got created by unzipping an archive). I used `rm -r /home/`instead of `rm -r home/` as root. Is there anything I can do to restore my /home/ dir? I am using Debian 6 as a VM on VMware Player. Unfortunately I have no backups.


Write access without read access

Is it possible for a user to have a write access to a file and not be able to read it? How is it possible? I tried the following commands:               debianbox@debian:~/posix/io$ touch filetest     debianbox@debian:~/posix/io$ ls -l filetest     -rw-r--r-- 1 debianbox debianbox 0 14 oct.  03:10 filetest          debianbox@debian:~/posix/io$ echo "Hello World" > filetest     debianbox@debian:~/posix/io$ cat filetest     Hello World          debianbox@debian:~/posix/io$ chmod u-r filetest     debianbox@debian:~/posix/io$ cat filetest     cat: filetest: Permission forbidden          debianbox@debian:~/posix/io$      As you can see here, I have write but not read access on this file. How can this be possible? Is this considered as a bug? If not, in what situation would this be useful?


How to setup linux server for headless use?

Consider a headless server like this: A typical x86 box at a remote location, which you can remotely initialize with a stock - say - Ubuntu image. After it is initialized you only can login via ssh - or remotely reset it, i.e. you can't access the BIOS or the boot manager prompt (say Grub 1). Perhaps some kind of KVM is available, but the use of KVM is very expensive and you have to book it on a hourly basis. Given this scenario, one can get paranoid about boot problems. For example:   1. What if a kernel upgrade fails?   2. what about a fsck-prompt in the early boot process? Probably, ssh is not available yet ... Are there other gotchas to watch out for? For kernel upgrades I configure grub (the legacy one) such that the `menu.lst` preamble contains               default saved     fallback 2  # counts from 0      and the first entry ends with:               savedefault fallback      The first grub entry is the upgraded kernel, and the third is a known working one. See also the grub manual section on fallback boot. I changed the startup script `/etc/rc.local` (on a Debian-like system) to the effect that the default-entry setting is reset in case of a successful boot:               grub-set-default 0      This grub-setup works, but e.g. on Ubuntu this is not the default and one has to manually adjust the `menu.lst` after each kernel update. I supply               panic=60      as kernel parameter such that, e.g. in case of a wrong `root=` parameter or broken kernel, the system automatically reboots in case of an error. About the fsck issue I am not sure what the best way is. On Debian-like systems you can set               FSCKFIX=yes      in `/etc/default/rcS`, which tells fsck to auto-repair by default. But if the auto-repair fails, perhaps I still get a prompt I can't access remotely? Alternatively I could just disable fsck-checking via a zero in the sixth column of `/etc/fstab` - in case of a fs-error would then just re-initialize the system and restore the backups - thus avoiding all the fsck trouble?


Looking for an old classical Unix toolkit textbook

I am looking for a book about the Unix command-line toolkit (sh, grep, sed, awk, cut, etc.) that I read some time ago. It was an excellent book, but I totally forgot its name. The great thing about this specific book was the running example. It showed how to implement a university bookkeeping system using only text-processing tools. You would find a student by name with grep, update grades with sed, calculate average grades with awk, attach grades to IDs with cut, and so on. If my memory serve, this book had a black cover, and was published circa 1980. Does anyone remember this book? I would appreciate any help in finding it.


In synaptic, is there a way to always expand "Details" when installing a package?

While using synaptic and update-manager in Debian (I'm using unstable), I always like to see what it is doing while installing and always manually expand the "Show installing files" and "Details" tabs. Is there a way to make this a permanent setting?


ld-2.14 segfaulting on KDE launch in ArchLinux

I just installed ArchLinux and then KDE. It was all working fine. After a reboot, KDE simply refuses to starts. Whenever I login using KDM, it shows the KDE splash screen.. and before the second icon loads, it sort of crashes and returns back to the login screen. This is the error I got from `/var/log/messages`:               Aug 21 23:33:23 meanmachine kernel: [   26.023430] kded4[1093]: segfault at 68 ip 00007fd16607012e sp 00007fff5ce4d2a0 error 4 in ld-2.14.so[7fd166065000+1f000]     Aug 21 23:33:23 meanmachine kernel: [   26.061628] kcminit_startup[1095]: segfault at 68 ip 00007fd16607012e sp 00007fff5ce4d3b0 error 4 in ld-2.14.so[7fd166065000+1f000]      I've tried:   1. Clearing the pacman cache.   2. Re-installing kde-meta, resyncing base, base-devel.   3. Doing a system-wide upgrade. However nothing seems to work. I am facing the same problem again. Any help is greatly appreciated.


Slow response time with Gnome shell in Virtualbox fullscreen mode

Today I installed Fedora 15 in a VBox VM to try out Gnome 3. After installing the guest extensions almost everything works fine. Except for the slow response time in fullscreen mode (HOST+F). By that I mean textareas responding only after I've typed whole words, window dragging won't register etc. However in maximized window mode everything runs smoothly. Anyone have a similar experience? What can I do? VirtualBox guest settings are as following.   * 1,5 GB RAM   * 1 CPU core (no limitations, 2,2Ghz host)   * 128 MB video memory      * 3d accel enabled     * 2d accel disabled (it says this is only for windows guests)   * rest is defaults I also have a graphics card that uses nvidia's optimus technology but I doubt that this is the problem. Host OS is Windows 7 Professional


How do I check if a file already has line with "contents" in it?

I need to know if a file aready has line with contents X in it, if not append line. here's the code I've tried.               if ! $(grep 'eval $(perl -I$HOME/foo/lib/perl5 -Mlocal::lib=$HOME/foo)' ~/.bashrc)     then         echo 'eval $(perl -I$HOME/foo/lib/perl5 -Mlocal::lib=$HOME/foo)' >> ~/.bashrc     fi


DNS Domain Issue

we are maintaining our DNS account to GoDaddy DNS Provider for our servers, Right now we have an problem, If someone has to register domain or sub-domain from any of other DNS provider or GoDaddy DNS provider it allow's to activated and those domains are pointing directly to our servers easily, how to avoid these kind of cases, how to restrict some other peoples have to register some illegal domains like (porn or some other sites) with our server ip. How to avoid this kind of problem.


How to set up a cron entry that runs at 00 and 30 after the hour?

I have a cron entry that runs every 30 minutes -               */30 * * * * /home/myuser/myscripts.sh      How to set this up such that it runs exactly at 30 minute intervals but also exactly at (for example) `3:00 PM, 3:30 PM, 4:00 PM, 4:30 PM and so on.` So I'm not only interested in the 30 minute interval but also the time being close to "round figures" on the clock. So 3 PM is just an example. I want the job to run at times that are "round figures", like "`3:00 PM, 3:30 PM, 4:00 PM`" and not "`3:15 PM, 3:45 PM, 4:15 PM`"


Which kernel module name is currently correct "usb-storage" or "usb_storage"?

I have found a number of examples how to prevent a kernel module from being loaded. One of them is about USB storage module. The next code has been provided: `echo "blacklist usb-storage" | sudo tee -a /etc/modprobe.d/blacklist.conf` then I decided to check the name by `lsmod`, so I plugged a USB stick in and found it to be different:               Module                  Size  Used by     usb_storage            62209  1      My question is: what spelling should I apply to the `blacklist`: `usb-storage` or `usb_storage`? I have doubts about it being one name for an earlier kernel, and changed to another one for a later kernel. Currently I am running the Kernel version `3.13.0-30-generic`


Well, exactly as the title says: _How can I tell if floating point arithmetic is performed in hardware or software?_ I could find the processor's name and Google it, but is there a way to do it in a BASH script? For instance, is there something saved in a system file that I could read? UPDATE: output of /proc/cpuinfo on Intel:               processor       : 0     vendor_id       : GenuineIntel     cpu family      : 6     model           : 69     model name      : Intel(R) Core(TM) i3-4010U CPU @ 1.70GHz     stepping        : 1     microcode       : 0x17     cpu MHz         : 782.000     cache size      : 3072 KB     physical id     : 0     siblings        : 4     core id         : 0     cpu cores       : 2     apicid          : 0     initial apicid  : 0     fpu             : yes  <-- !!!     fpu_exception   : yes     cpuid level     : 13     wp              : yes     flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid     bogomips        : 3392.25     clflush size    : 64     cache_alignment : 64     address sizes   : 39 bits physical, 48 bits virtual     power management:      output of /proc/cpuinfo on RPi (using Raspian v7):               processor       : 0     model name      : ARMv6-compatible processor rev 7 (v6l)     BogoMIPS        : 2.00     Features        : swp half thumb fastmult vfp edsp java tls     CPU implementer : 0x41     CPU architecture: 7     CPU variant     : 0x0     CPU part        : 0xb76     CPU revision    : 7          Hardware        : BCM2708     Revision        : 000e     Serial          : 000000007b455c14


How to set message validity

I am using Shibboleth for single user authentication and it needs a ssl configuration which facilitates the user authentication process. Before it was working fine but now I am facing a **SSL handshake failure** error and the secure connection is being ignored. **Error Log:** Here is the Shibbolet error log:               2012-09-20 15:14:59 DEBUG Shibboleth.Listener [17]: dispatching message (default/SAML/POST)     2012-09-20 15:14:59 DEBUG OpenSAML.MessageDecoder.SAML1POST [17]: validating input     2012-09-20 15:14:59 DEBUG OpenSAML.MessageDecoder.SAML1POST [17]: decoded SAML response:     <Response xmlns="urn:oasis:names:tc:SAML:1.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" IssueInstant="2012-09-20T13:10:43.494Z" MajorVersion="1" MinorVersion="1" Recipient="https://inami-riziv.dokeosnet.com/Shibboleth.sso/SAML/POST" ResponseID="_faf482981786daacf938e158e87d75f8"><ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">     <ds:SignedInfo>     <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ds:CanonicalizationMethod>     <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"></ds:SignatureMethod>     <ds:Reference URI="#_faf482981786daacf938e158e87d75f8">     <ds:Transforms>     <ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"></ds:Transform>     <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"><ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="code ds kind rw saml samlp typens #default xsd xsi"></ec:InclusiveNamespaces></ds:Transform>     </ds:Transforms>     <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></ds:DigestMethod>     <ds:DigestValue>qgvrV2yDB88HKXStzqT3sFrpLlo=</ds:DigestValue>     </ds:Reference>     </ds:SignedInfo>     <ds:SignatureValue>     ifKK73UUbsOxqpsnfGcloErG5Vsrklckv/xpbsMAWDzrTm8ZvWjaLru0d7smEYmKFXdkJ/JayAXW     cM5aAKAwazWM7tj5YYvY3bTFlq4k/qI3GR46Kr5apGKkTEtDR9DkZDJ6N2+/vqOvdIxwefdFvaPs     FzsrZeGkt+IAcKmgCFZ78/2tbfckYd4sFGko0Lw3nIl9/dac03OJUsUVuScsiEVd6f/DjzedHgkk     3DD0xR2HFIY5MQzDdztz1f4PyuGFdXiyauUtm2bF+7XULQ8XwfGd+K0qIMOKBykTQuq0ijL+PpgZ     jRr3G2ylqSsJ1/NIwT6pRG79gJlcw55RB25XzA==     </ds:SignatureValue>     <ds:KeyInfo>     <ds:X509Data>     <ds:X509Certificate>     MIIE0DCCA7igAwIBAgILAQAAAAABMu4tWh8wDQYJKoZIhvcNAQEFBQAwNDELMAkGA1UEBhMCQkUx     FjAUBgNVBAMTDUdvdmVybm1lbnQgQ0ExDTALBgNVBAUTBDIwMTAwHhcNMTExMDEwMTUwMTMyWhcN     MTMwMTEwMTUwMTMyWjCBrTEcMBoGA1UEAxMTQ0JFPTA4MDkzOTQ0MjcsIElBTTELMAkGA1UEBhMC     QkUxDDAKBgNVBAsTA0lBTTEXMBUGA1UECxMOQ0JFPTA4MDkzOTQ0MjcxGTAXBgNVBAsTEEVIRUFM     VEgtUExBVEZPUk0xITAfBgNVBAsTGGVIZWFsdGgtcGxhdGZvcm0gQmVsZ2l1bTEbMBkGA1UEChMS     RmVkZXJhbCBHb3Zlcm5tZW50MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwgdTZNoR     CU7urB0+tdDDlVfrplxwcEwp+QoMJpiznNjMHZLxzwzl6PSMc8V7Gd2OGSGSHZJqrDz0643Djo6o     t59Tai2itHy9ZIQle3wmREi9ek86ousZuP6sZDw019xzztFLCaqO1Jfs28sBAeZovZZou7dDuD7w     86lkxvPssdJWZ0MO9FTwsseRoUowfWUfxp8E+3PpYdEy6BxGo5hh13lm2RphbcW0v0ouvR9yqVRh     cYhonol4Yj7nEm6tTc6NmCf2zEaX+F3e2hbj7bzgWJ1wKuhiMuQItLgN/XKhb6/jy44wjLj6IWIS     DH8LVPYITm+ImidDKI7WcGzJhu0IowIDAQABo4IBZzCCAWMwHwYDVR0jBBgwFoAUQZbOhaflXugW     WT0K8YTd8/K7TokwbgYIKwYBBQUHAQEEYjBgMDYGCCsGAQUFBzAChipodHRwOi8vY2VydHMucGtp     LmJlbGdpdW0uYmUvYmVsZ2l1bXJzMi5jcnQwJgYIKwYBBQUHMAGGGmh0dHA6Ly9vY3NwLnBraS5i     ZWxnaXVtLmJlMAkGA1UdEwQCMAAwRAYDVR0gBD0wOzA5BgdgOAkBAQMDMC4wLAYIKwYBBQUHAgEW     IGh0dHA6Ly9yZXBvc2l0b3J5LnBraS5iZWxnaXVtLmJlMD0GA1UdHwQ2MDQwMqAwoC6GLGh0dHA6     Ly9jcmwucGtpLmJlbGdpdW0uYmUvZ292ZXJubWVudDIwMTAuY3JsMA4GA1UdDwEB/wQEAwIE8DAR     BglghkgBhvhCAQEEBAMCBLAwHQYDVR0OBBYEFGtvDxQis8EQNHkujqvXW0CGhSbnMA0GCSqGSIb3     DQEBBQUAA4IBAQCDfqrhNJeB+tiesyXiAfuIwz2rJiVANb71VptyPGh96qMHBfU/w9fKdN87cF2J     IHg23ll0MEUo7I8oA2F5Dv0Jw/sB7GovOsosC6QcYzEo/D24vSYKI7Clw3SkKPUcqv3u68IPs8wF     L/Nowmxy6HGAvDlt1fQBpwePVKifGOygUcz0KWHMqNV7IJzyXrF2nbvg3TUJKaDR0zV4CjzLpaCI     IY1wY6e2/08mxf/Q5D7YO3sTxmjixkjRqCKXBCJa0CjXxT3/8Pfg5lHGNr7onIL84SMCZREur5I0     3u64HiqHBtSZaDWrw7d4CcjY/NoPfHO8hmAXEBMTm4zEhG4Nw0+2     </ds:X509Certificate>     </ds:X509Data>     </ds:KeyInfo></ds:Signature><Status><StatusCode Value="samlp:Success"></StatusCode></Status><Assertion xmlns="urn:oasis:names:tc:SAML:1.0:assertion" AssertionID="_56927407beba7fd1762d43bb15f71303" IssueInstant="2012-09-20T13:10:43.494Z" Issuer="http://idp.smals-mvm.be/shibboleth" MajorVersion="1" MinorVersion="1"><Conditions NotBefore="2012-09-20T13:10:43.494Z" NotOnOrAfter="2012-09-20T13:15:43.494Z"><AudienceRestrictionCondition><Audience>https://inami-riziv.dokeosnet.com/shibboleth</Audience><Audience>urn:be:fgov:ehealth:trust:partners</Audience></AudienceRestrictionCondition></Conditions><AuthenticationStatement AuthenticationInstant="2012-09-20T13:10:43.494Z" AuthenticationMethod="urn:oasis:names:tc:SAML:1.0:am:unspecified"><Subject><NameIdentifier Format="urn:mace:shibboleth:1.0:nameIdentifier" NameQualifier="http://idp.smals-mvm.be/shibboleth">_99e6f544a77e9b878ff54a1091c2c603</NameIdentifier><SubjectConfirmation><ConfirmationMethod>urn:oasis:names:tc:SAML:1.0:cm:bearer</ConfirmationMethod></SubjectConfirmation></Subject><SubjectLocality IPAddress="193.191.246.82"></SubjectLocality></AuthenticationStatement></Assertion></Response>          2012-09-20 15:14:59 DEBUG OpenSAML.MessageDecoder.SAML1 [17]: extracting issuer from SAML 1.x Response     2012-09-20 15:14:59 DEBUG OpenSAML.MessageDecoder.SAML1 [17]: response from (http://idp.smals-mvm.be/shibboleth)     2012-09-20 15:14:59 DEBUG OpenSAML.MessageDecoder.SAML1 [17]: searching metadata for response issuer...     2012-09-20 15:14:59 DEBUG OpenSAML.SecurityPolicyRule.MessageFlow [17]: evaluating message flow policy (replay checking on, expiration 60)     2012-09-20 15:14:59 ERROR OpenSAML.SecurityPolicyRule.MessageFlow [17]: rejected expired message, timestamp (1348146643), oldest allowed (1348146659)     2012-09-20 15:19:53 INFO XMLTooling.StorageService : purged 1 expired record(s) from storage     2012-09-20 15:34:53 INFO XMLTooling.StorageService : purged 1 expired record(s) from storage     2012-09-20 15:42:06 DEBUG Shibboleth.Listener [18]: dispatching message (default::getHeaders::Application)     2012-09-20 15:42:06 DEBUG Shibboleth.Listener [18]: dispatching message (default/Login::run::Shib1SI)     2012-09-20 15:42:06 DEBUG XMLTooling.StorageService [18]: inserted record (9699add17fc90926f21c8fa06efec1e1) in context (RelayState) with expiration (1348149126)     2012-09-20 16:04:53 INFO XMLTooling.StorageService : purged 1 expired record(s) from storage     2012-09-20 16:19:53 INFO XMLTooling.StorageService : purged 2 expired record(s) from storage     2012-09-20 16:20:21 DEBUG Shibboleth.Listener [21]: dispatching message (default::getHeaders::Application)     2012-09-20 16:20:21 DEBUG Shibboleth.Listener [21]: dispatching message (default/Login::run::Shib1SI)     2012-09-20 16:20:21 DEBUG XMLTooling.StorageService [21]: inserted record (5bfae2fab27dfd8026a14e253696bc3a) in context (RelayState) with expiration (1348151421)     2012-09-20 16:34:53 INFO XMLTooling.StorageService : purged 1 expired record(s) from storage     2012-09-20 16:39:19 DEBUG Shibboleth.Listener [22]: dispatching message (default::getHeaders::Application)     2012-09-20 16:39:19 DEBUG Shibboleth.Listener [22]: dispatching message (default/Login::run::Shib1SI)     2012-09-20 16:39:19 DEBUG XMLTooling.StorageService [22]: inserted record (fbf6b65fc660ed134500345faef56f0a) in context (RelayState) with expiration (1348152559)     2012-09-20 16:43:29 INFO Shibboleth.Listener [15]: detected socket closure, shutting down worker thread     2012-09-20 16:49:53 INFO XMLTooling.StorageService : purged 1 expired record(s) from storage     2012-09-20 17:20:55 INFO Shibboleth.Listener [19]: detected socket closure, shutting down worker thread     2012-09-20 17:31:10 INFO Shibboleth.Listener [21]: detected socket closure, shutting down worker thread     2012-09-20 18:21:09 INFO Shibboleth.Listener [18]: detected socket closure, shutting down worker thread     2012-09-20 18:28:29 INFO Shibboleth.Listener [17]: detected socket closure, shutting down worker thread     2012-09-20 18:28:31 INFO Shibboleth.Listener [20]: detected socket closure, shutting down worker thread     2012-09-20 18:48:23 DEBUG Shibboleth.Listener [23]: dispatching message (default::getHeaders::Application)     2012-09-20 18:48:23 DEBUG Shibboleth.Listener [23]: dispatching message (default/Login::run::Shib1SI)     2012-09-20 18:48:23 DEBUG XMLTooling.StorageService [23]: inserted record (0b316ef6e5acf1da562899feb0b84ec1) in context (RelayState) with expiration (1348160303)     2012-09-20 18:52:26 DEBUG Shibboleth.Listener [24]: dispatching message (default::getHeaders::Application)     2012-09-20 18:52:26 DEBUG Shibboleth.Listener [24]: dispatching message (default/Login::run::Shib1SI)     2012-09-20 18:52:26 DEBUG XMLTooling.StorageService [24]: inserted record (b89fbe4deecae876148bd470e7aa6f85) in context (RelayState) with expiration (1348160546)     2012-09-20 18:52:38 DEBUG Shibboleth.Listener [25]: dispatching message (default::getHeaders::Application)     2012-09-20 18:52:38 DEBUG Shibboleth.Listener [25]: dispatching message (default/Login::run::Shib1SI)     2012-09-20 18:52:38 DEBUG XMLTooling.StorageService [25]: inserted record (b76b99286d06dd0ce84da39c9947e344) in context (RelayState) with expiration (1348160558)     2012-09-20 18:53:03 INFO Shibboleth.Listener [16]: detected socket closure, shutting down worker thread     2012-09-20 18:53:27 DEBUG Shibboleth.Listener [26]: dispatching message (default::getHeaders::Application)     2012-09-20 18:53:27 DEBUG Shibboleth.Listener [26]: dispatching message (default/Login::run::Shib1SI)     2012-09-20 18:53:27 DEBUG XMLTooling.StorageService [26]: inserted record (59fc5fa8d1589ffc94077f4e0e079f38) in context (RelayState) with expiration (1348160607)     2012-09-20 19:00:41 DEBUG Shibboleth.Listener [27]: dispatching message (default::getHeaders::Application)     2012-09-20 19:00:41 DEBUG Shibboleth.Listener [27]: dispatching message (default/Login::run::Shib1SI)                                                                                3865,1        99%      **What I understand From error log:** The message is being expired when it reaches to the destination because the message validity is 5 min and i am in timezone 2+. **My Question:** How to set up message validity so that the message will remain valid and do not expire ?


Calculate intervals

How to explicit the intervals between numerical values in a file? (better if an awk one-liner) Input:               A    1-3     B    5-7      Output               A    1,2,3     B    5,6,7      Code I've tried so far:               sed -i 's/-/\t/g' input #splits the digits to separated columns          awk '{print$1"\t"$3-$2+1}' input > output #prints key and interval width      But, thid only allows computing the number of values within the interval. For example, the output will look like:               A    3     B    3


What is difference known_hosts

I have no deep understanding of SSH and I am a bit baffled about the relation between the `/home/XXX/.ssh/known_hosts` and `/etc/ssh/ssh_known_hosts` files. Can someone explain this?


iw not detecting my usb Wifi card

I am using               iw list      command to determine whether my usb Wifi stick is supported by `hostapd` to create a **Wifi hotspot** or not. But `iw` seems not recognizing it. Here is the output of `iwconfig`:-               prakhar@LinuxBox:~$ iwconfig     wlan1     unassociated  Nickname:"<WIFI@REALTEK>"               Mode:Master  Frequency=2.412 GHz  Access Point: 02:11:87:51:17:0E                  Sensitivity:0/0                 Retry:off   RTS thr:off   Fragment thr:off               Power Management:off               Link Quality:0  Signal level:0  Noise level:0               Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0               Tx excessive retries:0  Invalid misc:0   Missed beacon:0          ppp0      no wireless extensions.          eth0      no wireless extensions.          lo        no wireless extensions.          wlan0     IEEE 802.11abg  ESSID:off/any                 Mode:Managed  Access Point: Not-Associated   Tx-Power=15 dBm                  Retry  long limit:7   RTS thr:off   Fragment thr:off               Power Management:off      I believe usb wifi is `wlan1`. Here is the output of `iw`:-               prakhar@LinuxBox:~$ iw dev     phy#0         Interface wlan0             ifindex 3             type managed      `wlan1` is not there. Can anybody please tell me why `wlan1` is not recognized by `iw`? Output of `lsusb`:-               prakhar@LinuxBox:~$ lsusb     Bus 002 Device 003: ID 064e:a110 Suyin Corp. HP Webcam     Bus 002 Device 007: ID 19d2:fff1 ZTE WCDMA Technologies MSM      Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub     Bus 007 Device 003: ID 03f0:171d Hewlett-Packard Bluetooth 2.0 Interface [Broadcom BCM2045]     Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub     Bus 006 Device 002: ID 08ff:2580 AuthenTec, Inc. AES2501 Fingerprint Sensor     Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub     Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub     Bus 001 Device 002: ID 0bda:8179 Realtek Semiconductor Corp.      Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub     Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub     Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub


Replicate a directory and file names n times

I have folder which has some data (files) in that with the name               201311261418          And a file 201311261418.eob      In my scenario I need to replicate this folder and file names n times with the appended numbers of the count. Desired Output, if needed to replicate 10 times:               201311261418 **1**       201311261418 **2**       201311261418 **3**       .       .       .       201311261418 **10**        And for files:               201311261418 **1**.eob       201311261418 **2**.eob       201311261418 **3**.eob       .       .       .       201311261418 **10**.eob        I'm using ksh on AIX.


How to monitor per user disk usage in Linux

I have local disk with 2T capacity attached to a host. Nearly 60 user home directories are stored on this disk. Currently no disk quotas are enabled. I need monitor the disk usage of individual users with the regards to this disk. I have tried `du` and `find` with the `\--max-depth=1` option, but these commands take too long to finish. Is there any way to monitor (using a script) the per user disk usage without affecting the performance of the host?


Line 4: $data: ambiguous redirect when using passwordbox

I want to create a passwordbox using the dialog package.               #!/bin/bash     data=$(tempfile 2>/dev/null)     trap "rm -f $data" 0 1 2 5 15     dialog --title "Password" \     --clear \     --passwordbox "Enter your password" 10 30 2> $data          ret=$?          case $ret in       0)         echo "Password is $(cat $data)";;       1)         echo "Cancel pressed.";;       255)         [ -s $data ] &&  cat $data || echo "ESC pressed.";;     esac      However I get this error when I execute it:               line 4: $data: ambiguous redirect      What's wrong?


Bluejeans on 32bit Scientific Linux

My OS is Scientific Linux 32 bit. I can only find plugins for 64bit. Is there a plugin for 32bit?


Installing acidbase on Debian Wheezy

I'm having issues to install acidbase on Debian Wheezy:               apt-get install -y acidbase      Throws: > Unable to locate package acidbase My `sources.list` looks ok and I've already ran `apt-get update`. Am I doing something wrong? Is there another fork of Acid that works in Wheezy? Or should I update to Squeeze? I can't really find an alternative or solution to this problem. There is this bug ticket which seems to answer why I can't `apt-get` acidbase anymore. Is there a viable alternative or should I just extract it from source?


Can't run put udisks commands in udev scripts

I'm trying to launch a script when a LUKS drive is inserted. So I setup a udev rule: `KERNEL=="sd*3", ACTION=="add", ATTRS{serial}=="XXX", ATTRS{manufacturer}=="XXX", RUN+="/usr/local/bin/syncer-trigger /dev/%k"` The script runs as normal user and calls `xce4-terminal` internally. Then the terminal emulator calls another script to decrypt the drive and mount it (with `udisksctl` command). But `udisksctl` stuck, it seems to be waiting for udev to finish setting up the LUKS drive (The corresponding char device doesn't exist at this moment) So, it formed a classic dead lock. Now how do I run a command `*AFTER*` the drive is settled? P.S If I run xfce4-terminal in background (with nohup) and sleeps in the other script, udev would kill the xfce4-terminal window directly **EDIT** I tried `dbus-triggerd`:               ./dbus-triggerd "type=signal,interface=org.gtk.Private.RemoteVolumeMonitor" -v --shell ./dump.sh      In dump.sh it just `echo "$@"`, I can see output from dbus-triggerd, but I'm seeing empty arguments here The interface is correct, I can confirm that with               dbus-monitor interface=org.gtk.Private.RemoteVolumeMonitor


Brace compression

I love brace expansion (e.g. `rm file.{0..5}`). I find it a lot easier to read than the expanded version. Is there a quick and easy way of doing the opposite? For example given the input `www.example.com www1.example.com www2.example.com` the output would be `www{,1,2}.example.com`.


Write program output to log file containing PID in its name

How can I start a program and write its output to a log file, where the log file contains the PID in its name? I tried               program_a > log_$!       which doesn't work since $! is the PID of the last program and `program_a' has not finished when the log file is created.


how to trap a suspend a resume from a bash script

I have a bash script (on osx) running continuously, it currently traps and handles a terminate like so `trap onshutdown TERM` how can I make trap also handle suspend/resume like `trap onsuspend ?` `trap onresume ?`


Converting documents to text with UTF-8 encoding

unoconv uses LibreOffice to convert any file that LibreOffice can convert. Now I need export to text with the **UTF-8** character encoding. I use the following command:               unoconv -f txt -e FilterOptions=76 Foo.docx      This creates the `Foo.txt` file, but its encoding is **us-ascii** and the characters don't show correctly. If I'm right, the `-e` option sets the export filtering options as the man page mentions. What's wrong with my options? Example of input and output files:   * Infput: foo.odt   * Output: foo.txt


Can readahead-services be safely disabled?

I am just going through the service-list of a **server** (CentOS 5) - the question will probably apply to other RedHat, Fedora, ... versions, too. Note that my servers normally run in runlevel 3 (no GUI server processes started). I stumbled across two services:   * readahead_early   * readhahead_later These two services get their configuration from _/etc/sysconfig/readahead.d_ The purpose of these services seems to be to preload certain files into cache- memory. Browsing through the config-files (left at the default contents) I see mostly X11-related files and some libraries. What is the deeper sense of these processes? AFAIK every file will go into cache-memory after the first read-access. Why should I preload - and why should I preload all these unneeded files? IMHO this is a useless waste of read-bandwidth during start-up of the operating system. **Update** I found that these readaheads will only cache the first inode-entries for the files listed (via the `fstat` system call). So it just speeds up finding these files... **Update 2012-10-02** The question boils down to: Can I safely disable these services on a server, or am I missing something important here? I Updated the header of the question accordingly, since the given answers don`t hit the mark yet.


Can't SSH/FTP into new user account in Ubuntu?

Created new user from shell script using following command:               sudo useradd $1 -p $2 --home /var/www/$1      I'm not able to login to FTP or SSH as that user, do i need to add the user to some group for that?


How does an X86 Linux system maintain the system time, when no NTP etc. is in play?

When an x86 Linux system is powered up and running, how does it keep track of software time? E.g. is it incrementing a software counter based on hardware interrupts from the RTC, or is there some internal timer on the x86 chip, or something else entirely? When I do a cat of /proc/interrupts, interrupt 8 (the RTC interrupt) has only fired once. Also what could be causing the system time to be running faster on some systems, in a fleet of identical deployed hardware?


GNU `tar` runs `stat` on an excluded directory. Is it normal?

I'm running `tar` as **root** like this:               cd /     tar --create                    \         --verify                    \         --exclude-backups           \         --exclude-caches            \         --auto-compress             \         --file /tmp/home.tar.gz     \         --exclude=/home/elena/.gvfs \         home      `tar` outputs:               tar: home/elena/.gvfs: Cannot stat: Permission denied      I would expect the `.gvfs`[1] directory to be ignored completely. Why is GNU `tar` running `stat` over it? As to why I'm using `/home/elena/.gvfs` - an absolute path - to match the `.gvfs` directory, it is because - to my knowledge - there is no other way to select single directories for exclusion without excluding matching subdirectories at any level as well. I've tried putting the `\--exclude` line after `home`, to take possible quirks in different versions of `tar` into account, but that changes nothing. Thanks for your attention. GNU `tar` version: **1.23** -- [1] `~/.gvfs` is a way to access the Gnome Virtual File System I'm skipping it because I know it can't be accessed, and it doesn't make sense to archive it. I still wonder why `tar` doesn't skip it completely.


How to set up interchangeable VM guest/hosts

I'm looking for a way to set up a computer so that the disk is partitioned for multi-booting to two operating systems: Linux and Windows. Whichever one is booted, I want the other to be accessible as a VM guest, ie when booted into Linux, the Windows partition must be bootable as a VM. My preferred Virtualization software is VirtualBox but if there is no way I will look at another option. It doesn't even absolutely have to be the same virtualization software under each operating system. How do I partition the disks? Should I use or should I avoid EFI labels? In what order should I install the operating systems? What boot-loaders should I use and can I get these to be maintained without extra effort. Will the installed virtualization software device drivers and the guest add-on / drivers gracefully step out of the way when the specific operating system is loaded as the host / guest operating system? Is there any specific versions of Windows for which this is impossible/near impossible? For bonus points I'd like to add Solaris and other Linux distributions. P.S. The main reason for this requirement is to be able to run virtualization software under each operating system! Occasionally I want to investigate the differences between virtualization under different host operating systems.


Mount harddrive under different name?

When I plug a external HDD into my Rasberry Pi (running Raspbian) it automatically mounts as               /media/2ad496774-3eb8-47bb-2bf5e-788f8eb89e54      where folder underneath it are then accessible by going               /media/2ad496774-3eb8-47bb-2bf5e-788f8eb89e54/folder/      I'd like to be able to access these folders by going to something like:               /media/storageDrive1/folder/      Is there a way to map the long path name to something shorter/more memorable/easier to work with? I'm new to Linux so I don't understand the concept of mounting things (coming from plug+play windows machines)


Attaching the time-stamp to the name of a log file

I have a Makefile which I invoke using the following command:                   $ make analyze foo=History01      I have the following Makefile and I need to attached the timestamp to the name of the log file:                   analyze:                 cat $(foo) | perl tokenize.pl | flookup spanmorph.fst 2>&1 | tee -a $(foo)TIMESTAMP.log      Instead of TIMESTAMP I need the system timestamp (when the log file is created) with the format yyyyMMddHHmmss I am a Ubuntu user by the way and I am not really experienced with Linux, I would be grateful for any answer. Thanks in advance.


How to execute more than one command in a newly opened terminal?

I have a script that I want to use to open new terminals and type commands in them. A command like               gnome-terminal      opens a new terminal. Also, if I do               gnome-terminal -e myprogram1      it will execute myprogram1 in the newly opened terminal. But what if, after myprogram1 completes, I want to execute myprogram2? I cannot do something like               gnome-terminal -e myprogram2      because it will open a new terminal. Is there a way to specify in the script that I want to execute both `myprogram1` and `myprogram 2` in the same new terminal? Or would I have to create a new script and do something like               gnome-terminal -e scriptToExecuteMyPrograms1And2


kernel source code for beaglebone black

I want to build an Ubuntu kernel from scratch for beaglebone black. I have been searching for where I can download the kernel source code for more than two days but haven't found anything. So, please tell me from where I can get the kernel source code.


Samsung 305u notebook touchpad not working in Linux Mint 15

I just installed Linux Mint 15 Olivia on my Samsung 305u notebook (I had Ubuntu before). The problem is that the touchpad (cursor and clicking) doesn't work, it does nothing. The only way to fix it is to plug an external mouse, which isn't optimal. I already checked the system preferences and the touchpad is enabled.


How to avoid "make" redoing a library

I have a project for school. In the root dir, I have 3 subdirs which all have a makefile (because there will be 3 executable files), and there is 1 lib dir. This dir contains my library source files (`*.c`, `*.h`). I have a makefile in the libdir:               ##                                                                                ## Makefile for corewar in /home/rihan_a/Projets/psu/corewar/lib                                                                                ##                                                                                ## Made by adnan rihan                                                                                ## Login   <rihan_a@epitech.net>                                                                                ##                                                                                ## Started on  Fri Dec  9 09:28:07 2011 adnan rihan                                                                                ## Last update Fri Dec  9 10:45:27 2011 adnan rihan                                                                                ##                                                                                NAME=           libwar          SRC=            explode.c               \                     get.c                   \                     has_char.c              \                     int_to_bigendian.c      \                     my_die.c                \                     my_getnbr_t.c           \                     my_memset.c             \                     my_power_rec.c          \                     my_putstr.c             \                     my_strcat.c             \                     my_strcmp.c             \                     my_strlen.c             \                     my_strncpy.c            \                     my_strndup.c            \                     op.c                    \                     wt_len.c                \                     xmalloc.c          OBJ=            $(SRC:.c=.o)          ARFLAGS=        rcs     CFLAGS=         -Wall          all:            pack          obj_dbg:                     $(CC) -g -c $(SRC)          debug:          obj_dbg all          pack:           $(OBJ)                     $(AR) $(ARFLAGS) $(NAME).a $(OBJ)          clean:                     $(RM) $(OBJ)          fclean:         clean                     $(RM) $(NAME).a      My problem is when I do `make`, everything is ok, and for `make debug` also. But when I do `make debug` a second time, it doesn't remake the `.o`, but does the `ar rcs` everytime. I want to avoid it, because when I request `make -C ../lib` for the other makefiles, they all relink because the lib changed (because `ar` was run each time).


Set some firewall ports to only accept local network connections?

Basic firewall question: How do I set up the firewall on a system in a LAN so that some ports are only open to connections from the local area network, and not from the outside world? For instance, I have a box running Scientific Linux 6.1 (a RHEL based distro), and I want its SSH server to only accept connections from localhost or LAN? Thanks.


How can I delete all files in a folder that haven't been accessed in a certain amount of time?

I'd like to run a nightly cron job that deletes all the files in a folder that haven't been accessed in a week or more. What is the most efficient way to do this in bash?


Low sound volume on Lenovo laptop under Fedora

I'm having trouble hearing anything at all under Fedora 16 on this Lenovo T520. Everything in alsamixer is at 100% (both pulseaudio and card). I installed Windows 7 on the laptop to check if the same issue is present on windows, and it's not. Does anyone know how to deal with this? I've been annoyed by this problem for almost a year, but now with the heat wave on the east coast, I have to run my AC at full blast and I can't hear anything with the AC on. Under audacity I can get definitely get high volume out of my speakers by just mixing up the sound volume. Is there a way to run a software amplifier between PulseAudio and alsa to crank up the volume or is there something that can be done in alsactl.conf to get the card to normalize the sound volume scale at a lower point? Since this laptop is quite common among Linux users, I would hope that someone has come up with a solution.


What do these commands (`tar`) actually do? Is there a better way?

I am going over some documentation pertaining to creating a distro repo. However, I cannot understand exactly what these commands perform:               # cd /mnt/     # ls     centos-1  centos-2  centos-3     # for i in 1 2 3      > do     > cd /mnt/centos-$i     > tar cpf - . | ( cd /var/ftp/ks/centos/; tar xpf - )     > done      My (obviously incorrect) rundown of it is: Loop through every mounted CD (`/mnt/centos-<index>`) and create a `tar` of the folder preserving the permissions. Then, extract that `tar` file to another folder, again, preserving permissions. If that is the case, why do it like this? Is there really not a better way? Or perhaps I'm missing the whole idea.


Why are the first 1024 ports restricted to the root user only?

This is more idle curiosity than anything else. A friend of mine asked me 'which port range is it that only root can use under Linux?' I told him 0-1024 were restricted. Then he asked my why it was so and... I was at a loss. No idea whatsoever. Is there a reason why these ports are restricted and 1025-65535 are not? Most major network services (HTTP, FTP, SSH, Telnet, HTTPS, POP, SMTP, etc) are in this range so possible answers I thought of:   * An untrusted user could run a program that listened on these ports for logon details.   * An untrusted user could run an unauthorized server application. Can anyone shed light here?


awk: forcing a return status?

This is a followup to my earlier question. I am validating the number of fields in /etc/passwd using this handy snippit. In the following example, the users 'fieldcount1' and 'fieldcount2' have the wrong number of fields:               $ awk -F: ' NF!=7 {print}' /etc/passwd     fieldcount1:x:1000:100:fieldcount1:/home/fieldcount1:/bin/bash::::     fieldcount2:blah::blah:1002:100:fieldcount2:/home/fieldcount2:/bin/bash:     $ echo $?     0      As you'll notice, awk will exit with an return status of 0. From it's standpoint, there are no problems here. I would like to incorporate this awk statement into a shell script. I would like to print all lines which are error, and set the return code to be 1 (error). I can try to force a particular exit status, but then awk only prints a single line:               $ awk -F: ' NF!=7 {print ; exit 1}' /etc/passwd     fieldcount1:x:1000:100:fieldcount1:/home/fieldcount1:/bin/bash::::     $ echo $?     1      Can I force awk to exit with a return status of '1', and print all lines which match?


wget batch linux file

I am trying to download images from a manufacturer's site using `wget`. When I run the command from the shell it works fine. But when I run it from a file I am getting a placeholder file. Here is the command:               wget --wait=2 --output-document=1000.jpg 'http://distributorcentral.com/resources/productimage.cfm?prod=8cb7afa6-73bf-4f9f-b251-38dc652779c9&size=large'      Here is what it looks like in a file:               wget --wait=5 --output-document=1101.jpg 'http://distributorcentral.com/resources/productimage.cfm?prod=4d41b2ff-90a4-40c1-9159-2780cd642244&size=large'     wget --wait=5 --output-document=1102.jpg 'http://distributorcentral.com/resources/productimage.cfm?prod=5e88f32e-48f2-40db-bdbd-53624448392d&size=large'     wget --wait=5 --output-document=1103.jpg 'http://distributorcentral.com/resources/productimage.cfm?prod=59292a17-ae6f-49df-a028-0a9f71686f80&size=large'      I can't figure out why it isn't working as a batch shell file.


Bash: `-su: $*: unbound variable` with `set -u`

This is a FreeBSD 7.x system running GNU bash version 4.0. In Bash, the `set -u` option can force a shell to print an error if it encounters an unset variable, like this:               $ set -u     $ echo $THISISUNSET     -su: THISISUNSET: unbound variable     $ echo $?     1      However, I am also encountering this same error for $*:               $ echo $*     -su: $*: unbound variable     $ echo $?     1     $ echo $@     -su: $@: unbound variable      The Bash Manual 4.3.1 The Set Builtin specifically says that `set -u` ignores $* and $@: > -u Treat unset variables and parameters other than the special parameters > ‘@’ or ‘*’ as an error when performing parameter expansion. An error message > will be written to the standard error, and a non-interactive shell will > exit. How can I fix this?


Apache config in sites-enabled not being detected?

I'm trying to set up my new redhat server and I have apache config in my /etc/httpd/sites-enabled folder, but when I run `/usr/sbin/httpd -S` as root to check the syntax, it just returns:                   [root@511863-web3 sites-enabled]# /usr/sbin/httpd -S         VirtualHost configuration:         Syntax OK      So it doesn't look like it's detecting it. Since it's a new server, am I missing some sort of configuration? I restarted httpd, but my site still doesn't work.


How to stop application windows from shifting to workspace one after attaching dual monitor?

I'm using Unity on Ubuntu 13.04. I use `arandr` to configure my dual monitor setup. The problem is as soon as I apply my settings, the display resets and all application windows, which I had tediously arranged along my four workspaces shift to workspace one. How can I make the windows stay where they are?


How do I sftp to a server if the username contains @ symbol

I have to sftp to a server to a specific port but the username contains the @ symbol. suppose the user is "user@domain.com" and the ftp server is just "domain.com" I will end with               sftp -oPort:8777 user@domain.com@domain.com      what will obviously not work, as I have tested. What kind of amateur creates a username with @? Ok, my boss did. How do I solve that?


Use of ! in VIM

I have seen that sometimes `:q` works but sometimes we have to use `:q!`. This is the case for many commands. I was wondering what is the general use of `!` in `vim` and when to use it. I tried to google this, but it seems the search is omitting the exclamation mark.


Ubuntu is running slow

I'm not sure since when it became slow, but I think after I did `apt-get update`. Here's my machine details: ![enter image description here](http://i.stack.imgur.com/mkWFj.png) I can see from the system monitor that the CPU is working hard specially when I run Chrome or Firefox: ![enter image description here](http://i.stack.imgur.com/ks3NM.png) here's my TOP snapshot, I was watching youtube on chrome. sometimes the Xorg will takes 90% of the CPU. ![enter image description here](http://i.stack.imgur.com/PKwWr.png)


Linux CentOS 5.5 not connecting to Network

I have installed Linux CentOS 5.5. During installation, I configured the LAN driver and gave it an IP address. After installation, I checked the network connection but it shows "not connected". I then tried to enable dhcp (from broadband) but `system-config-network` shows               Determining IP information for eth0... failed; no link present. Check cable"       I checked the cable and everything is OK with it. I then added               check_link_down(){     return 1;     }      to `/etc/sysconfig/network-scripts/ifcfg-eth0` but `system-config-network` still shows the same message. I have checked `service NetworkManager status` and `service network status` all is fine but I still can't connect to the network.


Strategies for userland file encryption without FDE

There are cryptography experts that are concerned over using Full Disk Encryption (FDE) on *nix platforms due to attack surface exposed due to reverse engineering of encryption algorithm when looking at common *nix OS files of known size and checksum. I have not yet found any obfuscation techniques to get around this attack surface and thus am considering dropping FDE as a strategy. I am presently researching just using userland level encryption like PEFS (FreeBSD) or EncFS (*nix). Assuming that there is no good solution around FDE size/checksum attack surface, what strategies for building up systems should be put in place to ensure that critical security artifacts are kept safe if a hacker gets hands onto the physical hardware when it is shut down or locked?


Wireless Ad Hoc NAT

I got "OURLiNK 802.11n" mini USB wifi adapter for my Raspberry Pi, but I also would like to use it w/ my Scientific Linux 6.1               $ cat /etc/redhat-release      Scientific Linux release 6.1 (Carbon)     $       when I insert dongle into USB port, I'm getting following in my log               Oct 18 11:16:28 X kernel: usb 1-4: new high speed USB device number 5 using ehci_hcd     Oct 18 11:16:28 X kernel: usb 1-4: New USB device found, idVendor=0bda, idProduct=8176     Oct 18 11:16:28 X kernel: usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3     Oct 18 11:16:28 X kernel: usb 1-4: Product: 802.11n WLAN Adapter     Oct 18 11:16:28 X kernel: usb 1-4: Manufacturer: Realtek     Oct 18 11:16:28 X kernel: usb 1-4: SerialNumber: 00e04c000001     Oct 18 11:16:28 X kernel: usb 1-4: configuration #1 chosen from 1 choice      I added a connection through: System->Preferences->Network Connections->Wireless->Add using Ad-hoc mode, I even did `service network restart`, yet I still don't see SSID from another wireless device. I'd like to be able to configure NATing on my Linux so that other devices can use that connection to connect to Internet.


mlbackup / rsync / hard links data size

I am new to mlbackup/rsync and the concept of hard links, so I am a little confused after creating a backup data set via mlbackup. So here's the scenario: I am backing up "folder A" to "folder B". Inside "folder A", I have file "X", "Y", and "Z"; each file is 5mb therefore "folder A" is 15mb in size. I run mlbackup and the files are backed up to "folder B" for the first time. Now "folder A" and "folder B" are 15mb each. Without any changes to "folder A", I run mlbackup again. A new "folder B" backup is created. It reads 15mb again (in Finder, Mac OSX 10.8). Now I know the new "folder B" is just hard links to the original data, so I go to terminal and did a `du -sh folder B` and it reads only a couple of kb. This is to be expected, right? So my first "folder B" is 15mb, and second "folder B" is a few kb. Now my question is this -- in Finder, both "folder B" are 15mb each. So say if I wanted my "folder B" backups to be located in an external drive that only has 16mb of free space, what will happen? According to Finder, the total of the two "folder B" will be 30mb. But we all know in reality it is only 15mb (from first "folder B") plus a few more kbs (second "folder B")? I know this is a pretty confusing question, but I really want to understand how it all works. Please let me know if there is anything I can clarify further.


What is the best way to emulate keybord shortcuts with touchpad gestures?

On my lenovo 0410 I am using an ubuntu derivate called elementary OS. You can press super+W to show your current windows like on most other ubuntu derivates. I would like to use this feature with a specific touchpad gesture, e.g. three finger swipe to the top. Is that possible? And if it is, what is the most resource-efficient and most reliable way to do it?


Debian's no more needed packages

I'm using Crunchbang Linux on my laptop. I noticed a strange behavior of the package manager: when installing a package from the official repo (`libdirectfb-extra` in my case) `apt` told me that a bunch of packages were no more needed (including `xflux`, `obconf`, `obmenu` and other applications that I use frequently). I proceeded to the installation of the package, but then `apt` removed all the packages that it said to be not needed. What does it mean? Why does it happen? I don't update the system very frequently, is that the cause?


What is the minimum round robin scheduing interval supported by Linux?

For some reason, I want to have 10 processes share the same CPU core by affinity. As you know, to achieve CPU sharing between processes, we can exploit the Linux round robin (RR) scheduling policy. For Linux kernel 3.9 and later, the RR scheduling interval can be set by changing the file `/proc/sys/kernle/sched_rr_timeslice_ms`. The default RR scheduling interval is 100ms. My questions are:   1. I want the RR scheduling interval to be 100µs, i.e., one process is executed for a period of 100µs, then another process is executed. But I failed to set the `/proc/sys/kernle/sched_rr_timeslice_ms` with a value of less than 1ms. I wonder if the minimum RR scheduling interval supported by current Linux kernel is 1ms.   2. Is anybody know what minimum RR scheduling interval is supported by Windriver Linux? As Windriver Linux is widely used for embedded system which requires good OS real-time performance.   3. I wonder if I can have all the 10 processes to be executed at least once within 1ms by using mutex. That is, one process executes for 100µs, then unlock the mutex so that another process can lock and execute. Does this mechanism work?   4. If the above mentioned method doesn't work, what if the 10 processes are changed to 10 threads. Is there any high efficiency thread switch mechanism avaliable?


Export terminal display to PDF

I want to include the display of my terminal in a beamer presentation. Simply taking a screenshot, however, produces a fairly low-resolution png that looks poor in the presentation. I would like it if I could somehow create a PDF of the terminal display, so the image looks crisp and clean in the presentation. As a note, I'm viewing a file in VIM, which applies very nice syntax highlighting that I'd like to preserve. This is why I don't just copy and paste the text to a word processor and save as PDF. Is there any way to achieve what I want?


iptables beginner question about ACCEPT

I'm just reading up on iptables, finally. I'm a little confused because the input chain from the filter table (as installed, fedora 17), looks like this:               target     prot opt source               destination              ACCEPT     all  --  anywhere             anywhere             state RELATED,ESTABLISHED     ACCEPT     icmp --  anywhere             anywhere                 ACCEPT     all  --  anywhere             anywhere                 ACCEPT     udp  --  anywhere             224.0.0.251          state NEW udp dpt:mdns     REJECT     all  --  anywhere             anywhere             reject-with icmp-host-prohibited      From what I've been reading, the third rule should just accept anything, but this is not the case (I have to disable iptables to allow access to sshd or an https server). All other chains for all other tables are policy ACCEPT, with no rules, except filter FORWARD which REJECTs everything. So what does ACCEPT really do? [EDIT] Added by serge's request (`iptables -v -L`):               Chain INPUT (policy ACCEPT 0 packets, 0 bytes)      pkts bytes target     prot opt in     out     source               destination              36625   38M ACCEPT     all  --  any    any     anywhere             anywhere             state RELATED,ESTABLISHED         0     0 ACCEPT     icmp --  any    any     anywhere             anywhere                     1    60 ACCEPT     all  --  lo     any     anywhere             anywhere                     0     0 ACCEPT     udp  --  any    any     anywhere             224.0.0.251          state NEW udp dpt:mdns       534 73926 REJECT     all  --  any    any     anywhere             anywhere             reject-with icmp-host-prohibited          Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)      pkts bytes target     prot opt in     out     source               destination                  0     0 REJECT     all  --  any    any     anywhere             anywhere             reject-with icmp-host-prohibited          Chain OUTPUT (policy ACCEPT 31484 packets, 3973K bytes)      pkts bytes target     prot opt in     out     source               destination      So this implies to me that third rule actually only applies to the loopback interface? [yep]


Partition table not recognized by Linux kernel

I experience relatively often that the partition table of a USB stick or SD card is suddenly no longer recognized by the kernel while (g)parted and fdisk still see it, as do other systems. I can even instruct gparted to do a fsck on one of the partitions but it fails of course because the device files let's say /dev/sdbX don't exist. I'll attach the dmesg output:               [ 8771.136129] usb 1-5: new high-speed USB device number 4 using ehci_hcd     [ 8771.330322] Initializing USB Mass Storage driver...     [ 8771.330766] scsi4 : usb-storage 1-5:1.0     [ 8771.331108] usbcore: registered new interface driver usb-storage     [ 8771.331118] USB Mass Storage support registered.     [ 8772.329734] scsi 4:0:0:0: Direct-Access     Generic  STORAGE DEVICE   0207 PQ: 0 ANSI: 0     [ 8772.334359] sd 4:0:0:0: Attached scsi generic sg1 type 0     [ 8772.619619] sd 4:0:0:0: [sdb] 31586304 512-byte logical blocks: (16.1 GB/15.0 GiB)     [ 8772.620955] sd 4:0:0:0: [sdb] Write Protect is off     [ 8772.620971] sd 4:0:0:0: [sdb] Mode Sense: 0b 00 00 08     [ 8772.622303] sd 4:0:0:0: [sdb] No Caching mode page present     [ 8772.622317] sd 4:0:0:0: [sdb] Assuming drive cache: write through     [ 8772.629970] sd 4:0:0:0: [sdb] No Caching mode page present     [ 8772.629992] sd 4:0:0:0: [sdb] Assuming drive cache: write through     [ 8775.030231] sd 4:0:0:0: [sdb] Unhandled sense code     [ 8775.030240] sd 4:0:0:0: [sdb]  Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE     [ 8775.030249] sd 4:0:0:0: [sdb]  Sense Key : Medium Error [current]      [ 8775.030259] sd 4:0:0:0: [sdb]  Add. Sense: Data phase CRC error detected     [ 8775.030271] sd 4:0:0:0: [sdb] CDB: Read(10): 28 00 00 00 00 00 00 00 08 00     [ 8775.030291] end_request: I/O error, dev sdb, sector 0     [ 8775.030300] quiet_error: 30 callbacks suppressed     [ 8775.030306] Buffer I/O error on device sdb, logical block 0     [ 8775.033781] ldm_validate_partition_table(): Disk read failed.     [ 8775.033813] Dev sdb: unable to read RDB block 0     [ 8775.037147]  sdb: unable to read partition table     [ 8775.047170] sd 4:0:0:0: [sdb] No Caching mode page present     [ 8775.047185] sd 4:0:0:0: [sdb] Assuming drive cache: write through     [ 8775.047196] sd 4:0:0:0: [sdb] Attached SCSI removable disk      Here, on the other hand, is what parted has to say about the same disk, at the same time:               (parted) print                                                                 Model: Generic STORAGE DEVICE (scsi)     Disk /dev/sdb: 16.2GB     Sector size (logical/physical): 512B/512B     Partition Table: msdos          Number  Start   End     Size    Type     File system  Flags      1      4194kB  62.9MB  58.7MB  primary  fat16        lba      2      62.9MB  16.2GB  16.1GB  primary  ext4      It's not only parted, even the older fdisk has no trouble with that partition table:               Command (m for help): p          Disk /dev/sdb: 16.2 GB, 16172187648 bytes     64 heads, 32 sectors/track, 15423 cylinders, total 31586304 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x000dbfc6             Device Boot      Start         End      Blocks   Id  System     /dev/sdb1            8192      122879       57344    c  W95 FAT32 (LBA)     /dev/sdb2          122880    31586303    15731712   83  Linux      I'm really clueless. It would be easy to say the partition table is corrupted but then why can gparted still read it without complaints (and there are none) or how can I reconstruct the partition table from what (g)parted miraculously found out?


Alternative to Miro Video Converter for Linux?

Back in the Windows/Mac days, I used the wonderfully easy to use Miro Video Converter to convert videos I have into either the more open and Freerer Theora or WebM formats. Two problems: (1) No Linux binary that I could use. (2) No advanced options that let me control the conversion process, such as embedding subtitles. Is there an alternative FLOSS on Linux that does this? Thanks!


Fedora 17/18 on ARM architecture

Well I am fully aware of the packages available but sadly none of them provide what I need. Now to get things clear, I found a Korean company (Odroid x as far as I remember) which makes single board computers which run either Android or Ubuntu; however, I'd like to get Fedora running on one. It has 2 GB RAM and an 1.6 GHz quad-core CPU which should be enough to run GNOME. How on Earth do I do that!? I know Fedora 17 offers ARM support, but that only offers Xfce. I can most probably install GNOME desktop over it but for some reason I don't feel very optimistic about that solution. Am I at least on the right track? And if not; suggestions?


Is dpkg available for Cygwin?

I don't use Windows all that often, but I've found my self in a position where I'm stuck in front of one quite a bit temporarily. So I've been investigating Cygwin. My question is dpkg available for Cygwin? My Google searches seem to show that it was at least at one point, but I can't find a package. If it isn't availiable as a package does anyone have any tips/experience getting it running? I'm not trying to create a Cygwin Debian port (although it sounds as if this was attempted in the past). At the minimum, I'd simply like to be able to build Debian source packages while on the Windows machine. (Yes, I know I could ssh over to a Debian box.) Cygwin is apparently on topic here, but it might not be the best place for this question. I hope this is ok...


How to make functions created in a bash script persist like those in .bashrc?

My .bashrc was getting a little long, so I decided to break it up into smaller files according to topic and then call these files from within .bashrc as so               #my long .bashrc file     bash .topic1rc     bash .topic2rc      but, within one of these sub-scripts, I had created a bash function. Unfortunately it is no longer available to me as it was before I broke everything into chunks. How do a break my .bashrc file into chunks, but retain access to the variables and functions that I create?


Set shell environment variable without using a shell builtin command

I am using a program that takes a "command" as an argument and then adds some helpful wraping around it. Presumably in an effort to be helpful it appears to checks to make sure the command "exists". As far as I can tell this check is something like `which`. In my bash shell commands like `set` and `export` are built in and therefore `which` doesn't return anything. Is there a way to set an environment variable without using a shell builtin. My thought was to do something like define `set.sh` to be               #! /bin/bash     export $1      but this seems mildly crazy


Using a lua rock installed with luarocks

I wanted to install `luasql.mysql` with `luarocks`, and I've ran into a problem. Even though the packages were installed providing `mysql.h`, luarocks couldn't find it. I solved it eventually:               luarocks install luasql-mysql MYSQL_INCDIR=/usr/include/mysql      Now, all prerequisites should be met, to use `luasql.mysql`, but I'm getting an error:               > require "luasql.mysql"     stdin:1: module 'luasql.mysql' not found:         no field package.preload['luasql.mysql']         no file '/usr/local/share/lua/5.2/luasql/mysql.lua'         no file '/usr/local/share/lua/5.2/luasql/mysql/init.lua'         no file '/usr/local/lib/lua/5.2/luasql/mysql.lua'         no file '/usr/local/lib/lua/5.2/luasql/mysql/init.lua'         no file './luasql/mysql.lua'         no file '/usr/share/lua/5.2/luasql/mysql.lua'         no file '/usr/share/lua/5.2/luasql/mysql/init.lua'         no file './luasql/mysql.lua'         no file '/usr/local/lib/lua/5.2/luasql/mysql.so'         no file '/usr/lib/x86_64-linux-gnu/lua/5.2/luasql/mysql.so'         no file '/usr/lib/lua/5.2/luasql/mysql.so'         no file '/usr/local/lib/lua/5.2/loadall.so'         no file './luasql/mysql.so'         no file '/usr/local/lib/lua/5.2/luasql.so'         no file '/usr/lib/x86_64-linux-gnu/lua/5.2/luasql.so'         no file '/usr/lib/lua/5.2/luasql.so'         no file '/usr/local/lib/lua/5.2/loadall.so'         no file './luasql.so'     stack traceback:         [C]: in function 'require'         stdin:1: in main chunk         [C]: in ?      Now, in that list, there is no `/usr/local/lib/luarocks/rocks/` or anything like that. Also, I can't seem to find a `mysql.lua`. According to luarocks, `luasql-mysql` is installed correctly, though:               % luarocks list          Installed rocks:     ----------------          luasql-mysql        2.3.0-1 (installed) - /usr/local/lib/luarocks/rocks      I believe I did something wrong, but I have no idea where. Also, it seems Lua is quite obscure when it comes to installing additional packages...


How do I resize the active window to 50% with wmctrl?

I would like to resize the window to the left half of the screen. A solution to achieve that would be to use wmctrl and keybind the right command to a keyboard shortcut. But the manpage only shows how to resize to a certain height and width, for example:               wmctrl -r :ACTIVE: -b remove,maximized_vert,maximized_horz && wmctrl -r :ACTIVE: -e 0,0,0,800,1040      that moves the window to the upper left corner and resizes to 800x1040 px. _But strangely only the first time. If you execute the same command again, in moves to the **very** top right of the screen, ignoring the top-toolbar._ Also it would be nice, to have that comand with height 100% and width 50% instead the absolute values.


How to send many commands to shell and wait for the command behind ends

Hello I have around 20 commands and I have to send all of this to Unix shell, and copy the result, but I don't know how to do it. I am not sure about what shell I have, because it is a small program connected to Mobile Network Managment, and with this small program we have access to send comands by line and recive the results by scream, for that reason I cannot use scripts for sending the commmands. **Command 1** - Connect with a server. Wait until command 1 finish **Command 2** - Update all the information from server 1 finish Wait. **Command 3**. Get some parameter. ... and more such commands. I **tryed** with `cmd1 | cmd2 | cmd3` **and** `cmd1 & cmd2 & cmd3` and `cmd1;cmd2` The problem is with `cmd1` its connected to a RNC(Network element) and takes aroud 15 seconds, after that `cmd2` has sense. but just work for the first cmd. Any clue, how to run this?


How do I cycle through panes inside a window in tmux like in screen?

I thought Tmux - move window to pane was the same question but it doesn't seem to be. Coming from using GNU screen regularly, I'm looking for tmux to do the same things. On of the things I do regularly is have a couple of different windows open, one with some code open in vim, and a couple of terminals windows open to test the code, and sometimes a window or two for various other things. I split the screen vertically and will often have the vim window in the top pane and then one of the other windows in the bottom bane. The main commands I then use are `Ctrl``a`,`Tab` to rotate among the panes and `Ctrl``a`,`n` to rotate between the windows within a pane. For instance, with vim in the top pane, I switch to the bottom pane and then rotate through the other terminals, doing whatever I need. The screen stays split the whole time. The problem is I can't find comparable capability to screen's `Ctrl``a`,`n` in tmux. Switching windows seems to not work inside a pane, but jumps entirely. If the screen is split the only two options seem to be to jump to some window that isn't split and then split it or to do a sub-split of a pane. Neither are what I was looking for. Suggestions (besides just sticking with screen)?


Chkrootkit warning about infected port 600

I run the Tiger Automatic Auditor on my Debian Linux system, and recently got emailed the following:               # Running chkrootkit (/usr/sbin/chkrootkit) to perform further checks...     OLD: --ALERT-- [rootkit005a] Chkrootkit has found a file which seems to be infected because of a rootkit     OLD: --ALERT-- [rootkit009a] A rootkit seems to be installed in the system     OLD: INFECTED (PORTS: 600)      I immediately ran chkrootkit manually, and didn't see any warnings or unusual results. How can I tell whether this was a false positive?


How to map a console keyboard layout to a X keyboard layout in Linux

In my distribution (Slackware 13.37), the console keyboard layout is chosen among some of those available in `/usr/share/kbd/keymaps` ' sub directories, coming from the kbd package. Under X instead the keyboard layout is chosen in a "layout" list included in the file `/etc/X11/xkb/rules/evdev.lst`. Does anybody knows a way to, given some console keyboard layout, map it to an X keyboard layout, in order to set up accordingly the "XkbLayout" option in an X configuration file? I am specially interested in knowing the way other distributions than Slackware deal with this for initial configuration.


Mystery of binary files

This is about files straight from the compiler, say g++, and the `-o` (outfile) flag. If they are binary, shouldn't they just be a bunch of 0's and 1's? When you cat them, you get unintelligible output but also intact words. If you file them, you get the answer immediately - there seem to be no computation. Do the binary files in fact have headers with this kind of information? I thought a binary executable was just the program just compiled, only in the form of machine instructions that your CPU can instantly and unambiguously understand. If so, isn't that instruction set just bit patterns? But then, what's all the other stuff in the binaries? How do you display the bits? Also, if you somehow get hold of the manual of your processor, could you write a binary manually, one machine instruction at a time? That would be terribly ineffective, but **very** fascinating if you got it to work even for a "Hello World!" demo.


GNOME: Use WinKey (Super_L) as a main menu toggle

I know how to set `Super_L` (WinKey) button to open the Menu.               gconftool-2 --set /apps/metacity/global_keybindings/panel_main_menu --type string "Super_L"      Currently, in order to close that menu, I am having to mouse click outside the menu area. I need to use the `Super_L` as a toggle button--pressing one time would open and pressing second time would close. So what I need now is to be able to close it when pressing it second time?


Don't require root to add printers

When a user wants to add a new printer it's asking for a root password. I have an LTSP environment and the system is asking for a root password all the time; it's not asking even for a sudo'ed user's password. Is there any way to allow a certain user to add/edit/remove printers and not to have any other special access?


GIMP 2.8: how to save file using detected image format

I found GIMP 2.8 has changed quite a lot, you can't just open the file, modify and save it with `CTRL` + `s` anymore, instead, you must use export function, which is `CTRL` + `Shift` + `e`, and select a image format, is there anyway of doing the old stuff ?


Using iscan (GIMP plugin) from the command line

I'm something called `iscan` to use my scanner. However to use it, I need to go through a GUI to get my scanned pdf. When I run `iscan --help` (because just `iscan` launches the GUI), it tells me that it is a GIMP plugin and requires to have GIMP launched:               iscan is a GIMP plug-in and must be run by GIMP to be used      Is there a way to use GIMP plugins like this from the command line? I would MUCH rather run a simple command to output whatever is in my scanner to a pdf somewhere.


Is there a way to place a comment in a file which vim will process in order to set filetype?

For example, if I want to have a file with the name `gitconfig` (no leading `.`) be recognised by vim as being of `filetype=gitconfig`, is there a means of indicating this in a comment or something similar within the file itself? Note, I want this to work across systems, so modifying vim's startup files is not preferred.


linux patches related to time measurement accuracy?

Is there a set of patches around for linux kernel that address accuracy of (system, rather than user) process time? i've heard about RTLinux, but i don't really need the actual real-time scheduling constraints, i just need that the time measurements are accurate. If the process switch slipped by a couple milliseconds, so be it, but i need an accurate measurement of the actual time spent in the current process


ssh-keygen -y error: load failed

I want to check correctness of a pair of `RSA` key. As far as I know, I can crate a public key from a private key by using the below command, and then compare two public key if are equal or not: `ssh-keygen -y -f <PRIVATE-KEY>` The question is that, why when I use the above command, It can't load the key? ![enter image description here](http://i.stack.imgur.com/EEl7w.jpg) Is there any other way to check correctness of a pair of RSA keys? * * * FYI :               root@bt:~# ssh-keygen -y -v -f /root/Desktop/PROIVA      debug1: PEM_read_PrivateKey failed     debug1: read PEM private key done: type <unknown>     Enter passphrase:      debug1: PEM_read_PrivateKey failed     debug1: read PEM private key done: type <unknown>     load failed     root@bt:~# file /root/Desktop/PROIVA      /root/Desktop/PROIVA: data     root@bt:~#       * * *               root@bt:~# openssl rsa -in /root/Desktop/PROIVA -inform der -noout -text     unable to load Private Key     1819:error:0D094065:asn1 encoding routines:d2i_ASN1_SET:bad class:a_set.c:190:     1819:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag:tasn_dec.c:1316:     1819:error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error:tasn_dec.c:380:Type=RSA     1819:error:0D09A00D:asn1 encoding routines:d2i_PrivateKey:ASN1 lib:d2i_pr.c:99:     root@bt:~#      root@bt:~#      root@bt:~# openssl rsa -in /root/Desktop/PROIVA -inform DER -out /root/Desktop/PROIVA.pem -outform PEM     unable to load Private Key     1820:error:0D094065:asn1 encoding routines:d2i_ASN1_SET:bad class:a_set.c:190:     1820:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag:tasn_dec.c:1316:     1820:error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error:tasn_dec.c:380:Type=RSA     1820:error:0D09A00D:asn1 encoding routines:d2i_PrivateKey:ASN1 lib:d2i_pr.c:99:     root@bt:~#      root@bt:~#       But the below command creates `Proiva.der` on the desktop:               root@bt:~# openssl base64 -in /root/Desktop/PROIVA -out /root/Desktop/Proiva.der     root@bt:~#       * * *               root@bt:~# openssl rsa -in /root/Desktop/Proiva.der -inform der -noout -text     unable to load Private Key     1826:error:0D094065:asn1 encoding routines:d2i_ASN1_SET:bad class:a_set.c:190:     1826:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag:tasn_dec.c:1316:     1826:error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error:tasn_dec.c:380:Type=RSA     1826:error:0D09A00D:asn1 encoding routines:d2i_PrivateKey:ASN1 lib:d2i_pr.c:99:     root@bt:~#       * * * This is a base64 view of my public/private files : **Private :**               m37jkNportKxhOtP84bKXPY5JR16dzt2ZgdnGNrx7Q9u31jkn2lUPxDwdjlTzU8sIWUxHP4inC56     sxlbv9oeQQxhzF0CxclBuiR1kkfzRVMoEiXmacbozqM4+oh/+Bd1+jok25BQPnXkOq5tu/SIclkv     9zL20p+YsqL0esPUJvcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA     AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA     AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAASN5x6F8svVvzGBu70a4MeMTqeX128LoJhMRDUx2     Z0uWgc0jEsXr2fSpgLL4UU4+Cet0ksfykyLe18+UsYIL2WrSvEIQRspgq3u5sYGSyn4tWs701V76     cOR/j//O1rCPp/ose/2L+muW28D8wMwq2jIZog7HKMGzgj1KiLuNhICBzXfh3UqoiOArZWVY48Vm     /ZAp9+YhsiAKQ8Z0mpL9mxCmdD24HxGiGJ7uZW4a8X4bRPj0SZYlCbiL3X8Glq3ImcG8xSo7+PaX     CcuTQAeER/EtIdnTkES5/ge1YEg3OjTAG6zeVmV3L/901G0g5bWK3ynJBB+gWuskNnD7K7+SVg8M     n0K2z3FPB0ZjMjiltWjARuztF6wWPzWiODzNih4eOoWfOnNnJTQqAwluHbd2AmM2d3y6UIjx8e5V     qwoCk6ZxrPAZu/Ke8Vev2bYO0Obm5UWZUv1EaeTw+uaQFMafwZi+25f43UgAY3NhcCyOgHh/bqhO     cwDMR9wicMX0rmQtRwmMjZSf0OE0r1NE058hACna/y1zKu5+lEw2pHi1i6SuiE/FebJ4yCTd7BqN     NDbDk5C6aE/J9R9X57as5YcFXwM=      **Public :**               m37jkNportKxhOtP84bKXPY5JR16dzt2ZgdnGNrx7Q9u31jkn2lUPxDwdjlTzU8sIWUxHP4inC56     sxlbv9oeQQxhzF0CxclBuiR1kkfzRVMoEiXmacbozqM4+oh/+Bd1+jok25BQPnXkOq5tu/SIclkv     9zL20p+YsqL0esPUJvcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA     AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA     AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQ==      Note that I generate the above base64 view of my files, via this online tool.


safely override oh-my-zsh configurations

I made some changes to my oh-my-zsh configurations, namely I changed an alias in `/lib/aliases.zsh` and commented out a function in a plugin that I overrode in a script. I'm wondering if there is a way to apply the changes without losing the ability to upgrade oh-my-zsh. What I'm doing now is `git stash`-ing before an upgrade then `git stash apply`-ing after, which is obviously not a good idea. Is there a better way?


Mounting usb automatically & having usb's label as mountpoint

How can I mount my usb automatically when I plug it in? Also would like the mountpoint to be the usb's label each time it is mounted automatically. Edit: I am using Raspian (on Raspberry Pi) which is based on Debian. Trying to mount a USB flash drive. I am running Raspian in command line mode, and so want to auto mount in command line


User id in kernel module

I'm trying to intercept clone system call so that i could print **user id** and process id before actual system call executes. I am using **get_user_id()->uid** to access user id in kernel module but it returns user id in **kuid_t** type which I can not cast to int. Is there any other way to do this? I've read about using **getuid() [in "unistd.h"]** in other forums but interestingly compiler recognizes first use of this function as **implicit declaration.**


Log all root activity with original username who su'd/sudoed to root

What is the preferred method to keep track of who is acting as root in the logs when root login is disabled (SSH) but users can run `sudo -i` or `su -` to become root? I would like to follow every command with the original username as well. RHEL 6 or any Linux rsyslog, etc.


How OOM killer decides which process to kill first?

This answer explains the actions taken by the kernel when an OOM situation is encountered based on the value of `sysctl vm.overcommit_memory`. When `overcommit_memory` is set to 0 or 1, `overcommit` is enabled, and programs are allowed to allocate more memory than is really available. Now what happens when we run out of memory in this situation? How the _OOM killer_ decides which process to kill first?


Tar piped to split piped to scp

So I'm trying to transfer a bunch of files via SCP. Some of these are too large to be stored on the recipient (Android phone, 4GB file size limit). The sender is almost out of space, so I can't create intermediate files locally. I'd like to tar up the bunch and stream it through split so that I can get smaller segments that'll be accepted by the phone, i.e. local command:               tar -cvf - ~/batch/ | split --bytes=1024m - batch.tar.seg      But I'm not sure how I'd pipe that into scp to get it the phone. According the comment on this post, it's possible, but I first of all don't quite get what he's saying, second of all I'm not sure how to accomplish this as there'll be multiple files output from split. Any ideas?


Check CPU for AES support during custom-CentOS installation

I have custom distribution of CentOS Linux 6.3. The installed system needs CPU support for AES-NI for all services to work properly. **Can I add a check for AES support during the installation?** I'm using Anaconda, but am willing to consider other ways to do it as well.


How do I make mutt show Cyrillic characters on OpenBSD?

I'm using `mutt-1.5.21p0v0` to read my mail on OpenBSD 5.2 every now and then. Why does `mutt` show question marks instead of Cyrillic characters when I open standards-compliant email messages in Russian?


ps | grep shows bad output in subshell with jobs running in the background

I am using bash. I have a file named "a2draw" that contains only 1 line:               sleep 99999      I start it using this command:               bash a2draw &      Now, I know and understand the trick with square bracket that allows you to omit grep process in ps output:               ps aux | grep cron     root      1079  0.0  0.0   2596   788 ?        Ss   Mar25   0:00 cron     root      1119  0.0  0.0   3684   696 ?        Ss   Mar25   0:00 /usr/sbin/incrond -f /etc/incron.conf     ja       29781  0.0  0.0   4368   820 pts/10   S+   12:49   0:00 grep cron          ps aux | grep [c]ron     root      1079  0.0  0.0   2596   788 ?        Ss   Mar25   0:00 cron     root      1119  0.0  0.0   3684   696 ?        Ss   Mar25   0:00 /usr/sbin/incrond -f /etc/incron.conf      But it somehow doesn't work in the subshell that has jobs running in the background:               jobs     [1]+  Running                 bash a2draw &          ps aux | grep [a]2draw     ja       22977  0.0  0.0   5172  1080 pts/10   S    12:21   0:00 bash a2draw     ja       30242  0.0  0.0   4364   816 pts/10   R+   12:50   0:00 grep      What is even more strange, dropping one letter from the process name yields correct results:               ps aux | grep [a]2dra     ja       22977  0.0  0.0   5172  1080 pts/10   S    12:21   0:00 bash a2draw      On another shell everything works as I expected:               ps aux | grep [a]2draw     ja       22977  0.0  0.0   5172  1080 pts/10   S    12:21   0:00 bash a2draw          ps aux | grep [a]2dra     ja       22977  0.0  0.0   5172  1080 pts/10   S    12:21   0:00 bash a2draw      I don't know what's going on. Is there something special about background jobs that modify how creation of pipe works?


Automated ssh-keygen without passphrase, how?

I would like to make an automated script that calls `ssh-keygen` and creates some pub/private keypairs that I will use later on. In principle everything works fine with....   `ssh-keygen -b 2048 -t rsa -f /tmp/sshkey -q`   ...except that it asks me for the passphrase that would encrypt the keys. This make -at present- the automatisation difficult. I could provide a passphrase via the command line argument `-N thepassphrase`, so to keep the prompt from appearing. Still I do not even desire to have the keys - _additionally secured by encryption_ - and want the keypairs to be plaintext. What is a (the best) solution to this problem? The `-q` option which supposedly means "quiet/silent" does still not avoid the passphrase interaction. Also I have not found something like this   `ssh-keygen ...... -q --no-passphrase` Please do not start preaching about or lecture me to the pro and cons of the "missing passphrase", I am aware of that. In the interactive form (not as a script) the user can simply hit [ENTER] twice and the key will be saved as plaintext. This is what I want to achieve in a script like this:               #!/bin/bash          command1     command2     var=$(command3)          # this should not stop the script and ask for password     ssh-kegen -b 2048 -t rsa -f /tmp/sshkey -q


Keeping disk caches when hibernating

Is there a way to keep disk caches when hibernating Linux? I understand and agree that dropping them is the best option all-around. But my system is unresponsive after resume and I would like to give a try to keeping that data. Of course, both hibernating and resuming will be slower, since disk cache data will have to be written to swap and restored. And, of course, I will need more swap space than I do now. But still, I've been looking all over the web and I haven't found any way to set things up like that. I use pm-utils with uswsusp as backend, but I'm open to suggestions.


Ubuntu 13.04 with LinuxLive USB Creator and persistance forgets desktop background and keyboard layout

I'm using a live and persistent version of Ubuntu 13.04, created with LinuxLive USB Creator. The persistence mostly works, including for documents and apps, however the desktop background image and keyboard layout settings have to be configured manually each boot, the system prompts to install to a hard drive as well. How can I fix this?


How do I send RTSP video to a program that reads from a character device?

I have an IP-CAM that streams video over RTSP and I want to detect bar codes from it with `zbarcam` (from Ubuntu's `zbar-tools` package). According `zbarcam`'s manual, it expects to be given a video4linux character device (default `/dev/video0`). How can I let it receive that RTSP stream instead? * * * I tried to use `mplayer`, but I can't figure out how I could use that to pipe the stream to `zbarcam`.


How do I make `ls` show file sizes in megabytes?

What commands do I need for Linux's `ls` to show the file size in MB?


Using tcpdump to log blacklisted IPs

I am using `tcpdump` to log traffic outbound on a network. I would like to be able to log traffic on a host or IP-only basis but then I would like to be able to log large numbers of potentially blacklisted IPs. I have read about `tcpdump -F` in the `man` page that explains that I can load `tcpdump` configuration from a file, however, I cannot seem to find much in the way of documentation of how to structure this file or how to load large numbers of IPs into the filtering as I constantly get syntax errors. How would I easily implement IP address lists with `tcpdump`?


What is ~/default used for?

When I connect to my server using a the shell provided by Capistrano it executes ~/default before every command. I can't find out if this is Capistrano related or if this file has some generic use like `~/.bash_profile` for instance. I use Ubuntu 12.04. If I create `~/default` containing `echo "wut?"` and connect to that server using `cap shell` (Capistrano shell, a non-login, non-interative shell ..) it will echo "wut?" before every command that I execute in that shell session.


efficient cross-os file size shell function

I'm looking for a simpler way to have a cross-os-unix file size check. I could use wc -c but I'm concerned the performance may suck on large files (I'm assuming it just counts chars and doesn't do a stat under the covers?) The below works for linux and macos (perhaps bsd). Is there a simpler well performing approach?               function filesize     {         local file=$1         size=`stat -c %s $file 2>/dev/null` # linux         if [ $? -eq 0 ]; then             echo $size             return 0         fi              eval $(stat -s $file) # macos         if [ $? -eq 0 ]; then             echo $st_size             return 0         fi              echo 0         return -1     }


Two questions about Linux

Is it possible to install Linux on an old pc I have that is already running Windows XP? Can I download a distribution from a website or do I have to pay for a copy? Feel free to correct me and/or expand on these two questions


wheezy not accepting commands

I have debian Wheezy on an independent Dell amd64 how do I get to accept commands to install a virtual box? here's what I put in terminal (also tried in root terminal):               $ vi /etc/apt/sources.list.d/virtualbox.list      it accepted this, but, then, I put in:               $ deb http://download.virtualbox.org/virtualbox/debian wheezy contrib      and I got: E35 No previous regular expression any help would be grateful.


Remove multiple lines after a pattern match but only after pattern match

I am trying to remove all instances of a pattern match from a file if it matches a pattern. If there is a match, the (complete) line with the matching pattern and the next line get removed. The next line always appears after the line with the pattern match, but in addition it appears in other areas of the file. I am using grep and it is deleting all occurrences of the next line in the file, as expected. Is there a way I can remove that next line if and only if it is after the line with the pattern match?


How to create an encrypted container (dynamically expandable) on OpenBSD

**On OpenBSD** , how/with what I can create an encrypted container that can later be dynamically expanded? Can I do it with GPG? (password protection is enough) So, if I open this container and put files in it, it would dynamically expand as more files are put in it. Please do not recommend a Linux solution (e.g. TrueCrypt) without checking that it works on OpenBSD.