title: How do you verify a tar archive that is already written?

text: I know that you can do -W when creating an archive, but how do you verify and already-created archive? tvWf says it's not a valid tar archive?               $ mkdir tmp     $ echo asdkfjh > tmp/a     $ echo qweroiu > tmp/b     $ ls     tmp     $ tar cvf archive.tar tmp     tmp/     tmp/a     tmp/b     $ tar tvWf archive.tar     tar: This does not look like a tar archive     tar: Skipping to next header     tar: VERIFY FAILURE: 1 invalid header detected     tar: Error exit delayed from previous errors      Same thing happens with both tar 1.15 (which is the system default on centos 5) and 1.26 (which is the newest version from gnu).


title: What is the difference between /etc and /usr/local/etc

text: I am developing a daemon that needs to store lots of application data, and I noticed that on my system (Fedora 15), there is a `/usr/local/etc` directory. I've decided to install my daemon to `/usr/local/bin`, and I need a place for my config files. I didn't see this on Wikipedia. Is this non-standard or is this in fact the standard place for programs installed to `/usr/local/bin` to store config files? Reason being, I want to market this to sys-admins, and getting something like this wrong is not a great selling-point...


title: real time backup if file changed?

text: Are there any linux/unix console applications similar to Yadis that would allow me to:   * be set up from the **console**   * backup **multiple** directories   * backup / sync in **real time** after the files (text files) are changed **Update 1:** I write shell scripts, ruby scripts, aliases etc etc to make my work easier. I want to have backup of these files. The solution I am looking for will copy these files after any change was made to them to a subdirectory of my dropbox directory and that's it. Backup is done and available from anywhere. Always fresh and ready and I dont' have to think about it. I know I can run cron few times a day but I thought there must be a solution for what I am looking for available on linux. I am not so linux experienced so I asked here.


title: Ubuntu vs. CentOS and Binary Compatibility

text: I am trying to install software that is built on CentOS 4.7. Do you know if it will also run in Ubuntu? I read CentOS is 100% binary compatible. Is the same true for the most recent version of Ubuntu?


title: gdm graphical login prompt problem (OpenSUSE 11.2)

text: I'm trying to figure out why the graphical login prompt won't show up at the login page. I see the wallpaper just fine, but the graphical login prompt wont show up no matter how long I wait. So, In the console, I've done `init 3` to shut down gdm and then restarted it with `init 5`. The problem still persists. I downloaded and installed kdm and set it as the default display manager through editing `/etc/systemconfig/displaymanager`. It worked fine, except that the main menu and many other items in the panels are gone. So I removed gdm with zypper and then reinstalled it again. I set the gdm as the default display manager and restarted gdm. The same problem shows up again. So I tried to bypass the login page entirely by enabling autologin. I put my username in the autologin section of `/etc/systemconfig/displaymanager` and restarted gdm. No go, I still get the same problem. I'm thinking it mightn't be gdm related and that something else is interfering with gdm startup, but I'm stumped at this point. Any ideas?


What makes CentOS "enterprisey" compared to "generic" distributions like Ubuntu? When I say "enterprisey" I actually mean "better for server deployments". Just a general question, because I was thinking of hosting a web application on my computer (which runs Ubuntu) and came upon a page that said that CentOS had 30% market share for servers. Of course, that doesn't exactly indicate that it's better in anyway, so I just wanted to ask. ## Edit There's another thing I really fail to understand ... most of these distributions, use the same applications, have the same package manager, and all of them are powered by the same kernel. Where's the difference, then? RHEL's "happy text page" says:   1. more secure applications   2. protection against commonly exploited security flaws, e.g. buffer overflows integrated in the standard software stack   3. highest-grade protection via the SELinux security feature. Protects system services from attacks, full transparency and is easy to extend and adopt.   4. smartcard authentication support ## Questions   1. How? Unless RHEL somehow has modified versions of the software stack that you'll be using (in my case, Python and SQLite3), there wouldn't be any difference.   2. Doesn't every other distribution claim that?   3. I've heard about problems concerning SELinux. Would like to know more about it.   4. ?


title: Can't install software in Debian 6

text: I installed `Debian 6 Squeez` on my virtual machine and I can't install software using `aptitude` or `apt-get`. This is my `sources.list` file:               root@debian:/etc/apt# cat sources.list     #           # deb cdrom:[Debian GNU/Linux 6.0.5 _Squeeze_ - Official i386 DVD Binary-1 20120512-13:45]/ squeeze contrib main          deb cdrom:[Debian GNU/Linux 6.0.5 _Squeeze_ - Official i386 DVD Binary-1 20120512-13:45]/ squeeze contrib main          deb http://security.debian.org/ squeeze/updates main contrib     deb-src http://security.debian.org/ squeeze/updates main contrib          # squeeze-updates, previously known as 'volatile'     # A network mirror was not selected during install.  The following entries     # are provided as examples, but you should amend them as appropriate     # for your mirror of choice.     #     # deb http://ftp.debian.org/debian/ squeeze-updates main contrib     # deb-src http://ftp.debian.org/debian/ squeeze-updates main contrib     root@debian:/etc/apt#       I tried commenting the `cdrom` lines, I also tried to add some sources I found on the net but none of them are working. Can anyone tell me why the default `sources.list` file doesn't have the appropriate configuration so I can easily `aptitude install lftp` for example? What can I do to install software from their repositories?


title: Arch install Compiz

text: I'm new to arch, and want to install Xfce with Compiz. I saw on tutorials what packages to install , but when I try to install them with `pacman -S compiz-...`, I only get things like: `error: target not found: ccsm`. How do I get to the packages?


title: Problems with Dell Wireless 5570 HSPA+ Mobile Broadband card

