Linux (debian/testing) cannot boot after installing kernel 3.9.1

Today I wanted to upgrade the kernel on my debian/testing system from `2.6.32-5-686` to `3.9-1-686-pae`. So I installed the image by `sudo aptitude install linux-image-3.9.1-686-pae` (or something like that). Then it said, I need to install some headers, so I did by `sudo aptitude install linux- headers-3.9.1-686-pae` or something like that. Now my system doesn't boot correctly. Both kernels are still installed or at least I can choose both of them in GRUB to load. However, I still have the system here, it just doesn't boot. I have two partitions on my disk: (1) sda1, which is my boot partition (flag is still there) and (2) sda2, on which I created two virtual volumes using `lvm`: `base-root` for `/` and `base-home` for `home`. I managed to mount each partition/volume on a live system I'm on (using an usb stick). This is what is happening while booting with any of the installed kernels:               early console in decompress_kernel          Decompressing Linux ... Parsing ELF... done.     Booting the kernel.     Loading, please wait...     Gave up waiting for root device. Common problems:      - Boot args (cat /proc/cmdline)       - Check rootdleay= (did the system wait long enough?)       - Check root= (did the system wait for the right device?)      - Missing modules (cat /procmodules ls /dev)     ALERT! /dev/disk/by-uiid/<some_uuid> does not exist.     Dropping to a shell!          BusyBox...     Enter 'hel...          /bin/sh: can't access tty; job control turned off      The system waits/searches for about 30s after the "please wait..." message. This is the output of `cat /proc/cmdline` (while trying to boot the new kernel, for the old kernel, there is an analogous message):               BOOT_IMAGE=/vmzlinuz-3.9.1-686-pae root=UUID=<someuuid>      Now, this is the output of `ls /dev/mapper/`:               control      Usually, there are also entries for `base-root` and `base-home`. **So my guess is** , that there is some lvm kernel module which is needed to interpret the volumes from lvm and isn't loaded in the kernel. Strangely, it seems to be missing in the olde kernel, too. This is the output of `cat /proc/modules` when booting the new kernel:               usbhid 35908 0 - Live...     hid 64559 1 usbhid  - ...     ohci_hcd 22150 0 - ...     dm_mod 577277 0 - ...     sd_mod 577277 - ...     crc_t10dif 12332 1 - ...     ahci 25000 0 - ...     libahci 22632 1 ahci - ...     thermal 13172 0 - ...     ata_generic 12450 - ...     thermal_sys 18359 thermal, ...     libata 126017 3 ahci, libahci,ata_generic, ...     uhci_hcd 22424 0 - ...     ehci_pcs 12432 - ...     e1000e 123671 0 - ...     ehci_hcd 3570 1 ehci_pci -     usbcore 110217 5 usbhis,ohci_hcd,uhci_hcd,ehci_pci,ehci_hcd, ...     scsi_mod 135333 2 sd_mod,esndld, ...     ptp 131711 e1000e, ...     usb_common 12338 1 usbcore, ...     pps_core 13071 1 ptp, ...      (I might fill in the "..." later.) Anyway, what I want to do is obviously to boot from properly into my installed debian system on `base-root`. My strategy so far is:   * write down error messages returned while booting (and post them here)   * google them, try to understand the error Momentarily, I have these questions:   * What does this error mean? What is /proc/cmdline for? How can I change its contents?   * Which modules/devices should I have installed? Which modules are missing and should be loaded?   * How can I tell my kernel to load some other module. Edit: Googling the error messages, I found this, seems related.


How to upgrade a tbz package that I create in Freebsd?

I am newbie at freebsd packaging and I want to learn way of upgrade a package. I created a package on my development server and I installed it to test server by               pkg_add foo-1.0.tbz      then I changed version of package as 1.1. In my freebsd test server there is only `pkg-config, pkg_add, pkg_create, pkg_delete, pkg_info, pkg_updating, pkg_version` commands. I figure out none of these commands used for upgrade a package. Now, I can only install a new package after delete older version.               pkg_delete foo-1.0     pkg_add foo-1.1.tbz      Is this the only way? or is there any gracefully way to upgrade a package?


Partition scheme for installation of Debian

I'm installing Debian Wheezy on a 50 GB partition of a 500 GB Seagate SATA hard disk with 2 GB RAM. I want to use following partition scheme, but stuck at:   1. How much ( _in percent_ ) of disk space should be given to following partitions?   2. The order in which partitions should be created? **So that system runs very fast and smooth.**               /     /boot     /home     /tmp     /usr     /var     /srv     /opt     /var/www     /usr/local     SWAP      ### MACHINE INFORMATION   1. Debian Wheezy 64 Bit Update up to Date   2. Role of Machine Server   3. Main Software   4. Bind9, Apache2, Mysql-Server, PHP5   5. 500 GB Seagate SATA Hard Disk   6. 2 Partitions 50 GB & 450 GB _I do not want touch 450 GB Partition (sda2) however I can take 50 GB more from sda2 if required_


GNU screen startup is really slow

