title: File is readable by everyone, but I can't open the file

text: I'm fairly new to Unix and I have written a script:               SERVER="/usr/local/abc/.../somefile.txt"     OPTION="$1"          if [ x$OPTION = "xtitle" ]     then             grep $OPTION $SERVER             exit     fi      As far as I understand, when I call the script with arg "title" as ".../script title" it should return what line `grep` found in that file consisting string "title". I've placed 0777 permissions on the script (I know that's an overkill, but security isn't important right now). I've also put 0777 permissions on _somefile.txt_. I put this script to run as a part of another program, it has it's own user. But in the logs of this other program I keep seeing :               grep: /usr/local/abc/..../somefile.txt: Permission denied      Is it possible that something can't be accessed even if it has 777 permissions? Is it possible that another user just can't see that folder?


title: How to resume the ?WATCH command when a USB GPS is reconnected

text: I have some hacks to ensure that my USB GPS devices continues spitting data if disconnected, then reconnected. The devices are so flaky that they need restarting so as to continue transmitting data. My hack is to have a cron job that runs every minute (I want quick recovery), invoking a script that keeps asking **gpsd** to continue WATCHing all configured devices every minute. So, I added this line in **`/etc/crontab`** :               * * * * * username /usr/bin/python /usr/local/bin/keepalive.py      And the content of **`/usr/local/bin/keepalive.py`** :               import socket     from syslog import syslog, openlog          CMD = '?WATCH={"class":"WATCH","json":true}'          def main():        openlog(__file__)        syslog('connecting to gpsd socket')        try:            sock = socket.create_connection(('localhost', 2947))        except socket.error as e:            syslog('connection failure: {0}'.format(e))        else:            syslog('CMD: ' + CMD)            sock.sendall(CMD)            syslog('success')        finally:            if sock:               sock.close()          if __name__ == '__main__':        main()      I also added this line to **`/etc/udev/rules.d/custom.rules`** :               ATTRS{idVendor}=="1234", ATTRS{idProduct}=="5678", SYMLINK+="flaky%n"      That's because I can have more than one of those devices connected at the same time. Is there some **udev** / **gpsd** magic I can do to avoid this hack?


title: how to end tmux sequence after switching panes

text: In tmux, when having separate panes open, I do `Ctrl-B ↑` to switch to the pane above. Great. Except that if the next key I want to press is also an arrow key (e.g. I want to go to the bash prompt above and search history for previous command) then this keystroke is **also** interpreted by tmux. It seems there's a timeout period before tmux releases control of the keyboard. How can I reduce that?


title: Why is my C++ program killed by OS

text: I've compiled small C++ application for school project on my virtual ubuntu 11.04. However when I attempt to run it over some larger data set after ~20 sec the program is killed by OS. > Killed (SIGKILL) I need to find out why and remove the problem. Could it be that I've not enough memory to run the program? Note: I need to find data set large enough to make it run for several minutes.


title: UNIX homework question regarding piping output, I don't understand what it's asking?

text: Basically, I need to come up with a command that sends the contents of a file `xxx` into a program `yyy`, then the output is piped to the input of another program `zzz`, where the output is appended to a file `xyz`.


title: Mint: startx from tty loads X in chinese

text: OS: Linux Mint 14 Tty: tty/6 I am trying to start X using startx from tty/6. I do not have a .xinitrc in my home directory. X gets loaded but it loads everything in chinese. I am not sure where the locale is set. Can someone explain why does it happen?               $ echo $LANGUAGE      zh_CN:en


title: Tmux: equivalent command to screen -d -m -S session_name

text: I'm looking at replacing `screen` with `tmux`, currently I use this screen command:               screen -d -m -S session_name /root/script      Is there an equivalent command for `tmux` that will do the same thing?


title: debian prompt is broken

text: When I login via ssh or from the console this is what I see:               Linux sensu.lbox.com 3.2.0-4-amd64 #1 SMP Debian 3.2.46-1+deb7u1 x86_64          The programs included with the Debian GNU/Linux system are free software;     the exact distribution terms for each program are described in the     individual files in /usr/share/doc/*/copyright.          Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent     permitted by applicable law.     Last login: Fri Sep 27 12:40:33 2013     -bash: id: command not found     -bash: [: : integer expression expected     root@sensu:~#      What is this and how do I get rid of it?               -bash: id: command not found     -bash: [: : integer expression expected      I am unable to most commands and it says `command not found instead` Thanks.


title: Setting up Helvetica with fontconfig?

text: I am running Xubuntu 12.04. I installed Helvetica and Helvetica Neue. For some reason, websites that use Helvetica Neue display fine, but those who use Helvetica have some issues... http://i.stack.imgur.com/yHkGk.png With Helvetica Neue (yay tampermonkey!)... http://i.stack.imgur.com/2c6mh.png As you can see, there is a rather annoying problem: Helvetica is always **BOLD.** When checking with `fc-match`               [CENSORED]@[CENSORED]:~$ fc-match Helvetica     Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 9: reading configurations from ~/.fonts.conf is deprecated.     Helvetica-Bold.ttf: "Helvetica" "粗體"      That's why it displays funny! Helvetica matches to Helvetica-Bold.ttf, not Helvetica.ttf! Is there anything I could add to ~/fonts.conf or something that could fix this issue? I don't like relying on Tampermonkey (yes, I wrote a script) to fix the display issues. (copied from askubuntu because nobody answered...)


title: Shell script to format logs

text: Requirement : I need to write a script to find out for which API the request has been sent but no response received. Given below is an example of the logs i'll be working with.               2014-02-28 12:06:16|information|request|HTTP|API|FROM|TO|240020101281402281736160035001||||78587597|9897968976|23425511000123293     2014-02-28 12:06:16|information|response|HTTP|API|FROM|TO|240020101281402281736160035001||||78587597|9897968976|23425511000123293     2014-02-28 12:06:16|information|request|HTTP|API|FROM|TO|240020101281402281736160035001||||78587597|9897968976|23425511000123293     2014-02-28 12:06:16|information|response|HTTP|API|FROM|TO|240020101281402281736160035001||||78587597|9897968976|23425511000123293     2014-02-28 12:06:16|information|***request***|HTTP|API|FROM|TO|240020101281402281736160035001||||78587597|9897968976|23425511000123293     2014-02-28 12:06:16|information|request|HTTP|API|FROM|TO|240020101281402281736160035001||||78587597|9897968976|23425511000123293     2014-02-28 12:06:16|information|response|HTTP|API|FROM|TO|240020101281402281736160035001||||78587597|9897968976|23425511000123293     2014-02-28 12:06:16|information|request|HTTP|API|FROM|TO|240020101281402281736160035001||||78587597|9897968976|23425511000123293     2014-02-28 12:06:16|information|response|HTTP|API|FROM|TO|240020101281402281736160035001||||78587597|9897968976|23425511000123293     2014-02-28 12:06:16|information|***request***|HTTP|API|FROM|TO|240020101281402281736160035001||||78587597|9897968976|23425511000123293     2014-02-28 12:06:16|information|request|HTTP|API|FROM|TO|240020101281402281736160035001||||78587597|9897968976|23425511000123293     2014-02-28 12:06:16|information|response|HTTP|API|FROM|TO|240020101281402281736160035001||||78587597|9897968976|23425511000123293     2014-02-28 12:06:16|information|request|HTTP|API|FROM|TO|240020101281402281736160035001||||78587597|9897968976|23425511000123293     2014-02-28 12:06:16|information|response|HTTP|API|FROM|TO|240020101281402281736160035001||||78587597|9897968976|23425511000123293      As seen in the ablove logs, In some cases only the request is received but no response. How Can I only print the lines for which response is not received. ????


title: How to upgrade debian VM with more CPUs

text: For some reason whoever built the server I'm working on only gave it 2 CPUs in the hyper-visor, I can easily give it 4, but I'm positive that will break it, the kernel will not recognize the others.. I vaguely remember trying this exactly a while back and gave up.. "if it ain't broke" etc.. However, the load on the server is increasing, I will be increasing the size of the hard-drives and need to increase the amount of CPU/RAM etc too.. (Physical RAM is on order for the box, but I have a few Gb free I can allocate) What do I do? I'm hoping its a simple matter of "installing the kernel" then rebooting with new CPU's allocated, but I want some advice/tips/help first. Also, Any idea what kernel I need? ESX Seems to be configured for Linux 32 bit, can I just change this to 64? https://wiki.debian.org/Migrate32To64Bit suggests I have to do a lot of fluffing about.. https://wiki.debian.org/HowToUpgradeKernel wasn't very helpful. Possibly helpful info:               apt-cache policy     Package files:      100 /var/lib/dpkg/status          release a=now      500 http://archive.debian.org lenny/non-free Packages          release v=5.0.10,o=Debian,a=oldstable,l=Debian,c=non-free          origin archive.debian.org      500 http://archive.debian.org lenny/main Packages          release v=5.0.10,o=Debian,a=oldstable,l=Debian,c=main          origin archive.debian.org      500 http://archive.debian.org lenny/contrib Packages          release v=5.0.10,o=Debian,a=oldstable,l=Debian,c=contrib          origin archive.debian.org     Pinned packages:               uname -a     Linux webserv 2.6.26-2-686 #1 SMP Sun Mar 4 22:19:19 UTC 2012 i686 GNU/Linux          /boot$ ls     config-2.6.26-2-686  grub  initrd.img-2.6.26-2-686  initrd.img-2.6.26-2-686.bak  System.map-2.6.26-2-686  vmlinuz-2.6.26-2-686     cat /proc/cpuinfo     processor   : 0     vendor_id   : GenuineIntel     cpu family  : 6     model       : 26     model name  : Intel(R) Xeon(R) CPU           E5520  @ 2.27GHz     stepping    : 8     cpu MHz     : 2261.000     cache size  : 8192 KB     fdiv_bug    : no     hlt_bug     : no     f00f_bug    : no     coma_bug    : no     fpu     : yes     fpu_exception   : yes     cpuid level : 11     wp      : yes     flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss nx rdtscp lm constant_tsc arch_perfmon pebs bts pni ssse3 cx16 sse4_1 sse4_2 popcnt lahf_lm ida     bogomips    : 4527.01     clflush size    : 64     power management:      Not that I'm incredibly lazy or anything.. but I'm thinking it might be easier to simply start from scratch with a new VM and migrate the data/services..


title: Keep getting the same result after "export PATH"

text: I am doing this:               $ which cabal     /usr/bin/cabal     $ export PATH=$PATH:$HOME/.cabal/bin     $ which cabal     /usr/bin/cabal      I expect to get `/.cabal/bin/cabal` for `$ which cabal` (this path exists) after this. But I don't even after re-opening the terminal. How come?


title: Linux: snooping on existing process's output

text: Say there's a running process that produces output, but you don't know where that output is redirected (it might go to a file, an open terminal, or `/dev/null` for all I know). Is it possible to snoop on existing process's output stream possessing only the PID of that process? Perhaps some way through `/proc`?


title: Why is wc so slow?

