title: How to stop emacs server

text: I started a Emacs in my terminal, and then started running Emacs server inside it by `M-x server-start`. Now I would like to cancel running the Emacs server without exiting the Emacs process. There seems to be no command for that. How can i do that? Thanks.


title: scp does not transfer files correctly

text: I am using `scp` to transfer some large files (> 1 GB) from my laptop (Ubuntu 12.04) to my desktop (Ubuntu 14.04). The laptop has a wireless connection to my router and the desktop has a cable connection. Out of curiosity I decided to verify the transferred files using an md5 digest: I created the digest on the source computer, transferred it to the target computer, and used it with the `-c` option to verify the transferred files. To my surprise, more than 50% of the times I get an error:               md5sum: WARNING: 1 computed checksum did NOT match      My question: does data corruption occur so often with `scp`? I would expect that (1) data transfer errors are rather rare, and (2) `scp` checks its data and possibly resends it in case of error. What can be the cause of these errors? My hypotheses:   1. Bad WLAN connection that frequently corrupts data during transfer.   2. Bad memory: `md5sum -c` fails even thought the data is correct because the RAM is not working properly.   3. Bad hard disk: `md5sum -c` fails because the disk contains error.   4. A combination of the above reasons. Note that my hard disk and RAM are pretty new: I bought them 5 months ago.


title: mutt once promted password, used for both imap and smtp

text: my password for imap and smtp are the same and mutt version is using integrated smtp settings. if i do not want to store my password in any script nor encrypting it with pgp/openssl nor using wallet password managers. and if i want exactly:   * to be asked just once for password   * same password to be used for imap and smtp (to not be asked again inside same mutt session) what is best way to achieve this. my already figured-out solution are this .muttrc config lines:               set imap_pass=`read -s -p 'mail-password : ' mailpass ; echo $mailpass`     set smtp_pass=$imap_pass      and it is ~OK for my needs. Just because i am new to mutt, i am wondering is there some better way ... (... like using omitted imap_pass and smtp_pass, which will result in mutt's promting for imap_pass, and than convincing somehow mutt to use same for smtp).


title: How to use ifconfig to show active interface only

text: By default `ifconfig` will show me all available interfaces , but what if I just want to display `active` ones? Like, `en0` only in below.               en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500         ether 14:10:9f:e0:eb:c9          inet6 fe80::1610:9fff:fee0:ebc9%en0 prefixlen 64 scopeid 0x4          inet X.X.X.X netmask 0xffffff00 broadcast 101.6.69.255         nd6 options=1<PERFORMNUD>         media: autoselect         **status: active**     en3: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500         options=60<TSO4,TSO6>         ether 32:00:14:e7:4f:80          media: autoselect <full-duplex>         **status: inactive**      Notice `ifconfig en0` will not satisfy, `en0` is not always the active one ;) I'm running Mac OS X.


title: Uninstall MySQL server without removing or breaking any client functionality

text: I have an Ubuntu webserver which once used a local database, but we migrated it and now the database is stored remotely on a separate server accessed from many different places. The webserver runs code in PHP and in Python and connects to the remote database using PHP's built-in MySQL support and using Python MySQLdb module. I'm not longer using the local database on the webserver, and want to remove any unnecessary MySQL server stuff from the webserver because at the moment I have a mysqld process sitting there using 2.8% of my memory and 0.3% of my CPU for no good purpose. I've run               sudo apt-get remove mysql-server     sudo apt-get autoremove     sudo apt-get autoclean      but I'm still able to access the database stored on the web server by typing `mysql -u root -p` and the mysqld process is still using resources. I'm pretty timid about fiddling around to try and fix the problem because I don't know which `mysql-` packages, if any, are depended upon by PHP or MySQLd to connect to the database on the remote database server. What do I need to do to get rid of the database hosted on the webserver and get rid of the resource-munching mysqld process without breaking the webserver's ability to connect to the remote database?


title: Is it mandatory to have a variable in awk's first statement?

text: I am having some hard time with awk today. If I try to do:               df|awk '{print $2; $some=$2; print $some}'      It works as expected and I get the size of the disks twice but if I do:               df|awk '{$some=$2; print $some}'      I just get blank lines. Why is this happening? Something is maybe wrong in my understanding but why the usage of a field mandatory for subsequent fields to work? I also tried doing:               df|awk '{print "hello"; $some=$2; print $some}'      and I got some "hello", each separated by a newline. Where is $some=$2 lost? My `df` command outputs:               Filesystem     1K-blocks     Used Available Use% Mounted on     /dev/sda5       38448788 32098732   4396932  88% /     udev             1914564        4   1914560   1% /dev     tmpfs             768744      984    767760   1% /run


title: Install virtual machine as non-root?

text: Is it possible to install any virtual machine software as non-root user and run it ? Which VM's are possible to be installed with out need of root access ? If it is not possible what would be the most light weight virtual machine to use for a few VM's running windows xp sp3 ?


title: How to convert dd disk image to Clonezilla?

text: I have disk image from VirtualBox, it is a raw image, just like dd makes it, now I would like to restore the system to real machine using Clonezilla. However Clonezilla does not recognize the image (there is no "restore" option which means Clonezilla does not see it). **The question is** -- how to convert dd disk image file into Clonezilla format? So I could restore the system.


title: Fedora 14 root missing capability

text: I am trying to run a process that performs a clone() operation using a set of flags (CLONE_NEWIPC, CLONE_NEWNET, ...) that require CAP_SYS_ADMIN capability. This should not be a problem since I am running the process as root, but for some reason, it works on a debian wheezy 3.2.0 but not on a fedora 14 2.6.32. It throws an EPERM error which according to the CLONE(2) man page, means it was run by "an unprivileged process (process without CAP_SYS_ADMIN)". Again, everything is running as root. Any ideas why this is happening and how to fix it?


title: rsync an mpd playlist

text: An mpd playlist looks like this: syncrel.m3u               Bob Dylan - The Times They Are A-Changin' [V0]/04. One Too Many Mornings.mp3     Bob Dylan - The Times They Are A-Changin' [V0]/01. The Times They Are A-Changin'.mp3/      Or it can be configured to store the full path: syncfull.m3u               /home/share/media/audio/Bob Dylan - The Times They Are A-Changin' [V0]/01. The Times They Are A-Changin'.mp3     /home/share/media/audio/Bob Dylan - The Times They Are A-Changin' [V0]/03. With God On Our Side.mp3      I want to `rsync` those files to /media/sdg/MUSIC. I want it to delete files from the destination if they get removed from the playlist. I can not get the incantation right. I thought I had it last night, but when I reran it, it didn't work. I've tried every combination of `include-from`, `exclude=*`, etc. I can think of.


title: Is there a way to get anti-aliased icons in X, running Linux?

text: When I use graphical desktop-environment on Linux, no matter really what I use, I notice some icons tend to look aliased. It seems like there is perhaps a lack of anti-aliasing, like the curves on Windows and icons look far more blocky than they do on Windows. I am running at a high resolution, 1680x1050. Still, since things look so smooth in Windows 7, I want to know if Linux graphics just are not there yet, or if there is a problem with my configuration? Most of the time I am using Fluxbox, if that makes a difference.


title: Is there a small, lightweight application to have desktop icons like on Windows?

text: I run Fluxbox with tint2 which I am very happy with, as I prefer it to running a full desktop environment, even a lightweight desktop environment. On the other hand, my normal workflow revolves around having files I am currently working on on the desktop. Is there any sort of application that can give me "desktop icons" in the same way MS Windows and KDE/Gnome have, allowing files and shortcuts on the desktop? Ideally something that would fit in well with my fluxbox/tint2 setup and not require gnome or kde....


title: Check standard output of a background processs in real time

text: Let us say I submit a process in the background and I want to see the stdout and stderr. In another post it was suggested:               command > logfile 2>&1 &      But when I do head logfile I do not see anything? Is it not real time? if not, is there anyway to print to the logfile real time?


title: Poor TTY resolution with nVidia driver

text: The resolution of the TTY1-6 is poor ~ 640×480 Ubuntu 11.10 | Grub2 | nVidia | NVIDIA GT215 Board I went through the process on this site and after the edit the GRUB menu appears in the correct (more refined resolution). But after it boots into GNOME (via gdm3) and I attempt to view terminal 1-6 the screen is barely or completely unreadable. I am able to revert my changes but I am looking to restore the fine resolution the terminal screens are capable of. To determine the screen resolutions avail. to me, I used:               hwinfo --framebuffer | grep "Mode"     Mode 0x0369: 1680x1050 (+6720), 24 bits      These are the steps I went through. edit 1) grub config 2) initramfs modules, then 3) update               sudo vi  /etc/default/grub      Find the following three lines.               GRUB_CMDLINE_LINUX_DEFAULT="quiet  splash"     GRUB_CMDLINE_LINUX=""     ...     #GRUB_GFXMODE=640×480      Change them to:               GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset video=uvesafb:mode_option=1680x1050-24,mtrr=3,scroll=ywrap"     GRUB_CMDLINE_LINUX="vga=0x0369"     ...     GRUB_GFXMODE=1680x1050      Then:               sudo vi  /etc/initramfs-tools/modules      Adding/editing line:               uvesafb mode_option=1680x1050-24 mtrr=3 scroll=ywrap      Create a new file:               echo FRAMEBUFFER=y |  sudo tee /etc/initramfs-tools/conf.d/splash      Finally update the configuration files:               sudo update-grub2     sudo update-initramfs -u      Again, the GRUB menu in the beginning of the boot-up process shows the more refined resolution (including small font size), but small refined focused resolution disappears for terminals after boot up.


Is it possible to use ssh-copy-id once password based logins are disabled? Otherwise, is there an utility for adding an authorized public key to a user or should I edit the `~/.ssh/authorized_keys` file manually?


title: Booting from command line

text: I have a desktop version of #! installed on my laptop. I am quite new to Linux, but learning more everyday. I would like to know if it is possible to choose on start-up to boot into the Desktop, as it is now by default, or start in a command line environment (with a graphical display enabled). That way if I need just to go through files quickly I could do so with the terminal commands, but I could also call a graphical program if needed (ie thunar). I'm thinking I can avoid loading the desktop when I don't need it. Of course, I would like to keep the possibility of logging into the desktop.


title: Altered fstab - no longer able to SSH or access http

