title: How to reconfigure PHP

text: We have a new linux server CentOS 6.5 with Plesk. Default PHP is 5.3.3, I have installed PHP5.4 & 5.5 on the server. I am a beginner on linux. Actually, I don't know how to install software on the linux. I just search on the internet to find a solution. I have to install PHP by using this guide PHP installed successfully but some functions do not work, such as mysqli. Default PHP 5.3.3 configure command is: `--with-mysql=shared,/usr --with-mysqli=shared,/usr/lib64/mysql/mysql_config` but my installed PHP 5.4 configure command is: `--with-mysql=/usr --with-mysqli` I think something is missing. I want to know how to restore mysqli features? If possible, a step by step guide to teach me. Thank you very much.


title: AES-NI accelerated ZFS v31 encryption in Solaris 11

text: I'm not quite sure if this is the right place to ask this, if not, feel free to migrate it to wherever it fits in. I'm testing the encryption feature in ZFS v31 in a Solaris 11.11.11 VM under ESXi 5.0 on my lab box. I'm getting terrible results when benching my encrypted folder with `dd` on an 11-disk RAIDZ3. **dd benchmark:**               # time dd if=/dev/zero of=/mypool/storage/dd.tst bs=1024000 count=10000     10000+0 records in     10000+0 records out          real    1m52.604s     user    0m0.010s     sys     0m2.715s     # time dd if=/mypool/storage/dd.tst of=/dev/null bs=1024000     10000+0 records in     10000+0 records out          real    3m15.547s     user    0m0.015s     sys     0m4.768s      **Which translates to:**               Write: 90.94 MB/s     Read: 52.366 MB/s      While using 100% CPU. In contrast, with no encryption, I'm getting writes at almost 700 MB/s and reads at around 900 MB/s. **As`isainfo -v` shows, aes is passed through to the VM.**               # isainfo -v     64-bit amd64 applications             xsave pclmulqdq aes sse4.2 sse4.1 ssse3 popcnt tscp cx16 sse3 sse2 sse             fxsr mmx cmov amd_sysc cx8 tsc fpu     32-bit i386 applications             xsave pclmulqdq aes sse4.2 sse4.1 ssse3 popcnt tscp ahf cx16 sse3 sse2             sse fxsr mmx cmov sep cx8 tsc fpu      Yes, I know what you're thinking. I should try it bare metal - and I actually have. I'm getting the same results running bare metal. The reason I'm even mentioning that it's in a VM is because AES-NI actually works and is giving me almost full speed using TrueCrypt in my Windows 7 64-bit VM under ESXi 5.0 using the exact same specs for the virtual machine. **VM specs:**   * CPU: 2 cores (of Intel Xeon E3-1235 @ 3.2GHz)   * Memory: 8GB   * SAS-controller (via Vt-d & PCI-passthrough): 2x IBM M1015 (flashed with IT firmware)   * HDD: 11x 2TB Samsung F4EG (via IBM M1015) Where should I start troubleshooting? Has anyone successfully used AES-NI accelerated encryption in Solaris 11 - if so, how is your setup, and did you have to do anything special?


title: What does "position" mean in iconv error message?

text: I get error when converting a large file:               $ iconv -f GB2312 -t UTF-8 2001.txt -o 2001_u.txt     iconv: illegal input sequence at position 245256667      What does the position mean in this error? I tried it is not line number. How to get to the position in other tools or editors like emacs?


title: Help understanding `find` syntax on Solaris

text: Consider the following files:               $ find findtest                          findtest     findtest/test1     findtest/test1/start.ksh     findtest/test2     findtest/test2/start.ksh     findtest/test3     findtest/test3/start.ksh     findtest/test4     findtest/test4/start.ksh      My question is about the use of `{}` in the `-exec` call. It works as I would expect it when designating the result file:               $ find findtest -name test[1-4] -exec ls -d {} \;                findtest/test1     findtest/test2     findtest/test3     findtest/test4      However it doesn't seem to be expanded when used in a path:               $ find findtest -name test[1-4] -exec md5sum {}/start.ksh \;          md5sum: {}/start.ksh: No such file or directory     md5sum: {}/start.ksh: No such file or directory     md5sum: {}/start.ksh: No such file or directory     md5sum: {}/start.ksh: No such file or directory      How can I use `find -type d -exec` to access lower hierarchy files? I know I can use a `for` loop like this, but I am curious to know if it can be done in one `find` call:               $ for f in $(find findtest -name test[1-4]); do md5sum "$f"/start.ksh; done     d41d8cd98f00b204e9800998ecf8427e  findtest/test1/start.ksh     d41d8cd98f00b204e9800998ecf8427e  findtest/test2/start.ksh     d41d8cd98f00b204e9800998ecf8427e  findtest/test3/start.ksh     d41d8cd98f00b204e9800998ecf8427e  findtest/test4/start.ksh


title: Replacing one test string with another in particular column

text: I would like to replace "CC" with "C" and "AA" with A" in a particular column of Tab delimited file (using `awk` probably).


title: Upload & Download speed in Tmux status line

text: Is there a way to get upload and download speeds in Tmux's status line?


title: CentOS as an xterminal

text: I have recently built a new VM on my `CentOS 6.5 system`. The VM has `Ubuntu with ROS`, the robotic operating system on it. I just wanted to experiment with ROS and I've been running some of the tutorials. One of those tutorials has an `X windows based application` in it but I haven't figured out how to get it displayed on the host's desktop display. I'm sure it's easy, and I thought that `vncserver` would do what I needed, but I haven't gotten it to work. I have tested the network connection between the VM and underlying CentOS system and the VMWARE successfully can ping the host. Could anyone point me to an explanation or tell me how to get this working?


title: How to mount a Truecrypt container with a timeout from the command line?

text: I'm mounting a truecrypt container via the command line (i.e. `truecrypt file dir`). Is there any way to have truecrypt automatically unmount the container after a given amount of inactivity in `dir`?


title: How to Execute multiple command using nohup

text: I want to execute multiple command using nohup, And each command should execute after previous command, I used this command for example:               nohup wget $url && wget $url2 > /dev/null 2>&1 &      But this command didn't work. What is the command for this propose? Any help would be much appreciated.


title: Fastest way to open all files in a directory with multiple file extensions on commandline

text: If I want to open all `mp4` files in a directory, I can simply do something like `totem *.mp4`. But how can I open all `mp4` and all `flv` files in that directory with one command. I.e. I want to do something like this `totem (*.mp4 OR *.flv)`. What's the easiest way to do this? Perhaps it helps that I am using `zsh`.


title: Number lines according to their content

text: I would like to number lines according to their content: the first line gets number 1, the second line gets number 2 if it's identical to the first and number 1 if it's different, and so on. For example:               asdf     asdf     asdf     asdf     dfg     dfg     dfg     qwert     qwert     er     qwert     er     asdf      Should result in:               1   asdf     2   asdf     3   asdf     4   asdf     1   dfg     2   dfg     3   dfg     1   qwert     2   qwert     1   er     3   qwert     2   er     5   asdf


title: How to create a Emacs file that looks/feels likes the Emacs start up page?

text: The Emacs start up page has image, link, and fonts with different size all in one. How can I create a page like that?


title: Remotely access Linux box with no IP address

text: I have two *nix boxes that are connected via ethernet. However I only have physical access to one of them. In working on the "remote" computer I messed up the ifcfg-eth0 file and instead of typing IPADDR= I typed IPPADDR (note the extra P). So at this point I believe the network boot script is still correctly loading the device drivers but obviously it will fail trying to set the IP address of the device. So, knowing only the MAC address of the "remote" computer and that the network cable goes directly from my computer to the "remote" computer, is there any way I can connect to this system and correct the ifcfg-eth0 file without gaining physical access?


title: cp vs. cat to copy a file

text: `cp a b` and `cat a > b`, what's the difference? In x86 install script of linux kernel's source tree (`arch/x86/boot/install.sh`), both are used:               cat $2 > $4/vmlinuz     cp $3 $4/System.map      Why don't they just keep the same format if one is better than the other?


title: Java code to copy files from one linux machine to another linux machine

text: I'm looking for java code to copy files to a remote linux system. I have tried `Runtime.getRuntime().exec()` function by passing an `scp` command, but each time I run the program it is asking for the remote system password. I'd like to avoid that. I looked at the `Jsch` library -- using this I can login to a remote system -- but I can't copy the files to the remote system. Once I login I can do `scp` to my host but again it requires the host system username and password. However, I only have the remote system's information.


title: How to find every file that includes a given function?

text: I am trying to list all of the files that include a function, e.g., `matrixCal`. How can I to do this in linux?


title: Touchpad - Have to wait for the left click to work

text: I have a touchpad that worked right away after I installed Debian, but recently I've had a problem: If I try to select text, I have to stop moving my finger on the pad for one second of so after pressing the left click before starting to move again to actually select what I want. But that's not the strangest part of it. I have a second set of "mouse buttons" just above and the left button of the set works normally... It can't be that the computer needs some time so understand that the button got clicked because for simple clicks (not click and hold), it works instantly. Which means somewhere, in a configuration file, something tells gnome 3 or whatever gets the input that it should wait 1s before considering a "click and hold" as a "click and hold". Would someone know where this could be and how to fix it? I went through this but I couldn't find anything that looked like it could help...


title: iptables rules too restrictive; Drupal webserver cannot access repositories, ntp or even websites

