Vlc Media Problem in Fedora!

I am using Fedora 13 and my VLC media player is showing this problem for the past one week. How do i rectify this error. * * * Summary: SELinux is preventing /usr/bin/vlc from loading /usr/lib/vlc/plugins/codec/libdmo_plugin.so which requires text relocation. Detailed Description: The vlc application attempted to load /usr/lib/vlc/plugins/codec/libdmo_plugin.so which requires text relocation. This is a potential security problem. Most libraries do not need this permission. Libraries are sometimes coded incorrectly and request this permission. The SELinux Memory Protection Tests (http://people.redhat.com/drepper/selinux-mem.html) web page explains how to remove this requirement. You can configure SELinux temporarily to allow /usr/lib/vlc/plugins/codec/libdmo_plugin.so to use relocation as a workaround, until the library is fixed. Please file a bug report. Allowing Access: If you trust /usr/lib/vlc/plugins/codec/libdmo_plugin.so to run correctly, you can change the file context to textrel_shlib_t. "chcon -t textrel_shlib_t '/usr/lib/vlc/plugins/codec/libdmo_plugin.so'" You must also change the default file context files on the system in order to preserve them even on a full relabel. "semanage fcontext -a -t textrel_shlib_t '/usr/lib/vlc/plugins/codec/libdmo_plugin.so'" Fix Command: chcon -t textrel_shlib_t '/usr/lib/vlc/plugins/codec/libdmo_plugin.so' Additional Information: Source Context unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1 023 Target Context system_u:object_r:lib_t:s0 Target Objects /usr/lib/vlc/plugins/codec/libdmo_plugin.so [ file ] Source vlc Source Path /usr/bin/vlc Port Host (removed) Source RPM Packages vlc-core-1.1.3-1.fc13 Target RPM Packages vlc-core-1.1.3-1.fc13 Policy RPM selinux- policy-3.7.19-51.fc13 Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Plugin Name allow_execmod Host Name (removed) Platform Linux (removed) 2.6.34.6-47.fc13.i686.PAE #1 SMP Fri Aug 27 09:29:49 UTC 2010 i686 i686 Alert Count 3 First Seen Sat 04 Sep 2010 08:26:05 PM IST Last Seen Sat 04 Sep 2010 08:35:40 PM IST Local ID 48840a90-fea4-403b-95a3-6cadc80b1a0a Line Numbers Raw Audit Messages node=(removed) type=AVC msg=audit(1283612740.262:117): avc: denied { execmod } for pid=9594 comm="vlc" path="/usr/lib/vlc/plugins/codec/libdmo_plugin.so" dev=sda2 ino=789070 scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=system_u:object_r:lib_t:s0 tclass=file node=(removed) type=SYSCALL msg=audit(1283612740.262:117): arch=40000003 syscall=125 success=no exit=-13 a0=4439000 a1=1e000 a2=5 a3=bfbe2480 items=0 ppid=1 pid=9594 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=1 comm="vlc" exe="/usr/bin/vlc" subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null) * * * **Update** Well, i tried that now in terminal and nothing seems to happen. [chandru.math@chandru ~]$ chcon -t textrel_shlib_t '/usr/lib/vlc/plugins/codec/libdmo_plugin.so > It stops like this!


How to understand this fstab?

This is my fstab:               #     # /etc/fstab     # Created by anaconda on Sat Jan 12 02:12:44 2013     #     # Accessible filesystems, by reference, are maintained under '/dev/disk'     # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info     #     UUID=fb2b6c2e-a8d7-4855-b109-c9717264da8a /                       ext4    auto,noatime,noload,data=ordered,commit=10,defaults        1 1     UUID=71362665-f627-41e1-a093-de42a0a356e2 /boot                   ext3    defaults        1 2     UUID=8024a5cd-af4b-4776-af0d-65ad80af8649 swap                    swap    defaults        0 0     tmpfs                   /dev/shm                tmpfs   defaults        0 0     devpts                  /dev/pts                devpts  gid=5,mode=620  0 0     sysfs                   /sys                    sysfs   defaults        0 0     proc                    /proc                   proc    defaults        0 0     /usr/tmpDSK             /tmp                    ext3    defaults,noauto        0 0     /dev/sdd1               /home4                  auto    auto,noatime,noload,data=ordered,commit=10,defaults        0 0     /dev/sdc1               /home3                  auto    auto,noatime,noload,data=ordered,commit=10,defaults        0 0     /dev/sdb1               /home2                  auto    auto,noatime,noload,data=ordered,commit=10,defaults        0 0        1. What is UUID=fb2b6c2e-a8d7-4855-b109-c9717264da8a? Is it a partition in sda?   2. What is tmpfs,devpts,sysfs, and proc?   3. What is /usr/tmpDSK?Is it /dev/sdb /dev/sda or what? How do I get temporary directory in memory and then resort to disk when memory is full?


I can't start nfs in SLES 11

I'm trying to start nfs service in my SLES. I have my `/etc/exports` like this:               /var/share/testbed *(ro)      When I run `service nfs start`, it says:               Not starting NFS client services - no NFS found in /etc/fstab:      For `service nfs status`, it says:               Checking for mounted nfs shares (from /etc/fstab):idmapd not running


Nested read fails

I have a list of filenames in a file and want to do let the user decide what to do with each. In bash, iterating over filenames is not trivial in itself, so I followed this answer:               #!/bin/bash          while IFS= read -r THELINE;      do       read -n 1 -p "Print line? [y/n] " answer;       if [ ${answer} = "y" ];       then         echo "${THELINE}";       fi;     done < tester;      When I try to execute this (on a non-empty file), I get an error at the `if`:               line 5: [: =: unary operator expected      My best guess is that `answer` is not set properly, which would be caused by using two calls of `read` in a "nested" fashion since the following works as expected:               #!/bin/bash          for THELINE in $(cat "tester");     do       read -n 1 -p "Print line? [y/n] " answer;       if [ ${answer} = "y" ];       then         echo "${THELINE}";       fi;     done;      What is going on here? I run `bash 4.2.24(1)-release (x86_64-pc-linux-gnu)` on `3.2.0-37-generic #58-Ubuntu x86_64 GNU/Linux`.


While in vi how can I pull in / insert / paste the contents of another file

* I am editing file 'A' in vi.   * I have another file 'B' whose contents I want to 'paste' into my current location.   * Other than actual mouse copy and pasting, is there a command that I can use that will pull in the content of another file to my current edit location.


ICMP destination unreachable

I am working on an Arch Linux machine with an ethernet interface `eth1`. I have created the interface `eth1:0` using `ifconfig` and given it a dummy hardware address (`00:01:02:03:04:05`). When I send a UDP packet to a server application running on a remote server machine, I get back the right response. But then I see an ICMP Destination Unreachable going out from the `eth1:0` interface ip address. How can I mute this ICMP message? I have tried different mac addresses and set up an arp cache on both client and server machines without success. Appreciate any help and thanks in advance.


Is it possible to get the error message from previous command which failed when the conditional command runs using ||

I have a helper function:               function error_exit     {         /opt/aws/bin/cfn-signal ...         exit 1     }      This helper function is used to signal an error. Here is an example of usage:               /opt/aws/bin/cfn-init -s .. || error_exit 'Failed to run cfn-init'      The `cfn-init` command takes a lot of parameters which isn't relevant for the question. When the command returns a non-null value and possibly an error message to the error output, I would like to get the error message and include it to the `error_exit` method as a parameter. Is this possible? If not, how would you implement a helper method in bash which makes it possible to get the source error message?


Weird Wi-Fi connection issue on Linux Mint 16

We have a LG-R590 laptop and an AirTies 5343 WLAN router at home. When the router broadcasts the SSID of the wireless home network I cannot connect to the network automatically, I have to connect to the network as if its SSID were hidden. When I set the router to hide the SSID of the home network the wireless network browser in Mint MATE is able to see and connect to the network. However, in this case the SSID is hidden in Windows as expected and leads to undesired effort to get connected to the internet on other computers, and I am concerned about this since my parents are not that much tech-savvy. I have provided a screenshot of the modem settings (saved) when the computer is able to locate and connect to the network on Linux Mint 16 MATE. How can I restore default behaviour on this computer so that it sees and is able to connect to the network when SSID is broadcasted? **Details:** Linux Mint Mate 16 32-bit LG R590 Notebook **Output of lspci** 02:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8191SEvB Wireless LAN Controller (rev 10) 03:00.0 Ethernet controller: Qualcomm Atheros AR8131 Gigabit Ethernet (rev c0) ![enter image description here](http://i.stack.imgur.com/wCTMn.png) Thanks in advance


Select line not selecting whitespace

Is there a way to select (or paste) text without trailing/ending whitespace? eg. To copy the whole line I press `y`, to paste it somewhere else I use `p`, but it pastes the whole text with the trailing EOL character too. The same case using Windows standard:   home, shift+end, ctrl+c, ctrl+v   (allows me to paste the selected text inline) I'd like to have similar behavior in vim.   I'd like to avoid any macros, as I'm using PHPStorm plugin emulating vim, so not all sophistocated command are working there.


How to create a virtual file that is coupled to a program, e.g. to a `.gz` file via `gzip`?

Given e.g. a gzipped textfile `file.txt.gz`, how to create a special file `file.txt` that on reading yields the (interactively) decompressed contents of the `.gz` file, and on writing a) re-`gzip`s the new content or b) denies write-access?


More concise methods for wrapping a file than using sed

**Introduction** _script:_               sed -i '1i <?xml version=\"1.0\" encoding=\"utf-8\"?>' $1     sed -i '/<?xml version=\"1.0\" encoding=\"utf-8\"?>/a<hello>\n\t<world>' $1     sed -i "\$a\\\t<\/hello>\n<\/world>" $1      _input:_               <city id="city01">       <name>utrecht</author>       <population>328.577</population>       <districts>10</districts>       <country>netherlands</country>     </city>      _output:_               <?xml version="1.0" encoding="utf-8"?>     <hello>       <world>         <city id="city01">           <name>utrecht</author>           <population>328.577</population>           <districts>10</districts>           <country>netherlands</country>         </city>       </hello>     </world>      **Question** What are more concise methods for wrapping a file than using sed?


Dynamic linker "no version information available"

When I copy over a program and a few libraries it needs to another machine I get the "no version information available" when I run LDD on the program. I know why this is happening, I just want to know if its a big deal. Can I just ignore it? The program seems to execute and exhibits expected behavior. Could this come back to screw me in the future?


Looking for a Java class in a set of JARs with find, unzip, grep