text: I might have done something stupid on my person debian server - I altered the fstab file. I changed udev to dev to try to fix a mounting issue in /dev/sda1 but after I restarted the server, I cannot access it with ping, ssh, smb, or http. Is the issue related to my uneducated fstab change or should I be looking someplace else?                 [/Volumes]$ ping 192.168.0.190       PING 192.168.0.190 (192.168.0.190): 56 data bytes       Request timeout for icmp_seq 0       Request timeout for icmp_seq 1       Request timeout for icmp_seq 2       Request timeout for icmp_seq 3       ç^C       --- 192.168.0.190 ping statistics ---       5 packets transmitted, 0 packets received, 100.0% packet loss            21:05:31       [/Volumes]$ ssh wall       ssh: connect to host 192.168.0.190 port 22: No route to host            21:05:34       [/Volumes]$ ssh wall       ssh: connect to host 192.168.0.190 port 22: Host is down


title: What are the pros/cons of the various methods to block brute force SSH attacks?

text: There are a number of different packages out there to shut out IPs from which brute-force SSH attacks are launched on your system. For example:   * DenyHosts   * Sshguard   * fail2ban What are the pros/cons of these, or any others? My current solution is to take the email that logwatch generates every day and dump the egregious IP addresses into a text file which I feed into a script that then rebuilds iptables. It's hacky, time-consuming and manual, and I'd like a better way. (Note that I didn't ask what was the "best" way to solve the problem, because there is no "best" way to do anything.)


title: How can I install perldoc on Ubuntu?

text: Ubuntu 10.10 comes with Perl 5.10.1 pre-installed, but strangely enough `perldoc` isn't part of the package.               $ perldoc     You need to install the perl-doc package to use this program.      How can I make this feature available?


title: Is it possible to use a router with dd-wrt/openWrt/etc as a radar detector?

text: Maybe a stupid question...but would it be possible to use a router with some kind of linux firmware and a laptop in a car as a radar detector?


title: Problem when changing the font size in nedit

text: Whenever I open Nedit, the following error appears ----               Cannot convert string "-*-helvetica-medium-r-normal-*-*-120-*-*-*-iso8859-1" to type FontStruct          Cannot convert string "-*-helvetica-bold-r-normal-*-*-120-*-*-*-iso8859-1" to type FontStruct          Cannot convert string "-*-helvetica-medium-o-normal-*-*-120-*-*-*-iso8859-1" to type FontStruct          Cannot convert string "-*-courier-medium-r-normal-*-*-120-*-*-*-iso8859-1" to type FontStruct          Cannot convert string "-*-courier-bold-r-normal-*-*-120-*-*-*-iso8859-1" to type FontStruct          Cannot convert string "-*-courier-medium-o-normal-*-*-120-*-*-*-iso8859-1" to type      FontStruct      Im unable to edit the font style in preferences.......   Please help me out to fix this.......


title: How to permamently disable SELinux?

text: We run a site with big traffic surges and, because of that, SELinux usually thinks that the traffic is a SYN flood attack. We have this same problem on many different CentOS servers. Despite `/etc/selinux/config` being set with disabled or permissive, when the servers boot, selinux is in enforcing mode again. The only way to disable SELinux is by doing `echo 0 > /proc/sys/net/ipv4/tcp_syncookies` every time the servers boot. I know that one solution could be to do a cron job with the abovementioned command on every boot but I wonder if anyone has some idea of what could be the reason why the modification of `/etc/selinux/config` is not enough (maybe it is enabled somewhere else; any idea on where to look or how to find it?).


title: Why is my initial ramdisk so big?

text: I'm running Ubuntu 11.10, which came with kernel version `3.0.0-14`. I downloaded and built a kernel from the `3.1.0` branch. After installing the new kernel, I see that my `/boot/initrd.img-3.1.0` file is HUGE. It's 114MB, while my `/boot/initrd.img-3.0.0-14-generic` is about 13MB. I want to get rid of the bloat, which is clearly unnecessary. When building the new kernel, I copied my `/boot/config-3.0.0-14-generic` to `.config` in my build directory, as to keep the configuration of my original kernel. I ran `make oldconfig`, selected the defaults for all the new options, and then built the kernel. Looking at the file sizes within each of the initrd cpio archives, I see that all of my .ko modules are larger in size in the 3.1.0 ramdisk, than the 3.0.0-14. I assumed there was an unnecessary debug flag checked in my config file, but I don't see anything different that was not already enabled in the 3.0.0-14 config file. My `/boot/config-3.0.0-14-generic` is here: http://pastebin.com/UjH7nEqd And my `/boot/config-3.0.1` is here: http://pastebin.com/HyT0M2k1 Can anyone explain where all the unnecessary bloat is coming from?


title: Samba 3.6.12 and NIS

text: We were able to use Samba and NIS on Samba 3.0.8 on Solaris 10 U5. When we update system to Solaris 10 U11, samba version became 3.6.12. And we are unable to authenticate like old style. I did not include some parameters on below(create directory mask,etc...) Old `smb.conf`                   [global]         workgroup = WORKGROUPNAME         server string =  Samba Server         security = SERVER         password server = dc6n, dc7n         username map = /etc/sfw/username.map         local master = No         dns proxy = No         wins server = dc6n, dc7n         kernel oplocks = No         host msdfs = No         map archive = No         oplocks = No         level2 oplocks = No      old `nsswitch.conf`                   passwd files nis         hosts  files nis       We try to set same configuration to Samba 3.6.12, but it did not work. So I decided to use security = ADS with Kerberos. This is worked but the way we did not want. Because, only windows domain users were able to login and NIS users not. New `/etc/smb.conf`                   workgroup = WORKGROUPNAME         realm = domain.com         security = ADS         password server = dc6n.domain.com         utmp = Yes         idmap config *:backend = tdb         idmap config *:range = 5000-9999         idmap config NETADM:backend = tdb         idmap config NETADM:range = 10000-90000         idmap uid = 100000-500000         idmap gid = 100000-500000         template homedir = /home/%U         template shell = /bin/tcsh         winbind cache time = 1800         winbind enum users = No         winbind enum groups = No         winbind use default domain = Yes         winbind separator = /         create krb5 conf = No         local master = yes         domain login = yes         domain master = yes         preferred master = yes      New `/etc/nsswitch.conf`                   passwd files winbind  nis         hosts  files winbind  nis       New `/etc/krb5.conf`                   [libdefaults]              domain.com = domain.com             dns_lookup_kdc = true               [realms]              symantec.local = {                  kdc = dc6n.domain.com                 admin_server = dc6n.domain.com             }               [domain_realm]          .domain.com = domain.com      I am able to get users info from AD and NIS with `wbinfo` and `genent` commands. How can we authenticate like old style again?


title: extracting certain info from output

text: I'm trying to extract certain info from ffmpeg output. Sample ffmpeg output:               configuration:  --enable-memalign-hack --enable-mp3lame --enable-gpl --disable-vhook --disable-ffplay --disable-ffserver --enable-a52 --enable-xvid --enable-faac --enable-faad --enable-amr_nb --enable-amr_wb --enable-pthreads --enable-x264      libavutil version: 49.0.0     libavcodec version: 51.9.0     libavformat version: 50.4.0     built on Apr 15 2006 04:58:19, gcc: 4.0.1 (Apple Computer, Inc. build 5250)     Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'file.mov':     Duration: 00:01:32.0, start: 0.000000, bitrate: 63489 kb/s     Stream #0.0(eng): Audio: pcm_s16le, 48000 Hz, stereo, 1536 kb/s     Stream #0.1(eng), 29.97 fps(r): Video: Apple ProRes 422, 1280x720     Must supply at least one output file      I want to get back a string with just Duration, frame rate, codec, and size, e.g.:               [00:01:32_29.97_Apple ProRes 422_1280x720]      I tried starting with this (from another hint):               ffmpeg -i file.mov 2>&1 | sed -n 's/Duration: \(.*\), start/\1/gp'      to get the Duration, but that just 'removed' the `Duration` and `, start`, i.e.:               00:01:32.0: 0.000000, bitrate: 63489 kb/s      PS: I'd also like to remove the `Apple` from `Apple ProRes 422` :-) Thanks! Update: I was able to extract the codec with               sed -n "s/.*\Video: \(.*\),.*/\1/p"      but I don't know how to (a) get the size and framerate, and (b) combine the searches on one line...


title: Moved folder into other has now disappeared

text: Two folders in same directory and I wanted to move one into other with command `mv foo /foo2` but now foo has vanished.


title: Configuring Apache 2.4 for CGI on FreeBSD

text: I am trying to run CGI on FreeBSD 9.2.   1. I installed Apache 4.2 (`pkg install apache42`)   2. Configured it to load CGI module.    3. Also, I did `chmod a+x` on files in `cgi-bin` directory.  And when I connect to the server to a test CGI script, the server printed this error message.               AH01215: (13)Permission denied: exec of '/usr/local/www/apache24/cgi-bin/test-cgi' failed     End of script output before headers: test-cgi      What's wrong and how to fix this problem?


title: How to turn off STARTTLS for internal relaying of emails?

text: I read with interest from sendmail guide that it is possible to disable TLS. I tried doing so for internal mails by adding the following lines in `/etc/mail/access`:               Try_TLS:my.server           NO     Try_TLS:localhost6.localdomain6         NO     Try_TLS:localhost.localdomain           NO     Try_TLS:localhost           NO     Try_TLS:127.0.0.1           NO      However, it doesn't seem to work and I am still seeing the following:               Received: from my.server (localhost6.localdomain6 [127.0.0.1])         by my.server (8.14.8/8.14.8) with ESMTP id s6H2Wanf004005         (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO)         for <user@my.server>; Tue, 15 Jul 2014 10:32:36 +0000     Received: (from user@localhost)         by my.server (8.14.8/8.14.8/client) id s6H2WZfQ004004         for user; Tue, 15 Jul 2014 10:32:35 +0000      Any idea?


title: Difference between Cross GCC and Linux GCC toolchain

text: While creating new C++ Project in Eclipse, I am being asked about toolchain. What is the practical difference between these toolchains - `Cross GCC` and `Linux GCC`. In what circumstances use them? Does it have something to do with whether the project is going to be compiled both on linux and windows machines? In one of the answers we can read: > Generally a cross compiler is a compiler producing code for a different kind > of system than yours. so if I compile project on target machine using own makefiles, it does not matter what option I will choose here, right?


title: Cannot find lib in path

text: I am trying to start a program that relies on some libraries that are in my path, however, the program says it cannot find the files:               11:45:27 ~ > echo $PATH     /usr/share/fsl/5.0/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/mri/Scripts:/home/mri/Scripts/MRI:/home/mri/Software/BRAINS3/bin:/home/mri/Software/BRAINS3/lib:/home/mri/Software/ITK_Build/bin:/home/mri/Software/ITK_Build/lib:/home/mri/Software/VTK_Build/bin:/home/mri/Software/VTK_Build/lib:/usr/lib/fsl/5.0          11:45:33 ~ > brains3     /home/mri/Software/BRAINS3/bin/brains3_real: error while loading shared libraries: libiplUtils.so: cannot open shared object file: No such file or directory          11:45:35 ~ > sudo find / -name libiplUtils.so     [sudo] password for mri:      /home/mri/Software/BRAINS3/lib/libiplUtils.so      Does anybody have an idea how to fix this?