text: Why is the wc utility so slow? When I run it on a large file, it takes about 20 times longer than md5sum:               MyDesktop:/tmp$ dd if=/dev/zero bs=1024k count=1024 of=/tmp/bigfile     1024+0 records in     1024+0 records out     1073741824 bytes (1.1 GB) copied, 0.687094 s, 1.6 GB/s          MyDesktop:/tmp$ time wc /tmp/bigfile               0          0 1073741824 /tmp/bigfile          real    0m45.969s     user    0m45.424s     sys     0m0.424s          MyDesktop:/tmp$ time md5sum /tmp/bigfile      cd573cfaace07e7949bc0c46028904ff  /tmp/bigfile          real    0m2.520s     user    0m2.196s     sys     0m0.316s      It's not just a weird edge condition cause by the file being full of nulls, I see the same difference in performance even if the file is filled with random data or is a text file. _(this is on Ubuntu 13.04, 64 bit)_


title: How to compile video4linux for ARM?

text: I would like to use a webcam using a Linux over ARM board. Through reading, I have discovered video4linux so I would like to compile it for ARM. My unique notes are:               git clone git://linuxtv.org/media_build.git     # (alternately to get only the latest revision without history)     git clone --depth=1 git://linuxtv.org/media_build.git     cd media_build      ./build How would I do this?


title: How do I capture the exit code / handle errors correctly when using process substitution?

text: I have a script that parses file names into an array using the following method taken from a Q&A on SO:               unset ARGS     ARGID="1"     while IFS= read -r -d $'\0' FILE; do         ARGS[ARGID++]="$FILE"     done < <(find "$@" -type f -name '*.txt' -print0)      This works great and handles all types of filename variations perfectly. Sometimes, however, I will pass a non-existing file to the script, e.g:               $ findscript.sh existingfolder nonexistingfolder     find: `nonexistingfile': No such file or directory     ...      Under normal circumstances I would have the script capture the exit code with something like `RET=$?` and use it to decide how to proceed. This does not seem to work with the process substitution above. What's the correct procedure in cases like this? How can I capture the return code? Are there other more suitable ways to determine if something went wrong in the substituted process?


title: How can I install mysql on an angstrom distribution?

text: I tried using a different distribution (debian) but the rest of my application did not work. I've tried opkg install mysql-client and opkg install mysql- server however I get the error Unknown package for both.


title: Running assembly program in RHEL

text: I am new to system administration and we are trying to install QEMU emulator, GCC for ARM and GDB to communicate with the QEMU/ARM program being executed in RHEL. I was having troubles installing the software and I resolved it with the help of my previous question. Now, I believe I have installed all the required software in RHEL environment. However, to test the setup if it is working, I need to run the following command.               qemu-system-arm -S -s -M versatilepb -daemonize -m 128M -d in_asm,cpu,exec -kernel hello_world.bin ; gdb-multiarch --batch --command=hello_world.gdb      I believe before running the command I need to do something with the **startup.s** and **memmap** file. In the instructions manual for lab setup, I see the instruction as "Assemble the test program (startup.s)". I am not sure how to do this step. EDIT: The contents of **startup.s** are from this program.


title: Linux (Debian) web server advice

text: I'm at the start of a new company in which the main activity is building internet web apps. I was very familiar with linux 8-9 years ago, but since then, I've lost a lot of touch with it (couldn't remember basic stuff like `iptables`). I am trying to set up a web application server (I have chosen Debian). Do you have any practices/advices/recommendations for the setup of apache/ftp/mysql and the server in general. What apps to use (such as phpmyadmin for mysql administration ), etc. The server configuration is an Intel E5200 with 2gb RAM wich I belive is more than enough for a start-up company.


title: How to transfer files from Windows to Ubuntu on Virtualbox?

text: How should I transfer files from Windows to Ubuntu installed on Virtualbox? When I plugged in a USB, it only pops up in Windows. How can I see it in Ubuntu?


title: How do I know that my virtual guest is using VT-x?

text: I know my cpu supports VT-x, but how can I check that the KVM guest machine uses it? My Desktop is CentOS running a Windows 7 guest. I'm asking because.. the virtual Windows 7 says I'm using a XEON CPU.. but in reality my Desktop has a corei5 CPU **My question:** What is the KVM command for checking that a guest is using VT-x or not?


title: bash control statment for when an option flag is used

text: I trying to make control statement to check on a option flag is used or not? For -o output.file if is used I would like to make equal to variable OUTPUTSUM = OUTPUTFILE and if there no -o option use then I have it defaulted to relative path of the script? I just not sure how to go about checking for -o option? PSEUDO code               while getopts i:o:h OPTION     do          case $OPTION in              i)                  INPUTFILE=$OPTARG                  ;;          o)              OUTPUTFILE=$OPTARG                  ;;              h)                  usage              exit 1                  ;;              ?)                  usage                  exit                  ;;          esac     done          if [-o EXIST]; then              OUTPUTSUM = OUTPUTFILE     else        OUTPUTSUM = $SCRIPTPATH/SUMMARY     fi


title: What is the system-level effect of file permissions?

text: I know that `r` means read permission, `w` means write permission, and `x` means execute permission in the output of `ls -l`, like `-rwxr-xr-x`. But My question is what is behavior difference on operation system to this modes?   I mean what system does with read only file and what system does with writable file or how system does when it see an executable file? Or better to say: why are not all of files in one mode? I'm asking not about the differences of permissions for user, group, and others, please ignore that.   My question is about what the technical difference between executable mode and readable and writable mode. What is the difference between these modes on files access?


title: Hung system call

text: So I'm working with a custom kernel module that I'm writing a python front end for. The kernel module works, and it adds a framebuffer device file to `/dev/fb1`. I can read and write to it fine. I've been using python's `mmap` module to map the device buffer and that seems to work great. Now I'm trying to implement numpy, and I'm using numpy's memmap function which, my assumption is, should work similarly. The problem is that opening the device file using numpy's memmap function hangs the kernel (I think). This is what I'm doing to initially open the file               self.surface = np.memmap(dev, dtype=np.uint16, mode='r+', shape=(320,240))      The process hangs, and I can't kill python except through `killall python` which presumably leaves the file resource open. Any subsequent accesses to open the file again hang indefinitely, simply doing               f = open('/dev/fb1', 'r+b')      and I get this in dmesg               [ 1081.480104] INFO: task python2.6:2834 blocked for more than 120 seconds.     [ 1081.480109] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.     [ 1081.480113] python2.6     D 0000000100004eec     0  2834      1 0x00000004     [ 1081.480118]  ffff88020a175db8 0000000000000086 0000000000000000 0000000000015980     [ 1081.480122]  ffff88020a175fd8 0000000000015980 ffff88020a175fd8 ffff88022b69adc0     [ 1081.480127]  0000000000015980 0000000000015980 ffff88020a175fd8 0000000000015980     [ 1081.480131] Call Trace:     [ 1081.480142]  [<ffffffff81049b17>] ? mutex_spin_on_owner+0x97/0xc0     [ 1081.480148]  [<ffffffff81589477>] __mutex_lock_slowpath+0xf7/0x180     [ 1081.480151]  [<ffffffff8158935b>] mutex_lock+0x2b/0x50     [ 1081.480157]  [<ffffffff812f3bcf>] fb_release+0x1f/0x60     [ 1081.480161]  [<ffffffff81154825>] __fput+0xf5/0x210     [ 1081.480164]  [<ffffffff81154965>] fput+0x25/0x30     [ 1081.480168]  [<ffffffff81123d35>] remove_vma+0x45/0x90     [ 1081.480171]  [<ffffffff81126179>] do_munmap+0x309/0x3a0     [ 1081.480174]  [<ffffffff81126266>] sys_munmap+0x56/0x80     [ 1081.480180]  [<ffffffff8100a0f2>] system_call_fastpath+0x16/0x1b     [ 1081.480183] INFO: task ipython:2856 blocked for more than 120 seconds.     [ 1081.480185] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.     [ 1081.480187] ipython       D ffff880256e92018     0  2856   1841 0x00000000     [ 1081.480191]  ffff88022341fb58 0000000000000086 ffffffff81625f10 0000000000015980     [ 1081.480196]  ffff88022341ffd8 0000000000015980 ffff88022341ffd8 ffff88022b7c16e0     [ 1081.480200]  0000000000015980 0000000000015980 ffff88022341ffd8 0000000000015980     [ 1081.480204] Call Trace:     [ 1081.480207]  [<ffffffff81589477>] __mutex_lock_slowpath+0xf7/0x180     [ 1081.480210]  [<ffffffff8158935b>] mutex_lock+0x2b/0x50     [ 1081.480214]  [<ffffffff812f3cd8>] fb_open+0xc8/0x200     [ 1081.480217]  [<ffffffff8115657d>] ? cdev_get+0x2d/0xb0     [ 1081.480221]  [<ffffffff81156e6a>] chrdev_open+0x10a/0x200     [ 1081.480225]  [<ffffffff810878a1>] ? in_group_p+0x31/0x40     [ 1081.480228]  [<ffffffff81156d60>] ? chrdev_open+0x0/0x200     [ 1081.480232]  [<ffffffff811512c5>] __dentry_open+0xe5/0x330     [ 1081.480237]  [<ffffffff81260e4f>] ? security_inode_permission+0x1f/0x30     [ 1081.480240]  [<ffffffff81151624>] nameidata_to_filp+0x54/0x70     [ 1081.480244]  [<ffffffff8115e398>] finish_open+0xe8/0x1d0     [ 1081.480248]  [<ffffffff8116701f>] ? dput+0xdf/0x1b0     [ 1081.480251]  [<ffffffff8115f7f6>] do_last+0x86/0x460     [ 1081.480254]  [<ffffffff81161b2b>] do_filp_open+0x21b/0x660     [ 1081.480259]  [<ffffffff8112117f>] ? handle_mm_fault+0x32f/0x440     [ 1081.480263]  [<ffffffff8116d33a>] ? alloc_fd+0x10a/0x150     [ 1081.480266]  [<ffffffff81151069>] do_sys_open+0x69/0x170     [ 1081.480270]  [<ffffffff811511b0>] sys_open+0x20/0x30     [ 1081.480273]  [<ffffffff8100a0f2>] system_call_fastpath+0x16/0x1b      I guess my question is, can I manually kill the system call? Or somehow get the mutex unlocked? Or am I totally missing what the error is telling me. The weird thing is that even just the memmap call corrupts the framebuffer and writes garbage to my display. I'm guessing this is just numpy not working well with device files. **Update** : Tis is the output from ps -l. The first python is the one that originally ran the numpy `memmap` call (at least I'm fairly sure). The second ipython is after the first process hung running a simple plain python open call.               0 D  1000  2834     1  0  80   0 - 22101 fb_rel ?        00:00:00 python2.6     0 D  1000  2856  1841  0  80   0 - 15065 fb_ope pts/1    00:00:00 ipython


title: How to make an Ubuntu time zone change stick?

text: I'd like to reset the timezone through editing `/etc/timezone`. However, after I am done editing and save the file, the system time would not change accordingly. On the other hand, when I take advantage of the command `dpkg-reconfigure tzdata` to change the timezone, the time will change immediately. Plus, the `/etc/timezone` file is modified accordingly. Could someone please explain me what steps I could be missing after editing and saving the config file in order for the new time to take effect?


title: What is IFS in context of for looping?

text: I'm learning bash scripting right now. I was reading this thread: How to loop over the lines of a file? What is IFS? > With for and IFS:


title: Libraries crash after installing experimental version of libc6

text: My Debian system is not booting anymore after installing the experimental version of libc6. I've got this message on boot:               /sbin/init: error while loading shared libraries: libsepol.so.1:          cannot open shared object file: No such file or directory      What can I do to get this resolved? ![The error](http://i42.tinypic.com/5uh206.jpg) ![Error #2](http://oi42.tinypic.com/35a4s5z.jpg)


title: size option in find(version 4.4.2) does not understand kilo prefix

text: For some reason, `find` does not seem to accept kilobytes prefix:               T42 ~ # find /root/ /home/noc/ \( -type f -size -1k \) -exec grep -iH hangup {} \;     find: `/home/noc/.gvfs': Permission denied     T42 ~ # find /root/ /home/noc/ \( -type f -size -1000 \) -exec grep -iH hangup {} \;     /root/minicom.log:20130524 17:31:22 Hangup (0:00:00)     /root/minicom.log:20130528 14:49:39 Hangup (0:00:00)     /root/minicom.log:20130806 09:55:39 Hangup (0:00:00)     /root/minicom.log:20130806 09:55:43 Hangup (0:00:00)     /root/minicom.log:20130918 13:58:38 Hangup (0:00:00)     /root/minicom.log:20130918 13:58:38 Hangup (0:00:00)     /root/minicom.log:20131017 10:36:24 Hangup (0:00:00)     /root/minicom.log:20131017 12:44:28 Hangup (0:00:00)     /root/minicom.log:20131017 12:49:00 Hangup (0:00:00)     /root/minicom.log:20131017 12:49:00 Hangup (0:00:00)     /root/minicom.log:20131017 17:11:45 Hangup (0:00:00)     /root/minicom.log:20131017 17:11:45 Hangup (0:00:00)     /root/minicom.log:20131114 18:16:26 Hangup (0:00:00)     /root/minicom.log:20131216 12:36:34 Hangup (0:00:00)     /root/minicom.log:20131217 12:27:52 Hangup (0:00:00)     find: `/home/noc/.gvfs': Permission denied     /home/noc/gnupg/gnupg-2.0.20/g10/cpr.c:            raise (SIGINT);  /* nothing to hangup under DOS */     ^C     T42 ~ #      Am I doing something wrong or how should one use _size_ suffixes in `find`?