I was trying to find the JAR containing a Java Class. JARs are in zip format. My first attempt was:               $ find -name "*3.0.6.RELEASE.jar" | xargs -l1 unzip -l \         | grep stereotype.Controller           554  2011-08-18 16:49   org/springframework/stereotype/Controller.class           554  2011-08-18 16:49   org/springframework/stereotype/Controller.class      I found the class, but I still don't know which of the 25 matching files contains it (there are two JARs containing it). So I thought to use `tee` in the middle to output the file names.               $ find -name "*3.0.6.RELEASE.jar" | tee - | xargs -l1 unzip -l \         | grep stereotype.Controller       554  2011-08-18 16:49   org/springframework/stereotype/Controller.class       554  2011-08-18 16:49   org/springframework/stereotype/Controller.class       554  2011-08-18 16:49   org/springframework/stereotype/Controller.class       554  2011-08-18 16:49   org/springframework/stereotype/Controller.class      I'd have expected to see a filename followed by the Controller.class for matching files and by the next filename for non mathing. However, now that I think about it, standard output just flows in the pipe and gets processed by xargs, so it makes sense. I could use standard error, but then, I suppose, that since the processes are running concurrently, I could have timing issues that make the output not in the order I would hope to see. So there must be a better way to approach this problem, anyone has ideas? **UPDATE** : While waiting for an answer, I wrote a horrible Perl one liner that does the trick, but looking forward to see more elegant solutions.               $ find -name "*3.0.6.RELEASE.jar" | perl -e 'while (<>) { \         $file=$_; @class=`unzip -l $_`; foreach (@class) { \         if (/stereotype.Controller/) {print "$file $_";} } }'      Output:               ./spring-context/3.0.6.RELEASE/spring-context-3.0.6.RELEASE.jar        554  2011-08-18 16:49   org/springframework/stereotype/Controller.class     ./org.springframework.context/3.0.6.RELEASE/org.springframework.context-3.0.6.RELEASE.jar        554  2011-08-18 16:49   org/springframework/stereotype/Controller.class


What are dyld_shared_cache_xxx files and how do I extract object files from them?

I have a `dyld_shared_cache_armv7` file and I'm assuming that they hold various object files for a specific architecture. How do I extract the object files from it?


How to get core temperature of haswell i7 cores in i3status

I want to use i3status to display my CPU-Core temperatures (haswell i7). However the setting:               order += "cpu_temperature 1"     #...     cpu_temperature 1{             format = "T: %degree °C"     }     #      doesn't display the correct core temperature. The numbers it shows seem to correspond to the value xsensors shows for temp1, if I change the 1 to 2 above it corresponds to xsensors temp2. Trying 3 or 4 doesn't have any effect. However I want to get the true core temperatures of all 4 cores with i3 status. How can I do this?


how to replace IP address on remote host using expect

I wrote the following `expect` script in order to replace the IP address on remote Linux machine I use a `perl` one-liner for this task I get errors about can't read "HOME": no such variable , Please advise on what I need to change in my `expect` script so I can change the requested IP ?                #!/bin/ksh                expect_transfer=`cat << EOF      set timeout -1      spawn  ssh  12.219.102.43            expect {                      ")?"   { send "yes\r"  ; exp_continue  }                           word:  {send pass123\r}                   }       expect #  {send "export OLD=10.10.10.10 ; export NEW=1.1.1.1 ; perl -i -pe 's/\Q$ENV{OLD}\E/$1$ENV{NEW}$2/' /etc/hosts\r"}       expect #    {send exit\r}       expect eof       EOF`                 expect -c  "$expect_transfer"       results:                 spawn ssh 12.219.102.43       root@12.219.102.43's password:        Last login: Sun Aug  4 12:29:25 2013 from 12.219.102.43       [root@localhost ~]# can't read "HOME": no such variable       while executing        "send "export OLD=10.10.10.10 ; export NEW=1.1.1.1 ; perl -i -pe 's/\Q$HOME/.kshrc{OLD}\E/$HOME/.kshrc{NEW}/' /etc/hosts\r""       invoked from within       "expect #  {send "export OLD=10.10.10.10 ; export NEW=1.1.1.1 ; perl -i -pe 's/\Q$HOME/.kshrc{OLD}\E/$HOME/.kshrc{NEW}/' /etc/hosts"        * I will happy to get any other solution under ksh scripts


How to get details of RAID devices both soft and hard?

I want to check if my server has RAID configured both soft and hard. I tried some commands on my server (Suse Enterprise Edition 11):               **ms:~ #  cat /proc/mdstat     Personalities :     unused devices: <none>     ms:~ #**      I tried to execute `raiddev /dev/md0` but there is no raiddev command available. Is there any other command that will let me check the raid level of the server?


How can i start a wine application at startup without login?

I want to start a wine application when system startup. However this app need a Xwindow environment. I could only launch it manually by hand now, so I have to login first then start the app. I have searched something about Xsession startup setting. I think applying that method would require a login. How can I start the app without login?


How to remove lines included in one file from another file in bash?

I have two lists, a complete list and a partial list. I want a bash script that will search the complete list for any lines that are in the partial, if there are, they will be removed from the complete list. Can anyone help?


Piping search term (not filename) to grep

I want to pick out certain lines containing a given number from a file. The file I want to search is called `os_clusters/piRNA_clusters.bed`.               awk '{if (a[$0]++ == 0) {split($0,b,"."); ;split(b[1],c,"r"); print c[3]}};' test_non_enriched | xargs grep {} os_clusters/piRNA_clusters.bed      The first part, before the pipe, works- it produces the terms to search for, such as 8707, 8824 etc. However, the latter part does not.               awk '' ... | xargs grep {} os_clusters/piRNA_clusters.bed      Instead of searching the target file for the terms produced by the pipe, it considers the search terms as the input file. Hence, I get error messages like:               grep: 8707: No such file or directory     grep: 8824: No such file or directory      What do I need to change to search the file `os_clusters/piRNA_clusters.bed` for the terms produced by the pipe?


Linux child processes not being culled

This is causing significant problems for script portability between BSD and Linux. I am on a CentOS 6.4 where this happens. I have a nice compact test case: `bash -c "inotifywait -mcr . | sed s/CLOSE/z/"` `ps uf` and observe:                \_ bash -c inotifywait -mcr . | sed s/CLOSE/z/          \_ inotifywait -mcr .                       \_ sed s/CLOSE/z/                       Then, find the PID of the bash parent process, kill it. Notice how the shell prompt has come back, indicating our shell's done waiting on its child. But if you do anything on the filesystem to trigger inotify to report more events, it continues to dump to the terminal. On OS X, this does not happen because they would all be dead. `ps uf` again. See that both inotifywait and sed are now children of `init`. This seems totally wrong to me. What does POSIX say about this?


SSH is suddenly not working anymore: "Write Failed:Broken Pipe"

I use a macbook pro at home and regularly ssh into the machines at my lab. For the past 3-4 days however, whenever I SSH into the machine in the lab, I get a Write Failed:Broken Pipe error, hardly within 2 minutes of me ssh-ing. The fact that everything was working perfectly a few days ago baffles me, and any help to get things working again would be much appreciated.


Moved some files unable to use mv now

I accidently used `mv mymods /* *` . Now i am unable to undo it or either use any command. How do i fix that? I was in directory name `/home/nginx/crap`               [root@somehost /home/nginx/crap]# mv mymods /* *      **Centos 6.3 user - root** Directory Structure of `/home/nginx/crap` https://gist.github.com/anonymous/5493666


Passing capabilities through exec

I'm trying to understand how Linux capabilities are passed to a process that has been `exec()`'d by another one. From what I've read, in order for a capability to be kept after exec, it must be in the inheritable set. What I am not sure of, though, is how that set gets populated. My goal is to be able to run a program as a regular user that would normally require root. The capability it needs is `cap_dac_override` so it can read a private file. I do not want to give it any other capabilities. Here's my wrapper:               #include <unistd.h>          int main(int argc, char *argv[]) {         return execl("/usr/bin/net", "net", "ads", "dns", "register", "-P", NULL);     }      This works when I set the setuid permission on the resulting executable:               ~ $ sudo chown root: ./registerdns     ~ $ sudo chmod u+s ./registerdns     ~ $ ./registerdns      Successfully registered hostname with DNS      I would like to use capabilities instead of setuid, though. I've tried setting the `cap_dac_override` capability on the wrapper:               ~ $ sudo setcap cap_dac_override=eip ./registerdns     ~ $ ./registerdns      Failed to open /var/lib/samba/private/secrets.tdb     ERROR: Unable to open secrets database      I've also tried setting the inheritable flag on the `cap_dac_override` capability for the `net` executable itself:               ~ $ sudo setcap cap_dac_override=eip ./registerdns     ~ $ sudo setcap cap_dac_override=i /usr/bin/net     ~ $ ./registerdns      Failed to open /var/lib/samba/private/secrets.tdb     ERROR: Unable to open secrets database      I need to use the wrapper to ensure that the capability is only available when using that exact set of arguments; the `net` program does several other things that could be dangerous to give users too broad of permissions on it. I'm obviously misunderstanding how the inheritance works. I can't seem to figure out how to set up the wrapper to pass its capabilities along to the replacement process so it can use them. I've read the man page, and countless other documents on how it _should_ work, and I thought I was doing what it describes.


Can't get Intel I210 ethernet working on Debian wheezy

I have a server with an Asus P9D-I mainboard. It has two onboard Intel NICs:               # lspci -nn | grep Eth     01:00.0 Ethernet controller [0200]: Intel Corporation I210 Gigabit Network Connection [8086:1533] (rev 03)     02:00.0 Ethernet controller [0200]: Intel Corporation I210 Gigabit Network Connection [8086:1533] (rev 03)      The server is running Debian wheezy with the most recent backports kernel:               # cat /etc/debian_version     7.2          # uname -a     Linux hostname 3.10-0.bpo.3-amd64 #1 SMP Debian 3.10.11-1~bpo70+1 (2013-09-24) x86_64 GNU/Linux          # dpkg -l | grep -E '(linux-image-amd64|linux-image-3.10)'     ii  linux-image-3.10-0.bpo.3-amd64          3.10.11-1~bpo70+1                   amd64        Linux 3.10 for 64-bit PCs     ii  linux-image-amd64                       3.10+52~bpo70+1                     amd64        Linux for 64-bit PCs (meta-package)      The ethernet interfaces _do_ show up in `ifconfig -a`:               # ifconfig -a     eth0      Link encap:Ethernet  HWaddr ac:22:0b:8b:30:a7                 BROADCAST MULTICAST  MTU:1500  Metric:1               RX packets:0 errors:0 dropped:0 overruns:0 frame:0               TX packets:0 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000                RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)               Memory:dfe00000-dfe80000           eth1      Link encap:Ethernet  HWaddr ac:22:0b:8b:30:a8                 BROADCAST MULTICAST  MTU:1500  Metric:1               RX packets:0 errors:0 dropped:0 overruns:0 frame:0               TX packets:0 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000                RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)               Memory:dfd00000-dfd80000      [...]      But for some reason, I can't actually use them for anything:               # ifconfig eth0 up     SIOCSIFFLAGS: No such device     # ifconfig eth1 up     SIOCSIFFLAGS: No such device     # ethtool eth0     Settings for eth0:     Cannot get device settings: No such device     Cannot get wake-on-lan settings: No such device     Cannot get message level: No such device     Cannot get link status: No such device     No data available     # ethtool eth1     Settings for eth1:     Cannot get device settings: No such device     Cannot get wake-on-lan settings: No such device     Cannot get message level: No such device     Cannot get link status: No such device     No data available      `dmesg` doesn't seem to have any interesting output from the responsible `igb` driver:               # dmesg | grep igb     [    0.555167] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.0.3-k     [    0.555168] igb: Copyright (c) 2007-2013 Intel Corporation.     [    0.555669] igb 0000:01:00.0: irq 44 for MSI/MSI-X     [    0.555674] igb 0000:01:00.0: irq 45 for MSI/MSI-X     [    0.555679] igb 0000:01:00.0: irq 46 for MSI/MSI-X     [    0.555683] igb 0000:01:00.0: irq 47 for MSI/MSI-X     [    0.555689] igb 0000:01:00.0: irq 48 for MSI/MSI-X     [    0.599539] igb 0000:01:00.0: added PHC on eth0     [    0.599551] igb 0000:01:00.0: Intel(R) Gigabit Ethernet Network Connection     [    0.599553] igb 0000:01:00.0: eth0: (PCIe:2.5Gb/s:Width x1) ac:22:0b:8b:30:a7     [    0.599732] igb 0000:01:00.0: eth0: PBA No: 001300-000     [    0.599733] igb 0000:01:00.0: Using MSI-X interrupts. 4 rx queue(s), 4 tx queue(s)     [    0.600233] igb 0000:02:00.0: irq 50 for MSI/MSI-X     [    0.600237] igb 0000:02:00.0: irq 51 for MSI/MSI-X     [    0.600241] igb 0000:02:00.0: irq 52 for MSI/MSI-X     [    0.600244] igb 0000:02:00.0: irq 53 for MSI/MSI-X     [    0.600247] igb 0000:02:00.0: irq 54 for MSI/MSI-X     [    0.641792] igb 0000:02:00.0: added PHC on eth1     [    0.641794] igb 0000:02:00.0: Intel(R) Gigabit Ethernet Network Connection     [    0.641796] igb 0000:02:00.0: eth1: (PCIe:2.5Gb/s:Width x1) ac:22:0b:8b:30:a8     [    0.641853] igb 0000:02:00.0: eth1: PBA No: 001300-000     [    0.641854] igb 0000:02:00.0: Using MSI-X interrupts. 4 rx queue(s), 4 tx queue(s)      Does anyone know what could be going wrong here and how I can get these NICs working? If it's at all possible to do that without manually compiling kernels or drivers, I would prefer that.