title: Trouble adding existing user to existing group in ubuntu

text: I was trying to add a user called bill to www group               useradd -G www bill      It gives me error               UX: useradd: ERROR: bill is already in use.  Choose another.      I checked if this user already in the group www by typing this command               group bill      it resulted               bill:bill      Which means he is not in www group but still i keep getting the error Later I realized from this link that there are different commands to add existing user to existing group and adding a new user to new group. So I tries this command to add bill (an existing user) to www (an existing group)               usermod -a -G www bill      It gives me syntax error               UX: usermod: ERROR: Invalid syntax.     usage:  usermod -u uid [-o] | -g group | -G group[[,group]...] |                     -d dir [-m] | -s shell | -c comment |                     -l new_logname | -f inactive | -e expire |                     -A authorization [, authorization ...] | -K key=value ... |                     -P profile [, profile ...] | -R role [, role ...] login      Please help


title: Increment numbers inside strings by an offset

text: I want to search a text file for strings like these.               [task0]     [task1]     ...     [task1613]      and increment each by a given offset, in this case by 3640. So, with the example I gave above, I'd get the following.               [task3640]     [task3641]     ...     [task5253]      I want each of the incremented numbers in their original positions in the target file though, with `[task#]` wrapped around the number. Using `sed`:               sed "/^\[task/s/[0-9]*\]/3640+&/" ./test.file2      I can get something like:               [task3640+0]     [task3640+1]     ...     [task3640+1614]      but that isn't very useful because I don't know how to evaluate the expressions in place and I'm fairly sure that `sed` isn't suited for this. I'm thinking that `awk` or `perl` would work better for this, but I'm fairly inept at both of them. Can someone at least point me in the right direction, please? I've spent way longer than I want to admit on this already. For a more detailed view of what I want to do see this page on pastebin.


title: install kernel headers without overwriting old headers

text: I've built a newer (3.16-rc2) kernel which is running fine. My userspace program needs to link against the newer headers as it uses some new definitions in fcntrl.h etc. My question is how do I preserve the headers of the old kernel when running "make headers_install" ? If run               make headers_install INSTALL_HDR_PATH=/usr/src/kernels/`uname -r`       Header definitions clash as /usr/src/include is still in the PATH. Whats the proper way to handle this?


title: Determine maximum column length for every column in csv-file

text: To determine the maximum length of each column in a comma-separated csv-file I hacked together a bash-script. When I ran it on a linux system it produced the correct output, but I need it to run on OS X and it relies on the GNU version of `wc` that can be used with the parameter `-L` for `\--max-line-length`. The version of `wc` on OSX does not support that specific option and I'm looking for an alternative. My script (which not be that good - it reflects my poor scripting skills I guess):               #!/bin/bash          for((i=1;i< `head -1 $1|awk '{print NF}' FS=,`+1 ;i++));         do echo  | xargs echo -n "Column$i: " &&          cut -d, -f $i $1 |wc -L  ; done      Which prints:               Column1: 6     Column2: 7     Column3: 4     Column4: 4     Column5: 3      For my test-file:               123,eeeee,2323,tyty,3     154523,eegfeee,23,yty,343      I know installing the GNU CoreUtils through Homebrew might be a solution, but that's not a path I want to take as I'm sure it can be solved without modifying the system.


title: PPTP VPN in CentOS 7

text: I recently installed CentOS 7 (Gnome), but I realized that there are no options for setting up a PPTP VPN client. I tried to install `networkmanager-pptp-gnome`, but unfortunately it's not available in EPEL and CentOS repository. How can I add PPTP VPN to CentOS? ![No PPTP](http://i.stack.imgur.com/2XVd6.png)


title: "usb 3-2: can't set config #1, error -110" - USB keyboard works in Windows 8 laptop but on PC only until Linux boots

text: I tried 2 new USB keyboards that work until Linux starts booting. When booting I saw:               [    8.365211] usb 3-2: New USB device found, idVendor=1a2c, idProduct=0b23     [    8.404863] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0     [    8.444623] usb 3-2: Product: USB Keyboard     [   10.641472] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)     [   13.481363] usb 3-2: can't set config #1, error -110     [   13.523672] usb 3-2: USB disconnect, device number 2     [   13.804028] usb 3-2: new low-speed USB device number 3 using uhci_hcd      `lsusb` shows no keyboard. _I can't try anything requiring SuperUser permissions because it requires my password._ > **I've found using google:**   * **110** is related to **power** , some say not enough others it's overcurrent protection   * Toggle `usb legacy mode` in BIOS.I toggled it and also `usb 1.1 emulation` (description mentions typing special keyboard keys) and `plug n play aware os`   * Unload ehci module (responsible for usb 2.0) **requires root** and all usb devices will work slower (To type, I would keep using Ultimate Control (requires Android) that I have installed earlier but it can't even type normally because it capitalizes letters randomly {it didn't do that before this problem, maybe this is a coincidence} and no android keyboard has all PC keyboard keys working as on a PC keyboard or have them at all.) > **This occurs with:**   * _Titanum TK101_ and _Tracer Patriot Black_ keyboard (these keyboards look identical except logo and key stickers, maybe hardware is same)   * K8T NEO-FSR Motherboard version 1.0 with **last BIOS**   * COLORSIT 330U-FPH PSU   * AMD Venice 3000+ CPU   * **Lubuntu 14.04/10 64-bit** OS (I've run `do-release-upgrade -d` and update it everyday)   * Linux 3.16-rc3   * BIOS always showing **CPU stepping as CG** and its temp as less than 30°C and motherboard temp always less than 40°C and voltages within ATX specification. I don't know how:     1. correct these values are     2. much they change during work. > UPDATE this problem is being avoided by using a keyboard which is exactly > the same model (tracer patriot black) but with a ps/2 connector.The seller > said me these keyboards work on Linux/Ubuntu machines (telling Me he > installs Linux sometimes for his clients), making Me believe the problem is > also caused by my old PC machine. **Any other info? I don't know what else, please tell Me**


title: What is the difference of -a and -e in bash's conditional expressions?

text: From `man bash`:               CONDITIONAL EXPRESSIONS     [...]            -a file                   True if file exists.     [...]            -e file                   True if file exists.        1. So what is the difference between `[ -a $FILE ]` and `[ -e $FILE ]`, if any?   2. If there is no real difference, why do two flags for the same purpose exist?


title: how to assign values of the column for given conditional statements

text: I need help with a script to assign values of the column with a given conditional argument. To be specific, here is my data and my condition input `data.file`:               0.4     3.6     -2.4     0.1     -2.0     1.6     2.2     3.6      condition: assign R if data.file greater than 2(>2), assign S if data.file less than -2(<-2), and assign M if data.file greater than or equal to-2 and less than or equal to 2 [-2,2]. Desired output file `out.file`               0.4  M     3.6  R     -2.4 S     0.1  M     -2.0 M     1.6  M     2.2  R     3.6  R


title: tmux "last-session" binding

text: How could I bind to last (most recent) session? The obvious `last-session` leads to an "unknown command" error.               bind-key z last-session


title: Running `sudo /sbin/service mysqld start` causes system to crash

text: OS: CentOS 5.10   Service: Amazon Web Services   Attempted to remove MySQL 5.0 and install MySQL 5.6 I had a server set up, and was going to use MySQL, but it was was set up with MySQL 5.0. Since there are performance improvements and other features added, and there wasn't yet any data or anything, I wanted to install MySQL 5.6. I was following the guide posted by Oracle to get an RPM installed for use on RHEL 5: http://dev.mysql.com/doc/mysql-repo-excerpt/5.6/en/linux-installation-yum- repo.html Everything went swimmingly, and I could start the service immediately after installing - but... When I got to this step: > Always run the program mysql_secure_installation to secure your MySQL > installation: > > shell> mysql_secure_installation > > mysql_secure_installation allows you to perform important operations like > setting root password, removing anonymous users, and so on. The program is > safe and easy to use. It is important to remember the root password you set > though. See mysql_secure_installation — Improve MySQL Installation Security > for details. I ran mysql_secure_installation, and when it asked for a password, I attempted to just press enter, since I had not yet set one for root@localhost. I was informed that the password was incorrect. So tried what the previous password was, and was given an error that I have since lost because I'm connecting through putty, and the window closed when I lost the connection. In any case - I just asked for the password again, so I tried just pressing enter, and the old password again, niether worked. So I cancelled the process, ran `sudo /sbin/service mysqld stop` and then `sudo /sbin/service mysqld start`. The shell stopped, hung for a second, and then the window closed, and thus my connection. I tried to open the ssh connection again, but it timed out. After waiting a few minutes, I could ssh back into the server. Every time I attempt to start the mysqld service, my ssh session closes. Does that maybe mean that sshd is crashing as well? The log file `/var/log/mysql.log` contains only the following:               131204 23:49:02 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql     131204 23:50:53 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended     131205 00:05:12 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql     131205 00:06:28 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended     131205 00:08:09 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql     131205 00:09:14 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended     131205 00:13:54 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql     131205 00:15:04 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended     131205 00:25:12 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql     131205 00:26:45 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended      I've tried running mysql manually, and the same thing happens. What do I do from here? * * * # Edit: I just ran mysqld_safe to see what the output is, and it gets this far:               [user@machine mysql]$ sudo /usr/bin/mysqld_safe     131205 01:13:33 mysqld_safe Logging to '/var/log/mysqld.log'.     131205 01:13:33 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql     Killed      Before hanging up on me. What happens if I move those databases that InnoDB uses? * * * As per Patrick, I checked `dmesg`, and searched for `mysqld`. I found the following:               type=1400 audit(1386200078.706:1929): avc:  denied  { read } for  pid=20563 comm="nohup" path="/usr/sbin/mysqld" dev=xvda1 ino=375035 scontext=user_u:system_r:netutils_t:s0 tcontext=system_u:object_r:mysqld_exec_t:s0 tclass=file     sudo invoked oom-killer: gfp_mask=0x201d2, order=0, oomkilladj=0          Call Trace:      [<ffffffff802c1b64>] out_of_memory+0x8b/0x203      [<ffffffff8020fa5d>] __alloc_pages+0x27f/0x308      [<ffffffff802139dd>] __do_page_cache_readahead+0xc8/0x1af      [<ffffffff8021424e>] filemap_nopage+0x14c/0x360      [<ffffffff80208e9d>] __handle_mm_fault+0x444/0x144f      [<ffffffff8026ea01>] monotonic_clock+0x35/0x7b      [<ffffffff8029b54a>] attach_pid+0x7c/0xa9      [<ffffffff80266d94>] do_page_fault+0xf72/0x131b      [<ffffffff8024901b>] skb_dequeue+0x48/0x50      [<ffffffff80254146>] unix_release_sock+0x19e/0x1fa      [<ffffffff80261df5>] thread_return+0x6c/0x113      [<ffffffff80207116>] kmem_cache_free+0x84/0xd7      [<ffffffff80207116>] kmem_cache_free+0x84/0xd7      [<ffffffff8025f82b>] error_exit+0x0/0x6e      And:               mysqld invoked oom-killer: gfp_mask=0x201d2, order=0, oomkilladj=0          Call Trace:      [<ffffffff802c1b64>] out_of_memory+0x8b/0x203      [<ffffffff8020fa5d>] __alloc_pages+0x27f/0x308      [<ffffffff802139dd>] __do_page_cache_readahead+0xc8/0x1af      [<ffffffff8021424e>] filemap_nopage+0x14c/0x360      [<ffffffff80208e9d>] __handle_mm_fault+0x444/0x144f      [<ffffffff8020622a>] hypercall_page+0x22a/0x1000      [<ffffffff8020622a>] hypercall_page+0x22a/0x1000      [<ffffffff80266d94>] do_page_fault+0xf72/0x131b      [<ffffffff80236fd3>] __vm_enough_memory+0xee/0xfc      [<ffffffff8020e472>] do_mmap_pgoff+0x35e/0x74a      [<ffffffff80236fd3>] __vm_enough_memory+0xee/0xfc      [<ffffffff80263929>] _spin_lock_irqsave+0x9/0x14      [<ffffffff802313f1>] __up_write+0x27/0xf2      [<ffffffff8025f82b>] error_exit+0x0/0x6e          Mem-info:     DMA per-cpu:     cpu 0 hot: high 0, batch 1 used:0     cpu 0 cold: high 0, batch 1 used:0     DMA32 per-cpu:     cpu 0 hot: high 186, batch 31 used:79     cpu 0 cold: high 62, batch 15 used:58     Normal per-cpu: empty     HighMem per-cpu: empty     Free pages:        4780kB (0kB HighMem)     Active:114881 inactive:1 dirty:1 writeback:0 unstable:0 free:1195 slab:5226 mapped-file:541 mapped-anon:114329 pagetables:1094     DMA free:2004kB min:48kB low:60kB high:72kB active:540kB inactive:0kB present:9076kB pages_scanned:1381592 all_unreclaimable? yes     lowmem_reserve[]: 0 489 489 489     DMA32 free:2776kB min:2804kB low:3504kB high:4204kB active:458984kB inactive:4kB present:500960kB pages_scanned:10643850 all_unreclaimable? yes     lowmem_reserve[]: 0 0 0 0     Normal free:0kB min:0kB low:0kB high:0kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no     lowmem_reserve[]: 0 0 0 0     HighMem free:0kB min:128kB low:128kB high:128kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no     lowmem_reserve[]: 0 0 0 0     DMA: 1*4kB 0*8kB 1*16kB 0*32kB 1*64kB 1*128kB 1*256kB 1*512kB 1*1024kB 0*2048kB 0*4096kB = 2004kB     DMA32: 28*4kB 1*8kB 0*16kB 1*32kB 1*64kB 0*128kB 0*256kB 1*512kB 0*1024kB 1*2048kB 0*4096kB = 2776kB     Normal: empty     HighMem: empty     585 pagecache pages     Swap cache: add 0, delete 0, find 0/0, race 0+0     Free swap  = 0kB     Total swap = 0kB     Free swap:            0kB     131072 pages of RAM     5993 reserved pages     4445 pages shared     0 pages swap cached     Out of memory: Killed process 20563, UID 0, (mysqld).      * * * What do I do from here?


title: How to delete a line if string is the only thing on the line

text: How can I use sed or something else to delete a line only if the string I'm searching for is the only thing on the line? Example output:                   device-address-binding: ?         database-revision: 20       -- Found 198 Objects        },        {          object-identifier: (Analog Input, 1)         object-type: ({  Analog Input  },)         object-name: "CA-1 T EXT"         descrip      I need to delete the lines containing " }," but only on lines that have nothing else. If I use sed to match and delete a line containing " }," on the output above the line "object-type" would also get deleted. It would be nice to search for " },/n" but we all know sed doesnt work that way. Thanks for your help.


title: Can't use "userspace" cpufreq governor and set cpu frequency

text: I'm trying to change the cpu frequency on my laptop (running Linux), and not having any success.   Here are some details:               # uname -a     Linux yoga 3.12.21-gentoo-r1 #4 SMP Thu Jul 10 17:32:31 HKT 2014 x86_64 Intel(R) Core(TM) i5-3317U CPU @ 1.70GHz GenuineIntel GNU/Linux          # cpufreq-info     cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009     Report errors and bugs to cpufreq@vger.kernel.org, please.     analyzing CPU 0:       driver: intel_pstate       CPUs which run at the same hardware frequency: 0       CPUs which need to have their frequency coordinated by software: 0       maximum transition latency: 0.97 ms.       hardware limits: 800 MHz - 2.60 GHz       available cpufreq governors: performance, powersave       current policy: frequency should be within 800 MHz and 2.60 GHz.                       The governor "powersave" may decide which speed to use                       within this range.       current CPU frequency is 2.42 GHz (asserted by call to hardware).     (similar information for cpus 1, 2 and 3)          # cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors     performance powersave      I initially had the userspace governor built into the kernel, but then I also tried building it as a module (with the same results); it was loaded while running the above commands (and I couldn't find any system messages when loading it):               # lsmod     Module                  Size  Used by     cpufreq_userspace       1525  0     (some other modules)      And here are the commands I tried for changing the frequency:               # cpufreq-set -f 800MHz     Error setting new values. Common errors:     - Do you have proper administration rights? (super-user?)     - Is the governor you requested available and modprobed?     - Trying to set an invalid policy?     - Trying to set a specific frequency, but userspace governor is not available,        for example because of hardware which cannot be set to a specific frequency        or because the userspace governor isn't loaded?          # cpufreq-set -g userspace       Error setting new values. Common errors:     - Do you have proper administration rights? (super-user?)     - Is the governor you requested available and modprobed?     - Trying to set an invalid policy?     - Trying to set a specific frequency, but userspace governor is not available,        for example because of hardware which cannot be set to a specific frequency        or because the userspace governor isn't loaded?      Any ideas?


