openSuse /etc/profile.local file does not exist

I am referring to the following URL Setting the JAVA_HOME I am interested in the last solution given by Nils, that edit the /etc/profile.local file, this will set it for all the users. The question is that I am using openSUSE 12.3 and it does not have /etc/profile.local. What should be done in this case? The reason I am asking this as a new question and not commenting on the original thread is that I do not have enough reputation to leave a comment.


How can I examine the contents of /etc/localtime?

What command(s) can I use to examine the contents of the locale files, such as `/etc/locale` or the files under `/usr/share/zoneinfo/*`?


Generating diagrams (in PNG or JPG) from console?

From these data I can create a diagram in OpenOffice:               $ cat time.log      2014-04-29 08:15:34 1.00     2014-04-29 08:15:36 1.00     2014-04-29 08:15:42 1.50     2014-04-29 08:15:47 2.00     2014-04-29 08:15:55 2.00     2014-04-29 08:16:02 3.00     2014-04-29 08:16:10 4.00     2014-04-29 08:19:31 6.00     $       ![enter image description here](http://i.stack.imgur.com/hEf7k.png) **Q:** But how can we create the same diagram with a console program? Are there any diagram generator applications on Linux (using Ubuntu 12.04)? A "time.txt" can have an average 200 lines. p.s.: these are outputs from command execution:               $ { /usr/bin/time -f "%e" sleep 6 ; } 2>&1 | sed "s/^/`date "+%F %H:%M:%S"`\t/g" >> time.log


In a bash script, using the conditional "or" in an "if" statement

This question is a sequel of sorts to my earlier question. The users on this site kindly helped me determine how to write a bash `for` loop that iterates over string values. For example, suppose that a loop control variable `fname` iterates over the strings `"a.txt" "b.txt" "c.txt"`. I would like to `echo` "yes!" when `fname` has the value `"a.txt"` or `"c.txt"`, and `echo` "no!" otherwise. I have tried the following bash shell script:               #!/bin/bash          for fname in "a.txt" "b.txt" "c.txt"     do      echo $fname      if [ "$fname" = "a.txt" ] | [ "$fname" = "c.txt" ]; then      echo "yes!"     else      echo "no!"     fi     done      I obtain the output: > a.txt > > no! > > b.txt > > no! > > c.txt > > yes! Why does the `if` statement apparently yield true when `fname` has the value `"a.txt"`? Have I used `|` incorrectly? Thanks for your time.


source script as command

For some reason (?), often when I write scripts nowadays they do not work, or work only in part, and then I try with `.` or `source` and they work perfectly. I'm unsure what is causing this as the scripts are different in a lot of ways, it's hard to isolate what must be sourced in order for the script as a whole to work. Also, I've noticed that this is almost always the case when I move things from `.bashrc` aliases and functions into scripts. But to my actual question, in the above situation, what is the optimal way to "swallow" the source dot, so you are still able to use the scripts as one-word commands, not having to hit the dot every time?


Linux distribution for old laptop

I want to install a new Linux distribution on my old ThinkPad 600x laptop:   * Pentium 3 500MHz processor   * 448MB RAM   * 4MB graphics memory   * around 20GB HDD   * CD-ROM drive   * WiFi card on PCMCIA I want a fast, lightweight distribution. It only needs to run web browser (with flash support), nothing more. The distribution size doesn't matter, as long as it fits on a CD. A fast WM would be appreciated. Currently, it runs Lubuntu 12.10, which I find too slow and unresponsive. I was looking at Puppy (Wary 5.5) and it's my first candidate to install, but I was hoping for other suggestions.


What DNS servers am I using?

How can I check which DNS server am I using (in Linux)? I am using network manager and a wired connection to my university's LAN. (I am trying to find out why my domain doesn't get resolved)


Is using cookies from a web-browser a sane rationale for desktop application development?

I am looking at making an application that would make OpenID authentication with desktop clients easy. The rationale is to steal the cookies from the web- browser, so as to avoid having to hard-code authentication to every possible OpenID provider. Assuming the user has already logged on to the OpenID provider, the application clones the cookies from the default browser, and requests authentication to the desired service with the appropriate OpenID URL. To make this application usable, I need to know what are the most commonly used web browsers used on Linux, possibly with statistical evidence. I assume that Firefox and Chromium are the two most popular at the moment. _NB: the title of this question was edited in view of the emphasis by respondents on security and standards._


Root permission - username ALL=(ALL) ALL does not work

I'm a beginner. I'm trying to give my user root permissions, so I edited the `sudoers` file like this:               black   ALL=(ALL)   ALL      "black" is my username. But I still don't have root permissions, and when I open the terminal, it shows me:               [black@Black ~]$      Another thing. In the Administration > Users and Groups, my user's primary group is root. My Linux is the latest version of CentOS.


Different vim colorscheme depending on mode

I'm often doing the same mistake in vim:   * I forget whether I'm in insert or command mode, then I type in, I get random commands or I modify/delete code, and I have to undo. I do this mistake really too often. I was thinking of using the `:colorscheme my_color_file` to switch between two color schemes depending if I'm in insert mode or not. Basically, the `command_color_file.vim` has a red signature(keywords, tabs) for command mode, while the `insert_color_file.vim` has a green signature. However I don't find how to perform the `:colorscheme` call any time I enter one mode or another. Any idea if it is possible to do that?


Cannot add new mode in xrandr for external monitor