title: Download attachments in a URL redirect via Axel

text: Axel is not resolving URLs that redirect to another URL that has the file as an attachment. As you see, I'm getting 404 when I try to download this URL. (original site is replaced with example.com)               ~  ▶ axel https://eusa.example.com/zipstream/1581777.zip?tunnel=1&token=b7385bb62e3111e3ace1002481265109&storage=s09     [2] 767     [3] 768     Initializing download: https://eusa.example.com/zipstream/1581777.zip?tunnel=1     [1]   Exit 1                  axel https://eusa.example.com/zipstream/1581777.zip?tunnel=1     [3]+  Done                    token=b7385bb62e3111e3ace1002481265109     ~  ▶ HTTP/1.1 404 Not Found      The website documentations describe URL redirect as following: > First response is always a redirect. Location of the file is in ‘Location’ > header. The client must send a new GET request to the new location. Only > headers are shown.               HTTP/1.1 302 FOUND     Server: nginx     Date: Thu, 09 Feb 2012 15:58:53 GMT     Content-Type: text/html; charset=utf-8     Connection: keep-alive     Keep-Alive: timeout=60     Content-Length: 385     Location: http://s01.example.com/v2/files/26205116/download?oauth_token=4a63387841ce11e1a047001018321b64      goes to:               HTTP/1.1 200 OK     Server: nginx     Date: Thu, 09 Feb 2012 15:58:53 GMT     Content-Type: application/x-rar     Content-Length: 3190802     Last-Modified: Fri, 16 Sep 2011 11:42:13 GMT     Connection: keep-alive     Keep-Alive: timeout=60     Content-Disposition: attachment; filename="file.rar"     Accept-Ranges: bytes      `curl` is capable of downloading the URL. But `axel` gives me 404. I want to have Axel's multi-connection feature. How can I use `curl` to just resolve the URL and give downloading task to `axel`?


title: How to identify and remove invisible whitespace characters on gedit?

text: I want to remove unnecessary whitespace on my css file. I am using grep with the command as follows:               $ grep -rn "[[:space:]]$"      Surprisingly, it is returning a hit on every line in the file. I search for instances of `\t\n`, `\r\n` and `\n` but could not find anything. How do I go about identifying the invisible whitespace and remove it?


title: Teamviewer is deleted every time, when I install updates for Debian

text: I have the next problem: 1) I'm using:               Debian Release 7.6 (wheezy) 64-bit, Kernel Linux 3.2.0-4-amd64, GNOME     3.4.2 on my laptop.      2) My sources.list:               deb http://ftp.ru.debian.org/debian stable main contrib non-free     deb http://ftp.debian.org/debian/ wheezy-updates main contrib non-free     deb http://security.debian.org/ wheezy/updates main contrib non-free     deb http://ftp.de.debian.org/debian wheezy-backports main contrib     #Third Parties Repos     #Debian Multimedia     deb http://www.las.ic.unicamp.br/pub/debian-multimedia/ stable main     deb http://dl.google.com/linux/chrome/deb/ stable main      As you can see, I use the "stable" distribution. 3) I downloaded 'teamviewer_linux_x64.deb' package and installed it using this command:               sudo dpkg -i teamviewer_linux_x64.deb      Before using this command, I went to the directory, where this package was saved. Everything works fine(including Teamviewer) till next Software update. After I did Software update and then power off/reboot/hibernate/suspend my laptop, Teamviewer is missing(I can't find it using Search line or in Applications, look at an image below, now Teamviewer is shown). Last time it was yesterday, I did Software update and this morning I didn't find Teamviewer and installed it again. I've reinstalled Teamviwer already 5 times, but I want to understand what is happening or what I'm doing wrong? ![my desktop](http://i.stack.imgur.com/LzqGr.jpg)


title: Nvidia driver for Debian

text: Is there a "real solution" or driver for Nvidia Optimus graphic cards? I tested a lot of alternatives but no success. I know a lot of users face the same problem with Debian or Ubuntu-family. This solution does not work.


title: OpenWrt: Find neighbors knowing their MAC address

text: I have an Open Mesh access point connected to the same router (an Aerohive BR100) than an Axis camera. I would like to automate the discovery of the camera's IP from inside the Open Mesh sensor, knowing the camera's MAC address. This bad Ascii art shows how the things are cabled:               +================= Aerohive router ================+     |    ____    ____    ____    ____          ____    |     |    [..]    [..]    [..]    [..]          [..]    |     |_____||______||______________||____________||_____+           ||      ||              ||            ||          Axis   OpenMesh     borrajax-pc        DSL         camera  access pt.   (my laptop)     connection      The router where camera and OpenMesh devices are connected to assigns IP addresses in the shape: _10.200.255.XXX/24_ If I unplug my laptop (borrajax-pc) from the Aerohive router and connect it to the WiFi network provided by the Open Mesh sensor, my IP becomes 10.223.176.150 (which is ok, since it is an IP provided by the Open Mesh sensor, and that's my router/gateway... my _boss_ , after all). Anyhow... at this point, I can ssh into the sensor itself (as I said it's my gateway):               borrajax@borrajax-pc:~$ ssh root@10.223.176.1     root@10.223.176.1's password:                BusyBox v1.19.4 (2013-01-08 11:35:01 UTC) built-in shell (ash)     Enter 'help' for a list of built-in commands.            _______                          ________             __      |       |.-----.-----.-----.  _  |        |.-----.----|  |__      |   -   ||  _  |  -__|     | |_| |  |  |  ||  -__|__--|     |      |_______||   __|_____|__|__|     |__|__|__||_____|____|__|__|               |__|  http://www.open-mesh.com ---------------------      (c) Open-Mesh, Inc. All rights reserved.      firmware-ng: fw-ng-r443      Powered by these open source projects:           http://www.openwrt.org    http://kokoro.ucsd.edu/nodogsplash      http://coova.org          http://www.open-mesh.org      -------------------------------------------------------------     root@BorrajaX_Test_Sensor:~#       But when I'm inside the sensor, none of its interfaces have an address like the ones the external Aerohive router is providing (10.200.255.XXX/24), so I can't see my neighbors in one hop (or jump). Just in case it's helpful, here's a list of interfaces with its assigned IP address:               root@BorrajaX_Test_Sensor:~# ifconfig     bat0          bat0.0       bat0.1       bat0.2     inet addr:5.17.32.120  Bcast:5.255.255.255  Mask:255.0.0.0     bat0.3     br-lan1     br-lan2    inet addr:192.168.83.2  Bcast:192.168.83.255  Mask:255.255.255.0     br-meship  inet addr:10.223.168.1  Bcast:10.223.171.255  Mask:255.255.252.0     br-priv    inet addr:10.223.172.1  Bcast:10.223.175.255  Mask:255.255.252.0     br-pub     inet addr:10.223.176.1  Bcast:10.223.179.255  Mask:255.255.252.0     eth0      eth1      lo         inet addr:127.0.0.1  Mask:255.0.0.0     mesh0      mon0          pub0      As you can see, none of the IPs looks like the ones provided by my router ( _10.200.255.XXX_ ) Now, if I find the camera's IP through other ways, and I find out said IP is, for instance, _10.200.255.204_ this is what happens within the sensor.               root@BorrajaX_Test_Sensor:~# traceroute 10.200.255.204     traceroute to 10.200.255.204 (10.200.255.204), 30 hops max, 38 byte packets      1  192.168.83.1 (192.168.83.1)  2.265 ms  0.608 ms  1.378 ms      2  10.200.255.204 (10.200.255.204)  3.227 ms  1.265 ms  1.092 ms      So it hops through the _br-lan2_ interface and "sees" it properly. I can even ping it.               root@BorrajaX_Test_Sensor:~# ping 10.200.255.204     PING 10.200.255.204 (10.200.255.204): 56 data bytes     64 bytes from 10.200.255.204: seq=0 ttl=63 time=2.788 ms      But the ARP table doesn't register the mapping MAC <--> 10.200.255.204 (I'm guessing because it's jumping once through 192.168.83.1) Is there any way of _arping_ a "neighbor" when that neighbor is connected to the same router than the Open-Mesh device itself? Also, as I mentioned, the IP the Aerohive router assigns to the Open-Mesh device seems to become hidden somehow inside the Open-Mesh device. Is there any way of overcome this "hidden-ness"? * * * PS: If I do the whole thing from my laptop, it works fine: 1st: Verify that my IP belongs to the range assigned by my router (10.200.255.XXX)               borrajax@borrajax-pc:~$ ifconfig eth0     eth0      Link encap:Ethernet  HWaddr 5c:f9:dd:52:10:78                 inet addr:10.200.255.205  Bcast:10.200.255.255  Mask:255.255.255.192                   [ . . . ]      2nd: Check the arp table:               borrajax@borrajax-pc:~$ arp -n     Address                  HWtype  HWaddress           Flags Mask            Iface     10.200.255.193           ether   e0:1c:41:30:ea:40   C                     eth0      No camera!! 3rd: fping to the whole 10.200.255.XXX subnetwork:               fping -g 10.200.255.1/24     10.200.255.193 is alive     10.200.255.204 is alive     10.200.255.205 is alive     ICMP Host Unreachable from 10.200.255.205 for ICMP Echo sent to 10.200.255.194     ICMP Host Unreachable from 10.200.255.205 for ICMP Echo sent to 10.200.255.19     [ . . . ]      4rd: Check the arp table again:               borrajax@borrajax-pc:~$ arp -n | grep -v "incomplete"     Address                  HWtype  HWaddress           Flags Mask            Iface     10.200.255.204           ether   00:40:8c:e3:df:aa   C                     eth0     10.200.255.193           ether   e0:1c:41:30:ea:40   C                     eth0      Tadaaaa!! _10.200.255.204 ether 00:40:8c:e3:df:aa_ is the camera