text: I've got a new Dell Latitude e7440, and a Dell Wireless 5570 HSPA+ mobile broadband card. I cannot get the broadband card to work. I can see the card:               # lshw       ....       *-network DISABLED            description: Ethernet interface            physical id: 1            logical name: wwan0            serial: 46:51:4c:75:9d:ad            capabilities: ethernet physical            configuration: broadcast=yes driver=cdc_mbim driverversion=22-Aug-2005 firmware=CDC MBIM link=no multicast=yes      And I can get rid of the DISABLED text:               # ifconfig wwan0 up     # ifconfig wwan0     wwan0     Link encap:Ethernet  HWaddr 46:51:4c:75:9d:ad                 inet6 addr: fe80::4451:4cff:fe75:9dad/64 Scope:Link               UP BROADCAST RUNNING NOARP MULTICAST  MTU:1500  Metric:1               RX packets:0 errors:0 dropped:0 overruns:0 frame:0               TX packets:11 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000                RX bytes:0 (0.0 B)  TX bytes:3937 (3.9 KB)     # lshw       ....       *-network            description: Ethernet interface            physical id: 3            logical name: wwan0            serial: 46:51:4c:75:9d:ad            capabilities: ethernet physical            configuration: broadcast=yes driver=cdc_mbim driverversion=22-Aug-2005 firmware=CDC MBIM link=yes multicast=yes      But I cannot _use_ the card in any way.   * There's no `/dev/ttyUSBx` to which I could input AT commands.    * I cannot see a mobile broadband connection in the Network manager.    * tools like `mbim-network` simply say the connection to the modem failed My Dell BIOS version is `A10`, and from BIOS I can see the card. It's enabled and from that perspective there shouldn't be anything wrong with it. If I need to debug the driver, I'm willing to give that a try but I need some pointers on where to start. Any help is much appreciated Below is a list of debug output. Please ask for more in the comments if you think of anything that's helpful. * * * Here's `lsusb -v`:               # lsusb -v     Bus 002 Device 017: ID 413c:81a3 Dell Computer Corp.      Device Descriptor:       bLength                18       bDescriptorType         1       bcdUSB               2.00       bDeviceClass            0 (Defined at Interface level)       bDeviceSubClass         0        bDeviceProtocol         0        bMaxPacketSize0        64       idVendor           0x413c Dell Computer Corp.       idProduct          0x81a3        bcdDevice            0.06       iManufacturer           1 Sierra Wireless, Incorporated       iProduct                2 Dell Wireless 5570 HSPA+ (42Mbps) Mobile Broadband Card       iSerial                 3        bNumConfigurations      2       Configuration Descriptor:         bLength                 9         bDescriptorType         2         wTotalLength          204         bNumInterfaces          4         bConfigurationValue     1         iConfiguration          0          bmAttributes         0xe0           Self Powered           Remote Wakeup         MaxPower              500mA         Interface Descriptor:           bLength                 9           bDescriptorType         4           bInterfaceNumber        2           bAlternateSetting       0           bNumEndpoints           3           bInterfaceClass       255 Vendor Specific Class           bInterfaceSubClass      0            bInterfaceProtocol      0            iInterface              0            ** UNRECOGNIZED:  05 24 00 10 01           ** UNRECOGNIZED:  05 24 01 00 00           ** UNRECOGNIZED:  04 24 02 02           ** UNRECOGNIZED:  05 24 06 00 00           Endpoint Descriptor:             bLength                 7             bDescriptorType         5             bEndpointAddress     0x82  EP 2 IN             bmAttributes            3               Transfer Type            Interrupt               Synch Type               None               Usage Type               Data             wMaxPacketSize     0x000c  1x 12 bytes             bInterval               9           Endpoint Descriptor:             bLength                 7             bDescriptorType         5             bEndpointAddress     0x81  EP 1 IN             bmAttributes            2               Transfer Type            Bulk               Synch Type               None               Usage Type               Data             wMaxPacketSize     0x0200  1x 512 bytes             bInterval               0           Endpoint Descriptor:             bLength                 7             bDescriptorType         5             bEndpointAddress     0x01  EP 1 OUT             bmAttributes            2               Transfer Type            Bulk               Synch Type               None               Usage Type               Data             wMaxPacketSize     0x0200  1x 512 bytes             bInterval               0         Interface Descriptor:           bLength                 9           bDescriptorType         4           bInterfaceNumber        3           bAlternateSetting       0           bNumEndpoints           3           bInterfaceClass       255 Vendor Specific Class           bInterfaceSubClass      0            bInterfaceProtocol      0            iInterface              0            ** UNRECOGNIZED:  05 24 00 10 01           ** UNRECOGNIZED:  05 24 01 00 00           ** UNRECOGNIZED:  04 24 02 02           ** UNRECOGNIZED:  05 24 06 00 00           Endpoint Descriptor:             bLength                 7             bDescriptorType         5             bEndpointAddress     0x84  EP 4 IN             bmAttributes            3               Transfer Type            Interrupt               Synch Type               None               Usage Type               Data             wMaxPacketSize     0x000c  1x 12 bytes             bInterval               9           Endpoint Descriptor:             bLength                 7             bDescriptorType         5             bEndpointAddress     0x83  EP 3 IN             bmAttributes            2               Transfer Type            Bulk               Synch Type               None               Usage Type               Data             wMaxPacketSize     0x0200  1x 512 bytes             bInterval               0           Endpoint Descriptor:             bLength                 7             bDescriptorType         5             bEndpointAddress     0x02  EP 2 OUT             bmAttributes            2               Transfer Type            Bulk               Synch Type               None               Usage Type               Data             wMaxPacketSize     0x0200  1x 512 bytes             bInterval               0         Interface Descriptor:           bLength                 9           bDescriptorType         4           bInterfaceNumber        8           bAlternateSetting       0           bNumEndpoints           3           bInterfaceClass       255 Vendor Specific Class           bInterfaceSubClass    255 Vendor Specific Subclass           bInterfaceProtocol    255 Vendor Specific Protocol           iInterface              0            Endpoint Descriptor:             bLength                 7             bDescriptorType         5             bEndpointAddress     0x86  EP 6 IN             bmAttributes            3               Transfer Type            Interrupt               Synch Type               None               Usage Type               Data             wMaxPacketSize     0x000a  1x 10 bytes             bInterval               9           Endpoint Descriptor:             bLength                 7             bDescriptorType         5             bEndpointAddress     0x85  EP 5 IN             bmAttributes            2               Transfer Type            Bulk               Synch Type               None               Usage Type               Data             wMaxPacketSize     0x0200  1x 512 bytes             bInterval               0           Endpoint Descriptor:             bLength                 7             bDescriptorType         5             bEndpointAddress     0x03  EP 3 OUT             bmAttributes            2               Transfer Type            Bulk               Synch Type               None               Usage Type               Data             wMaxPacketSize     0x0200  1x 512 bytes             bInterval               0             ** UNRECOGNIZED:  2c ff 42 49 53 54 00 01 07 f5 40 f6 00 00 00 00 01 f7 c4 09 02 f8 c4 09 03 f9 88 13 04 fa 10 27 05 fb 10 27 06 fc c4 09 07 fd c4 09         Interface Descriptor:           bLength                 9           bDescriptorType         4           bInterfaceNumber        0           bAlternateSetting       0           bNumEndpoints           2           bInterfaceClass       255 Vendor Specific Class           bInterfaceSubClass    255 Vendor Specific Subclass           bInterfaceProtocol    255 Vendor Specific Protocol           iInterface              0            Endpoint Descriptor:             bLength                 7             bDescriptorType         5             bEndpointAddress     0x87  EP 7 IN             bmAttributes            2               Transfer Type            Bulk               Synch Type               None               Usage Type               Data             wMaxPacketSize     0x0200  1x 512 bytes             bInterval               0           Endpoint Descriptor:             bLength                 7             bDescriptorType         5             bEndpointAddress     0x04  EP 4 OUT             bmAttributes            2               Transfer Type            Bulk               Synch Type               None               Usage Type               Data             wMaxPacketSize     0x0200  1x 512 bytes             bInterval               0       Configuration Descriptor:         bLength                 9         bDescriptorType         2         wTotalLength           82         bNumInterfaces          2         bConfigurationValue     2         iConfiguration          0          bmAttributes         0xe0           Self Powered           Remote Wakeup         MaxPower              500mA         Interface Association:           bLength                 8           bDescriptorType        11           bFirstInterface        12           bInterfaceCount         2           bFunctionClass          2 Communications           bFunctionSubClass      14            bFunctionProtocol       0            iFunction               0          Interface Descriptor:           bLength                 9           bDescriptorType         4           bInterfaceNumber       12           bAlternateSetting       0           bNumEndpoints           1           bInterfaceClass         2 Communications           bInterfaceSubClass     14            bInterfaceProtocol      0            iInterface              0            CDC Header:             bcdCDC               1.10           CDC MBIM:             bcdMBIMVersion       1.00             wMaxControlMessage   4096             bNumberFilters       16             bMaxFilterSize       128             wMaxSegmentSize      4064             bmNetworkCapabilities 0x20               8-byte ntb input size           Endpoint Descriptor:             bLength                 7             bDescriptorType         5             bEndpointAddress     0x82  EP 2 IN             bmAttributes            3               Transfer Type            Interrupt               Synch Type               None               Usage Type               Data             wMaxPacketSize     0x0040  1x 64 bytes             bInterval               9         Interface Descriptor:           bLength                 9           bDescriptorType         4           bInterfaceNumber       13           bAlternateSetting       0           bNumEndpoints           0           bInterfaceClass        10 CDC Data           bInterfaceSubClass      0 Unused           bInterfaceProtocol      2            iInterface              0          Interface Descriptor:           bLength                 9           bDescriptorType         4           bInterfaceNumber       13           bAlternateSetting       1           bNumEndpoints           2           bInterfaceClass        10 CDC Data           bInterfaceSubClass      0 Unused           bInterfaceProtocol      2            iInterface              0            Endpoint Descriptor:             bLength                 7             bDescriptorType         5             bEndpointAddress     0x81  EP 1 IN             bmAttributes            2               Transfer Type            Bulk               Synch Type               None               Usage Type               Data             wMaxPacketSize     0x0200  1x 512 bytes             bInterval               0           Endpoint Descriptor:             bLength                 7             bDescriptorType         5             bEndpointAddress     0x01  EP 1 OUT             bmAttributes            2               Transfer Type            Bulk               Synch Type               None               Usage Type               Data             wMaxPacketSize     0x0200  1x 512 bytes             bInterval               0     Device Qualifier (for other device speed):       bLength                10       bDescriptorType         6       bcdUSB               2.00       bDeviceClass            0 (Defined at Interface level)       bDeviceSubClass         0        bDeviceProtocol         0        bMaxPacketSize0        64       bNumConfigurations      2     Device Status:     0x0000       (Bus Powered)      And the `usb-devices` output for the modem:               # usb-devices     T:  Bus=02 Lev=01 Prnt=01 Port=06 Cnt=02 Dev#= 17 Spd=480 MxCh= 0     D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  2     P:  Vendor=413c ProdID=81a3 Rev=00.06     S:  Manufacturer=Sierra Wireless, Incorporated     S:  Product=Dell Wireless 5570 HSPA+ (42Mbps) Mobile Broadband Card     C:  #Ifs= 2 Cfg#= 2 Atr=e0 MxPwr=500mA     /usr/bin/usb-devices: line 79: printf: c: invalid number     I:  If#= 0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim     /usr/bin/usb-devices: line 79: printf: d: invalid number     I:  If#= 0 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim      Here's the `rfkill`-information:               # cat /sys/kernel/debug/dell_laptop/rfkill     status: 0x1015D     Bit 0 : Hardware switch supported:   1     Bit 1 : Wifi locator supported:      0     Bit 2 : Wifi is supported:           1     Bit 3 : Bluetooth is supported:      1     Bit 4 : WWAN is supported:           1     Bit 5 : Wireless keyboard supported: 0     Bit 8 : Wifi is installed:           1     Bit 9 : Bluetooth is installed:      0     Bit 10: WWAN is installed:           0     Bit 16: Hardware switch is on:       1     Bit 17: Wifi is blocked:             0     Bit 18: Bluetooth is blocked:        0     Bit 19: WWAN is blocked:             0          hwswitch_state: 0x1F     Bit 0 : Wifi controlled by switch:      1     Bit 1 : Bluetooth controlled by switch: 1     Bit 2 : WWAN controlled by switch:      1     Bit 7 : Wireless switch config locked:  0     Bit 8 : Wifi locator enabled:           0     Bit 15: Wifi locator setting locked:    0      This is what you can see via `dmesg` whenever the device is enabled:               [ 2101.897753] usb 2-7: new high-speed USB device number 17 using xhci_hcd     [ 2102.026467] usb 2-7: config 1 has an invalid interface number: 8 but max is 3     [ 2102.026480] usb 2-7: config 1 has no interface number 1     [ 2102.026926] usb 2-7: config 2 has an invalid interface number: 12 but max is 1     [ 2102.026930] usb 2-7: config 2 has an invalid interface number: 13 but max is 1     [ 2102.026941] usb 2-7: config 2 has an invalid interface number: 13 but max is 1     [ 2102.026942] usb 2-7: config 2 has no interface number 0     [ 2102.026943] usb 2-7: config 2 has no interface number 1     [ 2102.027618] usb 2-7: New USB device found, idVendor=413c, idProduct=81a3     [ 2102.027621] usb 2-7: New USB device strings: Mfr=1, Product=2, SerialNumber=3     [ 2102.027623] usb 2-7: Product: Dell Wireless 5570 HSPA+ (42Mbps) Mobile Broadband Card     [ 2102.027624] usb 2-7: Manufacturer: Sierra Wireless, Incorporated     [ 2102.029821] cdc_mbim 2-7:2.12: cdc-wdm0: USB WDM device     [ 2102.029954] cdc_mbim 2-7:2.12 wwan0: register 'cdc_mbim' at usb-0000:00:14.0-7, CDC MBIM, 46:51:4c:75:9d:ad      `nmcli` output:               # nmcli nm status     RUNNING         STATE           WIFI-HARDWARE   WIFI       WWAN-HARDWARE   WWAN           running         connected       enabled         enabled    enabled         enabled         This is what I get when I try to start it with `mbim-network`:               # mbim-network /dev/cdc-wdm0 start     Querying subscriber ready status 'mbimcli -d /dev/cdc-wdm0 --query-subscriber-ready-status --no-close'...     error: couldn't open the MbimDevice: Failure          Querying registration state 'mbimcli -d /dev/cdc-wdm0 --query-registration-state --no-open= --no-close'...     error: invalid transaction ID specified:           Attaching to packet service with 'mbimcli -d /dev/cdc-wdm0 --attach-packet-service --no-open= --no-close'...     error: invalid transaction ID specified:      Starting network with 'mbimcli -d /dev/cdc-wdm0 --connect= --no-open= --no-close'...     error: invalid transaction ID specified:      Network start failed      The driver should be OK, grepping for the vendor and product id combination from `modprobe` output:               # modprobe -c | grep -i 413c.*81a3     alias usb:v413Cp81A3d*dc*dsc*dp*ic*isc*ip*in00* qcserial     alias usb:v413Cp81A3d*dc*dsc*dp*ic*isc*ip*in02* qcserial     alias usb:v413Cp81A3d*dc*dsc*dp*ic*isc*ip*in03* qcserial     alias usb:v413Cp81A3d*dc*dsc*dp*ic*isc*ip*in08* qmi_wwan      Here's my linux version. I'm running a modified kernel due to a multiheading docking station problem, but this modem issue occurs identically on the 3.13 kernel which was the default when I installed ubuntu 14.04.               # uname -a     Linux slartibartfast 3.15.0-rc8+ #5 SMP Mon Jul 21 14:18:58 EEST 2014 x86_64 x86_64 x86_64 GNU/Linux      Using `libqmi` and `qmicli`, I get some interaction with the modem, but still some fairly confusing error messages. I have not yet had time to look into this further.               $ sudo qmicli -d /dev/cdc-wdm0 --verbose --wds-start-network= --client-no-release-cid     [27 elo 2014, 12:41:16] [Debug] QMI Device at '/dev/cdc-wdm0' ready     [27 elo 2014, 12:41:16] [Debug] [/dev/cdc-wdm0] Assuming service 'wds' is supported...     [27 elo 2014, 12:41:16] [Debug] [/dev/cdc-wdm0] Allocating new client ID...     [27 elo 2014, 12:41:16] [Debug] [/dev/cdc-wdm0] Sent message...     <<<<<< RAW:     <<<<<<   length = 16     <<<<<<   data   = 01:0F:00:00:00:00:00:01:22:00:04:00:01:01:00:01          [27 elo 2014, 12:41:16] [Debug] [/dev/cdc-wdm0] Sent message (translated)...     <<<<<< QMUX:     <<<<<<   length  = 15     <<<<<<   flags   = 0x00     <<<<<<   service = "ctl"     <<<<<<   client  = 0     <<<<<< QMI:     <<<<<<   flags       = "none"     <<<<<<   transaction = 1     <<<<<<   tlv_length  = 4     <<<<<<   message     = "Allocate CID" (0x0022)     <<<<<< TLV:     <<<<<<   type       = "Service" (0x01)     <<<<<<   length     = 1     <<<<<<   value      = 01     <<<<<<   translated = wds          [27 elo 2014, 12:41:16] [Debug] [/dev/cdc-wdm0] Received message...     >>>>>> RAW:     >>>>>>   length = 24     >>>>>>   data   = 01:17:00:80:00:00:01:01:22:00:0C:00:02:04:00:00:00:00:00:01:02:00:01:08          [27 elo 2014, 12:41:16] [Debug] [/dev/cdc-wdm0] Received message (translated)...     >>>>>> QMUX:     >>>>>>   length  = 23     >>>>>>   flags   = 0x80     >>>>>>   service = "ctl"     >>>>>>   client  = 0     >>>>>> QMI:     >>>>>>   flags       = "response"     >>>>>>   transaction = 1     >>>>>>   tlv_length  = 12     >>>>>>   message     = "Allocate CID" (0x0022)     >>>>>> TLV:     >>>>>>   type       = "Result" (0x02)     >>>>>>   length     = 4     >>>>>>   value      = 00:00:00:00     >>>>>>   translated = SUCCESS     >>>>>> TLV:     >>>>>>   type       = "Allocation Info" (0x01)     >>>>>>   length     = 2     >>>>>>   value      = 01:08     >>>>>>   translated = [ service = 'wds' cid = '8' ]          [27 elo 2014, 12:41:16] [Debug] [/dev/cdc-wdm0] Registered 'wds' (version unknown) client with ID '8'     [27 elo 2014, 12:41:16] [Debug] Asynchronously starting network...     [27 elo 2014, 12:41:16] [Debug] [/dev/cdc-wdm0] Sent message...     <<<<<< RAW:     <<<<<<   length = 13     <<<<<<   data   = 01:0C:00:00:01:08:00:01:00:20:00:00:00          [27 elo 2014, 12:41:16] [Debug] [/dev/cdc-wdm0] Sent message (translated)...     <<<<<< QMUX:     <<<<<<   length  = 12     <<<<<<   flags   = 0x00     <<<<<<   service = "wds"     <<<<<<   client  = 8     <<<<<< QMI:     <<<<<<   flags       = "none"     <<<<<<   transaction = 1     <<<<<<   tlv_length  = 0     <<<<<<   message     = "Start Network" (0x0020)          [27 elo 2014, 12:41:16] [Debug] [/dev/cdc-wdm0] Received message...     >>>>>> RAW:     >>>>>>   length = 32     >>>>>>   data   = 01:1F:00:80:01:08:02:01:00:20:00:13:00:02:04:00:01:00:0E:00:10:02:00:03:00:11:04:00:03:00:D1:07          [27 elo 2014, 12:41:16] [Debug] [/dev/cdc-wdm0] Received message (translated)...     >>>>>> QMUX:     >>>>>>   length  = 31     >>>>>>   flags   = 0x80     >>>>>>   service = "wds"     >>>>>>   client  = 8     >>>>>> QMI:     >>>>>>   flags       = "response"     >>>>>>   transaction = 1     >>>>>>   tlv_length  = 19     >>>>>>   message     = "Start Network" (0x0020)     >>>>>> TLV:     >>>>>>   type       = "Result" (0x02)     >>>>>>   length     = 4     >>>>>>   value      = 01:00:0E:00     >>>>>>   translated = FAILURE: CallFailed     >>>>>> TLV:     >>>>>>   type       = "Call End Reason" (0x10)     >>>>>>   length     = 2     >>>>>>   value      = 03:00     >>>>>>   translated = generic-no-service     >>>>>> TLV:     >>>>>>   type       = "Verbose Call End Reason" (0x11)     >>>>>>   length     = 4     >>>>>>   value      = 03:00:D1:07     >>>>>>   translated = [ type = 'cm' reason = '2001' ]          error: couldn't start network: QMI protocol error (14): 'CallFailed'     call end reason (3): generic-no-service     verbose call end reason (3,2001): [cm] no-service     [/dev/cdc-wdm0] Client ID not released:         Service: 'wds'             CID: '8'     [27 elo 2014, 12:41:16] [Debug] [/dev/cdc-wdm0] Unregistered 'wds' client with ID '8'     [27 elo 2014, 12:41:16] [Debug] Client released      I can also set my pin code with `qmcli`:               # qmicli --dms-uim-verify-pin=PIN,xxxx -d /dev/cdc-wdm0     [/dev/cdc-wdm0] PIN verified successfully      And get some information:               # qmicli -d /dev/cdc-wdm0 --dms-get-manufacturer      [/dev/cdc-wdm0] Device manufacturer retrieved:         Manufacturer: 'Sierra Wireless, Incorporated'          # qmicli -d /dev/cdc-wdm0 --dms-get-model     [/dev/cdc-wdm0] Device model retrieved:         Model: 'MC8805'          # qmicli -d /dev/cdc-wdm0 --dms-get-capabilities     [/dev/cdc-wdm0] Device capabilities retrieved:         Max TX channel rate: '5742000'         Max RX channel rate: '42200000'                Data Service: 'non-simultaneous-cs-ps'                         SIM: 'supported'                    Networks: 'gsm, umts'