Xorg Setting checking from Command Line

How do I determined, whether Xorg is using `Xinerama, DDC and Reduced Blanking` ?? Just adding few options in Xorg.conf is sufficient ? If I have to check from command-line, then how can I check above mentioned settings ? (I am using VIA chipset and Dell DELA07A monitor, Just in case this info required ) EDIT: If I execute the command: `Xorg -extension ?` It gives me the output as               [mi] Extension "?" is not recognized     [mi] Only the following extensions can be run-time disabled:     [mi]    Generic Events     [mi]    Composite     [mi]    DAMAGE     [mi]    DOUBLE-BUFFER     [mi]    DPMS     [mi]    GLX     [mi]    MIT-SCREEN-SAVER     [mi]    MIT-SHM     [mi]    RANDR     [mi]    RENDER     [mi]    SECURITY     [mi]    X-Resource     [mi]    XFIXES     [mi]    XINERAMA     [mi]    SELinux     [mi]    XTEST     [mi]    XVideo      As per the above output, I assume that it is possible to enable/disable extensions in runtime. Question is HOW ? If it is really possible then I can enable/disable the XINERAMA extension as and when I want I also assume that when XINERAMA is ON in dual-head then maximizing an open application will span on both monitor. And when XINERAMA is off then maximizing an application will span to one monitor only. ( Correct me if I'm wrong )


Checking if one of 4 variables starts with string &red in ksh

I'm trying to check if one of 4 variables starts with the string "&red" and I'm struggling to get the match to work. At the moment I've got this,               if [[ $filemsgCICS = "&red"* || $filemsgCICSU1 = "&red"* || $snufmsgCICS = "&red"* || $snufmsgCICSU1 = "&red"* ]];then      but that doesn't work. I can't seem to find a solution that will work. I've tried '&red'* and I've tried \&red* but none of them work.


FreeBSD: How to start a python script as daemon?

I'm facing an issue with a python file that I'd like to start as a service. I named my service ocrserver and the script I want to start is in /home/administrator/ocr/ocrserver/ **init**.py with some parameters added like --address --port etc... After reading the documentation from the FreeBSD site I wrote the following script:               #!/bin/sh          # $FreeBSD$     #     # PROVIDE: ocrserver      # REQUIRE: NETWORK     # KEYWORD: shutdown          # add the following line to /etc/rc.conf to enable the ocrserver:     # ocrserver_enable="YES"          . /etc/rc.subr          name="ocrserver"     rcvar="ocrserver_enable"          # default values     : ${ocrserver_enable="NO"}          base_path="/home/administrator/ocr/ocrserver"          address="localhost"     http_port=8080     pyproxy_port=10800          log_level="debug"          pidfile="${base_path}/ocrserver.pid"          command="/usr/sbin/daemon"          # -p : daemon handler pidfile     # -f : redirect stdout and stderr to /dev/null     # -c : change working dir to root     command_args="-p ${pidfile} -f -c /home/administrator/ocr/ocrserver/__init__.py \     --address ${address} --http-port ${http_port} --log-level ${log_level} \     --pyproxy-port ${pyproxy_port}"          procname="/home/administrator/ocr/ocrserver/__init__.py"     command_interpreter="/usr/local/bin/python3.3"          load_rc_config $name     run_rc_command "$1"      Then I added one line setting up the corresponding rcvar to YES in the /etc/rc.conf file. and I launched it: sudo service ocrserver start where I get the message "Starting ocrserver". and after entering a sudo service ocrserver status, I can see that the service is not running. I also ran a pgrep -l python3.3 command to see if any python3 process was running but no result I precise that I did a chmod 755 on the file to make it readable and executable by all the users. Has anyone some experience with this kind of thing? Thanks for your answers.


Equivalent of "passwd -sa" in RHEL?

I feel a little silly having to ask this, but: In Solaris you can issue a `passwd -sa` command which gives you (more or less) the same output as `passwd -S userName` does, except it prints out the status information for all users it finds in /etc/passwd. What is the equivalent GNU/Linux command? I'm trying to put together simple instructions for someone else to baseline a server, and part of that is them identifying the password aging configured on all accounts. I can for loop over `cut -f1 -d: /etc/passwd` but I was hoping there was a simple command I could give him.


Sniffing VirtualBox machine behind NAT

I have a VirtualBox machine with a single interface connected to VB's NAT mode. What I would like to do is sniff _all traffic coming from/to any machine_ behind that NAT. (I don't think I will need to sniff on more machines at the same time). Background for this is software testing. More specifically, I'd like to see in bigger picture what exactly goes from/to the machine without the need to filter out all the noise that the host is already producing. I used to do this on Windows 7 with VMWare, where the traffic flew through a separate virtual interface on the host, so sniffing the traffic from (all) machines behind the NAT was as easy as sniffing on that interface only. Now I tried to achieve the same setup on Debian with VirtualBox, and I stopped at the fact that VirtualBox does not seem to separate the traffic this way: on Debian Wireshark only offers `eth0`, `nflog`, `lo` and `any` (pseudo-device to capture on all others). When I sniff on `eth0`, I can't easily distinguish between what came from host and what came from guest. Is it possible to do this with VirtualBox? Or is there a better (easier) setup? Both machines are running Debian 7.0 Wheezy. Note: What I was (maybe naively) thinking as a possible solution was: a way to distinguish on the outgoing packets that they have been translated. (Does NAT _really_ not leave a trace?) Now it strikes me that this would at least definitely not be easy for _incoming_ packets...


What does ln stand for?

In Linux you can use the `ln` command to make links.               $ touch foo     $ ln -s foo foo_link     $ ls -l     lrwxrwxrwx  1 cklein cklein         3 May 29 16:11 foo_link -> foo      I assume that the 'l' in `ln` stands for "link", but what does the 'n' stand for? What does `ln` stand for?


creating variable using variable value as part of new variable name

I'm trying to create a new variable using the value of an existing variable as part of the variable name.               filemsg"$word1"=" "      I've also tried               filemsg$word1=" "          filemsg${word1}=" "      on all attempts I get the following when that line executes,               cicserrors.sh[45]: filemsgCICS= : not found [No such file or directory]


Block motion for any bracket type?

If I want to, say delete a block, I can use text object motions. I.e if my text looks like this:               (let [a 1 b {:x 3  :y 4}]           a)      And the cursor is for example on character `3`. If I type `diB` then `:x 3 :y 4` would be deleted If it is `daB` then both the block and surrounding brackets are deleted :`{:x 3 :y 4}` So, the pattern is:               operation inclusion block-motion      Where operation may be:   * `d` \- delete   * `c` \- change   * `y` \- copy ... inclusion is either:   * `i` \- inner (no brackets) or   * `a` \- all  and block-motion:   * `b`,`(` or `)` for `()` parens   * `B`, `{` or `}` for `{}` curlies   * `[` or `]` and `<` or `>` for their own respective brackets, etc.. Now, the question is: **Is there a block motion for the inner-most block with brackets of any of these types?** I'd like to be able to do `da?` with `?` being the motion I'm looking for. And if the cursor in my example above is within `{}` say on `3` I'd delete just the `{}` but if my cursor was on `b` I'd delete the `[]` block, etc.


What is the difference between procfs and sysfs? Why are they made as file systems? As I understand it, proc is just something to store the immediate info regarding the processes running in the system.


Find command: Searching for executable files

What type of parameter/flag can I use with the unix _find_ command so that I search executables? (if this question is better suited for another stackexchange forum, I welcome you telling me so) p.s. If you know of one, I've been looking for a detailed (non-beginner) tutorial/screencast about grep and/or find.


Installing a package locally to a user - best practices?