text: This is a Drupal website running Ubuntu 12.04 LTS on Linode. Someone recently changed our iptables rules and a number of problems started. These include:   1. Our Mollom spam protection is not working on the Drupal site because the server cannot reach the external service. (more details below)   2. Drupal reports, "Your system or network configuration does not allow Drupal to access web pages, resulting in reduced functionality." (more details below)   3. the server cannot ping the Internet  ping google.com   ping: unknown host google.com   4. Other network services fail. For example: $ sudo ntpdate ntp.ubuntu.com Exiting, name server cannot be used: Temporary failure in name resolution (-3) 1 Jun 16:42:34 ntpdate[7420]: name server cannot be used: Temporary failure in name resolution (-3)   apt-get update Err http://us.archive.ubuntu.com precise Release.gpg   Temporary failure resolving 'us.archive.ubuntu.com' Err http://security.ubuntu.com precise-security Release.gpg   Temporary failure resolving 'security.ubuntu.com'   5. The server is running very poorly. Could errors like the following one be related to inability to access the Internet due to iptables rules? Out of memory: Kill process 2300 (mysqld) score 129 or sacrifice child Killed process 2300 (mysqld) total-vm:354780kB, anon-rss:53180kB, file-rss:0kB Out of memory: Kill process 5937 (mysqld) score 60 or sacrifice child Killed process 5937 (mysqld) total-vm:344040kB, anon-rss:78988kB, file-rss:0kB Here are the Drupal errors in more detail. Drupal configuration was not changed -- only iptables was changed afaik: 1\. HTTP request status Fails Your system or network configuration does not allow Drupal to access web pages, resulting in reduced functionality. This could be due to your webserver configuration or PHP settings, and should be resolved in order to download information about available updates, fetch aggregator feeds, sign in via OpenID, or use other network-dependent services. If you are certain that Drupal can access web pages but you are still seeing this message, you may add $conf['drupal_http_request_fails'] = FALSE; to the bottom of your settings.php file. 2\. Mollom API keys Service error The Mollom API keys could not be verified. Please try again later. This issue prevents members from registering for our site or posting comments. Here are the current (problematic) iptables rules. (BTW, port 2222 was originally the SSH port. Now someone changed SSH back to port 22, but apparently left port 2222 open in iptables, but that's a separate issue):               # iptables -nL     Chain INPUT (policy DROP)     target     prot opt source               destination              fail2ban-apache-overflows  tcp  --  0.0.0.0/0            0.0.0.0/0            multiport dports 80,443     fail2ban-apache  tcp  --  0.0.0.0/0            0.0.0.0/0            multiport dports 80,443     DROP       all  --  69.30.238.162        0.0.0.0/0                DROP       all  --  121.205.199.140      0.0.0.0/0                DROP       all  --  137.117.129.250      0.0.0.0/0                DROP       all  --  117.26.252.26        0.0.0.0/0                DROP       all  --  112.111.165.71       0.0.0.0/0                DROP       all  --  175.42.95.145        0.0.0.0/0                ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:80 state NEW,ESTABLISHED     ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:2222 state NEW,ESTABLISHED     ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:443 state NEW,ESTABLISHED     ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:22     ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:2222          Chain FORWARD (policy DROP)     target     prot opt source               destination                   Chain OUTPUT (policy ACCEPT)     target     prot opt source               destination              ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp spt:80 state ESTABLISHED     ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp spt:2222 state ESTABLISHED     ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp spt:443 state ESTABLISHED     ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp spt:22     ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp spt:2222          Chain fail2ban-apache (1 references)     target     prot opt source               destination              RETURN     all  --  0.0.0.0/0            0.0.0.0/0                     Chain fail2ban-apache-overflows (1 references)     target     prot opt source               destination              RETURN     all  --  0.0.0.0/0            0.0.0.0/0        My question: since I know nothing about fail2ban configuration, what are the minimal changes I can make that will restore basic functionality (especially for outgoing services as those appear to be the main problem)? UPDATE: based on answer from Michael Kjörling, here are the updated iptables rules. Is this correct?               # cat iptables.modified.rules      # Generated by iptables-save v1.4.12 on Sat Jun  1 21:26:17 2013     *security     :INPUT ACCEPT [60016:6837978]     :FORWARD ACCEPT [0:0]     :OUTPUT ACCEPT [60450:61970107]     COMMIT     # Completed on Sat Jun  1 21:26:17 2013     # Generated by iptables-save v1.4.12 on Sat Jun  1 21:26:17 2013     *raw     :PREROUTING ACCEPT [72450:7582406]     :OUTPUT ACCEPT [60450:61970107]     COMMIT     # Completed on Sat Jun  1 21:26:17 2013     # Generated by iptables-save v1.4.12 on Sat Jun  1 21:26:17 2013     *nat     :PREROUTING ACCEPT [7899:447793]     :INPUT ACCEPT [7787:439884]     :OUTPUT ACCEPT [5818:4357219]     :POSTROUTING ACCEPT [5818:4357219]     COMMIT     # Completed on Sat Jun  1 21:26:17 2013     # Generated by iptables-save v1.4.12 on Sat Jun  1 21:26:17 2013     *mangle     :PREROUTING ACCEPT [72450:7582406]     :INPUT ACCEPT [72450:7582406]     :FORWARD ACCEPT [0:0]     :OUTPUT ACCEPT [60450:61970107]     :POSTROUTING ACCEPT [60450:61970107]     COMMIT     # Completed on Sat Jun  1 21:26:17 2013     # Generated by iptables-save v1.4.12 on Sat Jun  1 21:26:17 2013     *filter     :INPUT DROP [44:2387]     :FORWARD DROP [0:0]     :OUTPUT ACCEPT [78:41503]     :fail2ban-apache - [0:0]     :fail2ban-apache-overflows - [0:0]     -A INPUT -s 69.30.238.162/32 -j DROP     -A INPUT -s 121.205.199.140/32 -j DROP     -A INPUT -s 137.117.129.250/32 -j DROP     -A INPUT -s 117.26.252.26/32 -j DROP     -A INPUT -s 112.111.165.71/32 -j DROP     -A INPUT -s 175.42.95.145/32 -j DROP     -A INPUT -p tcp -m multiport --dports 80,443 -j fail2ban-apache-overflows     -A INPUT -p tcp -m multiport --dports 80,443 -j fail2ban-apache     -A INPUT -i eth0 -p tcp -m state --state RELATED,ESTABLISHED -j ACCEPT     -A INPUT -i eth0 -p tcp -m tcp --dport 443 -m state --state NEW,ESTABLISHED -j ACCEPT     -A INPUT -i eth0 -p tcp -m tcp --dport 80 -m state --state NEW,ESTABLISHED -j ACCEPT     -A INPUT -i eth0 -p tcp -m tcp --dport 22 -j ACCEPT     -A INPUT -p udp -m state --state RELATED -j ACCEPT     -A INPUT -p icmp -j ACCEPT     -A fail2ban-apache -j RETURN     -A fail2ban-apache-overflows -j RETURN     COMMIT     # Completed on Sat Jun  1 21:26:17 2013


title: Old HP nc4400 laptop on Debian, fan turns on for 10 secs, then off for 20 secs

text: I run Debian 7 on an HP nc4400 laptop. This is an old laptop with an Intel Centrino chipset. It runs fine except that the fan turns on for 10 seconds, then off for 20 seconds and then on for 10 seconds, and so on. The BIOS doesn't say anything on ACPI or APM. `dmesg | grep -i "acpi"` returns this:               0317)     [    0.229900] ACPI: Dynamic OEM Table Load:     [    0.229904] ACPI: SSDT   (null) 001FB (v01 HP      Cpu0Ist 00003000 INTL 20060317)     [    0.230045] ACPI: SSDT 7f7f629b 004CB (v01 HP      Cpu0Cst 00003001 INTL 20060317)     [    0.230435] ACPI: Dynamic OEM Table Load:     [    0.230439] ACPI: SSDT   (null) 004CB (v01 HP      Cpu0Cst 00003001 INTL 20060317)     [    0.230701] ACPI: SSDT 7f7f5f53 000C8 (v01 HP      Cpu1Ist 00003000 INTL 20060317)     [    0.231101] ACPI: Dynamic OEM Table Load:     [    0.231105] ACPI: SSDT   (null) 000C8 (v01 HP      Cpu1Ist 00003000 INTL 20060317)     [    0.231211] ACPI: SSDT 7f7f6216 00085 (v01 HP      Cpu1Cst 00003000 INTL 20060317)     [    0.231603] ACPI: Dynamic OEM Table Load:     [    0.231606] ACPI: SSDT   (null) 00085 (v01 HP      Cpu1Cst 00003000 INTL 20060317)     [    0.244084] ACPI: Interpreter enabled     [    0.244100] ACPI: (supports S0 S3 S4 S5)     [    0.244121] ACPI: Using IOAPIC for interrupt routing     [    0.244789] PCI: MMCONFIG at [mem 0xf8000000-0xfbffffff] reserved in ACPI motherboard resources     [    0.245206] [Firmware Bug]: ACPI: No _BQC method, cannot determine initial brightness     [    0.260264] ACPI: Power Resource [C220] (on)     [    0.262871] ACPI: Power Resource [C228] (on)     [    0.269881] ACPI: Power Resource [C329] (off)     [    0.269959] ACPI: Power Resource [C32A] (off)     [    0.270035] ACPI: Power Resource [C32B] (off)     [    0.270113] ACPI: Power Resource [C32C] (off)     [    0.270888] ACPI: EC: GPE = 0x16, I/O: command/status = 0x66, data = 0x62     [    0.271132] ACPI: No dock devices found.     [    0.271142] PCI: Ignoring host bridge windows from ACPI; if necessary, use "pci=use_crs" and report a bug     [    0.274594] ACPI: PCI Root Bridge [C002] (domain 0000 [bus 00-ff])     [    0.283058] pci 0000:00:1f.0: quirk: [io  0x1000-0x107f] claimed by ICH6 ACPI/GPIO/TCO     [    0.285079] ACPI: PCI Interrupt Routing Table [\_SB_.C002._PRT]     [    0.285255] ACPI: PCI Interrupt Routing Table [\_SB_.C002.C098._PRT]     [    0.285357] ACPI: PCI Interrupt Routing Table [\_SB_.C002.C101._PRT]     [    0.285421] ACPI: PCI Interrupt Routing Table [\_SB_.C002.C111._PRT]     [    0.285491]  pci0000:00: Requesting ACPI _OSC control (0x1d)     [    0.285495]  pci0000:00: ACPI _OSC request failed (AE_NOT_FOUND), returned control mask: 0x1d     [    0.285498] ACPI _OSC control for PCIe not granted, disabling ASPM     [    0.298542] ACPI: PCI Interrupt Link [C10D] (IRQs *10 11)     [    0.298640] ACPI: PCI Interrupt Link [C10E] (IRQs *10 11)     [    0.298735] ACPI: PCI Interrupt Link [C10F] (IRQs 10 *11)     [    0.298829] ACPI: PCI Interrupt Link [C110] (IRQs 10 11) *5     [    0.298923] ACPI: PCI Interrupt Link [C123] (IRQs *10 11)     [    0.299016] ACPI: PCI Interrupt Link [C124] (IRQs *10 11)     [    0.299110] ACPI: PCI Interrupt Link [C125] (IRQs 10 *11)     [    0.299152] ACPI Exception: AE_NOT_FOUND, Evaluating _PRS (20110623/pci_link-184)     [    0.299282] PCI: Using ACPI for IRQ routing     [    0.306278] pnp: PnP ACPI init     [    0.306293] ACPI: bus type pnp registered     [    0.306470] system 00:00: Plug and Play ACPI device, IDs PNP0c01 (active)     [    0.310002] pnp 00:01: Plug and Play ACPI device, IDs PNP0a08 PNP0a03 (active)     [    0.310352] pnp 00:02: Plug and Play ACPI device, IDs IFX0102 PNP0c31 (active)     [    0.310415] pnp 00:03: Plug and Play ACPI device, IDs PNP0c04 (active)     [    0.310472] pnp 00:04: Plug and Play ACPI device, IDs PNP0200 (active)     [    0.310520] pnp 00:05: Plug and Play ACPI device, IDs PNP0800 (active)     [    0.310576] pnp 00:06: Plug and Play ACPI device, IDs PNP0b00 (active)     [    0.310690] pnp 00:07: Plug and Play ACPI device, IDs PNP0103 (active)     [    0.310749] pnp 00:08: Plug and Play ACPI device, IDs PNP0303 (active)     [    0.310804] pnp 00:09: Plug and Play ACPI device, IDs SYN010f SYN0100 SYN0002 PNP0f13 (active)     [    0.311066] system 00:0a: Plug and Play ACPI device, IDs PNP0c02 (active)     [    0.311677] pnp 00:0b: Plug and Play ACPI device, IDs HPQ0004 (active)     [    0.311845] system 00:0c: Plug and Play ACPI device, IDs PNP0c02 (active)     [    0.312175] system 00:0d: Plug and Play ACPI device, IDs PNP0c02 (active)     [    0.312190] pnp: PnP ACPI: found 14 devices     [    0.312192] ACPI: ACPI bus type pnp unregistered     [    0.312197] PnPBIOS: Disabled by ACPI PNP     [    0.694522] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5     [    0.694789] acpiphp: Slot [1] registered     [    1.209623] ACPI: Thermal Zone [TZ0] (43 C)     [    1.245239] ACPI: Thermal Zone [TZ1] (47 C)     [    1.245347] ACPI: Fan [C32D] (off)     [    1.245425] ACPI: Fan [C32E] (off)     [    1.245503] ACPI: Fan [C32F] (off)     [    1.245582] ACPI: Fan [C330] (off)     [    1.264245] ACPI: Thermal Zone [TZ2] (38 C)     [    1.274458] ACPI: Thermal Zone [TZ3] (27 C)     [    1.278192] ACPI: Thermal Zone [TZ4] (72 C)     [    1.770523] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out     [    1.782791] ata1.00: ACPI cmd c6/00:10:00:00:00:a0 (SET MULTIPLE MODE) succeeded     [    1.782796] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out     [    1.830495] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out     [    1.842790] ata1.00: ACPI cmd c6/00:10:00:00:00:a0 (SET MULTIPLE MODE) succeeded     [    1.842794] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out     [    2.559585] ACPI: Requesting acpi_cpufreq     [    2.573303] ACPI: Sleep Button [C249]     [    2.573433] ACPI: Lid Switch [C241]     [    2.578133] ACPI: acpi_idle registered with cpuidle     [    2.579241] ACPI: Power Button [PWRF]     [    2.608481] ACPI: AC Adapter [C1B2] (on-line)     [    2.619330] [Firmware Bug]: ACPI: No _BQC method, cannot determine initial brightness     [    2.620666] acpi device:01: registered as cooling_device6     [    2.620899] ACPI: Video Device [C085] (multi-head: yes  rom: no  post: no)     [    2.669097] ACPI: Battery Slot [C1B4] (battery present)     [    2.669211] ACPI: Battery Slot [C1B3] (battery absent)     [    3.865996] snd_hda_intel 0000:00:1b.0: power state changed by ACPI to D0     [    3.866008] snd_hda_intel 0000:00:1b.0: power state changed by ACPI to D0     [    7.577461] input: ACPI Virtual Keyboard Device as /devices/virtual/input/input11      I ran `lm_sensors` and had it add a line to a config file I don't really remember - but it didn't help. (Edit: it added 'loop' and 'coretemp' to /etc/modules and had me restart a service to effectuate it.) I can have the fan turned on permanently from the BIOS when running on AC power but I'd rather I would turn on or off when necessary, not constantly on and off every 10-20 seconds.