title: OpenVZ bridged networked adapters won't work from sample configs

text: I've made a copy of the basic config and added the line:               NETIF="ifname=eth0,bridge=br0"      When I create a new machine and enter it I can't make the network adapter work yet creating an instance from the basic config (and same template os) and then applying:               vzctl set 101 --netif_add eth0,,,,br0 --save      This configuration works fine. I've checked the configs of any machines made with the first method and it seems to create the configs correctly yet this problem still persists. Any ideas?


title: pfSense and Belkin Integration

text: I am in a unique situation. I want to have my previous Linux box as a router, but I don't have wireless capability on it or even a second ethernet port, so I was wondering if there was a way I could make use of pfSense despite this, until I get the new parts? What I'd like to do, specifically, is let the box monitor and firewall for the network, but obviously I run into a problem on the second part, as I don't have a way for it to be the first connection in the chain. So, for the weekend I can settle for some sniffing/caching abilities, but I'd like to know how they might be implemented? I'm aware that pfSense is the way to go as far as the overall router setup goes, but perhaps there are lesser apps that will do me a favor in the meantime?


title: How to select which OS kernel to upgrade when multiple OS'es are installed?

text: I am trying to upgrade my kernel on a machine with multiple OS'es. I have a Red Hawk OS (a real-time Red Hat variant) and Red Hat installed. I can select which OS to boot into using grub. I'd like to upgrade the Red Hat OS which is currently running kernel 2.6 to kernel 3.11. I booted into the Red Hat OS using Grub and then I followed the instructions here (which I have used successfully before to upgrade a CentOS): http://www.linuxfunda.com/2013/11/08/how-to-upgrade-the-kernel-on-centos/ However the commands seem to upgrade my Red Hawk OS instance instead of the Red Hat OS instance. When I look at the grub entries I see the following:               title RedHawk Linux (3.10.37)        root (hd0,0)        kernel /vmlinuz-3.10.37 ro root=/dev/mapper/vg_dornier-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD rd_LVM_LV=vg_dornier/lv_swap SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_LVM_LV=vg_dornier/lv_root  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb nmi_watchdog=0 enforcing=0 quiet isolcpus=6,7        initrd /initramfs-3.10.37.img      How can I appropriately select which OS to upgrade?


title: Bash script to remove user

text: I need to create a Bash script to remove a user.   We use RHEL version 4, 5, & 6.   Lets say usernames are Ray4 & Ray6 & the script name is deal.   Specific tasks for this script are:   1. Does the user exist ?   2. If user exists, backup /homedirectory for this user, remove username and place in /root/DeletedUsers   3. If /root/DeletedUsers directory doesn't exist, create it.    4. If any firewall rules exist for this user, email me the results for those rules and on which nodes.    5. If this user exists in sudoers, don't delete, but comment out.  This is what I have so far. I want to make sure this works, before I run it in RHN Satellite. After making the suggested changes. Here are the new errors I am getting now.               [root@localhost bin]# ./deal     ./deal: line 7: [[!: command not found     Usage: userdel [options] LOGIN          Options:       -f, --force                   force removal of files,                                     even if not owned by user       -h, --help                    display this help message and exit       -r, --remove                  remove home directory and mail spool       -Z, --selinux-user            remove SELinux user from SELinux user mapping          Usage: userdel [options] LOGIN          Options:       -f, --force                   force removal of files,                                     even if not owned by user       -h, --help                    display this help message and exit       -r, --remove                  remove home directory and mail spool       -Z, --selinux-user            remove SELinux user from SELinux user mapping          Null message body; hope that's ok     ./deal: line 22: [: -me: binary operator expected                    This is source code:                    [root@localhost bin]# cat -n deal           1  #!/bin/bash      2        3  count=$(egrep -c Ray[46] /etc/passwd)      4  firewall=$(grep -c "192.168.5.5" /etc/sysconfig/iptables)      5  doers=$(egrep -c Ray[46] /etc/sudoers)      6        7  if [[! -d /root/DeletedUsers]]      8  then mkdir /root/DeletedUsers      9       10  fi     11       12  cp -Rf /home/Ray[46] /root/DeletedUsers     13  userdel -rf Ray [4]     14  userdel -rf Ray [6]     15       16  if [ $firewall -ne 0 ]     17       18  then mail -s "$firewallrulesexist" emailaddress < /dev/null     19       20  fi     21       22  if [ $doers -me 0 ]     23  then sed ^Ray[46] /#/i     24       25  EOF     26  fi


title: cp: what quotation marks are used in error messages?

text: I'm currently fiddling around with a dying harddisk, and while trying to `cp` data from it, I get errors like               cp: error reading ‘brokenFile’: Input/output error     # comparison: backtick: `, apostrophe '      I now try to copy the failed files again by using `sed` to convert the error messages to new `cp` invocations (I was successfull some times already). But: what are the funny quotation marks? They are even different at start/end. It is no backtick and no apostrophe. I copy/pasted it into my regex, but is there a better way? Maybe using compose?


title: How to empty a log file?

text: Currently my log files get very big. Is there a command to empty the files without delete and restore it? It involves 2 command which is sometimes taking too long.


title: How kernel allows a process to receive network data that do not belong to it?

text: Each process is assigned with port number when using network resource. A process can only send and receive network data from its assigned port number. How kernel allows security programs like IDS, IPS and Wireshark receive all network data that do not belong to them? What system calls or library routines involved that allow this?


title: How to get source code of running Fedora linux?

text: This is the first time I am working on Fedora. I will be writing some device drivers. I understand that for proper compilation of the driver I must have the same source code as that of the running kernel. In Ubuntu I used to do this using `apt-get`. But this is not working in Fedora, so how do I download this?


title: CentOS 6.2 black screen...help

text: I'm facing some problems with the CentOS graphical interface. When I try to reboot the machines, it seems everything okay. I can connect to the machine through `ssh` from other machine and it has no problem with using it. However, the screen on the actual machine (CentOS 6.2) shows me a black screen after the CentOS logo disappears. It should show me the login screen but nothing is on the screen.   * Can anyone know what would be the problem here?   * Can I try to re-install the graphical interface again? If so, how?


title: Which Unix tool for Pixel-art -generation?

text: I have had problems to generate pixel art for a game where units are of specific sizes such as 55x55 (not geometry but by pixels i.e. 55 pixels by 55 pixels). I have tried Gimp where I have misread many-times the sizes with the select tool -- it is irritating to get a bit too distorted size. Then I have used Inkscape that works actually quite good -- you generate the vector-image and select it and then you go to `"Export to bitmap"` where you can specify the size (this same feature is probably also in Blender, probably as easy). Anyway I am looking for something more powerful like having helper color- palettes easily or automatically-done perhaps like here with Gimp. I can find a variety of tools mentioning pixels but I hope you to point out the best before trying all of them.               $ apt-cache search pixel|wc          99     861    6029      > **Perhaps related** > >   1. http://graphicdesign.stackexchange.com/questions/7860/how-can-i-adjoin- > images-with-imagemagick-for-pixel-art > >   2. Some example with Photoshop here, create pixel art by reusing basic > things such as hands, hairs and bodies (create separate files for them). > >   3. A pixel-art competition here. > >   4. Using blender for generating stuff here programmatically. > >


title: Shell script: find iconized programs , if found , activate it