title: observing script execution with monit script seems to ignore pipes

text: I want to have a bash command running in the background and being watched by monit. To get the PID of this process, I found this script on the web and I modified it to fit my commands: (named sdr.sh)               #!/bin/bash          NAME="sdr"     LOG_FILE="/tmp/$NAME.log"     PID_FILE="/var/run/$NAME.pid"     CMD="/usr/local/bin/rtl_fm -o 4 -A lut -s 22050 -f 254.2355M - | /usr/local/bin/multimon-ng -t raw -f alpha /dev/stdin |& /home/me/import.rb"          function startnotification {     VAR=`ps -ef | grep "$CMD" | grep -v grep | wc -l`     if [ $VAR -gt 0 ]; then     echo "$NAME already running..."     else     nohup $CMD > $LOG_FILE 2>&1 &     echo $! > $PID_FILE     echo "$NAME listener is started..."     fi     }          function stopnotification {     kill `cat /var/run/$NAME.pid`     rm -f $PID_FILE     echo "$NAME listener stopped."     }     case $1 in     start) startnotification;;     stop)  stopnotification;;     restart)     stopnotification     startnotification;;     *)     echo "usage: $NAME {start|stop}" ;;     esac     exit 0      When I execute the command               /usr/local/bin/rtl_fm -o 4 -A lut -s 22050 -f 254.2355M - | /usr/local/bin/multimon-ng -t raw -a POCSAG1200 -f alpha /dev/stdin |& /home/me/import.rb      In my bash cmd it works fine. But when I do a `sdr.sh start` I get the following error:               /usr/local/bin/rtl_fm: invalid option -- 'a'      As you can see, the `-a` is a parameter of `multimon-ng` and not of `rtl_fm`. It seems, that this pipe is not interpreted as pipe.


title: Find pattern from one file listed in another

text: I want to find patterns that are listed in one file and find them in other file. The second file has those patterns separated by commas. for e.g. first file F1 has genes               ENSG00000187546     ENSG00000113492       ENSG00000166971      and second file F2 has those genes along with some more columns(five columns) which I need                region     gene           chromosome  start       end           intronic   ENSG00000135870 1   173921301   173921301     intergenic  ENSG00000166971(dist=56181),ENSG00000103494(dist=37091) 16 53594504    53594504     ncRNA_intronic  ENSG00000215231 5   5039185 5039185     intronic    ENSG00000157890 15  66353740    66353740      So the gene ENSG00000166971 which is present in the second file does not show up in grep because it has another gene with it,separated by comma. My code is:               grep -f "F1.txt" "F2.txt" >output.txt      I want those values even if one of them is present,and the associated data with it.Is there any way to do this?


title: How to make fonts available to the system

text: I'm using Android Studio, and in the drop down list of fonts is Source Code Pro. On that list, the font looks quite nice, but the preview below (and what I get when I select it) is horrible. I'm using "size 14". I thought perhaps that Android Studio is using a bitmap for that text, rather than rendering it, and I couldn't find any evidence the font was installed as the System Settings part of Linux Mint KDE 13 doesn't offer it in any lists of fonts, so I downloaded it, copied the files (.otf.woff and .ttf.woff format) into               /usr/share/fonts/truetype      then ran               fc-cache -fv      Part of the output of this is:               /usr/share/fonts/truetype/sourcecodepro: caching, new cache contents: 0 fonts, 0 dirs      Suggesting it's not recognizing it. I've even rebooted (Windows habits die hard) but I can't see this font anywhere other than in Android Studio. Am I doing something wrong in how I install this font?


title: How to chain ssh and stay in prompt

text: I want to create a script that when I double click runs:   1. 'ssh -Y server1'   2. WITHIN server1 run 'ssh -Y server2' (server2 not accessible outside)   3. I now have the terminal prompt connected to server2 waiting to run commands


title: Vuescan Application

text: I have Kodak i1120 document scanner. Driver is available for windows only. But an application named `Vuescan` managed to run it on Linux ( tried on Ubuntu 11.10 and 10.04 ). How they had managed to do so ? Is it possible to use Windows scanner driver on Linux ? Same as that of `ndiswrapper` for `wireless media`


title: How to get total disk read/write in bytes per hdd device from /proc