title: Webserver for Embedded Linux

text: I am building an ARM based embedded device running embedded linux having a web based interface and I need a webserver running on my device. At maximum it will get 50 requests at a time. I have on board 1 GB RAM. I will also need HTTPS. The webserver should not consume too much memory (of-course as its an embedded device). It should support dynamic contents (so I guess Boa is out). My website should also be able to support HTML5. Following are some of the options I have looked into but open to suggestions.   * lighttpd   * nginx   * Hiawatha   * thttpd   * Boa Any feedback / input / pointer is welcome


title: Include domain name or not in /etc/hosts?

text: I am setting up a VMWare cluster of CentOS nodes. Is it best practice to include a domain name after the machine? What are the potential problems of leaving it out? Does a domain complicate configuration or simplify it? For example, if my node is at `192.168.1.93`, should I change `/etc/hosts` from               127.0.0.1 localhost.localdomain localhost      to               127.0.0.1 localhost.cluster localhost     192.168.1.93 computernode1.cluster computenode1      or               127.0.0.1 localhost     192.168.1.93 computenode1      or               #127.0.0.1 localhost     192.168.1.93 computenode1      or               192.168.1.93 localhost     192.168.1.93 computenode1


title: What is meant by a shell is in "vi" mode or "emacs" mode?

text: This question follows directly from the answer to one of my previous questions here. I am newbie to unix world and this site has helped a lot to understand some core concepts. In this case I am specifically unable to understand the part which says: > In that regard, its behaviour is closer to emacs' than with > bash(readline)/ksh/zsh emacs mode, but departs from the terminal driver > embedded line editor (in canonical mode), where Ctrl-W deletes the previous > word (werase, also in vi). I dropped a comment to that answer but probably I was asking for too much information there. So I thought I would rather post a separate question. So here we are talking about shells and not editors which are two completely different programs. What does it mean to say shell is in some editor mode? P.S: You can base your answer on the premise that I understand what a shells is and how to use vim for basic editing. Also feel free to add more relevant tags.


title: Internet disappears regularly

text: About a month ago I installed the newest version of Linux Mint (14).   I use Linux the whole day on my laptop but every 1-2 hours my internet connection (Wi-Fi) magically disappears for about 10 minutes.   I get this error when I try to open a website in Chrome: > The server at google.com can't be found, because the DNS lookup failed. DNS > is the network service that translates a website's name to its Internet > address. This error is most often caused by having no connection to the > Internet or a misconfigured network. It can also be caused by an > unresponsive DNS server or a firewall preventing Google Chrome from > accessing the network. There is also no "ping" when I open the terminal. I also have Windows installed on the same machine, but I never experience issues like this while using Windows.   When the internet is gone on Linux, it's still available on my phone over the same Wi-Fi. So the internet connection itself works perfectly fine. Does anybody have an idea?


title: Torify in KDE on 12.04 - all connections through tor

text: http://freemarketlinux.com/2012/10/16/torify-your-ubuntu- linux-12-0412-10-operating-system/ There is no such option in my KDE4 settings. I squeezed google and the software center for missing packages but no useful result. So im here to find a solution. QUESTION: How to fully torify KDE4 on 12.04 as in the gnome tutorial stated above? EDIT: ![proxysetting missing?](http://i.stack.imgur.com/KHAyQ.png) ![proxy settings not working for me](http://i.stack.imgur.com/FOWYc.png) ![Foxyproxy is working](http://i.stack.imgur.com/r1jxo.png)


title: Cal no space delimiter

text: I am an OpenBSD user and I am writing an awk script which automatically generates TeX course calendars for all courses that I teach. To obtain actual calendar out of the system I use Unix cal command. The problem is that the output of the cal command uses spaces as a delimiters which creates all sorts of problems when I apply my nawk script to it. I looked the source code for cal and seems that nothing short of hacking the source code will force cal command to use delimiter other than the space. What would be the simplest way to get calendar to look like this                       June 2012     Su, Mo, Tu, We, Th, Fr, Sa       ,   ,   ,   ,   ,  1,  2      3,  4,  5,  6,  7,  8,  9     10, 11, 12, 13, 14, 15, 16     17, 18, 19, 20, 21, 22, 23     24, 25, 26, 27, 28, 29, 30


title: Resources to learn shell scripting

text: I have been using GNU/Linux for sometime now (Ubuntu and Fedora) and now I am trying to learn shell scripting from scratch. I would really appreciate if someone can guide me on choosing right documentation/links to start off with. **PS:** I can create simple scripts and can understand slightly complex ones. Any help in this regards will be highly appreciated!


title: How to stop appearance of ^T% in the first line when I open a new lxterminal tab with ^T in zsh?