Today I was trying to connect my second monitor to my notebook. I have:   * nvidia graphic card   * 304.43 drivers [support xrandr 1.2]   * archlinux [up-to-date]   * awesome wm   * xrandr 1.3 My problem is with bigger resolution than 640x480 for my external monitor (VGA). xrandr -q:               Screen 0: minimum 8 x 8, current 1920 x 800, maximum 8192 x 8192     VGA-0 connected 640x480+1280+0 (normal left inverted right x axis y axis) 0mm        640x480        59.9*+        320x240       120.1       LVDS-0 connected 1280x800+0+0 (normal left inverted right x axis y axis) 331m        1280x800       59.9*+     HDMI-0 disconnected (normal left inverted right x axis y axis)      As we can see the is no higher resolution fo VGA, so I add new mode:               xrandr --newmode $(gtf 1280 1024 70.4 | grep Modeline | sed s/Modeline\ // | tr -d '"')      I checked avaible resolution and refresh rate under windows: one of them was 1024x768x70 (OSD of my monitor said that it is 70.4HZ). After create new mode, I wanted to add it:               xrandr --addmode VGA-0 1280x1024_70.40      And... It failed:               X Error of failed request:  BadMatch (invalid parameter attributes)       Major opcode of failed request:  153 (RANDR)       Minor opcode of failed request:  18 (RRAddOutputMode)       Serial number of failed request:  29       Current serial number in output stream:  30      From google I learned that in older xrandr / nvidia drivers was problem with list of avaible modes, but now with support of xrandr 1.2 by nvidia drivers it should be better. I also try with lower resolution and refresh rate (eg. 1024x768x50), but I've got the same error. I'm out of ideas what to do with this problem...


Ubuntu home folder issue

I am quite a newbie to Ubuntu and Linux world. I dual booted windows 8.1 and Ubuntu 14.04. I followed a tutorial and mounted a 38GB partition at /home. Now that my /home folder is almost full (2MB remaining), but when I select "properties" in the drop down menu from home folder, it says it's totalling at 100 and so GB. I want to know why is that and if it's possible to extend my home folder as my root directory still has quite some space. Any ideas would be much appreciated, thanks!


changing /var in running system

I have the challenge that I cannot start a CentOS Linux server in single-user- mode, but I need to change the `/var` (currently part of /) to a new disk. My way would be:   * mount the new disk on a temporary mount point: /tmp_var   * rsync -av /var /tmp_var   * add the new disk in the /etc/fstab (at the bottom)   * reboot i have double checked the file permissions but i always get:               type=1400 audit(1410535874.353:4): avc:  denied  { write } for  pid=701 comm="dmesg" path="/var/log/dmesg" dev=dm-1 ino=132049 scontext=system_u:system_r:dmesg_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file     Entering non-interactive startup          Calling the system activity data collector (sadc)... Cannot open /var/log  /sa/sa12: Permission denied


Load Balancing among multiple virtual network interfaces

I have an AWS instance with multiple virtual network interfaces all having different elastic IPs. Since I crawl from this machine, the IPs often get blocked. Distributing the outgoing traffic through all these interfaces will prevent it since all are mapped to different elastic IPs.               eth0      Link encap:Ethernet  HWaddr 0A:E6:A3:DD:F1:E0                 inet addr:10.0.0.120  Bcast:10.0.0.127  Mask:255.255.255.128               inet6 addr: fe80::8e6:a3ff:fedd:f1e0/64 Scope:Link          eth0:0    Link encap:Ethernet  HWaddr 0A:E6:A3:DD:F1:E0                 inet addr:10.0.0.122  Bcast:10.0.0.127  Mask:255.255.255.128               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1          eth0:1    Link encap:Ethernet  HWaddr 0A:E6:A3:DD:F1:E0                 inet addr:10.0.0.18  Bcast:10.0.0.127  Mask:255.255.255.128               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1      I want to send my outgoing traffic from all the network interfaces in a round robin fashion. Since these are virtual interfaces I can't achieve this using the `iproute2` package. Can someone tell me how I can achieve this ?


How can I write to my Samba share?

There are a million versions of this exact question out in google land but I've been unable to solve my problem (sorry). I have created a Samba share on Ubuntu 14.04 (actually xbmcbuntu) that I can connect to and read from, but not write to (from my Mac). I have followed a few different tutorials to get things set up so I probably have configured something incorrectly along the way. The directory I am sharing (`/home/xbmc/raid/media`) is owned by the user xbmc and has permissions set to 775.               xbmc@xbmc:~$ ls -al raid     total 28     drwxr-xr-x  4 xbmc xbmc  4096 Sep  4 23:22 .     drwxr-xr-x 23 xbmc xbmc  4096 Sep  4 23:00 ..     drwx------  2 root root 16384 Sep  2 21:34 lost+found     drwxrwxr-x  9 xbmc xbmc  4096 Sep  4 22:58 media      If I change permissions to 777 I am able to write to the share but this feels like an inappropriate solution. My `smb.conf` is as follows;               [global]     workgroup = WORKGROUP     server string = %h server (Samba, XBMC)     netbios name = XBMCbuntu     dns proxy = no     name resolve order = hosts wins bcast     #guest account = xbmc     load printers = no     show add printer wizard = no     log file = /var/log/samba/log.%m     max log size = 1000     syslog = 0     panic action = /usr/share/samba/panic-action %d     encrypt passwords = true     passdb backend = tdbsam     obey pam restrictions = yes     unix password sync = yes     passwd program = /usr/bin/passwd %u     passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .     pam password change = yes     map to guest = bad user     security = user     username map = /etc/samba/smbusers          [System]     path = /home/xbmc/.xbmc     comment = XBMC System Share     writeable = yes     browseable = yes     guest ok = no          [Media]     path = /home/xbmc/raid/media     comment = xbmc media     writeable = yes     browseable = yes     guest ok = no      and `/etc/samba/smbusers` is as follows; `xbmc = xbmc` I've done a lot of fiddling with my smb.conf but haven't fixed anything. Any suggestions?


is there some kind of symbolic links that support moving or renaming the target file?

I liked this explanation of hard and soft/symbolic links: http://unix.stackexchange.com/a/22406/42226 Now the reason why I googled about soft and hard links is simply because I was organizing my folders and files and in one point I wanted one file to be referenced to from another directory. So I thought in shortcuts/symlinks, but would like to be able to rename the file or move it to another folder and still have the symlinks pointing to that file. Is that possible? Hard link isn't an option since I want the same functionality also for folders (and furthermore I want one reference -the first hard link- to be always the "most important").


How to find the files that are last changed under a directory and its subdirectories?

I would like to know how to find the files that are last changed under a directory and its subdirectories. `ls -lt` doesnt work, because if a file is changed and therefore its time is changed to be up to date, the directory that containing the file will not have its directory updated. My ultimate goal is to find the last changed file whose size is increasing the fastest or most, for my problem mentioned in the other post. So I also would like to know about that. My OS is Ubuntu 12.04. Thanks!


Run a script when a process throws stderr message

I want to "wrap" a process around another to catch `stderr` messages when they occur. **Use Case** I'm using Compass and I have to have a terminal open and see if there is something wrong. My plan is to use terminal-notifier tool to send myself OSX notifications so I notice an error happened. Then I don't have to keep terminal open on my screen all the time. Imagine I have all this notification mechanism under a shell script named `compass-error.sh` which will send a notification when you call it. Now I want to run `compass watch` with my main process and watch for `stderr` to fire `compass-error.sh`. How do I do it?


Resuming the Linux Kernel Configuration

I am configuring a Linux kernel before I compile the code. However, after I was thirty minutes into answering the many questions concerning various kernel settings, I accidentally pressed Ctrl+C. I do not want to start over, so is it possible to make the configuration tool resume where I left off?


Linux TTY Colours

I've had this issue for a little while now on a few machines, but never thought to ask anyone. Upon installing a new laptop the other day, and using the virtual terminal for a bit, I noticed that colours were a bit off. Here is what it should look like: ![enter image description here](http://i.stack.imgur.com/cePCV.jpg) Here is what it shows on a virtual console: ![enter image description here](http://i.stack.imgur.com/f5kcj.jpg) Is there anything special that needs to be done to get this working correctly? I've been looking for a little while tonight, and so far haven't found a great deal of information.


'less' width issues

I'm connecting to my Linux boxes (primarily Debian Squeeze) using Putty for Windows. Whenever I run a 'less' command, e.g. on an aptitude search, less truncates the listing to much less than my window size. I've looked to see how I can override this but haven't come up with anything. BTW - I'm not a Linux n00b, but have just noticed this and it's really starting to irritate me :)


KVM loss of data?

I'm planning to install KVM on Linux Mint. I heard it is possible to corrupt files and partitions. There are warnings here but I haven't finish reading it (I will tonight). There is also another warning here Is it possible to mount drives and partitions to a VM? Say my host is Mint and I'm running a Windows guest and Debian guest; Is it possible to accidentally have it mounted on both guest systems and cause a corruption? What if a guest system is using it could I accidentally access files/write to them on the host and corrupt files? I have no experience and its a big deal if it corrupts my 2TB HD (just one big partition) or my 200GB partition on other drives or any external USB drives (1-2TB).


IP address on Linux keeps forwarding to a different one

It's Debian 6.0 setup, I used to have the ip manually set to 192.168.7.50 but now I have a new server with that IP I want to just copy some stuff over through the network but now I can't seem to get it to play nicely on the network, all over network access is fine but 192.168.7.50 always reroutes to itself. I've set up my config as so in /etc/network/interfaces               auto lo eth0     iface lo inet loopback          allow-hotplug eth0     iface eth0 inet dhcp      performing a ping produces:               ping 192.168.7.50     PING 192.168.7.50 (192.168.7.50) 56(84) bytes of data.     From 192.168.7.100 icmp_seq=1 Destination Host Unreachable     From 192.168.7.100 icmp_seq=2 Destination Host Unreachable     From 192.168.7.100 icmp_seq=3 Destination Host Unreachable     From 192.168.7.100 icmp_seq=4 Destination Host Unreachable     From 192.168.7.100 icmp_seq=5 Destination Host Unreachable     From 192.168.7.100 icmp_seq=6 Destination Host Unreachable      Do I need to clear a cache somewhere which is causing the forwarding? What other things can I do to diagnose the problem?


Using NIS without NFS

I'm configuring several computers in a lab to operate with the same login credentials shared between the computers, but without sharing the home directories. I'm considering using NIS for sharing the login credentials. How can I configure NIS to automatically create a new user's home directory on each machine, without having to manually login to each machine myself, and without having to share the home directories by NFS?


iptables and physdev match confusion

I'd like to be able to prevent a network bridge from generating certain types of traffic from some of its interfaces. If I understand iptables correctly, packets generate by a device appear on the OUTPUT chain. I have tried adding a physdev match to the OUTPUT chain using iptables but get the following warning: > xt_physdev: using --physdev-out in the OUTPUT, FORWARD, and POSTROUTING > chains for non-bridged traffic is not supported anymore. From what I can tell, this capability was once added and then removed from iptables. Since many examples on the internet seem to no longer work. Is someone able to comment on any of the following: what the original intention of this rule was, how we can use it correctly with more recent versions of iptables and how we can achieve the original intent of blocking traffic generated by the bridge from particular interfaces (I think the correct answer here might be ebtables).


X Server Crash in Fedora 9

I have a motif based application that runs on Fedora 9. This application has a functionality that calls itself periodically to perform a task using SIGALRM signal. However the application seems to crash after a while. Examining the logs, the X server seems to be crashing with the following logs: * ** _XIO: fatal IO error 2 (No such file or directory) on X server ":0.0" after 24275 requests (23960 known processed) with 0 events remaining**._*  Could someone please tell me what could be the problem?


How Do I Add My Own Daemons in Arch Linux? (BSD-style init)

I have created a symlink to a start/stop/etc. wrapper bash script in `/etc/rc.d`, added it to `DAEMONS=()` in rc.conf, but the process it points to isn’t starting on boot, and isn’t showing up in the output of `$ rc.d list`. Googling around, I have seen mention of `update-rc.d`, but it seems that command is not available in Arch Linux. What is the right way of adding a system-wide daemon (i.e., without using `rc.local`) that can be used the same way as the defaults?


Grep command in shell script

I've been writing a shell script which should make grep command outputs for further use. However when I pass a variable containing `~/.../multiple_dir/*` to grep as input I get empty output file.               #!/bin/sh          set -u          PROGRAM="$1"     REGEXP=$(cat "$2")     INP_FILE="$3"     OUT_FILE="$4"          printf "%-30s: " $(basename ${INP_FILE})          if [ $INP_FILE = "STDIN.inp" ]     then         cat ${INP_FILE} | ${PROGRAM} ${REGEXP} - > ${OUT_FILE} 2>&1     elif [ $INP_FILE = "MULTIPLE.inp" ]     then         ${PROGRAM} ${REGEXP} '$(cat ${INP_FILE})' > ${OUT_FILE} 2>&1     else         ${PROGRAM} ${REGEXP} ${INP_FILE} > ${OUT_FILE} 2>&1     fi          true      This is the script I've written, with single files or from STDIN it works like a charm, but when `$(cat ${INP_FILE})=~/.../multiple_dir/*` it doesn't work. I have `./inputs`, `./inputs/multiple_dir/`, and `./tests` directories. In `./tests` directory, I have a link to `./inputs` directory files, which are SINGLE (`pdb` file), STDIN (`pdb` file which I will pass as STDIN), UNREADABLE (no read bit), MULTIPLE (contains `~/.../inputs/multiple_dir/*`) and EMPTY (empty). I have a Makefile which calls shell script and passes one file at a time as a parameter. Each case works perfectly except when it passes MULTIPLE, then I get an empty output file. In all other cases output files aren't empty. The values makefile passes to script is as follows `grep regExp/regExp(contains text ATOM) tests/MULTIPLE.inp(contains text ~/.../inputs/multiple_dir/*) outputs/MULTIPLE.out` To better illustrate the problem I'm experiencing i've wrote a few short scripts.               #!/bin/sh     grep ATOM ~/5as-darbas/inputs/multiple_dir/* > working.out          #!/bin/sh     input_file="$1"     #$1 is a file containing text ~/.../inputs/multiple_dir/*     echo "$(cat ${input_file})"     grep ATOM "$(cat ${input_file})" > not_working.out      Scripts results are as follows:               simas@Lenovo:~/5as-darbas/inputs$ ./working      simas@Lenovo:~/5as-darbas/inputs$ ./not_working MULTIPLE     ~/5as-darbas/inputs/multiple_dir/*     grep: ~/5as-darbas/inputs/multiple_dir/*: No such file or directory     simas@Lenovo:~/5as-darbas/inputs$ ls -l     total 2372     -rw-rw-r-- 1 simas simas       0 Dec 10 19:37 EMPTY     -rw-rw-r-- 1 simas simas      35 Dec 12 02:49 MULTIPLE     -rw-rw-r-- 1 simas simas      25 Dec 12 02:43 MULTIPLE~     drwxrwxr-x 3 simas simas    4096 Dec 12 01:52 multiple_dir     -rwxr-xr-x 1 simas simas     163 Dec 12 03:26 not_working     -rw-rw-r-- 1 simas simas     161 Dec 12 03:26 not_working~     -rw-rw-r-- 1 simas simas       0 Dec 12 03:29 not_working.out     -rw-rw-r-- 1 simas simas       0 Dec 12 01:52 s~     -rw-rw-r-- 1 simas simas  332343 Dec 10 19:38 SINGLE     -rw-rw-r-- 1 simas simas  252720 Dec 10 19:38 STDIN     --w--w---- 1 simas simas  252720 Dec 10 19:38 UNREADABLE     -rwxr-xr-x 1 simas simas      70 Dec 12 03:27 working     -rw-rw-r-- 1 simas simas     128 Dec 12 03:27 working ~     -rw-rw-r-- 1 simas simas 1554999 Dec 12 03:29 working.out      Note the size of working.out and not_working.out. **I was able to get this script to work. The thing is when you pass a path`~/path/to/somewhere/*` shell for some reason can't find it, however if you pass path like this `/home/name/path/to/somewhere/*` it works like charm.**


Need to install glibc >= 2.14 on Wheezy

I am trying to get Protractor working for performing e2e angular testing, but protractor requires Selenium which requires ChromeDriver which requires `glibc` 2.14. My current development box is running Debian Wheezy which comes with `glibc` 2.13. I have read that switching over to Debian's unstable branch would provide access to `glib-2.14`, but from what I have heard unstable is pretty...unstable. Is there any way I can upgrade `glibc` to 2.14 or 2.15 without the risk of breaking everything? Or is it possible to switch back from the unstable Debian branch if things start to break?               12:15:22.784 INFO - Executing: [new session: {browserName=chrome}] at URL: /session)     12:15:22.796 INFO - Creating a new session for Capabilities [{browserName=chrome}]     /home/chris/projects/personal/woddy/client/selenium/chromedriver:     /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.15' not found (required by      /home/chris/projects/personal/woddy/client/selenium/chromedriver)     /home/chris/projects/personal/woddy/client/selenium/chromedriver: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found (required by /home/chris/projects/personal/woddy/client/selenium/chromedriver)     12:15:43.032 WARN - Exception thrown     java.util.concurrent.ExecutionException: org.openqa.selenium.WebDriverException:  java.lang.reflect.InvocationTargetException


Starting a .bin installer in graphical mode

I'm trying to install this software but after I run the usual commands:               chmod +x gvSIG-desktop-2.0.0-2066-final-lin-x86-standard-withjre.bin     ./gvSIG-desktop-2.0.0-2066-final-lin-x86-standard-withjre.bin      I don't get the graphical installer, the terminal just ask me for confirmation and for installation path. The software doesn't work properly afterwards and it is because the terminal installation doesn't give the same options as the graphical one. How can I force the graphical installer to appear? I'm using Arch Linux and Awesome windows manager. For java I have installed jre7-openjdk and jdk7-openjdk.


Root and my password are the same

If I `cat /etc/shadow` I can get the encrypted passwords of root and my user. These passwords are the same (I know, bad security) for each account, but in `/etc/shadow` they show up as being different encrypted strings. Why? Are different algorithms used for each?


making a toy unix os : issues with ld

So I'm following this tutorial on rolling out your own toy unix. I'm stuck at compiling the sample source on this page. This is a download link to the sample source code The Makefile looks like this:               SOURCES=boot.o main.o     CC=gcc     CFLAGS=-nostdlib -nostdinc -fno-builtin -fno-stack-protector     LDFLAGS=-Tlink.ld     ASFLAGS=-felf          all: $(SOURCES) link     clean:         -rm *.o kernel     link:         ld $(LDFLAGS) -o kernel $(SOURCES)     .s.o:         nasm $(ASFLAGS) $<      On OSX I couldn't manage to `make` because Apple's ld doesn't support a `-T` switch. I tried compiling on CentOS and I got this:               [gideon@centosbox src]$ make      nasm -felf boot.s     cc -nostdlib -nostdinc -fno-builtin -fno-stack-protector   -c -o main.o main.c     main.c:4: warning: 'struct multiboot' declared inside parameter list     main.c:4: warning: its scope is only this definition or declaration, which is probably not what you want     ld -Tlink.ld -o kernel boot.o main.o     boot.o: could not read symbols: File in wrong format     make: *** [link] Error 1      Of course my only problem is `File in wrong format.` What does this mean? How do I correct it?


Properly inserting code samples in man pages

I'm trying to write a man page for a software, and would like to include some code snippets. I'm currently using the **.RS** and **.RE** macros as part of a custom-made **.SAMPLE** macro, but for some reason that doesn't work. Here is the man page:               .TH MYMANPAGE 1           .de SAMPLE     .br     .RS     .nf     .nh     ..     .de ESAMPLE     .hy     .fi     .RE     ..          .SH TEST SECTION HEADING     This is a test section heading.     .TP     .B Test Paragraph Label     This is some test paragraph text. This is some test paragraph text. This     is some test paragraph text. This is some indented test code:     .SAMPLE     int main(void) {        return 42;     }     .ESAMPLE     This is more text after the test code. This is more text after the test     code.      What ends up happening is that the text after **.ESAMPLE** is not indented as much as the paragraph text. Instead, it's lined up with the paragraph label. What would be the proper **.[E]SAMPLE** macro definitions to get them to play nice with **.TP**?


Where does Iptables store blocked IPs

I need to set up a shell to block DDOS attacks , but in that script, it's reading some Blocked IPs from `/etc/sysconfig/iptables`. The problem is that I don't have this directory, So I'm wondering where should I read the blocked IPs from. I followed this script by Mr Takefuji. I'm using Debian 7 and have never set Iptables untill now.


How to debug repeated Wi-Fi disconnections in Arch Linux?

After trying for a long time to get a wireless connection, I am now able to get an extremely sketchy one (as in a few seconds of actual Internet access every few minutes). Running `wpa_supplicant -d -i wlp0s29f7u5 -c wifi.conf -Dwext` in one VT and `while ! yes | pacman -Syu; do :; done` in another, after several minutes it is still not done, but once in a while it manages to download a few files. `iw dev wlp0s29f7u5 link` on the Arch machine reports a signal strength of about -40 dB, which is a lot worse than the neighbouring Ubuntu laptop at -70 dB. Connection output:               # wpa_supplicant -d -i wlp0s29f7u5 -c wifi.conf -Dwext     wpa_supplicant v2.0     Successfully initialized wpa_supplicant     Initializing interface 'wlp0s29f7u5' conf 'wifi.conf' driver 'wext' ctrl_interface 'N/A' bridge 'N/A'     Configuration file 'wifi.conf' -> '/root/wifi.conf'     Reading configuration file '/root/wifi.conf'     ctrl_interface='/var/run/wpa_supplicant'     Priority group 0        id=0 ssid='BTHub4-GRK6'     WEXT: cfg80211-based driver detected     wext: interface wlp0s29f7u5 phy: phy0     rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0     SIOCGIWRANGE: WE(compiled)=22 WE(source)=21 enc_capa=0xf       capabilities: key_mgmt 0xf enc 0x1f flags 0x0     netlink: Operstate: linkmode=1, operstate=5     wlp0s29f7u5: Own MAC address: e8:4e:06:14:7a:77     wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0     wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0     wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0     wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0     wpa_driver_wext_set_countermeasures     wlp0s29f7u5: RSN: flushing PMKID list in the driver     wlp0s29f7u5: Setting scan request: 0 sec 100000 usec     WPS: Set UUID for interface wlp0s29f7u5     WPS: UUID based on MAC address - hexdump(len=16): 7c c4 e6 42 89 cb 59 26 95 2a b6 fd f8 85 e6 3a     EAPOL: SUPP_PAE entering state DISCONNECTED     EAPOL: Supplicant port status: Unauthorized     EAPOL: KEY_RX entering state NO_KEY_RECEIVE     EAPOL: SUPP_BE entering state INITIALIZE     EAP: EAP entering state DISABLED     EAPOL: Supplicant port status: Unauthorized     EAPOL: Supplicant port status: Unauthorized     wlp0s29f7u5: Added interface wlp0s29f7u5     wlp0s29f7u5: State: DISCONNECTED -> DISCONNECTED     wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)     netlink: Operstate: linkmode=-1, operstate=5     RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])     RTM_NEWLINK, IFLA_IFNAME: Interface 'wlp0s29f7u5' added     WEXT: if_removed already cleared - ignore event     RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])     RTM_NEWLINK, IFLA_IFNAME: Interface 'wlp0s29f7u5' added     WEXT: if_removed already cleared - ignore event     Wireless event: cmd=0x8b06 len=12     RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])     RTM_NEWLINK, IFLA_IFNAME: Interface 'wlp0s29f7u5' added     WEXT: if_removed already cleared - ignore event     Wireless event: cmd=0x8b1a len=16     wlp0s29f7u5: State: DISCONNECTED -> SCANNING     wlp0s29f7u5: Starting AP scan for wildcard SSID     Scan requested (ret=0) - scan timeout 10 seconds     RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])     RTM_NEWLINK, IFLA_IFNAME: Interface 'wlp0s29f7u5' added     WEXT: if_removed already cleared - ignore event     Wireless event: cmd=0x8b19 len=16     wlp0s29f7u5: Event SCAN_RESULTS (3) received     Received 838 bytes of scan results (2 BSSes)     wlp0s29f7u5: BSS: Start scan result update 1     wlp0s29f7u5: BSS: Add new id 0 BSSID cc:33:bb:13:8a:f4 SSID 'BTHub4-GRK6'     wlp0s29f7u5: BSS: Add new id 1 BSSID 00:22:b0:60:09:69 SSID 'leandro'     BSS: last_scan_res_used=2/32 last_scan_full=0     wlp0s29f7u5: New scan results available     wlp0s29f7u5: Selecting BSS from priority group 0     wlp0s29f7u5: 0: cc:33:bb:13:8a:f4 ssid='BTHub4-GRK6' wpa_ie_len=0 rsn_ie_len=24 caps=0x11 level=10     wlp0s29f7u5:    selected based on RSN IE     wlp0s29f7u5:    selected BSS cc:33:bb:13:8a:f4 ssid='BTHub4-GRK6'     wlp0s29f7u5: Request association: reassociate: 0  selected: cc:33:bb:13:8a:f4  bssid: 00:00:00:00:00:00  pending: 00:00:00:00:00:00  wpa_state: SCANNING     wlp0s29f7u5: Trying to associate with cc:33:bb:13:8a:f4 (SSID='BTHub4-GRK6' freq=2457 MHz)     wlp0s29f7u5: Cancelling scan request     wlp0s29f7u5: WPA: clearing own WPA/RSN IE     wlp0s29f7u5: Automatic auth_alg selection: 0x1     RSN: PMKSA cache search - network_ctx=(nil) try_opportunistic=0     RSN: Search for BSSID cc:33:bb:13:8a:f4     RSN: No PMKSA cache entry found     wlp0s29f7u5: RSN: using IEEE 802.11i/D9.0     wlp0s29f7u5: WPA: Selected cipher suites: group 8 pairwise 24 key_mgmt 2 proto 2     wlp0s29f7u5: WPA: clearing AP WPA IE     WPA: set AP RSN IE - hexdump(len=26): 30 18 01 00 00 0f ac 02 02 00 00 0f ac 04 00 0f ac 02 01 00 00 0f ac 02 00 00     wlp0s29f7u5: WPA: using GTK TKIP     wlp0s29f7u5: WPA: using PTK CCMP     wlp0s29f7u5: WPA: using KEY_MGMT WPA-PSK     WPA: Set own WPAioctl[SIOCSIWFREQ]: Device or resource busy      IE default - hexdump(len=22): 30 14 01 00 00 0f ac 02 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00     wlp0s29f7u5: No keys have been configured - skip key clearing     wlp0s29f7u5: State: SCANNING -> ASSOCIATING     wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)     netlink: Operstate: linkmode=-1, operstate=5     Limit connection to BSSID cc:33:bb:13:8a:f4 freq=2457 MHz based on scan results (bssid_set=0)     wlp0s29f7u5: set_disable_max_amsdu: -1     wlp0s29f7u5: set_ampdu_factor: -1     wlp0s29f7u5: set_ampdu_density: -1     wlp0s29f7u5: set_disable_ht40: 0     wlp0s29f7u5: set_disable_sgi: 0     wpa_driver_wext_associate     wpa_driver_wext_set_drop_unencrypted     wpa_driver_wext_set_psk     wlp0s29f7u5: Association request to the driver failed     wlp0s29f7u5: Setting authentication timeout: 5 sec 0 usec     EAPOL: External notification - EAP success=0     EAPOL: Supplicant port status: Unauthorized     EAPOL: External notification - EAP fail=0     EAPOL: Supplicant port status: Unauthorized     EAPOL: External notification - portControl=Auto     EAPOL: Supplicant port status: Unauthorized     RSN: Ignored PMKID candidate without preauth flag     RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])     RTM_NEWLINK, IFLA_IFNAME: Interface 'wlp0s29f7u5' added     WEXT: if_removed already cleared - ignore event     Wireless event: cmd=0x8b1a len=16     RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])     RTM_NEWLINK, IFLA_IFNAME: Interface 'wlp0s29f7u5' added     WEXT: if_removed already cleared - ignore event     Wireless event: cmd=0x8b06 len=12     RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])     RTM_NEWLINK, IFLA_IFNAME: Interface 'wlp0s29f7u5' added     WEXT: if_removed already cleared - ignore event     Wireless event: cmd=0x8b1a len=27     RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])     RTM_NEWLINK, IFLA_IFNAME: Interface 'wlp0s29f7u5' added     WEXT: if_removed already cleared - ignore event     RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])     RTM_NEWLINK, IFLA_IFNAME: Interface 'wlp0s29f7u5' added     WEXT: if_removed already cleared - ignore event     Wireless event: cmd=0x8c08 len=65     AssocResp IE wireless event - hexdump(len=49): 01 04 82 84 0b 16 32 08 0c 12 18 24 30 48 60 6c dd 18 00 50 f2 02 01 01 08 00 03 a4 00 00 27 a4 00 00 42 43 5e 00 62 32 2f 00 dd 05 00 09 86 01 00     RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])     RTM_NEWLINK, IFLA_IFNAME: Interface 'wlp0s29f7u5' added     WEXT: if_removed already cleared - ignore event     Wireless event: cmd=0x8b15 len=24     Wireless event: new AP: cc:33:bb:13:8a:f4     wlp0s29f7u5: Event ASSOCINFO (4) received     wlp0s29f7u5: Association info event     resp_ies - hexdump(len=49): 01 04 82 84 0b 16 32 08 0c 12 18 24 30 48 60 6c dd 18 00 50 f2 02 01 01 08 00 03 a4 00 00 27 a4 00 00 42 43 5e 00 62 32 2f 00 dd 05 00 09 86 01 00     wlp0s29f7u5: Event ASSOC (0) received     wlp0s29f7u5: State: ASSOCIATING -> ASSOCIATED     wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)     netlink: Operstate: linkmode=-1, operstate=5     wlp0s29f7u5: Associated to a new BSS: BSSID=cc:33:bb:13:8a:f4     wlp0s29f7u5: No keys have been configured - skip key clearing     wlp0s29f7u5: Associated with cc:33:bb:13:8a:f4     wlp0s29f7u5: WPA: Association event - clear replay counter     wlp0s29f7u5: WPA: Clear old PTK     EAPOL: External notification - portEnabled=0     EAPOL: Supplicant port status: Unauthorized     EAPOL: External notification - portValid=0     EAPOL: Supplicant port status: Unauthorized     EAPOL: External notification - EAP success=0     EAPOL: Supplicant port status: Unauthorized     EAPOL: External notification - portEnabled=1     EAPOL: SUPP_PAE entering state CONNECTING     EAPOL: SUPP_BE entering state IDLE     wlp0s29f7u5: Setting authentication timeout: 10 sec 0 usec     wlp0s29f7u5: Cancelling scan request     wlp0s29f7u5: RX EAPOL from cc:33:bb:13:8a:f4     wlp0s29f7u5: Setting authentication timeout: 10 sec 0 usec     wlp0s29f7u5: IEEE 802.1X RX: version=1 type=3 length=95     wlp0s29f7u5:   EAPOL-Key type=2     wlp0s29f7u5:   key_info 0x8a (ver=2 keyidx=0 rsvd=0 Pairwise Ack)     wlp0s29f7u5:   key_length=16 key_data_length=0       replay_counter - hexdump(len=8): 00 00 00 00 00 00 00 01       key_nonce - hexdump(len=32): c8 c9 ae c3 18 6c 23 4a a0 38 99 55 ec 9c c5 da ad 2d 00 dd 7a b3 33 c2 20 8b ab 41 e5 cd 1e b6       key_iv - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00       key_rsc - hexdump(len=8): 00 00 00 00 00 00 00 00       key_id (reserved) - hexdump(len=8): 00 00 00 00 00 00 00 00       key_mic - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00     wlp0s29f7u5: State: ASSOCIATED -> 4WAY_HANDSHAKE     wlp0s29f7u5: WPA: RX message 1 of 4-Way Handshake from cc:33:bb:13:8a:f4 (ver=2)     RSN: msg 1/4 key data - hexdump(len=0):     WPA: Renewed SNonce - hexdump(len=32): ab ec fb 19 6f 98 4a 00 75 78 4a 0d e0 37 fd d2 c3 44 29 66 2b 7e 93 57 06 0a f5 68 1b 02 aa fa     WPA: PTK derivation - A1=e8:4e:06:14:7a:77 A2=cc:33:bb:13:8a:f4     WPA: Nonce1 - hexdump(len=32): ab ec fb 19 6f 98 4a 00 75 78 4a 0d e0 37 fd d2 c3 44 29 66 2b 7e 93 57 06 0a f5 68 1b 02 aa fa     WPA: Nonce2 - hexdump(len=32): c8 c9 ae c3 18 6c 23 4a a0 38 99 55 ec 9c c5 da ad 2d 00 dd 7a b3 33 c2 20 8b ab 41 e5 cd 1e b6     WPA: PMK - hexdump(len=32): [REMOVED]     WPA: PTK - hexdump(len=48): [REMOVED]     WPA: WPA IE for msg 2/4 - hexdump(len=22): 30 14 01 00 00 0f ac 02 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00     WPA: Replay Counter - hexdump(len=8): 00 00 00 00 00 00 00 01     wlp0s29f7u5: WPA: Sending EAPOL-Key 2/4     WPA: KCK - hexdump(len=16): [REMOVED]     WPA: Derived Key MIC - hexdump(len=16): c1 ea 02 f5 f1 e3 47 51 44 b9 05 4b 04 37 bc 2a     wlp0s29f7u5: RX EAPOL from cc:33:bb:13:8a:f4     wlp0s29f7u5: IEEE 802.1X RX: version=1 type=3 length=175     wlp0s29f7u5:   EAPOL-Key type=2     wlp0s29f7u5:   key_info 0x13ca (ver=2 keyidx=0 rsvd=0 Pairwise Install Ack MIC Secure Encr)     wlp0s29f7u5:   key_length=16 key_data_length=80       replay_counter - hexdump(len=8): 00 00 00 00 00 00 00 02       key_nonce - hexdump(len=32): c8 c9 ae c3 18 6c 23 4a a0 38 99 55 ec 9c c5 da ad 2d 00 dd 7a b3 33 c2 20 8b ab 41 e5 cd 1e b6       key_iv - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00       key_rsc - hexdump(len=8): da 02 00 00 00 00 00 00       key_id (reserved) - hexdump(len=8): 00 00 00 00 00 00 00 00       key_mic - hexdump(len=16): 4c 67 eb c0 a0 be 0f ac 28 36 7d da e5 f2 b9 08     RSN: encrypted key data - hexdump(len=80): a5 39 e0 01 c0 2b 4b 12 f5 2d de e5 5f 1e 41 a3 f7 27 13 a6 cc 9a 94 a7 cb a5 7c 69 1c 3e 0f 4c 93 a5 93 7b cc c3 2b fc 20 47 ba d5 f3 60 5f c9 70 cb 71 b1 01 81 31 95 b0 a3 15 ef b6 fe f4 87 02 6d 7d f7 11 02 db b4 c3 92 ea ce 6e f3 a9 13     WPA: decrypted EAPOL-Key key data - hexdump(len=72): [REMOVED]     wlp0s29f7u5: State: 4WAY_HANDSHAKE -> 4WAY_HANDSHAKE     wlp0s29f7u5: WPA: RX message 3 of 4-Way Handshake from cc:33:bb:13:8a:f4 (ver=2)     WPA: IE KeyData - hexdump(len=72): 30 18 01 00 00 0f ac 02 02 00 00 0f ac 04 00 0f ac 02 01 00 00 0f ac 02 00 00 dd 26 00 0f ac 01 01 00 9c 1c 9f 0b f1 8d 96 63 e1 a9 8e e6 f8 74 95 71 ee 71 65 d5 e5 3e df 4c 42 ae 80 a1 e3 b1 a7 5f dd 00 00 00 00 00     WPA: RSN IE in EAPOL-Key - hexdump(len=26): 30 18 01 00 00 0f ac 02 02 00 00 0f ac 04 00 0f ac 02 01 00 00 0f ac 02 00 00     WPA: GTK in EAPOL-Key - hexdump(len=40): [REMOVED]     wlp0s29f7u5: WPA: Sending EAPOL-Key 4/4     WPA: KCK - hexdump(len=16): [REMOVED]     WPA: Derived Key MIC - hexdump(len=16): f9 ab 08 31 3c b6 d4 55 6b 2f 39 9d bb 9a 99 a8     wlp0s29f7u5: WPA: Installing PTK to the driver     wpa_driver_wext_set_key: alg=3 key_idx=0 set_tx=1 seq_len=6 key_len=16     EAPOL: External notification - portValid=1     wlp0s29f7u5: State: 4WAY_HANDSHAKE -> GROUP_HANDSHAKE     RSN: received GTK in pairwise handshake - hexdump(len=34): [REMOVED]     WPA: Group Key - hexdump(len=32): [REMOVED]     wlp0s29f7u5: WPA: Installing GTK to the driver (keyidx=1 tx=0 len=32)     WPA: RSC - hexdump(len=6): da 02 00 00 00 00     wpa_driver_wext_set_key: alg=2 key_idx=1 set_tx=0 seq_len=6 key_len=32     wlp0s29f7u5: WPA: Key negotiation completed with cc:33:bb:13:8a:f4 [PTK=CCMP GTK=TKIP]     wlp0s29f7u5: Cancelling authentication timeout     wlp0s29f7u5: State: GROUP_HANDSHAKE -> COMPLETED     wlp0s29f7u5: CTRL-EVENT-CONNECTED - Connection to cc:33:bb:13:8a:f4 completed [id=0 id_str=]     wpa_driver_wext_set_operstate: operstate 0->1 (UP)     netlink: Operstate: linkmode=-1, operstate=6     EAPOL: External notification - portValid=1     EAPOL: External notification - EAP success=1     EAPOL: SUPP_PAE entering state AUTHENTICATING     EAPOL: SUPP_BE entering state SUCCESS     EAP: EAP entering state DISABLED     EAPOL: SUPP_PAE entering state AUTHENTICATED     EAPOL: Supplicant port status: Authorized     EAPOL: SUPP_BE entering state IDLE     EAPOL authentication completed successfully     RTM_NEWLINK: operstate=1 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])     RTM_NEWLINK, IFLA_IFNAME: Interface 'wlp0s29f7u5' added     WEXT: if_removed already cleared - ignore event     EAPOL: startWhen --> 0     EAPOL: disable timer tick     RTM_NEWLINK: operstate=1 ifi_flags=0x1003 ([UP])      Device info:               # lsusb | grep WLAN     Bus 004 Device 004: ID 0bda:8178 Realtek Semiconductor Corp. RTL8192CU 802.11n WLAN Adapter      Firmware: `rtlwifi/rtl8192cufw.bin` Interface driver: `rtl8192cu` OS:               # uname -a     Linux archiso 3.10.10-1-ARCH #1 SMP PREEMPT Fri Aug 30 11:30:06 CEST 2013 x86_64 GNU/Linux      The progress usually pauses at the `EAPOL: disable timer tick` line for some seconds before continuing. Any ideas what could be wrong? The output is mostly Greek to me. Do I need to do anything else in the background, such as renewing the DHCP lease, when the connection is established to utilise it as soon as possible? And finally, is -40 dB considered a "bearable" link quality? **Update** : In `dmesg` I now have an enormous amount of stuff like this:               wlp0s29f7u5: Connection to AP cc:33:bb:13:8a:f4 lost     cfg80211: Calling CRDA to update world regulatory domain     wlp0s29f7u5: authenticate with cc:33:bb:13:8a:f4     wlp0s29f7u5: send auth to cc:33:bb:13:8a:f4 (try 1/3)     wlp0s29f7u5: send auth to cc:33:bb:13:8a:f4 (try 2/3)     wlp0s29f7u5: send auth to cc:33:bb:13:8a:f4 (try 3/3)     wlp0s29f7u5: authentication with cc:33:bb:13:8a:f4 timed out     wlp0s29f7u5: authenticate with cc:33:bb:13:8a:f4     wlp0s29f7u5: send auth to cc:33:bb:13:8a:f4 (try 1/3)     wlp0s29f7u5: authenticated     wlp0s29f7u5: associating with AP with corrupt beacon and probe response     wlp0s29f7u5: associate with cc:33:bb:13:8a:f4 (try 1/3)     wlp0s29f7u5: RX AssocResp from cc:33:bb:13:8a:f4 (capab=0x431 status=0 aid=24)     wlp0s29f7u5: associated     wlp0s29f7u5: Connection to AP cc:33:bb:13:8a:f4 lost     cfg80211: Calling CRDA for country: PL     wlp0s29f7u5: authenticate with cc:33:bb:13:8a:f4     wlp0s29f7u5: send auth to cc:33:bb:13:8a:f4 (try 1/3)     wlp0s29f7u5: send auth to cc:33:bb:13:8a:f4 (try 2/3)     wlp0s29f7u5: send auth to cc:33:bb:13:8a:f4 (try 3/3)     wlp0s29f7u5: authentication with cc:33:bb:13:8a:f4 timed out     wlp0s29f7u5: authenticate with cc:33:bb:13:8a:f4     wlp0s29f7u5: send auth to cc:33:bb:13:8a:f4 (try 1/3)     wlp0s29f7u5: authenticated     wlp0s29f7u5: associating with AP with corrupt beacon and probe response     wlp0s29f7u5: associate with cc:33:bb:13:8a:f4 (try 1/3)     wlp0s29f7u5: RX AssocResp from cc:33:bb:13:8a:f4 (capab=0x431 status=0 aid=24)     wlp0s29f7u5: associated     wlp0s29f7u5: Connection to AP cc:33:bb:13:8a:f4 lost      There are a number of weird things going on here:   * What is a "corrupt beacon and probe response" and how do I fix it?   * Why does it think I'm in Poland when I'm in the UK?   * Why does the first three connection attempts always time out while the fourth succeeds?


parsing file from ls -laLR

ls -laLR /home/tools > all_site1.txt      I need the state of all folders and files in subfolders of `/home/tools`. With this command I put all in this file. What I need now is a solution how to parse from this file `all_sites1.txt` only lines where owner of dir or owner of the file is root. I tried this:               awk '/root/{print $0}' all_sites1.txt      But I get all places where `root` occurs. I need only those entries where owner is root and what file and/or dir is to be printed.


splitting the string in bash script

I am new to bash script. I am taking some input from user and checking details about that. Example:               $HOME/Documents/test/one.txt      I take the above string as an input and want to retrieve `one.txt`, I need to further proceed with `one.txt`. I am not putting up the whole question as I want to put inputs from my side. I am stuck at this point and without splitting up the string, I will not be able to move ahead.


Chmod by Letters Vs Numbers

I was recently asked by a colleague to use `chmod` with letters instead of numbers. Apart from the obvious readability advantage is there any particular reason to use letters over numbers ?


I am working on petalinux, a linux port for Xilinx FPGAs called Zynq. The tool that I am using is `petalinux-config`. This opens a GUI where I can select various options, such as compress kernel, enable/disable CRC, rootfs etc etc. After this configuration I have to build with `petalinux-build` This often compiles well, but some times after I change some settings I get the following error:               No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'.  Stop.               [root@xilinx kernel]# petalinux-build     INFO: Checking component...     INFO: Generating make files and build linux     INFO: Generating make files for the subcomponents of linux     INFO: Building linux     [INFO ] build system.dtb     [INFO ] build linux/kernel     [ERROR] make[5]: *** [silentoldconfig] Error 1     [ERROR] make[4]: *** [silentoldconfig] Error 2     [ERROR] make[3]: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'.  Stop.     [ERROR] make[2]: *** [sub-make] Error 2     [ERROR] make[1]: *** [/home/suheb/petalinux-v2013.10-final/Xilinx-ZC702-14.7/build/linux/kernel/xlnx-3.8/vmlinux] Error 2     ERROR: Failed to build linux      _What is the meaning of this error?_ Are there any general guidlines to tackle such errors? I understand that if I remove some features which are really needed by the OS, then it will not compile. But my idea is to make my image as small as possible so I need to remove more and more features, and compile it successfully. I would like to understand, is this error because I have deselected some features (and those are required by some other modules) or it is some other problem such as user ownership/permission etc?


How to make the login shell xterm use utf-8?

I use _xterm_ (X-Win32 2012 Build 30 from StarNet Communications Corp) to login from a Windows 7 PC to a Red Enterprise Linux 6 (RHEL6). My problem is that all multi-byte utf-8 characters comes out garbled in the xterm login shell. For example, here's how the string "Wilhelm Röntgen" is rendered in the two shell instances (the font used is a Unicode font and is the same font in both shell instances):                Login shell: Wilhelm RÃ¶ntgen      Second shell: Wilhelm Röntgen      If I've understood things correctly the software from rom StarNet Communications Corp implements (or emulates) a X terminal (a thin client that runs a X server). I.e. both shell instances runs in a X terminal window on the PC, and communicates with RHEL6 using the X11 protocol. Below is how both shells appear on my desktop, catenating a file with unicode multibye characters to the terminal. ![enter image description here](http://i.stack.imgur.com/bgEVQ.png) Here is the command I've configured X-Win32 to use to start the login shell:               xterm -u8 -ls      However, _after_ I login, I can do `xterm` in the login shell, and that command that will fork a new xterm instance where locale setting works as expected (i.e. utf-8 characters are rendered correctly). Here is the relevant settings as they appear in the login shell:               $ locale     LANG=en_US.UTF-8     LC_CTYPE=en_US.UTF-8     LC_NUMERIC="en_US.UTF-8"     LC_TIME="en_US.UTF-8"     LC_COLLATE=C     LC_MONETARY="en_US.UTF-8"     LC_MESSAGES="en_US.UTF-8"     LC_PAPER="en_US.UTF-8"     LC_NAME="en_US.UTF-8"     LC_ADDRESS="en_US.UTF-8"     LC_TELEPHONE="en_US.UTF-8"     LC_MEASUREMENT="en_US.UTF-8"     LC_IDENTIFICATION="en_US.UTF-8"     LC_ALL=          $ printenv XTERM_LOCALE     en_US.UTF-8      I also have the following two lines in .Xresources:               xterm*locale: true     xterm*utf8: 1      It looks like the login shell xterm doesn't recognise the locale I've set, but I don't understand why not. My xterm is clearly capable of this, since all non-login shells do this by default.


How to install with pacman in ArchLinux without asking the user y/n?

I am looking for the equivalent of RHEL's `yum -y` in ArchLinux's `pacman` so that I can install packages with a shell script without asking the user questions.


php Mails not send with in domain

My setup : Our current server _90.0.0.50_ [example] which is containing domain _testdom.com_. _testdom.com_ 's `MX` record points to Google mail. Due to some issues we need to host our domain on some other server _90.0.0.60_ [example], so I'm setting up environment for _testdom.com_ on _90.0.0.60_. Once I complete my setup, I can point our `A` record from the current server to the new one. I've created domain with plesk _testdom.com_ on _90.0.0.60_ , all is working fine, My issue with sending mail by php function. I can send mail to all domains, but my own domain! eg from: `admin@testdom.com` to `support@testdom.com` When I googled all said about mydestination. In mycase it's                mydestination = localhost.$mydomain, localhost, localhost.localdomain      Please help me solve this issue, as I need this to switch to my new server. Versions :               Operating System : CentOS 6.4     Send Mail        : Postfix-2.8.4     PHP              : PHP 5.3.3     Plesk            : 10.4.4     domain           : testdom.com // example


gnome-terminal: cursor blinks in inactive window

I am using `gnome-terminal` in LXDE. When I have several `gnome-terminal` windows open, after some time the cursor in the inactive window starts to blink as well, as if the inactive window was actually active. This only happens with `gnome-terminal`. Other terminal emulators such as `LXTerminal` work fine. see video of the problem here: http://youtu.be/nRBehoJ1L7Y I am aware of this bug. But this should have been fixed in my version of xserver-xorg-core 1.12.4-6. I am using Debian Wheezy and gnome-terminal 3.4.1.1-2 I am wondering if this could be caused because I am using `gnome-terminal` on LXDE. Could there be some gnome component missing? I have no way of testing if the same problem exists on Gnome.


Mouse scrolling in CDE file manager

I cannot scroll using the mouse wheel inside CDE file manager (dtfile). Scrolling inside terminal or text editor or anything else works fine. How can I configure it to allow for mouse wheel scrolling? Solaris 10 on SPARC.


after replacing motherboard, Debian gets blank screen while booting

I have Debian installed on one computer. I just replaced its motherboard and CPU. And graphics card, because I use onboard one. I kept my old hard disk. Now machine boots well, grub starts well, initrd starts well and asks me for a password (because my disk is LUKS encrypted), but then about when it usually changes to framebuffer, monitor goes black and that's all. I guess the hardware is not faulty - I boot knoppix on it and it works well. I guess the problem may be that my initrd does not contain drivers for my new graphics card - can it be the problem? If so, what should I do? The last things which I see on screen before it goes blank is:               INIT: version 2.88 booting     [info] using makefile-style concurrent (...)     [ ok ] Starting the hotplug events (...)     [ ok ] Synthesizing th initial (...)     [....] Waiting for /dev/to be fully (...)      mmio address 0xfec000f0 already in use      Somebody advised me to pass these parameters to kernel:               nofb vga=normal      So while in grub I chose the entry I use to boot, I pressed "e" to edit it, I found a line starting with _linux vmlinuz-3.2.0-3-686-pae root=(...)_ and at its end I put "nofb vga=normal". Then I pressed F10 to boot, bu it did not help. Output of _hwinfo --gfxcard_ command is:               29: PCI 105.0: 0300 VGA compatible controller (VGA)     [Created at pci.318]     UDI: /org/freedesktop/Hal/devices/pci_1002_9616     Unique ID: ul7N.IXqEFkX9ypD     Parent ID: vSkL.2yY_xudKZ6E     SysFS ID: /devices/pci0000:00/0000:00:01.0/0000:01:05.0     SysFS BusID: 0000:01:05.0     Hardware Class: graphics card     Model: "ATI VGA compatible controller"     Vendor: pci 0x1002 "ATI Technologies Inc"     Device: pci 0x9616.     SubVendor: pci 0x1462 "Micro-Star International Co., Ltd."     SubDevice: pci 0x7641.     Driver: "radeon"     Driver Modules: "drm"     Memory Range: 0xd0000000-0xdfffffff (ro,non-prefetchable)     I/O Ports: 0xd000-0xdfff (rw)     Memory Range: 0xfebe0000-0xfebeffff (rw,non-prefetchable)     Memory Range: 0xfea00000-0xfeafffff (rw,non-prefetchable)     IRQ: 18 (16597 events)     I/O Ports: 0x3c0-0x3df (rw)     Module Alias: "pci:v00001002d00009616sv00001462sd00007641bc03sc00i00"     Driver Info #0:       Driver Status: radeon is active       Driver Activation Cmd: "modprobe radeon"     Config Status: cfg=new, avail=yes, need=no, active=unknown     Attached to: #9 (PCI bridge)     Primary display adapter: #29      Output of _hwinfo --framebuffer_ command is:               02: None 00.0: 11001 VESA Framebuffer     [Created at bios.464]     Unique ID: rdCR.NSbTZunW9ID     Hardware Class: framebuffer     Model: "(C) 1988-2005, ATI Technologies Inc.  RS880"     Vendor: "(C) 1988-2005, ATI Technologies Inc. "     Device: "RS880"     SubVendor: "ATI ATOMBIOS"     SubDevice:.     Revision: "01.00"     Memory Size: 16 MB     Memory Range: 0xd0000000-0xd0ffffff (rw)     Mode 0x0300: 640x400 (+640), 8 bits     (...)     Config Status: cfg=new, avail=yes, need=no, active=unknown


run a remote process via autossh in background

In Ubuntu I'm trying to run the `geany` editor on my local X display via the command:                autossh -o StrictHostKeyChecking=false -XCg me@otherDYNDNShost geany &      Trouble is, after the first disconnect & auto re-connect, I have to `fg` that process to make the (new) geany responsive again, in my local X windows session. Which means that `disown` from the terminal caused it to get lost into a frozen sleeping state altogether, eventually. How can I run this truly detached and independent of any terminal/tty? Appending `<&-` to the command to cut off STDIN didn't seem to matter either.


Installing GRUB from scratch

I am trying to make a scratch linux installation on a PC board that has an x86 processor running on it. It also has a compact flash drive on it to which I have copied my compiled kernel image. The problem I am having is with the bootloader aspect. I want to use GRUB, but I do not really know how to go about getting it onto the compact flash drive. Most documentation I have found is concerned with installing GRUB **after** you have a working installation of linux up and running. I had thought about using a USB floppy drive and using that with GRUB on a disc to boot the kernel image and from there try the grub- install approach mentioned in the GRUB documentation pages. Any advice on how to (or how not to) proceed will be gratefully received.


Install Broadcom wifi adapter driver in BackTrack 5 R1

How can I install the Broadcom BCM43142 driver in BackTrack 5 R1? Please can anyone guide me with step by step instructions as I am new at Linux.


No password prompt when using rsync remotely?

I have a bash script that executes rsync transfers to a remote location, and every time I execute the script I get asked for a password. Is there a way to avoid this? This is the command I use: `rsync -av /source usr@ip:/destination`


Converting a loop of code to function

I want to retry a command for 5 times with an interval of 20 seconds. I want this command to be passed as a method parameter. How to do it? And once the function is written how to pass the value to the function? I want my current code to be converted to a function which takes a set of parameters. How to write and call this function in my shell script? My current code is like this :                 trialNumber=0         until [ $trialNumber -ge 5]            do             ssh $USERID@$HOST $SCRIPT_LOCATION/runme.sh   # This line is my command and it may very with number of parameters or command itself.            [ $? -eq 0 ] && break           trialNumber=$[$trialNumber+1]           sleep 20        done      ( Above code is embedded at many places I want to move it into a function).


Why do I need to quote variable for if, but not for echo?

I've read that you need double quotes for expanding variables, e.g.               if [ -n "$test" ]; then echo '$test ok'; else echo '$test null'; fi      will work as expected, while               if [ -n $test ]; then echo '$test ok'; else echo '$test null'; fi      will always say `$test ok` even if `$test` is null. but then why don't we need quotes in `echo $test`?


Can I read what CCFLAGS were used for building a binary?

Is there any way to read from compiled code what CCFLAGS (particularly the optimizations) were set at compile time?


Postfix error: Relay access denied

I can't send mail to external email addresses such as gmail. When I try to send a mail with telnet I get the following error:               Trying 130.xx.xx.128...     Connected to mydomain.com.     Escape character is '^]'.     220 server2.mydomain.com ESMTP Postfix     mail from: info@mydomain.com     250 2.1.0 Ok     rcpt to: mymail@gmail.com     554 5.7.1 <mymail@gmail.com>: Relay access denied      This is my main.cf file:               queue_directory = /var/spool/postfix          command_directory = /usr/sbin     daemon_directory = /usr/libexec/postfix     data_directory = /var/lib/postfix     mail_owner = postfix     inet_interfaces = all      inet_protocols = all      mydestination = server2.myserver.com, localhost, localhost.localdomain     unknown_local_recipient_reject_code = 550      alias_maps = hash:/etc/aliases     alias_database = hash:/etc/aliases     debug_peer_level = 2      debugger_command =              PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin              ddd $daemon_directory/$process_name $process_id & sleep 5     sendmail_path = /usr/sbin/sendmail.postfix     newaliases_path = /usr/bin/newaliases.postfix     mailq_path = /usr/bin/mailq.postfix     setgid_group = postdrop     html_directory = no     manpage_directory = /usr/share/man     sample_directory = /usr/share/doc/postfix-2.6.6/samples     readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES     virtual_alias_domains = $virtual_alias_maps       virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf     virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf     virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf     virtual_mailbox_base = /var/vmail     virtual_uid_maps = static:5000     virtual_gid_maps = static:5000     smtpd_sasl_auth_enable = yes      broken_sasl_auth_clients = yes      smtpd_sasl_authenticated_header = yes                smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf, reject_unauth_destination     smtpd_use_tls = yes     smtpd_tls_security_level = may     smtpd_tls_cert_file = /etc/postfix/smtpd.cert     smtpd_tls_key_file = /etc/postfix/smtpd.key     transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf     relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf     relay_recipient_maps = mysql:/etc/postfix/mysql-virtual_relayrecipientmaps.cf     proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps     smtpd_sender_restrictions = check_sender_access mysql:/etc/postfix/mysql-virtual_sender.cf     smtpd_client_restrictions = check_client_access mysql:/etc/postfix/mysql-virtual_client.cf     maildrop_destination_concurrency_limit = 1     maildrop_destination_recipient_limit = 1     virtual_transport = maildrop     header_checks = regexp:/etc/postfix/header_checks     mime_header_checks = regexp:/etc/postfix/mime_header_checks     nested_header_checks = regexp:/etc/postfix/nested_header_checks     body_checks = regexp:/etc/postfix/body_checks     myhostname = server2.myserver.com     mynetworks = 127.0.0.0/8 [::1]/128     content_filter = amavis:[127.0.0.1]:10024     receive_override_options = no_address_mappings      What should I do?


bash: iptables: command not found

How do I fix the `iptables: command not found` problem that happened to Debian 7.6?               batman@gotham:~$ uname -a     Linux gotham 3.14-0.bpo.2-amd64 #1 SMP Debian 3.14.13-2~bpo70+1 (2014-07-31) x86_64 GNU/Linux     batman@gotham:~$ iptables -L     bash: iptables: command not found     batman@gotham:~$ sudo apt-get install iptables     [sudo] password for batman:      Reading package lists... Done     Building dependency tree            Reading state information... Done     iptables is already the newest version.     0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.     batman@gotham:~$      I googled extensively and most of the answers were for CentOS and Fedora that dated back to 2005 and 2009.


rsync is changing my directory permissions

I have an rsync setup that transfers files from my local development machine to my production web server. On the production server, the `storage` directory needs to be 775. When the rsync completes, it gets changed to 755


Adding Buildroot Package

I'm trying to add a package to buildroot, but I'm not having much success. The package I'm trying to add is an autotools package called scew. I've followed the buildroot guidelines about adding packages, and although the package is listed when `make menuconfig` is run, when I run `make` the package is missing from the final `rootfs.tar`. I've also copied over another simple `.mk` file that's used to install `which`, and changed the variable names and URL accordingly. Here is my copy of `scew.mk`:               SCEW_VERSION = 1.1.3     SCEW_SITE = http://savannah.nongnu.org/download/scew/     SCEW_LICENSE = GPLv3     SCEW_LICENSE_FILES = COPYING          $(eval $(autotools-package))      In the same directory I have `Config.in`, which looks like:               config BR2_PACKAGE_SCEW        bool "scew"        help        google scew      I've also added the following lines to `package/Config.in`:               menu "My Packages"           menu "Packages I Wrote"      source "package/MyPackages/packagesIWrote/hello/Config.in"      source "package/MyPackages/packagesIWrote/helloworld/Config.in"      endmenu           menu "External Packages"      source "package/MyPackages/external-packages/scew/Config.in"      endmenu          endmenu      This part seems to work, as the packages are listed and can be selected. The hello and helloworld packages are copies from a guide to adding packages, taken from this website (written in french):Adding Hello Wolrd The hello world packages also do not work. I'd be glad of any advice at all, as it seems I'm just going around in circles on this one, and I can't see what I'm doing wrong.


Is there a tr for translating into longer strings?

`tr` is great for translating a set of characters to another set of characters. Sometimes, I want to translate a set of characters to a set of _strings_ , e.g. all `<` and `>` to `<` and `>`. Pulling out sed/awk/perl for such a task seems unnecessary. Is there another common command that can accomplish simple substitutions?


bash script to gzip files

I have to make a bash script that do a gzip of a file if is older than 60 days, and move it in a subdir which name is the beginning of the filename. Here an example of the files I have to work with:               -rw-r--r-- 1 X X    0 2012-10-15 11:19 glux21-x1.csv     -rw-r--r-- 1 X X    0 2012-10-15 11:19 GLUX21-x34.csv     -rw-r--r-- 1 X X    0 2012-10-15 11:19 glux226.csv     -rw-r--r-- 1 X X    0 2012-10-15 11:19 glux228.csv     -rw-r--r-- 1 X X    0 2012-10-15 11:19 glux230.csv     -rw-r--r-- 1 X X    0 2012-10-15 11:19 glux232.csv     -rw-r--r-- 1 X X    0 2012-10-15 11:19 glux234.csv     -rw-r--r-- 1 X X    0 2012-10-15 11:19 glux236.csv     -rw-r--r-- 1 X X    0 2012-10-15 11:19 glux255.csv      So, for example, the glux21-x1.csv should be gzipped and moved in the glux21 subdir, as for the GLUX21-x34.csv file. The glux255.csv should go in the glux255 subdir.


Library Migration

I have one pre-compiled shared library, which require GLIBC-2.9 But I want to use it against GLIBC-2.8. I am very much sure, source code have not used any function which was introduces in 2.9 Since the library is closed-source, I can not download source code and compiled it against the desired environment. Is there any method to use pre-compiled library in another environment ?


xrandr config not loading properly at startup from .xprofile

I'm using `xrandr` to rescale the resolution on a netbook (Ubuntu 12.10). When I run the following command it works fine:               xrandr --output LVDS1 --mode 1024x600 --panning 1280x720 --scale 1.25x1.2      However when I put that command into `.xprofile` to load it at startup the screen has a black border in the expanded area rather than the proper output. I'm using exactly the same command so I'm not sure why it's not working.


Python 2.7 on CentOS 5

Are there any half-official repositories for CentOS 5 with Python 2.7? EPEL provides only Python 2.6


Disk space management

How will I be able to view my entire hard disk space in CentOS? I have tried `fdisk -l` but it will show me the entire space available but I am not able to judge that where all the space have been located. I have 500G and I can view only 20G in the `fdisk -l` command. Does the other 480G stay hidden? If that is the case, then how to access it?


How do you fire a sequence of commands at the command tool?

_I had a previous question (deleted it) and I still don't understand why it is so hard to understand what I'm trying to ask, but I'll try once again and more clearly._ So I'm copying over several folders over from server A to server B, but the command for each copy process ('rsync') has to be executed from the command line, once for each folder. So, to copy folder A to server X, I execute a rsync command and once it's done copying, I execute a new rsync command to copy over folder B to server X. I've did a little research, that probably helps you answer my needs. But I'm looking for a way to write multiple commands at once, that fires one after another if the previous one is finished with his actions (thus finished copying). Usually, multiple commands are separated on one line by `;` semicolons or `&&` ampersands. The difference between is that if the first/previous command fails with semicolons, it still continues. If the command produces an error and you had used ampersands, than it will stop. Thus, I used semicolons in my process and let my computer going on overnight.. but it only executed the first command, even though I written several on one line separated with semicolons. So It should have executed all of them, one by one... So first: How do I correctly execute multiple commands and B, what is wrong with my command?               sudo rsync -v -v -r -h -t —progress /Volumes/My\ Book/Backups.backupdb/MbpScs-van-iSCS/2014-01-02-233653/SSDaeffer /Volumes/BackupMyBook/ViaMacbookMove/DitIsDeMap ;      sudo rsync -v -v -r -h -t —progress /Volumes/My\ Book/Backups.backupdb/MbpScs-van-iSCS/2014-01-09-152837/SSDaeffer /Volumes/BackupMyBook/ViaMacbookMove/DitIsDeMap ;     sudo rsync -v -v -r -h -t —progress /Volumes/My\ Book/Backups.backupdb/MbpScs-van-iSCS/2014-01-20-201229/SSDaeffer /Volumes/BackupMyBook/ViaMacbookMove/DitIsDeMap ;     sudo rsync -v -v -r -h -t —progress /Volumes/My\ Book/Backups.backupdb/MbpScs-van-iSCS/2014-02-21-130931/SSDaeffer /Volumes/BackupMyBook/ViaMacbookMove/DitIsDeMap ;     sudo rsync -v -v -r -h -t —progress /Volumes/My\ Book/Backups.backupdb/MbpScs-van-iSCS/2014-03-05-113353/SSDaeffer /Volumes/BackupMyBook/ViaMacbookMove/DitIsDeMap ;     sudo rsync -v -v -r -h -t —progress /Volumes/My\ Book/Backups.backupdb/MbpScs-van-iSCS/2014-03-19-162703/SSDaeffer /Volumes/BackupMyBook/ViaMacbookMove/DitIsDeMap ;     sudo rsync -v -v -r -h -t —progress /Volumes/My\ Book/Backups.backupdb/MbpScs-van-iSCS/2014-05-13-215016/SSDaeffer /Volumes/BackupMyBook/ViaMacbookMove/DitIsDeMap ;     sudo rsync -v -v -r -h -t —progress /Volumes/My\ Book/Backups.backupdb/MbpScs-van-iSCS/2014-06-01-231321/SSDaeffer /Volumes/BackupMyBook/ViaMacbookMove/DitIsDeMap      _I separated them with breaks here for readability purposes. Normally it's one whole line_ This usually goes by with a `;` semicolon character


Unable to uninstall an rpm on RHEL6

I'm trying to remove a package from a system I am responsible for. Everytime I try it fails, though. The error it give is               Error in PREUN scriptlet in rpm package vmware-open-vm-tools-xorg-utilities      I looked at the script using `rpm --scripts -qa vmware-open-vm-tools-xorg- utilities`. Looking at the scriptlet I'm interested in I see this:               preuninstall scriptlet (using /bin/sh):     if [ $1 -eq 0 ] && [ -e /usr/lib/vmware-tools/install/vmware-open-vm-tools-xorg-utilities ]; then        # This is an uninstall        /usr/lib/vmware-tools/install/vmware-open-vm-tools-xorg-utilities/installer uninstall     fi      Theoretically it should uninstall and, on several other servers, it has. This is the only server I'm having this issue on. Aside from above error I can't see anything else that would prevent this. The directory being sought exists and, as far as I can tell, no options are being passed to the scriptlet. Anyone know what I should be looking at to figure this out?


Expect script variable matching ruined by a space

I'm trying to automate some operations with the VC systems I administer, and the manufacturer has MANY inconsistencies in their interface. I'm trying to match a system H323 name and device name, but... If I do **systemname get** , the answer is **name\r\n** If I do **h323name get** , the answer from the device is **name \r\n**. -> the space between name and CR is killing me. In both cases, I'm using **expect "*\r\n"** and then using **$expect_out(0,buffer)** as my variable. Of course, later on when I try to match the names, I always get a negative, even though the names are the same. How can I manipulate the variables or change what I'm expecting to get: 1. rid of the space bar for h323name or 2. add a space bar after systemname so my query will work?


How does multilib work?

In older distributions there was the `ia32-libs` meta package, now both Debian and Ubuntu switched to `multilib`. I wonder what the differences are and what I'm supposed to do to re-create a 32 bit environment under a 64 bit distribution.


How to get more information about Java processes from atop?

I have several java apps running on a machine and atop only tells me `CMD java` is there a way to get more information about that process, as I have +20 `java` in the list and I don´t know which one is which software. I know that htop can give me more insight with the tree view, but I would like to know if something similar is possible in atop. :) ### Update #1 I tried it with `-c` which shows me how the app was started, but the problem is that it gets started by a wrapper which starts all apps the same way. Which means that all processes look like this:               $ java -Xms1G -Xmx2G ...       If I use `htop`, I can switch to a tree view which gives me more information as I can see how the wrapper was started:               $ bash /path-which-tells-me-the-name-of-the-app/wrapper.sh     |-- java -Xms1G -Xmx2G ...      |--|--thread1     |--|--thread2     |--|--...`      According to the comments, I would like to be able to get a quick overview which of the 20 processes/apps is causing how much CPU and i/o usage.