I want to install Git locally to a user on a RHEL server (I don't have root access) What would be your cleanest/ most organized way of installing software to a local user account?   * Installing everything in that users home directory?   * What would the directory layout look like?   * Would you install from source or RPM?   * If from RPM would you use YUM or RPM?


Linux routing tables

I'm trying to learn Linux routing tables and ran into bit of snag. In the example below I'm not sure what is happening. My understanding is 0.0.0.0 means that for line 1 and 2 any packets outside of its network look at the default gateway 10.0.0.1.               Destination Gateway Genmask       Flags MSS Window  irtt    Iface     10.0.0.0    0.0.0.0  255.255.255.0  U   40  0          0    eth1     10.1.1.0    0.0.0.0  255.255.255.0  U   40  0          0    eth0     0.0.0.0     10.0.0.1    0.0.0.0     UG  40  0           0   eth1      So my question is this, which interface is closer to the Internet? Im not sure if packets immediate leave eth0 and eth1 sends packets to the gateway 10.0.0.1 or if both eth0 and eth1 both route packets to 10.0.0.1 for the Internet.


How to configure kmail2 to use client certificates for POP3 and IMAP access

I would like to run a POP3 server with TLS transport security such that a client must authenticate with a client certificate. (This shields the server from brute force password guessing attacks.) How can I configure kmail2 (KDE 4.12.5) accordingly? There is no obvious (to me) configuration setting for client certificates.


How can I get a two-display Radeon HD 3470 graphics setup working with Scientific Linux 6.5?

I have Scientific Linux 6.5 (2.6.32-431.11.2.el6.x86_64) installed on a Dell OptiPlex 760 with a Radeon HD 3470 graphics card and two displays hooked up to it. I'm having difficulties setting resolutions appropriate for the displays and having the two displays not show the same screen. I am not an expert in Xorg configuration and I would appreciate some assistance in getting things working. The PCI device listing (`lspci | grep VGA`) for the graphics card is as follows:               01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RV620 PRO [Radeon HD 3470]      A more detailed listing (`lspci -v -s $(lspci | awk '/VGA/{print $1}')`) is as follows:               01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RV620 PRO [Radeon HD 3470] (prog-if 00 [VGA controller])         Subsystem: Dell Device 3243         Flags: bus master, fast devsel, latency 0, IRQ 16         Memory at d0000000 (64-bit, prefetchable) [size=256M]         Memory at fe9f0000 (64-bit, non-prefetchable) [size=64K]         I/O ports at dc00 [size=256]         Expansion ROM at fea00000 [disabled] [size=128K]         Capabilities: [50] Power Management version 3         Capabilities: [58] Express Legacy Endpoint, MSI 00         Capabilities: [a0] MSI: Enable- Count=1/1 Maskable- 64bit+         Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?>         Kernel modules: radeon      The result of an `xrandr` query (`xrandr -q`) is as follows:               xrandr: Failed to get size of gamma for output default     Screen 0: minimum 640 x 400, current 1280 x 1024, maximum 1280 x 1024     default connected 1280x1024+0+0 0mm x 0mm        1280x1024       0.0*         1152x864        0.0          1024x768        0.0          800x600         0.0          640x480         0.0          720x400         0.0      The modeline returned by the coordinated video timing utility `cvt` for the highest resolution capable by the main display (1680 x 1050) is as follows:               cvt 1680 1050     # 1680x1050 59.95 Hz (CVT 1.76MA) hsync: 65.29 kHz; pclk: 146.25 MHz     Modeline "1680x1050_60.00"  146.25  1680 1784 1960 2240  1050 1053 1059 1089 -hsync +vsync      If I try to use this with `xrandr`, I get the following:               xrandr --newmode "1680x1050_60.00"  146.25  1680 1784 1960 2240  1050 1053 1059 1089 -hsync +vsync     xrandr: Failed to get size of gamma for output default      The entire contents of the `/etc/X11/xorg.conf` file is as follows:               Section "Device"         Identifier "Videocard0"         Driver "vesa"     EndSection      I am not sure what to do next in order to get the appropriate resolutions set and to get the two displays working as two separate displays (as opposed to having the mirror behaviour). Thank you for any assistance. * * * UPDATE: I have attempted to install a driver for this graphics setup (`fglrx64_p_i_c-8.97.100.7-1.x86_64.rpm`), but have run into difficulties regarding undefined symbol `noXfree86driextension`. The ending contents of the file `Xorg.0.log` are as follows:               [    39.312] Initializing built-in extension XVideo     [    39.312] Initializing built-in extension XVideo-MotionCompensation     [    39.312] Initializing built-in extension SELinux     [    39.312] Initializing built-in extension XFree86-VidModeExtension     [    39.312] Initializing built-in extension XFree86-DGA     [    39.312] Initializing built-in extension XFree86-DRI     [    39.312] Initializing built-in extension DRI2     [    39.312] (II) "glx" will be loaded by default.     [    39.312] (II) LoadModule: "glx"     [    39.338] (II) Loading /usr/lib64/xorg/modules/extensions/libglx.so     [    39.358] (II) Module glx: vendor="Advanced Micro Devices, Inc."     [    39.358]     compiled for 6.9.0, module version = 1.0.0     [    39.365] Loading extension GLX     [    39.366] (II) LoadModule: "fglrx"     [    39.366] (II) Loading /usr/lib64/xorg/modules/drivers/fglrx_drv.so     [    39.520] (EE) Failed to load /usr/lib64/xorg/modules/drivers/fglrx_drv.so: /usr/lib64/xorg/modules/drivers/fglrx_drv.so: undefined symbol: noXFree86DRIExtension     [    39.520] (II) UnloadModule: "fglrx"     [    39.520] (II) Unloading fglrx     [    39.520] (EE) Failed to load module "fglrx" (loader failed, 7)     [    39.520] (EE) No drivers available.     [    39.520]     Fatal server error:     [    39.520] no screens found     [    39.520] (EE)     Please consult the Red Hat, Inc. support          at https://www.redhat.com/apps/support/      for help.     [    39.520] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.     [    39.520] (EE)       I have no idea how to approach this problem. I would really appreciate some help. Thank you.


Can someone change content of a file with permission 777 on a server?

If in my server I have a file(for example a php file) with permission 777, can someone edit or delete it without having an account on the server?


How do I make ls sort underscore characters first?

I like being able to name files and directories with an underscore prefix if it's something I want to keep separate from other files and directories at the same level. On Windows and Mac, for example, prefixing a file with an underscore sorts it to the top, in front of files starting with an alphanumeric character. My googling has turned up that it has to do with the LC_COLLATE and my current locale (en_US). That's fine, though I really don't understand why en_US doesn't sort as expected. Based on the ICU Collate demonstration site setting locale to en_US_POSIX certainly appears to have the sort order I'm looking for (you have to edit the sample data and add some underscores to test it out). But I don't really see how to apply this in my Linux shell. Ideally, I'd like to be able to set up something in my bash config so that ls always sorts underscores first. How would I go about doing this?


Change ip addr label in Linux

How can I change the eth0 zero to eth0:1 using ip addr without deleting. When I run               ip addr show eth0 Here is the output               2: eth0:  mtu 1500 qdisc mq state UP qlen 1000         link/ether ff:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff         inet X.X.X.Y/24 brd X.X.X.255 scope global eth0         inet 10.10.10.17/32 scope global eth0         inet6 XX::XX:XX:XX:XX/64 scope link             valid_lft forever preferred_lft forever I want this to look like without deleting interface.               2: eth0:  mtu 1500 qdisc mq state UP qlen 1000         link/ether ff:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff         inet X.X.X.Y/24 brd X.X.X.255 scope global eth0         inet 10.10.10.17/32 scope global eth0:1         inet6 XX::XX:XX:XX:XX/64 scope link             valid_lft forever preferred_lft forever How can I just change label?


Why does "xinput list" work just like "xinput --list"?

`man xinput` describes various options used with `xinput`. One option is this:               --list [--short || --long || --name-only || --id-only] [device]      But I can run `xinput --list` _or_ `xinput list` and both give the same output:               ⎡ Virtual core pointer                          id=2    [master pointer  (3)]     ⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]     ⎜   ↳ PixArt USB Optical Mouse                  id=10   [slave  pointer  (2)]     ⎜   ↳ PS/2 Mouse                                id=12   [slave  pointer  (2)]     ⎜   ↳ AlpsPS/2 ALPS GlidePoint                  id=13   [slave  pointer  (2)]     ⎣ Virtual core keyboard                         id=3    [master keyboard (2)]         ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]         ↳ Video Bus                                 id=6    [slave  keyboard (3)]         ↳ Power Button                              id=7    [slave  keyboard (3)]         ↳ Sleep Button                              id=8    [slave  keyboard (3)]         ↳ Integrated_Webcam_1.3M                    id=9    [slave  keyboard (3)]         ↳ AT Translated Set 2 keyboard              id=11   [slave  keyboard (3)]         ↳ Dell WMI hotkeys                          id=14   [slave  keyboard (3)]      Why is `--` not needed before the `list` option? (My OS is Lubuntu 13.10.)


Why do some Linux distributions still have /dev/ttyS0, ttyS1, etc., even though newer computers don't have such a serial port?

Many new laptop and desktop computers do not have 9-pin/25-pin serial ports. Why do many Linux distributions still contain `/dev/ttyS0`, `dev/ttyS1` device files? Since `udev` can create the device files dynamically, why are `/dev/ttyS0`, `/dev/ttyS1` still created statically? Each time I boot up, `/dev/ttyS0` and `/dev/ttyS1` are in there. By the way: I am using Debian 7.0.


What is the correct repository to add for `debuginfo-install glibc` for RHEL 6?

I am trying to install `debug-info` for `glibc` on RHEL 6. The closest instructions I could find for adding the repository is at the answer to this question. However, that question is about `CentOS`, which is not exactly the same as `RHEL 6`. So I have two related questions.   1. Is it safe to use http://debuginfo.centos.org for `RHEL 6`?   2. Is there an equivalent URL for `RHEL 6`?


Midnight commander: shortcut keys for entries in directory hotlist