I connect to a RHEL 5.7 server via Putty or VNC (not sure it matters) but when I try to run `screen`, it takes _forever_ (on order of 20-30 secs). Same thing if I run `screen -ls`, takes just as long. I don't know if it has to do with where `screen` is configured? But when I go to `$HOME`, there was no `.screenrc` file. (So where is it? I read I can define my own location, so maybe this is a minor point...) `screen -v` gives `Screen version 4.00.03 (FAU) 23-Oct-06` Does anyone have ideas on what the issue could be or is it just the way it is? * * * **Update 2**   1. I've tried setting environment variables `$SCREENDIR` and `$SCREENRC` to `~/.screenrc` and to a location on the server `/home/myusername` = no change   2. I've tried a blank `.screenrc` file = no change   3. I've tried adding `defnonblock on` to `.screenrc` = no change   4. Also tried running strace with the additional `-f` option, but didn't notice any new info? **strace file #2, snippet 1** , first occurrence of that funny number `4294967295`               11:24:23 connect(4, {sa_family=AF_FILE, path="/dev/log"...}, 110) = 0     11:24:23 sendto(4, "<14>Jun 25 11:24:23 screen: nss_"..., 129, MSG_NOSIGNAL, NULL, 0) = 129     11:24:23 write(3, "\27\3\1\0\33\331\331\30\274MD\374s\375ia\341!\200\16\4&\205\177\320\274\213\224gz\376l", 32) = 32     11:24:23 write(3, "\25\3\1\0\26\304\345w\317\273\257\256\322\314.\20T\372;'EQ\222\10z\375\234", 27) = 27     11:24:23 shutdown(3, 2 /* send and receive */) = 0     11:24:23 close(3)                       = 0     11:24:23 read(4294967295, 0xe5d3350, 5) = -1 EBADF (Bad file descriptor)     11:24:23 shutdown(4294967295, 2 /* send and receive */) = -1 EBADF (Bad file descriptor)     11:24:23 close(4294967295)              = -1 EBADF (Bad file descriptor)     11:24:23 stat("/etc/ldap.conf", {st_mode=S_IFREG|0644, st_size=10681, ...}) = 0     11:24:23 geteuid()                      = 287621     11:24:23 open("/etc/hosts", O_RDONLY)   = 3      **New theory** : In-between those `nanosleep` calls, I see it's doing something with a unix auth server. What is it doing or why... I don't know. But then this line appears > sendto(4, "<14>Jun 25 11:24:28 screen: nss_"..., 129, MSG_NOSIGNAL, NULL, 0) > = 129 and I can't read the entire error message?? Then, the "Bad file descriptor" lines showup, and _bam_ , going to sleep again. Could understanding what it's doing with the unix auth server be key to understanding these delays? **strace file #2, snippet 2** , zooming in on what happens before the sleeps occur. Changed the company name and IP addresses to dummy values.               11:24:28 recvfrom(3, "\266!\201\200\0\1\0\2\0\0\0\0\10unixauth\2cs\6company\3"..., 1024, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("987.654.321.09")}, [16]) = 86     11:24:28 close(3)                       = 0     11:24:28 socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3     11:24:28 fcntl(3, F_SETFD, FD_CLOEXEC)  = 0     11:24:28 setsockopt(3, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0     11:24:28 setsockopt(3, SOL_TCP, TCP_NODELAY, [1], 4) = 0     11:24:28 fcntl(3, F_GETFL)              = 0x2 (flags O_RDWR)     11:24:28 fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0     11:24:28 connect(3, {sa_family=AF_INET, sin_port=htons(636), sin_addr=inet_addr("123.456.789.01")}, 16) = -1 EINPROGRESS (Operation now in progress)     11:24:28 poll([{fd=3, events=POLLOUT|POLLERR|POLLHUP}], 1, 90000) = 1 ([{fd=3, revents=POLLOUT}])     11:24:28 getpeername(3, {sa_family=AF_INET, sin_port=htons(636), sin_addr=inet_addr("123.456.789.01")}, [4294967312]) = 0     11:24:28 fcntl(3, F_GETFL)              = 0x802 (flags O_RDWR|O_NONBLOCK)     11:24:28 fcntl(3, F_SETFL, O_RDWR)      = 0     11:24:28 write(3, "\200w\1\3\1\0N\0\0\0 \0\0009\0\0008\0\0005\0\0\26\0\0\23\0\0\n\7\0\300"..., 121) = 121     11:24:28 read(3, "\26\3\1\0Q\2\0", 7)   = 7     11:24:28 read(3, "\0M\3\1^\270\3\2\277\353\23\377\211\336\255Q\213\342\272\236@\242\252\5\357T\254\207\326\377Jl"..., 79) = 79     11:24:28 read(3, "\26\3\1\16\356", 5)   = 5     11:24:28 read(3, "\v\0\16\352\0\16\347\0\4\2520\202\4\2460\202\3\216\240\3\2\1\2\2\3\v\334/0\r\6\t"..., 3822) = 3822     11:24:28 read(3, "\26\3\1\0\4", 5)      = 5     11:24:28 read(3, "\16\0\0\0", 4)        = 4     11:24:28 write(3, "\26\3\1\0\206\20\0\0\202\0\200+\34JE5\2234\204I\233g@&m\4\232\317\335\323\373\366"..., 186) = 186     11:24:28 read(3, "\24\3\1\0\1", 5)      = 5     11:24:28 read(3, "\1", 1)               = 1     11:24:28 read(3, "\26\3\1\0$", 5)       = 5     11:24:28 read(3, "j\213\362\240R\244\35\257\243/\311\307\360\206\362\314\3\227\353\351\243\242=\222k\0y\367\20\\[\245"..., 36) = 36     11:24:28 write(3, "\27\3\1\0\214\216\374\314\342\264p\205j?\311\356#d\200\25]1\256\371\341\215\325\275jj\26\273"..., 145) = 145     11:24:28 poll([{fd=3, events=POLLIN|POLLPRI|POLLERR|POLLHUP}], 1, 90000) = 1 ([{fd=3, revents=POLLIN}])     11:24:28 read(3, "\27\3\1\0\255", 5)    = 5     11:24:28 read(3, "s\315\357J\363\342\37\10\r\251\333v\302\357\207\3429\3633\345\5\17j\35*K\216\300\225,\r\265"..., 173) = 173     11:24:28 sendto(4, "<14>Jun 25 11:24:28 screen: nss_"..., 129, MSG_NOSIGNAL, NULL, 0) = 129     11:24:28 write(3, "\27\3\1\0\33H\6eq\267(\356\35\366i\364H\372m\17O\7\307d;&\37\345f\212\320H", 32) = 32     11:24:28 write(3, "\25\3\1\0\26\245\267\236\270a\356\227\233\243e\0[3\372\226\33\342f\306\257[ ", 27) = 27     11:24:28 shutdown(3, 2 /* send and receive */) = 0     11:24:28 close(3)                       = 0     11:24:28 read(4294967295, 0xe5d3350, 5) = -1 EBADF (Bad file descriptor)     11:24:28 shutdown(4294967295, 2 /* send and receive */) = -1 EBADF (Bad file descriptor)     11:24:28 close(4294967295)              = -1 EBADF (Bad file descriptor)     11:24:28 sendto(4, "<14>Jun 25 11:24:28 screen: nss_"..., 89, MSG_NOSIGNAL, NULL, 0) = 89     11:24:28 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0     11:24:28 rt_sigaction(SIGCHLD, NULL, {SIG_DFL, [], 0}, 8) = 0     11:24:28 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0     11:24:28 nanosleep({8, 0}, {8, 0})      = 0      * * * **Update 1** Here's the strace interesting bits... I see it's doing `nanosleep` repeatedly (each doubling the sleep time) but why?               09:10:05 read(4294967295, 0xca3b350, 5) = -1 EBADF (Bad file descriptor)     09:10:05 shutdown(4294967295, 2 /* send and receive */) = -1 EBADF (Bad file descriptor)     09:10:05 close(4294967295)              = -1 EBADF (Bad file descriptor)     09:10:05 sendto(4, "<14>Jun 25 09:10:05 screen: nss_"..., 89, MSG_NOSIGNAL, NULL, 0) = 89     09:10:05 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0     09:10:05 rt_sigaction(SIGCHLD, NULL, {SIG_DFL, [], 0}, 8) = 0     09:10:05 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0     09:10:05 nanosleep({4, 0}, {4, 0})      = 0     09:10:12 stat("/etc/ldap.conf", {st_mode=S_IFREG|0644, st_size=10681, ...}) = 0     09:10:12 geteuid()                      = 287621     09:10:12 open("/etc/hosts", O_RDONLY)   = 3     09:10:12 fcntl(3, F_GETFD)              = 0     ...     09:10:20 read(4294967295, 0xca3b350, 5) = -1 EBADF (Bad file descriptor)     09:10:20 shutdown(4294967295, 2 /* send and receive */) = -1 EBADF (Bad file descriptor)     09:10:20 close(4294967295)              = -1 EBADF (Bad file descriptor)     09:10:20 sendto(4, "<14>Jun 25 09:10:20 screen: nss_"..., 90, MSG_NOSIGNAL, NULL, 0) = 90     09:10:20 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0     09:10:20 rt_sigaction(SIGCHLD, NULL, {SIG_DFL, [], 0}, 8) = 0     09:10:20 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0     09:10:20 nanosleep({16, 0}, {16, 0})    = 0     09:10:36 stat("/etc/ldap.conf", {st_mode=S_IFREG|0644, st_size=10681, ...}) = 0     09:10:36 geteuid()                      = 287621     09:10:36 open("/etc/hosts", O_RDONLY)   = 3     09:10:36 fcntl(3, F_GETFD)              = 0     ...     09:10:36 write(3, "\27\3\1\0\33P\314s\21L-y\316\324\0\345!hd\212\351Q\33\345\335K\3\22\260r\312\332", 32) = 32      09:10:36 write(3, "\25\3\1\0\26V\20\224{t2\364\250k\241\363\363\337V\370\236m\261I\240xw", 27) = 27      09:10:36 shutdown(3, 2 /* send and receive */) = 0      09:10:36 close(3)                       = 0      09:10:36 read(4294967295, 0xca3b350, 5) = -1 EBADF (Bad file descriptor)      09:10:36 shutdown(4294967295, 2 /* send and receive */) = -1 EBADF (Bad file descriptor)      09:10:36 close(4294967295)              = -1 EBADF (Bad file descriptor)      09:10:36 sendto(4, "<14>Jun 25 09:10:36 screen: nss_"..., 90, MSG_NOSIGNAL, NULL, 0) = 90      09:10:36 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0      09:10:36 rt_sigaction(SIGCHLD, NULL, {SIG_DFL, [], 0}, 8) = 0      09:10:36 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0      09:10:36 nanosleep({32, 0}, {32, 0})    = 0      09:11:08 stat("/etc/ldap.conf", {st_mode=S_IFREG|0644, st_size=10681, ...}) = 0      09:11:08 geteuid()                      = 287621      09:11:08 open("/etc/hosts", O_RDONLY)   = 3      09:11:08 fcntl(3, F_GETFD)              = 0      09:11:08 fcntl(3, F_SETFD, FD_CLOEXEC)  = 0      ...     09:11:08 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0      09:11:08 rt_sigaction(SIGCHLD, NULL, {SIG_DFL, [], 0}, 8) = 0      09:11:08 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0      09:11:08 nanosleep({64, 0}, {64, 0})    = 0      09:12:12 stat("/etc/ldap.conf", {st_mode=S_IFREG|0644, st_size=10681, ...}) = 0      09:12:12 geteuid()                      = 287621      09:12:12 open("/etc/hosts", O_RDONLY)   = 3      09:12:12 fcntl(3, F_GETFD)              = 0


How to turn off DELL BIOS beeping through Ubuntu?

I removed my LCD with Inverter, because it was broken. I'm using a Inspiron 4050 with a HDMI or VGA connected at TV, but the BIOS beeps(8times) continuos for ever and ever. There is a way to control the beep volume or mute it through Ubuntu?


subsitute removing zero numbering

I would like to subsitute in a txt file the followings targets for example "code_000040" by "code_40" and "code_067340" by "code_67340" and so on.., in other words to remove the zeros in the 6 number ids before the real numbering id starts Plaese any help!!


Commands run when terminal is open do not appear in history

I have the simple following `terminal.sh` script:               #bin/bash --login     str=(--tab --title="Test" -e "bash --login -c 'echo history';bash")     gnome-terminal "${str[@]}"     exit 0      I basically use it to open a terminal with several tabs that I need to use daily. But the problem is that the `echo history` command is not added to the history of that tab. So, for example, one of my tabs is the application server. When I need to restart it, I usually type `Ctrl`+`C`, `Ctrl`+`L`, `Up` and `Enter`, but when I use this script to run it, it doesn't add the line executed to the bash, and then the last command executed is normally `exit`. So I end up closing the tab instead of restarting the server, which is incredbly annoying. I saw this, and I tried adding:               HISTFILE=~/.bash_history     set -o history      To the start of my `terminal.sh` script, and also tried adding to the script executed:               str=(--tab --title="Test" -e "bash --login -c 'HISTFILE=~/.bash_history;set -o history;echo a';bash")      But neither helped. I also tried adding `history -s echo history` before executing the script, but that didn't help either. How can I add all commands executed this way to the history? I aslo tried:               #bin/bash --login          cmd='echo test'     cmd_e="bash --login -c 'unset PROMPT_COMMAND;history -s '\''$cmd'\''; eval '\''$cmd'\''';bash"     str=(--tab --title="History Test" -e "$cmd_e")          gnome-terminal "${str[@]}"          exit 0


Crontab suspicious activity

I tried using `crontab -l` from my terminal as root, it showed `no crontab for root`. So I tried `crontab -e`, it returns the following > no crontab for root - using an empty one 888 and then the cursor starts blinking. I am not able to quit or save the file. I am new to Linux, so I don't have any idea. What is the problem here? Anyone any ideas?


How to relate a kernel config setting to the source files?

Here is an example that will explain better: ![enter image description here](http://i.stack.imgur.com/0Yveq.png) I have a selected the audio driver from the picture and i would like to browse through its source. How do i get to the path of the source files from here? ![enter image description here](http://i.stack.imgur.com/FApCk.png)


What is the default root password for mariadb in Arch Linux?

I install `mariadb` in arch-linux. but I haven't got access to MySQL. I try this:                mysql -u root -p     Enter password:      ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)      I see very similar question, and test all of answers but I can't resolve it.


XMing - "XIO: fatal IO error 11

I am running Xming 6.9.0.31 on my local Windows 7 workstation. I am accessing a Ubuntu server to view large data sets graphically in my Xming session. When I request a smaller data set I have no problem but when I access a very large data set I receive the following error:               IO:  fatal IO error 11 (Resource temporarily unavailable) on X server "localhost:13.0"           after 629 requests (164 known processed) with 0 events remaining.      tks, steve


How to detect on Linux/AIX machines if they are vulnerable to the CVE-2014-0160?

I quickly wrote a script that outputs the openssl versions on AIX/Linux:               #/bin/ksh     # RUN THIS SCRIPT ON ANY AIX/LINUX TO DETECT IF THE SERVER IS VULNERABLE TO:      # https://www.openssl.org/news/secadv_20140407.txt     # https://www.us-cert.gov/ncas/alerts/TA14-098A     # warning: if openssl was custom compiled (in a non-default dir...) and not in the PATH variable.. then this script will not detect it..     # it works for RPM based Linux distros and AIX     # LAST UPDATE: 2014.04.10 16h          printf "`hostname -s`\t"          ###########################     # AIX PART     function isaix {          if which openssl > /dev/null 2>&1; then openssl version -a | head -1 | sed 's/^OpenSSL //g' | cut -d' ' -f1; else          RPM="`if which rpm > /dev/null 2>&1; then rpm -qa | grep -i ^openssl-[0-1]; fi`"         LSLPP="`if which lslpp > /dev/null 2>&1; then lslpp -l | grep -i openssl; fi`"              if [[ -n "$RPM" || -n "$LSLPP" ]]; then             printf "OpenSSL NOT found in PATH but found installed package(s): "             echo "$RPM" | perl -pe 's/\n/ /g'             echo "$LSLPP" | perl -pe 's/\n/ /g'             echo             else             echo "OpenSSL NOT found in PATH and NOT found as installed package"         fi     fi              }     ###########################          ###########################     # LINUX PART     function islinux {          if which openssl > /dev/null 2>&1; then openssl version -a | head -1 | sed 's/^OpenSSL //g' | cut -d' ' -f1; else          RPM="`if which rpm > /dev/null 2>&1; then rpm -qa | grep -i ^openssl-[0-1]; fi`"              if [[ -n "$RPM" ]]; then             printf "OpenSSL NOT found in PATH but found installed package(s): "             echo "$RPM" | perl -pe 's/\n/ /g'             else             echo "OpenSSL NOT found in PATH and NOT found as installed package"         fi     fi              }     ###########################          OSTYPE="`uname`"         if echo "${OSTYPE}" | grep -iq aix; then isaix; fi         if echo "${OSTYPE}" | grep -iq linux; then islinux; fi      +process the scripts output with a "cat *" and put that in an XLS or whatever OpenSSL versions 1.0.1 thru 1.0.1f are affected. **My question** : What is the best method to detect if a server is vulnerable to the bug or not? :) (besides this)


Shell script wait for background command

I am writing a script, but there is something I need that I can't find a way to do it... I need to make a command in background "command1 &" and then somewhere in the script I need to wait for it to finish before I do command2. Basically, I need this: NOTE: each command runs in a specific directory! at the end of the while loop my command1 created 4 directory's, where in each one run the specific process so the total of process running are 4               a=1          while [$a -lt 4 ]               . command1        #Generates 1 Process                 a= `export $a +1`     done             #Wait until the 4 process end and then run the command2               . command2      I've looked a lot of pages, but I couldn't make this simple task to be done. I've seen something about a `wait` command with the pid process number, but that didn't work also (or I couldn't make it work). Can anybody help me?


Is there a way to report incorrect login attempts in Ubuntu 12.10?

I am concerned with some people trying to access my laptop while I am away in my work place. Therefore I was wondering if is there a way to set up kind of automatically monitor and report wrong password login attempts.


Running tomcat under tomcat service account in CentOS

I'm installing tomcat on a CentOS box for use as an application server. My system admin created a tomcat user service account under which to run tomcat. I'm generally following instructions on this page but when I get to the step where I adjust the startup script to run the tomcat startup and shutdown commands as user tomcat (Step 6, item 4) I'm being asked for a password for the tomcat account. Since this is a service account should I be able to `/bin/su tomcat` to run certain commands as the tomcat user without entering the password? I'm generally unfamiliar with setting up tomcat to run under a service account. If anyone has best practices for this please let me know. **Update** : I found a good article covering installing tomcat as a service under a low privilege user here. Following that article I eventually got my installation working.


FreeBSD's net/ntp port is forbidden due to CVE-2013-5211, with no support upstream

FreeBSD port net/ntp was marked forbidden because it is vulnerable to traffic spoofing and amplification attacks, as documented in CVE-2013-5211. However, there's been no support from the upstream provider, ntp.org. It would also appear that the developers were aware of the issues as early as 2011-December, and have not sought recourse other than to suggest configuration changes to mitigate the problem: http://lists.ntp.org/pipermail/pool/2011-December/005616.html Without relying on FreeBSD's 'world' version of ntpd, what other packages are available to replace ntpd?


Localized wrapping in vim

I have wrapping turned on in vim, but is it possible to disable it for certain regions in the file I'm editing? To be specific, I'm editing LaTeX files, I would like the contents of some environments (tabular for example) not to be wrapped, since this would make the table contents much easier to read. A solution based on automatically detecting such environments based on their opening/closing tags would be the best of course, but I'm not against a solution needing some explicit tags or commands in a comment in the file.


starting multiple x-sessions with different DE/WMs with startx in Linux Mint

I'm using Linux mint, and I want two windows managers (MATE and xmonad) running on different pipes. I installed xmonad, and when I choose xmonad from the login screen it works perfectly. But, when I move to pipe tty1, login, and run `startx xmonad`, I get an error:               <home dir>/.xmonad/xmonad-i386-linux: executeFile: does not exist (No such file or directory)      The screen is white, and pressing Alt-Shift-Enter opens a window for a split second then returns to the white screen. Why? How can I fix this?


Error: Missing newline before EOF - inserted

In my application I am inserting some files in main file. In that there is common header file to all the code files `(*.c)`. This giving me error:               D:\New folder\COM_Port_Cont\COM_Port_Task.h(268) : Error 1 : missing newline before EOF - inserted     D:\New folder\COM_Port_Cont\COM_Port_Task.c(48) : Error 2 : missing newline before EOF - inserted     D:\New folder\COM_Port_Cont\Hdw_Ecg_1X5.c(129) : Error 3 : missing newline before EOF - inserted     D:\New folder\COM_Port_Cont\Timer_Wdg_1XX.c(39) : Error 4 : missing newline before EOF - inserted     D:\New folder\COM_Port_Cont\Main_Prj_Rfid.c: 0 warnings, 4 errors.      In this `COM_Port_Task.h` is the common header file.


How can I get write access to my usb drives?

I have trouble writing to external drives. They are monuted automatically in Nautilus, but I can not copy anything there ('Paste' and 'create Folder' are just greyed out). Does Anyone have ideas what could be wrong? The drive is named 4E29-64CA (but other drives behave the same) and I get the following error when trying to do anything to it:               /run/media/username/4E29-64CA $ touch foo     touch: cannot touch ‘foo’: Read-only file system      As root same error:               /run/media/username/4E29-64CA $ sudo touch foo     [sudo] password for username:       touch: cannot touch ‘foo’: Read-only file system `ls /run/media/username` gives the following:               drwx------ 6 mophahr users 4096 Jan  1  1970 4E29-64CA      So it seems I have the right permissions. **Further relevant(?) stuff:** Output of `mount`:               $ mount | grep 4E29     /dev/sdc1 on /run/media/username/4E29-64CA type vfat (ro,nosuid,nodev,relatime,uid=1000,gid=100,fmask=0022,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2)     $ mount | grep 1000     tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=372244k,mode=700,uid=1000,gid=100)     gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=100)      Groups I am in:               $ groups     audio storage users networkmanager sudoers      From `/usr/share/polkit-1/actions/org.freedesktop.udisks2.policy`:               <action id="org.freedesktop.udisks2.filesystem-mount">         <description>Mount a filesystem</description>         <message>Authentication is required to mount the filesystem</message>         <defaults>               <allow_any>auth_admin</allow_any>               <allow_inactive>auth_admin</allow_inactive>               <allow_active>yes</allow_active>         </defaults>     </action>