text: How to get total disk read/write in bytes per hdd device? for example if i have sda, sdb, and sdc, is there any file on `/proc` that i could use similar to `/proc/net/dev` for networking?


title: CentOS 6.4: Unable to mount disc, doesn't like UDF

text: I'm trying to use a CD on CentOS 6.4, but I keep getting this error: > Unable to mount Disc Error mounting: mount: unknown filesystem type 'udf' I've installed `udftools` I've tried changing the permissions around on `/dev/sr0` to no avail. I've tried various ways of mounting the disc such as:   * `mount /dev/sr0 /mnt` (unknown filesystem type 'udf')   * `mount -t auto /dev/sr0 /mnt` (unknown filesystem type 'udf')   * `mount -r -t iso9660 /dev/sr0 /mnt` (wrong fs type...)   * `mount -t udf /dev/sr0 /mnt` (unknown filesystem type 'udf', despite being in the man page for mount)   * `dd if=/dev/sr0 of=disc.iso` -> `mount -o loop disc.iso /mnt -t iso9660` I can see and read from the disc just fine in a VM on that host and on other physical machines. It also seems to happen with just about every disc that I've tried. Any thoughts?


title: Addition with 'sed'

text: I am trying to perform a mathematical operation with `sed`, but it continues to treat my variables as strings. The input is of this kind:               $ echo 12 | sed 's/[0-9]*/&+3/'     $ 12+3      I'd like to have 15 as output. I need to do the operation and replace its mathematical result in only one passage, because I am running the program as a Python daemon, and I want to avoid passages like redirecting `stdout` on files, open those files, perform operations, extract the result, do the replacement. To me, `sed` seems the best to perform all in one line. I've tried to cast both input and output in various ways like               $ echo 12 | sed 's/[0-9]*/int(&+3)/'     $ echo 12 | sed 's/[0-9]*/\int(&+3)/'     $ echo 12 | sed 's/[0-9]*/\int(&+3)/'      but the result was always a printing of the second field.


title: Replace whole line in a file from command-line

text: I have a text file which has some contents similar to this:               # General information about the project.     project = u'Py6S'     copyright = u'2012, Robin Wilson'          # The version info for the project you're documenting, acts as replacement for     # |version| and |release|, also used in various other places throughout the     # built documents.     #     # The short X.Y version.     version = '0.5'     # The full version, including alpha/beta/rc tags.     release = '0.5'      I would like to replace the `version = '0.5'` line with `version = X` where X is a command-line argument given to a script, and then do the same for the `release =` line. Is there a simple command I can call to do this sort of replacing? I've looked into `sed` a bit, but it seems that the global substitution in sed would require me to search for `version = '0.5'`, but all I really want to search for is a line beginning with `version =` - as I have no idea what the version might be when I run the script! Any ideas?


title: Convert absolute symlink to relative symlink with simple Linux command

text: I have a complete sub-filesystem inside a path `/home/user/system` containing the standard Linux structure with directories `/bin`, `/home`, `/root`, `/usr`, `/var`, `/etc`,... This sub-filesystem contain symbolic links, either relative or absolute. The relative symlinks are just fine, they stay within the sub-filesystem under `/home/user/system`. But absolute symlinks are problematic, as they point to a target outside of the sub-filesystem. As an example we assume an absolute symlink as follows (seen inside the sub- filesystem):               /usr/file1 -> /usr/lib/file1      In the overall filesystem we have a link at `/home/user/system/usr/file1` that now point to a file `/usr/lib/file1` outside the sub-filesystem, instead of a file `/home/user/system/usr/lib/file1` _inside_ the sub-filesystem. I would like to have a simple script, preferably a single command line (rsync, chroot, find, ...) that converts every absolute symlink to a relative one. In the given example, that relative link would become               /usr/file1 -> ../usr/lib/file1


title: Downgrade gcc to 4.6.3 on fedora?

text: How can I downgrade gcc to 4.6.3 on fedora. I am working on a project that I do not have permission to update to be comparable with 4.8 and need to be able to install gcc 4.6.3. How can I do this?


title: How to configure mailx to support Gmail?

text: How can I set up `mailx` to send messages to my Gmail account? What I do now is run the command:               mail -s "hello kid" mymail@gmail.com      It freezes and does nothing. I tried some variations, but all of them just froze dead in my terminal. Is there anything I need to configure in `mailx` before actually using `mail`? There were different options found on the Internet, like making a `.mailrc` and other config files, but I got nowhere. Can someone provide me with more information on the subject?


title: Cannot access to localhost with 127.0.0.1

text: When I type 127.0.0.1 in address bar of browser, I get the following result:               Not Found          The requested URL / was not found on this server.          Apache/2.2.22 (Fedora) Server at 127.0.0.1 Port 80      What can cause this problem?


title: Linux I/O shared memory access

text: I'm pretty confused on how linux manages I/O shared memory to communicate with devices that use it. If I understood it correctly linux kernel starts mapped at 0x100000 (to avoid the first megabyte legacy ram data and to be stored in contiguous memory locations) and then after entering protected mode:   * on 32 bit systems there's a mapping like this http://i.stack.imgur.com/zEkq2.jpg The ZONE_NORMAL should be below 896 MB, so the mapping between the kernel linear 1GB and the physical 896 MB is always possible. Let's just ignore the ZONE_DMA for now (I read that this is just for legacy systems since PCI can now use DMA transfers everywhere in memory)   * on 64 bit systems the kernel linear address space should start from PAGE_OFFSET= 0xffff810000000000 and forth In both cases, if an address in the kernel space is greater than PAGE_OFFSET, should refer to a ioremap mapping (to be resolved through pagination), if it's lower than PAGE_OFFSET it could be resolved with a simple NEW_ADDRESS = OLD_ADDRESS - PAGE_OFFSET. Is this correct? Bonus question: when the kernel is up and running and the tidying up has been done, does it still physically reside from 0x100000 and forth (within the first GB) ? Even on 64bit systems?


title: path in environment variable PATH, but command still not found

text: I am working with a Redhat distribution. Mysql is installed with the binary in the following path:               /root/opt/rh/mysql55/root/usr/bin/mysql      Furthermore, the environmental variable PATH echos:               echo $PATH     /root/opt/rh/mysql55/root/usr/bin/mysql:/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/root/opt/rh/mysql55/root/usr/bin/mysql      The server has been restarted but if I type               mysql       into bash it returns the following:               # mysql -u root     -bash: mysql: command not found      Please advise **EDIT** Altered PATH EV to               /root/opt/rh/mysql55/root/usr/bin      using               export  mysql /opt/rh/mysql55/root/usr/bin     export  PATH  ${mysql}:${PATH}      Still get `command not found` After rebooting the server, echo $PATH is now:               /usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin      So, the path to mysql is gone.


title: Find last shutdown time

text: This is the command I am using:               last -x|grep shutdown | head -1      but it's giving me the duration with +2 hours:               shutdown system down  3.14-1-amd64     Mon Jul 21 08:43 - 22:19  (13:36)      the last shutdown time (08:43) is correct, but the startup time (22:19, should be 20:19) is incorrect. Is there a better command to check how long ago the PC was shutdown? or is my DST settings or something else causing this? PS: I am using Debian testing _(Linux rig 3.14-1-amd64 #1 SMP Debian 3.14.12-1 (2014-07-11) x86_64 GNU/Linux)_


title: How to determine the newly closed file within a continuous audit log rotation?

text: I am attempting to find the best way to determine when the second file (of a matching criteria) is created. The context is an audit log rotation. Given a directory where audit logs are created every hour, I need to execute a parsing `awk` script upon the audit log that has been closed off. What I mean by that, is that every hour a new audit log is created, and the old audit log is closed, containing up to an hours worth of information. The new log file is to be left alone until it too is closed and a new one created. I could create a bash shell script and use `find /home/tomcat/openam/openam/log -name amAuthentication.* -mmin -60` and then have this executed every 10 minutes via a `crontab` entry but I'm not sure how to write the rest of it. I suppose the script could start off by saving the contents of that find to a temp file, and upon every `crontab` execution, compare the new find command contents and when it changes, use the temp file as the input to the awk script. When the `awk` script is complete, save the contents of the new find to the file. * * * A colleague has suggested I use the old school 'sticky-bit' to flag processed files. Perhaps this is the way to proceed.


title: What is metadata, and how does it aid in the "fsck" process?

text: If I understand it correctly, "fsck" is used in UNIX systems to check for internal consistency within disks after there has been a crash. I was wondering, then, how it uses "metadata" to make sure that everything in the filesystem is consistent, for instance what steps the fsck process needs to take in order to restore and repair? -> edit: it would also be helpful if someone could clarify what "synchronous write-through" refers to in this picture as well.


title: Problem in Cross compiling TinyCC with CodeSourcery

text: I am trying to cross compiling homas Preud'homme's version of TinyCC by using following command               ./configure --cc=arm-none-linux-gnueabi-gcc --prefix=/home/shushant/tinycc/tc      and it shows following error message after running `make install`               make: Circular Makefile <- Makefile dependency dropped.     make -C lib native     make[1]: Entering directory `/home/shushant/tinycc/lib' arm-none-linux-gnueabi-gcc -c alloca86_64.S -o x86_64/alloca86_64.o -I..  -Wall -g -O2 -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -Wno-unused-result -DTCC_TARGET_X86_64     alloca86_64.S: Assembler messages:     alloca86_64.S:7: Error: expression too complex -- `pop %rdx'     alloca86_64.S:11: Error: ARM register expected -- `mov %rdi,%rax'     alloca86_64.S:13: Error: ARM register expected -- `add $15,%rax'     alloca86_64.S:14: Error: ARM register expected -- `and $-16,%rax'     alloca86_64.S:15: Error: bad instruction `jz p3'     alloca86_64.S:28: Error: ARM register expected -- `sub %rax,%rsp'     alloca86_64.S:29: Error: ARM register expected -- `mov %rsp,%rax'     alloca86_64.S:35: Error: expression too complex -- `push %rdx'     alloca86_64.S:36: Error: bad instruction `ret'     alloca86_64.S:40: Error: junk at end of line, first unrecognized character is `,'     make[1]: *** [x86_64/alloca86_64.o] Error 1     make[1]: Leaving directory `/home/shushant/tinycc/lib'     make: *** [libtcc1.a] Error 2      some how binaries is successfully generated but in wrong directory (at the root of `/home/shushant/tinycc`) instead of `/home/shushant/tinycc/tc` and when I am trying to run on android emulator its show`file not found` of course generated binaries is not supported by device. How can I fix it?


title: Command-line cURL submit form from other files

text: In this command:               curl -d param1=value1 -d param2=value2 http://example.com/submit      If `value1` is located in `file1.txt`, how can I make cURL include `file1.txt` in the command?