Writing single-handed layouts for X

I know someone who'd really like to be able to type with only the left hand, so I had the idea of writing a layout which "switches" the sides of the keyboard when the caps lock key is pressed. For example, in the QWERTY layout, the qwerty keys would be remapped to uiop[]. I wrote the following `xmodmaprc` (caps lock line at the bottom):               keycode 24 = q Q u U     keycode 25 = w W i I     keycode 26 = e E o O     keycode 27 = r R p P     keycode 28 = t T bracketleft braceleft     keycode 29 = y Y bracketright braceright          keycode 30 = u U q Q     keycode 31 = i I w W     keycode 32 = o O e E     keycode 33 = p P r R     keycode 34 = bracketleft braceleft t T     keycode 35 = bracketright braceright y Y          keycode 38 = a A j J     keycode 39 = s S k K     keycode 40 = d D l L     keycode 41 = f F semicolon colon     keycode 42 = g G apostrophe quotedbl     keycode 43 = h H Return Return          keycode 44 = j J a A     keycode 45 = k K s S     keycode 46 = l L d D     keycode 47 = semicolon colon f F     keycode 48 = apostrophe quotedbl g G     keycode 36 = Return Return h H          keycode 52 = z Z n N     keycode 53 = x X m M     keycode 54 = c C comma less     keycode 55 = v V period greater     keycode 56 = b B slash question          keycode 57 = n N z Z     keycode 58 = m M x X     keycode 59 = comma less c C     keycode 60 = period greater v V     keycode 61 = slash question b B          keysym Caps_Lock = Mode_switch      However, this only works when holding the Caps Lock key, and doesn't "toggle" the mode by tapping it. Am I missing something simple, or am I trying to solve this issue the wrong way?