In midnight commander, is that possible to define shortcut keys for entries in directory hotlist? E.g., press `Control+\` and then `k` to go to desktop, where `k` is the user defined key for desktop?


Differences between primary and secondary VGA pass through in virtualization

Xen, and more recently KVM, allows you to pass a VGA adaptor from the host to the guest as either a primary or secondary device. Both links provide some explanation as to why passing a VGA adaptor through is more difficult than passing a standard PCI device through and to some extent why passing a VGA adaptor through as the primary device is more difficult than passing it through as a secondary device. What are the advantages of passing a VGA adapter through as the primary device as opposed to the secondary device?


Find font file from font name on Linux

I have a font with the name _Media Gothic_. How can I find the file name of that font in Linux? I need to copy that file to another system. I've tried:               find /usr/share/fonts/ -name '*media*'      But this gives no results. `gothic` gives some other fonts. TTF is a binary format so I can't use `grep`.


Bootable image with jffs2 file system

I have the following images: zImage around 1.1 MB image.ub: 1.1MB rootfs.jffs2 4.3 MB u-boot (this is the bootloader I am using) I understand that the image.ub is not including file system,and may be that is the reason the size is so small. In fact if I put image.ub in flash and boot,it is hanging and is unable to mount file system. This verifies my understanding. Now what I want is to get a single file having OS and file system, i.e some how combine image.ub and file system (rootfs.jffs2) in a single file. How do we do this? In fact when I chose initramfs instead of jffs2 in kernel configuration, I get a single image.ub of size about 4MB,which certainly has file system included.Because when I put this single large image in flash, it boots perfectly fine and unlike the case of jffs2 do not complain. It means initramfs is embedded into image ub , but jffs2 is not embedding in image.ub- at least by default. I am looking for a way to embedded my jffs2 file in the image.ub. How do I do this ?


set flag to remove duplicate records from a file based on some values of the record

I have a file having the following records (pipe delimited):               SK200-10|ALBUMIN-SK|INS|SEKURE ALBUMIN 2 X 65ML|REAG-IVD|SEKI-PEI|90|14IAG|KIDNEY/LIVER|MD|NA|0|U|MFGPRO|15-May-2014|15-May-2014|MFGPRO|CAPPROD     P/G-PPR|NA-INS|INS|GEWINDEFLASCHE +DECKEL ROT|NON-REAG|ZINSSER|0|NA|NA|NA|NON-REAG|0|U|DM|3-Jun-2014|3-Jun-2014|MFGPRO|UKPROD     P/G-PPR|NA-INS|INS|GEWINDEFLASCHE +DECKEL ROT|NON-REAG|ZINSSER|0|NA|NA|NA|NON-REAG|0|U|DM|3-Jun-2014|3-Jun-2014|DM|QADDB     2898|OTHER-RT|RT|PRINTED MEMBRANE, ADENOVIRUS|NON-REAG|SEKI-SD|60|NA|NA|NA|NA|0|U|MFGPRO|24-Apr-2013|24-Apr-2013|MFGPRO|PACEPROD      In these pipe delimited records: The first value is the item number. The 13th value is the status flag. The last value is the database name. Check for duplicate records based on the Item number from the `UKPROD` and `QADDB` database. If a duplicate is found: Change the value of the status flag (13th value) to 'X' from the `QADDB` database. For example, in the above 4 records: The item number is same for the 2nd and the 3rd record. I then check if they exist between the `UKPROD` and the `QADDB` databases. If yes, the I mark the status flag as 'X' for the record from `QADDB` database.


Restrict user to run shell script except which is defined in sudoer file

I have scientific linux 6.4 running on my system, I have restricted other users to run shell script except one, which is defined in `/etc/sudoers` file. For example: I have one `file.sh` in my admin's `home` directory, so I wish admin to run `file.sh` only, not other shell script from anywhere in system location. So how to achieve this?


Why does verifying SHA256 checksum with `sha256sum` fail on Debian and work on Ubuntu?

On Ubuntu 14.04, `sha256sum` from `coreutils` works as I expected:               echo 879dd0d7637876be4796f7e6f194a111d21088be85cfe717fc97e2e7f05e79d2 /tmp/myfile | sha256sum -c     /tmp/myfile: OK      However, the exact same command with the exact same file on Debian Wheezy fails:               sha256sum: standard input: no properly formatted SHA256 checksum lines found      I don't understand this. How can I verify the checksum reliably in a shell script on Debian? * * * On Ubuntu 14.04:               ⟫ sha256sum --version     sha256sum (GNU coreutils) 8.21      On Wheezy:               $ sha256sum --version     sha256sum (GNU coreutils) 8.13      manpages on both OSs say:               SYNOPSIS            sha256sum [OPTION]... [FILE]...          DESCRIPTION            Print or check SHA256 (256-bit) checksums.  With no FILE,            or when FILE is -, read standard input.          [...]                 -c, --check                   read SHA256 sums from the FILEs and check them


How to configure Xorg for a dynamic dual monitor setup

I have a laptop usually (!) connected to an external monitor. Now I want to configure (if possible without any scripts and/or xrandr) xorg such that   * If the external monitor is connected AND the laptop lid open -> both displays extended   * If the external monitor is connected AND laptop closed -> only external   * If the external monitor is not connected -> laptop monitor. Right now, my _/etc/X11/xorg.conf.d/10-monitor.conf_ looks like the one proposed in the Arch wiki here. Now, I have the following issues:   * after boot when the laptop lid is closed, still both monitors are active (even though I can't move the mouse out of the external one's desktop)   * when I open the lid, the external monitor becomes black while I can move the mouse out of the laptops screen. Switching off and on the external monitor with xrandr makes it work again.   * When I open the laptop, so that the external monitor becomes black and close the laptop again, X crashes and I have to reboot the laptop. (no keyboard combination works anymore and I see nothing but a non-moving mouse arrow on the external screen)  It is quite annoying that the monitors don't behave properly automatically. It's an intel chip (onboard) and the external monitor is connected via DisplayPort. I don't really know what to look for in which logfile, so maybe you can help me out.


new pattern required from an input file using sed or awk

I have data as below:               MGW: VMG110     836-16     836-18     836-19     336-20     836-23     MGW: VMG120     3802-1     3802-2     3802-3     3456-1     3456-4      Required output is:               VMG110:836-16&-18&&-20&-23     VMG120:3802-1&&-3&3456-1&-4      in given data -1,-2,-3,-4 are always in sorted manner in the output -19 is missing...instead of that -18&&-20 is present..where && means 18 to 20.. please provide the same.


Rename files with random characters from sha1sum. Does it unique?

I'm using this command to rename files with random characters from `sha1sum` and move all files from subdirectories to current directory:               for fname in `find . -type f`; do mv "$fname" $(echo "$fname" | sha1sum | cut -f1 -d' ').html; done        1. But the question is: Does it unique? I'm worried if the generated name from sha1sum will is not unique (generated twice or more).   2. If I run above command, and then run another one in another directory, will it generate unique file name for each files?


Which home directory should 'nobody' have?

I'm messing around with Tiger security audits on my CentOS box, ensuring the server is fit for being online, well as close as it can get anyway. I noticed a warning about the user `nobody` having `/` as a home directory. I just can't figure out which directory it should "live in" so to speak. So where shall I put this fella? And how about `ncsd` now we're at it? I guess the questions really are: What is `nobody` and `ncsd` for? Which security risk does it impose for those users to have root set as their home directory? In an optimal environment, where would their home directories be?


Chrooting into ArchLinux iso installation environment

I'm trying to install ArchLinux, but my laptop hangs whenever I have any bootable media attached (other than the primary disk luckily). I tell you this, not because I'm looking to fix my laptop (although any comments about why this might be happening are welcome), but to explain why I'm trying to do what might seem rather convoluted. I have an old version of Ubuntu running on the laptop and the ArchLinux iso on a disk which I can mount. My plan is to chroot into the ArchLinux installation environment, sort of the reverse of the installation process. At this point however, my ignorance starts to show. I have RTM but since there is little hope of a second try at this if I kill my existing installation, I would appreciate any gotchas to look out for and any advice in general.


Installing a secondary drive in CentOS 6

I am new to Linux and CentOS so I may not be sure of the exact question to ask. It may be best for me to tell you what I have done. I installed a secondary 500gb HD to use for file share storage. I have partitioned, formatted, and mounted according to many different websites' instructions. I used this command to format:               mkfs.ext4 -L /Filesystem2 /dev/sdb1      This caused the new file system to be displayed in "Computer" via the GUI. However, it was inaccessible. Once I mounted it, I can access it from the CLI and the GUI, but it no longer shows up in "Computer". Using the GUI as a user, I have to search to find the mounted drive. It does not appear anywhere. I would like to have it like Windows where it appears as a secondary drive. I don't know how to do this or the Linux terminology for it.


add command to /etc/init.d/rc.local file that's missing

Want to add the command               sudo mount -t vboxsf H_DRIVE /media/windows7share      to `/etc/init.d/rc.local` file, to run the command every time when system starts up but I don't have such a file (`rc.local`) in that folder. What is the workaround?


Can I work with Sql Server, Office and C# using Linux?

I want to start working with linux, and I know I should work in that regularly to improve myself.   I work with _sql server_ , _office_ , _c#_ at the company. can I install and do my tasks in linux (i.e. red hat)?


IRSSI: HilightWin is showing Joins/Parts/Quits

`Hilightwin.pl` is showing Joins/Parts/Quits from all my channels. I would assume that it is an issue that involves levels, except I have no idea where to start. Some plugins that I use that might be relevant:   * Crapbuster.pl   * HilightWin.pl   * Highlite.pl ### .irssi/config               aliases = {     ...       CB = "crapbuster";       CBALL = "foreach window /crapbuster";     };          settings = {     ...       "perl/core/scripts" = {         awl_display_key = "$Q|%n$H$C$S";         awl_block = "15";         crapbuster_levels = "JOINS PARTS QUITS NICKS CLIENTCRAP CRAP MODE TOPICS KICKS";       };     };     hilights = { text = "NICKNAME"; nick = "yes"; word = "yes"; };     logs = { };     windows = {       9 = { name = "hilight"; sticky = "yes"; };     };     mainwindows = {       1 = { first_line = "5"; lines = "16"; };       9 = { first_line = "1"; lines = "4"; };     };     ignores = (       { level = "JOINS PARTS QUITS NICKS"; channels = ( "#highlite" ); }     );


gcc can't link to pthread?

I have recently installed XUbuntu 11.10 64bit, but I am having problem compiling the most simple pthread example. Here is the code `pthread_simple.c`:               #include <stdio.h>     #include <pthread.h>      main()  {       pthread_t f2_thread, f1_thread;        void *f2(), *f1();       int i1,i2;       i1 = 1;       i2 = 2;       pthread_create(&f1_thread,NULL,f1,&i1);       pthread_create(&f2_thread,NULL,f2,&i2);       pthread_join(f1_thread,NULL);       pthread_join(f2_thread,NULL);     }     void *f1(int *x){       int i;       i = *x;       sleep(1);       printf("f1: %d",i);       pthread_exit(0);      }     void *f2(int *x){       int i;       i = *x;       sleep(1);       printf("f2: %d",i);       pthread_exit(0);      }      And here is the compile command               gcc -lpthread pthread_simple.c      The results:               lptang@tlp-linux:~/test/test-pthread$ gcc -lpthread pthread_simple.c      /tmp/ccmV0LdM.o: In function `main':     pthread_simple.c:(.text+0x2c): undefined reference to `pthread_create'     pthread_simple.c:(.text+0x46): undefined reference to `pthread_create'     pthread_simple.c:(.text+0x57): undefined reference to `pthread_join'     pthread_simple.c:(.text+0x68): undefined reference to `pthread_join'     collect2: ld returned 1 exit status      Does anyone know what's causing the problem?


Emacs shortcuts in term mode

I've a question about using Emacs as editor and terminal. I split my window into different windows with `C-x 3`for example. One of the generated Window is used as terminal with `M-x term`. Usually I switch with `C-x o`into another window. Suppose I switched to the terminal buffer, from there I cannot use `C-x o` to switch to another buffer. What short cut can I use to switch from the terminal buffer into another?


Tell if a folder/file is hidden in Mac OS X

I know you can set or unset the hidden flag of a folder/file by doing `chflags hidden foo.txt` and `chflags nohidden foo.txt`. But is there anyway of telling whether the folder/file is currently hidden or not? I don't want to just determine if the folder/file is beginning with a dot.


How can I check the Base64 value for an integer?

I would like to check the Base64 value for an integer. There is a `base64` linux command but I don't understand how I can apply it on integers. I have tried with `base64 10` but then I get the error message `base64: 10: No such file or directory` I think that the problem can be that Base64 is used for Binary to Textual conversion, so there is no point to pass a Textual argument to it. So my argument `10` is read as an textual string and not as a binary number. Is there any way I can turn a texttual argument to a binary? How can I use the base64 command to get the Base64 value for an integer?


How to set secure permissions for multiple users and multiple websites?

On a Gentoo 3.2.12 server with `apache2+php`, there are several websites running:               /www         /website1         /website2         ...etc      The `apache` user should have read-only access to all the websites. There are also a few folders inside each website where `apache` should have read-write access (upload folders and the like). There are several people who work on these websites. Each person should have read-write access to the website(s) they work on, but not others. Also, they should be able to set permissions (within their websites) so that `apache` can write to some folders (well, if they create a new upload folder or something). Other users shouldn't have access to `/www` at all. Can this be done and how? (PS. Also... since these people can upload PHP scripts which are then executed in the context of Apache, I guess they can access other websites too, indirectly... is it possible to secure this as well? I can't think of a way, but who knows...)


Optimize command yum

I would like knowing if there is a way to increase the performance of the command `yum` to install and search packages. I'm a very happy new user of Fedora 16.


CPU and core usage stats