title: Install Puppy Linux or "Damn Small Linux" on Pogoplug (~NSLU2) possible

text: I am thinking about buying Pogoplug (50 $) which is in fact a NAS server similar to the famous `nslu2`. Like the `nslu2`, this device can be hacked to have a full fresh Linux server running. There are lots of tutorials on how to install Linux and `LAMP` to turn it into a web server. Check here **My question is if Pogoplug is able to run Linux, is it then possible to install Puppy Linux (or with live USB) with the graphical user interface?** I ask this because I don't know if there is a graphics board inside. Please excuse my lack of knowledge. Thanks for your time.


In My server, running Linux Redhat, I have NGINX, PHP Installed already. Now I want to install PHP-FPM, VARNISH, APC, FASTCGI as well Memcache to speed up my server for my wordpress website.. (I am not expert in linux/redhat). I read this and so I want to install it in my server. http://www.danielmiessler.com/blog/optimizing-wordpress-with-nginx- varnish-w3-total-cache-amazon-s3-and-memcached. I have excidently done update and after that I get following error               yum install varnish     Loaded plugins: fastestmirror, priorities, protectbase, replace     Loading mirror speeds from cached hostfile      * base: centos.mirror.secureax.com      * epel: mirror.nus.edu.sg      * extras: centos.mirror.secureax.com      * mratwork-epel: mirror.nus.edu.sg      * remi: mirror.smartmedia.net.id      * updates: centos.mirror.secureax.com     http://centos.alt.ru/repository/centos/6/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 403 Forbidden"     Trying other mirror.     Error: Cannot retrieve repository metadata (repomd.xml) for repository: mratwork-centalt. Please verify its path and try again      Please help me what should I do now to install varnish?? and other stuff? **Files** **CentOS-Base.repo**               # CentOS-Base.repo     #     # The mirror system uses the connecting IP address of the client and the     # update status of each mirror to pick mirrors that are updated to and     # geographically close to the client.  You should use this for CentOS updates     # unless you are manually picking other mirrors.     #     # If the mirrorlist= does not work for you, as a fall back you can try the      # remarked out baseurl= line instead.     #     #          [base]     name=CentOS-$releasever - Base     mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os     #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/     gpgcheck=1     gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6          #released updates      [updates]     name=CentOS-$releasever - Updates     mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates     #baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/     gpgcheck=1     gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6          #additional packages that may be useful     [extras]     name=CentOS-$releasever - Extras     mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras     #baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/     gpgcheck=1     gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6          #additional packages that extend functionality of existing packages     [centosplus]     name=CentOS-$releasever - Plus     mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus     #baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/     gpgcheck=1     enabled=0     gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6          #contrib - packages by Centos Users     [contrib]     name=CentOS-$releasever - Contrib     mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib     #baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/     gpgcheck=1     enabled=0     gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6      **CentOS-Debuginfo.repo**               # CentOS-Debug.repo     #     # The mirror system uses the connecting IP address of the client and the     # update status of each mirror to pick mirrors that are updated to and     # geographically close to the client.  You should use this for CentOS updates     # unless you are manually picking other mirrors.     #          # All debug packages from all the various CentOS-5 releases     # are merged into a single repo, split by BaseArch     #     # Note: packages in the debuginfo repo are currently not signed     #          [debug]     name=CentOS-6 - Debuginfo     baseurl=http://debuginfo.centos.org/6/$basearch/     gpgcheck=1     gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-Debug-6     enabled=0      **CentOS-Media.repo**               # CentOS-Media.repo     #     #  This repo can be used with mounted DVD media, verify the mount point for     #  CentOS-6.  You can use this repo and yum to install items directly off the     #  DVD ISO that we release.     #     # To use this repo, put in your DVD and use it with the other repos too:     #  yum --enablerepo=c6-media [command]     #       # or for ONLY the media repo, do this:     #     #  yum --disablerepo=\* --enablerepo=c6-media [command]          [c6-media]     name=CentOS-$releasever - Media     baseurl=file:///media/CentOS/             file:///media/cdrom/             file:///media/cdrecorder/     gpgcheck=1     enabled=0     gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6      **CentOS-Vault.repo**               # CentOS-Vault.repo     #     # CentOS Vault holds packages from previous releases within the same CentOS Version     # these are packages obsoleted by the current release and should usually not      # be used in production     #-----------------          [C6.0-base]     name=CentOS-6.0 - Base     baseurl=http://vault.centos.org/6.0/os/$basearch/     gpgcheck=1     gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6     enabled=0          [C6.0-updates]     name=CentOS-6.0 - Updates     baseurl=http://vault.centos.org/6.0/updates/$basearch/     gpgcheck=1     gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6     enabled=0          [C6.0-extras]     name=CentOS-6.0 - Extras     baseurl=http://vault.centos.org/6.0/extras/$basearch/     gpgcheck=1     gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6     enabled=0          [C6.0-contrib]     name=CentOS-6.0 - Contrib     baseurl=http://vault.centos.org/6.0/contrib/$basearch/     gpgcheck=1     gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6     enabled=0          [C6.0-centosplus]     name=CentOS-6.0 - CentOSPlus     baseurl=http://vault.centos.org/6.0/centosplus/$basearch/     gpgcheck=1     gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6     enabled=0     #-----------------          [C6.1-base]     name=CentOS-6.1 - Base     baseurl=http://vault.centos.org/6.1/os/$basearch/     gpgcheck=1     gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6     enabled=0          [C6.1-updates]     name=CentOS-6.1 - Updates     baseurl=http://vault.centos.org/6.1/updates/$basearch/     gpgcheck=1     gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6     enabled=0          [C6.1-extras]     name=CentOS-6.1 - Extras     baseurl=http://vault.centos.org/6.1/extras/$basearch/     gpgcheck=1     gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6     enabled=0          [C6.1-contrib]     name=CentOS-6.1 - Contrib     baseurl=http://vault.centos.org/6.1/contrib/$basearch/     gpgcheck=1     gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6     enabled=0          [C6.1-centosplus]     name=CentOS-6.1 - CentOSPlus     baseurl=http://vault.centos.org/6.1/centosplus/$basearch/     gpgcheck=1     gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6     enabled=0     #-----------------          [C6.2-base]     name=CentOS-6.2 - Base     baseurl=http://vault.centos.org/6.2/os/$basearch/     gpgcheck=1     gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6     enabled=0          [C6.2-updates]     name=CentOS-6.2 - Updates     baseurl=http://vault.centos.org/6.2/updates/$basearch/     gpgcheck=1     gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6     enabled=0          [C6.2-extras]     name=CentOS-6.2 - Extras     baseurl=http://vault.centos.org/6.2/extras/$basearch/     gpgcheck=1     gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6     enabled=0          [C6.2-contrib]     name=CentOS-6.2 - Contrib     baseurl=http://vault.centos.org/6.2/contrib/$basearch/     gpgcheck=1     gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6     enabled=0          [C6.2-centosplus]     name=CentOS-6.2 - CentOSPlus     baseurl=http://vault.centos.org/6.2/centosplus/$basearch/     gpgcheck=1     gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6     enabled=0     #-----------------          [C6.3-base]     name=CentOS-6.3 - Base     baseurl=http://vault.centos.org/6.3/os/$basearch/     gpgcheck=1     gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6     enabled=0          [C6.3-updates]     name=CentOS-6.3 - Updates     baseurl=http://vault.centos.org/6.3/updates/$basearch/     gpgcheck=1     gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6     enabled=0          [C6.3-extras]     name=CentOS-6.3 - Extras     baseurl=http://vault.centos.org/6.3/extras/$basearch/     gpgcheck=1     gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6     enabled=0          [C6.3-contrib]     name=CentOS-6.3 - Contrib     baseurl=http://vault.centos.org/6.3/contrib/$basearch/     gpgcheck=1     gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6     enabled=0          [C6.3-centosplus]     name=CentOS-6.3 - CentOSPlus     baseurl=http://vault.centos.org/6.3/centosplus/$basearch/     gpgcheck=1     gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6     enabled=0     #-----------------          [C6.4-base]     name=CentOS-6.4 - Base     baseurl=http://vault.centos.org/6.4/os/$basearch/     gpgcheck=1     gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6     enabled=0          [C6.4-updates]     name=CentOS-6.4 - Updates     baseurl=http://vault.centos.org/6.4/updates/$basearch/     gpgcheck=1     gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6     enabled=0          [C6.4-extras]     name=CentOS-6.4 - Extras     baseurl=http://vault.centos.org/6.4/extras/$basearch/     gpgcheck=1     gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6     enabled=0          [C6.4-contrib]     name=CentOS-6.4 - Contrib     baseurl=http://vault.centos.org/6.4/contrib/$basearch/     gpgcheck=1     gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6     enabled=0          [C6.4-centosplus]     name=CentOS-6.4 - CentOSPlus     baseurl=http://vault.centos.org/6.4/centosplus/$basearch/     gpgcheck=1     gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6     enabled=0


title: md raid1 ext3 and 4k sectors slow with directory operations