text: Steps to reproduce:   1. Have zsh as default shell.   2. Open a new terminal. for example, with `Ctrl`+`Alt`+`T`.   3. Press `Ctrl`+`Shift`+`T` to open a new terminal tab.   4. `^T%` appears as the first line I'm running ubuntu 11.10 with lxde and zsh-4.3.11. Gnome-terminal doesn't have this problem. Contents of `/etc/zsh/zshrc`:               # /etc/zsh/zshrc: system-wide .zshrc file for zsh(1).     #     # This file is sourced only for interactive shells. It     # should contain commands to set up aliases, functions,     # options, key bindings, etc.     #     # Global Order: zshenv, zprofile, zshrc, zlogin          READNULLCMD=${PAGER:-/usr/bin/pager}          if [[ "$TERM" != emacs ]]; then     [[ -z "$terminfo[kdch1]" ]] || bindkey -M emacs "$terminfo[kdch1]" delete-char     [[ -z "$terminfo[khome]" ]] || bindkey -M emacs "$terminfo[khome]" beginning-of-line     [[ -z "$terminfo[kend]" ]] || bindkey -M emacs "$terminfo[kend]" end-of-line     [[ -z "$terminfo[kich1]" ]] || bindkey -M emacs "$terminfo[kich1]" overwrite-mode     [[ -z "$terminfo[kdch1]" ]] || bindkey -M vicmd "$terminfo[kdch1]" vi-delete-char     [[ -z "$terminfo[khome]" ]] || bindkey -M vicmd "$terminfo[khome]" vi-beginning-of-line     [[ -z "$terminfo[kend]" ]] || bindkey -M vicmd "$terminfo[kend]" vi-end-of-line     [[ -z "$terminfo[kich1]" ]] || bindkey -M vicmd "$terminfo[kich1]" overwrite-mode          [[ -z "$terminfo[cuu1]" ]] || bindkey -M viins "$terminfo[cuu1]" vi-up-line-or-history     [[ -z "$terminfo[cuf1]" ]] || bindkey -M viins "$terminfo[cuf1]" vi-forward-char     [[ -z "$terminfo[kcuu1]" ]] || bindkey -M viins "$terminfo[kcuu1]" vi-up-line-or-history     [[ -z "$terminfo[kcud1]" ]] || bindkey -M viins "$terminfo[kcud1]" vi-down-line-or-history     [[ -z "$terminfo[kcuf1]" ]] || bindkey -M viins "$terminfo[kcuf1]" vi-forward-char     [[ -z "$terminfo[kcub1]" ]] || bindkey -M viins "$terminfo[kcub1]" vi-backward-char          # ncurses fogyatekos     [[ "$terminfo[kcuu1]" == ""* ]] && bindkey -M viins "${terminfo[kcuu1]/O/[}" vi-up-line-or-history     [[ "$terminfo[kcud1]" == ""* ]] && bindkey -M viins "${terminfo[kcud1]/O/[}" vi-down-line-or-history     [[ "$terminfo[kcuf1]" == ""* ]] && bindkey -M viins "${terminfo[kcuf1]/O/[}" vi-forward-char     [[ "$terminfo[kcub1]" == ""* ]] && bindkey -M viins "${terminfo[kcub1]/O/[}" vi-backward-char     [[ "$terminfo[khome]" == ""* ]] && bindkey -M viins "${terminfo[khome]/O/[}" beginning-of-line     [[ "$terminfo[kend]" == ""* ]] && bindkey -M viins "${terminfo[kend]/O/[}" end-of-line     [[ "$terminfo[khome]" == ""* ]] && bindkey -M emacs "${terminfo[khome]/O/[}" beginning-of-line     [[ "$terminfo[kend]" == ""* ]] && bindkey -M emacs "${terminfo[kend]/O/[}" end-of-line     fi          zstyle ':completion:*:sudo:*' command-path /usr/local/sbin /usr/local/bin \                      /usr/sbin /usr/bin /sbin /bin /usr/X11R6/bin          unalias run-help     autoload run-help          # If you don't want compinit called here, place the line     # skip_global_compinit=1     # in your $ZDOTDIR/.zshenv or $ZDOTDIR/.zprofice     if [[ -z "$skip_global_compinit" ]]; then       autoload -U compinit       compinit     fi      Contents of `~/.zshrc`:               # The following lines were added by compinstall          zstyle ':completion:*' completer _expand _complete _ignored _correct _approximate     zstyle ':completion:*' group-name ''     zstyle ':completion:*' list-colors ''     zstyle ':completion:*' matcher-list '' 'm:{[:lower:]}={[:upper:]} m:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'r:|[._-]=* r:|=*' '+l:|=* r:|=*'     zstyle :compinstall filename '/home/kirill/.zshrc'          autoload -Uz compinit promptinit zcalc zsh-mime-setup     compinit     promptinit     zsh-mime-setup     # End of lines added by compinstall     # Lines configured by zsh-newuser-install     HISTFILE=~/.histfile     HISTSIZE=10000     SAVEHIST=10000     setopt appendhistory autocd extendedglob notify sharehistory     setopt HIST_EXPIRE_DUPS_FIRST     #{{{ Shell Conveniences          # some more ls aliases     alias ls='ls --color'     alias lt='ls --color -ltr'     alias ll='ls -l'     alias lh='ls -l -h'     alias la='ls -A'     alias l='ls -CF'     alias vir='vim -R'     alias vimnw='vim -R +"set nowrap"'     alias tok='top -n1 -b -u kirill'     alias gt='gnome-terminal'     alias gts='gnome-terminal --window-with-profile=shnurov'          #alias tv='/usr/toolworks/totalview.8.6.2-2/bin/totalview'     #alias mpic='mpiCC.openmpi -o main -I/usr/local/include/boost-1_39/ main.cc -Llibdir -lboost_mpi-gcc43-mt-1_39 -lboost_serialization-gcc43-mt-1_39'     #alias mpir='mpirun.openmpi -np 7 ./main'     alias sage='~/progs/sage-4.8/sage'     #alias gmolden='/home/kirill/progs/molden/gmolden'     #alias molden='/home/kirill/progs/molden/molden'     #export LD_LIBRARY_PATH=/home/kirill/progs/molekel_5_4_0_linux_x86_64/lib:$LD_LIBRARY_PATH     #alias molekel='/home/kirill/progs/molekel_5_4_0_linux_x86_64/bin/Molekel'     #alias molekel='source /home/kirill/progs/molekel_5_4_0_linux_x86_64/launch_molekel.sh'     alias duh='du -s -h'     alias mam='make; time ./main'     alias mac='make clean;make;time ./main'     alias atdtool='~/progs/atdtool/atdtool'     alias acro='acroread -openInNewWindow'          #}}}     bindkey -e               bindkey "^[[A" history-beginning-search-backward     bindkey "^[[B" history-beginning-search-forward     # End of lines configured by zsh-newuser-install     # Customize to your needs...     export PATH=/opt/intel/composer_xe_2011_sp1.6.233/bin/intel64:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/intel/composer_xe_2011_sp1.6.233/mpirt/bin/intel64     #source /opt/intel/bin/compilervars.sh intel64          autoload -U colors && colors          PROMPT="%{$fg[red]%}%*%{$reset_color%}.%{$fg[cyan]%}%~%{$reset_color%}     %{$reset_color%}%{$fg[magenta]%}>%{$reset_color%}"     #PROMPT="${fg_red}%*${fg_white}${at_normal}.${fg_cyan}%~${fg_white}  ${bg_grey}     #${at_normal}${fg_white}>${at_normal}"


title: Allow non-admin users to install packages via apt or rpm?

text: Is it possible to allow non-root users to install packages system-wide using apt or rpm? The place where I work currently has an out of date setup on the linux boxes, and admins are sick of having to do all the installations for users on request, so they are thinking of giving full sudo rights to all users. This has obvious security disadvantages. So I'm wondering if there's a way to allow normal users to install software - and to upgrade and remove it?


title: Samba Share Folder reports that no space is avaiable even though disk is not full

text: I have a home server with a 2TB Harddisk wich I use to store data. To do so over the network, I use Samba and have two different samba shares I have Debian Wheezy as OS Currently, 42% (729GB) of 1.8GB are taken. If I now try to store data on one of the shared folders, the windows explorer reports that there is not enough space left. Interestingly enough, this error only occurs when I try to store data within a folder (e. g.: //share/folder) but not directly into the share (//share). I didn't set up any quote! Why is the space restricted when I store data in a folder (it does not matter which folder!)


title: can /boot be on a different drive than grub or lilo?

text: I just got a vizio CN15-A5 laptop, which has both a 1TB HDD and a 32G SDD. I am going to use the SSD with dm-cache, however, I would to make /boot a partition on the SSD, and the laptop's BIOS doesn't support booting off of the SSD. Before I make my system unbootable on accident...can GRUB or LILO be installed on on /dev/sda and fire up /boot from /dev/sdb? Do you think it would improve boot time much or at all?


title: How to make 1:52 to 01:52 with eg.: sed?

text: INPUT:               a|2013.06.13. 13:22|xx     b|2013.06.13. 1:52 |xx     c|2013.06.13. 2:26 |xx      OUTPUT:               a|2013.06.13. 13:22|xx     b|2013.06.13. 01:52 |xx     c|2013.06.13. 02:26 |xx      How can I make the 1:52 to 01:52 in this case? UPDATE: Thanks! These are working great, but how can I remove the space between the minutes and the "|" if 0 were added?               $ sed -e 's/ \([0-9]:\)/ 0\1/' b.txt      a|2013.06.13. 13:22|xx     b|2013.06.13. 01:52 |xx     c|2013.06.13. 02:26 |xx     $ perl -wpe 's/(\d+):/sprintf( "%02d:",$1)/e' b.txt      a|2013.06.13. 13:22|xx     b|2013.06.13. 01:52 |xx     c|2013.06.13. 02:26 |xx     $       wow.. :)


title: List of available services

text: Is there any command that would show all the **available services** in my wheezy Debian based OS? I know that in order to see all the **running services** you can use `service --status-all`.


title: Rsync after copy

text: Does Rsync after copy only send the differences between the folders, or does it copy the entire folder again since Rsync has never been implemented before on that folder?


title: Crontab Change location

text: I want to set a personal crontab in another folder and executed. For example I want it in /home/project/tasks/crontab Like that it's easier to add/delete tasks. Thank you for your answers.


title: Get PID of the application running in the active terminal emulator

text: My end goal is to be able to open a new terminal window (`urxvt`) directly in the current working directory of the program running in the window currently active. I'm currently using the shell (Bash), but I don't have anything against alternatives. So far, I've got the ID of the current active window using `xdotool`:               wid=$(xdotool getactivewindow)      and the PID of its process using `xprop`:               pid=$(xprop -id $wid _NET_WM_PID | awk '{print $NF}')      but this is not the PID I'm looking for. **I want the PID of the process running in the terminal displayed in that window.** For now, I mostly want the case of a `bash` shell running in that window, but I don't see why it would depend on that. I can already get CWD from a PID using `cwd="$(readlink /proc/$pid/cwd)"`.


title: How can I use command line telnet client to open a raw connection - like PuTTY?

text: I need to use telnet to talk with a socket server which is not a standard Telnet server. I do not want any Telnet negotioation or interference of any kind in the data. This is available as 'raw mode' in PuTTy and I need the same functionality in Linux.


title: Unstable network on integrated Debian environment