title: HPUX setacl leaves uid behind

text: I have a shell script that I execute after uninstalling a web application. The script is meant to clean up permissions that were needed during the execution of the application. `find /opt/path -exec setacl -d user:myUser {} ';'` After this executes and the acl is removed I am left with an acl that looks as follows `user:101:--- /opt/path` How can I properly call `setacl` to remove the user without leaving behind a uid?


title: Skip search and replace after a heading in Vim

text: I have to replace a pattern, but I don't want to replace it after a particular word. This is my program:               :vnoremap   ::silent! call Bib()          function! Bib()        %s/\s*\n*{\\&}\s*\n*/ /g        %s/\([A-Z]\)\.\([A-Z]\)\./\1\. \2\./g        "%s/\(\w*\-\w*\|\w*\),\s*\n*\([A-Z]\)\./\r\\snm{\1}\r\2\./g           endfunc I don't want this search pattern after a particular a word: "References"


title: How do I check active crons?

text: I'm trying to hunt down a cron job (or the equivalent) which I know is running, but I can't find it in the default cron files for my system (FreeBSD / Linux / BSD). How can I tell which ones are actually being initialized?


title: Run multiple rsync's at once?

text: I'm moving over about a million of files (800GB, containing) multiple system backups. And it's only running at ~9MB at a time, often. Enough bandwidth, since it can run up to about 50MB/s. However, sometimes it doesn't. So I was wondering if I can split the source into multiple directories, so I can have multiple rsync's running at once. And in such way so it speeds up the process. Note: I have to run the command via the Terminal on Mac. Is such possible? update: The main directory consists of 2 subdirectories, so we are speaking of just two Rsync processes running at once, each processing hundreds of thousands of files. :)


title: messages appearing when not desired

text: I have SSH access to a CentOS box and I have a strange behavior of that box, I have never seen before. Lets say I am editing a file with vi or displaying tail -f of a file. Every time the server has some message to show, this message appears from the top, erasing the lines I was seeing from the file I was editing or tailing. It is like console and terminal were combined over the same window. For example: if I am editing a file with vi and I check my emails using a client, I see a dump of lines showing that I am connecting to the box and these lines cover the lines I was seeing before. How do I stop this? thanks


title: Problems to install nginx-full on debian 8

text: I have some problems to install nginx pkg (nginx-full) on debian jessie               # apt-get install nginx-full     Reading package lists... Done     Building dependency tree            Reading state information... Done     The following extra packages will be installed:       nginx-common     Suggested packages:       fcgiwrap nginx-doc     The following NEW packages will be installed:       nginx-common nginx-full     0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.     Need to get 510 kB of archives.     After this operation, 1.271 kB of additional disk space will be used.     Do you want to continue? [Y/n]      Get:1 http://debian.c3sl.ufpr.br/debian/ jessie/main nginx-common all 1.6.1-1 [83,6 kB]     Get:2 http://debian.c3sl.ufpr.br/debian/ jessie/main nginx-full amd64 1.6.1-1+b1 [427 kB]     Fetched 510 kB in 1s (266 kB/s)          Selecting previously unselected package nginx-common.     (Reading database ... 170540 files and directories currently installed.)     Preparing to unpack .../nginx-common_1.6.1-1_all.deb ...     Unpacking nginx-common (1.6.1-1) ...     Selecting previously unselected package nginx-full.     Preparing to unpack .../nginx-full_1.6.1-1+b1_amd64.deb ...     Unpacking nginx-full (1.6.1-1+b1) ...     Processing triggers for man-db (2.6.7.1-1) ...     Setting up nginx-common (1.6.1-1) ...     Setting up nginx-full (1.6.1-1+b1) ...     Job for nginx.service failed. See 'systemctl status nginx.service' and 'journalctl -xn' for details.     invoke-rc.d: initscript nginx, action "start" failed.     dpkg: error processing package nginx-full (--configure):      subprocess installed post-installation script returned error exit status 1     Errors were encountered while processing:      nginx-full     E: Sub-process /usr/bin/dpkg returned an error code (1)          # systemctl status nginx.service     nginx.service - A high performance web server and a reverse proxy server        Loaded: loaded (/lib/systemd/system/nginx.service; enabled)        Active: failed (Result: exit-code) since Sex 2014-09-05 11:39:46 BRT; 1s ago       Process: 2972 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)          #journalctl -xn     No journal files were found.      Someone know how to fix it?


title: screenshot only the active monitor on ubuntu/debian

text: I would like to do screenshots of the active monitor (the one on which my mouse is) or screenshots of always the same monitor ; and not the two monitors at the same time. Is there any command/option that would let me do this? I'm not interested in cropping each of my screenshot, even with a script (since I'm using them in parallel and I do a lot of them), neither grabing a selected area, (since I need them to be taken from the same place, with the same size). For now, I unplug my second monitor but this is very uncomfortable.


title: Fetchmail doesn't recognize my procmail binary

text: **My problem:** after running `fetchmail` I get this error:               /Users/User/.fetchmailrc:7: syntax error at -d      My `.fetchmailrc` file looks like this:               set daemon 300     set nobouncemail     set invisible     poll pop.gmail.com withi proto POP3     user 'my-email@address' there with password 'my-password' is 'my-mac-user' here     options keep ssl     mda "/usr/bin/procmail -d %T"*      I have `procmail` installed on my Mac. **My question:** How can I solve this problem?


title: True HTTPS? How?

text: /Using Google Chrome/ if i visit: https://secure.wikimedia.org/wikipedia/en/wiki/File:Nokota_Horses_cropped.jpg then the: http://upload.wikimedia.org/wikipedia/commons/d/de/Nokota_Horses_cropped.jpg is on a HTTP-only server. So how could i be 100% sure, that if i see the "HTTPS" in the URL bar of my browser that means the full content of the website is really encrypted? In my example the pictures on wikipedia are not using encryption(?), so a sniffer could know that i'm visiting a wikipedia site about horses. Should i install a proxy (e.g.: privoxy) that will assure that no HTTP-only elements will load on a "HTTPS site"? Thanks..


title: Can you tell a window to spawn behind others?

text: I have a script that recompiles and relaunches a software project I am building in linux. However, I don't usually want to see my program's window immediately after it has launched, as I want to keep my keyboard focus on my vim window. Normally, my program launches, is automatically given focus, and appears on top of the other windows on my workspace. Is it possible in linux to launch a program but not have it steal focus, and not have it appear on top of all other windows? Note: If it matters, I am running Fedora 13, GNOME, compiz, and use Emerald themes.


title: Serve Internet to remote machine via SSH session?

text: The machine via which I'm SSHing to the remote/host machine (same network/LAN) has access to the Internet but the host doesn't. Running updates and installing packages on the host gets quite inconvenient because then I have to start a proxy locally and then configure the remote machine to use it. So I was wondering if there is a easier way of doing this via, maybe, SSH or something else? I have a realization of the complexities that lie within, but was curious to know. Using `plink` through Emacs (if it matters).


title: What command do I use to spin up a "power up in standby" drive?

text: I have 8 drives in my server connected via PATA. The drives are set for no- spin via jumpers on the drive. `hdparm -I` says > powers-up in standby; SET FEATURES subcmd spins-up What command do I use to spin the drives up?


title: When do inode modification times change?

text: I am currently reading _UNIX by Bach_. I encountered a problem while reading the section on inodes in the 4th chapter. A file modified time is shown as `1:45pm` but the inode modified time is shown as `1:30pm`. How is this possible? When a file is modified, its inode is also modified, so the inode modification time should be more recent. Are there restrictions on when inode modification times change?


title: Qemu & AIX 6.1 - what am i missing?

text: I have a Fedora 14 i386 / T7100 C2D HP notebook. I need to run e.g.: AIX 6.1 on it for testing purposes. I installed a VirtualBox on this Fedora machine. I installed a guest os in the VirtualBox. It's again, a Fedora 14 :P Ok! here comes the fun part:               dd if=/dev/zero of=aixtest.img bs=1 count=1 seek=4294967292     qemu-system-ppc -prom-env 'auto-boot?=true' -hda aixtest.img -m 512 -cdrom aix61/IBM.AIX.v6.1-XXXXXXXX-DVD1.iso -boot d      But the only thing I see is this: ![](http://img251.imageshack.us/img251/7103/whereis.png) A couple of new lines created (before i type "test-all" command) and i can't see the aix installer :O< How could I install/run a fresh version of AIX in e.g. Qemu? Is it possible? Or e.g.: only AIX ~2 will boot only?


title: Linux Mint 14.1 with Cinnamon - Mouse Sensitivity not Working

text: 64-bit if that matters. My mouse sensitivity slider does nothing, but my acceleration slider works. I'd like acceleration off and sensitivity how I like it, but it refuses to work. I have tested the option on two computers, and both do not change the sensitivity. Any help?


title: Which package currently provides nmblookup command on Gentoo?

text: I currently installed samba on my gentoo server with following               USE="acl client fam python upcall winbind" emerge -1 samba      But could not find the nmblookup utility after install. The samba package installed was version 3.6.18.


title: bash: get array name from parameter to function with saving indexes

text: I have a function to show index of chosen element. I'm trying to pass a parameter to function to use it as an array name. This works:               getIndex() {     arrname=$1[@]     b=("${!arrname}")     index=1; while ((index<${#b[@]})); do         if [[ "${b[$index]}" = "$VALUE" ]]; then             echo "index is $index"; return         fi               ((index++)); done          }      But the array, whose name I pass to this function, has index 1 as index of first element (I need this to have indexes similar to line numbers, from which I get patterns in the array:               a=1     while read line; do         if [[ $line =~ ^[0-9] ]]; then             avg[$a]=`echo $line | awk '{print $6}'`             ((a++));             fi      And if I'm running function getIndex() the first element of the array starts from index 0. So, the question is: Is there any way to pass array name in parameter to function with saving indexes of array? Or maybe I just need to forget about it and add +1 to function answer.


title: Screen brightness always maximum when logoff or restart

text: I am using Fedora 13 and whenever I Restart or Logoff on my laptop. The screen brightness resets to its maximum value. I am not aware of this problem. Can anyone tell me why this is causing and what is the solution for keeping it's to a constant value at all time?


title: How to change mountpoint name?

text: This question has been asked before, but because I have a few more doubts about the process. I am working in ubuntu, this is what `df -h` shows:               Filesystem             Size  Used Avail Use% Mounted on     /dev/md0               423G  337G   65G  84% /     tmpfs                   12G     0   12G   0% /lib/init/rw     udev                    12G  188K   12G   1% /dev     tmpfs                   12G     0   12G   0% /dev/shm     /dev/md1               917G  527G  344G  61% /backup      The problem is that now we are using the /dev/md1 for more than just backups, and we have decided to change its name from /backup to /drive2 I want all the content to stay where it is, the only thing that has to change is the name of the drive mountpoint. Please note however that I have certain symbolic links from the /dev/md0 to the /dev/md1, and they where built using /backup as a reference folder. Will I have to change each symbolic link or will the change be reflected automatically? Could you please explain the commands necessary and the files to edit?