extracting to a directory other than the current directory with pax archiver

I have a strange behaviour with the pax archiver here, had too much troubles with tar and it's absolute path, that's why I gave pax a shot. The below oneliner is used under FreeBSD 9.2 to extract encrypted archives. Basically it works quite well, but when trying to extract the archive to another path than the working directory, I get the error message:               WARNING! These patterns were not matched:     /home/myuser/testing      Example:                   cd /home/myuser              gpg --no-tty --quiet --no-secmem-warning --yes --batch --passphrase-file /home/myuser/keyfile --decrypt /home/myuser/testing/20110426.pax.xz.gpg | unxz | pax -r          # SUCCESS                                                                                # SUCCESS              gpg --no-tty --quiet --no-secmem-warning --yes --batch --passphrase-file /home/myuser/keyfile --decrypt /home/myuser/testing/20110426.pax.xz.gpg | unxz | pax -r /home/myuser         # SUCCESS                                                                                # SUCCESS              gpg --no-tty --quiet --no-secmem-warning --yes --batch --passphrase-file /home/myuser/keyfile --decrypt /home/myuser/testing/20110426.pax.xz.gpg | unxz | pax -r /home/myuser/testing         # FAILS                                                                                # FAILS              gpg --no-tty --quiet --no-secmem-warning --yes --batch --passphrase-file /home/myuser/keyfile --decrypt /home/myuser/testing/20110426.pax.xz.gpg | unxz | pax -r /home/myuser/testing/         # FAILS                                                                                # FAILS      There is definately write permission on `/home/myuser/testing/` on top of that, I'm executing it as root. Does that really "works as designed" and I have to `cd /output/path` before each extraction or am doing something wrong?