How many Remote Users?

I need to count how many people are logged in remotely into my virtual machine at school. I can tell if someone ssh'd in from host, but am having trouble telling if someone is remotely logged into an XWindows session through VNC or if they are sitting at the console at school. When I log into my school VM from home and do a who, it show this when I am the only one logged in:                user1   tty7    2013-10-10 23:31 (:1)      user1   pts/0   2013-10-10 23:23 (:1.0)      Note: No one can log in directly to VM. Must log into school lan, then VM host and then VM. I'm really wondering if it is even considered a remote login if I have to login from my VM's host machine.


What is the relationship between GNU and GNOME?

Is there any relation between GNU and GNOME? And further related license GPL?


Sum in block with AWK (restart the sum when the pattern changes)

I have a file like this:               A 100     A 200     A 300 #sum=600     B 400     B 500 #sum=900     A 600     A 700     A 800 #sum=2100      I would like the output to be:               A 600     B 900     A 2100     C sum_of_C     D sum_of_D      I can do that with `for`, `sed`, `grep` and `awk`. However because I am learning `awk`, I would like to write an `awk` script. So far I have:               if (${NR {print $1}} == ${NR-1 {print $1}})        sum+=$2       print $0"\t"sum     else       sum=$2       print $0"\t"sum      `awk -f awkscript file` was not successful. What is the solution?


how to change a NCSA squid proxy user password from the client en

I have implemented a squid proxy web caching server with NCSA authentication. Proxy users are able to login and access the internet. Now my client wants to change his proxy password from their end. Any idea regarding that?


gvfs-mount auto password

I would like to make shortcuts for gvfs mounts (I prefer to mount from the shell). For this, it is quite necessary/convenient not to have to enter the password for the `ftp://` and `sftp://` connections . Currently the only way I know is:               echo 12345 | gvfs-mount sftp://user@example.com/      Even though I can make the file's rights `700` (or even `100`), I'm not sure if it's reasonably safe. Is it worse than `.netrc` items? I know about `ssh- copy-id`, but I can't access shell on most of my `sftp` servers. Is there a better (standard) alternative to my approach? What do `nautilus`/`caja` do when they store the passwords?


Low performace of Intel Haswell HD Graphic 4600 in 3D Games