title: xterm login prompt not gnome login prompt

text: instead of loading `gdm3` when i turn my pc on, i want to load into an xterm with just a window manager (no desktop environment) and i want the xterm to have the login prompt as its first action so that i can login as my user within the xterm. i have the following info in my .xinitrc file:               $ ls -la .xsession     lrwxrwxrwx 1 peter peter 8 Oct  7 18:25 .xsession -> .xinitrc     $ cat .xinitrc      #!/bin/bash     [[ -f ~/.Xresources ]] && xrdb -merge ~/.Xresources     xterm -maximized &     exec mutter      but this only runs once i login through gnome. i really just want to turn off gnome and run an xterm instead. i'm guessing i will need to modify my `/etc/X11/Xsession` or my `/etc/X11/xinit/xinitrc` file to get rid of the `gdm3 start` and replace it with something. what should i add/remove from these files? i want to bring up a login prompt within the xterm as the first action. i'm on debian 7 and currently have gnome3 desktop environment with mutter window manager


title: Get last set of non-empty lines

text: I'm running a cron job which should get only the last result of `iostat -d 1 2`. This requires some parsing: What is the simplest way to get either the **last set of non-empty lines** from standard input to standard output if the length of each set is unknown? Bad/non-working solutions:   * `tail` since I'd still need to count the number of lines in the last set. `iostat -d 1 2 | tail -$(echo "$(iostat -d 1 2 | wc -l) / 2" | bc)` depends on equal set sizes.   * `split`/`csplit` since they output to file, and keep the useless part of the data.   * `iostat -d 1 2 | sed '1,/^$/d' | sed '1,/^$/d'` works only in this special case, since it gets the third set of non-empty lines, but also includes any trailing newlines.   * `iostat -d 1 2 | tac | sed '1,/^$/d' | sed '/^$/q'` is a slightly better hack: Reverse and print the first set. However, since `iostat` outputs an empty line at the end, we first remove that then print until the next empty line in the reversed output. Other commands might output any number of newlines at the end, so it's not a general solution. Reverse again if you want to keep the original sequence.   * `grep -P` with `\Z` seems to only detect EOL, not EOF.


title: monitor and watch multiple systems continuously

text: As part of my work and collaborations and universities I've attended, I have access to many machines, about 13 or so. These are all Linux machines and I could ssh using my key-pair. There are a bunch of stuff running on these machines from time to time and also these machines are shared among users. Is there a utility which could help me monitor these systems or something like take a stock of the systems as to what is going on on them. I am looking for something lightweight which just needs a list of machine ids and a very minimal installation and could fetch me this information every morning when I log into my laptop.


title: Why is file ownership inconsistent between two systems mounting the same NFS share?

text: I have one IBM AIX server (serverA) which is connected to the san storage. I have created a volume group and also file system (jfs2) and mounted to directory /profit. After that I created a NFS share for that directory and started the NFS daemon. Over at another server, which is IBM AIX also (serverB), I created a mount point /profit and mounted the nfs share from serverA to serverB using the below command: mount 192.168.10.1:/profit /profit On serverB, I am able to access the directory and list the files in it. But the strange thing is, on serverA, the directory and files are under the oracle user ownership. But in serverB, i see them as a different user. When I touch a file in that directory at serverB, on serverA, I see it as another user id. Any clue how I can fix this? Below is the file listing from serverB               $ ls -l     total 0     -rwxrwxrwx    1 root     system            0 Mar 16 15:00 haha     -rwxrwxrwx    1 radiusd  radiusd           0 Mar 16 15:19 haha2     -rwxrwxrwx    1 radiusd  radiusd           0 Mar 16 15:31 haha3     -rw-r--r--    1 oracle   oinstall          0 Mar 17 2011  hahah3     drwxrwxrwx    2 radiusd  radiusd         256 Mar 16 14:40 lost+found      On serverA it looks like below:               # ls -l /profit     total 0     -rwxrwxrwx    1 root     system            0 Mar 16 15:00 haha     -rwxrwxrwx    1 oracle   dba               0 Mar 16 15:19 haha2     -rwxrwxrwx    1 oracle   dba               0 Mar 16 15:31 haha3     -rw-r--r--    1 10       sshd              0 Mar 17 16:01 hahah3     drwxrwxrwx    2 oracle   dba             256 Mar 16 14:40 lost+found      Below is the /etc/exports file from serverA               # more /etc/exports     /profit -vers=3,sec=sys:krb5p:krb5i:krb5:dh,rw      Thanks.


title: What will at actually execute?

text: If I do `atq` I can see a list of what is scheduled via `at` command. But how do I see what is the command that will actually run?


title: How do I recover a broken software RAID5 array?

text: Ack, I think I screwed up bad. I had a power failure on a RAID5 array which caused the metadata to be inconsistent between drives. I followed the advice here _except_ a case of fat fingers caused me to run the --create command without a missing parameter. Running the Perl script that permutates through the various combination leads me unable to mount an array. I have several questions:   1. Am I totally screwed here, is there anything else I can do? The drives themselves seem to be fine. Does the missing parameter blow out any chance I have of recovering my data?   2. Is there anyway I can get _some_ data, but mounting the drives? I'm not that familiar with how data is striped across disks so I don't know if it possible to recover some files.


title: Help with installation of ROOT, PATH variable is getting deleted

text: I am trying to install ROOT which I need for work. I run Ubuntu 10.04 64 bit on virtualbox on my laptop. After extracting the tarball, I try to source the .sh file using the command as suggested in the README $ . pathname/root/bin/thisroot.sh It shows me the following error:               $ . /home/username/Downloads/root/bin/thisroot.sh          bash:/home/username/Downloads/root/bin/drop_from_path: No such file or directory     bash:/home/username/Downloads/root/bin/drop_from_path: No such file or directory     bash:/home/username/Downloads/root/bin/drop_from_path: No such file or directory     bash:/home/username/Downloads/root/bin/drop_from_path: No such file or directory     bash:/home/username/Downloads/root/bin/drop_from_path: No such file or directory     bash:/home/username/Downloads/root/bin/drop_from_path: No such file or directory     bash: man: No such file or directory     Command 'dirname' is available in '/usr/bin/dirname'     The command could not be located because '/usr/bin' is not included in     the PATH environment variable.     dirname: command not found     /usr/bin/env: bash: No such file or directory     Command 'grep' is available in '/bin/grep'     The command could not be located because '/bin' is not included in the     PATH environment variable.     grep: command not found     Command 'grep' is available in '/bin/grep'     The command could not be located because '/bin' is not included in the     PATH environment variable.     grep: command not found      The result of this is that it somehow deleted the PATH, because now I cannot do anything else from the command line. For example:               $ vi README     Command 'vi' is available in '/usr/bin/vi'     The command could not be located because '/usr/bin' is not included in     the PATH environment variable.     vi: command not found          $ clear     Command 'clear' is available in '/usr/bin/clear'     The command could not be located because '/usr/bin' is not included in     the PATH environment variable.     clear: command not found      I have an Ubuntu 11.04 on my desktop at home, where this installation went smoothly. I also tried this on my office mac, but I don't know what is happening here.


title: /etc/hosts in debian resets itself on reboot

text: I've been having a problem where when our vps provider decides to restart the server (running Debian 5.0.8), the server fails to remember changes to `/etc/hosts`. All I need is an database alias that is used for the web applications on the server which points to `127.0.0.1` (`localhost`). I want it to look like this:               # The following lines are desirable for IPv6 capable hosts     # (added automatically by netbase upgrade)          ::1     ip6-localhost ip6-loopback     fe00::0 ip6-localnet     ff00::0 ip6-mcastprefix     ff02::1 ip6-allnodes     ff02::2 ip6-allrouters     ff02::3 ip6-allhosts               127.0.0.1 localhost.localdomain localhost webservice database     # Auto-generated hostname. Please do not remove this comment.     XXX.XX.XXX.XX xxxxxx.net.au  xxxxxx www.xxxxxxx.net.au xxxxxxx      However whenever there is a reboot it resets itself to:               # The following lines are desirable for IPv6 capable hosts     # (added automatically by netbase upgrade)          ::1     ip6-localhost ip6-loopback     fe00::0 ip6-localnet     ff00::0 ip6-mcastprefix     ff02::1 ip6-allnodes     ff02::2 ip6-allrouters     ff02::3 ip6-allhosts               127.0.0.1 localhost.localdomain localhost webservice     # Auto-generated hostname. Please do not remove this comment.     XXX.XX.XXX.XX xxxxxx.net.au  xxxxxx www.xxxxxxx.net.au xxxxxxx      without the database, and I have to manually change the file to get things to work. This has been happening for awhile and has become a nuisance, but I can't seem to find a way to get changes to stick. Anyone know what to do?


title: What does rpm -H do?

text: I came across someone's RPM command that wrote:               rpm -ivH ....      and then noticed that option `-H` is not documented anywhere. Command `rpm -H` no longer works with newer version of rpm, however it runs successfully under rpm version 4.8, produces no output and then exits. So what is the command `rpm -H` used to do? System is a Scientific Linux 6.1:               $ rpm --version     RPM version 4.8.0     $ rpm -H     $ echo $?     0


title: Arch Linux KMS loading i915 early tty doesn't show