text: Good afternoon, I recently installed Debian Wheezy (7.0) on a freescale board ( _SABRE MCIMX6Q / iMX6Q_ ) and discovered some disturbing lags for all network communications. What I have tried so far was to set the network configuration in _/etc/network/interfaces_ to static values instead of DHCP and I checked the OS load as well: > 13:20:51 up 31 min, 2 users, load average: 4.75, 4.67, 3.89 The _top_ command may consume up to 15% CPU which seems very high as well. For the OS installation we used a pre-built u-boot.bin, uImage and a Wheezy RootFS (Hard-Float). Kernel which was compiled for wrong hardware by any chance? Whereas other network members have low response times, this one lags even when pinging a machine on the same network, here is a short excerpt of the output of a ping command: ![enter image description here](http://i.stack.imgur.com/uZQrx.jpg) And below is the board if it helps, perhaps it's a specific problem. ![enter image description here](http://i.stack.imgur.com/5lTld.jpg) **Full size image here:** http://i.stack.imgur.com/EWvR7.jpg


title: Reordering strings in linux

text: How can I change lines around using the command line?   e.g. I have these lines:                   Acct-Status-Type = Start         User-Name = "37XXXXXXX"         Event-Timestamp = "Apr 12 2013 15:56:55 AMT"      I need to change the order to this:                   Event-Timestamp = "Apr 12 2013 15:56:55 AMT"         User-Name = "37XXXXXXX"         Acct-Status-Type = Start      I need to do this by one command, sed, awk, perl or something like that.


title: How do I recover files from a single degraded mdadm raid1 drive? "not enough to start the array"

text: Given a single raid1 drive in degraded/rebuilding state, can it be force mounted? I'd like to recover all the files before undertaking the dangerous operation of pairing it and rebuilding. As far as I can tell the drive is in perfectly good shape, fully intact. The pair drive is partly failed. If the drive was not in rebuilding state I'd know exactly what to do. Here is what I have tried:               # mdadm --verbose --assemble /dev/md8 /dev/sdb1  --force     mdadm: looking for devices for /dev/md8     mdadm: /dev/sdb1 is identified as a member of /dev/md8, slot 1.     mdadm: no uptodate device for slot 0 of /dev/md8     mdadm: added /dev/sdb1 to /dev/md8 as 1     mdadm: /dev/md8 assembled from 0 drives and  1 rebuilding - not enough to start the array.          # cat /proc/mdstat                            md8 : inactive sdb1[1](S)           976759808 blocks super 1.2               md0 : active raid1 sdc1[0]           976759672 blocks super 1.2 [2/1] [U_]          # mdadm --stop /dev/md8     mdadm: stopped /dev/md8          # mount /dev/sdb1 /mnt/temp2     mount: unknown filesystem type 'linux_raid_member'          # mount -o ro -t ext3 -b 2048 /dev/sdb1 /mnt/temp1     mount: wrong fs type, bad option, bad superblock on /dev/sdb1.          # foremost -i /dev/sdb -o /tmp/foo    (this results in perfectly good files)      In this particular case the `foremost` command recovers files, so something is definitely on the drive, if I could only get the superblock offset correct. And in this particular case assembling both halves of the array crashes the kernel(!), so that's not a real option anyway (aside from the safety issues). * * * UPDATE: added output of mdadm               # mdadm --examine /dev/sdb1     /dev/sdb1:               Magic : a92b4efc             Version : 1.2         Feature Map : 0x2          Array UUID : e00a291e:016bbe47:09526c90:3be48df3                Name : ubuntu:0       Creation Time : Wed May 11 12:26:39 2011          Raid Level : raid1        Raid Devices : 2           Avail Dev Size : 1953519616 (931.51 GiB 1000.20 GB)          Array Size : 1953519344 (931.51 GiB 1000.20 GB)       Used Dev Size : 1953519344 (931.51 GiB 1000.20 GB)         Data Offset : 2048 sectors        Super Offset : 8 sectors     Recovery Offset : 0 sectors               State : clean         Device UUID : 41346f44:ccacbbf7:0c17c133:eb7b341f              Update Time : Sat Apr 13 00:02:08 2013            Checksum : 483a0a44 - correct              Events : 402833                  Device Role : Active device 1        Array State : AA ('A' == active, '.' == missing)


title: How to SSH apache user from a remote guest server on VirtualBox with host-only network?

text: I have two CentOS virtual machines on VirtualBox . one of them let's say CentOS-1 holds my Web application code. Second is CentOS2. I have two network connections between these two servers : Bridged & Host-only .               CentOS-1 : for Bridged connection the ip is : 192.168.0.137     for Host-only connection the ip is : 192.168.1.137          CentOS-2 : for Bridged connection the ip is : 192.168.0.101     for Host-only connection the ip is : 192.168.1.101      in my php web page when I try to ssh like this :                exec('ssh -p 22 root@192.168.0.101 2>&1 ',$output);      it's working, but when I'm trying to ssh to the host-only network ip :                exec('ssh -p 22 root@192.168.1.101 2>&1 ',$output);      I got this as an output :               ssh: connect to host 192.168.1.101 port 22: No route to host      I tried to re-generate public key for 192.168.0.137 and copy it to 192.168.0.101 but it didn't help. I also tried to give privileges to apache user : on CentOS-2 :               sudo -u apache ssh root@192.168.1.137 "pwd"     sudo -u apache ssh root@192.168.0.137 "pwd"      on CentOS-1 :               sudo -u apache ssh root@192.168.1.101 "pwd"          sudo -u apache ssh root@192.168.0.101 "pwd"      neither of the two ways worked. Is there any thing that I has missed? The output of `ifconfig -a` :               $ ifconfig -a                                                                                eth0      Link encap:Ethernet  HWaddr 08:00:27:0B:56:0E                                                                                inet addr:192.168.0.101  Bcast:192.168.0.255  Mask:255.255.255.0                                                                           inet6 addr: fe80::a00:27ff:fe0b:560e/64 Scope:Link                                                                                UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1                                                                                RX packets:5652 errors:0 dropped:0 overruns:0 frame:0                                                                                TX packets:4886 errors:0 dropped:0 overruns:0 carrier:0                                                                                collisions:0 txqueuelen:1000                                                                                RX bytes:833395 (813.8 KiB)  TX bytes:769122 (751.0 KiB)                                                                              eth1      Link encap:Ethernet  HWaddr 08:00:27:FA:C6:32                                                                                BROADCAST MULTICAST  MTU:1500  Metric:1                                                                                RX packets:0 errors:0 dropped:0 overruns:0 frame:0                                                                                TX packets:0 errors:0 dropped:0 overruns:0 carrier:0                                                                                collisions:0 txqueuelen:1000                                                                                RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)                                                                                lo        Link encap:Local Loopback                                                                                inet addr:127.0.0.1  Mask:255.0.0.0                                                                                inet6 addr: ::1/128 Scope:Host                                                                                UP LOOPBACK RUNNING  MTU:16436  Metric:1                                                                                RX packets:6315 errors:0 dropped:0 overruns:0 frame:0                                                                                TX packets:6315 errors:0 dropped:0 overruns:0 carrier:0                                                                                collisions:0 txqueuelen:0                                                                                RX bytes:878894 (858.2 KiB)  TX bytes:878894 (858.2 KiB)             and output of route :               $ sudo ifconfig eth1 inet 192.168.1.101 broadcast 192.168.1.255 netmask 255.255.255.0 up                               [sudo] password for safaa:                                                                                [safaa@AMeS101 ~]$ route                                                                                Kernel IP routing table                                                                                Destination     Gateway         Genmask         Flags Metric Ref    Use Iface                                                              192.168.1.0     *               255.255.255.0   U     0      0        0 eth1                                                               192.168.0.0     *               255.255.255.0   U     0      0        0 eth0                                                               link-local      *               255.255.0.0     U     1002   0        0 eth0                                                               default         mbox.kds.local  0.0.0.0         UG    0      0        0 eth0


title: How to restore desktop configs after an intallation

text: I have recently installed PgAdminIII and Geany via Ubuntu Software Center, but this changed my desktop configurations. It no longer looks like it did. I am using Pinguy OS 12.10 based on Ubuntu 12.10. How can I restore my configs?


title: grant permission in linux

text: I have a linux web server with 2 hard-drives. There are 2 users, one can access /home/user1 and the other user can access /home2/user2 I would like to grant user1 permissions to access /home2/users/ (recursively) without revoking user2 access to his home directory. What's the best way to do that?


title: How to find out all the files in other machines using bash shell script?

text: I am trying to find out which files are in `machineB` and which files are in `machineC`. And I need to run my shell script on `machineA` to figure out which files are in `machineB` and which files are in `machineC` I have around 300 files distributed in `machineB` and `machineC`. Now I would like to find out which file is in which machine `(machineB or machineC)`. Below is my shell script which I am running on `machineA` and `PRIMARY_PARTITION` has some file numbers and `SECONDARY_PARTITION` has some file numbers. And the files are present in this directory -               /data/snapshot/20140317      in `machineB` or `machineC` .. And the file path is like this -               t1_1980_0_200003_5.data     t1_1980_3_200003_5.data     t1_1980_5_200003_5.data     t1_1980_7_200003_5.data     t1_1980_9_200003_5.data      Here the file number is 0, 3, 5, 7, 9. Other names in the `filename` are always going to be same apart from the file numbers.               #!/bin/bash          readonly FILERS_LOCATION=(machineB machineC)     readonly MEMORY_MAPPED_LOCATION=/data/snapshot     PRIMARY_PARTITION=(0 3 5 7 9)     SECONDARY_PARTITION=(1 2 4 6 8)          dir1=20140317     dir2=20140317          echo $dir1     echo $dir2          if [ "$dir1" = "$dir2" ]     then         for el in "${PRIMARY_PARTITION[@]}"         do             # do something here may be?         done         for sl in "${SECONDARY_PARTITION[@]}"         do             # do something here may be?         done     fi      Now my question is how would I find out all the files in `machineB` and `machineC`. Meaning out of `(0 3 5 7 9)` and `(1 2 4 6 8)` which files are in `machineB` and which are in `machineC`. As an example I have shown very small set of files above. In general, I have lot of files which I am thinking its pretty difficult for me to login in machineB and machineC to find out the files.


title: Modifying one line in Iptables

text: How would one modify the following line in iptables file (debian)?               ACCEPT     all  --  XXX.XXX.XX.X         anywhere            PHYSDEV match --physdev-in vif3.1       TO               ACCEPT     all  --  YYY.YYY.YY.Y         anywhere            PHYSDEV match --physdev-in vif3.1       I looked up the https://wiki.debian.org/iptables and I'm having hard time figuring out how to exactly do this modification. Can it be done using one command, or there is a way to temporally "extract" the iptables file and modify it using nano or vi, and put it back in place?


title: rsync directory and contents to new location and owner

text: I have access to 2 group accounts: `ops_user` and `test_user`. Is it possible to copy a directory and all subdirectory owned by `ops_user` to a new directory owned by the test_user? I.e I want to copy everything from `/blah/Blah/ops` (owned by `ops-user`) to `/blah/Blah/test` (and have it owned by `test_user`). I've tried the following. Logged in as `test_user` in `/blah/Blah/test`:                rsync -avz */ ops_user@boco2:/blah/Blah/ops --owner=test_user --group=user       rsync -avzh ops_user@boco2:/blah/Blah/ops /blah/Blah/test/      rsync -avz */ ops_user@boco2:/blah/Blah/ops      rsync -avzhe ssh ops_user@boco2:/blah/Blah/ops /blah/Blah/test      Logged in as `ops_user` in `/blah/Blah/ops`:               'rsync -avz */ test_user@oco2:/blah/Blah/test'      None of these work. I read the man for rsync, but just can not figure this out. I do not have SA perms to change group owners, but thought I could copy and add test perms. Is rsync even what I should be using? Any suggestions would be greatly appreciated.


title: How do I find the offset of an ext4 filesystem?

text: I have a failing hard drive that is unable to write or read the first sectors of the disk. It just gives I/O errors and that is all there is. There are other areas on the disk that seem (mostly) fine. I am trying to mount a partition (ext4) and see if I can access some files I would like to recover. Since the `mount` command supports an `offset` option, I should be able to mount the filesystem even though the partition table is unreadable and unwriteable. The problem is how to find the offset. None of the ext4 tools seems to have this particular feature.