I have a notebook (Lenovo IdeaPad G510) with Linux Debian Jessie. It has got a built-in, integrated GPU - Intel Haswell HD Graphic 4600. I've read postive opinions about the GPU, it has got good performance for 3D games like Battlefield 3 (~35-40 FPS). But in my case that doesn't look plausible. In Minecraft (opened by OpenJDK) I have got only 10 FPS and GTA San Andreas (launched on Wine Emulated Desktop 800x600) has around 4 FPS. I thought that this is, because I do not have any good drivers to my Intel Card. So I ran `lspci -vnn`:               00:02.0 VGA compatible controller [0300]: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller [8086:0416] (rev 06) (prog-if 00 [VGA controller])             Subsystem: Lenovo Device [17aa:3978]             Flags: bus master, fast devsel, latency 0, IRQ 43             Memory at b0000000 (64-bit, non-prefetchable) [size=4M]             Memory at a0000000 (64-bit, prefetchable) [size=256M]             I/O ports at 4000 [size=64]             Expansion ROM at <unassigned> [disabled]             Capabilities: <access denied>             Kernel driver in use: i915      As you can see, my Intel has the kernvel driver i915 in use. According to the Internet, drivers for Intel are built-into system kernel drivers and I do not have to install anything. My CPU is Intel i5 DualCore 2,5 GHz. I use GNOME3 on XServer. I ran also `glxgears`:               2164 frames in 5.0 seconds = 432.504 FPS     2298 frames in 5.0 seconds = 459.535 FPS     2212 frames in 5.0 seconds = 442.281 FPS     2250 frames in 5.0 seconds = 449.699 FPS      Results of `xrandr`:               Screen 0: minimum 1366 x 768, current 1366 x 768, maximum 1366 x 768     default connected primary 1366x768+0+0 0mm x 0mm        1366x768        0.0*      I do not know what's the matter. I tried to install drivers for my card from Intel Developers (and I think `i915` has been installed by my installation), but my card is still really, really slow. Can you tell me what should I do?


How can i set-up VIOs multiple VLANs in our p770 box?

There's a requirement setup needs to address to our pSeries box. We have one p770 box intended to setup UAT and Development VM Clients, but the requirement is to set different VLANs per Environment (UAT & Dev). Also a separation of VLANs with applications and databases, it will be assigned by specific VLAN ids by our LAN Team. ### Questions   * How can this be done in VIOs? The old setup of our p6 box was a single VLAN which configured in our VIOs thru SEA.    * How can we assign different VLANs in the SEA, or is it correct that its being configured via SEA or there is any other way?


How to open .Desktop file in Windows

I'm a Designer by profession, I need to know how can i open a .Desktop extension file in windows 7, the file contains info on creating icons for Linux to be used for a software that runs on Linux Operating system.


Dropbox insists on autostarting - Fedora 20

I'm trying to get Dropbox not to autostart. The manual shows a command line option that should do the trick but it doesn't seem to work here (`dropbox autostart n`). Running `dropbox autostart` issues a note warning that it may only work on current Ubuntu distributions. ### Questions   * How can I get it not to start?    * How should I proceed with the issue? ### EDIT After following some valuable tips, it seems every time I open dropbox, it adds itself to ~/.config/autostart list, which shows in the gnome-session- properties GUI. I wonder if there's a way to stop it. Perhaps not giving the process permissions on that folder?


List only files in a directory and show the inode number

How can I list all files but not directories in a given directory and show the inode-numbers. Something like `ls -li | grep ^-` does not work since the inode number is shown in the beginning of the line.


Checking and changing file permission with script

I'm new to bash and I can't get a script working. This is the code that I have:               #!/bin/bash     file=~/scripts/text.txt          if [ -e $file ]     then echo "The file exists"          elif [ ! -e $file ]     then echo "The file does NOT exist"          fi          sleep 1s          if [ ! -w $file ]     then { sudo chmod u+w $file; } && { echo "The file is now writable"; }          elif [ -w $file ]     then echo "The file is already writable"     fi      The top part of the script, that checks if the file exists, works just fine. The bottom part, that checks if the file is writable, partly works. It will change the permissions of the file. But after that, with write permissions enabled, it will still echo "The file is now writable" instead of "The file is already writable" Like I said, I'm new to bash so any help would be appreciated. Please keep it simple, because if statements are about as complex as I can go with my current knowledge.


Where does Linux store logs of WiFi networks when searching? Does it at all?

For research I wanted to try and keep a log of all the networks that my laptop sees (not connects connects to, but just gets a response from when searching) over a period of time walking around. I was curious if it saved this info to a cache file somewhere in the system or if I could make it do so. If it's relevant, I'm running the Debian derivative, CrunchBang. I'm fairly new to Linux and now I've finally found a purpose for using it!


Is it possible to share an external hard drive through server?

I was wondering if it is possible to share an external hard drive in CentOS server? Sorry if this question seems basic. I'm new to system administration.


Does Linux kernel 3.x use the CFS process scheduler?

Does the latest version of the Linux kernel (3.x) still use the Completely Fair Scheduler (CFS) for process scheduling which was introduced in 2.6.x ? If it doesn't, which one does it use, and how does it work? Please provide a source.


equivalent to 'cpusets' for gpu's

I work with clusters of computers and manage the nodes with torque and Moab. A user is able to submit a job to a node, and request the amount of resources they need.               #The following submits the job foo.sh to 1 node, requesting 8 cores, and 1 gpu     qsub foo.sh -l nodes=1:ppn=8:gpus=1      Because it is possible for a user to take more resources than requested, I've enabled the hwloc library (cpusets) to keep users in check. From what I have found, there is no possible way to prevent a user from taking more gpu's than they have requested. **Is there a 'cpuset' equivalent for gpu's?** * * * _Resources_ Moab Documentation Torque Documentation hwloc documentation


How do I get the right `lpr` for cups installed on Ubuntu Server 14.04?