text: I recently moved from a hardware RAID1 enclosure to using two eSATA drives with md. Everything seems to be working fine, except for the fact that directory traversals/listings sometimes crawl (on the order of 10s of seconds). I am using an ext3 filesystem, with the block size set to 4K. Here is some relevant output from commands that should be important: mdadm --detail:               /dev/md127:             Version : 1.2       Creation Time : Sat Nov 16 09:46:52 2013          Raid Level : raid1          Array Size : 976630336 (931.39 GiB 1000.07 GB)       Used Dev Size : 976630336 (931.39 GiB 1000.07 GB)        Raid Devices : 2       Total Devices : 2         Persistence : Superblock is persistent              Update Time : Tue Nov 19 01:07:59 2013               State : clean      Active Devices : 2     Working Devices : 2      Failed Devices : 0       Spare Devices : 0                   Events : 19691              Number   Major   Minor   RaidDevice State            2       8       17        0      active sync   /dev/sdb1            1       8        1        1      active sync   /dev/sda1      fdisk -l /dev/sd{a,b}:               Disk /dev/sda: 1000.2 GB, 1000204886016 bytes, 1953525168 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 4096 bytes     I/O size (minimum/optimal): 4096 bytes / 4096 bytes     Disk identifier: 0xb410a639             Device Boot      Start         End      Blocks   Id  System     /dev/sda1            2048  1953525167   976761560   83  Linux          Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes, 1953525168 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 4096 bytes     I/O size (minimum/optimal): 4096 bytes / 4096 bytes     Disk identifier: 0x261c8b44             Device Boot      Start         End      Blocks   Id  System     /dev/sdb1            2048  1953525167   976761560   83  Linux      time dumpe2fs /dev/md127 |grep size:               dumpe2fs 1.42.7 (21-Jan-2013)     Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery sparse_super large_file     Block size:               4096     Fragment size:            4096     Inode size:               256     Required extra isize:     28     Desired extra isize:      28     Journal size:             128M          real    2m14.242s     user    0m2.286s     sys     0m0.352s      The way I understand it, I've got 4K sectors on these drives (recent WD reds), but the partitions/filesystems appear to be properly aligned. Since it looks like I'm using md metadata version 1.2, I think I'm also good (based on mdadm raid1 and what chunksize (or blocksize) on 4k drives?). The one thing I haven't found an answer for online is whether or not having an inode size of 256 would cause problems. Not all operations are slow, it seems that the buffer cache does a great job of keeping things zippy (as it should). My kernel version is 3.11.2 **EDIT: new info, 2013-11-19**               mdadm --examine /dev/sd{a,b}1 | grep -i offset         Data Offset : 262144 sectors        Super Offset : 8 sectors         Data Offset : 262144 sectors        Super Offset : 8 sectors      Also, I am mounting the filesystem with `noatime,nodiratime` I'm not really willing to mess with journaling much since if I care enough to have RAID1, it might be self-defeating. I am tempted to turn on directory indexing **EDIT 2013-11-20** Yesterday I tried turning on directory indexing for ext3 and ran `e2fsck -D -f` to see if that would help. Unfortunately, it hasn't. I am starting to suspect it may be a hardware issue (or is md raid1 over eSATA just really dumb to do?). I'm thinking of taking each of the drives offline and seeing how they perform alone. **EDIT 2013-11-21** iostat -kx 10 |grep -P "(sda|sdb|Device)":               Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util     sda               0.37     1.17    0.06    0.11     1.80     5.10    84.44     0.03  165.91   64.66  221.40 100.61   1.64     sdb              13.72     1.17    2.46    0.11   110.89     5.10    90.34     0.08   32.02    6.46  628.90   9.94   2.55     Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util     sda               0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00    0.00    0.00   0.00   0.00     sdb               0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00    0.00    0.00   0.00   0.00      I truncated the output past this since it was all 0.00% I really feel like it should be irrespective of ext4 vs. ext3 because this isn't just feeling a little slower, it can take on the order of tens of seconds to a minute and some change to tab auto-complete or run an ls **EDIT: Likely a hardware issue, will close question when confirmed** The more I think of it, the more I wonder if it's my eSATA card. I'm currently using this one: http://www.amazon.com/StarTech-PEXESAT32-Express-eSATA- Controller/dp/B003GSGMPU However, I just checked dmesg and it's littered with these messages:               [363802.847117] ata1.00: status: { DRDY }     [363802.847121] ata1: hard resetting link     [363804.979044] ata2: softreset failed (SRST command error)     [363804.979047] ata2: reset failed (errno=-5), retrying in 8 secs     [363804.979059] ata1: softreset failed (SRST command error)     [363804.979064] ata1: reset failed (errno=-5), retrying in 8 secs     [363812.847047] ata1: hard resetting link     [363812.847061] ata2: hard resetting link     [363814.979063] ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 10)     [363814.979106] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 10)     ....     [364598.751086] ata2.00: status: { DRDY }     [364598.751091] ata2: hard resetting link     [364600.883031] ata2: softreset failed (SRST command error)     [364600.883038] ata2: reset failed (errno=-5), retrying in 8 secs     [364608.751043] ata2: hard resetting link     [364610.883050] ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 10)     [364610.884328] ata2.00: configured for UDMA/100     [364610.884336] ata2.00: device reported invalid CHS sector 0     [364610.884342] ata2: EH complete      I am also going to buy shorter shielded eSATA cables as I'm wondering if there is some interference going on.


title: Is there a web browser for Linux that implements the Trident engine (Internet Explorer)?

text: Internet Explorer uses the Trident engine for rendering. I have an app that was made for IE only. It is a big application I inherited, and it is JavaScript heavy. It's and older app, and it will not work correctly on newer browsers, even IE, later versions has quirks but it works. The app is not straight text, so I can't get rid of all the images or anything like that. I do not have the luxury of installing Linux and then using a VM like VirtualBox to run Windows. It must be native to Linux (or Linux can run the Windows program, maybe via Wine). It will not work on Windows non-IE browsers either, but that is another matter. It is not a trivial matter to change the code. Is there any browser I can use to emulate IE or that has the Trident engine?


title: debootstrap fails to download Debian squeeze

text: I'm trying to use debootstrap to create a debian32 system and compile the kernel there but I'm not capable off.               root@citsnmaiko-deb:~# debootstrap  --verbose --arch i386 squeeze /opt/chroots/debian32/ http://ftp.debian.org/debian/     I: Retrieving Release     E: Failed getting release file http://ftp.debian.org/debian/dists/squeeze/Release     root@citsnmaiko-deb:~#       I'm behind a proxy but apt-get and wget works fine, I already tryied to set the http_proxy var but without success. what else can I do ?


title: SciTE Auto Save Temporary File

text: I was running an application that seemingly froze the GUI of my Linux distro. After a `Ctrl``Alt` `Backspace` I got back to a terminal and reloaded the GUI. However, even with the below User Options settings, when I reloaded SciTe, I didn't get my session restored, but more importantly the unsaved data since last save (On account of file being stored on removable storage that was temporarily unplugged) seems to be gone. Is there no temporary file that SciTE maintains in my home directory of unsaved changes??               save.on.timer=30     save.on.deactivate=1     load.on.activate=1     are.you.sure.on.reload=1     reload.preserves.undo=1     top.filters=$(all.files)All Source|$(source.files)     max.file.size=5000000     temp.files.sync.load=1     save.check.modified.time=1     save.session=1     save.recent=1     save.position=1     save.find=1     session.folds=1     session.bookmarks=1     highlight.current.word=1     view.eol=1     toolbar.usestockicons=1     find.close.on.find=0     find.in.files.close.on.find=0


title: AIX cifs hostname with underscore

text: I am trying to type this comand but for some reason it takes the first and not the second version. I have entered both the host names in the host file, FYI. This command works (hostname **zq13c1** ):               mkcifsmnt -f /aix_bk5 -d AIX -h zq13c1 -c 'aix_user' -p 'Cognizant123' -u 214 -g 204 -t rw       This command does not work (hostname **zq13c1_bk** ):               mkcifsmnt -f /aix_bk5 -d AIX -h zq13c1_bk -c 'aix_user' -p 'Cognizant123' -u 214 -g 204 -t rw


title: Hostname and IP address mapping in /etc/hosts

text: In my linux machine, when I run `hostname`, it shows `mongodb`, but when I run `host mongodb`, it shows:               mongodb@mongodb:/var/hadoop/hadoop-1.2.1/bin$ host mongodb     Host mongodb not found: 2(SERVFAIL)      My `/etc/hosts` file:               192.168.10.10   mongodb     192.168.10.10   localhost     127.0.0.1       localhost     #127.0.0.1 localhost     # The following lines are desirable for IPv6 capable hosts     ::1     ip6-localhost ip6-loopback     fe00::0 ip6-localnet     ff00::0 ip6-mcastprefix     ff02::1 ip6-allnodes     ff02::2 ip6-allrouters        * My first question is: Since `/etc/hosts` is mapping from IP to hostname, why this machine cannot resolve the hostname `mongodb` to IP 192.168.10.10? Instead, when I run `host localhost`, it can be resolved and shows:              localhost has address 127.0.0.1        * My another question: According to the `/etc/hosts` file, the hostname `localhost` should have been resolved to 192.168.10.10 instead of loopback IP address 127.0.0.1. Anybody can explain this to me?


title: No *shutdown* function in KDE

text: My base system is Gentoo amd64, up to date. Before the upgrade, I have the _shutdown_ button in the KDE menu. But after the upgrade, this button is gone...I think it is because of the permission settings are wrong. The user account I used is in the _user_ group. But I have no idea how the set the permission. I even tried to delete the KDE configuration files in the user directory and try to re-configure everything, but does not work.


title: help with truncate \ find

text: This command won't work:               $ truncate -s 0 $(find . -size +1c type -f -exec grep -LwE 'keyword1|keyword2|keyword3' {} +)          "find: paths must precede expression: type     Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]     truncate: missing file operand     Try `truncate --help' for more information."      Note: I understand whitespace could cause issues.               $ rm $(find . -size +1b -type f -exec grep -LwE 'keyword1|keyword2|keyword3' {} +)       works properly but it's not what I need as well.


title: Wifi Not Working on Joli OS

text: I recently installed Joli OS on my netbook because it was far too slow to run Ubuntu without lag and I could not get Chromium OS to work no matter what I did. When I install Joli OS--which went smoothly with no problems--it boots and tells me I have to connect to the Internet to do anything but I cannot connect as my wifi does not work for some reason. I have an Acer Aspire V5-122P-0643 and I must apologize as I am relatively new to Linux so I dont know most things. Any help is appreciated I need the netbook for school and I need Internet and it does not have an ethernet port. Also I dont know if it will help but this is the same reason Chromium OS won't work it also will not allow me to use wifi but on Ubuntu my wifi works.


title: Why don't I get a Gnome GUI when I install Red Hat?

text: I'm trying to install Red Hat on my Windows system but Im facing a problem. I get only one option during installation which is "Minimal" and even if I check Gnome desktop in customize options, I only get the command line after installation completes. What am I doing wrong? I'm using a USB stick to install. Also another stange thing is that I get many options alongside Minimal when installing in Virtualbox - like Desktop, Server, etc.


title: How to print shell variables and values to be able to copy/paste them?

text: In Bash 4.2.25, the `set` and `env` output is not escaped, so shell escapes and any non-printable characters won't be copy-pasteable. Take for example this shell session:               $ export foo=$'a\nbar=\baz'     $ env | grep -A 1 foo     foo=a     baraz      Ditto for for example colors - They are printed literally, and can mess up the terminal. **How do you print all variables with their values in a way that the output can be copied and pasted to give the same environment?** * * Obviously with the standard caveats about readonly variables, special variables like `$_` and the like.


title: RHEL:Change Screen Resolution of Virtual Console

text: I am working on a RHEL 6.3 Workstation. And the monitor is a HD AOC Monitor. Problem I am facing is whenever this machine starts up, it runs with maximum screen resolution. It is a big screen and therefore causing eye-strain while I am working on virtual terminal (accessed by typing ALT+CTRL+(F1-F6)). How can I resolve this issue?               [root@manmatha grub]# uname -a     Linux manmatha 2.6.32-358.2.1.el6.x86_64 #1 SMP Wed Feb 20 12:17:37 EST 2013     x86_64 x86_64 x86_64 GNU/Linux