text: Stardict uses a tray icon , also allows multiple instance of itself , but sadly , i don't use a panel , so no notification area available. But when I hit on close , it minimized to tray , is there a way to find its "Window" ? if the WId was found , activate this window by sending some X message ? I'm not sure if it's possible. (for hidden windows) Thanks , and please provide a simple bash script


title: gnome-open replaced by sublime?

text: **Update:** It seems that it has been automatically fixed, however the same applies whenever I try to `sudo gnome-open` or `gksu gnome-open` Well, this is a really weird one. I'm currently running Mint 13 and I just installed all my apps, including Sublime Text 2 and Dropbox. Whenever I click the dropbox icon, instead of opening the folder, it opens sublime, the equivalent of running `sublime-text-2 <dropbox folder>`. Initially I thought it was a Dropbox bug, but when I tried to run `gnome-open .`, sublime gets opened (twice) instead of a files browser. What could be happening here? I get the same result by running `mate-open .`, altough both commands appear to be in the right directory:               ~  » whereis gnome-open      gnome-open: /usr/bin/gnome-open /usr/bin/X11/gnome-open /usr/share/man/man1/gnome-open.1.gz     ~  » whereis mate-open     mate-open: /usr/bin/mate-open /usr/bin/X11/mate-open      Also, I tried uninstalling sublime and both commands now work as they should, but whenever I install sublime, the same happens! Thanks for your time.


title: Can CONFIG_NTFS_FS be disabled completely?

text: I use ntfs-3g as file system type , I'm wondering if `CONFIG_NTFS_FS` is still necessary ? Seem you could remove that. Also does ntfs-3g have better performance than kernel ntfs driver ?


title: What perl script will scp directory with spaces in name?

text: I"ve been trying for several hours to figure out how to get perl to `scp` a directory with a space in the name. I'm currently getting the error               scp: ambiguous target      Here is the script that is not working:               #!/usr/bin/perl     # Assuming you already have passwordless ssh setup from some account to root on HOST     # On HOST, setup test files and directories     # root@HOST$ mkdir /tmp/from/spaced\ mydir     # root@HOST$ touch /tmp/from/spaced\ mydir/t1     # root@HOST$ mkdir /tmp/to          my $HOST='localhost';     my $escaped_component_name = 'spaced mydir';          # try to form scp from-arg that will preserve the space     # in the directory name by escaping whitespace with backslash     $escaped_component_name =~ s/(\s)/\\$1/g;     my $scp_from = '/tmp/from/'.$escaped_component_name.'/*';     my $scp_to = '/tmp/to/'.$escaped_component_name;          system 'scp', '-vr', '--', 'root@'.$HOST.':'.$scp_from, 'root@'.$HOST.':'.$scp_to;      Anyone see what I'm doing wrong?


title: Unable to write to file on FreeBSD -- read-only filesystem

text: I bought a load balancer that runs the application on of FreeBSD. I found the configuration file that has all the settings and login information for both the admin and read-only users. I logged in as the root user, but when I try to alter any files using `vi` (the only editor installed) I get a read-only filesystem error. I tried `chmod 777 file`, and when I do `ls -l` I can see that root has read, write, and execute privileges, but it still won't let me write to the file. What do I need to do to make this file writable?


title: How to actually test locale

text: So I know what locale does. Sets the output format of certain programs depending on what country/language you're in, for example 1000000 can be formatted like 1,000,000.00 1 000 000.00 1.000.000,00 and a variety of others on output. But is there a program to literally test this so that I could do `export LC_ALL=en_GB.utf8` vs `export LC_ALL=en_US.utf8` and observe different output?


title: Combining multiple commands into a single line