title: Update Oracle JDK

text: I know, there are several ways of installing ORACLE jdk7 on Debian. One way is to use the ppa from the web8updteam but i've read that installing software from ppa is not recommended on Debian. (is this true, btw??) So I decided to follow this guide to install oracle jdk. Here it's recommended to use java-package to generate a .deb package of the jdk binaries and then install it via dpkg:               $ make-jpkg jdk-7u45-linux-x64.tar.gz     $ su          $ dpkg -i oracle-j2sdk1.7_1.7.0+update45_amd64.deb      The problem with this approach is, that I will loose continuous updates of the jdk. So, my question is, how do I actually update to a newer jdk? Simply download the newer jdk, remove the current installed jdk with dpkg -r and repeat the instructions above again?


title: Why would someone want to run UserMode Linux (UML)

text: The Linux README states that: > Linux has also been ported to itself. You can now run the kernel as a > userspace application - this is called UserMode Linux (UML). Why would someone want to do this?


title: How can I tell how much my system is swapping?

text: Is there a good way to see how much my system (for example how frequently, how much swap space it is using each time/ on average) is using the swap space during various tasks?


title: Automated Clonezilla backup and GPG encryption

text: I have a desktop Linux system which I regularly create clones of to a local RAID-6 array using Clonezilla. It's proven to be quite a hassle to walk through the backup process, which takes quite a few steps:   1. Select Dvorak as the Keyboard Layout   2. Mount the RAID-6 array.   3. Select to backup the entire array and to check it.    4. Select compression options.    5. Confirm that everything is good and to proceed with the backup. I'd like to configure a distribution that does all of this without any user input at boot. How can I create a distribution for a thumb stick which automatically does all of this for me at boot without any prompts, then encrypts all of the backup files using GPG, then shuts down?


title: Pre-compiled Finale substitute for Fedora 20?

text: I recently lost my dual-booted HDD (with both Linux and Windows). It did some weird stuff and started changing all files to read-only on every start-up. So, I bought a new HDD and put Fedora 20 on it. Now, the only thing I'm looking to replace is Finale (I have found acceptable substitutes or Linux versions of everything else). I have found MusScore, NoteEdit, etc, but all of these programs need to be compiled (I can't find a suitable .rpm), and typing 'make' gives me errors. First I need `cmake`, then `qmake`, then a whole ton of things I don't recognize, and some of which I don't understand. Honestly, I've gotten to the point of saying it isn't worth it unless I can find an RPM of something, because compiling things is ridiculously difficult (I don't NEED a music writing program, just want one). Does anyone know of a suitable replacement already compiled and ready for distribution for Fedora 20? ### EDIT #1 For those who are unfamiliar with Finale, it is a music-composition software, similar to linux's NoteEdit or MusScore. It allows exportation of audio files, note annotations, and printing pages of musical scores. It also supports transposition and human playback features. Some of these things are not that important to me, and I can do some by hand (like transposition), but I would really like the audio file export and printing features. Here is the about page for Finale: http://www.finalemusic.com/products/finale/


title: gcc produces erroneous "No such file or directory" under Cygwin

text: For demo purposes, here is my one line program test.c :               #include <dbus/dbus.h>      This is my makefile :               INC     =   -I/usr/include/dbus-1.0         \                 -I/usr/lib/dbus-1.0/include          test    :   test.c                 gcc $(INC) -c -o test.o test.c      I have the dbus devel packages installed on both my Mer Linux (via zypper) and Cygwin (via the setup program). dbus/dbus.h are visible on both systems (ls /usr/include/dbus-1.0 shows the folder dbus containing the file dbus.h among many). This compiles successfully on Mer Linux, but when compiled on Cygwin (2.831 64-Bit running on Win 7), I get the follow error:               test.c:1:23: fatal error: dbus/dbus.h: No such file or directory      #include <dbus/dbus.h>                            ^     compilation terminated.     makefile:5: recipe for target 'test' failed     make: *** [test] Error 1      I've tried every simple variant I can think of to make Cygwin work - space between -I and path, extra slash on end of path, different orders of the gcc arguments. Nothing simple seems to remedy this problem which shouldn't exist. Help!


title: Linux Last command weird output? Garbage for IP address

text: This was a weird output I came across. Running the "last" command gave me this output               gryphon  pts/0        192.168.0.108    Wed Mar 19 21:04   still logged in     gryphon  pts/0        s0106d850e695678 Wed Mar 19 13:53 - 13:54  (00:01)     gryphon  pts/0        192.168.0.108    Tue Mar 18 22:57 - 23:03  (00:06)      I'm pretty sure that the weird IP address was me but what is up with the garbage for the IP address? I do not have an IPV6 address. It's just a weird hostname I don't have anything named that. I might have been VPN'ing in would that have anything to do with it?


title: Nmap too slow with a network that can't access to internet

text: I am using CentOS 6.5 and Nmap 5.51 I want to find all alive IPs in a LAN between two IPs Easily get the answer               sudo nmap -sP 192.168.1.100-200      my problem when my network can access to internet the total time spend is **1.78 seconds** but when my network can't access to internet the total time spend is **17.79 seconds** **output with internet**               [mgmt_user@Management root]$ sudo nmap -sP 192.168.1.100-200          Starting Nmap 5.51 ( http://nmap.org ) at 2014-05-21 23:05 EEST     Nmap scan report for 192.168.1.106     Host is up (0.00054s latency).     MAC Address: 08:00:27:93:2E:C5 (Cadmus Computer Systems)     Nmap scan report for 192.168.1.126     Host is up (0.0013s latency).     MAC Address: 00:16:3E:63:64:A0 (Xensource)     Nmap done: 101 IP addresses (2 hosts up) scanned in 1.78 seconds      **output without internet**               [mgmt_user@Management root]$ sudo nmap -sP 192.168.1.100-200          Starting Nmap 5.51 ( http://nmap.org ) at 2014-05-21 23:02 EEST     Nmap scan report for 192.168.1.106     Host is up (0.00042s latency).     MAC Address: 08:00:27:93:2E:C5 (Cadmus Computer Systems)     Nmap scan report for 192.168.1.126     Host is up (0.0011s latency).     MAC Address: 00:16:3E:63:64:A0 (Xensource)     Nmap done: 101 IP addresses (2 hosts up) scanned in 17.79 seconds      repeat the command many time and have the same time is there any link between Nmap and the internet ?


title: Unique synergy monitor setup

text: If anyone doesn't know about synergy, it's basically a KVM switch over the lan, but you don't have to switch anything. It allows you to move your mouse from one machine to the other like if you had dual monitors. My question is: is it possible to set up your config so that you have 1 server and 1 client, both have dual monitors, but the client machine has its monitors such that one is on the left of the server's left monitor, and the other is on the right of the server's right monitor? So for example:                    ------------  -----------  ------------  -------------     |  client  |  | server  |  | server   |  | client    |     |  screen1 |  | screen1 |  | screen2  |  | screen2   |     |          |  |         |  |          |  |           |     |----------|  |---------|  |----------|  |-----------|           Hopefully my ascii is good enough to understand. The reason I ask here is because both machines will be running linux, and I'm fairly certain that there's no supported way to do this in the synergy configs. But I am completely willing to muck with X configs on the client to get it to work. I would set this up so that the only way the client could be used is through this synergy setup, so any X mucking won't have to be changed. How synergy config works is that on your server, you give it the configuration of your screens. So you'll say client1 is right of server, and server is left of client1. What I was thinking is, is there a way to somehow make X think each display is connected on a different server. So I could say like clientS1(192.168.1.1:1234) is left of server. And clientS2(192.168.1.1:1235) is right of server. And X will know which screen it is? I'm sure that last paragraph is confusing, but maybe someone who knows more about synergy or X can point me in the right direction.


title: Setting up a wireless to ethernet bridge

text: I am trying to set up a temporary network using the following hardware               [Wireless Router]))) )) ) [laptop] ----- [Desktop]                         ^wifi (debian)  ^ethernet   ^(3com Audrey)      Looking around online, I found what might be two solutions: 1) On the laptop (running debian) set up a NAT using iptables or 2) Use parprouted I've read online that the first solution won't work because there are problems translating addresses because of the difference in MAC addresses between the eth0 and wlan0 connections, so I'm leaning toward the 2nd. What I want to know is:   1. Would either of these methods be better than the other, (and/or should I use a different approach)?   2. Is there an easy way to back up my settings in case I screw something up?


title: pysvn fails to make due to -lneon not found?

