title: Ubuntu 13.10 x64 - slow and acting strangely gvfs+NTFS

text: I have updated Ubuntu 13.10 x64 to latest stable releases of all packages. I'm running GNOME and using SSD disks on USB 3.0 ports in lenovo Y500 notebook. I'm using Midnight Commander (as root) in GNOME to make operations on files (copy). What I observe is that when copying file (whole question - large files - few GBs) using `mc` from system drive (external SSD) to SSD or HDD (inside=SATA3 or outside=USB 3.0) there are some problems:   1. I start copying file and there is no progress bar starting, as the file is copied (LEDs are blinking), then after some time the progress bar moves from the beginning fast through whole file and ends the copy process (but not write?).   2. As the file is copied (progress bar ends) there is sometimes very long or endless hang after `sync` command issued right after copying. Then the LEDs are blinking again (second write? first wasn't complete?).   3. The overall speed of the copy process is terrible! As SSD under Windows on USB 3.0 gives about 200MB/s constant write speed, on Ubuntu there are few MB/s... Also, to write on external HDD on Windows - about 80MB/s, on Ubuntu - few MB/s. In `Disks` there is write cache enabled for all tested drives. Also hdparm is configured to use write_cache (on). As I try to not to use GNOME, gvfs and fuse - booting directly into shell and mounting partitions as ntfs-3g gives full performance and no problems at all (as I can remember). I've updated gvfs to latest stable version for today (build it), but it didn't solved the problem (nearly no change). The same with ntfs-3g. On previous versions of Ubuntu, without gvfs, there were no such problems. What is the problem and what can be done to speed up the disk operations and make them more stable? The are nearly no problems with ext3/ext4 filesystems.


title: tar delete progress question

text: I was trying to use **tar** command , `--delete` option and met some problems. There are two things I don't understand:   1. when using `--verbose` option with combination of --delete option, nothing shows as `--verbose` usually do, i.e. no show of deleted files.   2. when using `--totals` option, the deleted size is always 0, it doesn't make sense and I can't figure out the meaning of these output.  Can anyone help me with these? The following code shows the procedure.               x@x:~/bin$ tar --list --file=pomo.tar     pomodoro     pomodoro_2     pomodoro_3     x@x:~/bin$ tar --append --file=pomo.tar quitpomo --verbose     quitpomo     x@x:~/bin$ tar --list --file=pomo.tar     pomodoro     pomodoro_2     pomodoro_3     quitpomo     x@x:~/bin$ tar --list --file=pomo.tar --totals     pomodoro     pomodoro_2     pomodoro_3     quitpomo     Total bytes read: 10240 (10KiB, 12MiB/s)     x@x:~/bin$ tar --delete --file=pomo.tar quitpomo --total --verbose     Total bytes read: 10240 (10KiB, 86MiB/s)     Total bytes written: 10240 (10KiB, 86MiB/s)     Total bytes deleted: 0


title: Can't create a bootable (live) usb flash for arch linux

text: I created a bootable usb from which I was going to install Arch. I did this the following way:               sudo dd if=/path_to_arch_.iso of=/dev/sdX      But when I tried to boot from this usb flash, I failed. There was no error, it just couldn't boot from it. I downloaded iso file from the official arch linux website recently so it should be up to date. Previously I was able to install mint, elementary and ubuntu from usb flash successfully. **It preventing me booting the following way:** After selecting "boot from usb" I was shown a black screen for 1 second and brought back to the menu where I must choose a temporary boot device. When I did it again the story repeated. What might be the cause?


title: Save multiple URL targets to text files

text: I have a list of URLs and I want to save each of their targets in a separate text file. Here's an example of the input file containing the URLs:               ~$: head -3 url.txt      http://www.uniprot.org/uniprot/P32234.txt     http://www.uniprot.org/uniprot/P05552.txt      http://www.uniprot.org/uniprot/P07701.txt      I'm currently using a Python custom function to accomplish this task. It works, but the main inconvenient are: user has to copy-paste URLs manually (there's no direct file input) and the output contains some 'b' characters at the beginning of each line (?binary).               ~$: head -3 P32234.txt     b' ID   128UP_DROME             Reviewed;         368 AA.     'b' AC   P32234; Q9V648;     'b' DT   01-OCT-1993, integrated into UniProtKB/Swiss-Prot.      Here's the Python code:               def html_to_txt():          import urllib.request          url = str(input('Enter URL: '))          page = urllib.request.urlopen(url)          with open(str(input('Enter filename: ')), "w") as f:              for x in page:                  f.write(str(x).replace('\\n','\n'))          s= 'Done'          return s      Is there a cleaner way of doing this using some Unix utilities?


title: Transfer 2 drive raid0 / lvm2 system to new drive pair

text: I have a multi-boot, multi-drive system that I want to transfer onto 2 bigger drives. Currently pc has 2x1TB drives with Fedora 19 running, using RAID0 drive mirroring, with LVM2 on top of the md. I want to transfer the entire md/lvm set of filesystems to a new pair of 2TB drives configured in the same raid0/lvm2 arrangement. In addition to Fedora, there are Windows 7 partitions, and other misc partitions to copy. To make matters harder, the Fedora root filesystem exists in the md/lvm2 partition, so I need to bring up all this infrastructure. /boot is in a real primary partition. So I'm able to install the 2 new drives at the same time the old drives are still installed, so it is basically a big copy task, but the details are the tricky part. Using a GParted Live boot disk, I can go in and configure the new drives in a new raid0 and lvm2 vg called "pool2". The original vg is called "pool". I partition & mount up the new filesystems and tar/copy all the files from old to new. But now the two hard parts are biting me.   1. Getting grub2 to install/boot the new copy of the Fedora partition.   2. Getting Windows to boot on its new copy.  Actually never to go trying #2, so for #1, Here's details of what I tried, and where I got stuck. After the copy, I disconnect the old drives and change new drives to sda and sdb. Booting back again with the boot iso, Then I have to manually start the raid0 with the commands:               mdadm -E --scan     mdadm -A /dev/md0      No errors, /proc/mdstat shows the raid active with RAID0. Then I have to manually start the vg with:               vgchange -a y pool2 Now to reinstall grub2 on the new partitions:               mount /dev/mapper/pool2-root /mnt/fedora     mount /dev/sda1 /mnt/fedora/boot          cd /mnt/fedora     mount -o bind /dev dev     mount -o bind /proc proc     mount -o bind /sys sys     mount -t tmpfs tmpfs tmp     chroot /mnt/fedora     grub2-install /dev/sda      Everything appears to go fine. But when I try to reboot from the new disk drives, I either get nothing as if grub2 isn't found, or I get the grub menu and it then fails during the boot very early, because it can't find the root filesystem. What I think is happening is all the grub.cfg file is still full of the old references such as:               root=/dev/mapper/pool-root     rd.lvm.lv=pool/root     and probably UUIDs wrong.      (remember the new drives are on pool2). I also suspect maybe the initrd settings are incorrect for the new locations. Manually changing these values in grub.cfg don't seem to help, so how can I get this working? I think I'm really close, but having to do a lot of manual md/lvm2/grub2 commands I'm no expert in, and am missing something.


title: missing files after reassemble of RAID-5

text: I had to open my file-server's housing today to replace a faulty fan. What I didn't see was that one of the sata-cables was not properly connected. The 1st thing I did after a reboot was a check of the RAID status and it showed immediately that one drive is missing. Till this moment the device was not used (however it was mounted, so I'm not 100% sure that system did nothing). I stopped md0 and re-plugged in the cable:               mdadm --stop /dev/md0     poweroff      After another reboot I checked the removed drive:                mdadm --examine /dev/sdd1      ...            Checksum : 3276bc1d - correct              Events : 315782                   Layout : left-symmetric          Chunk Size : 32K                Number   Major   Minor   RaidDevice State     this     0       8       49        0      active sync   /dev/sdd1             0     0       8       49        0      active sync   /dev/sdd1        1     1       8       65        1      active sync   /dev/sde1        2     2       8       33        2      active sync   /dev/sdc1        3     3       8       17        3      active sync   /dev/sdb1      I was a bit surprised that it was shown as active (even if earlier `mdadm` said that this device was removed from array) and the checksum was OK. I recreated RAID with:               mdadm --assemble /dev/md0 --scan      The command `mdadm --detail /dev/md0` showed that all drives were running and system was in "clean" state. I mounted the device md0 and then came hic-cup. I wanted to work on one of the last files that I had been using before all the situation and it was not there. In another place I missed actually all files from the directory where I was working. As far as I can see most of the files that are older than a few days are intact but some newer ones are missing. Now the big question: what would be your advice? Is there a way to get this data? I thought about removing the drive that was earlier labeled by `mdadm` and rebuild array with another HDD. **UPDATE** I started to back-up the drives today. After mounting md0 as read-only I run `rsync` to another server. Now curious thing. I moved a week ago some directories to other array. `rsyns` has shown following info on these removed dirs:               file has vanished: "/MD0/Data/_NMR_"


title: libcurl.so.4 undefined reference error

text: Even after installation of curl and all concerned libcurl packages such as curl libcurl3 libcurl3-gnutls   libcurl4-doc   libcurl4-nss-dev   libcurl-ocaml   libcurl3-dbg   libcurl3-nss   libcurl4-gnutls-dev   libcurl4-openssl-dev   libcurl-ocaml-dev I get errors such as ,               /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSL_CTX_use_certificate_chain_file@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSL_CTX_set_verify@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `ASN1_STRING_type@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `CRYPTO_free@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSL_get_shutdown@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSL_get_verify_result@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `d2i_PKCS12_fp@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `EVP_cleanup@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSL_write@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSL_peek@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `BIO_new@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSL_set_fd@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSL_get_privatekey@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `BN_num_bits@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSL_connect@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `DES_set_odd_parity@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `RAND_egd@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSL_CTX_set_srp_password@OPENSSL_1.0.1'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `X509_get_pubkey@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `ENGINE_init@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSL_set_connect_state@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSL_CTX_get_cert_store@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `X509_NAME_get_entry@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `ERR_free_strings@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `RAND_add@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSL_ctrl@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `sk_pop_free@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSL_free@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `BIO_free@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `GENERAL_NAMES_free@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `ENGINE_get_id@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSL_library_init@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSL_CTX_ctrl@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `ASN1_STRING_print@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `X509_NAME_ENTRY_get_data@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `ENGINE_get_next@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `ERR_get_error@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `RAND_file_name@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `CRYPTO_cleanup_all_ex_data@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSL_CTX_set_default_passwd_cb_userdata@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSL_CTX_use_certificate_file@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `BN_bn2bin@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSL_get_peer_cert_chain@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `X509_check_issued@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `ERR_clear_error@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSL_pending@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `ENGINE_free@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `BIO_s_mem@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `EVP_PKEY_copy_parameters@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSLv23_client_method@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSL_CTX_add_client_CA@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSL_CTX_use_PrivateKey@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `X509_get_serialNumber@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSL_CTX_callback_ctrl@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `MD4_Update@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `MD4_Final@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `PEM_read_X509@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSLeay@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `ENGINE_get_first@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `X509_get_subject_name@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `MD5_Final@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `ENGINE_load_builtin_engines@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `ENGINE_ctrl@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `X509V3_EXT_print@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSL_load_error_strings@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSL_set_session@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `X509_NAME_get_index_by_NID@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `ENGINE_ctrl_cmd@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `TLSv1_client_method@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSL_CTX_check_private_key@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `ENGINE_by_id@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSL_get_certificate@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSLv3_client_method@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `X509_verify_cert_error_string@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSL_get_peer_certificate@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSL_CTX_new@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `OPENSSL_add_all_algorithms_noconf@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `sk_value@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSL_CTX_use_PrivateKey_file@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `X509_EXTENSION_get_object@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `ASN1_INTEGER_get@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `X509_get_ext_d2i@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `X509_load_crl_file@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSL_CTX_set_cipher_list@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `DES_set_key@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSL_get1_session@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `ERR_peek_error@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `X509_STORE_add_lookup@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSL_get_current_cipher@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `ASN1_STRING_to_UTF8@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `ENGINE_load_private_key@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `PEM_write_bio_X509@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `ENGINE_finish@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `MD4_Init@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `X509_free@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `CRYPTO_malloc@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `PKCS12_PBE_add@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `ENGINE_cleanup@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `MD5_Init@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `PKCS12_parse@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `UI_OpenSSL@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `X509_get_issuer_name@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `EVP_PKEY_free@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSL_CTX_free@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSL_get_error@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSL_CTX_set_default_passwd_cb@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `ERR_error_string_n@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `BIO_ctrl@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSL_new@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSL_shutdown@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `X509_STORE_CTX_get_current_cert@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSL_SESSION_free@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `ASN1_STRING_length@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `sk_pop@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `DES_ecb_encrypt@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `RAND_status@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `X509_LOOKUP_file@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSL_CTX_use_certificate@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `X509_STORE_set_flags@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSL_read@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `ENGINE_set_default@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `ASN1_STRING_data@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSL_CTX_set_srp_username@OPENSSL_1.0.1'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `RAND_load_file@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSL_CTX_load_verify_locations@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `i2t_ASN1_OBJECT@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `ERR_remove_thread_state@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `RAND_bytes@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `MD5_Update@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `SSL_CIPHER_get_name@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `X509_EXTENSION_get_critical@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `PKCS12_free@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `sk_num@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `ERR_error_string@OPENSSL_1.0.0'     /usr/lib/x86_64-linux-gnu/libcurl.so.4: undefined reference to `X509_NAME_print_ex@OPENSSL_1.0.0'     collect2: error: ld returned 1 exit status      Any help appreciated


title: FATAL: Module hello.ko not found

text: I'm using `CentOS-6.5` and default kernel is `2.6.32-431.11.2.el6.x86_64`. I downloaded `2.6.32` and built that kernel (under `/lib/modules/2.6.32`). I wrote a module for simple `hello world` program. This program is working under below case: Makefile: `/lib/modules/$(shell uname -r)/build` (default kernel)               $ sudo insmod hello.ko          $ dmesg     module inserted..     hello world..      My program is not working for below case: Makefile: `/lib/modules/3.2.32/build` (newly built kernel)               $ sudo insmod hello.ko     insmod: error inserting 'hello.ko': -1 Invalid module format          dmesg:      hello: disagrees about version of symbol module_layout      I tried `modprobe` for both cases it is showing below error `FATAL: Module hello not found.` How compile my module with `2.6.32` kernel?


title: How can I write ftp command for a file transfer from one server to other?

text: How can I write ftp command for a file transfer from one server to other with a simple script?


title: How to retrieve sysfs devpath of a USB flash drive given its corresponding partition sysfs path?

text: I have a USB flash drive connected to a hub. Its storage device partition devpath in sysfs is `/devices/pci0000:00/0000:00:12.2/usb6/6-1/6-1.2/6-1.2:1.0/host10/target10:0:0/10:0:0:0/block/sdb/sdb1`. I would like to retrieve the corresponding USB device path (i.e. `/devices/pci0000:00/0000:00:12.2/usb6/6-1/6-1.2`, or even better `/sys/bus/usb/devices/6-1.2`). I'm going to do it in some scripting language (shell, python, whatever) for any device inserted into the PC. **EDIT** : I get the original partition's devpath from udev, and I need to trace it back to the USB device entry. The most simple&stupid approach is to navigate the path upwards, up to the 6-1.2 entry. It has a few serious and obvious drawbacks, though. First, the device may or may not be connected to a hub, and thus its devpath may change. Second, the device may or may not have partitions, which also changes the devpath. I also need a generic solution, not just for the 6-1.2 device. Apparently, there are no symlinks leading to the actual device entry from the `.../block/sdb/sdb1` directory. Is there any elegant way to do what I want at all?


title: Can the same ext4 disk be mounted from two hosts, one readonly?

text: I know that mounting the same disk with an ext4 filesystem from two different servers (it's an iSCSI vloume) will likely corrupt data on the disk. My question is **will it make any difference if one of the servers mounts the disk read-only while the other mounts it read-write?** I know OCFS2 or the likes could be used for this and that I could export the disk with NFS to be accesible to the other server, but I would like to know if the setup I propose will work.


title: Where to find the VBR on the /dev/sda1 partition?

text: I have one built-in hard disk `/dev/sda` which looks like this:               Disk /dev/sda: 160.0 GB, 160041885696 bytes     255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x00042134             Device Boot      Start         End      Blocks   Id  System     /dev/sda1   *        2048   293048319   146523136   83  Linux     /dev/sda2       293050366   312580095     9764865    5  Extended     /dev/sda5       293050368   312580095     9764864   82  Linux swap / Solaris      Now I can easily find the MBR with `xxd /dev/sda | less`, it's located in the first sector. According to Wikipedia the VBR must be in the first sector within the first bootable partition, in my case `/dev/sda1`. But in the first sector of `/dev/sda1` I only see zeroes when I do a `xxd /dev/sda1 | less`. I actually thought to find binary code of GRUB in there, where could it be then?


title: bind9: client update denied

text: I've a bind9.7.3 running on Debian squeeze. I've configured a zone to accept dynamic update using a key: (I've replaced the key and the actual domain names ...)               key "yme" {             algorithm hmac-md5;             secret "topsecret";     };          zone "some-domain.de" in {       type master;       file "/etc/bind/zones/some-domain.de";       allow-update {         key yme;       };     };          zone "some-other-domain.net" in {       type master;       file "/etc/bind/zones/some-other-domain.net";       allow-update {         key yme;       };     };      Now, I send updates from a pfSense installation and I always get               22-Mar-2013 13:08:15.969 update-security: client 1.2.3.4#30949: update 'some-other-domain.net/IN' denied      The key is configured correctly on both sides, there is no clock skew between the both sides. What else could be the problem, what might I have overlooked?


title: Mint 16 - Won't boot to USB

text: I am attempting to completely remove my Linux Mint 16 MATE OS and reinstall Windows 8. At which point, I'll decide if I want to reinstall a Linux OS (most likely will). **The issue I'm having is that my computer won't boot to USB,** even though I've set USB as the very first option in the BIOS UI. I'm wondering if the fact that I've got a UEFI bootloader has anything to do with it... **I've disabled fast-boot and secure-boot options.** Any idea what might be the issue?


title: Shell script to replace string in multiple files within selected directories

text: I created the script below which takes the path of a single directory and replaces search string in all the files within that directory. I would like to enhance this script in such a way that it can search and replace the string in multiple directories which are listed in an external input file. External input file content:               /var/start/system1/dir1     /var/start/system2/dir2     /var/start/system3/dir3     /var/start/system4/dir4      Script with one directory:               filepath="/var/start/system/dir1"     searchstring="test"     replacestring="test01"          i=0;           for file in $(grep -l -R $searchstring $filepath)     do       cp $file $file.bak       sed -e "s/$searchstring/$replacestring/ig" $file > tempfile.tmp       mv tempfile.tmp $file            let i++;            echo "Modified: " $file     done


title: Sublime doesn't show on the GNOME Shell sidebar

text: I have a problem in GNOME Shell. I have Sublime Text installed via AUR but it's not shown in the sidebar. Here is the screenshot: ![the icon shown in applications list but not in dash, and i cant add it to favorite](http://i.stack.imgur.com/NSYeU.png) The icon shows in the applications grid but not in the sidebar, and I can't add it to my favorites. How can I fix this?


title: xscreensaver and keyboard layouts

text: xscreensaver doesn't show which is the current keyboard layout, so sometimes I can't enter my password, because I've switched to Cyrillic without knowing it. I found a discussion about the same problem at http://forum.xfce.org/viewtopic.php?id=6877, for example. Is there a way to make it show the current keyboard layout, or always switch to English? My system is Debian Wheezy.


title: Change the PS1 color based on the background color?

text: I learned that I can change the format of PS1, especially the color of the string. Then, is it possible to change the color based on the background color of the shell? Or, how can I detect the background color of the shell?


title: Keep tracking of symbolic links?

text: I use symbolic links quite often, but after moving the original file, I lose track of the symbolic link. I also use symbolic links for keeping track of some files in the same directory, but again, I lose track.   * Is there any way (tool/method) to keep track of the symbolic link no matter what change I make? Is the hard link the only way for this?   * Is there any way to make the symbolic link in a relative way so that when I move the directory that contains both the original and link, the link should work.


title: How does xrandr identify/choose which resolutions to offer?

text: My monitor has a maximum resolution of 2560x1440 (16:9). On one machine I run, (VMWare VM), xrandr identifies the highest resolution as 2560x1600 (16:10), and no other resolution suggested by xrandr is 16:9 either. I'm trying to track down the source of this, so I get it fixed. So what layers below xrandr affect the reported resolutions?               $ xrandr -q     Screen 0: minimum 1 x 1, current 1680 x 1050, maximum 8192 x 8192     Virtual1 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 0mm x 0mm        800x600        60.0 +   60.3  (1.33)        2560x1600      60.0  (1.6)        1920x1440      60.0  (1.33)        1856x1392      60.0  (1.33)        1792x1344      60.0  (1.33)        1920x1200      59.9  (1.6)        1600x1200      60.0  (1.33)        1680x1050      60.0* (1.6)        1400x1050      60.0  (1.33)        1280x1024      60.0  (1.25)        1440x900       59.9  (1.6)        1280x960       60.0  (1.33)        1360x768       60.0  (1.77)        1280x800       59.8  (1.6)        1152x864       75.0  (1.33)        1280x768       59.9  (1.66)        1024x768       60.0  (1.33)        640x480        59.9  (1.33)      Cut out all the "VirtualX disconnected" lines following the above info. I also took the liberty of calculating and adding the aspect ratio for each of the resolutions within parenthesis, so that's not my xrandr being special and outputing that.


title: Running programs as root with my own password in Scientific Linux

text: In Debian-derived Linux distros, if you are not `root` but are authorized in `/etc/sudoers`, GNOME will ask you for your own password to allow privileged operations. However, Scientific Linux asks you for the real `root` password, even if you can run programs with `sudo`. A Google search suggests this is true for all Red Hat or Fedora-derived distros, but the suggested solutions are all very old, complex, and not very complete. How should I configure GNOME, or `gksu`, or kernel PAM, or what-have-you to let me use `sudo` properly within the GNOME GUI?


title: Upgrading php on a Linux server

text: I am running a Redhat on a webserver. The current version of php on the server is 5.1.6. I want to upgrade it to 5.3.8 so I downloaded php and compiled it and replaced the older php binary with the newer one. I then restarted the httpd daemon. When I type php -v on the command line it gives me 5.3.8 but when I look at php on the browser using I get 5.1.6. How can I resolve this? Thanks.


title: Command to Download Source Files in FreeBSD

text: In most Linux distros there is a command sometimes the same one used to install or build (compile) packages with extra switch; which just download the source files instead of building or installing them. I am trying to find the same command in FreeBSD. In FreeBSD we have `portmaster` but I couldn't infer anything like that from its man page.


title: Creating mounting point

text: 1. I am mounting an image, and just realized that I have to create the directory for mounting point first. The command `mount` won't mount to a non-existing directory. But I seem to remember in some cases, when I insert some external device, such as external HDD and CD, I don't have to create mounting point myself. So I wonder when mounting points are required to be created by myself and when not?   2. Is it correct that mounting point directories can be created anywhere?  Then what is the purposes of the directories `/mnt` and `/media`? Aren't they for hosting mounting points of devices? PS: I am under Ubuntu 12.04. Thanks!


title: How to delete commands in history matching a given string?

text: I need to delete all commands in my history matching a string. I've tried:               $ history | grep searchstring | cut -d" " -f2 | history -d     -bash: history: -d: option requires an argument          $ history | grep searchstring | cut -d" " -f2 | xargs history -d     xargs: history: No such file or directory          $ temparg() { while read i; do "$@" "$i"; done }     $ history | grep searchstring | cut -d" " -f2 | temparg history -d     (no error, but nothing is deleted)      What is the right way to do this?


title: How do I know which processors are physical cores?

text: I've got an Intel i7 2700k here, and I'd like to know how I can tell which processors are physical and which are virtual (ie: hyperthreading). I'm currently running a Conky script to display my CPU temps, frequencies, and loads, but I'm not sure that I've done it right: ![awesome](http://i.imgur.com/nBlaH.png) I've written my own script to get temperatures and frequencies from `i7z`, but these only correspond to physical cores. I'm currently displaying each core like this:               ${cpu cpu1} ${lua display_temp 0} ${lua display_load 0}     ${cpu cpu2}     ${cpu cpu3} ${lua display_temp 1} ${lua display_load 1}     ${cpu cpu4}     # ...      I'm not sure that this is right, because of the loads and temperatures I see sometimes. In `/proc/cpuinfo`, how are cores sorted? First all physical then all virtual? Each physical core then its virtual core(s)? How are they sorted?


title: samba: files written to public share belong to nobody

text: I have setup a samba share like this:                   [shared]         path = /home/shared/         comment = shared         public = yes         writable = yes         printable = no      I can access it from windows, but when I upload files to it, the files I uploaded have the following permission:               -rwxr--r-- 1 nobody nobody 899381 Mar  7 11:59 letter17.rtf      What I would like to see is that, when a user accesses this share, the user acts as if he was a particular user of the samba server(say dave). So that he has access to files that 'dave' has access to, and the files he uploaded belongs to 'dave'.   which option do I use to achieve this?


title: Where is the frame.h located in modern Linux implementations? (ubuntu specifically)

text: A book I am reading refers to an include file that **shows how a stack frame looks** on one's UNIX system. In particular: `/usr/include/sys/frame.h` I am having trouble finding the modern equivalent. Anyone have an idea? I'm on Ubuntu 12.10.


We are using redhat linux ver5.4.I kept printing job and how to stop it.The job was given from another remote system.I am unable to stop it. I have given cancel -a 4 times , but it was not stopped.Please guide me.-HARI


title: Reset Nautilus "Computer" folder list

text: In my setup I tend to symlink major user folders in Linux to their Windows equivalents, IE Downloads, Documents, Pictures, Videos, etc. Usually I make sure nautilus isn't running before I do it and the default list of folders under "Computer" stays the same However my last change I forgot to do this and now the 4 folders above are filed under Bookmarks. Deleting the nautilus settings folder at `~/.conf/nautilus` doesn't fix it. Reinstalling nautilus with `yum reinstall nautilus nautilus-extensions` doesn't fix it. I'm not sure where else to go as I don't know how nautilus is loading these folders Does anyone have any suggestions on what to do to put the folders back under Computer?


title: Get the keycode of a key, from a custom made keyboard

text: I'm trying to transform a Minitel to a computer with a Raspberry Pi. This is a minitel: ![enter image description here](http://i.stack.imgur.com/bQAct.jpg) So I soldered the matrix of the minitel keyboard to a usb keyboard pcb, like this: ![enter image description here](http://i.stack.imgur.com/tgTjb.jpg) Everything is working ok, I recieve some keys from my custom keyboard. I just need to remap the keys appropriately. So I'm trying to create a program that will ask me to press `a` and trap the corresponding keycode, and then with all keys of my custom keyboard, to finaly produce a xmodmap file. The only problem I have is that I can't figure out on how can I get that keycode (and only that!). I tried `xev` but there's too much data displayed to filter it out. I know I could track all the keycodes by hand, but I'll transform 10 Minitels, so I would prefer a quicker way!


title: What changed between kernels 3.7 and 3.9 that affects LVM/RAID root file systems?

text: I'm trying to fix a (very messy) system that the user hosed by running a kernel upgrade from 3.7.10 to 3.9.6. the root file system is on an LVM volume on top of a software RAID array. The boot manager is grub2. The 3.9 kernel is unable to mount the root file system. It spits out the usual not-very-helpful bit about the device node not existing. This happens whether I use the UUID, the `/dev/{vg}/{lv}` or `/dev/mapper/{vg}-{lv}` notation for the root file system in the grub config file. The 3.7 kernel on the other hand is still on the machine and actually mounts the root file system and boots up just fine. Unfortunatly the modules got removed so even the keyboard doesn't work. I can book it up to a rescue cd, in which case the RAID arrays and LVM volumns come up just fine. Both kernels have matching `initrd` files that include the same set of modules. The initrd file is created by `genintrd` as part of the post-install process of the package manager1. LVM is built in and MD modules are present in the initrd. Further inspection2 of the init file shows they have identical root fs paths, the same one grub is passing in. I have tried searching around for the net for related issues but none of the cases out there seem to quite match this. I was unable to find anything about changes in the 3.9 kernel that would necesssitate a configuration change on the system from 3.7. What changed to the handling of LVM root file systems in 3.9? 1\. The distro is PLD-Linux, an RPM based distro. Kernel packages are stock rpm's from the TH tree.   2\. Inspected each one by extracting it using `gunzip | cpio -i` and observing module and script files.


title: How to properly setup web server directory permissions

text: I'm lost with this, hopefully I can find some help here: I have Ubuntu 12.04 LTS webserver. For example I have user "myuser". There is a public directory which is my web root. I chowned it and all files in it as www-data:www-data. This enabled me proper work of PHP which can create/write files as PHP and web server run under www-data.               /home/myuser/public/      My problem is that when I transfer files with rsync through ssh my permissions, user and group for the files are changed. This mean after every transfer I have to do my chown again.               rsync -azv . -e ssh myuser@server.com/public/      I'm not sure if chown-ing the files is the "right" way, but I followed this tutorial at DigitalOcean: https://www.digitalocean.com/community/articles/how- to-install-wordpress-with-nginx-on-ubuntu-12-04 and they do the following:               sudo chown www-data:www-data * -R      sudo usermod -a -G www-data username      As well as in other tutorials. I need some way when I will be not need to chown/chmod or whatever my files after each transfer (same as it works on shared hostings) Any ideas how to achieve that?


title: How does libusb access kernel stuff?

text: From what I understand:   * Generally speaking, a driver runs in kernel space and can be called from user space.   * Only code in kernel space can call usb low level things / `ioctl`   * `libusb` is a library, so it will compile and run in user space So how does `libusb` achieve low level USB?


title: Why can't I ping Google?

text: I can't ping google.com _(unknown host)_. But I can ping IP addresses. I tried to ping the IP address of Google but it doesn't work.   * ## `resolv.conf`              nameserver 8.8.8.8 nameserver 209.139.209.33         * ## `ifconfig -a`              eth0      Link encap:Ethernet  HWaddr 00:50:56:xx:xx:xx               inet addr:10.2.0.63  Bcast:10.2.15.255  Mask:255.255.240.0               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:638762803 errors:0 dropped:0 overruns:0 frame:0               TX packets:231307131 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000               RX bytes:55502371533 (51.6 GiB)  TX bytes:23436883491 (21.8 GiB)          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:56011078 errors:0 dropped:0 overruns:0 frame:0               TX packets:56011078 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:0               RX bytes:4792283266 (4.4 GiB)  TX bytes:4792283266 (4.4 GiB)        * ## `route -n`              Kernel IP routing table     Destination     Gateway         Genmask         Flags Metric Ref    Use Iface     10.2.0.0        0.0.0.0         255.255.240.0   U     0      0        0 eth0     169.254.0.0     0.0.0.0         255.255.0.0     U     1002   0        0 eth0     0.0.0.0         10.2.15.1       0.0.0.0         UG    0      0        0 eth0        * ## `ping -c 4 -n 8.8.8.8`              4 packets transmitted, 0 received, 100% packet loss, time 13000ms


title: How to restore the /etc/init.d/pure-ftpd-mysql?

text: By a mistake... this is my new /etc/init.d/pure-ftpd-mysql:                   /etc/init.d/pure-ftpd-mysql restart      How to install or recover the file? The standard `apt-get remove`, `apt-get install` or `apt-get install --reinstall pure-ftpd-common pure-ftpd-mysql` doesn’t give me that file back. Kind regards.


title: External drive not being recognized

text: I am currently running elementary OS (a Linux OS based on Ubuntu so everything in Ubuntu works in it) - dual booting it with Windows 8. I have a 3TB external hard drive (USB 3.0) that does not seem to be recognized when I plug it in. It works fine under Windows (both 7 and 8). It is using a GPT partition table and is formatted as NTFS. When I plug it in, the light flashes on the drive but it doesn't show up under devices, if I run fdisk or gdisk they just seem to freeze. Using dmesg I can see this: > [ 1511.173737] usb 4-2: new SuperSpeed USB device number 6 using xhci_hcd   >  [ 1511.198057] scsi11 : usb-storage 4-2:1.0   >  [ 1512.198085] scsi 11:0:0:0: Direct-Access ST3000DM 001-9YN166 CC4C PQ: 0 > ANSI: 0   >  [ 1512.199618] sd 11:0:0:0: Attached scsi generic sg3 type 0   >  [ 1512.199836] sd 11:0:0:0: [sdc] Very big device. Trying to use READ > CAPACITY(16).   >  [ 1512.200003] sd 11:0:0:0: [sdc] 5860533168 512-byte logical blocks: (3.00 > TB/2.72 TiB)   >  [ 1512.200904] sd 11:0:0:0: [sdc] Write Protect is off   >  [ 1512.200915] sd 11:0:0:0: [sdc] Mode Sense: 23 00 00 00   >  [ 1512.201913] sd 11:0:0:0: [sdc] No Caching mode page present   >  [ 1512.201926] sd 11:0:0:0: [sdc] Assuming drive cache: write through   >  [ 1512.202655] sd 11:0:0:0: [sdc] Very big device. Trying to use READ > CAPACITY(16).   >  [ 1512.204294] sd 11:0:0:0: [sdc] No Caching mode page present   >  [ 1512.204306] sd 11:0:0:0: [sdc] Assuming drive cache: write through   >  [ 1543.300083] usb 4-2: reset SuperSpeed USB device number 6 using xhci_hcd   >  [ 1543.318785] xhci_hcd 0000:04:00.0: xHCI xhci_drop_endpoint called with > disabled ep ffff8801cb1ec480   >  [ 1543.318797] xhci_hcd 0000:04:00.0: xHCI xhci_drop_endpoint called with > disabled ep ffff8801cb1ec4c0   >  [ 1574.366771] usb 4-2: reset SuperSpeed USB device number 6 using xhci_hcd   >  [ 1574.385450] xhci_hcd 0000:04:00.0: xHCI xhci_drop_endpoint called with > disabled ep ffff8801cb1ec480   >  [ 1574.385454] xhci_hcd 0000:04:00.0: xHCI xhci_drop_endpoint called with > disabled ep ffff8801cb1ec4c0 and a bit later on: > [ 1698.142961] sd 11:0:0:0: [sdc] Unhandled error code   >  [ 1698.142972] sd 11:0:0:0: [sdc] Result: hostbyte=DID_ABORT > driverbyte=DRIVER_OK   >  [ 1698.142980] sd 11:0:0:0: [sdc] CDB: Read(10): 28 00 00 00 00 00 00 00 08 > 00   >  [ 1698.143000] end_request: I/O error, dev sdc, sector 0   >  [ 1698.143009] Buffer I/O error on device sdc, logical block 0 I have tried the drive in USB 2 ports as well but have the same issue and I can't really seem to find any relevant answers researching the output of dmesg so any help is greatly appreciated. Anyone have any ideas as to why it won't show up or what to try?


title: (IP Telephony, VoIP and Video Conferencing) Ekiga configuration for LAN with same subnet

text: I am looking for a Open Source Voice Chat Application, like Skype, but within an isolated intranet (no internet is available). Is there any application which can run on Scientific Linux or CentOS? Client-Server will be OK, but our need is Client Based. **Update:** As per Anonymous answer I have installed Ekiga. In two of Scientific Linux Terminal. These machines are in one network (same subnet), having 192.168.3.51 and 192.168.3.56.   When I open ekiga, both users are visible online to each other in neighbours section. But when I am trying to make a call, message appears "user is not available" ![](http://i.stack.imgur.com/JabAD.png)   and when I try to send a message ,in message box, after sending a message "NOTICE: Could not send message" error appears.   ![enter image description here](http://i.stack.imgur.com/CLxvT.png) While configuring I choose > I do not want to sign up for ekiga.net free service > > I do not want to sign up for ekiga call out service , because internet is NOT available to any my Linux boxes. Is there any configuration missing?![enter image description here](http://i.stack.imgur.com/J1NXc.png)


title: How to check in a shell script if an executable is running or not?

text: I have put an executable in a shell script file abc.sh. Now, I want to add _one_ line in this abc.sh, to know whether it is running before my script starts or not _and_ if yes, the _kill_ that executable.


title: Can't install Python3 package in Debian 7

text: I get error while installing _python3_ in Debian 7 (I have all updates installed):               root@nuclight:~# aptitude install python3     The following NEW packages will be installed:       python3 python3.2{a}      0 packages upgraded, 2 newly installed, 0 to remove and 0 not upgraded.     Need to get 0 B/2,621 kB of archives. After unpacking 8,991 kB will be used.     Do you want to continue? [Y/n/?]      Selecting previously unselected package python3.2.     dpkg: warning: files list file for package 'python3.2-minimal' missing; assuming package has no files currently installed     (Reading database ... 101541 files and directories currently installed.)     Unpacking python3.2 (from .../python3.2_3.2.3-7_amd64.deb) ...     Selecting previously unselected package python3.     Unpacking python3 (from .../python3_3.2.3-6_all.deb) ...     Processing triggers for desktop-file-utils ...     Processing triggers for man-db ...     Setting up python3.2 (3.2.3-7) ...     /var/lib/dpkg/info/python3.2.postinst: 6: /var/lib/dpkg/info/python3.2.postinst: python3.2: not found     dpkg: error processing python3.2 (--configure):      subprocess installed post-installation script returned error exit status 127     dpkg: dependency problems prevent configuration of python3:      python3 depends on python3.2 (>= 3.2.3); however:       Package python3.2 is not configured yet.          dpkg: error processing python3 (--configure):      dependency problems - leaving unconfigured     Errors were encountered while processing:      python3.2      python3     E: Sub-process /usr/bin/dpkg returned an error code (1)     A package failed to install.  Trying to recover:     Setting up python3.2 (3.2.3-7) ...     /var/lib/dpkg/info/python3.2.postinst: 6: /var/lib/dpkg/info/python3.2.postinst: python3.2: not found     dpkg: error processing python3.2 (--configure):      subprocess installed post-installation script returned error exit status 127     dpkg: dependency problems prevent configuration of python3:      python3 depends on python3.2 (>= 3.2.3); however:       Package python3.2 is not configured yet.          dpkg: error processing python3 (--configure):      dependency problems - leaving unconfigured     Errors were encountered while processing:      python3.2      python3      Can you help me?


title: Busy Device on Umount

text: I often experience a problem to umount a directory:               umount /mnt/dir     umount: /mnt/dir: device is busy      There are many reasons why the device is busy. Sometimes there are processes running which have open locks on it, sometimes there are other directories mounted on top of `/mnt/dir`. My question: What are the steps to check why a directory couldn't be unmounted. I know there are many reasons, but it's ok if you explain a specific solution. [EDIT] [X] running processes on mounted volumes.   [X] another volume is mounted on top of a volume we want to unmount   [_] NFS locks the volume we want to unmount


title: What does port mean in context of a shell in unix?

text: From the book Advanced Programming in the Unix environment: > Linux uses the Bourne-again shell for its default shell. In fact,/bin/sh is > a link to /bin/bash.The default user shell in FreeBSD and Mac OS X is the > TENEX C shell, but they use the Bourne shell for their administrative shell > scripts because the C shell’s programming language is notoriously difﬁcult > to use.Solaris, having its heritage in both BSD and System V, provides all > the shells shown in Figure1.2. Free ports of most of the shells area > available on the Internet. What does the author mean by the term `port` here and how is it related to shells ?


title: How to continuously take backup of log files?

text: I have some applications in Lunux which creates Log files of around 41 MB each. The log files switches from log.1 to log.2 and starts overwriting log.2 once this 41MB is completed in log.1 file. I want to take the backup of these files in the way that whenever the new file log.2 reaches the size more than 1MB it take backup (gzip and store at another location) of other file (log.1). I have been using a script which takes the backup of file whenever it reaches 41MB but the trouble here is sometimes this 41MB file backup is take by script, still the data is getting written on the same file at a very huge rate because of which it loses some seconds of log data which is the reason i am trying the alternate way of making backup of other file once the new file reaches 1MB or something so that i am sure that the other file is finished writing. Any idea how do i do that?


title: Why do I have to use sh to execute scripts from CD/DVD media?

text: I hit again on this strange behaviour of the system. I'm running Debian 6.0.6 and had quite some troubles executing a script directly from CD/DVD. Finally I had to use:               sh /media/cdrom/command      to run it. What is the big deal of having to resort to sh?! What if the script relies on bash features? Really annoying and not much added to security in my opinion Does anybody know of a good reason for that behaviour? PS: if you try to run it directly with ./... you get an error that does not suggest any hint to the issue (filesystem mounted noexec):               bash: ./media/cdrom/command: No such file or directory      If you run it as bash /media/cdrom/command you get the same error (I think verification of mount options are verified by bash even for commands passed as parameters on the command line. Permanent solution is to add exec to the mount options in /etc/fstab such as:               /dev/scd0       /media/cdrom0   udf,iso9660 user,noauto,exec     0       0


title: What's the difference between the drivers r8169 and r8168?

text: Realtek provides the source code for the r8168 driver which is based on the r8169 driver from the kernel tree if I may believe their source:               /*      * This driver is modified from r8169.c in Linux kernel 2.6.18      */      Both are GPL licensed, so source code may be exchanged with no legal issues. That's why I find it rather strange that Realtek maintains a separate driver with no changelogs or documentation. What's the difference for the end user? Which driver is recommended?


title: I bought a game from Ubuntu Software Centre, How do I download it for Linux Mint?

text: I bought the game TRAUMA from the ubuntu software centre, using my login user/password and paid with my debit card, I can download and play the purchased game in ubuntu fine. But I recently switched to Linux Mint, and it's not in the repositories, I looked on the trauma site and it there is no login, or anything, I don't want to pay again :( Is there any way I can retrieve my purchased game? Thank you.


title: Testing equivalence for exit status

text: Are the following two command lists portably equivalent?               $foo; echo $? #(1)      and               $foo && echo 0 || echo $? #(2)      ## Postscript Consider the command `exit-status` defined so:               #!/bin/sh     exit "$1"      Does the POSIX standard forbid the following?               > exit-status 2 && echo "impossible branch"; echo $?     1      If not, then a POSIX-compliant shell could fail to equate the two uppermost command lists. Which isn't quite the same thing as not being portable...


title: How can I sort a .txt file by two columns?

text: Feb  7  domainserver dovecot[37495]: auth(default): od(tjones): lookup failed for user: tjones      Above is a sample output of what I'd like to sort. I'd like to sort by date on the first column, but also by `tjones` on the right, which would be the user. Basically, I want all instances of `tjones` grouped together, but sorted by date. I really have no idea what command to use in order to do this, or if I need to use the awk command to rearrange columns. There are obviously more users than `tjones`, so I'd just like to sort by those two columns I tried the following, but it brought up an error "sort: multi-character tab `\t'"               sort -t '\t' -k1,1 -k5,5n auth_2014uniq.txt > auth_2014uniqtest


title: How to pass parameters from %prep to %build?

text: I have the following problem: In the `%prep`, I run a command that returns a value. I want to be able to use this value in the `%build`. I was not able to do it with macros, because `%global` gets its value on init, and `%declare` is executed when called. I also wasn't able to use bash parameters because they are not shared between `%prep` and `%build`. I have 2 workarounds: Do all in `%prep`, or save the value to a file. I'm not comfortable with any of these workarounds. This seems to be a simple task. Am I missing something?


title: Is GREP_OPTIONS= --color=always ignored?

text: I was playing around with setting `GREP_OPTIONS` and couldn't get it to work. Just curious as to why. Simple test commands output:               richard@ubuntu:~$ echo $GREP_OPTIONS          richard@ubuntu:~$           richard@ubuntu:~$ ls | grep o      Desktop     downloads     Dropbox     ebooks     workspace          richard@ubuntu:~$ ls | grep o --color=always | less -R           richard@ubuntu:~$ export GREP_OPTIONS="--color=always"      richard@ubuntu:~$ ls | grep o  | less -R         1. The 1st grep outputs to the terminal in color (each 'o' is red)   2. The 2nd grep outputs via less in color (same as 1)   3. But the 3rd grep outputs to less but in black & white - but this should be in color. So it appears that grep is ignoring `GREP_OPTIONS`. Is that a bug or am I doing something wrong? (Ubuntu 12.04.2, GNU grep 2.10)


title: Ctrl+Alt+F8 meaning

text: I know that `Ctrl`+`Alt`+`FX` (X=1 to X=7) are 7 different ttys. Suddenly, I tried to find out what other combinations `Ctrl`+`Alt`+`FX` (X=8 to X=12) leads to. After pressing the combinations, I found that a black screen with just a cursor blinking. Can somebody please explain me what this means. After again pressing `Ctrl`+`Alt`+`F7` I can go back to the XWindows.


title: How overwriting works for non-contiguous files?

text: In _ext4_ (or _ext*, ntfs, fat_ ) file system, if I overwrite a non-contiguous file will the same non-contiguous storage spaces be used or there's a different way to handle such?


title: Cannot set up screen panning in Ubuntu with xRandR which states that it cannot find the modes

text: I am using a Samsung n150 netbook with a 10.1 inch screen and it has a maximum screen resolution of `1024x600`. I am running Ubuntu 10.04 LTS and want to enable screen panning for a larger virtual display; so that the screen seen is a subset of the larger display that can be navigated via the mouse. I believe that the virtual screen size of `1024x800` would suite my purposes, but anything with at least larger y-axis would be suitable. There is the `Panning-viewport` instructions link, which recommends this command:               xrandr --output VGA1 --rate 60 --mode 800x600 --fb 1280x1024 --panning 1280x1024      I have modified the command to suite my situation:               xrandr --output LVDS1 --rate 60 --mode 1024x600 --fb 1280x1024 --panning 1280x1024      The terminal then prints `xrandr: cannot find mode 1024X600`, and this was the same even with mode 800X600. I tried using `--output VGA1` as well. `xrandr -q` gives (briefly):               LVDS1 connected 1024x600+0+0     1024x600  60.0*+     800x600   60.3      I tried `xrandr --newmode 1024x600` as well but no changes happened trying again. I have read the man pages and wiki randr page,link2,link3,link4 on using randr which discuss randr. I cannot understand the command and how to work with it. Even though there is only an `output` a `rate` a `mode` the `fb` and the `panning` option, I cannot figure out what they are doing and how to set them up for panning on my system. Is there a simple modification of the terminal line I am using to fix the problems of setting up `panning` or some mode addition include via `--newmode` that should be made?


title: How can I add man page entries for my own power tools?

text: I have no idea about how I can make my home-grown specialist scripts (written mostly in Bash and Perl) available through the `man` pages. What procedure would I have to follow, and is there a particular format that the documentation needs to be written in for me to be able to do this?


title: Symbolic link recursion - what makes it "reset"?

text: I wrote a little bash script to see what happens when I keep following a symbolic link that points to the same directory. I was expecting it to either make a very long working directory, or to crash. But the result surprised me...               mkdir a     cd a          ln -s ./. a          for i in `seq 1 1000`     do       cd a       pwd     done      Some of the output is               ${HOME}/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a     ${HOME}/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a     ${HOME}/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a     ${HOME}/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a     ${HOME}/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a     ${HOME}/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a     ${HOME}/a     ${HOME}/a/a     ${HOME}/a/a/a     ${HOME}/a/a/a/a     ${HOME}/a/a/a/a/a     ${HOME}/a/a/a/a/a/a     ${HOME}/a/a/a/a/a/a/a     ${HOME}/a/a/a/a/a/a/a/a      what is happening here?


title: linux + awk + file manipulation

text: I have the following file                more  file.txt           1 2 3 4 4 2      23 4 5 23 2 3      END_OF_LINE      1 3 7 4 2       23 4 6 7 4 2 1 5       How to print only the fields 4 and 5 and 6 until the line END_OF_LINE , and from the line END_OF_LINE until the end of file , the same lines ( all the fields ) Meanwhile I have only partial solution                awk '{print $4" "$5" "$6}'        Example: of the requested output awk syntax ..... file.txt                4 4 2      23 2 3      END_OF_LINE      1 3 7 4 2       23 4 6 7 4 2 1 5


title: When installing linux on USB Drive, which filesystem should I use to format for best performance?

text: I'm planning on installing Linux on a USB drive, and I was wondering which filesystem I should use to format the drive for best performance (overall responsiveness), and life of the drive?


title: Boot Error Debian: "ata3: softreset failed (device not ready)"

text: I am trying to figure out why I am getting this boot errors. I have looked all through the `dmesg`, `boot.log`, `kern.log`. I also have a few `modprobe -b pci:<PCI ID> error`s during boot on the screen but I cannot find them in the logs. It takes about 5 minutes to boot. DMI: BIOSTAR Group A75MH/A75MH, BIOS 4.6.4 04/17/2012               ata3: limiting SATA link speed to 1.5 Gbps     ata3: softreset failed (device not ready)     ata3: softreset failed (device not ready)     ata3: link is slow to respond, please be patient (ready=0)     ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 310)     ata3.00: failed to IDENTIFY (INIT_DEV_PARAMS failed, err_mask=0x80)     ata3: softreset failed (device not ready)     ata3: softreset failed (device not ready)     ata3: link is slow to respond, please be patient (ready=0)     ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 310)


title: Best way to have taskset assign a job to random cores?

text: I have an application whose license limits it to 4 cores per instance, running on a 16 core box. Several of these instances run in parallel. Instances spin up and down throughout the day. In .bash_profile the variable "START" is assigned to "taskset -c 0-3 rlwarp ..." and other scripts (or humans on the box) start up instances using $START. The end result is when the box is under heavy load, you can end up with four cores pegged while the other 12 run idle. I'd like to modify "START" to assign to have taskset assign to four random cores to help alleviate the issue. Any suggestions on the best way to do this?


title: Trailing spaces when copying from gnome-terminal using zsh

text: When copying text from `gnome-terminal` with `zsh` trailing whitespace is also copied. For example copying the following clearly adds a vertical scollbar on stackexchange site as trailing whitespace the width of the terminal is included:               $ echo $0                                                                                zsh      If I drop into `bash` this does not happen _(no spaces, no scrollbar)_ :               $ echo $0     bash      Is there an option with `zsh` to fix this?


title: Cannot stop autofs on FC19

text: I'd like to temporarily disable autofs on my fedora 19 x86 install. I would like to insert USB drives without them auto-mounting. Typing:               service autofs stop      Returns: Redirecting to /bin/systemctl stop autofs.service Failed to issue method call: Unit autofs.service not loaded. Typing:               chkconfig autofs off      Returns: error reading information on service autofs: No such file or directory I see there are ways to stop it from running at startup, but I want it to load at startup. I need to be able to stop & start it without logout/reboot.


title: Are "mostly POSIX-compliant" systems still considered POSIX systems?

text: Irix and OS X are POSIX systems because they are fully-POSIX-compliant. However, operating systems like FreeBSD, Haiku, and GNU/Linux, for example, are "mostly-POSIX-compliant". Can people still correctly refer to such systems as POSIX systems?


title: Split stdin by lines

text: I want to invoke a command for every line of the standard input, much like `xargs`, but the line should be passed as standard input, not as a command- line argument:               cat some-file.txt | <magic> | wc -c        * this should print the number of characters in each line of the file. What are my options? (The actual use case is processing a `tail -f`/`grep` combination with `jq` which seems to only start processing when it reaches EOF.)


title: replace column of a csv file with column from another file

text: I have two sample files like this:               $ cat file1     abc,sachin     cat,kumar           $ cat file2     xyz     pressure          $ cat file3      xyz,sachin     pressure, kumar       I want the first column of `file1` to be replaced with `file2`. I tried doing something like this:               $ awk 'FNR==NR{a[NR]=$3;next}{$2=a[FNR]}1' file1 file2      I'm using Solaris 10 and it didn't appear to support this. Any other suggestions?


title: Is it Unix timestamp incremental?

text: I have a simple Python program that collect data from a sensor. The program will then send the data together with the system's timestamp to a remote server via REST POST request. If the POST request fail, the data together with the timestamp will be saved into a CSV file. Once Internet connection is available again, data on the CSV file will be sent to the remote server. On the remote server, I have a simple PHP app that will generate a graph from the collected data. My question: is Unix timestamp incremental and unique? Is it safe to sort the timestamp in ascending order to see the sequence of data collected?


title: How can I display the contents of a text file on the command line?

text: I would like to display the contents of a text file on the command line. The file only contains 5-6 characters. Is there an easy way to do this?


title: How to set gstreamer backend to JACK

text: How do I set the gstreamer backend for versions 0.10 as well as 1.0 to JACK instead of pulse (or the autoaudiosink). I have tried the gstreamer-properties method, however that has failed for me.


title: Two exact copies of folder using FTP and command-line only

text: I'm looking for any solution that will allow me to emulate functionallity similar to Dropbox/rsync using only FTP protocol and command-line. The general problem is, that I have to run it on a very limited Linux (actually NAS), so I can't install / use to complex solutions (not enough resources to run) and/or GUI utils, as I have no GUI there. SSH also works weak on that NAS and is not present at all on one of destinations. What I need, is to have a command-line (bash) script or program that I will be able to run periodically (via CRON) that will assure that `source` and `destination` are identical:   * all files on both sides copied to both sides,   * if two files of the same name exists, copy newest version of a file to both sides,   * delete on one side all files that are missing on another one. Of course, this solution must support iteration on all subfolders of both source and destination, for this to work succesfully -- there will be a large directory structure on both sides. I've tried many backups solutions, but most of them failed for one of these reasons:   * unable to create exact duplicate copy of both sides and offering incremental backup instead,   * not able to be run directly from command-line, on very limited Linux distro. I was advised to use Unison and give it a good try. This really looks good, but it uses SSH, and I'm unable to establish SSH connection to one of my destinations (not supported) -- i.e. FTP access is the only available way. The perfect solution for me would be anything that I can run (command-line or configuration) like this:               something.sh path/to/local/folder ftp://user:pass@111.11.11.1/path/to/folder      If it does exists at all...


title: Kernel segmentation fault (core dumped), how to diagnose?

text: I have a fedora 13 x64 box I use at home for a storage server. I use sshfs to mount my music from home and listen at work, I run my irssi client in screen on it for freenode communication and lately I appears to be popping up with protection faults from the kernel. The message I receive:               Segmentation fault (core dumped)     [sanchez@media ~]$     Message from syslogd@media at Oct  8 08:42:00 ...      kernel:general protection fault: 0000 [#3] SMP          Message from syslogd@media at Oct  8 08:42:00 ...      kernel:last sysfs file: /sys/devices/pci0000:00/0000:00:1d.2/usb8/devnum          Message from syslogd@media at Oct  8 08:42:00 ...      kernel:Stack:          Message from syslogd@media at Oct  8 08:42:00 ...      kernel:Call Trace:          Message from syslogd@media at Oct  8 08:42:00 ...      kernel:Code: c9 74 5b 66 8b 56 04 66 8b 4e 02 66 8b 36 44 0f b7 d1 0f b7 c6 c1      e0 09 42 8d 04 90 8d 04 02 23 47 10 0f b7 c0 49 8b 04 c1 eb 2c <66> 3b 30 75 21      66 8b 78 02 66 39 f9 75 0d 66 3b 50 04 75 07 66      My machine is: > Linux 2.6.34.7-56.fc13.x86_64 #1 SMP Wed Sep 15 03:36:55 UTC 2010 x86_64 > GNU/Linux It appears to be related to a usb device, because of the last sysfs file: /sys/devices/pci0000:00/0000:00.1d.2/usb8/devnum however I am not using an usb ports it is a headless desktop with all internal hard drives and a ethernet running to my switch. Any help on this would be appreciated?


title: Toggle between dvorak and qwerty

text: I've recently started to learn the **dvorak** keyboard layout, but I still need to use **qwerty** sometimes. I'm looking for a script to toggle between the two keyboard layouts. Also, I'd like to invoke this _script_ with a hotkey that will work everywhere ( in my DE **and** in my console. ) Like pressing shutdown in this post.


title: How to set an expired authentication in Apache?

text: Using a simple virtual host, I've to set a timeout after X minutes (same of set an expired authentication) to force the user to re-insert its credentials.               [...]     <Directory /home/user1/>             Order allow,deny             Allow from All             Options -FollowSymLinks +Indexes +Includes -MultiViews             IndexOptions +IgnoreCase +SuppressDescription +FoldersFirst +NameWidth=40 +SuppressHTMLPreamble +FancyIndexing +IconHeight=16 +IconWidth=16             AllowOverride none             AuthUserFile /etc/apache2/user1.pass             AuthName "server.example.com"             AuthType Digest             require valid-user     </Directory>     [...]


title: What is word splitting? Why is it important in shell programming?

text: I'm getting confused about the role word splitting plays in `zsh`. I have not been exposed to this concept when programming in C, Python or MATLAB, and this has triggered my interest of why word splitting seems to be something specific to shell programming. I have read about word splitting on this and other sites before, but haven't found a clear explanation of the concept. Wikipedia has a definition of word splitting but does not seem to have references on how it applies to Unix shells. Here's an example of my confusion in `zsh`: In the Z Shell FAQ, I read the following: > 3.1: Why does `$var` where `var="foo bar"` not do what I expect? > > In most Bourne-shell derivatives, multiple-word variables such as `var="foo > bar"` are split into words when passed to a command or used in a `for foo in > $var` loop. By default, zsh does not have that behaviour: the variable > remains intact. (This is not a bug! See below.) The option `SH_WORD_SPLIT` > exists to provide compatibility. However, in the Z Shell Manual, I read the following: > `SH_WORD_SPLIT (-y) <K> <S>` > > Causes field splitting to be performed on unquoted parameter expansions. > Note that this option **has nothing to do** with word splitting. (See > Parameter Expansion.) Why does it say that `SH_WORD_SPLIT` has **nothing to do** with word splitting? Isn't word splitting precisely what this is all about?


title: USB set to /dev/sda instead of /dev/sdb

text: I've been trying to use a kickstart file to guide the Red Hat installer (RHEL6.5) without user intervention. It correctly looks for the kickstart file in `/dev/sdb/fs.cfg`, but because the USB is recognized as `/dev/sda`, it is actually located at `/dev/sda/fs.cfg`. I can manually point the installer to this destination, but the rest of kickstart file relies on having the native hard drive be `sda`. I would like to do so without editing the kickstart files, but that's what is necessary, I'm willing to do it. Is there any way to force the kernel to recognize the USB as `sdb` and the HD as `sda` (I'm assuming the kernel is responsible for the mix up, but I'm not sure)? It seems very odd that it chooses an external drive (the USB) as `sda` and forces the internal (HD) to `sdb.` Note: My issue is very similar to this one, except that my kickstart file absolutely depends on the HD being `sda` This problem only occurs for RHEL6.5 installer and not for RHEL5.X installer (I haven't tried any previous version of RHEL6.X). What I really want to know is why it is changes between versions.


title: How does << work and what is it called?

text: > **Possible Duplicate:**   >  Correct textual name for << I am learning about Go and saw this usage I've never seen before (from http://golang.org/doc/install.html):               $ cat >hello.go <<EOF     package main          import "fmt"          func main() {         fmt.Printf("hello, world\n")     }     EOF      Curious, I tried it myself:               $ echo <<EOF hello     > asdf     > asdf     > EOF     hello          $ echo <<test hello     > hello     > test     hello      I am aware of redirecting standard input to read from a file instead (via < operator), but I've never seen <<, and not with this start/end delimiter business. (I know about >> for appending but this seems different) It's extremely hard to search for <<; could someone point me in the right direction?


title: Can I change root's email address or forward it to an external address?

text: I'm getting a lot of mail in my `root` user's mail account. This appears to be mostly reports and errors from things like `cron` scripts. I'm trying to work though and solve these things, possibly even have them be piped to some sort of "dashboard" - but until then how can I have these messages go to my personal e-mail account instead?


title: How to make nohup not create any output files and so not eat all space?

text: So I start some server with `nohup ./myServer &`, I actually have loging mon my server so I do not need any help from nohup with it, but any way I get `66GB` `nohup.out` file in fiew days and that is a problem. I want just to start an app, leve it working on its own. So how to make nohup not create any output files and so not eat any space?


title: firewall and SElinux disabled for postfix for configuration troubleshooting

text: Why would you disable your firewall and SElinux for postfix and not re enable after configuration? Also why would I have no conf file in SElinux folder only these `restorecond.conf` `restorecond_user.conf` `semanage.conf` I am trying to test postfix I've already installed and I am getting Connection refused. Would this have something to do with network range because I don't know how to work out what that should be, where do I work out that information?


title: Java could not get the TGT from cache in Linux client

text: I have set up a Kerberos server and OpenLDAP in RHEL5.5. I also have a RHEL6 machine as a client. I have run my Java program using `jaas` to query the OpenLDAP server from the linux client. I can query the OpenLDAP server if I copy the client's keytab to the client machine and use the following configruation options:               principal=wpingli     useKeyTab=true     keyTab="/home/wpingli/ker/java/wpingli_new.keytab";      I also can query the OpenLDAP server if I am prompted to input the user/password. This leads me to believe that my enviroment is ok. However, I'm unable to query the server if I run my Java program after `kinit`:               klist     [wpingli@pli java]$ klist     Ticket cache: FILE:/tmp/krb5cc_500     Default principal: wpingli@XX.COM     Valid starting Expires Service principal     10/20/11 16:18:06 10/21/11 16:18:02 krbtgt/XX.COM@XX.COM          jaas configuration     GssExampleSUN{     com.sun.security.auth.module.Krb5LoginModule required     client=true     debug=true     doNotPrompt=true     useTicketCache=true     ticketCache="/tmp/krb5cc_500";     };          Exception:     Debug is true storeKey false useTicketCache true useKeyTab false doNotPrompt true ticketCache is /tmp/krb5cc_500 isInitiator true KeyTab is null refreshKrb5Config is false principal is null tryFirstPass is false useFirstPass is false storePass is false clearPass is false     Acquire TGT from Cache     Principal is null     **null credentials from Ticket Cache     [Krb5LoginModule] authentication failed     Unable to obtain Princpal Name for authentication     Authentication attempt failedjavax.security.auth.login.LoginException: Unable to obtain Princpal Name for authentication**      How can I fix this?


title: Where are Proxy Settings Stored?

text: I'm coding a small application that connects to the Internet and retrieves information from my server using `bsd socket`. I looked at where the proxy settings are stored under Linux but i couldn't the file containing this information. I just want to find that file, so I can read the proxy settings from it and use these settings in my application.


title: Is there file format for checksums?

text: I want to store SHA512 checksum of the file for my application. How to do it in common (popular) way? So this checksum can be used but by third party application too.


title: Converting relative path to absolute path

text: Is there a *nix command to get absolute(and canonicalized) path from relative path(with current path) or symbolic link?


title: What do first column in /proc/mounts really mean in Linux?

text: Run `cat /proc/mounts` and I get this (simplified):               rootfs / rootfs rw 0 0     proc /proc proc rw,relatime 0 0     /dev/sda1 / ext3 rw,relatime,errors=continue,barrier=1,data=ordered 0 0     io /etc/blkio cgroup rw,relatime,blkio 0 0     ...      About the content, document from Red Hat says that: > The first column specifies the device that is mounted, the second column > reveals the mount point, and the third column tells the file system type... I don't think that `rootfs` is a device, I'm trying to find this device in `udev(/dev)` but I can't get it. So I don't know which device is mounted in `/` ( _You may say that I can use`mount` to get this information, but what if `rootfs` here is mounted not by `mount` command_). Another example is on VMware ESX 3.x server, you cannot find any "vmfs" entry listed in `mount`'s result, but by `cat /proc/mounts`, I get `/vmfs /vmfs vmfs rw 0 0`. As the `rootfs` example, I cannot know which devices are related with the first "/vmfs" here either. **Question** : Could someone tell me what does the first column of `/proc/mounts` really mean? PS. Please read "How to get the complete and exact list of mounted filesystems in Linux?" for more information about `/proc/mounts` and `mount`.


title: How to display open file descriptors but not using lsof command

text: Hi I have read Here that lsof is not an accurate way of getting the number of File Descriptors that are currently open. He recommended to use this command instead                cat /proc/sys/fs/file-nr      While this command displays the number of FD's, how do you display the list of open file descriptors that the command above just counted?


title: What is `#override` in .Xresources?

text: I haven't used .Xresources much, but in the docs that I have looked over, from time to time I see mention of the `#override` command. Or modifier. Or whatever it is. That's the problem; I don't know what it is (: Here's an example, taken from `man xterm` on my system:               *VT100*translations:    #override \n\             Meta <KeyPress> /:dabbrev-expand()      I've spent a surprising amount of time trying to find out what exactly `#override` is, but with no luck so far. Can someone point me to docs that explain `#override`?


title: Meaning of different tokens in a font config string

text: I have seen lines like the one below, in a number of config files (xmobar has one of these and dmenu too has this)               '-*-fixed-*-*-*-*-18-*-*-*-*-*-*-*'        1. What is the meaning of each token which is seperated by a hyphen ('-')?   2. Where can I see a list of fonts which I can use in these configs? There is another variation of this with obvious placeholders. Where can I see a list of fonts for this? (I understand that xft fonts are different)               xft:Bitstream Vera Sans Mono:size=10:antialias=true


title: Decrease the font size in Cinnamon from the command line

text: While I was playing with Cinnamon settings I set the font size to 990 from the font icon available in cinnamon settings. Now I can't use any applications because of the font. It garbles the whole screen. I cannot redo it because when I somehow manage to open Cinnamon settings, I can't see the font icon, because of the font size, even if I maximize that window. I can see up to icon themes, that's it. Now what to do, Is there any way of setting things to normal? I tried setting Cinnamon settings to default but did not work. Now what to do? Is it possible from a terminal?


title: Convert json numbers to strings in the shell

text: When parsing _json_ , the command-line tool `jshon` converts numbers to scientific notation, and sometimes tries to round them. To avoid these problems, I want jshon to consider these numbers as strings. For that, I have found that I need to place quotes around all numbers in the json file. After some unsuccessful googling, I have tried writing a sed command to quote the numbers, but I found it pretty unsafe, and have run into lots of issues already:                sed -r 's/(" ?[:,] ?)"?([0-9]+(\.[0-9]+)?)"?([,}]|$)/\1"\2"\4/g' $file      I would like to know if there is some stable **parser** that can give me the desired result. I'm not including an example json file in the question, because I need this code for some little risky operations, and I will be parsing json from random websites.


title: openbsd: why quirks-1.87 was installed all of a sudden?

text: I was trying to install mysql on OpenBSD; instead, somehow quirks-1.87 was installed, whereas mysql was claimed to not be found. Why?               opti# setenv PKG_PATH ftp://ftp.openbsd.org/pub/OpenBSD/`uname -r`/packages/`machine -a`/     opti# pkg_add mysql     Can't find mysql     opti# pkg_add -ri mysql     quirks-1.87: ok     Can't find mysql     opti# pkg_add -ri mysql     Can't find mysql     opti#                    opti# uname -rms     OpenBSD 5.4 amd64


title: How to write startup script for systemd

text: I have 2 graphics cards on my laptop, one is IGP and another discrete, I've written a shell script to to turn off discrete graphics card. How I can convert it to systemd script, to runt at start-up?


title: CUPS: Can't set option for halftoning algorithm after upgrade from Debian squeeze to wheezy

text: After upgrading my main Debian box from squeeze to wheezy recently, I couldn't set the option for my printer's halftoning algorithm any more. It appears that the upgrade of cups that happened during the dist upgrade has dumbed down my printer's ppd file. How do I get this option back?


title: How to make sure, that certain functionality (like Alt+Ctrl+F1 switching into tty) is available in havily swapping system?

text: At the moment, when I accidentally launch application that eats a lot of memory (that causes system to heavily swap), the system become so unresponsive (waiting hours just to see the mouse move/or switching to the tty1 with `Alt`+`Ctrl`+`F1`) that it effectively means I need to REISUB (= hard reboot) and lost ALL of my current, not saved work. In Windows world, some parts of the kernel are never swapped out (like mouse movement or `Alt`+`Ctrl`+`Del` combination) and even in a very bad out-of- memory situation I can recover in under 5 minutes by calling Task Manager and killing the offending application. Surely I must be missing something, I can't imagine that the whole Linux system can be brought to its knees with something so simple and innocent as preview with imagemagick a multi page tiff book (the imgemagick happens to load all the pages of the image uncompressed into the memory first…) I heard about the experimental BFQ I/O scheduler, maybe this could help?


title: Problem with openSUSE 12.3 dual-boot installation (with Windows 7)

text: I have a current Windows 7 64 bit installation that I'm using and I wish to create an openSUSE 12.3 partition on my HDD (not my SSD Windows drive). I used the Windows Disk Management tool to shrink my HDD and create room for the openSUSE partition. My hard drive and partition setup is as follows:               120GB SSD     (C:) - 120GB SSD with Windows installed     2TB HDD     (E:) - 1.4TB main partition.     (F:) - 300GB games partition.     Unallocated - 100GB taken from E:      (Screenshot 1 shows the setup in Disk Management)    ![ss of disk mgmt](http://i.stack.imgur.com/DKoJi.jpg) I shrunk my E: drive from 1.5TB down to 1.4TB in order to make the 104200MB space that I wanted for my Linux partition. I defragged E: and F: before I tried to install openSUSE. I got an error at the partition setup step of the installation (Screenshot 3).    ![ss of suse installer](http://i.stack.imgur.com/Yy7Vj.jpg) I took a screenshot of the Disk Defragmenter before installation (after I had run the defrag)(Screenshot 2).    ![ss of defrag](http://i.stack.imgur.com/ama4O.png) Original Screenshots here: http://imgur.com/a/USv8f


title: Samba prompts for a password twice

text: I have a relatively new samba install configured to give Windows users access to some log files on a syslog server ("littleEngineer"). However it's prompting for a password to just get a share listing by accessing `\\littleEngineer\`, is there a way to disable this behavior so that it will only prompt for a password if the user tries to access a secured share? This is my `testparm` output:               root@littleEngineer /var/log/samba $ testparm     Load smb config files from /etc/samba/smb.conf     rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)     WARNING: The "idmap uid" option is deprecated     WARNING: The "idmap gid" option is deprecated     Processing section "[aviationLogs]"     WARNING: The security=share option is deprecated     Loaded services file OK.     Server role: ROLE_STANDALONE     Press enter to see a dump of your service definitions          [global]             workgroup = BIZCO             realm = BIZCO.COM             server string = Samba Server Version %v             security = SHARE             password server = BIZCO.COM             log file = /var/log/samba/log.%m             max log size = 50             utmp = Yes             template shell = /bin/bash             winbind use default domain = Yes             idmap config * : range = 16777216-33554431             idmap config * : backend = tdb             cups options = raw          [aviationLogs]             comment = Apache httpd Log Files (Access and Error)             path = /var/log/central-logs/aviation             force user = root             guest ok = Yes      **EDIT:** Client: Windows 7 SP1 Client machine is VPN'd into the customer's local network but is not part of their AD domain. Samba is configured for Bizco.com (our client), let's say my laptop is part of the Fuzzypants.com domain. From `log.%m` when I pull the share up and click cancel on the prompt:               [2014/08/13 21:56:28.812088,  3] lib/access.c:338(allow_access)       Allowed connection from xxx.xxx.28.194 (xxx.xxx.28.194)     [2014/08/13 21:56:28.812201,  3] smbd/oplock.c:922(init_oplocks)       init_oplocks: initializing messages.     [2014/08/13 21:56:28.812372,  3] smbd/oplock_linux.c:226(linux_init_kernel_oplocks)       Linux kernel oplocks enabled     [2014/08/13 21:56:28.812519,  3] smbd/process.c:1662(process_smb)       Transaction 0 of length 159 (0 toread)     [2014/08/13 21:56:28.812569,  3] smbd/process.c:1467(switch_message)       switch message SMBnegprot (pid 2467) conn 0x0     [2014/08/13 21:56:28.813049,  3] smbd/negprot.c:598(reply_negprot)       Requested protocol [PC NETWORK PROGRAM 1.0]     [2014/08/13 21:56:28.813104,  3] smbd/negprot.c:598(reply_negprot)       Requested protocol [LANMAN1.0]     [2014/08/13 21:56:28.813143,  3] smbd/negprot.c:598(reply_negprot)       Requested protocol [Windows for Workgroups 3.1a]     [2014/08/13 21:56:28.813177,  3] smbd/negprot.c:598(reply_negprot)       Requested protocol [LM1.2X002]     [2014/08/13 21:56:28.813212,  3] smbd/negprot.c:598(reply_negprot)       Requested protocol [LANMAN2.1]     [2014/08/13 21:56:28.813247,  3] smbd/negprot.c:598(reply_negprot)       Requested protocol [NT LM 0.12]     [2014/08/13 21:56:28.813315,  3] smbd/negprot.c:598(reply_negprot)       Requested protocol [SMB 2.002]     [2014/08/13 21:56:28.813350,  3] smbd/negprot.c:598(reply_negprot)       Requested protocol [SMB 2.???]     [2014/08/13 21:56:28.813514,  3] smbd/negprot.c:401(reply_nt1)       not using SPNEGO     [2014/08/13 21:56:28.813553,  3] smbd/negprot.c:704(reply_negprot)       Selected protocol NT LM 0.12     [2014/08/13 21:56:46.975628,  1] smbd/process.c:457(receive_smb_talloc)       receive_smb_raw_talloc failed for client xxx.xxx.28.194 read error = NT_STATUS_CONNECTION_RESET.     [2014/08/13 21:56:46.975865,  3] smbd/server_exit.c:181(exit_server_common)       Server exit (failed to receive smb request)      I can give the log output from a successful authentication but it's probably not as informative. **EDIT #2** Since the last log didn't have anything telling I went through with the login prompt and began to see `check_ntlm_password` in `log.%m`:               [2014/08/14 12:33:59.988239,  3] auth/auth.c:219(check_ntlm_password)       check_ntlm_password:  Checking password for unmapped user []\[]@[] with the new password interface     [2014/08/14 12:33:59.988274,  3] auth/auth.c:222(check_ntlm_password)       check_ntlm_password:  mapped user is: []\[]@[]     [2014/08/14 12:33:59.988328,  3] auth/auth.c:268(check_ntlm_password)       check_ntlm_password: guest authentication for user [] succeeded     [2014/08/14 12:33:59.988379,  3] smbd/process.c:1467(switch_message)       switch message SMBtconX (pid 6290) conn 0x0     [2014/08/14 12:33:59.988450,  3] lib/access.c:338(allow_access)       Allowed connection from XXX.XXX.29.76 (XXX.XXX.29.76)     [2014/08/14 12:33:59.988613,  3] auth/auth.c:219(check_ntlm_password)       check_ntlm_password:  Checking password for unmapped user [bizco]\[davisja5]@[XXX.XXX.29.76] with the new password interface     [2014/08/14 12:33:59.988651,  3] auth/auth.c:222(check_ntlm_password)       check_ntlm_password:  mapped user is: [XXXXXXVLP01]\[davisja5]@[XXX.XXX.29.76]     [2014/08/14 12:33:59.988735,  3] auth/check_samsec.c:399(check_sam_security)       check_sam_security: Couldn't find user 'davisja5' in passdb.     [2014/08/14 12:33:59.988772,  2] auth/auth.c:319(check_ntlm_password)       check_ntlm_password:  Authentication for user [davisja5] -> [davisja5] FAILED with error NT_STATUS_NO_SUCH_USER     [2014/08/14 12:33:59.988819,  3] auth/auth.c:219(check_ntlm_password)       check_ntlm_password:  Checking password for unmapped user [BIZCO]\[davisja5]@[XXX.XXX.29.76] with the new password interface     [2014/08/14 12:33:59.988853,  3] auth/auth.c:222(check_ntlm_password)       check_ntlm_password:  mapped user is: [XXXXXXVLP01]\[davisja5]@[XXX.XXX.29.76]     [2014/08/14 12:33:59.988927,  3] auth/check_samsec.c:399(check_sam_security)       check_sam_security: Couldn't find user 'davisja5' in passdb.     [2014/08/14 12:33:59.988964,  2] auth/auth.c:319(check_ntlm_password)       check_ntlm_password:  Authentication for user [davisja5] -> [davisja5] FAILED with error NT_STATUS_NO_SUCH_USER     [2014/08/14 12:33:59.989005,  3] auth/auth.c:219(check_ntlm_password)       check_ntlm_password:  Checking password for unmapped user [BIZCO]\[davisja5]@[XXX.XXX.29.76] with the new password interface     [2014/08/14 12:33:59.989039,  3] auth/auth.c:222(check_ntlm_password)       check_ntlm_password:  mapped user is: [XXXXXXVLP01]\[davisja5]@[XXX.XXX.29.76]     [2014/08/14 12:33:59.989092,  3] auth/check_samsec.c:399(check_sam_security)       check_sam_security: Couldn't find user 'davisja5' in passdb.     [2014/08/14 12:33:59.989126,  2] auth/auth.c:319(check_ntlm_password)       check_ntlm_password:  Authentication for user [davisja5] -> [davisja5] FAILED with error NT_STATUS_NO_SUCH_USER     [2014/08/14 12:33:59.989167,  3] auth/auth.c:219(check_ntlm_password)       check_ntlm_password:  Checking password for unmapped user [BIZCO]\[davisja5]@[XXX.XXX.29.76] with the new password interface     [2014/08/14 12:33:59.989201,  3] auth/auth.c:222(check_ntlm_password)       check_ntlm_password:  mapped user is: [XXXXXXVLP01]\[davisja5]@[XXX.XXX.29.76]     [2014/08/14 12:33:59.989253,  3] auth/check_samsec.c:399(check_sam_security)       check_sam_security: Couldn't find user 'davisja5' in passdb.     [2014/08/14 12:33:59.989286,  2] auth/auth.c:319(check_ntlm_password)       check_ntlm_password:  Authentication for user [davisja5] -> [davisja5] FAILED with error NT_STATUS_NO_SUCH_USER     [2014/08/14 12:33:59.989359,  3] smbd/password.c:721(authorise_login)       authorise_login: ACCEPTED: guest account and guest ok (root)     [2014/08/14 12:33:59.989566,  3] passdb/lookup_sid.c:1754(get_primary_group_sid)       Forcing Primary Group to 'Domain Users' for root     [2014/08/14 12:33:59.989752,  3] smbd/service.c:872(make_connection_snum)       Connect path is '/tmp' for service [IPC$]


title: GNOME / GTK app installed from source runs with default theme

text: I've installed a GNOME / GTK application from source (GitG 0.2.5 in Linux Mint 11) - after resolving all the dependencies, I successfully ran the application. The dependencies were also installed from source. The problem is that the application (as seen here to the far left) is not "themed" (unlike Firefox, to the right, you can clearly see the difference). When running the application from the Terminal, the only error I get is:               'menu_proxy_module_load': gitg: undefined symbol: menu_proxy_module_load          (gitg:25205): Gtk-WARNING **: Failed to load type module: (null)      Other than that, the application runs perfectly. Back when I used Ubuntu, I had a similar problem (which ended up being something with root and the current user) I can run the program without root permissions. Any thoughts on this? As I said, I'm running Linux Mint 11. Any help would be very appreciated.


title: Slow terminal print out

text: Just installed (netinstall) debian wheezy on a second machine newer machine however the terminal print out is noticeable slower than on the old machine although the new have faster CPU, RAM and HDD (an SSD). When login in on the new machine with ssh it is as fast as I expect it to be. It is obvious that the out put speed is related to computer/display and not just the computer. For example the `dpkg -l` via virtual console takes 10s to print out and is instant via ssh. X is not installed it is just a fresh installation of Debian Wheezy. I assume this related to KMS but I am not sure where to start.