I'm running some programs on a server and I would like to know how much % cpu I'm taking up and how many cores are being utilised by my process. To clarify, the server has 16 CPUs, all quad-core. I know about the top command, but that just continually reports CPU% between 80% and 100.2%. I also tried `mpstat -P ALL` but I'm really not sure how to read this table.


How to fix diacritics in PDF forms in Evince?

I happen to live in Czech Republic and we have such letters like `ě`, `š`, `č`, `ť`, etc in the alphabet and use them everywhere, including addresses. Today I was filling a PDF form in Evince and noticed that some of these letters either disappear or make the following letter disappear in view/print mode (everything is ok when I am editing the field). Any ideas why can this happen and how to fix this? XUbuntu 12.04, Evince 3.4.0. Update: I have installed the Adobe brand Acrobat Reader (9.5.1) and it has no problems with the letters.


Print tab character in fish

In bash I could either do `echo -e "a\tb"` or `echo a$'\t'b`. How do you do this in fish?


Compilation of my wifi driver (RTL8192CE) fails

I'm kind of desperately trying to make my wifi work on my newly-installed Debian Sid (amd64, kernel 3.10.11-1). The relevant line of the output of `lspci` is :               06:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8188CE 802.11b/g/n WiFi Adapter (rev 01)      and this wi-fi card is not recognized :               # iwconfig     eth0      no wireless extensions.     lo        no wireless extensions.      in case you need it, here is the output of lshw -c network :               *-network NON-RÉCLAMÉ        description: Network controller     produit: RTL8188CE 802.11b/g/n WiFi Adapter     fabriquant: Realtek Semiconductor Co., Ltd.     identifiant matériel: 0     information bus: pci@0000:06:00.0     version: 01     bits: 64 bits     horloge: 33MHz     fonctionnalités: pm msi pciexpress cap_list     configuration: latency=0     ressources: portE/S:3000(taille=256) mémoire:f1d00000-f1d03fff      So I looked up online to find what driver I was supposed to install. I found that I was supposed to go to this page and install the rtl8192ce driver. I downloaded and extracted it, and followed the instructions of the `readme` file. I changed to super user and tried to compile the driver from the code source with `make`. Here is the output :               # make           make -C /lib/modules/3.10-3-amd64/build M=/home/damien/Downloads/rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211_0012.0207.2013 modules     make[1]: entrant dans le répertoire « /usr/src/linux-headers-3.10-3-amd64 »       CC [M]  /home/damien/Downloads/rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211_0012.0207.2013/base.o     In file included from /home/damien/Downloads/rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211_0012.0207.2013/base.c:39:0:     /home/damien/Downloads/rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211_0012.0207.2013/pci.h:247:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘rtl_pci_probe’      int __devinit rtl_pci_probe(struct pci_dev *pdev,                    ^     /home/damien/Downloads/rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211_0012.0207.2013/base.c: In function ‘rtl_action_proc’:     /home/damien/Downloads/rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211_0012.0207.2013/base.c:885:32: error: ‘struct ieee80211_conf’ has no member named ‘channel’            rx_status.freq = hw->conf.channel->center_freq;                                     ^     /home/damien/Downloads/rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211_0012.0207.2013/base.c:886:32: error: ‘struct ieee80211_conf’ has no member named ‘channel’            rx_status.band = hw->conf.channel->band;                                     ^     /home/damien/Downloads/rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211_0012.0207.2013/base.c: In function ‘rtl_send_smps_action’:     /home/damien/Downloads/rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211_0012.0207.2013/base.c:1451:24: error: ‘struct ieee80211_conf’ has no member named ‘channel’        info->band = hw->conf.channel->band;                             ^     make[4]: *** [/home/damien/Downloads/rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211_0012.0207.2013/base.o] Erreur 1     make[3]: *** [_module_/home/damien/Downloads/rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211_0012.0207.2013] Erreur 2     make[2]: *** [sub-make] Erreur 2     make[1]: *** [all] Erreur 2     make[1]: quittant le répertoire « /usr/src/linux-headers-3.10-3-amd64 »     make: *** [all] Erreur 2      It seems that the error comes from the source code, and not from a lack of library or something. Any idea of what I should try to do next, or how should I try to solve this compilation error ?


case multi-pattern with strings

If a put "TITI" or "TETE" on V3 it doesn't work but "TOTO" will work. It's like it takes into account only the first possibility..."TOTO".               #! /bin/ksh -     V1=CRITICAL                    V2=HARD                        V3=TITI                             case "$V1:$V2:$V3" in               CRITICAL:SOFT:TATA)                print "no"                    ;;                              CRITICAL:HARD:"TOTO"|"TITI"|"TETE")         print "yes"                    ;;                         esac


No connections work after starting OpenVPN service?

I setup my Scientific Linux 6.2 as an OpenVPN client via the instructions here, and restarted my OpenVPN service. I checked /var/log/messages and it says the VPN connection was established. However, now I cannot make any connections out of my computer! Browsing with Firefox gives me "Server not found" errors, and even ping and traceroute don't work (they produce unknown host errors). How can I troubleshoot this issue? BTW, is there a way to route only certain traffic through this VPN (once I get it working), while everything else don't? Thanks! My OpenVPN /etc/openvpn/client.conf looks like this:               <connection>      remote [VPN host here] 1194 udp      </connection>      <connection>      remote [VPN host here] 1195 udp      </connection>      auth-user-pass      client      ca ca.crt      cert client.crt      key client.key      dev tun      topology subnet      ns-cert-type server      nobind      persist-key      persist-tun      reneg-sec 72000      ping 5      ping-restart 20      ping-timer-rem      tls-client      pull      comp-lzo      verb 2      And here is my ifconfig output after OpenVPN service starts:               eth0      Link encap:Ethernet  HWaddr 08:00:27:85:0B:E5                 inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0               inet6 addr: fe80::a00:27ff:fe85:be5/64 Scope:Link               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:181793 errors:0 dropped:0 overruns:0 frame:0               TX packets:42981 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000                RX bytes:174493756 (166.4 MiB)  TX bytes:2766010 (2.6 MiB)          eth1      Link encap:Ethernet  HWaddr 08:00:27:71:4E:F5                 inet addr:192.168.56.111  Bcast:192.168.56.255  Mask:255.255.255.0               inet6 addr: fe80::a00:27ff:fe71:4ef5/64 Scope:Link               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:2905 errors:0 dropped:0 overruns:0 frame:0               TX packets:1890 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000                RX bytes:332246 (324.4 KiB)  TX bytes:487561 (476.1 KiB)          lo        Link encap:Local Loopback                 inet addr:127.0.0.1  Mask:255.0.0.0               inet6 addr: ::1/128 Scope:Host               UP LOOPBACK RUNNING  MTU:16436  Metric:1               RX packets:16 errors:0 dropped:0 overruns:0 frame:0               TX packets:16 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:0                RX bytes:1412 (1.3 KiB)  TX bytes:1412 (1.3 KiB)          tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00                 inet addr:10.1.3.33  P-t-P:10.1.3.33  Mask:255.255.255.0               UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1               RX packets:314 errors:0 dropped:0 overruns:0 frame:0               TX packets:384 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:100                RX bytes:38675 (37.7 KiB)  TX bytes:46675 (45.5 KiB)      This is the result from "ip route show":               10.0.2.0/24 dev eth0  proto kernel  scope link  src 10.0.2.15      192.168.56.0/24 dev eth1  proto kernel  scope link  src 192.168.56.111      169.254.0.0/16 dev eth0  scope link  metric 1002      169.254.0.0/16 dev eth1  scope link  metric 1003      default via 10.0.2.2 dev eth0  proto static


In which cases is SIGHUP not sent to a job when you log out?

I read an answer from a user who claimed that running               foo 2>&1 >& output.log &      would result in `foo` continuing to run even when they log out. According to this user, this even worked over SSH connections. I didn't really believe that, as I was under the impression that in the case of disconnecting from SSH, or terminating the TTY, the shell and therefore its processes would receive a SIGHUP, causing them to terminate. This, under my assumption, was the sole reason for using `nohup` in such cases, or `tmux`, `screen` et al. I then looked into glibc's manual: > This signal is also used to report the termination of the controlling > process on a terminal to jobs associated with that session; this termination > effectively disconnects all processes in the session from the controlling > terminal. This seems to confirm my thoughts. But looking further, it says: > If the process is a session leader that has a controlling terminal, then a > SIGHUP signal is sent to each process in the foreground job, and the > controlling terminal is disassociated from that session. So, does this mean jobs put in background will _not_ receive SIGHUP? To my further confusion, I ran an interactive Zsh session, ran `yes >& /dev/null &`, and typed `exit`, when Zsh warned me that I had running jobs, and after typing `exit` for a second time, told me that it had SIGHUPed one job. Doing exactly the same in Bash leaves the job running…


Printable guide for ArchLinux setup

I want to install Arch Linux on my computer, but I only have one computer, so I will be unable to access online documentation for a significant portion of the process (everything up until I get a web browser installed). Is there some type of printable guide or manual that I can get that has everything I would likely need up to that point? After that, I can just use online stuff, but as I said, I won't be able to use it until I can access it _from the computer I am installing on_. I intend to install it to use for general-purpose desktop stuff, like browsing the internet, multimedia stuff, and some games, if that makes a difference to what I'd need. I'm going with a gnome environment, and am planning to install chromium.


Kill disconnected SSH session running in `screen`

I'm always forgetting to logoff when `ssh`-ing somewhere. After I reopen my notebook, a `screen` window with this running `ssh` is unresponsive. I have to create another window, `$ killall ssh`, and only then can I re-`ssh` back. Is there a way to kill this `ssh` using some shortcut? **Or** is there a way to make `ssh` try to _reconnect_ automatically? Or just return the local prompt to me faster?


Howto make hibernation work under Fedora 19

I tried two methods to enable hibernation. First method was invoking > systemctl hibernate under root. The second was to use Frippery Shut Down Menu. In both cases the system will eventually show me a black screen with some error message and it does not hibernate. I have the latest updates installed. I believe this is a bug. How can I make hibernation work under Fedora 19?


Plymouth splash not working and causing VT problems

Since I tried installing Plymouth (boot splash), I'm facing two problems :   * It's not working   * My Virtual Terminals (tt1 - 6) aren't working anymore Here what I did :   1. Added plymouth hook (after base udev and autostart) to mkinitcpio and ran mkinitcpio   2. Defined the theme to be "spinfinity".   3. Disabled slim service and enabled slim-plymouth service.   4. Added splash to kernel parameter in grub.cfg I already had Intel driver in KMS (i915). Linux is just booting as it was booting before (HDD alerts => SLiM) and nothing more. When I'm trying to enter a VT, equally before or after logging, It just displays a blinking cursor (or HDD Alerts for tty1). How to solve this ?


See extended attributes with coreutils ls on Mac