text: I had a directory named `myname` which was archived in `myname.tar`. Now I want to take `myname.tar`, unarchive it, and delete all the files in the `myname` directory (after unarchiving). Here are my commands for the above task:               find -name deleteme.tar     tar -xvf deleteme.tar     rm -r delete/*      These individual commands are working fine, but I need a one-line command, so I tried this:               find -name deleteme.tar | tar -xvf deleteme.at | rm -r delete/*      I got this error:               "rm -r deleteme/*     rm: cannot remove `deleteme/*': No such file or directory "      What am I doing wrong?


title: [RESOLVED]Various programs not working after yum install some packages

text: [RESOLVED]I found out that the Memory chip cause the problems. I change it and the system work fine now! * * * I'm using RHEL6.0 and encounter the problem that gdb,yum,rpm don't work any more. Perhaps package dependencies caused the problem.               # lsb_release -a     LSB Version:    :base-4.0-ia32:base-4.0-noarch:core-4.0-ia32:core-4.0-noarch:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-ia32:printing-4.0-noarch     Distributor ID: RedHatEnterpriseServer     Description:    Red Hat Enterprise Linux Server release 6.0 (Santiago)     Release:    6.0     Codename:   Santiago          # uname -a     Linux electronics.server 2.6.32-431.11.2.el6.i686 #1 SMP Tue Mar 25 17:17:46 UTC 2014 i686 i686 i386 GNU/Linux      Running `gdb` either returns an error or crashes randomly:               #gdb     gdb: symbol lookup error: /usr/lib/libpython2.6.so.1.0: undefined symbol: yCodec_Lookup      `yum` also fails:               #yum     There was a problem importing one of the Python modules     required to run yum. The error leading to this problem was:             /usr/lib/python2.6/site-packages/rpm/_rpmmodule.so: undefined symbol: headerKsEntry          Please install a package which provides this module, or     verify that the module is installed correctly.          It's possible that the above module doesn't match the     current version of Python, which is:     2.6.6 (r266:84292, Jan 22 2014, 09:37:14)      [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)]          If you cannot solve this problem yourself, please go to      the yum faq at:       http://yum.baseurl.org/wiki/Faq          Segmentation fault (core dumped)      I used `rpm` to check:               # rpm -V python yum     error: rpmdb: damaged header #759 retrieved -- skipping.     error: rpmdbNextIterator: skipping h#     764 Header V3 RSA/SHA1 Signature, key ID c105b9de: BAD     package python is not installed     error: rpmdbNextIterator: skipping h#     764 Header V3 RSA/SHA1 Signature, key ID c105b9de: BAD     error: rpmdbNextIterator: skipping h#     764 Header V3 RSA/SHA1 Signature, key ID c105b9de: BAD     error: rpmdbNextIterator: skipping h#     764 Header V3 RSA/SHA1 Signature, key ID c105b9de: BAD     error: rpmdbNextIterator: skipping h#     764 Header V3 RSA/SHA1 Signature, key ID c105b9de: BAD     error: rpmdbNextIterator: skipping h#    1107 Header V3 RSA/SHA1 Signature, key ID c105b9de: BAD     Unsatisfied dependencies for yum-3.2.29-43.el6.centos.noarch:         /usr/bin/python is needed by yum-3.2.29-43.el6.centos.noarch         python >= 2.4 is needed by yum-3.2.29-43.el6.centos.noarch         python(abi) = 2.6 is needed by yum-3.2.29-43.el6.centos.noarch         python-sqlite is needed by yum-3.2.29-43.el6.centos.noarch     ..5......    /usr/lib/python2.6/site-packages/rpmUtils/miscutils.pyc     ..5......    /usr/lib/python2.6/site-packages/rpmUtils/oldUtils.pyc     ..5......    /usr/lib/python2.6/site-packages/rpmUtils/oldUtils.pyo     ..5......    /usr/lib/python2.6/site-packages/rpmUtils/updates.pyc     ..5......    /usr/lib/python2.6/site-packages/rpmUtils/updates.pyo     ..5......    /usr/lib/python2.6/site-packages/yum/__init__.py     ..5......    /usr/lib/python2.6/site-packages/yum/__init__.pyc     ..5......    /usr/lib/python2.6/site-packages/yum/misc.pyo     ..5......    /usr/lib/python2.6/site-packages/yum/packageSack.pyc     ..5......    /usr/lib/python2.6/site-packages/yum/packageSack.pyo     ..5......    /usr/lib/python2.6/site-packages/yum/packages.py     ..5......    /usr/lib/python2.6/site-packages/yum/packages.pyo     ..5......    /usr/lib/python2.6/site-packages/yum/parser.py     ..5......    /usr/lib/python2.6/site-packages/yum/plugins.pyc     ..5......    /usr/lib/python2.6/site-packages/yum/plugins.pyo     ..5......    /usr/lib/python2.6/site-packages/yum/repoMDObject.pyc     ..5......    /usr/lib/python2.6/site-packages/yum/repoMDObject.pyo     ..5......    /usr/lib/python2.6/site-packages/yum/rpmsack.py     ..5......    /usr/lib/python2.6/site-packages/yum/rpmsack.pyc     ..5......    /usr/lib/python2.6/site-packages/yum/rpmsack.pyo     ..5......    /usr/lib/python2.6/site-packages/yum/sqlitesack.pyc     ..5......    /usr/lib/python2.6/site-packages/yum/update_md.pyc     ..5......    /usr/lib/python2.6/site-packages/yum/update_md.pyo     ..5......    /usr/lib/python2.6/site-packages/yum/yumRepo.pyc     ..5......    /usr/lib/python2.6/site-packages/yum/yumRepo.pyo     ..5......  d /usr/share/doc/yum-3.2.29/COPYING     ..5......  d /usr/share/doc/yum-3.2.29/ChangeLog     ..5......    /usr/share/locale/es/LC_MESSAGES/yum.mo     ..5......    /usr/share/locale/fr/LC_MESSAGES/yum.mo     ..5......    /usr/share/locale/ja/LC_MESSAGES/yum.mo     ..5......    /usr/share/locale/pa/LC_MESSAGES/yum.mo     ..5......    /usr/share/locale/ru/LC_MESSAGES/yum.mo     ..5......    /usr/share/locale/sr/LC_MESSAGES/yum.mo     ..5......    /usr/share/locale/sr@latin/LC_MESSAGES/yum.mo     ..5......    /usr/share/locale/uk/LC_MESSAGES/yum.mo     ..5......    /usr/share/yum-cli/callback.py     ..5......    /usr/share/yum-cli/cli.py     ..5......    /usr/share/yum-cli/cli.pyo     ..5......    /usr/share/yum-cli/output.py     ..5......    /usr/share/yum-cli/utils.pyc     ..5......    /usr/share/yum-cli/utils.pyo     ..5......    /usr/share/yum-cli/yumcommands.pyc     ..5......    /usr/share/yum-cli/yumcommands.pyo          # rpm -V rpm rpm-python     error: rpmdbNextIterator: skipping h#    1306 Header V3 RSA/SHA1 Signature, key ID c105b9de: BAD     package rpm is not installed     error: rpmdbNextIterator: skipping h#    1307 Header V3 RSA/SHA1 Signature, key ID c105b9de: BAD     package rpm-python is not installed     *** glibc detected *** rpm: free(): invalid pointer: 0x09118fea ***     ======= Backtrace: =========     /lib/libc.so.6[0x3bfe31]     /lib/libnspr4.so(PR_Free+0x28)[0x2feee98]     /lib/libplds4.so[0x318a6b]     /lib/libplds4.so(PL_HashTableDestroy+0x67)[0x3181e7]     /usr/lib/libnssutil3.so(SECOID_Shutdown+0x26)[0x2fc7046]     /usr/lib/libnss3.so[0x302f3b1]     /usr/lib/libnss3.so(NSS_Shutdown+0x85)[0x302f5f5]     /usr/lib/librpmio.so.1(rpmFreeCrypto+0x24)[0x76d4d4]     /usr/lib/librpm.so.1(rpmFreeRpmrc+0x3b9)[0x160379]     rpm[0x8049e31]     /lib/libc.so.6(__libc_start_main+0xe6)[0x365d26]     rpm[0x8049531]     ======= Memory map: ========     0011d000-00181000 r-xp 00000000 fd:00 533150     /usr/lib/librpm.so.1.0.0     00181000-00185000 rw-p 00064000 fd:00 533150     /usr/lib/librpm.so.1.0.0     00185000-00186000 rw-p 00000000 00:00 0      00186000-00192000 r-xp 00000000 fd:00 2491287    /lib/libnss_files-2.12.so     00192000-00193000 r--p 0000b000 fd:00 2491287    /lib/libnss_files-2.12.so     00193000-00194000 rw-p 0000c000 fd:00 2491287    /lib/libnss_files-2.12.so     00194000-001d5000 r-xp 00000000 fd:00 532562     /usr/lib/libsoftokn3.so     001d5000-001d6000 r--p 00040000 fd:00 532562     /usr/lib/libsoftokn3.so     001d6000-001d7000 rw-p 00041000 fd:00 532562     /usr/lib/libsoftokn3.so     00317000-0031a000 r-xp 00000000 fd:00 2491739    /lib/libplds4.so     0031a000-0031b000 r--p 00002000 fd:00 2491739    /lib/libplds4.so     0031b000-0031c000 rw-p 00003000 fd:00 2491739    /lib/libplds4.so     0031e000-00322000 r-xp 00000000 fd:00 2491738    /lib/libplc4.so     00322000-00323000 r--p 00003000 fd:00 2491738    /lib/libplc4.so     00323000-00324000 rw-p 00004000 fd:00 2491738    /lib/libplc4.so     00329000-00347000 r-xp 00000000 fd:00 2491272    /lib/ld-2.12.so     00347000-00348000 r--p 0001d000 fd:00 2491272    /lib/ld-2.12.so     00348000-00349000 rw-p 0001e000 fd:00 2491272    /lib/ld-2.12.so     0034f000-004e0000 r-xp 00000000 fd:00 2491286    /lib/libc-2.12.so     004e0000-004e2000 r--p 00191000 fd:00 2491286    /lib/libc-2.12.so     004e2000-004e3000 rw-p 00193000 fd:00 2491286    /lib/libc-2.12.so     004e3000-004e6000 rw-p 00000000 00:00 0      004e8000-004eb000 r-xp 00000000 fd:00 2491500    /lib/libdl-2.12.so     004eb000-004ec000 r--p 00002000 fd:00 2491500    /lib/libdl-2.12.so     004ec000-004ed000 rw-p 00003000 fd:00 2491500    /lib/libdl-2.12.so     004ef000-00506000 r-xp 00000000 fd:00 2491341    /lib/libpthread-2.12.so     00506000-00507000 r--p 00016000 fd:00 2491341    /lib/libpthread-2.12.so     00507000-00508000 rw-p 00017000 fd:00 2491341    /lib/libpthread-2.12.so     00508000-0050a000 rw-p 00000000 00:00 0      0050c000-00513000 r-xp 00000000 fd:00 2491352    /lib/librt-2.12.so     00513000-00514000 r--p 00006000 fd:00 2491352    /lib/librt-2.12.so     00514000-00515000 rw-p 00007000 fd:00 2491352    /lib/librt-2.12.so     00517000-00529000 r-xp 00000000 fd:00 2491502    /lib/libz.so.1.2.3     00529000-0052a000 r--p 00011000 fd:00 2491502    /lib/libz.so.1.2.3     0052a000-0052b000 rw-p 00012000 fd:00 2491502    /lib/libz.so.1.2.3     0052d000-00555000 r-xp 00000000 fd:00 2491288    /lib/libm-2.12.so     00555000-00556000 r--p 00027000 fd:00 2491288    /lib/libm-2.12.so     00556000-00557000 rw-p 00028000 fd:00 2491288    /lib/libm-2.12.so     00559000-00574000 r-xp 00000000 fd:00 542113     /usr/lib/libmagic.so.1.0.0     00574000-00575000 rw-p 0001b000 fd:00 542113     /usr/lib/libmagic.so.1.0.0     00575000-00577000 rw-p 00000000 00:00 0      00579000-0059c000 r-xp 00000000 fd:00 530543     /usr/lib/librpmbuild.so.1.0.0     0059c000-0059e000 rw-p 00023000 fd:00 530543     /usr/lib/librpmbuild.so.1.0.0     0059e000-005a2000 rw-p 00000000 00:00 0      00667000-00684000 r-xp 00000000 fd:00 2491515    /lib/libselinux.so.1     00684000-00685000 r--p 0001c000 fd:00 2491515    /lib/libselinux.so.1     00685000-00686000 rw-p 0001d000 fd:00 2491515    /lib/libselinux.so.1     00688000-0069d000 r-xp 00000000 fd:00 2491513    /lib/libresolv-2.12.so     0069d000-0069e000 ---p 00015000 fd:00 2491513    /lib/libresolv-2.12.so     0069e000-0069f000 r--p 00015000 fd:00 2491513    /lib/libresolv-2.12.so     0069f000-006a0000 rw-p 00016000 fd:00 2491513    /lib/libresolv-2.12.so     006a0000-006a2000 rw-p 00000000 00:00 0      006a4000-006ba000 r-xp 00000000 fd:00 539294     /usr/lib/libelf-0.152.so     006ba000-006bb000 r--p 00015000 fd:00 539294     /usr/lib/libelf-0.152.so     006bb000-006bc000 rw-p 00016000 fd:00 539294     /usr/lib/libelf-0.152.so     006be000-006ea000 r-xp 00000000 fd:00 542941     /usr/lib/liblua-5.1.so     006ea000-006eb000 rw-p 0002c000 fd:00 542941     /usr/lib/liblua-5.1.so     00729000-0072a000 r-xp 00000000 00:00 0          [vdso]     00758000-00780000 r-xp 00000000 fd:00 539241     /usr/lib/librpmio.so.1.0.0     00780000-00782000 rw-p 00028000 fd:00 539241     /usr/lib/librpmio.so.1.0.0     00782000-00784000 rw-p 00000000 00:00 0      007b5000-007b8000 r-xp 00000000 fd:00 2494002    /lib/libcap.so.2.16     007b8000-007b9000 rw-p 00002000 fd:00 2494002    /lib/libcap.so.2.16     00909000-0090e000 r-xp 00000000 fd:00 2491285    /lib/libnss_dns-2.12.so     0090e000-0090f000 r--p 00004000 fd:00 2491285    /lib/libnss_dns-2.12.so     0090f000-00910000 rw-p 00005000 fd:00 2491285    /lib/libnss_dns-2.12.so     009b6000-00a10000 r-xp 00000000 fd:00 2491524    /lib/libfreebl3.so     00a10000-00a11000 r--p 00059000 fd:00 2491524    /lib/libfreebl3.so     00a11000-00a12000 rw-p 0005a000 fd:00 2491524    /lib/libfreebl3.so     00a12000-00a16000 rw-p 00000000 00:00 0      00dea000-00df1000 r-xp 00000000 fd:00 2493999    /lib/libacl.so.1.1.0     00df1000-00df2000 r--p 00006000 fd:00 2493999    /lib/libacl.so.1.1.0     00df2000-00df3000 rw-p 00007000 fd:00 2493999    /lib/libacl.so.1.1.0     02bdb000-02bfe000 r-xp 00000000 fd:00 535421     /usr/lib/liblzma.so.0.0.0     02bfe000-02bff000 rw-p 00022000 fd:00 535421     /usr/lib/liblzma.so.0.0.0     02dfc000-02e19000 r-xp 00000000 fd:00 2491333    /lib/libgcc_s-4.4.7-20120601.so.1     02e19000-02e1a000 rw-p 0001d000 fd:00 2491333    /lib/libgcc_s-4.4.7-20120601.so.1     02e70000-02efe000 r-xp 00000000 fd:00 531021     /usr/lib/libsqlite3.so.0.8.6     02efe000-02f00000 rw-p 0008d000 fd:00 531021     /usr/lib/libsqlite3.so.0.8.6     02fb6000-02fd7000 r-xp 00000000 fd:00 530325     /usr/lib/libnssutil3.so     02fd7000-02fda000 r--p 00021000 fd:00 530325     /usr/lib/libnssutil3.so     02fda000-02fdb000 rw-p 00024000 fd:00 530325     /usr/lib/libnssutil3.so     02fdd000-03017000 r-xp 00000000 fd:00 2491734    /lib/libnspr4.so     03017000-03018000 r--p 00039000 fd:00 2491734    /lib/libnspr4.so     03018000-03019000 rw-p 0003a000 fd:00 2491734    /lib/libnspr4.so     03019000-0301b000 rw-p 00000000 00:00 0      0301d000-03154000 r-xp 00000000 fd:00 530395     /usr/lib/libnss3.so     03154000-03157000 r--p 00136000 fd:00 530395     /usr/lib/libnss3.so     03157000-03159000 rw-p 00139000 fd:00 530395     /usr/lib/libnss3.soAborted (core dumped)      Any help or advice would be greatly appreciated. Update:               # mv /var/lib/rpm /var/lib/rpm.bak     # mkdir /var/lib/rpm     # cp /var/lib/rpm.bak/Packages /var/lib/rpm/     # rpm --rebuilddb     rpmdb: page 0: illegal page type or format     rpmdb: PANIC: Invalid argument     error: db3 error(-30974) from dbcursor->c_get: DB_RUNRECOVERY: Fatal error, run database recovery     error: error(-30974) getting "/usr/lib/" records from Dirnames index     rpmdb: PANIC: fatal region error detected; run recovery     error: db3 error(-30974) from dbcursor->c_get: DB_RUNRECOVERY: Fatal error, run database recovery     error: error(-30974) getting "/usr/share/doc/" records from Dirnames index     rpmdb: PANIC: fatal region error detected; run recovery     error: db3 error(-30974) from dbcursor->c_get: DB_RUNRECOVERY: Fatal error, run database recovery     error: error(-30974) getting "/usr/share/doc/libXau-1.0.6/" records from Dirnames index     rpmdb: PANIC: fatal region error detected; run recovery     error: db3 error(-30974) from dbcursor->c_close: DB_RUNRECOVERY: Fatal error, run database recovery     rpmdb: PANIC: fatal region error detected; run recovery     error: db3 error(-30974) from db->sync: DB_RUNRECOVERY: Fatal error, run database recovery     rpmdb: PANIC: fatal region error detected; run recovery     error: db3 error(-30974) from db_create: DB_RUNRECOVERY: Fatal error, run database recovery     error: cannot open Requireversion index using db3 -  (-30974)     rpmdb: PANIC: fatal region error detected; run recovery     error: db3 error(-30974) from db_create: DB_RUNRECOVERY: Fatal error, run database recovery     error: cannot open Provideversion index using db3 -  (-30974)     rpmdb: PANIC: fatal region error detected; run recovery     error: db3 error(-30974) from db_create: DB_RUNRECOVERY: Fatal error, run database recovery     error: cannot open Installtid index using db3 -  (-30974)     rpmdb: PANIC: fatal region error detected; run recovery     error: db3 error(-30974) from db_create: DB_RUNRECOVERY: Fatal error, run database recovery     error: cannot open Sigmd5 index using db3 -  (-30974)     rpmdb: PANIC: fatal region error detected; run recovery     error: db3 error(-30974) from db_create: DB_RUNRECOVERY: Fatal error, run database recovery     error: cannot open Sha1header index using db3 -  (-30974)     rpmdb: PANIC: fatal region error detected; run recovery     error: db3 error(-30974) from db_create: DB_RUNRECOVERY: Fatal error, run database recovery     error: cannot open Filedigests index using db3 -  (-30974)     error: cannot add record originally at 769     rpmdb: PANIC: fatal region error detected; run recovery     error: db3 error(-30974) from db->close: DB_RUNRECOVERY: Fatal error, run database recovery     rpmdb: PANIC: fatal region error detected; run recovery     error: db3 error(-30974) from db->close: DB_RUNRECOVERY: Fatal error, run database recovery     rpmdb: PANIC: fatal region error detected; run recovery     error: db3 error(-30974) from db->close: DB_RUNRECOVERY: Fatal error, run database recovery     rpmdb: PANIC: fatal region error detected; run recovery     error: db3 error(-30974) from db->close: DB_RUNRECOVERY: Fatal error, run database recovery     rpmdb: PANIC: fatal region error detected; run recovery     error: db3 error(-30974) from db->close: DB_RUNRECOVERY: Fatal error, run database recovery     rpmdb: PANIC: fatal region error detected; run recovery     error: db3 error(-30974) from db->close: DB_RUNRECOVERY: Fatal error, run database recovery     rpmdb: PANIC: fatal region error detected; run recovery     error: db3 error(-30974) from db->close: DB_RUNRECOVERY: Fatal error, run database recovery     rpmdb: File handles still open at environment close     rpmdb: Open file handle: /var/lib/rpmrebuilddb.16120/Packages     rpmdb: Open file handle: /var/lib/rpmrebuilddb.16120/Name     rpmdb: Open file handle: /var/lib/rpmrebuilddb.16120/Basenames     rpmdb: Open file handle: /var/lib/rpmrebuilddb.16120/Group     rpmdb: Open file handle: /var/lib/rpmrebuilddb.16120/Requirename     rpmdb: Open file handle: /var/lib/rpmrebuilddb.16120/Providename     rpmdb: Open file handle: /var/lib/rpmrebuilddb.16120/Dirnames     rpmdb: PANIC: fatal region error detected; run recovery     error: db3 error(-30974) from dbenv->close: DB_RUNRECOVERY: Fatal error, run database recovery     warning: failed to rebuild database: original database remains in place     error: failed to remove directory /var/lib/rpmrebuilddb.16120: No such file or directory      reinstall `rpm-python` and `python` fails:               # rpm -ivh --force rpm-python-4.8.0-37.el6.i686.rpm python-2.6.6-51.el6.i686.rpm      error: rpmdbNextIterator: skipping h#    1156 Header V3 RSA/SHA1 Signature, key ID c105b9de: BAD     error: rpmdbNextIterator: skipping h#    1156 Header V3 RSA/SHA1 Signature, key ID c105b9de: BAD     error: rpmdbNextIterator: skipping h#    1156 Header V3 RSA/SHA1 Signature, key ID c105b9de: BAD     error: rpmdbNextIterator: skipping h#    1156 Header V3 RSA/SHA1 Signature, key ID c105b9de: BAD     error: rpmdbNextIterator: skipping h#    1156 Header V3 RSA/SHA1 Signature, key ID c105b9de: BAD     error: rpmdbNextIterator: skipping h#    1186 Header V3 RSA/SHA1 Signature, key ID c105b9de: BAD     error: rpmdbNextIterator: skipping h#    1156 Header V3 RSA/SHA1 Signature, key ID c105b9de: BAD     error: rpmdbNextIterator: skipping h#    1156 Header V3 RSA/SHA1 Signature, key ID c105b9de: BAD     error: rpmdbNextIterator: skipping h#    1156 Header V3 RSA/SHA1 Signature, key ID c105b9de: BAD     error: rpmdbNextIterator: skipping h#     765 Header V3 RSA/SHA1 Signature, key ID c105b9de: BAD     error: rpmdbNextIterator: skipping h#    1156 Header V3 RSA/SHA1 Signature, key ID c105b9de: BAD     error: rpmdbNextIterator: skipping h#     838 Header V3 RSA/SHA1 Signature, key ID c105b9de: BAD     error: rpmdbNextIterator: skipping h#    1306 Header V3 RSA/SHA1 Signature, key ID c105b9de: BAD     error: rpmdbNextIterator: skipping h#    1156 Header V3 RSA/SHA1 Signature, key ID c105b9de: BAD     error: rpmdbNextIterator: skipping h#    1156 Header V3 RSA/SHA1 Signature, key ID c105b9de: BAD     error: rpmdbNextIterator: skipping h#    1156 Header V3 RSA/SHA1 Signature, key ID c105b9de: BAD     error: rpmdbNextIterator: skipping h#     765 Header V3 RSA/SHA1 Signature, key ID c105b9de: BAD     error: rpmdbNextIterator: skipping h#     766 Header V3 RSA/SHA1 Signature, key ID c105b9de: BAD     error: Failed dependencies:         libc.so.6 is needed by rpm-python-4.8.0-37.el6.i686         libc.so.6(GLIBC_2.0) is needed by rpm-python-4.8.0-37.el6.i686         libc.so.6(GLIBC_2.1) is needed by rpm-python-4.8.0-37.el6.i686         libc.so.6(GLIBC_2.1.3) is needed by rpm-python-4.8.0-37.el6.i686         libc.so.6(GLIBC_2.3.4) is needed by rpm-python-4.8.0-37.el6.i686         libelf.so.1 is needed by rpm-python-4.8.0-37.el6.i686         libm.so.6 is needed by rpm-python-4.8.0-37.el6.i686         libpthread.so.0 is needed by rpm-python-4.8.0-37.el6.i686         libpthread.so.0(GLIBC_2.0) is needed by rpm-python-4.8.0-37.el6.i686         libpython2.6.so.1.0 is needed by rpm-python-4.8.0-37.el6.i686         librt.so.1 is needed by rpm-python-4.8.0-37.el6.i686         libselinux.so.1 is needed by rpm-python-4.8.0-37.el6.i686         rpm = 4.8.0-37.el6 is needed by rpm-python-4.8.0-37.el6.i686         rtld(GNU_HASH) is needed by rpm-python-4.8.0-37.el6.i686         libc.so.6 is needed by python-2.6.6-51.el6.i686         libc.so.6(GLIBC_2.0) is needed by python-2.6.6-51.el6.i686         libdl.so.2 is needed by python-2.6.6-51.el6.i686         libm.so.6 is needed by python-2.6.6-51.el6.i686         libpthread.so.0 is needed by python-2.6.6-51.el6.i686         libpython2.6.so.1.0 is needed by python-2.6.6-51.el6.i686         libutil.so.1 is needed by python-2.6.6-51.el6.i686         python-libs(x86-32) = 2.6.6-51.el6 is needed by python-2.6.6-51.el6.i686         rtld(GNU_HASH) is needed by python-2.6.6-51.el6.i686


title: Linux bridge blocks UDP packet from tap interfaces

text: **Introduction:** I'm working on a 6lowPAN projects of Wireless Sensor Networks. Basically, I have a set of nodes (Contiki OS) which are running on a linux host. Each nodes have its own tap interface which are bridged on br0. Inside the bridge, all things are working well : node can send request and receive properly neighbor exchanges. All exchanges are using 6lowPAN (IPV6 adaptation). **Problem** : Now, I'm interested by sending request from the host to nodes. So, I add route rules for the destination bbbb::/64 to br0. I can ping any node from the host linux, unfortunately UDP requests fail. I'm using Firefox to send (through the Copper plugin) a UDP packet which is correctly received and processed by the node, but the response is rejected by the bridge which replies host unreachable (Port unreachable). **Questions** : Are there constraints or particular behaviours on routing rules between bridge and its host? How can I get more log information about Linux's IP stack to determine why it doesn't forward packets to the Firefox socket? **Investigation** :   * I checked with `netstat` if Firefox is effectively listening on the proper response port [OK]   * I checked with `nc` if the host allows UDP IPv6 exchange [OK]   * No firewall rules [OK]   * I manually added an IPV6 address to br0 bbbb::1/64 with and without routing rules but this didn't work (ping no works at all) [OK]    * A lot of other exotic explorations **Basic configuration** :               brctl addbr br0     ip tuntap add dev br0 mode tap     brctl addif br0 tapXXX     echo 1 > /proc/sys/net/ipv6/conf/all/forwarding     ip -6 route add bbbb::/64 dev br0     ping6 ff02::1 -I br0 [OK]     ping6 bbbb::ff02:1:2:3 [OK]     firefox on coap://[bbbb::ff02:1:2:3]/hello <= FAILED (response is blocked by br0 bridge)      **Logs** : ifconfig               br0       Link encap:Ethernet  HWaddr e2:81:42:77:bf:10                 inet6 addr: fe80::28bf:62ff:fed7:54ac/64 Scope:Link      `netstat -p6`               AIC Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name       udp6       0      0 fe80::28bf:62ff:f:46939 bbbb::ff:fe00:1%1:5683  ESTABLISHED 2544/firefox        Wireshark               fe80::28bf:62ff:fed7:54ac   bbbb::ff:fe00:1       COAP     73     Confirmable, GET, /hello1       fe80::ff:fe00:1             fe80::28bf:62ff:fed7:54ac COAP     83     Acknowledgment, 2.05       fe80::28bf:62ff:fed7:54ac   fe80::ff:fe00:1       ICMPv6   131    Destination Unreachable (Port unreachable)


title: Install pandas for python3 on Fedora 20

text: The Fedora project lists a package called python3-pandas. When I enter `sudo yum install python3-pandas` I get the message `No package python3-pandas available.`. How can I install this package? I am accessing a Fedora 20 machine via ssh. `yum repolist`:               repo id                             repo name     fedora/20/x86_64                    Fedora 20 - x86_64     rpmfusion-free/20/x86_64            RPM Fusion for Fedora 20 - Free     rpmfusion-free-updates/20/x86_64    RPM Fusion for Fedora 20 - Free - Updates     rpmfusion-nonfree/20/x86_64         RPM Fusion for Fedora 20 - Nonfree     rpmfusion-nonfree-updates/20/x86_64 RPM Fusion for Fedora 20 - Nonfree - Updates     updates/20/x86_64                   Fedora 20 - x86_64 - Updates


title: Custom access/launcher

text: I'm not sure what to call what I want, so I'll just describe what I want to do. What I'm doing is setting up an old laptop, with gentoo, for my kids. I want to have some program on there that, with a password, gives access to do homework, to play games for 30 min, watch netflix for an hour, etc. I can't imagine that there already exists a program that can do that, but it would be less work for me if there was. So I will have to make this launcher program. My question is this, after I make such a program, how do I make it so this program is running at start up and no other programs can be ran from any menus or anything. I have not decided which window manager to use yet. Is there a lite window manager that would help me accomplish this task?


title: How to XZ a directory with TAR using maximum compression?

text: So I need to compress a directory with max compression. How can I do it with `xz`? I mean I will need `tar` too because I can't compress a directory with only `xz`. Is there a oneliner to produce e.g. `foo.tar.xz`?


title: Why is my tar in a script behaving different than using tar manually

text: I'm writing a backup script for my email and cloud service.   For simplicity, I only posted the mail-backup part here. Basically, I have a Host-Machine with some Virtual Boxes running in it.   These Virtual Boxes access Host-Machines' `/mnt/alias/storage/` where there is the vmail folder (called shishaMail in my case) _(Following might not be necessary information)_   I would like to say that everything within `/mnt/alias/` is an `ln -s` from `/mnt/rack/*` with pretty names.   In this rack folder are the mounts of the drives.   _(Not necessary information END)_ Here is my script               #!/bin/bash     # backup script           BASEURL="/mnt/alias/backup"     MAILURL="/mnt/alias/storage/shishaMail"          DAY=`eval date +"%d"`     MONTH=`eval date +"%m"`     YEAR=`eval date +"%Y"`     HOUR=`eval date +"%H"`     MINUTE=`eval date +"%M"`          PIMPURL=$BASEURL/$YEAR/$MONTH/$DAY/          COMMAND1="cd $PIMPURL"     $COMMAND1 2>/dev/null          if [ $? -eq 0 ]     then                     echo "Command 1 was successful"     else                     echo "There ain't folders!!"                     echo "I'll mkdir some!"                          COMMAND2="mkdir -p $PIMPURL"                     $COMMAND2 2>/dev/null     fi     if [ $? -eq 0 ]     then                     echo 'Command 1 or/and 2 was successful'                     echo "STARTING MAIL BACKUP"                          COMMAND3="tar -cvzf '"$PIMPURL"shisha_"$HOUR"_"$MINUTE"_.data.tar.gz' "$MAILURL                     echo $COMMAND3                     $COMMAND3 2>/dev/null                          if [ $? -eq 0 ]                     then                                     echo 'MAIL BACKUP SUCCESSFULL'                     else                                     echo "FAILURE!!"                     fi     else                     echo 'Nope! Must be some kind of strage Err0r!!'     fi      So if I execute this script I get the following error: > Command 1 was successful   >  Command 1 or/and 2 was successful   >  STARTING MAIL BACKUP   >  tar -czvf '/mnt/alias/backup/2014/06/13/shisha_10_25_.data.tar.gz' > /mnt/alias/storage/shishaMail   >  tar: Removing leading `/' from member names   >  tar (child): '/mnt/alias/backup/2014/06/13/shisha_10_25_.data.tar.gz': > Cannot open: No such file or directory   >  tar (child): Error is not recoverable: exiting now   >  FAILURE!! As you see there is an `echo` of COMMAND3 which would be: > tar -czvf '/mnt/alias/backup/2014/06/13/shisha_10_21_.data.tar.gz' > /mnt/alias/storage/shishaMail And if I execute this command by hand, as the same user I execute the script as (which would be root in both cases), it works.   I don't get why the script complains about a not existing file or directory as the directories exist except the `*.tar.gz` file as this has to be created by `tar`.


title: Why are there no -dev packages in Arch Linux?

text: I understand that source based distributions like _Gentoo_ or _Slackware_ do not need `*-dev` versions of programs. They include the source code as well as header files for compiling everything locally. But I never saw `*-dev` packages in _Arch Linux_ , although it is package based. I ran across lots of `*-dev` packages in other distributions.


title: How can I get the wall clock time of a running process?

text: I started a hash check of a large file and don't want to restart it using `time`. How can I get the wall clock time without using time at the beginning or using `date` right before I invoke a command?


title: Why does `mkdir -pm` not set the permissions I asked for?

text: I created some directories with the command `mkdir -pm 700 /tmp/a/b/c` I was surprised to find that `/tmp/a` had permissions `775` rather than the `700`, I had requested. Is there some reason for `mkdir` to only apply the specified mode to the last directory created and ignore it for the parent directories?


title: VMO Changes After Adding New RAM To AIX?

text: We have a server at a client site running AIX 5.3, which we just up the RAM to 32GB, from initially 16GB (if I'm not mistaken). This server is our Application server running J2EE applications on top of Oracle Internet Application Server. Recently we encountered one of the batch jobs hitting out of memory error. From NMON I see that on average, there's 5GB of free memory available. `%MAXPERM` is set to '15' and `%MINPERM` is '5'. `lru_file_repage` is '0'. `%comp` is around '70' and `%numperm` is '15'. I would like to ask:   1. After adding real memory to the server, is there any additional changes we need to do to the VMO?   2. Is the `%MAXPERM` too low?


title: Adding an unused partition to a linux filesystem

text: I am running kubuntu 11.04. I installed it in a dual-boot scenario on a single drive, with Windows XP installed first. The XP installation is fubar so I now would like to use the space in kubuntu. I formatted the old partition in gparted and upon trying to access it in a file manager I got the following error:               An error occurred while accessing 'space', the system responded: org.freedesktop.UDisks.Error.Inhibited: Daemon is inhibited      I am assuming this error is linked to the fact that the partition doesn't have a mount point, but I may well be wrong. I'd just like to have the filesystem set up so that a folder of my specification is using that drive exclusively (e.g. /home/user/files). From what I understand about mount points, I should be able to do that. I am hoping my changing of this drive won't have anything to do with booting or be system-critical. Is this possible? My drive layout looks like this:               /dev/sda1    ext3    90.76 GiB    this is where the xp installation was located     /dev/sda2    ext3    19.53 GiB    lunix     /dev/sda3    swap    1.49 GiB     unallocated           2.49 MiB      Any help in this would be greatly appreciated, as I am running pretty low on drive space! Thanks


title: Generating random noise for fun in /dev/snd/

text: Recently I have been exploring the enchanted /dev folder. I want to write some random data to an audio device in order to generate some noise. I am using ALSA. So I instruct cat to pipe some random data to the playback file in the /dev folder...                cat file-of-random-data > /dev/snd/pcmC0D0p      then I recieve what seems to be an error from cat                cat: write error: File descriptor in bad state      How can I fix this so I can hear some delicious static play from my sound card?


title: Is there a way to get the min, max, median, and average of a list of numbers in a single command?

text: I have a list of numbers in a file, one per line. How can I get the minimum, maximum, _median_ and _average_ values? I want to use the results in a bash script. Although my immediate situation is for integers, a solution for floating-point numbers would be useful down the line, but a simple integer method is fine...


I'm running qemu's like this:               $ sudo qemu -boot d -m 1024 \     -netdev tap,id=tap0 \     -device virtio-net-pci,netdev=tap0,id=vth0 \     -drive file=ubuntu.iso,media=cdrom,cache=none,if=ide \     -monitor pty \     -serial pty \     -parallel none \     -nographic      When I check `/dev/pts/`:               $ sudo lsof +d /dev/pts/      Qemu pty's do not show up, although they do work using for example:               $ sudo screen /dev/pts/8      How can I figure out which pty's are from which qemu?


title: Collapse repeating characters

text: Is there a more Bashist way than `echo "$PWD//" | sed -e 's#//\\+#/#g'` to replace repeating slashes with a single one? Thanks Steven D, now there's a fully working function to find the _longest common path of two or more paths_ : path_common.


title: Disabling readahead with hdparm or POSIX_FADV_RANDOM

text: From Linux kernel's doc the advice POSIX_FADV_RANDOM seems to disable readahead. But whent I disable Readhead using (sudo hdparm -A 0 /dev/sdb) I get huge degradation in performances; also noticed that read(2) seems to get split every 512k and acts as separate calls (Not sure about the reason, may be the max sector per request). So which option really disables the read-ahead? Does POSIX_FADV_RANDOM also disable OS caching, or shall I add a POSIX_FADV_DONTNEED.


title: RHEL - df -h v/s graphical disk usage analyzer tool

text: I am trying to understand the disk usage in my RHEL system. When I run the **Disk Usage Analyzer** tool graphically, my screen shows the below output. ![enter image description here](http://i.stack.imgur.com/1ClUg.png) However, if I run the command **df -h** I get the below output.               Filesystem            Size  Used Avail Use% Mounted on     /dev/sda5              38G   23G   14G  64% /     /dev/sda7             146G   48G   91G  35% /home     /dev/sda3              99M   23M   72M  24% /boot     tmpfs                 2.0G     0  2.0G   0% /dev/shm      In the graphical output, I see the / is having 71.7 GB and usage is 100%. However, from the command line, I see that I still have 14G left and the use % is only 64. Why is there a discrepancy between the command line and the graphical output? How can I interpret the output?


title: Securing /tmp on OpenVZ

text: /tmp should be mounted as a separate filesystem with the noexec,nosuid options set     /var/tmp should either be symlinked to /tmp or mounted as a filesystem     /dev/shm is not mounted with the noexec,nosuid options (currently: none). You should modify the mountpoint in /etc/fstab for /dev/shm with those options and remount      This is an OpenVZ Server and I don't know how to fix those issues. How do I make /tmp ect... safe on OpenVZ? This for the guest. can this be done on the host?


title: How to synchronize a networked drive and an external drive (Ubuntu & OS X)?

text: In light of a recent hardware failure, I've decided that it's time to be a little less lax regarding back-ups. What I have:   * An Ubuntu 10.10 'server/NAS'   * A MacBook 5,2   * A WD external HDD The server and the MacBook are permanently connected by Ethernet. I have a directory on the server that I'd like to keep synchronized with the external drive that I plug in from time to time. The Ubuntu filesystem is ext4 and the external drive is HFS+ (Mac OS Extended [Journaled]). It should be noted that this is not case-sensitive. I'm unsure if this is a problem. If it is I can reformat the external HDD so that it is. It should also be noted that OS X 10.6 ships with a fairly old `rsync`, ver. 2.6.9. I believe there are some problems with this concerning the handling of resource forks and other things. So then, what is the best way to proceed?   * Should I be doing rsyncs across the network? If so some guidance re: how to achieve this using the CLI would be appreciated (I've read the `rsync` man page numerous times and can't quite get my head around it).   * Or should I be installing a kernel module so that I can just plug the HFS+ formatted drive into the server and it be read & writeable in Linux? Again, some `rsync` CLI guidance would be great.   * Or should I be doing something else entirely? Cheers.


title: Preventing a new instance of a program to open when calling it

text: My problem is with FBI (frame buffer image viewer) for Linux, but my question and any answers are perhaps applicable to more than only that program. I don't know. Anyway… While things are loading on my Raspberry Pi, I display a "Loading screen" through HDMI using FBI. The command in my Bash script is:               /usr/bin/fbi -T 1 -noverbose -a /etc/splash/splashscreen.png      After a couple of days, I notice that I get an "Out of memory" error instead of the splash screens. It turns out every time a splash screen was displayed, a new instance of FBI was loaded. So there were 50 frame buffer image viewers open causing the memory error, I guess. Is there any way of making sure a new instance of a program isn't opened when I call for it, or will I have to do something like:               pkill fbi     /usr/bin/fbi -T 1 -noverbose -a /etc/splash/splashscreen.png


title: Dynamically reformatting man pages on terminal dimension changes

text: One common workflow of mine is to open a manual page in a terminal, then another terminal in which to test things. The man page is formatted to the initial dimensions of the first terminal. When I now resize my windows (or have my WM do that for me automatically), there is either a gap to the right of the preformatted page, or lines wrap. At this point I usually `q`(uit) and `!!` (run again), which loses my position in the page. I assume the formatting process is quite CPU intensive, or maybe it stems from ancient times of fixed terminal sizes. The `less` pager dynamically reacts to terminal resize events, so it should be possible in theory. I tried perusing man pages, searching the Web, asking on IRC -- the whole lot -- but couldn't come up with anything.   * Can I trigger reformatting from within or outside of the man utility?   * Is there a version of the man utility that resizes the page dynamically?    * Is there way to customize some part of the formatting/display process to make it update on `SIGWINCH`?


title: How do I create history files with date automatically attached?

text: E.g. at the end of the session for each day I want to create a history file with the date attached at the end. So, say, history > history07162012.txt or something like that.


title: Perl script, do cd on terminal

text: In Script to change current directory (cd, pwd) it is shown how to run a bash script that changes terminal directory. But how do i run a perl script that runs a bash script that changes terminal directory?


title: monoDevelop doesn't work after installation

text: How to solve this problem?   i installed mono Develop from software manger for Linux mint 17 after installing and getting start it. doesn't work


title: Scientific Linux 6.3 hangs on suspend if using a samba share

text: I have several notebooks running Scientific Linux 6.3. The suspend function is working quite well, except for one problem: When a notebook mounts a Samba share, plays a few videos through this share then the suspend function stops working, and the notebook suddenly needs _5_ minutes to suspend. Again, this problem only occurs if they watched videos over the samba share. **QUESTION** : WHY? does samba keeps something open and need a timeout of 5 minutes, just after the suspend function has been involved or what? Any suggestions on where to look to find out what's going on would be appreciated. Or a way for I could write a bash script to check when is the suspend button pressed so that I could do xy* thing to the machine. (*xy=anything that corrects this problem)


title: Remove last comma from a bash for loop generated string

text: I am dealing with a situation where I need to create a comma separated list from an array into a heredoc and remove the last comma. I am using bash `for` piped into `sed` which is erasing all commas instead of the last one. A simplified example is as follows:               x=$(for i in a b c; do echo "${i}",; done| sed 's/,$//')     echo $x     a b c      Desired output:               a, b, c      Any suggestions appreciated.


title: fdisk. What does the "free" partition mean?

text: I had two primary partitions (`/dev/sda1` and `/dev/sda2`). Then I created an extended partition to segment it into logical partitions. After I had typed `fdisk /dev/sda` and `n` (add a new partition) the following message appeared. > p primary (2 primary, 1 extended, 1 free) > > l logical (numbered from 5) What does `1 free` mean?


title: Why can rm remove read-only files?

text: If I create a file and then change its permissions to `444` (read-only), how come `rm` can remove it? If I do this:               echo test > test.txt     chmod 444 test.txt     rm test.txt      ...`rm` will ask if I want to remove the write-protected file `test.txt`. I would have expected that `rm` can not remove such a file and that I would have to do a `chmod +w test.txt` first. If I do `rm -f test.txt` then `rm` will remove the file without even asking, even though it's read-only. Can anyone clarify? I'm using Ubuntu 12.04/bash.


title: Able to delete file without permission

text: I've been experimenting with file permissions and ownership lately, and I tried this:               touch a     sudo chown root:root a     sudo chmod 000 a      I can't read, write, or execute the file, but I can still delete it using `-f`. Why is this? I don't own the file, and nobody has any permission for the file. Shouldn't you need root to delete a 000 file you don't own?               ---------- 1 root  root      0 Apr  3 20:18 a


title: why am I able to delete file which belongs to `root` under a non-root user?

text: I create a file under my user `esolve` and then `su root` and use chown to change its user to root then I returned to user `esolve` I notice I can still delete the file with `rm` why?


title: Minimum file permissions to delete a file

text: To delete a file in Linux: What minimal permissions do we need to set on it? What minimal permissions do we need to set on its parent directory?


title: Missed get command of FTP

text: I am using AIX 7.1. I made some shell scripts8 and called /bin/bsh. Inside the script, I connect to a server via FTP and have many get commands because I would like to avoid the wildcard problem. I just declare every filename and get them one by one, for example:               get PDF_02378230_20110609.PDF     get PDF_02432482_20110609.PDF     get PDF_02432565_20110609.PDF     get PDF_02432573_20110609.PDF     get PDF_02432581_20110609.PDF     get PDF_02432599_20110609.PDF     get PDF_02432607_20110609.PDF     get PDF_02432615_20110609.PDF     get PDF_02432623_20110609.PDF     get PDF_02432649_20110609.PDF     get PDF_02432656_20110609.PDF     get PDF_02432672_20110609.PDF     get PDF_02432755_20110609.PDF     get PDF_02432763_20110609.PDF     get PDF_02432821_20110609.PDF     get PDF_02432920_20110609.PDF     get PDF_02433175_20110609.PDF     get PDF_02433266_20110609.PDF     get PDF_02433290_20110609.PDF     get PDF_02433308_20110609.PDF     get PDF_02433373_20110609.PDF     get PDF_02433399_20110609.PDF      There could be up to 100000 files to be transfer in 1 shell scripts. I would run these shell scripts and let them ftp the files down. But in some shell script there are 1 or 2 missing files not been "get". For example, when I count the number of files, there might be 1 or 2 less files than the number of "get" command in the shell script. I cannot found an exception or error inside the log. The truth is, I cannot go through the whole log line by line because it is too long. But I have found which file was missing, and I tried to search the log file with the missing filename, and I cannot found any trace of that filename.


title: LVM tools on raw block copy

text: I have several raw block copies of disks that have both NTFS and Linux partitions. The parition tables generally have both a Windows NTFS partition and a Linux LVM partition. I need to work on all of these partitions to build a supertimeline (log2timeline) but I need a good way to find the ext partitions inside the LVM. I am not familiar at all with and of the LVM commands, though I have a decent grasp on the terminology. Once I get to the byte offset of the ext partitions, I'll be fine, but I'd rather not scan the disk byte by byte for the partition headers and superblocks.


title: Why is "Asking all remaining processes to terminate" failing during shutdown?

text: I installed Debian 7. Sometimes when I quick X and type `sudo shutdown -h now`, it says, `Asking all remaining processes to terminate`, then after a few seconds, it prints a long list of processes, then it says that it failed to stop them, then the computer powers off.   * The computer was only recently installed.   * I have had the same distribution on this computer and on other computers, installed in the same manner, but never encountered this before. Is this problem serious? If so, what could be causing it?


title: How is the order in which tar works on files determined?

text: $ touch dir/{{1..8},{a..p}}     $ tar cJvf file.tar.xz dir/     dir/     dir/o     dir/k     dir/b     dir/3     dir/1     dir/i     dir/7     dir/4     dir/e     dir/a     dir/g     dir/2     dir/d     dir/5     dir/8     dir/c     dir/n     dir/f     dir/h     dir/6     dir/l     dir/m     dir/j     dir/p      I would have expected it to be alphabetical. But apparently it's not. What's the formula, here?


title: How to determine which processes are using how much entropy from /dev/urandom

text: Doing `fuser -v /dev/urandom` tells me which processes currently have `/dev/urandom` open, but only that. Is there any was to determine anything about how much entropy each one is using up over time? For instance, it might be that one process is using up about 1 bit of entropy every minute, while a different one is using up about 8 bits per second; I'd like some way of determining that.


title: Recursively add a file to all sub-directories

text: How do I recursively add(or touch) a file into the current directory, as well as all sub-directories? For example,   I would like to turn this directory tree:               .     ├── 1     │   ├── A     │   └── B     ├── 2     │   └── A     └── 3         ├── A         └── B             └── I        9 directories, 0 files      into               .     ├── 1     │   ├── A     │   │   └── file     │   ├── B     │   │   └── file     │   └── file     ├── 2     │   ├── A     │   │   └── file     │   └── file     ├── 3     │   ├── A     │   │   └── file     │   ├── B     │   │   ├── file     │   │   └── I     │   │       └── file     │   └── file     └── file          9 directories, 10 files


title: Concern about logging in as root overrated?

text: For personal linux on my personal notebooks, I've usually set my environment to **autologin as root** even under X or lower runlevels. I've found my workflow is very pleasant and fast, without any cumbersome need to type `su` or `sudo` or being asked by keyring or auth or something. So far I've never had any problem with it, so **why are most people freaking out about it?** Is the concern overrated? Of course this assumes the user knows what they are doing and doesn't really care about system reliability and security issues.


title: Access USB device of another machine as if it was locally plugged?

text: I would like to use, on server A, an USB webcam that is physically plugged on server B. Is there a way to _mount_ the `/dev/video0` of server B on server A (as `/dev/video0`, or `/dev/video1`, etc.). Both servers are running Debian Wheezy and can communicate via local network.


title: Virtualbox complains that I don't have headers

text: I've installed Virtualbox (on Debian testing amd64)according to the wiki. But I get this error:               $ virtualbox      WARNING: The character device /dev/vboxdrv does not exist.              Please install the virtualbox-dkms package and the appropriate              headers, most likely linux-headers-amd64.                   You will not be able to start VMs until this problem is fixed.      My kernel is 3.2.0-4-amd64 but the headers installed by `apt-get install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,')` command is linux- headers-3.12-1-amd64 (There is no linux-headers-3.2.0-4-amd64 on repository anyway). Could the problem be this?


title: Keyboard/mouse do not work when connected to USB hub, but only on Fedora - works on other distros

text: **For the record** , the same problem happens in openSUSE, too, and the solution is the same. It is fixed in both Fedora 18 (as far as I could tell: I just booted a live CD) and openSUSE 12.3. I installed Fedora 17 on my laptop, where I use a keyboard (Logitech K120) and mouse (generic USB mouse) connected to a hub. Then I noticed that neither the keyboard nor the mouse worked. However:   * They do work in Arch Linux, Windows, GRUB and on the console (they only die when X starts), regardless if they're connected to a hub or not.   * If I plug the mouse/keyboard directly into the USB ports, they work properly.  This shows that neither the USB hub nor the keyboard/mouse are damaged. lsusb of the relevant devices (USB hub, keyboard and mouse, respectively):               Bus 002 Device 004: ID 058f:6254 Alcor Micro Corp. USB Hub     Bus 002 Device 006: ID 046d:c31c Logitech, Inc. Keyboard K120 for Business     Bus 002 Device 005: ID 093a:2521 Pixart Imaging, Inc.         Any clues? * * * Editing as per sch's comments:   * The keyboard works on the console.   * The keyboard/mouse appears on `xinput list`, only when they're connected directly to the USB ports; **not** when they are connected to the hub.   * There is a change in `/proc/interrupts` when I move the mouse, even though the cursor doesn't move.   * When I plug the mouse/keyboard **through the hub** , nothing happens in the X logs. When I plug them directly I get the standard log information:              [   407.686] (II) config/udev: Adding input device USB OPTICAL MOUSE (/dev/input/mouse1)     [   407.686] (II) No input driver specified, ignoring this device.     [   407.686] (II) This device may have been added with another device file.     [   407.686] (II) config/udev: Adding input device USB OPTICAL MOUSE (/dev/input/event8)     [   407.686] (**) USB OPTICAL MOUSE: Applying InputClass "evdev pointer catchall"     [   407.686] (II) Using input driver 'evdev' for 'USB OPTICAL MOUSE'     [   407.686]    Option "XkbRules" "evdev"     [   407.686]    Option "XkbModel" "evdev"     [   407.686]    Option "XkbLayout" "us"     [   407.686]    Option "_source" "server/udev"     [   407.686]    Option "name" "USB OPTICAL MOUSE"     [   407.686]    Option "path" "/dev/input/event8"     [   407.686]    Option "device" "/dev/input/event8"     [   407.686]    Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:1c.3/0000:04:00.0/usb3/3-2/3-2:1.0/input/input30/event8"     [   407.686]    Option "driver" "evdev"     [   407.686] (**) USB OPTICAL MOUSE: always reports core events     [   407.686] (**) evdev: USB OPTICAL MOUSE: Device: "/dev/input/event8"     [   407.686] (--) evdev: USB OPTICAL MOUSE: Vendor 0x93a Product 0x2521     [   407.686] (--) evdev: USB OPTICAL MOUSE: Found 9 mouse buttons     [   407.686] (--) evdev: USB OPTICAL MOUSE: Found scroll wheel(s)     [   407.686] (--) evdev: USB OPTICAL MOUSE: Found relative axes     [   407.686] (--) evdev: USB OPTICAL MOUSE: Found x and y relative axes     [   407.686] (II) evdev: USB OPTICAL MOUSE: Configuring as mouse     [   407.686] (II) evdev: USB OPTICAL MOUSE: Adding scrollwheel support     [   407.686] (**) evdev: USB OPTICAL MOUSE: YAxisMapping: buttons 4 and 5     [   407.686] (**) evdev: USB OPTICAL MOUSE: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200     [   407.687] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:1c.3/0000:04:00.0/usb3/3-2/3-2:1.0/input/input30/event8"     [   407.687] (II) XINPUT: Adding extended input device "USB OPTICAL MOUSE"  (type: MOUSE, id 17)     [   407.687] (II) evdev: USB OPTICAL MOUSE: initialized for relative axes.     [   407.687] (**) USB OPTICAL MOUSE: (accel) keeping acceleration scheme 1     [   407.687] (**) USB OPTICAL MOUSE: (accel) acceleration profile 0     [   407.687] (**) USB OPTICAL MOUSE: (accel) acceleration factor: 2.000     [   407.687] (**) USB OPTICAL MOUSE: (accel) acceleration threshold: 4