text: I am trying to install pysvn on my CentOS server and it says that -lneon is gone.   After searching their mailing lists for a bit I found what neon means but it doesn't say how can I get it? Here's my make command output:               make     /usr/local/bin/python2.7 -u generate_svn_error_codes/create_svn_error_codes_hpp.     py /usr/local/include/subversion-1     g++ -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.     2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/pyt     hon2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -DPYC     XX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  gene     rate_svn_error_codes/generate_svn_error_codes.cpp -o generate_svn_error_codes/ge     nerate_svn_error_codes     /usr/local/bin/python2.7 -u create__init__.py pysvn/__init__.py.template pysvn/_     _init__.py generate_svn_error_codes/generate_svn_error_codes _pysvn_2_7.so     Info: Creating __init__.py for module _pysvn_2_7     Info: Running 'generate_svn_error_codes/generate_svn_error_codes >>pysvn/__init_     _.py'     Compile pysvn_docs.cpp     /usr/local/bin/python2.7 -u ../Docs/generate_cpp_docs_from_html_docs.py /usr/loc     al/include/subversion-1 ../Docs/pysvn_prog_ref.html pysvn_docs.hpp pysvn_docs.cp     p     Info: svn_include /usr/local/include/subversion-1     Info: html_doc ../Docs/pysvn_prog_ref.html     Info: cpp_header_filename pysvn_docs.hpp     Info: cpp_module_filename pysvn_docs.cpp     Info: Building against SVN 1.5.7 code 1005007     Compile pysvn_docs.hpp     touch pysvn_docs.hpp     Compile pysvn_version.hpp     /usr/local/bin/python2.7 -u ../Builder/brand_version.py ../Builder/version.info     pysvn_version.hpp.template     Info: Running svnversion -c ".." 2>&1     Info: revision exported     Compile pysvn.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn.o pysvn.cpp     Compile pysvn_callbacks.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_callbacks.o pysvn_callbacks.cpp     Compile pysvn_client.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_client.o pysvn_client.cpp     Compile pysvn_static_strings.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_static_strings.o pysvn_static_strings.cpp     Compile pysvn_enum_string.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_enum_string.o pysvn_enum_string.cpp     Compile pysvn_client_cmd_add.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_client_cmd_add.o pysvn_client_cmd_add.cpp     Compile pysvn_client_cmd_changelist.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_client_cmd_changelist.o pysvn_client_cmd_changelist.cpp     Compile pysvn_client_cmd_checkin.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_client_cmd_checkin.o pysvn_client_cmd_checkin.cpp     Compile pysvn_client_cmd_copy.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_client_cmd_copy.o pysvn_client_cmd_copy.cpp     Compile pysvn_client_cmd_diff.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_client_cmd_diff.o pysvn_client_cmd_diff.cpp     Compile pysvn_client_cmd_export.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_client_cmd_export.o pysvn_client_cmd_export.cpp     Compile pysvn_client_cmd_info.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_client_cmd_info.o pysvn_client_cmd_info.cpp     Compile pysvn_client_cmd_list.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_client_cmd_list.o pysvn_client_cmd_list.cpp     Compile pysvn_client_cmd_lock.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_client_cmd_lock.o pysvn_client_cmd_lock.cpp     Compile pysvn_client_cmd_merge.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_client_cmd_merge.o pysvn_client_cmd_merge.cpp     Compile pysvn_client_cmd_prop.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_client_cmd_prop.o pysvn_client_cmd_prop.cpp     Compile pysvn_client_cmd_revprop.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_client_cmd_revprop.o pysvn_client_cmd_revprop.cpp     Compile pysvn_client_cmd_switch.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_client_cmd_switch.o pysvn_client_cmd_switch.cpp     Compile pysvn_transaction.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_transaction.o pysvn_transaction.cpp     Compile pysvn_revision.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_revision.o pysvn_revision.cpp     Compile pysvn_docs.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_docs.o pysvn_docs.cpp     Compile pysvn_path.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_path.o pysvn_path.cpp     Compile pysvn_arg_processing.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_arg_processing.o pysvn_arg_processing.cpp     Compile pysvn_converters.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_converters.o pysvn_converters.cpp     Compile pysvn_svnenv.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_svnenv.o pysvn_svnenv.cpp     Compile pysvn_profile.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o pysvn_profile.o pysvn_profile.cpp     Compile cxxsupport.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o cxxsupport.o /home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src/cxxsupport.cxx     Compile cxx_extensions.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o cxx_extensions.o /home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src/cxx_extensi     ons.cxx     Compile cxxextensions.o     gcc -c -Wall -fPIC -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1 -I/home/omerk     atz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/python2.7 -I/usr/loc     al/include/subversion-1 -I/usr/include/httpd -I.  -o cxxextensions.o /home/omerk     atz/pysvn-1.7.4/Import/pycxx-6.2.1/Src/cxxextensions.c     Compile IndirectPythonInterface.o     g++ -c -Wall -fPIC -fexceptions -frtti -I/home/omerkatz/pysvn-1.7.4/Import/pycxx     -6.2.1 -I/home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src -I/usr/local/include/     python2.7 -I/usr/local/include/subversion-1 -I/usr/include/httpd -I. -DNDEBUG -D     PYCXX_PYTHON_2TO3 -Dinit_pysvn=init_pysvn_2_7 -Dinit_pysvn_d=init_pysvn_2_7_d  -     o IndirectPythonInterface.o /home/omerkatz/pysvn-1.7.4/Import/pycxx-6.2.1/Src/In     directPythonInterface.cxx     Compile pysvn/_pysvn_2_7.so     g++ -shared  -o pysvn/_pysvn_2_7.so pysvn.o pysvn_callbacks.o pysvn_client.o pys     vn_static_strings.o pysvn_enum_string.o pysvn_client_cmd_add.o pysvn_client_cmd_     changelist.o pysvn_client_cmd_checkin.o pysvn_client_cmd_copy.o pysvn_client_cmd     _diff.o pysvn_client_cmd_export.o pysvn_client_cmd_info.o pysvn_client_cmd_list.     o pysvn_client_cmd_lock.o pysvn_client_cmd_merge.o pysvn_client_cmd_prop.o pysvn     _client_cmd_revprop.o pysvn_client_cmd_switch.o pysvn_transaction.o pysvn_revisi     on.o pysvn_docs.o pysvn_path.o pysvn_arg_processing.o pysvn_converters.o pysvn_s     vnenv.o pysvn_profile.o cxxsupport.o cxx_extensions.o cxxextensions.o IndirectPy     thonInterface.o -L/usr/local/lib -Wl,--rpath -Wl,/usr/local/lib -lsvn_client-1 -     lsvn_diff-1 -lsvn_repos-1 -lcom_err -lresolv -lexpat -lneon -lssl     /usr/bin/ld: cannot find -lneon     collect2: ld returned 1 exit status     make: *** [pysvn/_pysvn_2_7.so] Error 1


title: Which scripting language is most widespread in system administration tasks?

text: I am migrating to Linux and have some experience with the Mac OS X command line/bash. I'd like to automate system admin tasks via scripting, but I am unsure as which language is the most used in the real world: bash shell scripting, Perl or Python ? Which should I learn (if more than one, what order) ? Thanks, Scott


title: How to clone a NTFS partition (WinXP) from a damaged disk to a new one?

text: I'm an Italian Windows programmer. I know almost nothing of Linux, so please be patient if the question is dumb and pardon my bad english. I need to clone a NTFS partition from a damaged, near to die hard disk (SCSI, if this matters) to a new one (SATA). I've installed the last version of Hiren's Boot CD utilities on a USB stick, and tried with GParted, which told me that it can't copy/paste the partition because it's damaged and "flagged" by windows to run CHKDSK. I followed the Warning advice and tried to repair it using `CHKDSK /f` (it took 9 hours and exited with an error after "phase 3") and a Linux program I can't recall right now, without success. I tried to clone using Clonezilla, and it failed as well, for the same reasons. In the HBCD there's dd_rescue, but it failed again because it can't find "ntfs.something". In the end, all that I want is to clone that partition as it is, with his errors and everything. I can repair it on the new drive. So, what should I do?


title: aliasing cd to pushd - is it a good idea?

text: Is it a good idea to use the following alias:               cd() {         pushd $1;     }      in bash? I think this would be very useful, since I can then use a series of `popd`s instead of just a `cd -` once. Is there any case where this might be a problem?


title: SSH: Network is unreachable (caused by router)

text: I've searched solution in _Google_ for 3 days, when I decided to write here. I have a router, so in my house is _WLAN_. I use laptop when I stay at home. In another city in my office I have a second computer (PC). I can connect with this PC using SSH protocol. Unfortunately I can't connect with my laptop from PC. When I try to do this, I see the statement:               ssh: connect to host XX.XX.XX.XX port 22: Network is unreachable      Daemon SSHD is running in my laptop. What is interesting, this connection worked correctly a few months ago, but I reinstalled the SSHD and now is the problem. **/sbin/route** shows:               Kernel IP routing table     Destination     Gateway         Genmask         Flags Metric Ref    Use Iface     default         192.168.9.1     0.0.0.0         UG    0      0        0 wlan0     192.168.9.0     *               255.255.255.0   U     2      0        0 wlan0      **/sbin/ifconfig** prints:               eth0      Link encap:Ethernet  HWaddr XX:XX:XX:XX:XX:XX               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:0 errors:0 dropped:0 overruns:0 frame:0               TX packets:0 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000                RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)               Interrupt:47           lo        Link encap:Local Loopback                 inet addr:127.0.0.1  Mask:255.0.0.0               UP LOOPBACK RUNNING  MTU:16436  Metric:1               RX packets:169 errors:0 dropped:0 overruns:0 frame:0               TX packets:169 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:0                RX bytes:13189 (12.8 Kb)  TX bytes:13189 (12.8 Kb)          wlan0     Link encap:Ethernet  HWaddr XX:XX:XX:XX:XX:XX               inet addr:192.168.9.107  Bcast:192.168.9.255  Mask:255.255.255.0               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:76455 errors:0 dropped:0 overruns:0 frame:0               TX packets:82766 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000                RX bytes:53583517 (51.1 Mb)  TX bytes:13182981 (12.5 Mb)      I suppose, that the problem is related with settings of gateway, but I'm layman in this subject (Computer Network). This suggestion is due to my Google's investigation.


title: How to change the Xorg gamma/brightness?

text: I'm trying to play a game (Deus Ex) which I have to modify the brightness since it is very dark in my ambiance. The game has a "Brightness" setting, but lately it doesn't work. I tried to figure out how to change it and find out that `xgamma` do a similar effect with `xgamma -gamma 5`. But whenever I change it, the settings revert back after almost a second (so yeah, my screen light up then shuts down). How can I either, make the `xgamma` settings permanent (or persistent) or I have to use another tool? My system is a desktop. Seemsly `xrandr --output DVI-0 --brightness 2` do the same, but still reverts back to 0 whenever I apply the settings. Each time I _try_ to change it the following output fill the `Xorg.0.log` file:               [ 14768.313] (II) RADEON(0): EDID vendor "HWP", prod id 9798     [ 14768.313] (II) RADEON(0): Using hsync ranges from config file     [ 14768.313] (II) RADEON(0): Using vrefresh ranges from config file     [ 14768.313] (II) RADEON(0): Printing DDC gathered Modelines:     [ 14768.313] (II) RADEON(0): Modeline "1024x768"x0.0   65.00  1024 1048 1184 1344  768 771 777 806 -hsync -vsync (48.4 kHz eP)     [ 14768.313] (II) RADEON(0): Modeline "800x600"x0.0   40.00  800 840 968 1056  600 601 605 628 +hsync +vsync (37.9 kHz e)     [ 14768.313] (II) RADEON(0): Modeline "640x480"x0.0   31.50  640 656 720 840  480 481 484 500 -hsync -vsync (37.5 kHz e)     [ 14768.313] (II) RADEON(0): Modeline "640x480"x0.0   31.50  640 664 704 832  480 489 492 520 -hsync -vsync (37.9 kHz e)     [ 14768.313] (II) RADEON(0): Modeline "640x480"x0.0   25.18  640 656 752 800  480 490 492 525 -hsync -vsync (31.5 kHz e)     [ 14768.313] (II) RADEON(0): Modeline "720x400"x0.0   28.32  720 738 846 900  400 412 414 449 -hsync +vsync (31.5 kHz e)     [ 14768.313] (II) RADEON(0): Modeline "1024x768"x0.0   78.75  1024 1040 1136 1312  768 769 772 800 +hsync +vsync (60.0 kHz e)     [ 14768.313] (II) RADEON(0): Modeline "1024x768"x0.0   75.00  1024 1048 1184 1328  768 771 777 806 -hsync -vsync (56.5 kHz e)     [ 14768.313] (II) RADEON(0): Modeline "832x624"x0.0   57.28  832 864 928 1152  624 625 628 667 -hsync -vsync (49.7 kHz e)     [ 14768.313] (II) RADEON(0): Modeline "800x600"x0.0   49.50  800 816 896 1056  600 601 604 625 +hsync +vsync (46.9 kHz e)     [ 14768.313] (II) RADEON(0): Modeline "800x600"x0.0   50.00  800 856 976 1040  600 637 643 666 +hsync +vsync (48.1 kHz e)      So, apparently my monitor gets redetected each time.