title: XFCE or pure X11 commands, toggle compositing immediately without restarting X

text: How can i disable compositing via the command line? I need to disable temporarily for some games, like Nexuiz, for use in a wrapper script to toggle compositing status.


title: How can I make sure that eth1 get its fe80 IPv6 address immediately on startup, even if it's not physically connected?

text: I'm working on an embedded-x86 Linux device that runs Debian (Linux 3.8.13). This device has two Ethernet ports, eth0 and eth1. If I boot up this device with only eth0 connected to a switch, and ssh in to it and do an 'ifconfig', I get this:               root@msli-DCP-11234772:~# ifconfig     eth0      Link encap:Ethernet  HWaddr 00:1c:ab:00:0a:60               inet6 addr: fe80::21c:abff:fe00:a60/64 Scope:Link               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:5659 errors:0 dropped:4102 overruns:0 frame:0               TX packets:1071 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000               RX bytes:1313254 (1.2 MiB)  TX bytes:224889 (219.6 KiB)               Interrupt:16 Memory:fc500000-fc520000          eth1      Link encap:Ethernet  HWaddr 00:1c:ab:00:0a:61               UP BROADCAST MULTICAST  MTU:1500  Metric:1               RX packets:0 errors:0 dropped:0 overruns:0 frame:0               TX packets:0 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000               RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)               Interrupt:17 Memory:fc520000-fc540000      Note that eth0 has an "inet6 addr" assigned to it, while eth1 does not. If/when I plug eth1 into a network switch, an "inet6 addr" line will appear in ifconfig's output at that time (and it will stay present even if I unplug the Ethernet cable from eth1 again). So it seems that Linux doesn't bother associating an Ethernet device with its IPv6 address until the first time that Ethernet device is actually connected to something. That sort-of-works, but I have some programs that are supposed to send IPv6 multicast packets out of both ports at all times, and they can't do that on a port that doesn't have an IPv6 address assigned to it. So what I'd like to do is find a way to force Linux to associate the device's self-assigned IPv6 address (i.e. fe80::blah, where blah is derived from the MAC address on the Ethernet chip) during startup, rather than waiting until the Ethernet port is actually connected. Is there a way to do that? (The advantage would be that my programs could just scan the list of network devices during launch and use them -- currently they have to set up an AF_NETLINK socket to be notified of network-config changes, which sort-of works but is more complicated than I'd like, and also a bit slow to react)


title: Split a returned block of text into lines in terminal?

text: When I give commands like `echo $PATH` or `which program`, I often get a very large block of text consisting of may directories. This is fairly useless, if I am for example, looking to see if there is or is not one specific path among them. **Is there a way to split these up so that each entry starts on a new line?** The output does not include line breaks, but I can see there are appropriate delimiter characters like `:` that I could use.


title: Tracking user CPU hours

text: I am looking to work out which users on our system are using the most CPU resources. to check this? So I would like to find out:   * CPU-hours this month, (and % of total)   * CPU hours this week, (and % of total)   * CPU hours ever, (and % of total) For both real users and system processes


title: Is there is a PPA-service equivalent in the Fedora world?

text: For Ubuntu there is this convenient PPA service available where you can get your own package repository. You can put there source packages which are under an open source license, e.g. development snapshots of your software. (The server takes care of creating the right binary package and signs it with the repository key.) Users then only need to add the repository address with one command and can install the packages via apt-get. Since I am looking into Fedora - is there is something like this available for Fedora packages? If yes, what architectures/distribution versions are supported? How much space is available? What is the way to publish packages for multiple rpm distributions via such a service (e.g. current Fedora version and RHEL)?


title: Video colors reversed (negative) in Ubuntu 12.04 LTS

text: What's the fix for negative colors in videos (Ubuntu 12.04 LTS)? Pictures or thumbnails are not effected, only videos. It does not seem to be a browser problem as videos viewed offline exhibit the color reversal. I have tried Movie Player and VLC media player, the problem occurs in both. Videos viewed online (youtube) have the color problem AND are compressed horizontally. Videos still working fine in XP (dual-boot). I have tried reinstalling Flash Player but so far any video type is effected. My video driver is correct for my ACER X223w monitor. Note the lovely green skin tone and red leaves! The rest of window is not effected, only the video. ![enter image description here](http://i.stack.imgur.com/RNrzv.png) UPDATE: Installed "YouTube ALL HTML5 2.1.1" per advice on Ubuntuforums.org, chose the option to disable Flash on Youtube, that cleared up the online video problem. Now I need to figure out how to fix the problem when using the offline viewers. UPDATE: Found that the colors while viewing offline were not negative, just too strong giving that "neon" look. Adjusted saturation, etc., and got close to "normal". Hard to do with VLC, every time I move the mouse, the screen goes black. Similar with Movie Player but I'll figure it out. Probably end up uninstalling VLC as it seems to be a lot of trouble to adjust. Might try some other viewers. Cancel red alert!


title: blank screen after kernel upgrade

text: I am running ubuntu 10.10 with catalyst ati drivers which I installed from the amd website. Recently I took some updates which included a new kernel. I cannot boot into ubuntu. The screen shows ubuntu 10.10 thing but after that the it goes blank. I am using suse grub loader.


title: CD into directory from HISTORY in a bash script or alias e.g. $(!!)

text: I often want to change into the directory of a file on my file system, but I'm not sure where the file is. I search for it like so:               find -type f -name "myfile.txt"      Lets say for the sake of simplicity, that this returns one result, eg. /some/super/long/path/that/i dont/want/to/type/myfile.txt I then usually type this:               cd $(dirname $(!!))      To switch into the directory of the file I was searching for.... **Is there anyway to put this into a shell script or alias, so I can basically type:**               cdlast      and it runs:               cd $(dirname $(!!))      using the shell's HISTORY? I've tried it, and the shell history seems to be missing in bash scripts.


title: LAMP LiveCD with IDE and xDebug

text: Does a Linux live-cd exist which has all the following out of the box?               PHP IDE     Line by line PHP debugging via the PHP IDE (xDebug)     LAMP      If yes, please could you let me know what it's called?


title: Bash, name of the stdin file?

text: I have to write a bash script which will count symbols like "<" and ">" from stdin. For example:               $ ./myscript.sh <example.html     > - 20     < - 21     Found mismatching brackets!      I did this:               x=`grep -o '>' example.html | wc -l`     y=`grep -o '<' example.html | wc -l`     if [ "$x" -ne "$y" ]; then       echo "Mismatch!"     fi     echo $x     echo $y      Is this good way? I don't know how to get file name "example.html" from stdin.


title: UNIX: How to extract date from a variable storing a UNIX DATE

text: I am facing following issue: Input:               F=`date +%Y%m%d`          echo $F      Output:               F=20131231      But when trying this(File Name:A.sh):               C=`date`          G=`$C +%Y%m%d`          echo $C          echo $G          Output:          A.sh[6]: Tue:  not found          Tue Dec 31 06:14:12 EST 2013      I want to pass the date in a variable and then extract only date in a specific format.


title: resources for linux programming

text: what are the best books or best websites to learn the linux programming for absolute beginners and for professional programmers? To be more specific topics like, a) forking b) Shared memory c)exec commands d)signals e)scheduling algorithms (round robin,first come first serve,priority scheduling,short job first, multilevel queue scheduling, multilevel feedback queue scheduling)


title: What does apt need to be healed of a bad setup?

text: I made a couple of earlier posts regarding a libssl-dev that, it seemed, was not removable. Some of the replies touched on that there was a problem with apt, and now that someone posted the command to force uninstalling a package, I only have an issue with ack:               Setting up apt (0.8.16~exp12ubuntu10.10) ...     gpg: gpg: [don't know]: invalid packet (ctb=03)     Invalid option "--primary-keyring"     gpg: read_keyblock: read error: invalid packet     gpg: enum_keyblocks(read) failed: invalid keyring     gpg: WARNING: nothing exported     dpkg: error processing apt (--configure):      subprocess installed post-installation script returned error exit status 2     No apport report written because MaxReports is reached already                                                                   Errors were encountered while processing:      apt     E: Sub-process /usr/bin/dpkg returned an error code (1)     A package failed to install.  Trying to recover:     Setting up apt (0.8.16~exp12ubuntu10.10) ...     gpg: Invalid option "--primary-keyring"     gpg: [don't know]: invalid packet (ctb=03)     gpg: read_keyblock: read error: invalid packet     gpg: enum_keyblocks(read) failed: invalid keyring     gpg: WARNING: nothing exported     dpkg: error processing apt (--configure):      subprocess installed post-installation script returned error exit status 2     Errors were encountered while processing:      apt      I deleted /etc/apt/trusted.gpg. It didn't work. I copied a trusted.gpg from a machine where it was working as well. Still didn't work. What can I do to satisfy apt configuration so I can get back to updating my software normally?


title: Django not installing with pip because of mismatched hash

text: I have a virtual machine set up with a directory created with virtualenv (env2). I am inside this directory and have it activated and want to instal django 1.4. This is my command:               $ pip install django==1.4      But it returns saying that the hashes don't match. The thing is, they do match though. Anyone know my problem?


title: How to find where I have set "umask 077"?

text: When logged in as `root`, I have `umask` set to `077` which causes problems (such as `/etc/resolv.conf` being unreadable for non-root and thus `DNS` not working. I don't know where I have set the umask `077`. It is not set in `.bashrc` or in `.profile` or in `/etc/profile`. Any suggestions where `077` might come from? I am using Debian Wheezy


title: Linux lock down route to avoid changes to the default route

text: I have a problem that every time I connect my Android phone with USB tethering it hijacks my computer's internet connection. Even if the phone's WIFI is off. I try to manually remove the default route with               sudo route del default enp0s29u1u4      but it finds its way back after a few minutes. Is there a way to get this interface to permanently get the fuck off? Or alternatively, is there a way to set my desired interface to be permanent no matter what?


title: how to add curlcpp to the library/include path?

text: I'm using Arch Linux and have successfully built https://github.com/JosephP91/curlcpp However, I have no idea how to build the example program. I keep getting               fatal error: curl_easy.h: No such file or directory      Of course, this is because I don't know how to add it to the `library/include` path. In the `<curlcpp root>/build/src/` folder, I have a `libcurlcpp.a` file, which has all the `.o` files, and `<curlcpp root>/include/` has all the `.h` files needed. I've tried commands specified in the README, trying `-I library/include`, and other combinations. Do I need to manually copy the file somewhere or run some command line app to make it system wide? I don't think `ldconfig` is the right program since that's for dynamic libraries.


title: change regular user's password with root access

text: I have Ubuntu installed on a Raspberry pi. I have a normal user `pi`, but I forgot the password. However, I do have root access. How would I change pi's password using root?