I have coreutils installed via MacPorts on my Mac running OS X 10.8.4. I have `ls` set to use the coreutils version of `ls` [`(GNU coreutils) 8.21`] when available:               if [ -e /opt/local/libexec/gnubin ]; then         alias ls='/opt/local/libexec/gnubin/ls --color=auto'     else         alias ls='/bin/ls -G'     fi      When I run `ls -l` in a directory with files know to have extended attributes (xattrs), I expect to see an `@` sign after the permissions in those listings. However, I see no `@` sign. If I run `/bin/ls -l`, I get the `@` sign. File listing from `/bin/ls -l`:               -rw-r--r--@  1 zev.eisenberg  staff  132887 Jul 19 16:24 flowchart.graffle      File listing from `ls -l` (using coreutils):               -rw-r--r--  1 zev.eisenberg staff 132887 Jul 19 16:24 flowchart.graffle      How can I get the coreutils version of `ls` to show me the `@` sign when xattrs are present?


Do files not copied matter when using rsync?

I have used `rsync` to back up my `/` directory to an external hard drive, using this command in user (not su) mode (about 200,000 files copied in one hour and forty minutes) and it seemed to finish nicely:               rsync -aAXv --progress /* /media/"New Volume"/bu120813 --exclude={/dev/*,/proc/*,/sys/*,/tmp/*,/run/*,/mnt/*,/media/*,/lost+found}        Two worries: in attempting to get a copy of the command to use here I inadvertently started it off again, and stopped it with `Ctrl`+`C`. The stream of new messages overwrote the final message from the first copy, but I had seen there was a warning that a number of files hadn't been copied. Should I worry about either or both of these, and if so what should I do. Or, can I now go ahead with my Fedora installation?


Merge several eps files into one PDF

I have several hundred encapulated postscript files, and I want to merge them all into one big PDF. How can I do this?


Vim script check running platform

" Get running OS     let os = ""     if has("win32")       let os="win"     else       if has("unix")         let s:uname = system("uname")         if s:uname == "Darwin"           let os="mac"         else           let os="unix"         endif       endif     endif          " Brackets expanding     let preBracket="`"     if os=="mac"       let preBracket="$"     endif          exe 'vnoremap' . preBracket . '1 <esc>`>a)<esc>`<i(<esc>'     exe 'vnoremap' . preBracket . '2 <esc>`>a]<esc>`<i[<esc>'     exe 'vnoremap' . preBracket . '3 <esc>`>a}<esc>`<i{<esc>'     exe 'vnoremap' . preBracket . '$ <esc>`>a"<esc>`<i"<esc>'     exe 'vnoremap' . preBracket . 'q <esc>`>a''<esc>`<i''<esc>'     exe 'vnoremap' . preBracket . 'e <esc>`>a"<esc>`<i"<esc>'     " Map auto complete of (, ", ', [     exe 'inoremap ' . preBracket . '1 ()<esc>i'     exe 'inoremap ' . preBracket . '2 []<esc>i'     exe 'inoremap ' . preBracket . '3 {}<esc>i'     exe 'inoremap ' . preBracket . '4 {<esc>o}<esc>O'     exe 'inoremap ' . preBracket . 'q ''''<esc>i'     exe 'inoremap ' . preBracket . 'e ""<esc>i'      As vimscript above I want to map the shortcut to key expand bracket depend on vim's platform. Actually my macbook use different layout but I love the ease of using ``` character in keyboard so I map to $ which stays at the same place on mac pro keyboard (da layout). But it seems that the script works fine on linux but doesn't work on mac. Did I miss something or I need to add something to make this script work on Mac OSX ?


Bring up alias interface on boot, when the main interface is down

In my _CentOS_ 6.2 server, I have the following configuration for networking:   * The `NetworkManager` package wasn't installed   * on `eth0` I have a DHCP configuration   * on `eth0:1` alias interface I have a static IP, lets say `10.10.10.10` When I have connected my server to internet and boot up, both interfaces are brought up well, but when I don't have a connection to the internet (with other words, when it isn't allocated an IP through DHCP to the main interface) and boot up, the alias interface is also down. **Question** : Is there a way to prevent this behavior? Or how to bring up the alias interface when boot up the server, even if the main interface is down?


SVN access and indexing tool

I have a huge SVN repository where several developers make ~100 commits per day. The repository has a size of almost 4GB and each update requires me to wait for 30-60seconds. However, I do not do development in this repository and only need access to some files scattered across the directories of the SVN. Therefore: is there a tool available that   * only fetches the list of files in the SVN without pulling all their contents   * allows me to navigate the list of files and only donwloads those files i need   * indicates the last revision of the files   * Optional, but would be awesome to have: A full text search engine that creates an index of all files, removes the files afterwards from my db and downloads changed files in the background to update my index, and again removes them afterwards. (Also capability to blacklist files I do not need)


Creating a Makefile

As the title states, I am wondering how to create a Makefile to compile `hello.c`:               // for example          int main(int argc, char *argv[]) {         puts("Hello world");         return 0;     }      I am aware that I compile the program by the help off `gcc hello.c -o hello` and how I run it but that is as much as i know at the moment.


omxplayer playlist without black between videos at 1920x1080

I'm reading lot of posts/people using Raspberry and omxplayer (with some Python or script helper program) to allow playlist management without gaps between files (launching one file and pausing it, and then launching a second file and unpause first just when second one reaches the end). This is great, but in my case it doesn't work at 1080p resolution (even with gpu mem at 320MB). Only work for 720p. Has anyone been able to make it work with 1080p videos?


using "-vvv" with "-w FILENAME" with tcpdump makes better output?

Does it makes a more detailed output if I use               tcpdump -vvv -w FILENAME      vs. if I use:               tcpdump -w FILENAME      or it doesn't makes any sense if I use the "-vvv" when I'm using "-w FILENAME"?


Growing my extended partition to the left

I have the following one hdd               Disk /dev/sda: 320.1 GB, 320072933376 bytes     255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors     Disk identifier: 0xfa6bd800     Device Boot      Start         End      Blocks   Id  System     /dev/sda1   *        2048      821247      409600    7  HPFS/NTFS/exFAT     /dev/sda2          821248   210991103   105084928    7  HPFS/NTFS/exFAT     /dev/sda3       210991104   317941759    53475328   83  Linux     /dev/sda4       420343806   625141759   102398977    5  Extended     /dev/sda5       435689472   507955096    36132812+  83  Linux     /dev/sda6       507955200   566546431    29295616   83  Linux     /dev/sda7       566548480   625141759    29296640   83  Linux     /dev/sda8       420345856   435687423     7670784   82  Linux swap / Solaris      I have recently recovered one partition from Windows. I want to extend my 'extended partition' /dev/sda4 to the left to use the unallocated space. you could see that /dev/sda4 can be extended from 420343806 to 317941760 (end of /dev/sda3). I tried to this from gparted and it failed.               GParted 0.12.1 --enable-libparted-dmraid          Libparted 2.3     Move /dev/sda4 to the left and grow it from 97.66 GiB to 126.95 GiB  00:00:00    ( ERROR )          calibrate /dev/sda4  00:00:00    ( SUCCESS )          path: /dev/sda4     start: 420,343,806     end: 625,141,759     size: 204,797,954 (97.66 GiB)     move partition to the left and grow it from 97.66 GiB to 126.95 GiB  00:00:00    ( ERROR )          old start: 420,343,806     old end: 625,141,759     old size: 204,797,954 (97.66 GiB)     requested start: 358,901,760     requested end: 625,139,711     requested size: 266,237,952 (126.95 GiB)     libparted messages    ( INFO )          Unable to satisfy all constraints on the partition.     Can't have overlapping partitions.      So I am trying to do the partition extension with fdisk. I think these are the following steps. 1\. delete /dev/sda4 2\. create new extended partition from 317941760 to 625141759. 3\. resize2fs on /dev/sda4 But if I do this way, will I lose my logical partitions or data? Or should I be taking another route to achieve the same. Also can someone recommend an ultimate source to learn about partitions and file systems? Thanks


Ubuntu Precise -- suspend wedges GDM -- help!

I've been a very happy Ubuntu user for many years, and worked my way past any number of problems, but I've never seen anything like this. Recently I got a new machine and installed 12.04 Precise on it, and after some fiddling, it looked like everything was working fine. I just tried the suspend function for the first time, and on wakeup, GDM was seriously wedged -- a window popped up saying "System Error" and gave a bunch of details. I took screenshots -- I think it was a segfault thrown by simple-slave : ![enter image description here](http://i.stack.imgur.com/jHmaM.png) ![enter image description here](http://i.stack.imgur.com/k6iPU.png) Now a reboot gets me to a low-res startup screen, saying "Ubuntu 12.04" and four dots that change from white to orange and back again, nothing more. I can use ctl-alt-F1 to get a command line, log in there, and run "startx" and I get the X display (including TwinView on my two monitors), the cursor works, but there's no desktop manager, no Dash, no way to go further that I can see. I've rebooted several times and this behavior isn't changing. From the command line, I've tried using apt-get to remove and reinstall gdm, no difference. I've tried removing gdm and telling it to use lightdm instead, no difference. I have no idea what's going on. Can anyone help?


Choppy animations in desktop using fglrx driver in openSUSE 11.4

I downloaded and installed the ATI driver, but my desktop effects were not working. Moving windows creates choppy animations. I changed the rendering backend in kwin from openGL to xrender and the desktop effects worked, but my 3Dchess din't work because in my hardware profile the driver for my video card still says Radeon via modprobe instead of fglrx. I aslo tried installing from level 3 and also ran `aticonfig --initial`. `xorg.conf`:               Section "ServerLayout"             Identifier     "aticonfig Layout"             Screen      0  "aticonfig-Screen[0]-0" 0 0     EndSection          Section "Module"     EndSection          Section "Monitor"             Identifier   "aticonfig-Monitor[0]-0"             Option      "VendorName" "ATI Proprietary Driver"             Option      "ModelName" "Generic Autodetecting Monitor"             Option      "DPMS" "true"     EndSection          Section "Device"             Identifier  "aticonfig-Device[0]-0"             Driver      "fglrx"             BusID       "PCI:1:0:0"     EndSection          Section "Screen"             Identifier "aticonfig-Screen[0]-0"             Device     "aticonfig-Device[0]-0"             Monitor    "aticonfig-Monitor[0]-0"             DefaultDepth     24             SubSection "Display"                     Viewport   0 0                     Depth     24             EndSubSection     EndSection      Xorg log:               [   199.425]     X.Org X Server 1.9.3     Release Date: 2010-12-13     [   198.439] X Protocol Version 11, Revision 0     [   198.439] Build Operating System: openSUSE SUSE LINUX     [   198.439] Current Operating System: Linux linux-8ff2 2.6.37.1-1.2-desktop #1 SMP PREEMPT 2011-02-21 10:34:10 +0100 x86_64     [   198.439] Kernel command line: root=/dev/disk/by-id/ata-WDC_WD5000BEVT-75ZAT0_WD-WXV0A49E6829-part9 resume=/dev/disk/by-id/ata-WDC_WD5000BEVT-75ZAT0_WD-WXV0A49E6829-part7 splash=silent quiet vga=0x317     [   198.439] Build Date: 22 February 2011  10:08:09PM     [   198.439]     [   198.439] Current version of pixman: 0.20.0     [   198.439]    Before reporting problems, check http://wiki.x.org             to make sure that you have the latest version.     [   198.439] Markers: (--) probed, (**) from config file, (==) default setting,             (++) from command line, (!!) notice, (II) informational,             (WW) warning, (EE) error, (NI) not implemented, (??) unknown.     [   198.439] (==) Log file: "/var/log/Xorg.0.log", Time: Thu Jun 30 01:44:40 2011     [   198.440] (==) Using config file: "/etc/X11/xorg.conf"     [   198.440] (==) Using config directory: "/etc/X11/xorg.conf.d"     [   198.440] (==) ServerLayout "aticonfig Layout"     [   198.440] (**) |-->Screen "aticonfig-Screen[0]-0" (0)     [   198.440] (**) |   |-->Monitor "aticonfig-Monitor[0]-0"     [   198.440] (**) |   |-->Device "aticonfig-Device[0]-0"     [   198.440] (==) Automatically adding devices     [   198.440] (==) Automatically enabling devices     [   198.440] (WW) The directory "/usr/share/fonts/TTF/" does not exist.     [   198.440]    Entry deleted from font path.     [   198.440] (WW) The directory "/usr/share/fonts/OTF/" does not exist.     [   198.440]    Entry deleted from font path.     [   198.440] (WW) The directory "/usr/share/fonts/misc/sgi" does not exist.     [   198.441]    Entry deleted from font path.     [   198.441] (==) FontPath set to:             /usr/share/fonts/misc:unscaled,             /usr/share/fonts/Type1/,             /usr/share/fonts/100dpi:unscaled,             /usr/share/fonts/75dpi:unscaled,             /usr/share/fonts/URW/,             /usr/share/fonts/cyrillic:unscaled,             /usr/share/fonts/truetype/     [   198.441] (==) ModulePath set to "/usr/lib64/xorg/modules/updates,/usr/lib64/xorg/modules"     [   198.441] (II) The server relies on udev to provide the list of input devices.             If no devices become available, reconfigure udev or disable AutoAddDevices.     [   198.441] (II) Loader magic: 0x7dc040      LSPCI:               00:00.0 Host bridge: Intel Corporation Mobile 4 Series Chipset Memory Controller Hub (rev 07)     00:01.0 PCI bridge: Intel Corporation Mobile 4 Series Chipset PCI Express Graphics Port (rev 07)     00:1a.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 03)     00:1a.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 03)     00:1a.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #6 (rev 03)     00:1a.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 03)     00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 03)     00:1c.0 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 1 (rev 03)     00:1c.1 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 2 (rev 03)     00:1c.3 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 4 (rev 03)     00:1c.5 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 6 (rev 03)     00:1d.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 03)     00:1d.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 03)     00:1d.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 03)     00:1d.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 03)     00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 93)     00:1f.0 ISA bridge: Intel Corporation ICH9M LPC Interface Controller (rev 03)     00:1f.2 SATA controller: Intel Corporation ICH9M/M-E SATA AHCI Controller (rev 03)     00:1f.3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller (rev 03)     01:00.0 VGA compatible controller: ATI Technologies Inc M92 [Mobility Radeon HD 4500 Series]     01:00.1 Audio device: ATI Technologies Inc RV710/730     04:00.0 Network controller: Intel Corporation WiFi Link 5100     08:00.0 Ethernet controller: Broadcom Corporation NetLink BCM5784M Gigabit Ethernet PCIe (rev 10)     09:01.0 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 IEEE 1394 Controller (rev 05)     09:01.1 SD Host controller: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 22)     09:01.2 System peripheral: Ricoh Co Ltd R5C592 Memory Stick Bus Host Adapter (rev 12)     09:01.3 System peripheral: Ricoh Co Ltd xD-Picture Card Controller (rev 12)


How can I get irssi-proxy to send me missed mentions when I connect?

I have an irssi session running in my VPS. I connect to it via irssi-proxy using Xchat on my laptop or Andchat on my Android phone. Is there any way I can make it send all messages containing my nick since my last proxy connection to my client when I connect?


Pass the background flag (&) through expect and ssh

My command line/bash fu is extremely weak, but I'm trying to hone my abilities. Hopefully someone can help. I wrote a super simple `expect` script so that I can SSH in to a headless box we're using at work, while also sending in the password (for reasons that I am unable to expand upon, we can't use public keys to automate logging in). The script:               #!/usr/bin/expect -f     set timeout 30     spawn ssh -X ***@10.101.0.133 $argv     match_max 100000     expect "*?assword:*"     send -- "***\r"     interact      The box has a developer environment and Eclipse installed; most of the time that I'm connecting to it, I will end up tunneling straight in to Eclipse to work on some code that we keep on this box, so I usually end up using `script eclipse`. How can I pass the `&` flag in to expect so that it sees the ampersand as an argument for the ssh session I'm spawning ? When I use `script eclipse &` it just backgrounds script on my machine instead of doing something on the remote machine, but I'd like to be able to send the `&` in to `script` so that when Eclipse launches on the remote box I can still use the box's shell. This is probably an incredibly silly question, but any help would be greatly appreciated. **Update:** I figured out escaping the ampersand (which was definitely a "no duh" moment for me... meh). But this leads to a new problem. It seems that when I pass any arguments to my script, the expect command never allows me to interact; once the passed command executes the SSH session terminates. I'm guessing that this isn't a limitation of expect but a part of the behavior of ssh. Thanks for your answers though. **Update 2:** Just for the sake of posterity, I got the behavior I wanted by modifying the script to look like this:               #!/usr/bin/expect -f     set timeout 30     spawn ssh -X ***@10.101.0.133     match_max 100000     expect "*?assword:*"     send -- "***\r"     send $argv     send -- "\r"     interact


How to prevent user from changing files using linux permission

Is it possible, using linux permission scheme, to allow users create files but not edit or delete them at a later time? I mean, we have a delivery folder where users put artifacts there and we do not want these artifacts to be modified after delivered i.e. edited or deleted.


Boot to a terminal by default but still have GUI loading in Debian?

I've installed Debian on an old netbook of mine which I intend to turn into a thin client for a personal thingie while also having it ready to play a video or some music when needed.   After swimming against the current for hours, working around known bugs and getting wireless to work, I've finally come to a point where I can't find any more help on Google. (I've hardly used Linux) I wish to boot into a terminal (like pressing Control + Alt + F1) by default, but also have the GUI (Gnome, in my case) loading in the background if possible (for quick access with Control + Alt + F7).   How do I do this?


Scroll between tags in Awesome WM

How can I add smooth scrolling between tags in the Awesome WM? I realize I can't run compiz with Awesome. Is there something comparable that I can run? I don't need any other effects, switching between tags quickly is just disoreinting when it jumps as it does. EDIT: While I didn't find an exact answer, cairo-compmgr gives smooth fading between tags and clients. I'm satisfied :)


extensions.gnome.org is not working on fedora 17

Using fedora 17, when I click an extension to install from gnome shell extensions site, it wont install! How to know what the problem is?


How are zombie processes handled when the parent dies?

Which technique does the Unix system use to remove zombie processes whose parent has terminated?


stdout is empty

When a run the command:               cellprofiler --get-batch-commands "/users/pmrotem/CellProfiler/example_project/output/Batch_data5_8.h5"      in the shell, I get an output:               CellProfiler -c -r -b -p /users/pmrotem/CellProfiler/example_project/output/Batch_data5_8.h5 -g Metadata_Plate=20140602-LOPAC pilot_Assay Plate 0_5     CellProfiler -c -r -b -p /users/pmrotem/CellProfiler/example_project/output/Batch_data5_8.h5 -g Metadata_Plate=20140602-LOPAC pilot_Assay Plate 0_6     CellProfiler -c -r -b -p /users/pmrotem/CellProfiler/example_project/output/Batch_data5_8.h5 -g Metadata_Plate=20140602-LOPAC pilot_Assay Plate 0_7     CellProfiler -c -r -b -p /users/pmrotem/CellProfiler/example_project/output/Batch_data5_8.h5 -g Metadata_Plate=20140602-LOPAC pilot_Assay Plate 0_8      However when I try to output it to a file (I add `>test.txt`) I get an empty file. I also tried to invoke the command through python and also get empty stdout. stderr is also empty in both cases. What is the problem? any ideas?


Subtracting one text string from another leaving unique characters, perhaps using awk

Is there any way to subtract one column of data containing text from another column containing text and get third column containing unique charcters, for example using awk eg. Input               ab   a     cd   d         efg  ef      desired output:               ab   a   b     cd   d   c     efg  ef  g


Reevaluate the prompt expression each time a prompt is displayed in zsh

I'm adjusting my zsh prompt, based upon the dallas theme and the dstufft theme from oh-my-zsh. I love how dallas has various sections of the prompt contained in variables, which makes it much easier to understand what's going on. The problem is, these strings are evaluated _once_ for expansion. So when I attempt to use something dynamic, such as the `${PWD/#$HOME/~}` of dstufft, then it no longer updates dynamically. How can I get the best of both worlds? I'd like the prompt broken up into subsections that are evaluated each time the prompt gets written.


How does a script/program executes in unix?

I have a doubt about the execution pattern of a unix script. For example a script containing lines:               command B     function C()     {     Myscript   // Myscript is a script      command  D     }     command E      and suppose if `Myscript` takes a long time to execute (say 5 minutes) then is the next command (`command D`) going to execute or wait for `Myscript` to complete.


To sync /var or not?

It seems in a hard crash, in particular failure of a UPS to keep a system running, that some of the contents of logs get lost due to file system caching. As an experiment, I tried mounting the /var partition with the sync option. There was substantially more disk noise on a boot up, but the show stopper was trying to run apt. The disk pounded away while apt sat there unresponsive. Is it a mistake to mount /var sync, or is one of the options such as relatime, strictatime or noatime required for success? If so, is it safe to use one of these options on /var?


Character classes: construct my own

I want to construct my own character class in a script, then modify (and use) it, for example:   1. `[:myclass:]` contains `a`, `*`, `\n` _(as linefeed)_ and `[WHITESPACE]`.   2. I want to add all characters to `[:myclass:]` from `[:alnum:]`.   3. I want to remove the `p` character and the entire `[:upper:]` class from `[:myclass:]` The preferred solution doesn't depend on scripting languages. If you want to, use `bash`. * * * Bonus question: how to store this systemwide? Whenever I boot, `[:myclass:]` has to be available.


Need libca.so (Needed to install epics)

I need to install epics on my Ubuntu system, but when I try to it returns a warning saying it cannot find the dynamic library (libca.so or libCom.so). I tried to locate them, but it appears that they do not exist on my system. How can I get them on there? I thought they should automatically be there? This is really the symptom of a larger problem I'm having when I try to run the program I am working with. That gives me the following error: > >     OSError: /dls_sw/epics/R3.14.8.2/base/lib/linux-x86/libca.so: cannot > open shared object file: No such file or directory >   I figured I got this because I need to install epics, but I can't do that because libca.so doesn't exist on my system... I'm fairly new to all this so hopefully this all makes sense.


How to find out which file is currently opened in vim?

This may sound trivial but, on more than one occasion, I have found myself having forgotten which file in `vim` I have open (e.g. when I am looking through different log files and such) and the only way I knew how to find out was to close the file and look in the command history for the most recent command. Is there a command within vim to tell you which file you currently have opened without exiting the program or the file you have opened (e.g. `:<which_file_cmd>`?)