title: How to know free disk size witout df command?

text: Is it possible to check free disk size in Linux **without using command lines such as`df`**? Since my host machine is embedded Linux, there are no direct command lines that show free disk size.


title: How to host a website on personal computer

text: I want to start hosting my website at my own computer as well websites of my friends too (say mini hosting platform). I learned Debian, Bind9 and Apache for this purpose. On my system everything is going well. Even my IP opens up my website from outside my network. But my domain (say, `abx.com`) does not show my website. How can I set things up so that `abx.com` points to my website?


title: How do I install Slax to a usb stick?

text: I want to install Slax on my usb stick, but I just can't get it to work. I tried copying the contents of the .zip file to the usb stick, and I got to some grub rescue thingy. I also tried Unetbootin, but it couldn't download the iso itself, and when I downloaded the iso manually, it couldn't find the /slax files. How do I get it working?


title: mv: cannot stat No such file or directory in shell script

text: I wrote a script to move some files form one folder to another folder but I got the following error, I checked 2 folders and notice for 1 folder there are such files and another there is no such files, but why all of them shows "mv cannot stat No such files or directory"                   mv: cannot stat `/home/esolve/project/capture/tcp_50x50/dest_folder/194.199.68.165_tcp.folder/data/*': No such file or directory         mv: cannot stat `/home/esolve/project/capture/tcp_50x50/dest_folder/194.42.17.124_tcp.folder/data/*': No such file or directory         mv: cannot stat `/home/esolve/project/capture/tcp_50x50/dest_folder/195.113.161.13_tcp.folder/data/*': No such file or directory         mv: cannot stat `/home/esolve/project/capture/tcp_50x50/dest_folder/203.159.127.3_tcp.folder/data/*': No such file or directory         mv: cannot stat `/home/esolve/project/capture/tcp_50x50/dest_folder/212.199.61.205_tcp.folder/data/*': No such file or directory         mv: cannot stat `/home/esolve/project/capture/tcp_50x50/dest_folder/212.51.218.235_tcp.folder/data/*': No such file or directory         mv: cannot stat `/home/esolve/project/capture/tcp_50x50/dest_folder/213.73.40.105_tcp.folder/data/*': No such file or directory         mv: cannot stat `/home/esolve/project/capture/tcp_50x50/dest_folder/41.225.7.4_tcp.folder/data/*': No such file or directory         mv: cannot stat `/home/esolve/project/capture/tcp_50x50/dest_folder/83.230.127.122_tcp.folder/data/*': No such file or directory         [esolve@kitty tcp_50x50]$ ls /home/wgong/project/capture/tcp_50x50/dest_folder/194.199.68.165_tcp.folder/         [esolve@kitty tcp_50x50]$ ls /home/wgong/project/capture/tcp_50x50/dest_folder/203.159.127.3_tcp.folder/data/         129.88.70.226   132.187.230.1    138.96.116.22   155.185.54.250   192.38.109.144  193.136.227.163  193.175.135.61  195.113.161.13  83.230.127.122         130.104.72.200  132.227.62.122   147.83.29.232   156.17.10.52     192.42.43.22    193.137.173.218  193.205.215.74  212.199.61.205         131.130.69.164  132.252.152.194  148.81.140.193  157.181.175.249  192.43.193.71   193.144.21.131   193.226.19.30   212.51.218.235         131.188.44.102  134.151.255.180  152.66.245.162  160.78.253.31    193.1.170.136   193.145.46.243   194.199.68.165  213.73.40.105         131.254.208.10  138.48.3.203     152.81.47.4     192.114.4.3      193.136.166.56  193.166.160.98   194.42.17.124   41.225.7.4      the script is :                   list=`ls dest_folder`         cd dest_folder         cwd=`pwd`         for folder in $list;do                 mv ${cwd}/${folder}'/data/*' ${cwd}/${folder}         done      I ran it in `/home/esolve/project/capture/tcp_50x50/`


title: What does ampersand mean at the end of a shell script line?

text: sh sys-snap.sh &      What is `sh`? What is `sys-snap.sh`? Why I should put `&` at the end of the line? Can anyone explain the syntax? Without the `&` the script won't go back to the prompt till I press `Ctrl`+`C`. With `&` I can press enter and it works.


title: Custom autocomplete: deal with spaces in filenames

text: A bit of context, this question is a follow-up of this one: Bash remote autocompletion : change the 'starting' directory Anyway, I'm writing my custom autocompletion bash script: I want the autocompletion to work just like `cd` does, except that I want to get the names from a specific directory, not necessarily the current one. It works great except when filenames have spaces in them. A quick example. Let's say the directory I'm getting the names from has two files in it: `a_file` and `another file` (notice the space). This happens: `my_command``TAB``TAB`   `a_file` `file` `another` The presentation isn't perfect but the idea is that I'm prompted with 3 choices, `another file` being split in `another` and `file`. The desired output would be: `file_1` `another file`. I would also like spaces to be escaped automatically: `my_command ano``TAB`   `my_command another\ file` Here's what my script looks like:               #!/bin/bash          _get_file_list()     {         dir="/some/path/"         cd $dir         find * -maxdepth 0     }          _GetOptMyCommand()     {         local cur              COMPREPLY=()         cur=${COMP_WORDS[COMP_CWORD]}              case "$cur" in         -*)             COMPREPLY=( $( compgen -W "-h -l --help --list --" -- "$cur" ) );;         *)             COMPREPLY=( $( compgen -W "$(_get_file_list)" -- "$cur" ) );;         esac              return 0     }          complete -F _GetOptMyCommand my_command      How do I deal with spaces in filenames and make my autocompletion script like `cd` ?


title: Passing quotes and full strings to bash -c or zsh -c

text: When I am in Perl and I call `system(some_command)`, this invokes `some_command` on `/bin/sh`. I would like it instead to run `some_command` in another shell such as `bash` or `zsh`. One way of running commands on `zsh` or `bash` from `sh` is to call `zsh -c '<command>'`. The idea would be to pass this to `system()`, but this requires using single quotes around `<command>`. But what if `<command>` already has quotes in it? How do I pass it to `zsh -c`? For example:               find . -name 'something*.txt'      The example above is just for illustrative purpose. Another example would be when I need to pass something with quotes to a binary that I want to invoke from `bash` or `zsh`.


title: What is Fedora's equivalent of deborphan?

text: An installed library that has no installed packages depending on it is referred to as **orphaned**. One of the tools used to determine which libraries are orphaned on a Debian system is named deborphan. What is the Fedora equivalent?


title: Screen, remote login failure, and disappearing text

text: When in a screen session via ssh, if I attempt to connect to another host via scp or ssh and the auth fails, any subsequent text I type in the terminal will not be displayed, however it is being entered and can be executed. > [user@host Oracle]$ scp user2@host2:/path/to/files .   >  user2@host2's password:   >  Permission denied, please try again.   >  user2@host2's password:   >  [user@host Oracle]$   >  [user@host Oracle]$   >  [user@host Oracle]$   >  [user@host Oracle]$   >  [user@host Oracle]$ [user@host ~]$ [user@host ~]$ What you can't see above is that I did 'cd' on the last line. It executed but output stays on the same line. ^C will give me a new line. Is there a way to recover without losing my screen session?


title: Difference between poll_s and ep_poll WCHAN in ps output

text: When I issue `ps -elf|grep python` for example on my system, I see these:               1 S 1000      6020  6008  0  80   0 -  9914 poll_s Jul12 ?        00:00:01     python manage.py run_gunicorn -t 3600 -w 8 -b 127.0.0.1:8000     0 S 1000     22496 22491  0  80   0 - 10477 ep_pol 12:32 ?        00:00:10     /var/lib/mywebapp/env/bin/python /var/lib/mywebapp/env/bin/pserve development.ini      What is the difference between `poll_s` and `ep_pol`?


title: Linking Intel RAID 5 partitions to boot disk

text: I have a 5-disk Intel RAID 5 along with a 6th boot disk with /, /boot, and swap. What I was planning to do was mount the Intel RAID partitions (which I've added with fdisk) so that the 6th disk /home, /var, /srv, etc. link to the RAID on the other 5 disks. So far, my attempts at doing this have failed (editing fstab, trying to mount the /dev/dm-* partitions manually, etc.) have failed. Does anyone have experience in this and can point me in the right direction? Edit: I have the RAID array partitioned so that I can mount each partition as a folder on the boot disk, i.e. RAID /dev/dm-0 -> bootdisk /home.


title: Batch importing .sql files

text: I have a bunch of .sql files in a directory that I need to import. Although I can do it manually, for scripting purposes I need to be able to apply them in bulk. How can I do that though? What combination of options and commands do I need? The mysqlimport command goes like this:               mysqlimport [options] db_name textfile1 [textfile2 ...]      I need to be able to add all the text files to the end. I would prefer a command than a convoluted for loop if possible. Any suggestions?


title: Why do newlines mess up my while condition?

text: I have a while loop that allows setting variables when written one way but does not allow it when written another way. Why is that? This prints var as 1234 and does not print var2               #!/bin/bash          var=1234          while var=9876 var2=765 read line     do              echo $var $var2         echo $line          done <datafile          echo out of loop $var      This prints var as 9876 and also prints var2               #!/bin/bash          var=1234          while      var=9876      var2=765      read line     do              echo $var $var2         echo $line          done <datafile          echo out of loop $var


title: using scp command to transfer files keeping the same names intact?

text: Using `scp` command I want to move files from local system to a remote system. I'm doing something like this:               $ scp file1 root@abc:root /root/tmp      With this command I'm able to upload `file1` to `abc:/root`, but the problem is that it changes the names to `tmp` like in my case, I want to keep the name the same as the original and just copy it to the folder. How can I do this?


title: SWF to PDF conversion

text: Are there any tools for converting SWF to PDF? I have a bunch of SWF files (to be ripped from the web) and I'd like to group them into single PDF.


title: Linux compatible motherboard

text: Where can I find a list with Linux compatible motherboards. I want all features of the motherboard to work reasonably well with latest valilla Linux kernel (ie, clearly document that I need external module, and I'll decide if this module is reasonably maintained). Obviously hibernate audio and networking should work. It is important for me that it would work "out of the box", so that maintaining a few Linux boxes with this motherboard will be easy (recompiling an external kernel module from source for each major kernel upgrade is not that easy...).