**UPDATE** It appears the lpr in the `lpr` package is not the one that works with cups. The questions is, how do I get the cups version of `lpr` installed? **Old Question** lpr on ubuntu 10.04 includes an option "-o" that lets you pass extra options. lpr on 14.04 does not include this option. Our application that we are moving relies on lpr and the ability to set certain options so that pages print correctly. The command is:               lpr -P PrinterName -o orientation-requested=3 -o position=top-left     -o media=Letter -o page-left=0 -o page-right=0 -o page-top=0     -o page-bottom=0 /path/to/file.pdf      Worked fine on the old version but on the new server it fails with:               usage: lpr [-cdfghlmnpqrstv] [-#num] [-1234 font] [-C class] [-i [numcols]]     [-J job] [-Pprinter] [-T title] [-U user] [-wnum] [name ...]      So -o was removed? How do we pass options to lpr if the options option was removed?


chmod doesn't work on folder 'd --- --- ---' permissions

In `/var/www` I've got a folder:               d--------- 2 www-data www-data  4096 May 20  2012 update      reported by `ls -la`. I'm logged in as root, but I can't change permissions or ownership. `chown` and `chmod` returns 'Operation not permitted' An automatic update procedure demands all files and folders to be owned by 'www-data' and permissions set to 'u+w'.


How to merge partition with gparted?

How I can merge all of my three unallocated spaces? And i want the bigger one to be under `/dev/sda5`. Gparted screenshot: ![enter image description here](http://i.stack.imgur.com/2zR6s.png)


How do I build the iptables kernel module for a loaded kernel?

I've built a kernel with loadable module support for various reasons, one of them the possibility to compile modules and load them without rebooting. This is supposed to be useful when I need a module that I had not enabled in the kernel config. Now, with drivers like nouveau, it's as easy as going to the source directory, and running `make M=drivers/gpu/drm/nouveau`. How can I build an updated `iptables` module without compiling a whole kernel and rebooting? Is it even possible?


Containers for sandboxing

I'm trying to find a container stack for sandboxing and and would like to know which stacks do that particular job well. By sandboxing I mean running applications so that security flaws are confined to the application. I want such applications to be able to be run as cron jobs. I also want almost absolute control over where various files are stored and especially by default. Minor rant. I remember how upset I was when I discovered that VBox was dumping image diffs in my very small home folder, when I set aside a rather large amount of disc base for things VM related! PS: I don't know if it somehow got editted out, or if I simply forgot, but whatever scheme should be automatic. I want cron jobs to be able to start and stop containers.


Get list of Linux files recursively and direct output to file

I'm configuring software on Ubuntu for i2b2, and trying to find all of the relevant files on a CentOS image that I downloaded (path below) and am now running on Windows VMWare Player (free for download). I'd like to create a file of the Linux file hierarchy recursively, for both CentOS and Ubuntu, so I can find the relevant files for each program (ie: JBoss, Java, Apache, Axis, Spring Web Framework, Oracle, etc..) and compare configuration. I know how to do a similar thing in Windows by getting the output of all files. Long story short, I just want a dump of all files in the Linux file system starting at the root folder, and save it to a file. Here's the command in Windows to do this:               WINDOWS-COMMAND-PROMPT>dir /b /a /s >> files_on_windows.txt      Reference: http://www.i2b2.org > Software (menu) > VMWare Image


GTK3+ and C++ on OSX - "No GSettings schemas are installed" error

I'm trying to run a C++ example with GTK3+ and GStreamer components on OSX. I can gcc compile the source with: `gcc -o basic5 basic-tutorial-5.c 'pkg-config --libs --cflags gstreamer-1.0 gstreamer-video-1.0 gtk+3.0'` but when I try to run it I get the following error:               GLib-GIO-ERROR **: No GSettings schemas are installed on the system      I read somewhere to try gsettings list-schemas. That resulted in:               Segmentation fault: 11


Difference in regular expression handling between Perl, Kikki, and Kodos

#!/usr/bin/perl          $mystring = "[2004/04/13] The date of this article.";     if($mystring =~ m/(\d+)/) {             print "The first number is $1.";     }      Perl returns `2004`, but Kiki and Kodos return `/04/`. Why that?


Can I copy a MySQL database by copying the files? What do the files contain exactly?

I am using MySQL database and using an Ubuntu Linux machine. My database named `db_test` , I notice that under path `/var/lib/mysql/db_test` ,there are files suffix with `.frm`, `.MYD`, `.MYI` like following:               /var/lib/mysql/db_test# ls          cars.frm      cars.MYD      cars.MYI          customers.frm     customers.MYD     customers.MYI          departments.frm     departments.MYD     departments.MYI          ...       Seems each `.frm`, `.MYD`, `.MYI` files group mapped with one table in the database. I have following two questions to ask:   1. What are the three files doing exactly?   2. If I create a new directory under path `/var/lib/mysql/` say `db_test_2` , and copy every file from `db_test_1` directory to `db_test_2` , will it also create a new database `db_test_2` which has exactly the same contents(tables) as `db_test_1`'s ?  Does this physically database files moving action create the same result as following command-line actions:   1. dump the database `db_test_1` out   2. create a new database `db_test_2`   3. then dump the `db_test_1` database back into the new database `db_test_2`? If so, it seems moving files are much faster then using `mysqldump` to copy databases(or to importing data from one DB to another DB in MySQL). Any opinions on this?


How do I delete this folder in Solaris?

I am not sure how or when the below folder was created.. But I am unable to delete or open it..               bash-3.2$ cd '+%d-%m-%y'     bash: cd: +%d-%m-%y: No such file or directory     bash-3.2$ rm -f  '+%d-%m-%y'     bash-3.2$ ls -l | grep "+"     drwxr-xr-x   2 hypess   hypess         2 Dec 20 04:21 +%d-%m-%y


Displaying server information at login prompt (Ubuntu)

I'm wondering if there's a way to customize the Ubuntu server login prompt. Currently it shows the following:               Ubuntu 13.10 fw tty1     fw login: _      I know there's /etc/motd for the message of the day, also .bashrc for bash customization for each user, but how do I change the login prompt post? Thanks


Why the inode value of shadow file changes?

I created a hard link for the shadow file. For removing the passwd of the user I opened the shadow file in vi editor and removed the encrypted passwd and then saved. The inode value of the shadow file was changed. Then I updated the passwd of the user and again the inode value of the shadow file changed. Why the inode of the shadow file changes when it is edited/updated?


Is there a way to undo the 'cpp' command in terminal?

I accidentally typed `cpp Scriptname.py DestinationDirectory`, intending to copy the Python script into the folder. I realized afterward that I should have used `cp`, but now my Python script is completely gone. I have tried the `locate` command, but it says that it's still present in my user directory. When I type `ls` in my user directory, it is nowhere to be found. What are my options here? Edit: Here is an exact replica of what I did, showing how the script 'MYSCRIPT.py' disappears from the home directory.               vav7:~ tuc40953$ ls      Desktop            Dropbox         Movies         New.java                   Public         scripts     Documents       Library         Music           Peptoids      Theultimatescript.py     Downloads       MYSCRIPT.py     New.class       Pictures        rename.py     vav7:~ tuc40953$ clear          vav7:~ tuc40953$ cpp MYSCRIPT.py Desktop/Peptoids/Final-Structures/MyScript/     cc1: fatal error: opening output file Desktop/Peptoids/Final-Structures/MyScript/: Is a directory     compilation terminated.     vav7:~ tuc40953$ cpp Desktop/Peptoids/Final-Structures/MyScript/ MYSCRIPT.py      cc1: error: Desktop/Peptoids/Final-Structures/MyScript/: No such file or directory      vav7:~ tuc40953$ ls     Desktop         Dropbox         Music           Peptoids          Theultimatescript.py     Documents       Library         New.class       Pictures            rename.py      Downloads      Movies          New.java        Public             scripts


bash script loses readonly value after first time thru loop

I have a bash script which seems to lose the value of the readonly constant after the first time thru the for-in loop. For example:               #!/bin/bash     readonly DIR="./groups/"     for output in "${array[@]}"     do        catstring+="$DIR$output "     done     printf "$catstring"     cat $catstring > outputfile      The array has a bunch of names in it like: file1 file2 file3, etc. The output from the printf statement is "./groups/file1 file2 file3". What I'm expecting is "./groups/file1 ./groups/file2 ./groups/file3". Why is bash losing the value of $DIR after the first time thru the for-in loop?


How to create a user with limited RAM usage?

So I have 4 GB RAM + 4GB swap. I want to create a user with limited ram and swap: 3 GB RAM and 1 GB swap. Is such thing possible? Is it possible to start applications with limited RAM and swap avaliable to them without creating a separate user (and not installing any special apps - having just a default Debian/CentOS server configuration, and not using sudo)? _**Update:_** So I opened terminall and typed into it ulimit command: `ulimit -v 1000000` which shall be like `976,6Mb` limitation. Next I called `ulimit -a` and saw that limitation is "on". Then I started some bash script that compiles and starts my app in `nohup`, a long one `nohup ./cloud-updater-linux.sh >& /dev/null &`... but after some time I saw: ![enter image description here](http://i.stack.imgur.com/KS7yG.jpg) (which would be ok if no limitations were applied - it downloaded some large lib, and started to compile it.) But I thought I applied limitations to shall and all processes launched with/from it with `ulimit -v 1000000`? What I got wrong? How to make a terminal and all sub processes it launches be limited on ram usage?


Is Linux bad at handling misbehaving programs?

This is really not a duplicate, because my main question is how to get able to use the system again once it started swapping (maybe I can raise the priority of what handles ctrl-alt-F1, or something like that), and not how to avoid a program from using too much memory I use Linux (ArchLinux distribution) with XFCE window manager. 6-cores CPU, 6 GBs RAM, 2 GBs swap. A few days ago I run an application that started consuming too much RAM, and forced my system to swap. The whole system became completly unstable. Even Ctrl-Alt-F1 took about 2~3 minutes to work, and only then I was able to kill the misbehaving application. Is there a way to prevent that? I don't know how Windows do it, but in years using Windows 7, I never had this problem; the windows task manager always come up very quickly (in GUI mode even, but I'm also happy if Linux lemme do it on TTY at least). Please, no suggestions like disabling swap, not running this program, or something like that. I'm asking for a way to not let one single application running as an unpriviledged user to be able to lock the whole system, no matter what it does.


No networking for Centos under VirtualBox

Running an Ubuntu desktop server. I installed virtual box, then installed CentOS as a virtual machine. Centos is not starting the eth0 network adaptor. When I start it manually, I cannot connect outside the machine. Anyone know what I've done wrong? I'm new to Virtual Box and somewhat new to CentOS. Virtual Box 4.1.12 and CentOS 6.2 and Ubuntu 11.10 64 bit. Using NAT addressing. Networking for the Main Server:               eth0      Link encap:Ethernet  HWaddr c8:60:00:12:a7:9a                 inet addr:10.0.0.99  Bcast:10.0.0.255  Mask:255.255.255.0               inet6 addr: fe80::ca60:ff:fe12:a79a/64 Scope:Link               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:15492 errors:0 dropped:0 overruns:0 frame:0               TX packets:7192 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000                RX bytes:3083151 (3.0 MB)  TX bytes:1104784 (1.1 MB)               Interrupt:41 Base address:0x4000           lo        Link encap:Local Loopback                 inet addr:127.0.0.1  Mask:255.0.0.0               inet6 addr: ::1/128 Scope:Host               UP LOOPBACK RUNNING  MTU:16436  Metric:1               RX packets:6398 errors:0 dropped:0 overruns:0 frame:0               TX packets:6398 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:0                RX bytes:789448 (789.4 KB)  TX bytes:789448 (789.4 KB)      Networking for the CentOS virtual Server:               eth0      Link encap:Ethernet  HWaddr 08:00:27:75:b2:9ac2               inet addr:10.0.0.98  Bcast:10.0.0.255  Mask:255.255.255.0               inet6 addr: fe80::a00:27ff:fe75:b2c2/64 Scope:Link               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:0 errors:0 dropped:0 overruns:0 frame:0               TX packets:27 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000                RX bytes:0 (0.0 b)  TX bytes:1350 (1.3 KiB)               lo        Link encap:Local Loopback                 inet addr:127.0.0.1  Mask:255.0.0.0               inet6 addr: ::1/128 Scope:Host               UP LOOPBACK RUNNING  MTU:16436  Metric:1               RX packets:6398 errors:0 dropped:0 overruns:0 frame:0               TX packets:6398 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:0                RX bytes:789448 (789.4 KB)  TX bytes:789448 (789.4 KB)


How to clone/copy all file/directory attributes onto different file/directory?

I want to copy the attributes (ownership, group, ACL, extended attributes, etc.) of one directory to another but not the directory contents itself. This does not work:               cp -v --attributes-only A B     cp: omitting directory `A'                 **Note:** It does not have to be `cp`.


tar specific files based on a pattern

I got a lot of files with the following format:               2014_04_01_11.txt     2014_04_01_12.txt     2014_04_01_13.txt     2013_03_25_12.txt     2013_04_29_15.txt      I would like to tar all theses files into an archive 20?? _ ?? _ ??**.tar.gz. My actual command is:               find . -name '????_??_??_*.txt' | tar ...      I don't know how to define dynamically the name of the archive.


How to list all unique ip address currently connected to a specific port?

Say I want to know how many unique clients are connected to port 5222 on a server. Can you find a way better/faster/stronger than this?               netstat -nt | grep ':5222.*ESTABLISHED' | awk '{ print $5 }' \     | grep -Po '[0-9]{1,3}(\.[0-9]{1,3}){3}' | uniq | wc -l      I know this is a too simple regex for a internet address, but seems unecessary to check for well formed addresses, as netstat will probably output only valid ones. Can someone come to a `netstat -nt | awk { awesomeness }`? A `netstat -nt | awk { simplicity }| uniq | wc -l`, maybe?


How to use a built in driver in the kernel?

I am building the 3.14 kernel for a board that requires the intel e1000e driver. I would like this kernel to have the driver built in so that I can remove loadable module support. I have chosen the option in menu config and verified that the driver is compiled (the .o exists), however the device does not appear to be found or recognized. Is there something I am missing to add a module to the kernel?


How to write a function in bash?

I am drawing blank here. How should I have written this script?               #!/bin/sh          XZY_NODES="\     vl-ocnt-1 \     vl-ocnt-2 \     vl-onet-1 \     vl-onet-2 \     vl-ocmp-1 \     vl-oomp-2 \     "          is_xyz_node () {             host=$1             for xyznode in $XZY_NODES             do                     if [ $host == $xyznode ]                     then                             return 'Y'                     fi             done             return 'N'     }          if [ 'Y' == $(is_xyz_node $1) ]     then             echo "$1 is a xyz node"     else             echo "$1 is NOT a xyz node"     fi       When I run this script I get this output ...               $ ./test.sh not-xyz     ./test.sh: line 22: return: N: numeric argument required     ./test.sh: line 25: [: Y: unary operator expected     not-xyz is NOT a xyz node          $ ./test.sh vl-ocnt-2     ./test.sh: line 19: return: Y: numeric argument required     ./test.sh: line 25: [: Y: unary operator expected     vl-ocnt-2 is NOT a xyz node


'seek' argument in command dd

Can some explain me what is happening in the following lines?               dd if=/dev/urandom bs=4096 seek=7 count=2 of=file_with_holes      especially seek part is not clear Man pages says :                seek=BLOCKS                   skip BLOCKS obs-sized blocks at start of output      What is obs-sized block?


Strange processes: "pro" and "proh" and slow Internet

I have two processes that start automatically and when that happens the internet speed decrease considerably. I tried to killed those processes but they start again, I tried to delete the executables too that are located at `/boot/pro` and `/boot/proh`, but they are recreated again. I made the following script to kill constantly those processes as a workaround, but this is a temporal solution.               while true ; do killall proh ; done      I am on Debian 7. I don't know who is executing constantly those processes. Does anybody think they can help me?


How to search for a string only in textfiles? (recursively)

I can list all the textfiles (by mimetype) in a folder with:               find . -type f -print0 | xargs -0 file -i | fgrep -i text | sed 's/:$//g' 2>/dev/null | awk 'BEGIN {FS=": "} {print $1}'      Ok. But how can I add "fgrep" to this, to search in these files for "STRING" (regexp not needed, that's why fgrep). this isn't good:               fgrep -iR "STRING" *      because it starts to search in ISO files, binary files too... Fedora14/bash.


Is it Possible to Boot a New OS While Currently Running?

Let's assume I'm running CentOS (actually, if this question only applies to certain distros, which ones?). I have another drive (that I can boot from - it's got everything installed) mounted into my file tree. Is it possible to just boot from that drive without restarting or anything? E.g. would there be something like `bootfrom /stuff/miscmounteddrive/` or some other such command?


Command like `column -t` that instead keeps separators in output

I'm editing a simple table. I would like to have it nicely formatted. While I could use `tbl`, `latex`, or similar, this seems overkill -- plain text really is sufficient. As it's simple I might as well have the source be the output. So the source should look good too. This seems like it should be a perfect job for `column -s '|' -t` -- it finds the separators and automatically inserts spaces to align according to the maximum width in each column. Unfortunately, it deletes the separators, so I can't rerun it after further editing. Is there any good text-processing tool that can do this idempotently, so that it's output serves as input? Or do I need to write my own? EDIT: here's an example of what I want:               foo |   bar | baz     abc def | 12 | 23456      should become               foo     | bar | baz     abc def | 12  | 3456      When `' '` is both the separator and the spacer, `column -t` works nicely. But my items have spaces in them, so I can't use that. Having the spacers be distinct from the separators complicates things. I think it's useful to have them be treated as separator characters when next to separators, but that's not what `column -s '|' -t` does (though obviously the current behavior is also useful).


Using setfacl to allow group members to write to any file in a directory

I'd like to use setfacl so that anyone in group 'app' can edit any file contained within /usr/local/users/app regardless of what the traditional UNIX permissions say. I have two users john and ben. I tried to follow the instruction from another question, but john is not able to write to some files. It looks like this is because of the acl mask. However, I've set default mask on the directory of rwx, so shouldn't the files within it inherit that when created? E.g. john cannot write to the file below, but he is a member of group 'app' which has write acls on the file so I'm surprised he can't edit the file.               ben@app1:/usr/local/users$ ls -la app/app-1.0-SNAPSHOT/lib/play.templates_2.10-2.1.1.jar      -rw-r--r--+ 1 ben users 38326 Apr  2 10:21 app/app-1.0-SNAPSHOT/lib/play.templates_2.10-2.1.1.jar          ben@app1:/usr/local/users/app$ getfacl app-1.0-SNAPSHOT/lib/     # file: app-1.0-SNAPSHOT/lib/     # owner: ben     # group: users     user::rwx     group::rwx          #effective:r-x     group:app:rwx       #effective:r-x     mask::r-x     other::r-x     default:user::rwx     default:group::rwx     default:group:app:rwx     default:mask::rwx     default:other::r-x          ben@app1:/usr/local/users$ getfacl app/app-1.0-SNAPSHOT/lib/play.templates_2.10-2.1.1.jar      # file: app/app-1.0-SNAPSHOT/lib/play.templates_2.10-2.1.1.jar     # owner: ben     # group: users     user::rw-     group::rwx          #effective:r--     group:app:rwx       #effective:r--     mask::r--     other::r--


What shells were used on early unix systems?

According to wikipedia, the Bourne shell was introduced in 1977 and C shell in 1978, but unix itself dates back to 1969. If you were using a unix system before 1977, what shell would you have been using?


Keeping my production webserver updated

I have a production webserver (CentOS 6.5) and I just wanted to know how do I keep this updated interms of security updates and stable. For example, is it safe interms of not breaking anything on the server if I run this command?               su -c '/sbin/chkconfig --level 345 yum on; /sbin/service yum start'      This apparently updates the server automatically every day. As CentOS is supported for 10 years, I will want to make use of this.


Can I disable unattended Debian package updates?

Does debian have some sort of automated package update process? Im using it on a set of fanless PCs and noted that one had become v slow recently. On inspection the network LED showed lots of activity. Eventually the system became non-responsive and required a cold start. After booting I looked in /var/log/syslog and found pages of entries like so: > Package: <some package name>   >  Auto-Installed: 1   >  Architecture: armel It appears to be enumerating installed packages. More than anything I'm wondering if it's some automated process that I can disable.


Fixed terminal status lineS instead of shell prompt?

It is common to cram useful information in the Unix shell prompt, but I have too many things I want to keep an eye on to fit it all in one prompt: current Gnu screen window, current directory, current time, hostname, current git branch, phase of the moon, you-name-it. It would be saner to have a _fixed status **region_** at the bottom (or top) of the terminal to show all this information, and leave the prompt alone. (I wrote "fixed status region" rather than "fixed status line" because I don't want to limit myself to one line.) (This region, of course, would not be affected by normal interactive output.) Is there a standard Unix to implement such a fixed status region, and would allow me to update it through the `precmd` function?


Difference Between cp -r and cp -R (copy command)

cp- r is meant to copy files recursively, and cp -R for copying directories recursively. But I've checked, and both appear to copy both files and directories, the same thing. So, what's the difference actually?


USB copy hangs for a while when reach the 100%

When I copy files of a considerable size (for example right now one of 689MB) to a USB stick, the copy hangs at 100% for 5 min or more. I have tried both Nautilus and `rsync --progress`. With the former it seems that never ends and I have to kill nautilus. With the latter it ends, but as I said, 5 minutes or more after it has reached the 100%. I'm using Wheezy 64 bits and Gnome Shell. If I'm not mistaken, there is a reported bug about the Nautilus issue, but why is it happening with rsync too?


How can I switch between ttys without using screen?

So lets say you boot up your linux install all the way to the desktop. You start up a gnome-terminal/konsole/whatever so you have a tty to enter commands to. Now lets say I SSH into that same machine. It will bind me to another tty to enter commands to. Now lets say I want to "switch" my tty from my original SSH one to the gnome- terminal one started earlier. Basically I'm asking if there is anyway to do the same thing screen -x does but without screen? I know you can easily send output to the other tty simply by echoing something into the /dev file, but I dont know a way to 'view' whats in the tty... Any ideas?


how to make search a text on the terminal directly

I have a program that outputs some data to the terminal (via printf() ). Is it possible search a text on the outputed text on the terminal **directly**? It is possible to do search by directing the texts into a file then make search on it then output the result to the terminal, but it is not what I am asking. EDIT: what I meant by "search": I wonder if it is possible to search a text, for example how can I search `libgnome-desktop` on the below terminal output? ![enter image description here](http://i.stack.imgur.com/VcLPn.png)


Process movie intelligently

Let's say you like the jungle. You have a few Survivor episodes and Predator movies. You'd like to separate the jungle clips from clips involving humans. Maybe to play as a projector show at a party, or so. My first thought: many shows and movies are hysterically chopped up in shots. As such a shot shift is often dramatic in terms of on-screen data change, they could be detected, and then each shot saved as a separate file. This will take some time, but when it's done you could manually sort out the jungle. But, some jungle would be lost because some shots slide from jungle to human, or from human to jungle. Then I thought, some digital cameras are able to spot humans and instantaneously give them focus. If I had that, I could simply drop all frames with humans. Do you know of such software?


System too slow

My linux system is responding very slowly.I should wait to get the result of my command. How can i investigate to know the problem of his behavior?


Socket Connection Refused (raspbian) but ports are open for connections

I'd like to establish a connection between my client and raspbian. Within my network, I can connect to my service at any time without any problems. Now I want to connect to my service via the internet. This is unfortunately not working when I try to use my internet ip for the connection.               client = new MqttClient("tcp://77.777.77.77:1883", "SendingdLoop");                 client.connect();      My Java-Application tells me that the connection has been refused (so there is no timeout):                  Could not establish connection (32103) - java.net.ConnectException: Connection **refused**: connect          at org.eclipse.paho.client.mqttv3.internal.TCPNetworkModule.start(TCPNetworkModule.java:75)             at org.eclipse.paho.client.mqttv3.internal.ClientComms$ConnectBG.run(ClientComms.java:538)             at java.lang.Thread.run(Thread.java:722)         Caused by: java.net.ConnectException: Connection refused: connect             at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)             at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:75)             at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)             at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)             at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)             at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:157)             at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)             at java.net.Socket.connect(Socket.java:579)             at org.eclipse.paho.client.mqttv3.internal.TCPNetworkModule.start(TCPNetworkModule.java:66)      I followed the official instructions to open the port: https://wiki.debian.org/iptables my entry looks like this:                -A INPUT -p tcp -m tcp --dport 1883 -j ACCEPT      When I check iptables,               iptables -L      ACCEPT tcp -- anywhere anywhere  tcp dpt: 1883      I can see the rule is active. Is there anything else I have to configure?


How can I configure a set of computers to netboot?

I have a number of machines which I'll be deploying in the near future. As suggested here, I could use network booting to get these computers online without even having a hard disk in them. According to user Caleb: > You can setup server with a netbook kernel available via TFTP and a file > system available via nfs. All your clients need to do is use a netboot > capable NIC to contact this server, download their kernel and go. No hard > drive involved! And easy maintenance. All the machines can potentially boot > the same image. This seems interesting, but here are the challenges:   1. These machines will each have a few differences in configuration. Hardware-wise and software-wise, they will be exactly the same, but they'll need to have two things that differ in configuration:      1. Each will have to have its own URL that it starts a browser with.     2. Each will have its own username and password for HTTP-Basic authentication to provide some measure of security.    2. These machines will each be in different locations, as well as they'll have one master server running in the cloud somewhere that they all connect to to netboot and for the filesystem. NFS isn't exactly the most secure thing in the world either, and security would be nice to say the least. Is there a way I could secure the filesystem and kernel?    3. How big a download is required for a netboot initially? These machines will barely be running anything at all, basically a kernel, X, a lightweight window manager, and a browser. I could run just about everything in RAM and that would be excellent. How much of a download is required for startup? I'm totally new to netboot, so how would I set that up?


Understand synopsis in manpage

I have not being able to understand the synopsis in manpage of a command. For example, let's see the manpage of `man` itself. By `man man`:               SYNOPSIS            man  [-C  file]  [-d]  [-D]  [--warnings[=warnings]]  [-R encoding] [-L            locale] [-m system[,...]] [-M path] [-S list]  [-e  extension]  [-i|-I]            [--regex|--wildcard]   [--names-only]  [-a]  [-u]  [--no-subpages]  [-P            pager] [-r prompt] [-7] [-E encoding] [--no-hyphenation] [--no-justifi‐            cation]  [-p  string]  [-t]  [-T[device]]  [-H[browser]] [-X[dpi]] [-Z]            [[section] page ...] ...            man -k [apropos options] regexp ...            man -K [-w|-W] [-S list] [-i|-I] [--regex] [section] term ...            man -f [whatis options] page ...            man -l [-C file] [-d] [-D] [--warnings[=warnings]]  [-R  encoding]  [-L            locale]  [-P  pager]  [-r  prompt]  [-7] [-E encoding] [-p string] [-t]            [-T[device]] [-H[browser]] [-X[dpi]] [-Z] file ...            man -w|-W [-C file] [-d] [-D] page ...            man -c [-C file] [-d] [-D] page ...            man [-hV]        1. Is synopsis mean the prototype of usage of the command?   2. what do those `[...]`and `[...]` inside `[...]` mean? Do they mean something optional?   3. Does `|` mean OR?   4. What does `,` mean in `[-m system[,...]]`?   5. Are the rules for writing and reading synopsis similar to Regex? But I feel they are not quite the same.


How can I configure a reverse SSH connection to the connecting computer?

I'm going to be deploying a number of machines in the near future which will be behind routers. It won't be feasible to set up dynamic DNS on each router and port forwarding, so is there a way I can configure these machines to initiate a TCP connection to my computer and then have my computer initiate a SSH connection to the remote computer over that connection? IE:               COMPUTER A OPENS TCP CONNECTION TO COMPUTER B     COMPUTER B OPENS SSH CONNECTION OVER THE EXISTING TCP CONNECTION TO COMPUTER A     COMPUTER B NOW HAS SSH CONNECTION TO COMPUTER A      Is this possible, and if so, how can I do it?


Locking windows on desktop in Openbox

How can I protect a window from being hidden by the `ToggleShowDesktop` global action? I've found that Openbox 3.5 can do that trick only for windows with the desktop or dock type. For example, windows created by `trayer`, `conky` or IDesktop will not be hiden by the `ToggleShowDesktop` global action. But these programs create windows of desired type on startup. While I want to make this trick possible for any already created window. For example Chromium browser. Possible workarounds:   1. Protect desired window from hiding (Iconify/minimize).   2. Change type of desired window to `desktop` or `dock` by some script binded to hotkey. But the Openbox actions reference doesn't have such a command. And secondly, I'm not familiar with the Linux window system to write a script that will change the type of a window on the fly.


How do I see how many blocks I have free on my filesystem?

I know df is supposed to provide this information, but when I run df it shows the number of 1k blocks free, yet my filesystem is using 4k blocks. I could simply divide by four of course, but this wouldn't necessarily be correct, due to the difference in granularity. For example, four 1k files would use four 1k blocks on a filesystem using 1k blocks, but four 1k files would use four 4k blocks on a filesystem using 4k blocks. (So dividing by four would produce the wrong answer.)


How to get an Wacom Intuos CTH-480 to work under Easy Peasy 1.6 (Ubuntu 10.04)?

Is there any way to make a Wacom Intuous CTH-480 work under Easy Peasy 1.6 (Ubuntu 10.04)? I have installed the Wacom Driver files according these instruction, replacing 3.7 with 2.6.30, as Easy Peasy 1.6 uses kernel 2.6.32-21-generic: http://matthewwittering.com/blog/ubuntu-tips/how-to-install-a-wacom-intuos- ctl-480-tablet-on-ubuntu.html and I have installed               sudo apt-get install xserver-xorg-input-wacom      The device is now detected as follows:               ~$ xinput list          ⎡ Virtual core pointer                      id=2    [master pointer  (3)]          ⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]          ⎜   ↳ USB Optical Mouse                         id=10   [slave  pointer  (2)]          ⎜   ↳ SynPS/2 Synaptics TouchPad                id=14   [slave  pointer  (2)]          ⎜   ↳ Macintosh mouse button emulation          id=15   [slave  pointer  (2)]          ⎜   ↳ Wacom Intuos PT S Finger pad              id=16   [slave  pointer  (2)]          ⎜   ↳ Wacom Intuos PT S Finger                  id=17   [slave  pointer  (2)]          ⎜   ↳ Wacom Intuos PT S Pen eraser              id=18   [slave  pointer  (2)]          ⎜   ↳ Wacom Intuos PT S Pen                     id=19   [slave  pointer  (2)]          ⎣ Virtual core keyboard                     id=3    [master keyboard (2)]          ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]          ↳ Power Button                              id=6    [slave  keyboard (3)]          ↳ Video Bus                                 id=7    [slave  keyboard (3)]          ↳ Power Button                              id=8    [slave  keyboard (3)]          ↳ Sleep Button                              id=9    [slave  keyboard (3)]          ↳ Dell Dell USB Keyboard                    id=11   [slave  keyboard (3)]          ↳ WebCam                                    id=12   [slave  keyboard (3)]          ↳ AT Translated Set 2 keyboard              id=13   [slave  keyboard (3)]                $lsusb | grep Wacom     Bus 003 Device 002: ID 056a:0302 Wacom Co., Ltd     ~$ lsmod | grep wacom     wacom                  43114  0 Still, programs such as Mypaint (I am using version 0.8.2) don't 'see' the device.   * Can this be made to work?   * Do I have to upgrade to a newer Ubuntu distro / Kernel (I'd rather not, as I am perfectly satisfied with my current OS)? In case it is relevant: I'm using an Aspire One notebook.


Do I have to swap IP sets, or can I add/remove on the fly?

I was wondering about the semantics of `ipset(8)`. Is it possible to add a rule matching a set to `iptables` and then manipulate the set, or can I only create a set and swap it for an older set in order to apply it to an `iptables` rule matching the name? **I.e. can I add/remove to/from an IP set ad hoc, or can I exchange whole sets while the sets are in active use?** * * * The reason I ask is this is as follows. Say I create a set               ipset create PCs hash:ip     ipset add PCs 1.1.1.1     ipset add PCs 2.2.2.2      ... et cetera. And a rule that allows access to HTTP:               iptables -A INPUT -p tcp --dport 80 -m set --set PCs src -j ACCEPT      What happens when I run:               ipset add PCs 3.3.3.3      will the `iptables` rule now take immediate effect for IP 3.3.3.3 as well? I saw it's possible to use `-j SET --add-set ...` to manipulate IP sets ad hoc from within `iptables` rules. This makes me think it should work to manipulate a set at any given point. However, the `ipset` project site seems to suggest that swapping a new (adjusted) set for another is the better alternative. Be it via `ipset swap` or via `ipset restore -!`. Can anyone shed light on this?


Is there a command which lists installed applications based on whether they use GTK2 or GTK3?

I'm using Lubuntu 12.10 and I know of two ways to tell if a specific program uses GTK2 or GTK3:   * I can make changes in `~/.themes/theme_name/gtk-2.0/gtkrc`, for example, and see if a specific application's appearance is altered.   * I can run `ldd /usr/bin/specific_application | grep gtk` Both these work on a **per-app** basis. Is there a way to get a list of installed applications based on whether they use GTK2 or GTK3?


RTL8180 kernel module freezing with Realtek RTL8185L chipset

I've recently purchased a PEAK wireless PCI board. I needed a card with removable antenna capability to test a high gain antenna that I had laying around. Went to my local hardware store and I got this one. It comes with a RTL8185L chip. In the times of kernel 2.6, Realtek had a driver that seamed to have solved the problem. I've downloaded that one, but it does not compile under kernel 3.10 (Yes, i was going for wishful thinking). My box is a Slackware 14.0 (updated from current) with kernel 3.10.5-smp. Has anyone had any issue with kernel module rtl8180 freezing the system after an `ifconfig wlanN up`?


Speed up zgrep on a multi-core computer

I'm running `zgrep` on a computer with 16 CPUs, but it only takes one CPU to run the task. Can I speed it up, perhaps utilize all 16 cores? P.S The IO is just fine, I could just copy the gzipped file into memory disk


what do I need to do with "man: can't set the locale; make sure $LC_* and $LANG are correct"

I typed `man sudoers` but got               man: can't set the locale; make sure $LC_* and $LANG are correct     No manual entry for sudoers      What does this mean?


How do I know a specified user's permissions on Linux with root access?

I have root access to my local server. And some days ago my colleague created a user on that server, giving me the uesrname and password. But the user has a minimized permissions. Like the user can't even create a file under its own home directory. Is there any concept about "the permissions of a user"? If there is, how do I check/modify it?


Proper options for openssl with simple ciphertext

Last weekend there was a cryptographic challenge where the ciphertext was the following hex:               FC 89 BF C2 B0 5F 1C 2E 64 B8 78 43 92 78 3A C9      I know for sure that this is encrypted using AES/Rijndael 128-bit ECB, the key is REDRYDER and a solution for this has already been posted to confirm this. The plain text is FLAG=DAISY. I wrote a simple PHP mcrypt script that decrypts this with no salt or no IV string and it decrypts properly. However, when I tried to use openssl, I don't get the plain text:               echo "0: FC 89 BF C2 B0 5F 1C 2E 64 B8 78 43 92 78 3A C9" | xxd -r | openssl aes-128-ecb -d -k REDRYDER -nosalt -nopad ; echo      This just outputs some binary data. I also tried passing the input through dd conv=swab to do a byte swap. What am I doing wrong?


ssh-agent: How to set it up so my CentOS server will only ask for passphrase once?

On my Macbook, my SSH private key is encrypted, but I never have to re-enter the passphrase even if I reboot the machine. The system must be unlocking it along with my user account. Is it possible to set it up the same way for my user account on a CentOS server? There should be some sort of option that would basically encrypt the privatekey with the user account password (or at least encrypt the passphrase with the user password). I do not want the private key in plaintext on the hard disk, and would prefer not to have to enter many passwords. If the answer is no, then I probably will need to enter it once each time the server is booted. That is less good, but since that should be a rare occurrence, that would be tolerable.


How do I turn off the backlight but leave the LCD on?

How do I set zero brightness on laptops that have a nonzero minimum brightness on the brightness control? The solution should work regardless of X. I.e. it should also work in the virtual terminals.


Prevent GRUB from showing up by default?

Whenever I boot on Ubuntu, I see the entire GRUB menu by default. Is there a way I could make it simply auto-boot if uninterrupted within X seconds? I remember that this was the case on previous releases of Ubuntu, it would only show the GRUB menu if you held down a button during the boot. How can I make GRUB do this by default and just get on with the boot process?


How does ssh server defines which key to use first having more than 1?

I have just found out that on my Ubuntu machine I have more public keys to serve in `/etc/ssh` directory:               $ ll /etc/ssh     total 296K     -rw-r--r-- 1 root root 237K lip  3  2013 moduli     -rw-r--r-- 1 root root 1.7K kwi 17 12:43 ssh_config     -rw-r--r-- 1 root root 1.7K mar 25 23:06 ssh_config.dpkg-old     -rw-r--r-- 1 root root 1.7K kwi 17 12:43 ssh_config.lwidentity.bak     -rw-r--r-- 1 root root 1.7K mar 25 23:06 ssh_config.lwidentity.orig     -rw-r--r-- 1 root root 2.6K kwi 17 12:43 sshd_config     -rw-r--r-- 1 root root 2.6K kwi 17 12:43 sshd_config.lwidentity.bak     -rw-r--r-- 1 root root 2.5K mar 25 23:06 sshd_config.lwidentity.orig     -rw------- 1 root root  672 sty  4  2014 ssh_host_dsa_key     -rw-r--r-- 1 root root  605 sty  4  2014 ssh_host_dsa_key.pub     -rw------- 1 root root  227 sty  4  2014 ssh_host_ecdsa_key     -rw-r--r-- 1 root root  177 sty  4  2014 ssh_host_ecdsa_key.pub     -rw------- 1 root root 1.7K sty  4  2014 ssh_host_rsa_key     -rw-r--r-- 1 root root  397 sty  4  2014 ssh_host_rsa_key.pub     -rw-r--r-- 1 root root  338 kwi 17 12:36 ssh_import_id      Having this and :               $ find /etc/ssh  ~/.ssh -name "*.pub" -exec ssh-keygen -l -f {} \;     256 da:f0:03:79:68:f8:04:b1:07:d8:8f:fe:3d:91:0e:aa  root@icanseeyou (ECDSA)     2048 3f:d7:9f:68:1b:b3:1a:a9:47:5b:47:5b:27:88:8c:aa  root@icanseeyou (RSA)     1024 7f:24:ca:0f:e3:84:8e:f9:1c:b3:49:d1:f4:39:a1:aa  root@icanseeyou (DSA)     4096 ae:86:c9:88:36:36:37:2f:84:5b:83:b4:45:17:41:aa  USER@icanseeyou (RSA)      I always get the ECDSA key as the first one (the one that is served)               $ ssh -p 222 USER@localhost     The authenticity of host '[localhost]:222 ([127.0.0.1]:222)' can't be established.     ECDSA key fingerprint is da:f0:03:79:68:f8:04:b1:07:d8:8f:fe:3d:91:0e:aa.     Are you sure you want to continue connecting (yes/no)?       `/etc/ssh/sshd_config`                11 HostKey /etc/ssh/ssh_host_rsa_key      12 HostKey /etc/ssh/ssh_host_dsa_key      13 HostKey /etc/ssh/ssh_host_ecdsa_key      How does this work ? Why is the ECDSA key the first one to be served ?


how does time command work

So when I type `time <some_program>` I have nice CPU time measurement. But exactly how is this achieved? Also does this have any performance impact on the `some_program`?


How to open cups in debian squeeze to all clients

The standard CUPS configuration on debian squeeze allows only access from localhost. I would like to allow all LAN users the same permissions. The LAN is behind a secured router. Access to the eb interface and ürinting and full job control is the minimal that all clients should be able to do without login. What do I need to change and where in my cups configuration? * * * Edit For others looking for an answer, try this howto http://dev.shyd.de/2011/03/debian-printserver-scanserver-hplip-cups-sane/


How do I disable the left-(meta|windows) key binding in gnome-shell

I changed the keybinding to `Show the activities overview` in the panel `System Settings / Keyboard / Shortcuts` to `Shift-ESC`, but the left-meta or left-windows key is still bringing it up. How do I disable that binding?


What does sdptool do in this script?

Here I want to know about this `sdptool` command does in the following script snippet:               if [ `sdptool browse $BD_ADDR | wc -l` -lt 5 ]      I understand `sdptool browse $BD_ADDR` as well as `wc -l` -- it's used for new line counts in result of `sdptool browse $BD_ADDR`. but what about `-lt 5`?


Distributions that only ships Python 3.X

Is it possible currently? I tried to remove python in Fedora 19 but yum depends on it.


Using mutt to fetch email from hotmail?

OK so I have mutt installed. But can't properly configure my hotmail acccount. I need some sample for hotmail configuration.


Can't compile rTorrent with xmlrpc-c

I'm trying to setup xmlrpc-c with rTorrent but for some reason I failed:               checking for XMLRPC-C... failed      Here's my build script:               output_dir=/home/world/apps          curl -Lso - http://sourceforge.net/projects/xmlrpc-c/files/Xmlrpc-c%20Super%20Stable/1.25.24/xmlrpc-c-1.25.24.tgz/download | tar xzf -     cd xmlrpc-c-1.25.24     ./configure --prefix=$output_dir     make && make install     cd ..          curl -Lso - http://ftp.gnome.org/pub/GNOME/sources/libsigc++/2.2/libsigc++-2.2.10.tar.bz2 | tar xjf -     cd libsigc++-2.2.10     ./configure --prefix=$output_dir     make && make install          export sigc_CFLAGS=-I$output_dir/include     export sigc_LIBS=$output_dir/lib          curl -Lso - http://libtorrent.rakshasa.no/downloads/libtorrent-0.13.3.tar.gz | tar xzf -     cd libtorrent-0.13.3     ./configure --prefix=$output_dir     make && make install     cd ..          export libtorrent_CFLAGS=-I$output_dir/include     export libtorrent_LIBS=$output_dir/lib     export PATH=$PATH:$output_dir/bin          curl -Lso - http://libtorrent.rakshasa.no/downloads/rtorrent-0.9.3.tar.gz | tar xzf -     cd rtorrent-0.9.3     ./configure --with-xmlrpc-c=$output_dir/bin/xmlrpc-c-config --prefix=$output_dir     make && make install      How come it' fails to check for XMLRPC-C?


xvfb-run aborting on cluster

I'm trying to run a python script with `xvfb-run` on a cluster using `SLURM`; when I use an interactive session (`srun`) it works fine, but when submitting to a queue (`sbatch`) it aborts/fails without much information.               /usr/bin/xvfb-run: line 166: 34566 Aborted                 DISPLAY=:$SERVERNUM XAUTHORITY=$AUTHFILE "$@" 2>&1      in /usr/bin/xvfb-run:               ...     164: # Start the command and save its exit status.                                                                                165: set +e     166: DISPLAY=:$SERVERNUM XAUTHORITY=$AUTHFILE "$@" 2>&1     167: RETVAL=$?     168: set -e     ...      any ideas why this would fail? I've tried specifying my .Xauthority file, but that doesn't help, i.e.               xvfb-run --server-args="-screen 0 1024x768x24" -f ~/.Xauthority python DrawStreams.py      EDIT: the problem does **not** occur if I just print out the `env` (i.e. if I replace 'python DrawStreams.py' with 'env'). So its some sort of combination of the job queue, xvfb-run, **and** python all together...