text: I am on Arch Linux x64, on EFI, Nvidia Optimus with bumblebee (so i am using intel driver) and I am trying to show a splash screen at boot. I have chosen plymouth (other than being the more famous it's also the only one that compiled just out of the box without further research). Plymouth has different way to work. Since i am on i915 open source driver, it seemed obvious that i had to choose KMS. The problem is, on Arch Wiki it's written that you have to initialize KMS in early boot stage, writing:               MODULES="i915"      on the top of `/etc/mkinitcpio.conf` However, loading KMS in early stage causes all tty not to start. Fortunately, gnome starts, but if i do `CTRL+ALT+F2` (and of course with all the other f keys) nothing happens, I just see a blinking underscore. It doesn't let me log in. Also plymouth doesn't show. And , both during boot and shutdown, I see 3 little % each one followed by one square at the center of the screen. Pretty strange. Anyone got any clue? Or how do I use plymouth with EFI?


title: combine text files column-wise

text: I have two text files. The first one has content:               Languages     Recursively enumerable     Regular      while the second one has content:               Minimal automaton     Turing machine     Finite      I want to combine them into one file column-wise. So I tried `paste 1 2` and its output is:               Languages   Minimal automaton     Recursively enumerable  Turing machine     Regular Finite      However I would like to have the columns aligned well such as               Languages               Minimal automaton     Recursively enumerable  Turing machine     Regular                 Finite      I was wondering if it would be possible to achieve that without manually handling? Thanks and regards! * * * Added: Here is another example, where Bruce method almost nails it, except some slight misalignment about which I wonder why?               $ cat 1     Chomsky hierarchy     Type-0     —          $ cat 2     Grammars     Unrestricted          $ paste 1 2 | pr -t -e20     Chomsky hierarchy   Grammars     Type-0              Unrestricted     —                    (no common name)


title: ral0 malfunctioning

text: OpenBSD 4.9 using a ral card, RT2560 For some strange reason it stopped functioning, `ifconfig ral0` shows all the network information and network active, but no real connection. I keep getting DHCP requests and other built in tests repeating for the better part of 2-3 minutes before giving up. It normally starts with "ral0 no link......" I've tried rebooting, clearing the network information on `ifconfig`, and remaking the `hostname.ral0` file to no avail:               dhcp nwid (name) wpakey "(pass)"


title: How to replace the content of specific column with awk?

text: Given there is 40 columns in a record. I want to replace 35th column so that the 35th column will be replace with the content of 35th column and a "$" symbol. What came up my mind is like:               awk '{print $1" "$2" "...$35"$ "$36...$40}'      I works but because it is infeasible when the number of column is as huge as 10k. I need a better way to do this.


title: How do I safely perform the below changes to network parameters on Solaris 10?

text: I need to change and test some TCP/IP network parameters on a Oracle Solaris 10 as a possible workaround for a bug in 'Oracle Hyperion EPM 11.2.1.0' in the development environment. I am not a Solaris/UNIX expert so would appreciate any guidance to identify the correct parameters and also it would be very helpful if you could tell me the possible impact of the changes and how I could have the admin support rollback the changes.   1. I need to decrease the time wait before closing the sockets. I already have the corresponding UNIX command: `$ echo 3 > /proc/sys/net/ipv4/tcp_fin_timeout`   2. I need to check if the System is preventing the 'Oracle Hyperion EPM' application from using a large number of sockets. How do I check the port range and modify it? The UNIX command for it would be: `$ echo "1025 65535" > /proc/sys/net/ipv4/ip_local_port_range` I am advised that I need to make these changes as root and execute the following UNIX command for applying the changes: `$ /etc/rc.d/init.d/network restart` Kindly guide me to identify which are the corresponding Solaris commands. Thanks. **References:**   1. I looked at the parameters in `$ ndd /dev/tcp \?`   2. http://docs.oracle.com/cd/E19082-01/819-2724/6n50b07lr/index.html   3. http://www.informit.com/articles/article.aspx?p=101138&seqNum=6


title: What are all the mandatory content of the boot partition?

text: While studying about booting an Android on a board, I have learnt that MLO (X-loader), U-Boot and `uImage` are necessary to boot the Android on the board. But I wondered that when I have come to know about that, the IMX53quickstart Board does not need MLO to boot an Android on it.   1. How can it possible? How can the board boot without MLO?   2. Does this board have any special feature? What is that?   3. If so, why another board couldn't have this feature?   4. Can we implement this feature on all board?


title: Incremental backup of postgresql database

text: We run a database server running PostgreSQL with database size of around 130GB growing at a rate of 500MB per day. We use HP Data Protector software to take backups of the database. The issue here is that our database is on a GFS mounted partition and the current backup software license does not facilitate taking backups from GFS, NFS mounted partitions. So, as a workaround, we planned to copy the database to a local partition using `pg_dump` utility and take backups from the local partition using data protector software. But I am not sure whether we can take incremental backups using `pg_dump`. Full backup everyday is not possible for us. Please suggest steps for taking incremental backup of a PostgreSQL database.


title: What would I get when sudo a kernel-destructive program?

text: It suddenly comes to me how easy it will be for a _sudoer_ to crash the kernel, so I tried something like this:               #include<stdio.h>          int main(){         printf("hello world");         int a;         printf("%p", &a);         int *p = (int*)0xffff000000000000; //x86_64, somewhere in the kernel space         printf("%p:%d", p,*p);         *p = 1;         printf("%p:%d", p,*p);     }      Understandably, without `sudo`, running the program turns out a segment fault. **However** , I got **NOTHING** when execute it via `sudo ./a.out`! Even the `hello world` in first line is suppressed without any error or warnings at all. Can someone explain what's happening?


title: Install libxcb from source

text: I try to install libxcb from source, but I have an error, I do not understand why, this the error:               configure: error: Package requirements (pthread-stubs xau >= 0.99.2) were not met:          No package 'xau' found      I have installed from source pthread-stubs and proto-xcb-proto This is to install `qtile`. At the moment I use Debian wheezy but I will soon use jessie.


title: Is there a uniform way to discover information about devices?

text: **UPD** : Changed question title from `manage devices` to `discover information about devices` One of the frequent thing I do is look up info about devices on my systems. And I am constantly find myself confused about various different commands on Linux to query available disks, network adapters, graphics cards etc. For example, if I need to query all disk drives available, I do:               ls -la /dev/disk/by-id      If I need to query all network cards available, I do:               ls -la /sys/class/net      Is there any single point to query all device ids by type? Maybe there was initiative to unify handling of devices info and make it discoverable/accessible, but it failed? History of the question in order of appearance:   1. /dev/disk/ lists disks, why /dev/net/ doesn't list network interfaces?   2. Why are network interfaces not in /dev like other devices?


title: How to disable a usb sound device with udev

text: How can I disable USB device by Vendor ID? So I have:               [root@piotr ~]# lsusb     Bus 001 Device 002: ID 058f:9254 Alcor Micro Corp. Hub     Bus 001 Device 003: ID 0d8c:000c C-Media Electronics, Inc. Audio Adapter     Bus 001 Device 004: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)     Bus 002 Device 004: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB     Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub     Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub     Bus 002 Device 006: ID 0bc2:3320 Seagate RSS LLC SRD00F2 [Expansion Desktop Drive]      I want to disable               Bus 001 Device 003: ID 0d8c:000c C-Media Electronics, Inc. Audio Adapter      I need this unit in Windows environment but it disturb me Skype input (and only Skype). As temporary solution I just included snd_usb_audio in modprobe blacklist. But it is only workaround. Or, (maybe better) is it possible to exclude this particular USB device from udev rules? But in /usr/lib/udev/rules.d there is not definition for this device. I mean about VendorID. So my questions are: Why it is working at all and can be seen by ALSA? How can I exclude such VendorID and ProductID fron udev rules? Any idea wanted


title: Seemingly Inconsistent Behavior for "ln" & "ln -s"

text: As we all know, the `ln` command creates a link, with the default being a hard link and the `-s` option creating a symlink. The general syntax is `ln [-s] OLD NEW`, where OLD is the file you are linking to and NEW is the new file you are creating. Hard links can not be created for directories, as a hard link could be created between folders inside each other & I suppose computers do not yet have the resources to check for this without a SERIOUS slowdown. When creating the link, the path of both files must be written out, and can be absolute or relative. You can mix relative & absolute filepaths, i.e. have a relative path for the new file/folder & an absolute path for the old one. When creating a hard link with a relative path, the paths of both files are relative to the current folder, while for a symbolic link the path of the linked-to file/folder is relative to its parent folder but the path of the old file/folder is relative to the current folder. Why this is is "relative" to my question. For example, say we am in the HOME folder, `/home/user`, also known as `~`, and create 2 folders, `new` and `new2`, with the file `file` in the folder `new`. If we try `ln -s new/file new2/file`, the result is a broken link from `~/new2/file` to the currently nonexistent `~/new2/new/file`. However, if we instead run `ln -s ../new/file new2/file`, we get the expected result, which is a link from `~/new2/file` to `~/new/file`. So, my question: Why is the file path for the OLD file/folder of a symlink relative to its parent, while the other 3 paths (hard link OLD, NEW files, symlink NEW file/folder) are relative to the current folder? All this is on Fedora, but I'm sure it applies to most UNIX-based OS's. **EDIT** E Carter Young seems to hit the nail on the head with regard to my 2nd question (as well as my 1st question, which was wrong anyway). It seems that for a symbolic link, the target doesn't have to exist yet, so the system has to make its path relative to the link rather than the current directory. However, why can't the shell parse out that path when you're running the command, rather than forcing the user to figure out what the path is & enter it him/herself? The shell seems to parse pretty well, so is this a case of legacy issues? Performance issues? What?


title: Tails OS - Modifying boot options

text: When Tails OS boots, you can press tab to modify the startup options. Is there any way I can save an iso with these options already set? It's a real pain to have to press tab and set them up every time. Surely there must be a better way?


title: Exporting NetworkManager configurations

text: I am using Fedora 19, there is no `~/.gconf/networking/NetworkManager` directory, and system-wide `/etc/NetworkManager` has no files required. I want to export **my user** 's `NetworkManager` configurations, that is Wireless, VPN credentials (ip, username, password) to a file, or at least find the directory where they are stored in Fedora 19. How to do that?


title: apt-get install fails with error "Unable to locate package"

text: **Background** Hi there. I'm relatively new to linux so you'll have to excuse my noobie question. I'm trying to follow the instructions found here: http://repo.pouf.org/ to install kamailio on my Raspberry Pi. **Problem** I'm getting the error message that the system is not able to locate the package kamailio. **What I've done so far:** I navigated the repo on that site and I can see that there is a kamailio package, but it's located under http://repo.pouf.org/raspbian/pool/main/k/ folder. I've also tried to change the sources.list file to read:               deb http://repo.pouf.org/raspbian/dists/ wheezy main      But that didn't fix the issue. any suggestions would be appreciated. Thanks.


title: Booting failing in different Debian and Debian derivated distros?

text: I've tried Ubuntu, Linux Mint and Debian, even though all have worked great for me I'm keeping with Ubuntu, I tested 12.04, 12.10 and even 13.04. The 12.04 LTS is the one I work with. There's one issue persisting in the three distros I've tested, sometimes at _random_ occasions the boot fails, after GRUB, it shows only a `_` as prompt and it remains indefinitely, I've let pass up to an hour, and best I could do was to wait for a while and try again until I get it to load. Everytime this happens and I've selected **recovery mode** I get logs like these: ![Once I got this output](http://i.stack.imgur.com/RJzEB.jpg) ![enter image description here](http://i.stack.imgur.com/lidRh.jpg) So, I blame the last line: > **[ 0. .... ]Booting Node 0, Processors #1** to be the _issue_ , all first log lines appear continuously but it'll stop then. I already updated BIOS, but there's something I think it might be the _issue_ and that's the Hyperthreading, I had disabled it after BIOS update and it stopped happening, now I enabled it for installing a 64 bits OS in VMWare Player and it happened again. I googled and I've not really found a solution.


title: What are the side effects of having several UNIX users share one UID?

text: The sys-apps/shadow package on my GNU / Linux system comes with a `useradd` command that supports an option that I have previously overlooked: `\--non- unique`. For the sake of convenience when shellig home from the university, I have created an alias for my original username (casual name at home) thusly:               useradd --non-unique -u 1001 \          --no-create-home --home-dir /home/casualname \          -g 1001 -G `id casualname -G | tr ' ' ,` universityUsername      This allows me to login from campus with the login universityUsername without creating a ~/.ssh/config alias or specifying the -l option for `ssh`. After logging in, `whoami` reports that I am casualname. This is due to the fact that casualname appears closer to the top of the /etc/passwd file. I wonder how widely supported such aliases are and if there are any drawbacks to using them. And also, is there a way to select the preferred user alias as the acting one (what $USER is set to) on a system where the user can not re- order entries in /etc/passwd?


title: Building Virtualbox Linux Headers

text: I am trying to get Virtualbox running on my Acer C7 with Ubuntu 13.04. I ran the script posted here but I am getting the following error after this point in the script.               # make-kpkg kernel_image kernel_headers          make[2]: Entering directory `/usr/src/kernel' SYSHDR     arch/x86/syscalls/../include/generated/asm/unistd_32.h SYSHDR      arch/x86/syscalls/../include/generated/asm/unistd_64.h SYSHDR      arch/x86/syscalls/../include/generated/asm/unistd_x32.h SYSTBL        arch/x86/syscalls/../include/generated/asm/syscalls_32.h HOSTCC      arch/x86/tools/relocs CHK include/linux/version.h UPD      include/linux/version.h CHK include/generated/utsrelease.h UPD      include/generated/utsrelease.h CC kernel/bounds.s cc1: error: unrecognized command line option '-fstack-protector-strong'               make[3]: * [kernel/bounds.s] Error 1 make[2]: [prepare0] Error 2 make[2]:      Leaving directory /usr/src/kernel' make[1]: *** [debian/stamp/conf/kernel-conf]      Error 2 make[1]: Leaving directory/usr/src/kernel' make: **      [debian/stamp/conf/minimal_debian]      Error 2 Failed to create a ./debian directory: No such file or directory at /usr/bin/make-kpkg line 984.


title: What is the "kernel build", and where do I get it?

text: I am trying to compile OpenOnload from Solarflare for my nic on a server that I'm building. It is saying something about not having a kernel build.               root@server:/usr/src/openonload-201310-u2# ./scripts/onload_install     onload_install: Building OpenOnload.     mmakebuildtree: No kernel build at '/lib/modules/3.2.0-4-amd64/build'     onload_build: FAILED: mmakebuildtree --driver -d x86_64_linux-3.2.0-4-amd64     onload_install: ERROR: Build failed.  Not installing.     `      What is it talking about when it's saying there is supposed to be kernel build at `/lib/modules/3.2.0-4-amd64/build`? How would I get that file? I'm using Debian 7 "Wheezy". Thanks so much for your help!


title: Separate Chrome webapp shortcuts from Chrome in Gnome Shell

text: I created some webapps in Google Chrome that will open in their own windows, like Google Keep, for example. But whenever I open them, it will say Google Chrome in the black bar (Gnome Shell) and in overview, it will be listed as a Google Chrome window rather than its own. Meaning I have to move around and actually find the window rather than simply clicking on it in the dash. It's not a big deal, but it works easier for my workflow. Windows and Ubuntu treat Chrome's webapps as their own applications, how can I get Gnome to do it, too? ![See, I have Google Keep opened, but it says Chrome.](http://i.stack.imgur.com/43hvh.png)


title: Cannot get TFTP server working on Ubuntu using xinetd

text: I am trying to get a very simple `tftp` server working. I followed the guides at several websites, including how-to-setup-tftp-on-ubuntu and installing-and- testing-tftpd-in-ubuntudebian, but I haven't been able to get a `tftp` server working. The `xinetd` service is running (I know this because I do a `ps -A | grep xinetd` and see it), but I don't see `tftp` in `netstat -na | grep LIST | grep 69`. In other words, `xinetd` is running but I don't see the `tftp` server. I tried connecting to the server from my Windows `tftp` client but it failed, so I know for sure it's not running. My `/etc/xinetd.d/tftp` config file looks like this:               service tftp     {         protocol = udp         port = 69         socket_type = dgram         wait = yes         user = nobody         server = /usr/sbin/in.tftpd         server_args = -s /tftpboot          disable = no     }      The `/tftpboot` is owned by `nobody:nogroup`, and mode to `777`. I thought maybe it was a firewall issue but ufw says it is inactive. In case it matters, Ubuntu is running inside a VirtualBox VM with the ethernet adapter bridged (not NAT) to my home network. I also tried directly running `/usr/sbin/in.tftpd` and used the `\--foreground` option, but it closes right away.


title: Running shell script on cluster in parralel

text: I thought **dsh(Distributed Shel)** will be a good option but when i ran my shell script across my nodes, I didnt get expected output,               dsh -aM -c bash /home/cloudera/bash_script.sh     server2@x.x.x.110: files in folder     server2@x.x.x.110: server2     server1@x.x.x.111: server1     server1@x.x.x.111: sleep time................     server3@x.x.x.112: server3     server3@x.x.x.112: sleep time................     server2@x.x.x.110: sleep time................      bash_script.sh               #!/bin/bash          while true;     do          shopt -s nullglob     #shopt -s dotglob # To include hidden files     files=(/home/cloudera/MyFolder/*)     echo "files in folder" $files[@]          if [  ${#files[@]} -gt 0 ];     then             for entry in "/home/cloudera/EcoAxis"/*         do           cp $entry /home/cloudera/EcoBackup           var=`basename $entry`           var1=`echo ${var//[.csv]/}`           echo $var1           gawk -f abc.awk $entry           rm -r -f $entry              done     fi      echo "server2"      sleep 5s      echo "sleep time................"      sleep 10s     done      My script is working properly if i ran it without dsh,why this abnormal behavior,By default, dsh can run up to 64 commands in parallel ,does dsh support all bash commands ? what is the best option to go for parrallel processing of shell script accross nodes? Thanks.


title: Remapping WASD + R_Shift to arrows

text: I know this has already been asked so many times, but even after searching, I still can't do it. I simply want to map R_Shift + WASD to the arrow keys (Linux). I can map Shift + WASD to arrows using xmodmap, however, I want only the right shift to have this functionality (while disabling text selection when using R_Shift). (I have read the xmodmap wiki but can't really understand the way to make this possible.)


title: How to sort files based on the json property value inside the file?

text: I've downloaded list of videos via youtube-dl and each file has corresponding .json file containing certain properties. So I would like to sort the files based on the selected json property which is inside of corresponding .json file (e.g. by number of views count, property: view_count). What tools I need and how this can be achieved?


title: Limit memory usage for a single Linux process

text: I'm running `pdftoppm` to convert a user-provided PDF into a 300DPI image. This works great, except if the user provides an PDF with a very large page size. `pdftoppm` will allocate enough memory to hold a 300DPI image of that size in memory, which for a 100 inch square page is 100*300 * 100*300 * 4 bytes per pixel = 3.5GB. A malicious user could just give me a silly-large PDF and cause all kinds of problems. So what I'd like to do is put some kind of hard limit on memory usage for a child process I'm about to run--just have the process die if it tries to allocate more than, say, 500MB of memory. Is that possible? I don't think ulimit can be used for this, but is there a one-process equivalent?


title: Set memory allocation for applications in Ubuntu

text: I have an application running under Ubuntu that tries to consume all available memory. Is there a way to specify and restrict the allocations available for a given application?


title: Kerberos error after ArchLinux installation

text: I've installed ArchLinux successfully on my laptop yesterday. To do this, I've followed the Beginner's guide along with the Raid guide. I could do every step without problem, except the one for the time zone (I got an error with `ln -s` and `/etc/localtime`). One other point differs from my installation : on the raid webpage, when you have to edit the `HOOKS` section, mine is different from the one on the pages. I understood that I only had to had `mdadm_udev`. However, when I try to boot my computer, Archlinux seems booting fine. It looks like the OS loads modules without problem, then I got the following failed :               [FAILED] Failed to start Packet Filtering Framework.     See 'systemct1 status iptables.service' for details.     [FAILED] Failed to start IPv6 Packet Filtering Framework.     See 'systemct1 status ip6tables.service' for details.      Then some modules are load again and then I got the last failure :               [FAILED] Failed to start Kerberos 5 KDC.     See 'systemct1 status krb5-kdc.service' for details.      This error seems weird because before it comes, I have some lines like this :               [  OK  ] Started Kerberos 5 KDC.              Stopping Kerberos 5 KDC...     [  OK  ] Stopped Kerberos 5 KDC.              Starting Kerberos 5 KDC.      After this, I have a black screen that looks like the terminal which asks me my login. Does any have an idea how to fix this or is this normal ? PS : If you need all the step of the loading screen I can try to film the screen and type it here. EDIT : I don't know if this is a consequence of the failure of this module but I can't log in as root.


title: Match regex in ksh

text: I am looking to do something like this in KSH:               if (( $var = (foo|bar)[0-9]*$ )); then         print "variable matched regex"     fi      Is it possible at all? For the record I'm using Ksh `Version M-11/16/88i` on a Solaris 10 machine.


title: Non printing characters

text: I would love to get the mappings to work for keyboard shortcuts shown here   http://ascii-table.com/ansi-escape-sequences.php   I have the hang of color but for some reason nothing else seems to work!


title: Tracking what commands were executed after sudo to another user

text: I have provided `sudo` to ten users to become another user like `nsup`. I want to track which user executes which command after they become `nsup`. If there is a way to store the log files in a common file that would be great. I have tried looking at `/var/log/secure`, but from there I cannot distinguish which user executed which command after they became `nsup`. It shows only which user executed the command to _become_ `nsup`, and nothing beyond that.


title: Seem to be having a problem with RealVNC with centos can't input username

text: Hello I seem to be having a problem with RealVNC with centos. I want to connect to a another machine, but can't because it has been "grayed out". In otherwords, I can't type in the username in the username field and can only type in the password. My VNC viewer version is 4.1. I've installed it from the add software section from centos.


title: Steps to configure iPod shuffle in Fedora 19

text: I am using Fedora 19 GNOME version. After I plugin my iPod to the USB, it is not listed in my filesystem. The output of the `lsusb` command is:               Bus 002 Device 003: ID 090c:237c Silicon Motion, Inc. - Taiwan (formerly Feiya Technology Corp.)      Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub     Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub     Bus 001 Device 003: ID 05ac:1303 Apple, Inc. iPod Shuffle 4.Gen     Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub     Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub     Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub     Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub      the output of `fdisk -l` is:               Disk /dev/sda: 500.1 GB, 500107862016 bytes, 976773168 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 label type: gpt               #         Start          End    Size  Type            Name  1         2048       411647    200M  EFI System      EFI System Partition  2     411648      1435647    500M  Microsoft basic   3      1435648    976773119  465.1G  Linux LVM                 Disk /dev/mapper/fedora-root: 53.7 GB, 53687091200 bytes, 104857600 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 /dev/mapper/fedora-swap: 4177 MB, 4177526784 bytes, 8159232 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 /dev/mapper/fedora-home: 441.5 GB, 441505021952 bytes, 862314496 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 /dev/sdb: 2018 MB, 2018496512 bytes, 492797 sectors Units = sectors of 1 * 4096 = 4096 bytes Sector size (logical/physical): 4096 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk label type: dos Disk identifier: 0x00000000             Device Boot      Start         End      Blocks   Id  System      So, `sdb` is my iPod. The output of `mount -t hfsplus /dev/sdb /media/ipod/` is:               mount: wrong fs type, bad option, bad superblock on /dev/sdb,            missing codepage or helper program, or other error                 In some cases useful info is found in syslog - try            dmesg | tail or so.      Then I tried checking the logfile `dmesg | tail -30`. The output was:               [254134.677536] usbcore: registered new interface driver usb-storage      [254135.680855] scsi 6:0:0:0: Direct-Access     Apple    iPod   2.70 PQ: 0 ANSI: 2      [254135.681654] sd 6:0:0:0: Attached scsi generic sg2 type 0      [254135.682437] sd 6:0:0:0: [sdb] 492797 4096-byte logical blocks: (2.01 GB/1.87 GiB)     [254135.683072] sd 6:0:0:0: [sdb] Write Protect is off      [254135.683077] sd 6:0:0:0: [sdb] Mode Sense: 6e 00 00 08      [254135.683678] sd 6:0:0:0: [sdb] Incomplete mode parameter data      [254135.683682] sd 6:0:0:0: [sdb] Assuming drive cache: write through      [254165.979596] usb 1-1.2: reset high-speed USB device number 3 using ehci-pci      [254197.054873] usb 1-1.2: reset high-speed USB device number 3 using ehci-pci     [254228.066118] usb 1-1.2: reset high-speed USB device number 3 using ehci-pci      [254259.205331] usb 1-1.2: reset high-speed USB device number 3 using ehci-pci      [254259.294409] sd 6:0:0:0: [sdb] 492797 4096-byte logical blocks: (2.01 GB/1.87 GiB)      [254259.295670] sd 6:0:0:0: [sdb] Incomplete mode parameter data      [254259.295674] sd 6:0:0:0: [sdb] Assuming drive cache: write through      [254290.152447] usb 1-1.2: reset high-speed USB device number 3 using ehci-pci      [254321.227721] usb 1-1.2: reset high-speed USB device number 3 using ehci-pci      [254352.238989] usb 1-1.2: reset high-speed USB device number 3 using ehci-pci      [254383.250192] usb 1-1.2: reset high-speed USB device number 3 using ehci-pci      [254383.337942]  sdb:      [254383.339261] sd 6:0:0:0: [sdb] 492797 4096-byte logical blocks: (2.01 GB/1.87 GiB)      [254383.340499] sd 6:0:0:0: [sdb] Incomplete mode parameter data      [254383.340503] sd 6:0:0:0: [sdb] Assuming drive cache: write through      [254414.261274] usb 1-1.2: reset high-speed USB device number 3 using ehci-pci      [254445.400659] usb 1-1.2: reset high-speed USB device number 3 using ehci-pci      [254476.411854] usb 1-1.2: reset high-speed USB device number 3 using ehci-pci      [254507.423071] usb 1-1.2: reset high-speed USB device number 3 using ehci-pci      [254507.509440] sd 6:0:0:0: [sdb] Attached SCSI removable disk      [254606.269395] hfsplus: unable to find HFS+ superblock      [254921.669943] hfsplus: unable to find HFS+ superblock      I also have gtpod and banshee installed. How do I get the iPod configured and running?


title: xfs disk usage is 15-30% bigger than the files

text: xfs seems to use 15-30% more disk space than the files require:               # du     0       .     # dd if=/dev/zero of=test bs=1M count=5k     5120+0 records in     5120+0 records out     5368709120 bytes (5,4 GB) copied, 10,527 s, 510 MB/s     # ls -l     total 8388608     -rw-r--r-- 1 root root 5368709120 Oct 19 16:04 test     # du     8388608 .      It seems to do that to a certain degree for the whole file system. This filesystem reports disk full when adding files less than 1% of the file system's size:               # df     /dev/sdb6  40957913088 35624042728 5333870360  87% /xfs-export      Is it caused by some fancy option when doing mkxfs (similar to the reserved 5% in ext2)?               # uname -a     Linux server 2.6.39-bpo.2-amd64 #1 SMP Tue Jul 26 10:35:23 UTC 2011 x86_64 GNU/Linux


title: Can I automate tar's multi-volume-feature?

text: Ok, so I've just had a read through this page after a way to improve my current backup solution on my Debian server. Tar seems to be offering a quite nice multi-volume feature, although when I try it out, it asks me to `Prepare volume #X for ‘mybackup.tar.gz’ and hit return:`. How should I automate this as I would like to take usage of this feature in an automated CRON script where no one is there to push return and enter whatever is rquired by the multi-volume prompt. Is using `split` the only way?


title: Command tool to create torrent files that includes MD5 hashes of files?

text: I'm aware of mktorrent, and know how to use it, but for testing purposes I require a utility that will also include the MD5 hash of every file in the torrent in the torrent meta info. I realize that the MD5 hash for each file isn't typically used with most modern torrent apps and is superfluous, but I'm hoping there's a utility out there I missed that supports this. Any suggestions?


title: How to schedule a job that depends on network availability?

text: I have cloned a git repository of some project. I want to automate `git pull` and compile the project once in a week. I am using a laptop which wont be on 24x7. Now, I cannot use `cron` as I should keep the system running at that exact moment. I cannot use `anacron` too as it might start before I connect to network. Is there some option in `anacron` that will run this particular job only when I am connected to internet? Or should I be using some other different tool for this?


title: Implementation of eSTREAM ciphers available?

text: Is there a usable implementation of the eSTREAM stream cyphers available for Linux? I was thinking to use that for encrypting data stored on tape drives, using it with `tar`. Now, there are some basic implementations in the eSTREAM suite, but they're designed for benchmarking purposes, and are not very usable for every-day use. I rely on stream cipher RC4 right now (`openssl rc4`), but as with DES and AES, I'd like to switch to something more secure, and more modern. In case there are "better" ways of using encryption on tape drives, please let me know. Block ciphers are obviously not really handy here, since those require random access.


title: How to trace that what had "chmod 640"'ed the "/etc/passwd" file?

text: On AIX 6100-05-02-1034, something is frequently changing the permissions of the `/etc/passwd` file to 640. That's bad... How could I trace that what is chmoding the file? There is no `history 1000 | fgrep -i chmod`, I think a process is chmoding the file, but which one? `dtrace` can do this? it's not on AIX


title: How do I export a folder to a subnet using NFS in FreeBSD 9.0

text: The following NFS exports file does not work on FreeBSD 9.0. How should I be specifying that I wish to share with the whole subnet?               mybox# cat /etc/exports       /storage/build 10.10.0.0/24(rw,no_root_squash)      Error from syslog:               mountd[1133]: bad exports list line /storage/build      10.10.0.0/24(rw,no_root_squash)      /etc/rc.conf               rpcbind_enable="YES"     nfs_server_enable="YES"     mountd_flags="-r"


title: How can I tell if xscreensaver has my screen locked?

text: I'm thinking through alerting stuff, and decided that, if my screen is locked, I'm not there so I should push the alerts to my phone. But, I cannot currently tell if the screen is locked. I could put something together with Perl and xscreensaver-command -watch, but I'd rather not have to make sure I have that process always running and all. That seems too heavy. Is there something I'm missing? This seems fairly obvious.


title: No route to host using ssh

text: I have a issue with remote server connection using ssh. I have a serverA on xxx.xxx.xxx.xx1 with default port 22. I have an another serverB on xxx.xxx.xxx.xx2 same default port22. Now I want to coonect serverB from serverA using ssh. I used the following command               [userA@localhost~] # ssh userB@serverB      When I run this command then I got the error as below               ssh: connect to host xxx.xxx.xxx.xx1 port 22: No route to host      One more this when I login the serverA then I see the prompt like **[userA@Localhost~] #** I did not understand that why it shows like above bold text while it should be show as `[userA@serverA ~] #` Any one has any idea to resolve this issue. thanks Note: Any query you can ask frenkly. I am newbie for remote connection using ssh updated I already ping but got the below response               [userA@localhost ~]# /bin/ping xxx.xxx.xxx.xx1     PING xxx.xxx.xxx.xx1 (xxx.xxx.xxx.xx1) 56(84) bytes of data.     From 192.168.24.1: icmp_seq=2 Redirect Host(New nexthop: xxx.xxx.xxx.xx1)     From 192.168.24.1: icmp_seq=3 Redirect Host(New nexthop: xxx.xxx.xxx.xx1)     From 192.168.24.1: icmp_seq=4 Redirect Host(New nexthop: xxx.xxx.xxx.xx1)     From 192.168.24.1 icmp_seq=2 Destination Host Unreachable     From 192.168.24.1 icmp_seq=3 Destination Host Unreachable     From 192.168.24.1 icmp_seq=4 Destination Host Unreachable     From 192.168.24.1: icmp_seq=5 Redirect Host(New nexthop: xxx.xxx.xxx.xx1)     From 192.168.24.1: icmp_seq=6 Redirect Host(New nexthop: xxx.xxx.xxx.xx1)     From 192.168.24.1: icmp_seq=8 Redirect Host(New nexthop: xxx.xxx.xxx.xx1)     From 192.168.24.1 icmp_seq=6 Destination Host Unreachable     From 192.168.24.1 icmp_seq=7 Destination Host Unreachable     From 192.168.24.1 icmp_seq=8 Destination Host Unreachable     From 192.168.24.1: icmp_seq=11 Redirect Host(New nexthop: xxx.xxx.xxx.xx1)     From 192.168.24.1 icmp_seq=10 Destination Host Unreachable     From 192.168.24.1 icmp_seq=11 Destination Host Unreachable     From 192.168.24.1 icmp_seq=12 Destination Host Unreachable     From 192.168.24.1 icmp_seq=13 Destination Host Unreachable     From 192.168.24.1 icmp_seq=14 Destination Host Unreachable     From 192.168.24.1 icmp_seq=15 Destination Host Unreachable     From 192.168.24.1: icmp_seq=17 Redirect Host(New nexthop: xxx.xxx.xxx.xx1)     From 192.168.24.1 icmp_seq=17 Destination Host Unreachable     From 192.168.24.1 icmp_seq=18 Destination Host Unreachable      Updated-2 I run the netstat command and got the result as               [userA@localhost ~]# netstat -rn     Kernel IP routing table     Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface     192.168.24.0    0.0.0.0         255.255.255.0   U         0 0          0 eth0     169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0     0.0.0.0         192.168.24.1    0.0.0.0         UG        0 0          0 eth0


title: What does a bash sequence '\033[999D' mean and where is it explained?

text: I have come across bash sequences such as `\033[999D` and `\033[2K\r` which are used to do some manipulation on a printout on a terminal. But what do these sequences mean? Where can I find a list/summary on the web to help me find out the meaning of these sequences?


title: Getting a website's ip with 'host'?

text: Why is it that when I run the command `host examplewebsite.com` it gives me website's ip, but for some websites, when I type that IP address into the address bar and hit enter, it shows me a 404 page? Shouldn't it take me to the website I got ip from?


title: Zabbix-agent: cannot stat 'filename.log': [13] Permission denied

text: I have installed Zabbix-server and zabbix-agent and trying to add trigger to check log file. But in `/var/log/zabbix/zabbix_agentd.log` I got the same error every time:               10832:20131008:125634.180 cannot stat '/home/teamcity/opt/apache-tomcat-5.5.36/logs/catalina.out.test': [13] Permission denied     10832:20131008:125634.180 Active check [log["/home/teamcity/opt/apache-tomcat-5.5.36/logs/catalina.out.test","ERROR"]] is not supported. Disabled.      I chmoded and chowned file with:               # ls -lh /home/teamcity/opt/apache-tomcat-5.5.36/logs/catalina.out.test     -rwsrwsrwx 1 zabbix zabbix 229M Oct  8 12:09 /home/teamcity/opt/apache-tomcat-5.5.36/logs/catalina.out.test      Item created with type Zabbix-agent (active) and have key:               log["/home/teamcity/opt/apache-tomcat-5.5.36/logs/catalina.out.test","ERROR"]      Trigger:               {lms-teamcity:log["/home/teamcity/opt/apache-tomcat-5.5.36/logs/catalina.out.test","ERROR"].str(ERROR)}=1      Can somebody explain what I'm doing wrong?