Changing the PATH variable for a process running as a user on Linux

I have a server application which I start using an init.d script and run as a user:               su $USER -c "${PLAY} start ${APPLICATION_PATH} --%prod-test >/dev/null"      The application needs ffmpeg, which is a special build, and is located in the users home directory:               /home/user/bin/ffmpeg      How can I add this to the PATH variable, as ~/bashrs is not called for this use. (when I use 'su user' to logon as the user the variable is there, but not for the process if I check:               /proc/pid/environ      Ideally I would prefer if it would only be added for this specific user, as other parts of the system use ffmpeg from the repos. Any help is really appreciated!


Is it possible to dynamically change the --limit-rate parameter of curl?

As a followup question to this one: I am using the `\--limit-rate` parameter to limit the download speed on computers whose internet is being used: > curl --limit-rate 10k -r 104857601-209715200 -o distro2.iso > 'http://files.cdn/distro.iso' I want to periodically monitor the network usage of each computer, and dynamically decrease the `\--limit-rate` once the internet is being used by the user and increase it as the internet usage becomes idle. For now, the only solution that comes to my mind is to restart `curl` with updated `\--limit- rate` and `-r` parameter values. Is there any better way to achieve this?


How to send snmp trap when syslog is logged?

I need to send snmp trap n number of host whenever any `syslog` is logged in `/var/log/messages`. How can I do this, can anybody give me any idea?


Metadata for exchanging BSD mailbox files

The BSD mailbox format has, according to Jamie Zawinski, never been formally documented (see his anti-content-length rant), and does not have, as far as I know, any formal identifiers that may be used as metadata for identifying a file to applications as being a BSD mailbox, except for the fact it has the 4-byte magic number 0x46726f6d. I'd like to know if there any conventions for identifying these mailbox files. So far I have found:   1. the file extension `.mbox` used on some sites, supported with local scripting, but because I haven't seen this used in any widely used applications, I think this doesn't count as a convention - by contrast, RFC *822 messages are often given the .eml extension, which is widely supported, including by Microsoft and Apple; and   2. no MIME type for it: it is not in the list of IANA types, although there may be informal extended types for it. ### Postscript Note that I am asking for a way of communicating that a file is a BSD mailbox file, not a recogniser for them. And note also that a recogniser for BSD mailbox files that is not sure to reject mailbox files that use the Content- Length encoding is a dangerous thing, for the reasons Jamie gives in the link above: the same file might represent completely different sequences of email messages under the two schemes.


Driver install fixes gnome on old laptop but Ice Weasel hangs the desktop

I installed Wheezy on an old laptop with a Quadro4 go700 video card in it. Gnome did not like it and the display was corrupted. Therefore, I disabled the Nouveau driver, downloaded the Nvidia Linux driver (which has its own installer), and went through the manual process of installing the driver. After this the Gnome Desktop worked perfectly and graphics are correct, but if I run Ice Weasel, the default browser, the desktop hangs. I can still activate a virtual terminal with Alt-F1. Any ideas what could be wrong?


How to run script when SSSD creates home directory for a new user

I have a network with several RHEL6 workstations and RHEL IdM Server (a.k.a. FreeIPA) as a domain controller. Every LDAP user can log into the every workstation. When the user is logging in for the first time, SSSD creates $HOME/$USER directory for them. I would like to set customized Gnome configuration for each user with this command: > nautilus-actions-new --label="Shred" --tooltip="Purge file" --icon="gtk- > dialog-warning" --toolbar-label="Shred" --command="shred" --parameters="-f > -u -v -z %f" -g As I know, Gnome settings are stored locally in the homedir of each user and there is no possibility to set them globally for every user. So I wonder are there any hooks to SSSD's new homedir creating event in order to run the mentioned command?


Skipping pseudo-directories with find /

There are some directories that can cause problem with find, and especially "find /". These are directories in which the OS creates files which are not really files. Among these directories are /proc /sys /run. The thing is that if you are doing something like find / -exec grep, you can mess up the system real bad if you crawl some of these systems. So how can I tell find to skip these directories without listing them. Because someone just may decide to create a new directory like this. Rather then rely on a list I would rather have a test for the directory and an option to exclude directories that fail this test.


"Missing separate debuginfo for ..." when running gcore

I am running the following:               command: gcore 56058          output:     Missing separate debuginfo for /lib64/libdl.so.2     Try: zypper install -C "debuginfo(build-id)=dcca9c1f648bda0a7318a7c8844982c440e3e4a3"     Missing separate debuginfo for /lib64/librt.so.1     Try: zypper install -C "debuginfo(build-id)=a8648696e4118ee36ec41c9d75c0520c213ad6ea"     Missing separate debuginfo for /usr/lib64/libstdc++.so.6     Try: zypper install -C "debuginfo(build-id)=a6fb063da357832cfb5db486b331ab960937c906"     Missing separate debuginfo for /lib64/libm.so.6     Try: zypper install -C "debuginfo(build-id)=00ad299aa07655131d2732eee1b767b99cf9c85e"     Missing separate debuginfo for /lib64/libgcc_s.so.1     Try: zypper install -C "debuginfo(build-id)=9da24cf706b41e55ce5373bcb6253c1618b00abf"     Missing separate debuginfo for /lib64/libpthread.so.0     Try: zypper install -C "debuginfo(build-id)=a3bdfa74d39fa9e1c4252ecf5007f7e8c1fcb628"     [Thread debugging using libthread_db enabled]     [New Thread 0x20002407910 (LWP 56067)]     [New Thread 0x20001c07910 (LWP 56066)]     [New Thread 0x20001407910 (LWP 56065)]     [New Thread 0x20000c07910 (LWP 56064)]     [New Thread 0x20000037910 (LWP 56059)]     Missing separate debuginfo for /lib64/libc.so.6     Try: zypper install -C "debuginfo(build-id)=eeb7bc1f31ca2e17c31f5768901f653e47acd6d3"     Missing separate debuginfo for /lib/ld64.so.1      What are the debuginfo's about, what are they cause by and is there any reason for concern? Basically, what does it mean?


Why are interactive shells on OSX login shells by default?

In Linux and, to my knowledge, all Unix systems, terminal emulators run interactive, non-login shells by default. This means that, for bash, the started shell will: > When an interactive shell that is not a login shell is started, bash reads > and executes commands from `/etc/bash.bashrc` and `~/.bashrc`, if these > files exist. This may be inhibited by using the `\--norc` option. > > The `\--rcfile` file option will force bash to read and execute commands > from file instead of `/etc/bash.bashrc` and `~/.bashrc`. And for login shells: > When bash is invoked as an interactive login shell, or as a non-interactive > shell with the `\--login` option, it first reads and executes commands from > the file `/etc/profile`, if that file exists. After reading that file, it > looks for `~/.bash_profile`, `~/.bash_login`, and `~/.profile`, in that > order, and reads and executes commands from the first one that exists and is > readable. > > The `\--noprofile` option may be used when the shell is started to inhibit > this behavior. On OSX, however, the default shell (which is bash) started in the default terminal (Terminal.app) actually sources `~/.bash_profile` or `~.profile` etc. In other words, it acts like a login shell. **Main question** : Why is the default interactive shell a login shell on OSX? Why did OSX choose to do this? This means that all instructions/tutorials for shell based things that mention changing things in `~/.bashrc` will fail on OSX or vice versa for `~/.profile`. Still, while many accusations can be leveled at Apple, hiring incompetent or idiotic devs is not one of them. Presumably, they had a good reason for this, so why? Subquestions: Does Terminal.app actually run an interactive login shell or have they changed bash's behavior? Is this specific to Terminal.app or is it independent of the terminal emulator?


Debian doesn't boot after plugging new graphics card

Recently, I've replaced a basic ATI card to NVIDIA GeForce 750 Ti. Windows 8.1 and Ubuntu work fine, but Debian cannot even boot. After selecting standard boot: ![After standard boot](http://i.stack.imgur.com/MxdOS.jpg) And after boot in recovery mode: ![After boot in recovery mode](http://i.stack.imgur.com/jqvXu.jpg). I suppose that the nouveau would be the culprit, so I've downloaded the original Nvidia closed-source drivers' *.run file. Unfortunately, I can't install them since there is no access to CLI. How to solve my problem?


Auto answering password for OPENSSL using HEREDOC

I have the following command but it doesn't work for me...               cd /etc/postfix/ssl/ && openssl genrsa -des3 -rand /etc/hosts -out smtpd.key 1024 <<PASS     password     password     PASS      The output is:               109 semi-random bytes loaded     Generating RSA private key, 1024 bit long modulus     ...............................++++++     ...........++++++     e is 65537 (0x10001)     Enter pass phrase for smtpd.key:      It should auto answer the question and put password automaticaly. I always use `HEREDOC` for automating my Q&A on bash and work fine... What is the problem here? May be because of security issues, but how can we deal with such issues? I also know about this question but not able to resolve it. I am trying this one: (no result)               #!/bin/bash     PASS="password"     printf '%s\n' "$PASS" | {         openssl genrsa -des3 -rand /etc/hosts -out smtpd.key 1024 -passout fd:3     } 3<&0      any ideas?


Prevent the mouse to wake up display

I set my displays to sleep with `xset dpms force off` after locking the screen with kscreenlock. This is great, the displays wake up when the mouse is moved (by me, air, the cat). I'd like to set it in a way that only the keyboards can wake up the screens again. Is there some way to do this for the KDE screen locker or in general?


Is there a distribution with an installer that can automatically do LVM over LUKS with everything aligned as needed?

http://www.void.gr/kargig/blog/2012/01/11/linux-ssd-partition-alignment-tips/ talks about aligning SSD partitions and LVM physical volumes. http://rainbow.chard.org/2013/01/30/how-to-align-partitions-for-best- performance-using-parted/ refers to getting various parameters to be used in alignment. I'm looking for a distro with an installer to do all of this automatically after I specify the partition sizes. It doesn't matter which one it is, as I can install something else afterwards. Thanks!


FreeBSD switch to user with nologin

I am running FreeBSD jails. i have a user i need to login as to run some commands. The user shell account is nologin. Without switching the users shell. or running su commands for each command i need to run. is there a way to switch to that user in shell? or should i enable shell account and then disable it?


why do we not need export here?

$ IFS=";"          $ read first second      i am;a_i b c     $ echo $first     i am     $ echo $second     a_i b c          $ echo $IFS        1. Am I right that `read first second` is a subprocess of the current shell process? If yes, why don't we need `export IFS=";"`?   2. why is `IFS` empty?


Should I embed a command in a conditional or test its return code?

It's a simple question of best pratices: Which should I use? Option 1               ping -c1 "$host"          if [[ $? -eq 0 ]] ; then        command     else        command     fi      Option 2               if ping -c1 "$host" ; then        command     else        command     fi      I know this is a simple command, but if it grows big, the difference might be significant.


Crunchbang Linux Waldorf: Sound Problems with NVIDIA Corporation MCP61 High Definition Audio (rev a2)

$ lspci | grep -i audio     00:05.0 Audio device: NVIDIA Corporation MCP61 High Definition Audio (rev a2)     02:00.1 Audio device: Advanced Micro Devices [AMD] nee ATI Device aab0          $ sudo speaker-test          speaker-test 1.0.25          Wiedergabe-Gerät ist default     Stream-Parameter sind 48000 Hz, S16_LE, 1 Kanäle     Verwende 16 Oktaven rosa Rauschen     Kanal-Anzahl 1 nicht unterstützt: Das Argument ist ungültig     Fehler beim Setzen der Hardware-Parameter: Das Argument ist ungültig      I unmuted everything and independed is on in alsamixer, still it doesn't work. The Chip is VIA VT1705. Update 2014/09/10: It seems I got it works with kernel 3.13...


How can I scroll screen or tmux buffer without pausing the application?

I want to have the same behavior as `C-A`/`C-B`+`[` provides except i want to be able to return to my application to see that it has progressed in her calculations or has not disconnected to the server because of timeout. I've been told it's impossible because applications tend to keep modifying the buffer, but can't this be circumvented by, uh, actually modifying the buffer, or creating a temporary buffer?


How to design the table in awk?

My input file is file1               count  month          505  Apr-2010      252  Mar-2010      426  Feb-2010      201  Jan-2010      211  Dec-2009       Same file I want the output like this below               +-------+----------+     | count | month    |     +-------+----------+     |   505 | Apr-2010 |     |   252 | Mar-2010 |     |   426 | Feb-2010 |     |   201 | Jan-2010 |     |   211 | Dec-2009 |     +-------+----------+      I need your help.


Why is my keyboard typing the wrong letters?

While surfing with Iceweasel, I tried typing in a Web address, but I found, that every few keys, it started typing other letters instead of the ones I typed. For example, if I typed "c-c-c-c-c-c-c-c-c-c-c-c" it printed "ckexccccckex" or if I typed "a-b-c-d-e-f-g-h-j-i", it printed "abckexghi" instead.   * Each time this occurs, the misplaced letters are different, but always in some pattern. Sometimes, it places backspaces or spaces, not just letters.   * When I did not type anything, no words appeared.   * When I unplugged and replugged the USB keyboard, it still had the problem.   * The problem only appears in Iceweasel, in the URL bar or in text fields, but not in other applications.   * The problem went away after closing Iceweasel and reopening it.   * I can find no pattern in when it appears. How can I determine the cause? Could this be the result of a security issue? I am using Debian 7.0 with a Logitech K120 keyboard.


Awesome GNOME recognizes my media keys but fails to act upon them

I'm using Awesome GNOME. When I log into the GNOME Shell, my up and down volume keys work. When I login to Awesome GNOME, they don't. However, when I go into `gnome-control-center` to set them, the Keyboard section recognizes them just fine when I go to bind the keys to the volume actions. Basically I think what's happening is that GNOME understands the keys but doesn't have anything running to act upon them. How can I make Awesome GNOME work with the media keys? Note that I'm on Arch Linux, so I'm using GNOME 3.8 and Awesome 3.5.1 Ruby Tuesday. I'm using the `awesome-gnome` package from Arch's AUR. Also, the play/pause key doesn't work, but I didn't test this in the GNOME Shell.


Delete all files starting with a question mark

I have a folder in which I have around 4k files. Some of these files start with a a `?` or `!` character. I need to delete them but can't find an expression that would do so: `rm -f ./?*` just deletes everything. I can possibly use `grep` on ls and pipe it through `xargs` and move files to another folder but I was hoping there was a proper way of doing this. Need help on both the `?` and `!` files.


Compiling bitcoind on OpenBSD

The instructions to build bitcoind are vague enough, but I can't work out what to do on OpenBSD. I've installed boost, and the system has berkeley db 4.6, OpenSSL, etc already in the base install of OpenBSD.               # gmake -f makefile.unix                                  Building LevelDB ...     gmake[1]: Entering directory `/root/bitcoin/bitcoin-0.8.3/src/leveldb'     g++ -I. -I./include -fno-builtin-memcmp -D_REENTRANT -DOS_OPENBSD -DLEVELDB_PLATFORM_POSIX -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/root/bitcoin/bitcoin-0.8.3/src -I/root/bitcoin/bitcoin-0.8.3/src/obj -I/usr/local/include/boost -DUSE_UPNP=0 -DUSE_IPV6=1 -I/root/bitcoin/bitcoin-0.8.3/src/leveldb/include -I/root/bitcoin/bitcoin-0.8.3/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -c db/builder.cc -o db/builder.o     In file included from ./port/port.h:14,                  from ./db/filename.h:14,                  from db/builder.cc:7:     ./port/port_posix.h:80: error: '__BYTE_ORDER' was not declared in this scope     ./port/port_posix.h:80: error: '__LITTLE_ENDIAN' was not declared in this scope     gmake[1]: *** [db/builder.o] Error 1     gmake[1]: Leaving directory `/root/bitcoin/bitcoin-0.8.3/src/leveldb'     gmake: *** [leveldb/libleveldb.a] Error 2      Since writing I found I didn't have BDB 4.8 so I got it and compiled it into /usr/local/BerkeleyDB.4.8 I found some build instructions on github: https://github.com/bitcoin/bitcoin/pull/1815 I modified these as follows to suit where I installed BDB...               BOOST_INCLUDE_PATH=/usr/local/include \     BOOST_LIB_PATH=/usr/local/lib \     BDB_INCLUDE_PATH=/usr/local/BerkeleyDB.4.8/include \     BDB_LIB_PATH=/usr/local/BerkeleyDB.4.8/lib \     BOOST_LIB_SUFFIX=-mt \     gmake -f makefile.unix -j8 USE_UPNP= bitcoind test_bitcoin      Now the build fails, it looks boost related. There are hundreds of errors until some final ones...               db.cpp:510: error: 'boost' has not been declared     db.cpp:510: error: expected `;' before 'pathTmp'     db.cpp:511: error: 'pathTmp' was not declared in this scope     db.cpp:527: error: 'pathAddr' was not declared in this scope     db.cpp:527: error: 'RenameOver' cannot be used as a function     db.cpp: In member function 'bool CAddrDB::Read(CAddrMan&)':     db.cpp:536: error: 'pathAddr' was not declared in this scope     gmake: *** [obj/alert.o] Error 1     gmake: *** [obj/db.o] Error 1     gmake: *** [obj/checkpoints.o] Error 1