How do I create custom keybindings in Debian Jessie with GNOME Classic?

I'd like to be able to press `Ctrl+Alt+t` to open a terminal (or something along those lines, not really fussed about the exact combination). There's a guide for this which asks me to install and run `gconf-editor`, and to navigate to `apps->metacity`. However, I don't see the `metacity` tag. This person seems to have encountered a similar problem, albeit for `ubuntu`, but there is no answer to that question. I'm a bit stuck at this point! I found a very similar question on the debian.net forums but I wasn't able to find anything resembling `settings->Keyboard->Shortcuts`. I'm using `GNOME Classic` under `Jessie`, I figured maybe they're using something different?


create an RPM so that install will edit a config file using a shell command

I have a RPM spec file. How can I make it so that after the RPM installs, a random string is injected into one of the configuration files? For example: The RPM installs the binaries and config file to               /opt/bin/foo     /opt/bar.cfg      Inside the bar.cfg, I have the following configuration.               foo.bar = [             [                     clientId:"herp-derp",                     clientSecret:"<ENTER-CLIENTSECRET-HERE>",                     authorizedGrantTypes:["password"]             ]     ]      I want the RPM's that are distributed to replace `"<ENTER-CLIENTSECRET-HERE>"` with an actual random string. Here is how I am generating the random string echo `cat /dev/urandom | base64 | tr -dc "[:alnum:]" | head -c32` Since I have never worked much with RPM or spec files in the past, I'm not sure the appropriate way to go about this. Can I just add something like this to the spec file?               %post     RANDOM_STRING=`cat /dev/urandom | base64 | tr -dc "[:alnum:]" | head -c32`     sed -i.bak "s/clientSecret:\"<ENTER-CLIENTSECRET-HERE>\",/clientSecret:\"$RANDOM_STRING\",/g" /opt/bar.cfg


How does a parallelized Python program look with top command?

I work on a shared cluster. I've seen people run parallelized c code on this cluster which, when I use `top` to see what processes are running, are shown to be using (for example) 400% of the CPU, since they are using four processors for a single instance of their code. Now someone is running (what I hear to be) a parallelized Python code. However, instead of `top` showing the Python code to be using 400% of the CPU, it is being shown as four different processes, each using their own processor (at 100%). I am wondering, does Python (when parallelized) show with `top` as running as many different processes (as opposed to C) or is this Python code not actually running in parallel? I don't know if Stack Exchange would be a better place for this question. Since I am using `top` I figured this place would be better. Let me know if I should move it.


Deleting files on btrfs through smb

I have set up a btrfs multidisk which I mount and have shared on the network through smb. Whenever someone deletes a file on the share in windows, it seems to be rather slow. Any ideas/options I need to set in smb or btrfs which could speed that up?


Finding which cron jobs are scheduled to run at some future date/time X

Is there a way to "query" a crontab to find which cron jobs run at some arbitrary date/time, or during a certain range of times? For example, determine which will be run at sometime between 14:00 and 16:00 today, will run next Saturday at 10:00, or run every Sunday? There are a lot of jobs scheduled, so reading all the crontabs by hand isn't really an option.


DDNS (dynamic-dns) setup and adding a hostname to a device (to be visible on the network)

1. How do I provide a fixed Hostname to my device so that a netscan can shows up the device name across all platforms?   2. How can I reach the device using the hostname/MAC-ID (something which is fixed) irrespective of the dynamically changing IP? For example, I have 2 Raspberry-Pi and I give them hostname as Pi-1 and Pi-2 respectively (visible across all platforms). Now my router gives away dynamic IPs, so the IPs keep changing. Now how do I do a simple `ping Pi-1` and get a reply? In short,how do I set up a **DDNS** (correct me if I am wrong) to map the Hostname/MAC-ID/URL against the updated IPs. I have an application which connects to the corresponding devices (over TCP or MQTT) and does xyz stuffs. But I don't have the luxury to lookup the current IP of my device and update my application with the same everytime I move the setup to a different network. So I will just make a hostname entry in the application saying connect to "Pi-1" and it should be able connect to Pi-1 irrespective of the ip/network/domain as long as all the allocated IPs are reachable by on another. **N.B** : I don't want to go for static IP or dhcp reserved IP and Open source packages (if required) are preferred.


How to permanently change both STDOUT and STDERR color to grey?

This question is similar to Can I configure my shell to print STDERR and STDOUT in different colors? But I am looking for a solution that will allow me to **change both STDOUT and STDERR to ONE color**. I am not trying to set different color for STDOUT and STDERR, as this is problematic and may create problems, mentioned in the answer from the link above. I apologize, as I don't know much about Unix and Linux. I am looking for a solution that can allow me to add couple lines to my `.bashrc` or `.bash_profile` and **permanently** change the color of STDOUT and STDERR.


Scripts cannot run simultaneously on startup

I want two scripts (`Server_drive`, `Server_video_boot`) running on startup, but there is conflict between them. Specifically, there is always running the script with the lower priority. I tried with many different priority numbers, but same result.               root@beagleboard:/etc/rc2.d# ls     S02dbus-1    S20ffserver  S20syslog        S50usb-gadget         S70lighttpd     S10dropbear  S20gpiolow   S20wlan8192cu    S59Server_drive       S99rmnologin     S20apmd      S20samba     S21avahi-daemon  S60Server_video_boot      _Server_video_boot:_               #!/bin/sh     cd /home/root/     ./Server_video.sh      _Server_drive:_               #!/bin/sh     cd /home/root/     ./test     // C executable      Any ideas why this happens? How can I fix this? _Info:_ _Angstrom distribution running on embedded device BeagleBoard-xM_


How to setup russian input method in Mint 14 xfce 64-bit?

I'm using Mint 14 XFCE, 64-bit. Struggling to setup cyrillic (Russian) input method. Can someone point me good web resources regarding this? Googling didn't help...


Cleaning voice recordings from command line?

I have used Audacity for removing noise from recordings before, however it has very limited command line usage. I have ~100 short lecture videos which I will be watching over the next few months and would like an easy way to clean them all at once or as needed before watching. Is there a command line tool or popular language library I can use to do this?


How can I trick a process into thinking a file doesn't exist?

I have a program that stores its settings in `~/.config/myprogram` that I use both interactively and with a batch queuing system. When running interactively, I want this program to use my configuration files (and it does). But when running in batch mode, the configuration files aren't necessary because I specify command-line options that overwrite all the relevant settings. Further, accessing the configuration files over the network increases the program's startup time by several seconds; if the files don't exist, the program launches much faster (as each job only takes about a minute, this has a significant impact on batch job throughput). But because I also use the program interactively, I don't want to be moving/deleting my configuration files all the time. Depending on when by batch jobs get scheduled on the cluster (based on other users' usage), I may want to use the program interactively and as part of a batch job at the same time. (Aside: that network file performance is so slow is probably a bug, but I'm just a user of the cluster, so I can only work around it, not fix it.) I could build a version of the program that doesn't read the configuration files (or has a command-line option not to) for batch use, but this program's build environment is poorly-engineered and difficult to set up. I'd much prefer to use the binaries installed through my system's package manager. How can I trick particular instances of this program into pretending my configuration files don't exist (without modifying the program)? I'm hoping for a wrapper of the form `pretendfiledoesntexist ~/.config/myprogram -- myprogram --various-options...`, but I'm open to other solutions.


How to install Node.js in CentOS 5.10 with Python 2.4?

I want to use Grunt on websites we have hosted on our WHM dedicated server. It is running CENTOS 5.10 x86_64 standard with WHM 11.42.1 (build 21). It is critical that things do not break, as we have over 20 domains running websites on this single server. I tried to build Node.js from source but it requires Python 2.6+, and we only have Python 2.4 installed. I read somewhere about installing Python 2.6 alongside 2.4 with alternative install but I don't know how to do this. I found this question that has a shell script that installs it for you, and Node.js did install, however it created a symlink in the folder I ran it from (bad) and also did not install npm for me. I am quite savvy but not an expert in Linux, especially CentOS, and cannot fathom how to get Node.js and npm to work on CentOS 5.10.


Unable to make sshd start at boot time on centos 6.4 . It starts ONLY after I login from console

I have installed centos 6.4 on a desktop and wanted to access it mostly remotely. For this, I tried http://www.serverschool.com/server- configuration/3-ways-to-configure-services-to-start-at-boot-in-centos-part-1/ That didn't work - so tried Start network service at boot time on CentOS because my desktop is also on wlan. That didn't work. So now I am stuck. Any inputs appreciated on how to troubleshoot this.


Why doesn't grep using pipe work here?

I have the following command:               find / -name libGL.so.1      Which returns lots of lines with "Permission denied". I want to exclude such lines, so I added the following:               find / -name libGL.so.1 | grep -v 'denied'      But the output is the same - my `grep -v 'denied'` is not filtering out the lines with `Permission denied`. I've tried many variations, looked over grep tutorials, but I cannot figure out the problem. Any suggestions?


Duplicate instances within Gnome menu

I'm running Fedora 18 with Gnome 3.6. I've installed Eclipse manually, and added the menu entry with alacarte. My problem is that even though I have "Favorite"'d the menu entry, it keeps duplicating the entry every time a new instance is launched. See screenshot for example: http://i.stack.imgur.com/rIZQ4.png Normally, it would group the new instances under one icon. For some reason my menu entry just won't match up. I have tried to rename the menu entry to what the application's title is when starting up but to no avail. I'm not quite sure what is causing this behavior, but would really love some assistance here.


How do I get GCC 4.7.1 with 64bit support installed for my user account only on Solaris x86

I have been put on a task to upgrade and build 32bit and 64bit libraries for software developers to use. I need to install GCC version 4.7.1 with 64bit support on the Solaris x86 machine I'm using for my user account only so as to not modify the system as a whole.


useradd command's argument issue

I am getting an issue regarding the `useradd` command's argument. I want to add a user with the `-p` option, and my process is getting an encrypted password with another process. I use the system command to invoke the `useradd` command with proper arguments but the password is not passed correct. Then I tried to run the `useradd` command manually and got the following error:               useradd -d /home -m -o -p "**\$1\$LmiSHTiI\$SVop.LoJGIkYQ6MdRSNW61**" -u 0 -g 0 cpu      I used the encrypted value of "cpu123". `strace` snapshot:               execve("/usr/sbin/useradd", ["useradd", "-d", "/home", "-m", "-o", "-p",            "**$1$LmiSHTiI$SVop.LoJGIkYQ6MdRSNW**", "-u", "0", "-g", "0", "cpu"],        [/* 36 vars */])      In the strace snapshot, I found that the last digits are not added using the `-p` option.


Debian wheezy using gnome classic requires root for system modifying changes

I am using Gnome classic on Debian Wheezy, and I sometimes get a popup for package updates. The UI prompts for a root password, and will only accept root. Is there some way for me to add my account to a root-like group so I can use my normal user account login, similar to a sudo invocation? I don't have root on the machine but have sudo privileges for pretty much everything. This happens for other GUI interactions like changing the system time for bug testing and changing network settings. This all can be done in the command line, but it is cumbersome.


Coloring output of forked processes

I have a runscript that starts some processes and sends them to the background               mongod       & pid_mongo=$!     redis-server & pid_redis=$!     # etc.      All these processes then output concurrently to the same standard output. My question: is it possible to color the output of each different forked process, so that - for example - one of them outputs in green and the other one in red ?


Perl find and replace is writing every file

Here's the test script I'm running               matt@server:~ $ cat test.sh     #!/bin/bash     mkdir test     cd test     echo "has the string foo" > yes.txt     echo "hasn't the string" > no.txt     ls -l --time-style=full-iso     cat *     perl -e 's/foo/bar/g;' -pi $(find -type f)     ls -l --time-style=full-iso     cat *     matt@server:~ $ ./test.sh     total 8     -rw-r--r-- 1 matt matt 18 2011-01-29 13:52:17.240316663 -0700 no.txt     -rw-r--r-- 1 matt matt 19 2011-01-29 13:52:17.240316663 -0700 yes.txt     hasn't the string     has the string foo     total 8     -rw-r--r-- 1 matt matt 18 2011-01-29 13:52:17.260317727 -0700 no.txt     -rw-r--r-- 1 matt matt 19 2011-01-29 13:52:17.260317727 -0700 yes.txt     hasn't the string     has the string bar      I need to figure out how to tweak this line:               perl -e 's/foo/bar/g;' -pi $(find -type f)      To not write every file it finds but to just write the files that need to be changed.


renaming files in sequential order

I have following files               SSt12.precip.374.sub.climatology.ctl     SSt12.precip.2874.sub.climatology.ctl     SSt12.precip.3764.sub.climatology.ctl     SSt12.precip.6774.sub.climatology.ctl      I want to rename as               SSt12.precip.1.sub.climatology.ctl     SSt12.precip.2.sub.climatology.ctl     SSt12.precip.3.sub.climatology.ctl     SSt12.precip.4.sub.climatology.ctl


Zorin OS 7 - Home button

What is the name of the command that invokes the home menu? I am using linux zorin os 7 ultimate. The home button (windows button) does not bring up the home menu. It does work, its not broken. I have Compiz installed, it came pre- installed. It says thats it is an advanced tool, so I want to make not to break anything. How do I enable it.


KEY_CONFIG pointing to the wrong version of openssl.cnf

I am trying to setup OpenVPN but I am getting this error:               #./build-ca     grep: /etc/openvpn/easy-rsa/2.0/openssl.cnf: No such file or directory     pkitool: KEY_CONFIG (set by the ./vars script) is pointing to the wrong     version of openssl.cnf: /etc/openvpn/easy-rsa/2.0/openssl.cnf     The correct version should have a comment that says: easy-rsa version 2.x      I have OpenSSL* installed. Do I need to set a location?


Apache2 virtual hosts not working

I use Debian 7 and have installed a virtual host with address sub.domain.com following this tutorial: http://www.debian-administration.org/articles/412 I have enabled it, rebooted the PC but still the subdomain opens /var/www Here is the file contents of the file named "sub.domain.com", located at /etc/apache2/sites-available/ :               <VirtualHost *>         ServerName sub.domain.com         DocumentRoot /usr/share/destfolder         ServerAdmin info@domain.com         ErrorLog /var/log/apache2/sub.domain.com-error_log         CustomLog /var/log/apache2/sub.domain.com-access_log common     </VirtualHost>      By the way when I reload apache's configuration, I get: `NameVirtualHost *:80 has no VirtualHosts` Any suggestions?


Shell script - syntax error near unexpected token `['

When I open my terminal I get the following error:               bash: /home/ai/.bashrc: line 75: syntax error near unexpected token `['     bash: /home/ai/.bashrc: line 75: `if [ -x /usr/bin/dircolors ]; then'      The relevant part of the bashrc file script starting with the comment is as follows:               # enable color support of ls and also add handy aliases          if [ -x /usr/bin/dircolors ]; then              test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"         alias ls='ls --color=auto'         #alias dir='dir --color=auto'         #alias vdir='vdir --color=auto'              alias grep='grep --color=auto'         alias fgrep='fgrep --color=auto'         alias egrep='egrep --color=auto'          fi      What am I doing wrong and how to correct this?


Permissions to change only directory content and not itself

We have a directory and want to protect that from remove and rename, but we need to be able to rename, remove and create contents. What we can do?


Why uninstalling openjdk automatically triggers an installation of the alternatives on zypper openSUSE?

I installed openSUSE 13.1 and I want to install Oracle jdk. What I intended was to first uninstall open_jdk/ice tea stuff as I won't be needing them anyway but it seems I cannot uninstall them without having other non-Oracle java packages installed.               us...r@linux-rvhj:/tmp/mc-junip> sudo zypper rm java-1_7*     Loading repository data...     Reading installed packages...     Resolving package dependencies...          The following 4 NEW packages are going to be installed:       gcc48-gij gcc-gij java-1_5_0-gcj-compat libgcj48           The following 3 packages are going to be REMOVED:       icedtea-web java-1_7_0-openjdk java-1_7_0-openjdk-headless           4 new packages to install, 3 to remove.     Overall download size: 9.3 MiB. After the operation, 25.8 MiB will be freed.     Continue? [y/n/p/? shows all options] (y):       How do I just uninstall packages without being forced any alternatives? And why zypper behaves like this? To prevent situation when dependencies of other packeges are removed?


automatic disconnection of RAID array

A RAID array connected to my system (Debian 7) via USB frequently disconnects itself for no apparent reason. Upon initial connection to the system, the device is detected, and the array can be initialized, mounted, read from, written to, and unmounted quite normally. However, invariably, after a short period of time (minutes to hours), the component disks disappear from `/dev` and from the listing of `fdisk -l`, and remain inaccessible until the device (i.e., RAID enclosure) is power cycled. Judging from the output of `/var/log/messages`, the problem appears to be resetting of the USB device. After the unprovoked reset, the system repeatedly attempts to reconnect the device, assigning a higher USB device number, eventually terminating after five reset attempts. What is responsible for the device resetting itself? I suspect the fault lies with the USB controller. How can the undesired auto-reset behavior be avoided? The following excerpts from `/var/log/messages` show the typical behavior of the array after initialization and subsequent reset: Initial connection:               Jun 19 19:38:51 hostname kernel: [406823.308418] usb 1-1.3: new high-speed USB device number 24 using ehci_hcd     Jun 19 19:38:51 hostname kernel: [406823.401317] usb 1-1.3: New USB device found, idVendor=152d, idProduct=2351     Jun 19 19:38:51 hostname kernel: [406823.401330] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=5     Jun 19 19:38:51 hostname kernel: [406823.401338] usb 1-1.3: Product: USB to ATA/ATAPI Bridge     Jun 19 19:38:51 hostname kernel: [406823.401345] usb 1-1.3: Manufacturer: JMicron     Jun 19 19:38:51 hostname kernel: [406823.401350] usb 1-1.3: SerialNumber: DCC3..........     Jun 19 19:38:51 hostname kernel: [406823.402469] scsi16 : usb-storage 1-1.3:1.0     Jun 19 19:38:51 hostname mtp-probe: checking bus 1, device 24: "/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3"     Jun 19 19:38:51 hostname mtp-probe: bus: 1, device: 24 was not an MTP device     Jun 19 19:38:52 hostname kernel: [406824.400835] scsi 16:0:0:0: Direct-Access     WDC WD20 EFRX-68AX9N0          PQ: 0 ANSI: 5     Jun 19 19:38:52 hostname kernel: [406824.401450] scsi 16:0:0:1: Direct-Access     WDC WD20 EFRX-68AX9N0          PQ: 0 ANSI: 5     Jun 19 19:38:52 hostname kernel: [406824.402433] sd 16:0:0:0: Attached scsi generic sg2 type 0     Jun 19 19:38:52 hostname kernel: [406824.402583] sd 16:0:0:1: Attached scsi generic sg3 type 0     Jun 19 19:38:52 hostname kernel: [406824.662288] sd 16:0:0:0: [sdd] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)     Jun 19 19:38:52 hostname kernel: [406824.662789] sd 16:0:0:1: [sde] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)     Jun 19 19:38:52 hostname kernel: [406824.663573] sd 16:0:0:0: [sdd] Write Protect is off     Jun 19 19:38:52 hostname kernel: [406824.664356] sd 16:0:0:1: [sde] Write Protect is off     Jun 19 19:38:52 hostname kernel: [406824.665087] sd 16:0:0:0: [sdd] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA     Jun 19 19:38:52 hostname kernel: [406824.666295] sd 16:0:0:1: [sde] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA     Jun 19 19:38:52 hostname kernel: [406824.705355]  sdd: sdd1     Jun 19 19:38:52 hostname kernel: [406824.740148]  sde: sde1     Jun 19 19:38:52 hostname kernel: [406824.743667] sd 16:0:0:0: [sdd] Attached SCSI disk     Jun 19 19:38:52 hostname kernel: [406824.746756] sd 16:0:0:1: [sde] Attached SCSI disk      Upon reset:               Jun 19 20:05:25 hostname kernel: [408416.587392] usb 1-1.3: reset high-speed USB device number 24 using ehci_hcd     Jun 19 20:05:25 hostname kernel: [408416.679688] usb 1-1.3: device firmware changed     Jun 19 20:05:25 hostname kernel: [408416.679852] sd 16:0:0:0: Device offlined - not ready after error recovery     Jun 19 20:05:25 hostname kernel: [408416.679942] usb 1-1.3: USB disconnect, device number 24     Jun 19 20:05:25 hostname kernel: [408416.767366] usb 1-1.3: new high-speed USB device number 25 using ehci_hcd     Jun 19 20:05:25 hostname kernel: [408416.860214] usb 1-1.3: New USB device found, idVendor=152d, idProduct=2351     Jun 19 20:05:25 hostname kernel: [408416.860225] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=5     Jun 19 20:05:25 hostname kernel: [408416.860232] usb 1-1.3: Product: USB to ATA/ATAPI Bridge     Jun 19 20:05:25 hostname kernel: [408416.860237] usb 1-1.3: Manufacturer: JMicron     Jun 19 20:05:25 hostname kernel: [408416.860241] usb 1-1.3: SerialNumber: 152D.............     Jun 19 20:05:25 hostname kernel: [408416.861634] scsi17 : usb-storage 1-1.3:1.0     Jun 19 20:05:25 hostname mtp-probe: checking bus 1, device 25: "/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3"     Jun 19 20:05:25 hostname mtp-probe: bus: 1, device: 25 was not an MTP device     Jun 19 20:05:47 hostname kernel: [408438.591825] usb 1-1.3: reset high-speed USB device number 25 using ehci_hcd     Jun 19 20:05:57 hostname kernel: [408448.750695] usb 1-1.3: reset high-speed USB device number 25 using ehci_hcd     Jun 19 20:06:02 hostname kernel: [408453.911854] usb 1-1.3: reset high-speed USB device number 25 using ehci_hcd     Jun 19 20:06:03 hostname kernel: [408454.359608] usb 1-1.3: reset high-speed USB device number 25 using ehci_hcd     Jun 19 20:06:03 hostname kernel: [408454.807394] usb 1-1.3: reset high-speed USB device number 25 using ehci_hcd     Jun 19 20:06:04 hostname kernel: [408455.295168] usb 1-1.3: reset high-speed USB device number 25 using ehci_hcd     Jun 19 20:06:04 hostname kernel: [408455.711201] scsi 17:0:0:0: Device offlined - not ready after error recovery     Jun 19 20:06:04 hostname kernel: [408455.711448] usb 1-1.3: USB disconnect, device number 25     Jun 19 20:06:04 hostname kernel: [408455.786917] usb 1-1.3: new high-speed USB device number 26 using ehci_hcd     Jun 19 20:06:05 hostname kernel: [408456.234679] usb 1-1.3: new high-speed USB device number 27 using ehci_hcd     Jun 19 20:06:05 hostname kernel: [408456.686418] usb 1-1.3: new high-speed USB device number 28 using ehci_hcd     Jun 19 20:06:06 hostname kernel: [408457.174018] usb 1-1.3: new high-speed USB device number 29 using ehci_hcd      Attempted assignment of USB device number 29 is the final attempt to revive the disk array. To reconnect the device at this point, power cycling of the RAID enclosure or disconnect/reconnect is mandatory. Update: Recently, the device appeared to reset shortly after a resync. I'm not sure if this is helpful, but the error messages contained in `/var/log/messages` are included below:                   Jul  5 02:55:02 hdac kernel: [135732.758796] md: md0: resync done.     Jul  5 03:12:04 hdac kernel: [136754.176970] usb 1-1.3: reset high-speed USB device number 10 using ehci_hcd     Jul  5 03:12:04 hdac kernel: [136754.269537] usb 1-1.3: device firmware changed     Jul  5 03:12:04 hdac kernel: [136754.269995] usb 1-1.3: USB disconnect, device number 10     Jul  5 03:12:04 hdac kernel: [136754.269998] sd 6:0:0:1: Device offlined - not ready after error recovery     Jul  5 03:12:04 hdac kernel: [136754.348882] usb 1-1.3: new high-speed USB device number 11 using ehci_hcd     Jul  5 03:12:04 hdac kernel: [136754.442408] usb 1-1.3: New USB device found, idVendor=152d, idProduct=2351     Jul  5 03:12:04 hdac kernel: [136754.442419] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=5     Jul  5 03:12:04 hdac kernel: [136754.442425] usb 1-1.3: Product: USB to ATA/ATAPI Bridge     Jul  5 03:12:04 hdac kernel: [136754.442430] usb 1-1.3: Manufacturer: JMicron     Jul  5 03:12:04 hdac kernel: [136754.442434] usb 1-1.3: SerialNumber: 152D....     Jul  5 03:12:04 hdac kernel: [136754.443581] scsi7 : usb-storage 1-1.3:1.0     Jul  5 03:12:04 hdac mtp-probe: checking bus 1, device 11: "/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3"     Jul  5 03:12:04 hdac mtp-probe: bus: 1, device: 11 was not an MTP device     Jul  5 03:12:26 hdac kernel: [136776.197464] usb 1-1.3: reset high-speed USB device number 11 using ehci_hcd     Jul  5 03:12:36 hdac kernel: [136786.356068] usb 1-1.3: reset high-speed USB device number 11 using ehci_hcd     Jul  5 03:12:41 hdac kernel: [136791.517429] usb 1-1.3: reset high-speed USB device number 11 using ehci_hcd     Jul  5 03:12:42 hdac kernel: [136791.965221] usb 1-1.3: reset high-speed USB device number 11 using ehci_hcd     Jul  5 03:12:42 hdac kernel: [136792.412974] usb 1-1.3: reset high-speed USB device number 11 using ehci_hcd     Jul  5 03:12:43 hdac kernel: [136792.900701] usb 1-1.3: reset high-speed USB device number 11 using ehci_hcd     Jul  5 03:12:43 hdac kernel: [136793.316865] scsi 7:0:0:0: Device offlined - not ready after error recovery     Jul  5 03:12:43 hdac kernel: [136793.317120] usb 1-1.3: USB disconnect, device number 11     Jul  5 03:12:43 hdac kernel: [136793.388401] usb 1-1.3: new high-speed USB device number 12 using ehci_hcd     Jul  5 03:12:44 hdac kernel: [136793.836359] usb 1-1.3: new high-speed USB device number 13 using ehci_hcd     Jul  5 03:12:44 hdac kernel: [136794.283982] usb 1-1.3: new high-speed USB device number 14 using ehci_hcd     Jul  5 03:12:45 hdac kernel: [136794.776418] usb 1-1.3: new high-speed USB device number 15 using ehci_hcd     Jul  5 07:46:51 hdac rsyslogd: [origin software="rsyslogd" swVersion="5.8.11" x-pid="2234" x-info="http://www.rsyslog.com"] rsyslogd was HUPed     Jul  5 07:46:51 hdac kernel: [153233.051604] md: super_written gets error=-19, uptodate=0     Jul  5 07:46:51 hdac kernel: [153233.080561] lost page write due to I/O error on md0     Jul  5 07:46:51 hdac kernel: [153233.082218] lost page write due to I/O error on md0     Jul  5 07:46:51 hdac kernel: [153233.088909] lost page write due to I/O error on md0     Jul  5 07:46:51 hdac kernel: [153233.088972] lost page write due to I/O error on md0     Jul  5 07:46:51 hdac kernel: [153233.089030] lost page write due to I/O error on md0     Jul  5 07:46:51 hdac kernel: [153233.089084] lost page write due to I/O error on md0     Jul  5 07:46:51 hdac kernel: [153233.089139] lost page write due to I/O error on md0     Jul  5 07:46:51 hdac kernel: [153233.089193] lost page write due to I/O error on md0     Jul  5 07:46:51 hdac kernel: [153233.089247] lost page write due to I/O error on md0     Jul  5 07:46:51 hdac kernel: [153233.089300] lost page write due to I/O error on md0     Jul  5 07:46:52 hdac kernel: [153233.308299] md: super_written gets error=-19, uptodate=0     Jul  5 15:04:02 hdac kernel: [179450.340233] md: super_written gets error=-19, uptodate=0     Jul  5 15:04:02 hdac kernel: [179450.340549] quiet_error: 101 callbacks suppressed     Jul  5 15:04:02 hdac kernel: [179450.340566] lost page write due to I/O error on md0     Jul  5 15:04:02 hdac kernel: [179450.340774] lost page write due to I/O error on md0     Jul  5 15:04:03 hdac kernel: [179450.541182] md: super_written gets error=-19, uptodate=0     Jul  5 15:04:08 hdac kernel: [179455.698562] md: super_written gets error=-19, uptodate=0     Jul  5 15:04:08 hdac kernel: [179455.699059] lost page write due to I/O error on md0     Jul  5 15:04:08 hdac kernel: [179455.902387] md: super_written gets error=-19, uptodate=0     Jul  5 15:04:32 hdac kernel: [179479.848336] md: super_written gets error=-19, uptodate=0     Jul  5 15:04:32 hdac kernel: [179479.848803] lost page write due to I/O error on md0     Jul  5 15:04:32 hdac kernel: [179479.848832] lost page write due to I/O error on md0     Jul  5 15:04:32 hdac kernel: [179480.049689] md: super_written gets error=-19, uptodate=0     Jul  5 15:20:11 hdac kernel: [180418.849041] md: super_written gets error=-19, uptodate=0     Jul  5 15:20:11 hdac kernel: [180418.852710] lost page write due to I/O error on md0     Jul  5 15:20:12 hdac kernel: [180419.056405] md: super_written gets error=-19, uptodate=0


Generating grub.cfg without Linux installed

My dual boot machine went haywire yesterday, and seriously corrupted the Linux partition.   Among the corrupted files were:   1. The entire `/boot` directory   2. Quite a few stuff in `/bin` _"No problem"_ , I thought to myself. I haven't been using that Linux partition anymore (it's my gaming PC), so I'll just rebuild the boot directory and leave it at that. _Problem is:_ due to corruption of the bin directory, I can't `chroot` into the system. And since `grub-mkconfig` (or `update-grub`) can't be run from a live USB, I have no way of generating the `grub.cfg` file. The live USBs I have here (Arch Linux and gparted) both have scripts inside grub.d/ for detecting OS's.   In gparted, `grub-mkconfig` fails to run entirely. While in arch linux it runs but detects nothing. **Is there a way of generating grub.cfg without a working Linux installation?**


How to find and replace a field column value in UNIX

I have file with the value say which is delimited with `|`               123-|aaa|bbb|123|123.0|123-|123.01-|-123.02|123.03-|aaa|bbb|123-|aaa-|-bbb|cc-cc|123.04-|aa123-|123.05-      I need to pick the column values which end with `-`, the column picked up should be a numeric value and then move the `-` to start of the value.


Using a unix filesystem on an external hard drive?

After repeated trouble with my NTFS formatted backup/media hard drive (undeletable files, etc.), I decided to reformat it with a unix file system (ext4 preferred). I do not intend to use it from a Windows machine, but it should be accessible from other Linux systems (e.g. live cd, after system reinstallation or change of computer). Could I run into trouble because of user/group permissions? Is there a way to minimize these (e.g. by chosing a more appropriate file system than ext4 or parameters in `/etc/fstab`)? Recursive chowns do not seem very elegant or efficient to me.


ssh with for loop - parentheses problem

I have the following script:               while [ "$1" != "" ]     do     case "$1" in         -h) HOST="$2"; shift 2;;     esac     done          if test -z "$HOST"     then         [...]     else         TODAY=$(date +'%Y-%m-%d')          configs=("/etc/inittab" "/etc/default/cron" "/etc/default/login" "/etc/default/su" "/etc/group" "/etc/inet/inetd.conf" "/etc/mnttab" "/etc/netmasks" "/etc/nsswitch.conf" "/etc/protocols" "/etc/services" "/etc/syslog.conf" "/var/sadm/install/contents" "/etc/user_attr" "/etc/passwd")           ssh $HOST          for (i=0; i<${#configs[*]}; i++)          do              digest -v -a md5 ${configs[$i]} | awk '{print $2,$4}' | sed 's/) (/\n/;s/[()]//g';          done > /tmp/md5_config_$TODAY.txt     fi      If I execute the script with a hostname (scriptname.sh -h hostname) I get the error               line 97: syntax error near unexpected token `('     line 97: `for (i=0;i<${#configs[*]};i++;); '      Is there a way to solve it? I want to execute the "digest" command on the remote host with the filenames of the array "configs" Edit: Actual state               else         TODAY=$(date +'%Y-%m-%d')          configs=("/etc/inittab" "/etc/default/cron" "/etc/default/login" "/etc/default/su" "/etc/group" "/etc/inet/inetd.conf" "/etc/mnttab" "/etc/netmasks" "/etc/nsswitch.conf" "/etc/protocols" "/etc/services" "/etc/syslog.conf" "/var/sadm/install/contents" "/etc/user_attr" "/etc/passwd")           ssh $HOST          for ((i=0; i<${#configs[*]}; i++))          do              digest -v -a md5 ${configs[$i]} | awk '{print $2,$4}' | sed 's/) (/\n/;s/[()]//g';          done > /tmp/md5_config_$TODAY.txt     fi


How to make tree output only directories?

150 directories I can handle but 900 files is too many for a review. I've no manual entry for `tree` so maybe I can ask you if you know how to output only directories since files get too detailed?               .     ├── agreement.htm     ├── appengine_admin     │   ├── admin_forms.py     │   ├── admin_forms.pyc     │   ├── admin_settings.py     │   ├── admin_settings.pyc     │   ├── admin_widgets.py     │   ├── admin_widgets.pyc     │   ├── authorized.py     │   ├── authorized.pyc     │   ├── db_extensions.py     │   ├── encoding.py     │   ├── __init__.py     │   ├── __init__.pyc     │   ├── media     │   │   ├── images     │   │   │   ├── default-bg.gif     │   │   │   ├── icon_calendar.gif     │   │   │   ├── icon_clock.gif     │   │   │   ├── nav-bg.gif     │   │   │   └── sidebar-li.png     │   │   ├── js     │   │   │   ├── calendar.js     │   │   │   ├── core.js     │   │   │   └── DateTimeShortcuts.js     │   │   └── style.css     │   ├── model_register.py     │   ├── model_register.pyc     │   ├── templates     │   │   ├── 404.html     │   │   ├── 500.html     │   │   ├── admin_base.html     │   │   ├── index.html     │   │   ├── model_item_edit.html     │   │   └── model_item_list.html     │   ├── utils.py     │   ├── utils.pyc     │   ├── views.py     │   └── views.pyc     ├── appengine_config.py     ├── appengine_config.py.bak     ├── appengine_config.pyc     ├── app.yaml     ├── br.py     ├── br.py.bak     ├── br.py.old     ├── captcha.py     ├── captcha.pyc     ├── common     │   ├── __init__.py     │   ├── __init__.pyc     │   ├── templatefilters.py     │   └── templatefilters.pyc     ├── conf     │   ├── __init__.py     │   ├── __init__.pyc     │   ├── locale     │   │   ├── ar     │   │   │   └── LC_MESSAGES     │   │   │       ├── django.mo     │   │   │       └── django.po     │   │   ├── bg     │   │   │   └── LC_MESSAGES     │   │   │       ├── django.mo     │   │   │       └── django.po     │   │   ├── en     │   │   │   └── LC_MESSAGES     │   │   │       ├── django.mo     │   │   │       └── django.po     │   │   ├── es     │   │   │   └── LC_MESSAGES     │   │   │       ├── django.mo     │   │   │       └── django.po     │   │   ├── fi     │   │   │   └── LC_MESSAGES     │   │   │       ├── django.mo     │   │   │       └── django.po     │   │   ├── fr     │   │   │   └── LC_MESSAGES     │   │   │       ├── django.mo     │   │   │       ├── django.po     │   │   │       └── django.po~     │   │   ├── ja     │   │   │   └── LC_MESSAGES     │   │   │       ├── django.mo     │   │   │       └── django.po     │   │   ├── pt     │   │   │   └── LC_MESSAGES     │   │   │       ├── django.mo     │   │   │       ├── django.po     │   │   │       └── django.po~     │   │   ├── ro     │   │   │   └── LC_MESSAGES     │   │   │       ├── django.mo     │   │   │       └── django.po     │   │   ├── ru     │   │   │   └── LC_MESSAGES     │   │   │       ├── django.mo     │   │   │       └── django.po     │   │   ├── sq     │   │   │   └── LC_MESSAGES     │   │   │       ├── django.mo     │   │   │       └── django.po     │   │   ├── sv     │   │   │   └── LC_MESSAGES     │   │   │       ├── django.mo     │   │   │       └── django.po     │   │   ├── tl     │   │   │   └── LC_MESSAGES     │   │   │       ├── django.mo     │   │   │       └── django.po     │   │   ├── tr     │   │   │   └── LC_MESSAGES     │   │   │       ├── django.mo     │   │   │       └── django.po     │   │   └── zh     │   │       └── LC_MESSAGES     │   │           ├── django.mo     │   │           └── django.po     │   └── settings.py     ├── credit     │   └── credit.html     ├── cron.yaml     ├── demjson.py     ├── demjson.pyc     ├── errorpages.py     ├── facebookapi.py     ├── facebookapi.py.bak     ├── facebookapi.pyc     ├── facebookconf.py     ├── facebookconf.pyc     ├── geo     │   ├── geocell.py     │   ├── geocell.pyc     │   ├── geocell_test.py     │   ├── geomath.py     │   ├── geomath.pyc     │   ├── geomath_test.py     │   ├── geomodel.py     │   ├── geomodel.pyc     │   ├── geotypes.py     │   ├── geotypes.pyc     │   ├── geotypes_test.py     │   ├── __init__.py     │   ├── __init__.pyc     │   ├── test_coverage.sh     │   ├── util.py     │   ├── util.pyc     │   └── util_test.py     ├── help.html     ├── i18n.py     ├── i18n.py.bak     ├── i18n.pyc     ├── index.yaml     ├── __init__.py     ├── in.old.py     ├── in.old.py.bak     ├── in.py     ├── in.py.bak     ├── in.tidy.py     ├── javascript.py     ├── js     │   ├── a.css     │   ├── b.css     │   ├── c.css     │   ├── d.css     │   ├── listcss.css     │   ├── load.js     │   ├── main.css     │   └── mycss.css     ├── jsmin.py     ├── json.py     ├── json.pyc     ├── listfiles.py     ├── login_required.py     ├── login_required.py.bak     ├── mailman.py     ├── main.old.py     ├── main.py     ├── main.py.bak     ├── main.pyc     ├── mapreduce     │   ├── base_handler.py     │   ├── base_handler.py.bak     │   ├── context.py     │   ├── context.py.bak     │   ├── control.py     │   ├── control.py.bak     │   ├── errors.py     │   ├── errors.py.bak     │   ├── handlers.py     │   ├── handlers.py.bak     │   ├── hooks.py     │   ├── hooks.py.bak     │   ├── __init__.py     │   ├── __init__.py.bak     │   ├── __init__.pyc     │   ├── input_readers.py     │   ├── input_readers.py.bak     │   ├── lib     │   │   ├── blobstore     │   │   ├── files     │   │   │   ├── blobstore.py     │   │   │   ├── crc32c.py     │   │   │   ├── file.py     │   │   │   ├── file_service_pb.py     │   │   │   ├── __init__.py     │   │   │   ├── records.py     │   │   │   └── testutil.py     │   │   ├── graphy     │   │   │   ├── backends     │   │   │   │   ├── google_chart_api     │   │   │   │   │   ├── encoders.py     │   │   │   │   │   ├── __init__.py     │   │   │   │   │   └── util.py     │   │   │   │   └── __init__.py     │   │   │   ├── bar_chart.py     │   │   │   ├── common.py     │   │   │   ├── formatters.py     │   │   │   ├── __init__.py     │   │   │   ├── line_chart.py     │   │   │   ├── pie_chart.py     │   │   │   ├── README     │   │   │   └── util.py     │   │   ├── __init__.py     │   │   ├── key_range     │   │   │   └── __init__.py     │   │   ├── pipeline     │   │   │   ├── common.py     │   │   │   ├── handlers.py     │   │   │   ├── __init__.py     │   │   │   ├── models.py     │   │   │   ├── pipeline.py     │   │   │   ├── simplejson     │   │   │   │   ├── decoder.py     │   │   │   │   ├── encoder.py     │   │   │   │   ├── __init__.py     │   │   │   │   ├── ordered_dict.py     │   │   │   │   ├── scanner.py     │   │   │   │   └── tool.py     │   │   │   ├── testutil.py     │   │   │   ├── ui     │   │   │   │   ├── common.css     │   │   │   │   ├── common.js     │   │   │   │   ├── images     │   │   │   │   │   ├── treeview-black.gif     │   │   │   │   │   ├── treeview-black-line.gif     │   │   │   │   │   ├── treeview-default.gif     │   │   │   │   │   └── treeview-default-line.gif     │   │   │   │   ├── jquery-1.4.2.min.js     │   │   │   │   ├── jquery.ba-hashchange.min.js     │   │   │   │   ├── jquery.cookie.js     │   │   │   │   ├── jquery.json.min.js     │   │   │   │   ├── jquery.timeago.js     │   │   │   │   ├── jquery.treeview.css     │   │   │   │   ├── jquery.treeview.min.js     │   │   │   │   ├── status.css     │   │   │   │   ├── status.html     │   │   │   │   └── status.js     │   │   │   └── util.py     │   │   └── simplejson     │   │       ├── decoder.py     │   │       ├── encoder.py     │   │       ├── __init__.py     │   │       ├── README     │   │       └── scanner.py     │   ├── main.py     │   ├── main.py.bak     │   ├── mapper_pipeline.py     │   ├── mapper_pipeline.py.bak     │   ├── mapreduce_pipeline.py     │   ├── mapreduce_pipeline.py.bak     │   ├── model.py     │   ├── model.py.bak     │   ├── namespace_range.py     │   ├── namespace_range.py.bak     │   ├── operation     │   │   ├── base.py     │   │   ├── base.pyc     │   │   ├── counters.py     │   │   ├── counters.pyc     │   │   ├── db.py     │   │   ├── db.pyc     │   │   ├── __init__.py     │   │   └── __init__.pyc     │   ├── output_writers.py     │   ├── output_writers.py.bak     │   ├── quota.py     │   ├── quota.py.bak     │   ├── shuffler.py     │   ├── shuffler.py.bak     │   ├── static     │   │   ├── base.css     │   │   ├── detail.html     │   │   ├── jquery-1.4.2.min.js     │   │   ├── overview.html     │   │   └── status.js     │   ├── status.py     │   ├── status.py.bak     │   ├── test_support.py     │   ├── test_support.py.bak     │   ├── util.py     │   └── util.py.bak     ├── mapreduce.yaml     ├── market     │   ├── categories.html     │   ├── credit.html     │   ├── __init__.py     │   ├── market_ad_detail.html     │   ├── market_ad_edit.html     │   ├── market_ad_newpasswd.html     │   ├── market_ad_pay.html     │   ├── market_ad_preview.html     │   ├── market_ad_remove.html     │   ├── market_ad_renew.html     │   ├── market_detail.html     │   ├── market_full.html     │   ├── market_list.html     │   ├── market_mailc2c.html     │   ├── market_search.html     │   ├── market_usersads_list.html     │   ├── models.py     │   ├── nav.html     │   └── publish.html     ├── onlinedebug     │   ├── codeinput.html     │   └── onlinedebug.py     ├── paginator.py     ├── paginator.pyc     ├── PythonTidy-1.20.py     ├── PythonTidy-1.20.py.bak     ├── reindent.py     ├── remote_api.py     ├── reports.py     ├── settings.py     ├── settings.pyc     ├── static     │   ├── base.css     │   ├── button-background.gif     │   ├── cancel.png     │   ├── challenge     │   ├── channel.html     │   ├── codebase     │   │   ├── dhtmlxcommon.js     │   │   ├── dhtmlxtree.css     │   │   ├── dhtmlxtree.js     │   │   └── imgs     │   │       ├── blank.gif     │   │       ├── but_cut.gif     │   │       ├── folderClosed.gif     │   │       ├── folderOpen.gif     │   │       ├── iconCheckAll.gif     │   │       ├── iconCheckDis.gif     │   │       ├── iconCheckGray.gif     │   │       ├── iconUncheckAll.gif     │   │       ├── iconUncheckDis.gif     │   │       ├── leaf.gif     │   │       ├── line1.gif     │   │       ├── line1_rtl.gif     │   │       ├── line2.gif     │   │       ├── line2_rtl.gif     │   │       ├── line3.gif     │   │       ├── line3_rtl.gif     │   │       ├── line4.gif     │   │       ├── line4_rtl.gif     │   │       ├── line.gif     │   │       ├── lock.gif     │   │       ├── minus2.gif     │   │       ├── minus2_rtl.gif     │   │       ├── minus3.gif     │   │       ├── minus3_rtl.gif     │   │       ├── minus4.gif     │   │       ├── minus4_rtl.gif     │   │       ├── minus5.gif     │   │       ├── minus5_rtl.gif     │   │       ├── minus_ar.gif     │   │       ├── minus.gif     │   │       ├── plus2.gif     │   │       ├── plus2_rtl.gif     │   │       ├── plus3.gif     │   │       ├── plus3_rtl.gif     │   │       ├── plus4.gif     │   │       ├── plus4_rtl.gif     │   │       ├── plus5.gif     │   │       ├── plus5_rtl.gif     │   │       ├── plus_ar.gif     │   │       ├── plus.gif     │   │       ├── radio_off.gif     │   │       ├── radio_on.gif     │   │       └── Thumbs.db     │   ├── comet-helper.js     │   ├── comet.js     │   ├── common.js     │   ├── credit.html     │   ├── crossajax.html     │   ├── css     │   │   ├── 960.css     │   │   ├── business.css     │   │   ├── montao.css     │   │   ├── openid.css     │   │   ├── reset.css     │   │   ├── style.css     │   │   ├── text.css     │   │   ├── uni-form.css     │   │   └── uni-form-generic.css     │   ├── extinfowindow.js     │   ├── failure.png     │   ├── favicon.ico     │   ├── favindex.ico     │   ├── fbjs.js     │   ├── feedicon.gif     │   ├── file.html     │   ├── for_sale_files     │   │   ├── 1x1_pages_li_c6_apuk_qh5569.gif     │   │   ├── all_pages.js     │   │   ├── arrays_v2.js     │   │   ├── bevakning_mini.gif     │   │   ├── common_in.css     │   │   ├── common.js     │   │   ├── ga.js     │   │   ├── generic.css     │   │   ├── jquery-1.js     │   │   ├── list.css     │   │   ├── searchbox.js     │   │   ├── thumb_extra_left_bottom.gif     │   │   ├── thumb_extra_right_bottom.gif     │   │   ├── thumb_extra_right_top.gif     │   │   ├── thumb_left_top.gif     │   │   ├── thumb_single_left_bottom.gif     │   │   ├── thumb_single_right_bottom.gif     │   │   ├── thumb_single_right_top.gif     │   │   ├── transparent.gif     │   │   └── xtcore.js     │   ├── frames.html     │   ├── ga.js     │   ├── geo.html     │   ├── googleb4b3b9748fe57cbf.html     │   ├── greybox.js     │   ├── iframe.js     │   ├── images     │   │   ├── 1.jpg     │   │   ├── 2.jpg     │   │   ├── 3.jpg     │   │   ├── dl.jpg     │   │   ├── go.jpg     │   │   ├── openid-providers-en.png     │   │   ├── openid-providers-ru.png     │   │   ├── openid-providers-uk.png     │   │   ├── p_debug1.JPG     │   │   ├── p_debug2.JPG     │   │   ├── p_debug3_1.JPG     │   │   ├── p_debug3_2.JPG     │   │   ├── p_debug3.JPG     │   │   ├── p_listfiles.JPG     │   │   ├── preview.jpg     │   │   ├── Thumbs.db     │   │   └── view.jpg     │   ├── images.large     │   │   ├── aol.gif     │   │   ├── facebook.gif     │   │   ├── google.gif     │   │   ├── myopenid.gif     │   │   ├── openid.gif     │   │   ├── rambler.gif     │   │   ├── verisign.gif     │   │   ├── yahoo.gif     │   │   └── yandex.gif     │   ├── images.small     │   │   ├── aol.ico     │   │   ├── aol.ico.gif     │   │   ├── aol.ico.png     │   │   ├── blogger.ico     │   │   ├── blogger.ico.gif     │   │   ├── blogger.ico.png     │   │   ├── claimid.ico     │   │   ├── claimid.ico.gif     │   │   ├── claimid.ico.png     │   │   ├── clickpass.ico     │   │   ├── clickpass.ico.gif     │   │   ├── clickpass.ico.png     │   │   ├── facebook.ico     │   │   ├── facebook.ico.gif     │   │   ├── facebook.ico.png     │   │   ├── flickr.ico     │   │   ├── flickr.ico.gif     │   │   ├── flickr.ico.png     │   │   ├── google.ico     │   │   ├── google.ico.gif     │   │   ├── google.ico.png     │   │   ├── google_profile.ico     │   │   ├── google_profile.ico.gif     │   │   ├── google_profile.ico.png     │   │   ├── launchpad.ico     │   │   ├── launchpad.ico.gif     │   │   ├── launchpad.ico.png     │   │   ├── linkedin.ico     │   │   ├── linkedin.ico.gif     │   │   ├── linkedin.ico.png     │   │   ├── livejournal.ico     │   │   ├── livejournal.ico.gif     │   │   ├── livejournal.ico.png     │   │   ├── myopenid.ico     │   │   ├── myopenid.ico.gif     │   │   ├── myopenid.ico.png     │   │   ├── openid.ico     │   │   ├── openid.ico.gif     │   │   ├── openid.ico.png     │   │   ├── rambler.ico     │   │   ├── rambler.ico.gif     │   │   ├── rambler.ico.png     │   │   ├── technorati.ico     │   │   ├── technorati.ico.gif     │   │   ├── technorati.ico.png     │   │   ├── twitter.ico     │   │   ├── twitter.ico.gif     │   │   ├── twitter.ico.png     │   │   ├── verisign.ico     │   │   ├── verisign.ico.gif     │   │   ├── verisign.ico.png     │   │   ├── vidoop.ico     │   │   ├── vidoop.ico.gif     │   │   ├── vidoop.ico.png     │   │   ├── wordpress.ico     │   │   ├── wordpress.ico.gif     │   │   ├── wordpress.ico.png     │   │   ├── yahoo.ico     │   │   ├── yahoo.ico.gif     │   │   ├── yahoo.ico.png     │   │   ├── yandex.ico     │   │   ├── yandex.ico.gif     │   │   └── yandex.ico.png     │   ├── img     │   │   ├── anuncio.gif     │   │   ├── facebook.gif     │   │   ├── facebook.png     │   │   ├── favicon.ico     │   │   ├── flerabildericon1.gif     │   │   ├── gratis.gif     │   │   ├── kamera.gif     │   │   ├── kool_business.png     │   │   ├── logo.gif     │   │   ├── mail.gif     │   │   ├── marketlogo.gif     │   │   ├── montao.gif     │   │   ├── montao_small.gif     │   │   ├── monton.gif     │   │   ├── sign-in-with-twitter-d.png     │   │   ├── sign-in-with-twitter-d-sm.png     │   │   ├── sign-in-with-twitter-l.png     │   │   ├── sign-in-with-twitter-l-sm.png     │   │   ├── tele.gif     │   │   ├── thumb_left_top.gif     │   │   ├── thumb_single_left_bottom.gif     │   │   ├── thumb_single_right_bottom.gif     │   │   ├── thumb_single_right_top.gif     │   │   └── twittericon.png     │   ├── jquery-1.js     │   ├── js     │   │   ├── jquery-1.2.6.min.js     │   │   ├── openid-jquery-en.js     │   │   ├── openid-jquery.js     │   │   ├── openid-jquery-ru.js     │   │   └── openid-jquery-uk.js     │   ├── json2.js     │   ├── labeledmarker.js     │   ├── listfileshelp.html     │   ├── login.js     │   ├── main.js     │   ├── mootools-1.js     │   ├── myfbjs2.js     │   ├── myfbjs3.js     │   ├── myfbjs.js     │   ├── obrigado.txt     │   ├── onlinedebughelp.html     │   ├── openid-icon.png     │   ├── openid-logo.png     │   ├── orbited.js     │   ├── plugin.js     │   ├── plugin_management.html     │   ├── plugin_management.js     │   ├── privacy.html     │   ├── recaptcha.js     │   ├── robots.txt     │   ├── round_bottom_left.png     │   ├── round_bottom_right.png     │   ├── round_top_left.png     │   ├── round_top_right.png     │   ├── search.html     │   ├── selectuser.js     │   ├── success.png     │   ├── terms.html     │   ├── Thumbs.db     │   ├── Transform.xls     │   ├── transparentpixel.gif     │   ├── tree.html     │   ├── wz_dragdrop.js     │   ├── xd_receiver.htm     │   ├── xd_receiver.html     │   └── yui     │       ├── assets     │       │   ├── bg_hd.gif     │       │   ├── dpSyntaxHighlighter.css     │       │   ├── dpSyntaxHighlighter.js     │       │   ├── example-hd-bg.gif     │       │   ├── Thumbs.db     │       │   ├── title_h_bg.gif     │       │   ├── yui-candy.jpg     │       │   ├── yui.css     │       │   ├── yuiDistribution.css      ...               153 directories, 890 files


Sender based redirection on Postfix

I'm running postfix on Debian, receiving email for `my.com`, and I would like all incoming emails from `sender.com` to be delivered to `jack@my.com`, regardless of the original recipient. Emails from other domains still need to go to the original recipient. Is this possible/easy to set up?


Compare versions of the same package in different repositories (i.e. stable vs backports) using apt-cache show

I'm trying to find out the version of a particular package available in the backports repo to compare it with the version available in the stable repo. But when I give               apt-cache show <package> | grep Version      I always get the same result as with               apt-cache -t wheezy-backports show <package> | grep Version      This seems to be the case no matter the package I'm searching. Am I doing something wrong?


How can I assign a keyboard shortcut to a specific application in Openbox?

I use the web browser Uzbl and the window manager Openbox, and I wondered if I could configure openbox to add a keyboard shortcut to minimize / maximize Uzbl's window ...


Windows Media Audio 9 player plugin- something for linux

I need something to play WMA radio. Do you know any way of doing this on linux?


Parse html on Linux

I have a couple of hundred html source code files. I need to extract the contents of a particular `<div>` element from each of these file so I'm going to write a script to loop through each file. The element structure is like this:

Some content

      Can anyone suggest a method by which I can extract the div `the_div_id` and all the child elements and content from a file using the linux command line?


Read Apple nvram

On Mac OS X there is a tool called _nvram_ to get and set EFI properties. As I am now deploying GNU/Linux on Apple hardware, I'd like to have a similar tool that is able to talk to Apple's EFI implementation. Are there tools to achieve this?


How to get size of data that haven't been written to disk yet?

In some programs percentage of copying large files get to 100% very fast and then I'm waiting much more before it goes next step. It's caused by buffer. How to I see amount of data that are going to be written?


command line retrieve list of all valid kbd layouts, variants and toggle options (to use with setxkbmap)

Is there a way from command line to retrieve the list of all available keyboard layouts and relative variants? I need to list all the valid layout/variants choices to be used then from setxkbmap. Also about the layout toggle options, is there a way to retrieve a list of all available choices (e.g. grp:shift_caps_toggle , ...) I know that with               setxkbmap -query      I retrieve the list of my current ones, but I need the whole list of options. UPDATE: I've been told about the command               man xkeyboard-config      which provides all the info to the command line. Furthermore, using               man -P cat xkeyboard-config      the output goes to stdout and can be parsed with scripts or c code


Weird behaviour case insensitivity with bash on MacOS

~/testing $ echo Hello > hello.txt     ~/testing $ echo Goodbye > goodbye.txt     ~/testing $ cat goodbye.txt hello.txt > HELLO.txt     ^C     ~/testing $ ls -l     total 9056     -rw-r--r--  1 user  user        8 25 Jul 16:21 goodbye.txt     -rw-r--r--  1 user  user  4631048 25 Jul 16:22 hello.txt     ~/testing $       Wha? I'm missing something here. Is there a destroy files insensitively option I'm missing? Why does this appear to loop?


Can directory listing be disabled for sftp?

A question arose in a group discussion: Can directory listing be disabled for sftp while still retaining read and write access? We are using openssh on ubuntu server 11.02 if that helps.


$PS1 on Ubuntu VM does not match actual prompt

I am running an Ubuntu VM out of `Virtual Box` and `Vagrant`:               vagrant@lucid64:~$ uname -a     Linux lucid64 2.6.32-38-server #83-Ubuntu SMP Wed Jan 4 11:26:59 UTC 2012 x86_64 GNU/Linux      My $PS1 variable doesn't actually match the prompt and is far more complex:               vagrant@lucid64:~$ echo $PS1     \[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$      I am looking for an explanation of the relationship between the $PS1 and my prompt, which is `$USER@$HOST:$PWD\$`, as can be seen above. E.g., on my regular laptop, which hosts this VM and is a Mac, it is clean and simple as follows:               ~@12:10:20>echo $PS1     \w@\t>


Installation problem linuxmint 13 Maya, invisible mouse

I was installed Linux Mint 13 maya to my mother's PC. Unfortunately the mouse is working "invisible mode", it works but I can't see the arrow. The problem is same when I boot from liveCD. This liveCD works perfect in my other computer.


How to set up a "child" proxy that doesn't need a "parent" proxy

I run Linux on a laptop that is sometimes on a corporate network which uses an NTLM proxy server, and thus I have cntlmd running on the laptop as a child proxy to connect to the parent (corporate) proxy server. Everything running on the laptop is configured to use localhost:3128 (the CNTLM proxy address) and then cntlmd handles the non-standard authentication with the NTLM proxy server. When I take the laptop off the corporate network, there are maybe a dozen different places things are configured to use localhost:3128, and it is a pain to disable and then later re-enable them. It is apparently not possible to configure cntlmd to not use a proxy when the one it is configured to use is unavailable. One option is to write a script that will automate all these changes for me, but it seems that it might be simpler to have a second child proxy that I can (automatically) start up when cntlm startup fails (it fails if it can't find the parent proxy). The second child proxy would just connect directly to the network, and so if it also listened on 3128 everything configured to hit 3128 could keep its configuration the same. What I can use to do this with? (Or is there a better way?)


modetest.c from libdrm tests lists no framebuffers

I wanted to play with KMS since it seems to be the preferred low-level graphics library on Linux. However, after compiling the appropriate modetest.c version (2.4.32, since that's the version of libdrm-dev I have), it shows no framebuffers when running.               $ ./modetest     trying to load module i915...success.     Encoders:     id  crtc    type    possible crtcs  possible clones      6   4   LVDS    0x00000002  0x00000001     12  0   DAC 0x00000003  0x00000002     14  0   TVDAC   0x00000003  0x00000004          Connectors:     id  encoder status      type    size (mm)   modes   encoders     5   6   connected   LVDS    330x210     1   6       modes:       name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot)       1280x800 60 1280 1312 1344 1408 800 801 804 816       props:     11  0   disconnected    VGA 0x0     0   12     13  0   disconnected    s-video 0x0     0   14          CRTCs:     id  fb  pos size     3   0   (0,0)   (0x0)        0 0 0 0 0 0 0 0 0     4   30  (0,0)   (0x0)       1280x800 60 1280 1312 1344 1408 800 801 804 816          Frame buffers:     id  size    pitch          $      I want to know why no frame buffers are listed.


Javascript Adobe Reader problem in some linux distributions

Adobe Reader doesn't execute initial javascript code of 3D scene in pdf document. With friends we've tested several linux distributions, namely CentOS, Ubuntu, Arch Linux, Mandriva, OpenSUSE. Also several Adobe Reader versions like 9.4.6 or 9.1. No luck. For some reason though, it works fine in Fedora (with exactly the same Adobe Reader). Here is an example pdf for test: http://www.2shared.com/document/LIbyWm_l/mysterious_dice.html . Just open the mysterious_dice.pdf and you should see a rotating dice. If you dont, javascript wasn't executed properly (it should be easy to check in Windows 7/XP or Fedora). We thought that something is wrong in Reader settings (like disabled javascript), but javascript was always allowed. Then that maybe it is linux Adobe Reader bug, but again, why does it work in Fedora? So maybe some package(s) or something. Another example is the Asymptote application, which uses javascript at the beginning for some scene settings (lights, camera position, etc) and especially with orthographic projection this problem shows up. More about this here: http://sourceforge.net/projects/asymptote/forums/forum/409349/topic/4021157. Any idea what might be wrong with this? I will just add that javascript later on works, only the initial code is ignored. Thanks for any suggestion. :(


Uninstall Linux on an embedded board

I am using an embedded board, a FOX G20 V with an ATMEL AT91SAM9G20 processor. I would like to know first of all, which specific linux version I am using on this board, but also, how to remove it. What commands do I type through the terminal to do so? Also, once that is done and the linux is removed, I would like to install a compatible compiler with the processor. Does anyone know how I can go about in doing so? Or does anyone have any available links in how I can install a compatible compiler for this board? I'm very new to embedded development and I'm stuck on these two steps at the moment.


Help with lost software RAID5 on CentOS 6.5

I've been searching for hours and giving up / too scared to delete all my data. I have a file server running CentOS 6.5 which has 4 WD RED 2TB drives (all > 1 year old) in software raid 5 with `mdadm`, and some other drives (not important). I used LVM on top of the RAID5 for easy management and partitioned the volume group as ext4. All of this worked really well until I needed to reboot. Apparently I forgot to save the `mdadm` settings to `/etc/mdadm.conf` and because of this the RAID failed. It contained some info but I've accidentally deleted its contents by running some command I've found via Google. After hours of searching I tried to run `mdadm -assemble`, but this tells me no drive has an super block:               # mdadm --assemble /dev/md0 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1      mdadm: no recogniseable superblock on /dev/sdb1     mdadm: /dev/sdb1 has no superblock - assembly aborted      Also tried without the partition numbers (`/dev/sdb`) but get the same result. Then I came across this command:               # mdadm --assemble --scan --verbose     mdadm: looking for devices for further assembly     mdadm: no recogniseable superblock on /dev/dm-3     mdadm: no recogniseable superblock on /dev/dm-2     mdadm: no recogniseable superblock on /dev/dm-1     mdadm: no recogniseable superblock on /dev/dm-0     mdadm: no recogniseable superblock on /dev/sdg1     mdadm: Cannot assemble mbr metadata on /dev/sdg     mdadm: no recogniseable superblock on /dev/sda1     mdadm: Cannot assemble mbr metadata on /dev/sda     mdadm: no recogniseable superblock on /dev/sdf1     mdadm: Cannot assemble mbr metadata on /dev/sdf     mdadm: no recogniseable superblock on /dev/sdh1     mdadm: Cannot assemble mbr metadata on /dev/sdh     mdadm: Cannot assemble mbr metadata on /dev/sdc1     mdadm: Cannot assemble mbr metadata on /dev/sdc     mdadm: Cannot assemble mbr metadata on /dev/sdd1     mdadm: Cannot assemble mbr metadata on /dev/sdd     mdadm: no recogniseable superblock on /dev/sde1     mdadm: Cannot assemble mbr metadata on /dev/sde     mdadm: no recogniseable superblock on /dev/sdb1     mdadm: Cannot assemble mbr metadata on /dev/sdb     mdadm: no recogniseable superblock on /dev/sdk1     mdadm: Cannot assemble mbr metadata on /dev/sdk     mdadm: Cannot assemble mbr metadata on /dev/sdj2     mdadm: Cannot assemble mbr metadata on /dev/sdj1     mdadm: Cannot assemble mbr metadata on /dev/sdj     mdadm: no recogniseable superblock on /dev/sdi2     mdadm: no recogniseable superblock on /dev/sdi1     mdadm: Cannot assemble mbr metadata on /dev/sdi     mdadm: No arrays found in config file or automatically      The strange thing is if I run specific on the drives it gives me the info:               # mdadm --examine /dev/sdc1     /dev/sdc1:        MBR Magic : aa55     Partition[0] :    432871117 sectors at   3224498923 (type 07)     Partition[1] :   1953460034 sectors at   3272020941 (type 16)     Partition[3] :    924335794 sectors at     50200576 (type 00)      Same result on `sdd1`, but not on `sdb1` and on `sde1`, ie. the other 2 drives. At this point I've given up and don't want to break the RAID. It contains very important data which has no backups (I know really stupid, but I was working on a backup system). Does anyone know how to fix this or recommendation on what to do next? It is really important that I keep the data or can backup the data which is stored on the array. **UPDATE** Since i was to scared to touch it myself and risking completely losing the data. I hired someone from freelancer.com. I got the data back now and making backups of it. After this i will completely rebuild the array to prevent this from happening again. I will also ask him for the recovery process en post it here so other people with the same problem can try to recover there array.


Stuck pixel on X

Every couple of days, a pixel roughly in the center of my screen gets stuck on white. It can be unstuck by restarting X, or by logging out and back in. However it remains stuck when I call xrefresh. Is there any way of getting X to do a harder refresh than just calling xrefresh, but something short of restarting X (which kills all programs)? Or any ideas about the actual nature of the problem? This is xubuntu 14.04, video is Mobile Intel® GMA 4500MHD.


chrome ui issues with mint 17

I did install Mint 17 (Qiana) today and I seem to have problems with the window title bars such as chromium title bar. I have limited knowledge of tool kits such as qt or gtk. From what I read so far, they seem to be two libraries/framework satisfying the same purpose. so on a system with one desktop environment such as gnome, I believe there should be only one framework installed gtk in this case? Or is there a problem with the window manager? I was trying to install virtualbox but I found only virtualbox-qt, but later I uninstalled the package and purged conf files. Is it normal that I see a lot of other qt libraries installed on the system? _gtk libraries_ :               ii  gir1.2-gtk-3.0                              3.10.8~3+qiana                                      amd64        GTK+ graphical user interface library -- gir bindings     ii  gir1.2-gtkclutter-1.0                       1.4.4-3ubuntu2                                      amd64        GObject introspection data for the GTK+ Clutter library     ii  gir1.2-gtksource-3.0                        3.10.2-0ubuntu1                                     amd64        gir files for the GTK+ syntax highlighting widget     ii  gir1.2-javascriptcoregtk-3.0                2.4.0-1ubuntu2                                      amd64        JavaScript engine library from WebKitGTK+ - GObject introspection data     ii  gir1.2-nmgtk-1.0                            0.9.8.8-0ubuntu4.1-mint1                            amd64        GObject introspection data for libnm-gtk     ii  gtk2-engines:amd64                          1:2.20.2-3ubuntu1                                   amd64        theme engines for GTK+ 2.x     ii  gtk2-engines:i386                           1:2.20.2-3ubuntu1                                   i386         theme engines for GTK+ 2.x     ii  gtk2-engines-murrine:amd64                  0.98.2-0ubuntu2                                     amd64        cairo-based gtk+-2.0 theme engine     ii  gtk2-engines-murrine:i386                   0.98.2-0ubuntu2                                     i386         cairo-based gtk+-2.0 theme engine     ii  gtk2-engines-oxygen:i386                    1.4.5-0ubuntu1                                      i386         Oxygen widget theme for GTK+-based applications     ii  gtk2-engines-pixbuf:amd64                   2.24.23-0ubuntu1                                    amd64        pixbuf-based theme for GTK+ 2.x     ii  gtk2-engines-pixbuf:i386                    2.24.23-0ubuntu1                                    i386         pixbuf-based theme for GTK+ 2.x     ii  ibus-gtk:i386                               1.5.5-1ubuntu3                                      i386         Intelligent Input Bus - GTK+2 support     ii  libcanberra-gtk-module:i386                 0.30-0ubuntu3                                       i386         translates GTK+ widgets signals to event sounds     ii  libcanberra-gtk0:amd64                      0.30-0ubuntu3                                       amd64        GTK+ helper for playing widget event sounds with libcanberra     ii  libcanberra-gtk0:i386                       0.30-0ubuntu3                                       i386         GTK+ helper for playing widget event sounds with libcanberra     ii  libcanberra-gtk3-0:amd64                    0.30-0ubuntu3                                       amd64        GTK+ 3.0 helper for playing widget event sounds with libcanberra     ii  libclutter-gtk-1.0-0:amd64                  1.4.4-3ubuntu2                                      amd64        Open GL based interactive canvas library GTK+ widget     ii  libdbusmenu-gtk3-4:amd64                    12.10.3+14.04.20140319-0ubuntu1                     amd64        library for passing menus over DBus - GTK+ version     ii  libdbusmenu-gtk4:amd64                      12.10.3+14.04.20140319-0ubuntu1                     amd64        library for passing menus over DBus - GTK+ version     ii  libgtk-3-0:amd64                            3.10.8~3+qiana                                      amd64        GTK+ graphical user interface library     ii  libgtk-3-bin                                3.10.8~3+qiana                                      amd64        programs for the GTK+ graphical user interface library     ii  libgtk-3-common                             3.10.8~3+qiana                                      all          common files for the GTK+ graphical user interface library     ii  libgtk-sharp-beans-cil                      2.14.1-3                                            all          Supplementary CLI bindings for GTK 2.14+     ii  libgtk2-perl                                2:1.249-2                                           amd64        Perl interface to the 2.x series of the Gimp Toolkit library     ii  libgtk2.0-0:amd64                           2.24.23-0ubuntu1                                    amd64        GTK+ graphical user interface library     ii  libgtk2.0-0:i386                            2.24.23-0ubuntu1                                    i386         GTK+ graphical user interface library     ii  libgtk2.0-bin                               2.24.23-0ubuntu1                                    amd64        programs for the GTK+ graphical user interface library     ii  libgtk2.0-cil                               2.12.10-5                                           amd64        CLI binding for the GTK+ toolkit 2.12     ii  libgtk2.0-common                            2.24.23-0ubuntu1                                    all          common files for the GTK+ graphical user interface library     ii  libgtkglext1                                1.2.0-3.1fakesync3                                  amd64        OpenGL Extension to GTK+ (shared libraries)     ii  libgtkmm-3.0-1:amd64                        3.10.1-0ubuntu2                                     amd64        C++ wrappers for GTK+ (shared libraries)     ii  libgtksourceview-3.0-1:amd64                3.10.2-0ubuntu1                                     amd64        shared libraries for the GTK+ syntax highlighting widget     ii  libgtksourceview-3.0-common                 3.10.2-0ubuntu1                                     all          common files for the GTK+ syntax highlighting widget     ii  libgtksourceview2.0-0                       2.10.5-1ubuntu2                                     amd64        shared libraries for the GTK+ syntax highlighting widget     ii  libgtksourceview2.0-common                  2.10.5-1ubuntu2                                     all          common files for the GTK+ syntax highlighting widget     ii  libgtkspell0                                2.0.16-1ubuntu7                                     amd64        a spell-checking addon for GTK's TextView widget     ii  libjavascriptcoregtk-1.0-0:amd64            2.4.0-1ubuntu2                                      amd64        JavaScript engine library from WebKitGTK+     ii  libjavascriptcoregtk-3.0-0:amd64            2.4.0-1ubuntu2                                      amd64        JavaScript engine library from WebKitGTK+     ii  libnm-gtk-common                            0.9.8.8-0ubuntu4.1-mint1                            all          network management framework (common files for wifi and mobile)     ii  libnm-gtk0                                  0.9.8.8-0ubuntu4.1-mint1                            amd64        network management framework (GNOME dialogs for wifi and mobile)     ii  libreoffice-gtk                             1:4.2.3~rc3-0ubuntu2                                amd64        office productivity suite -- GTK+ integration     ii  libwebkit2gtk-3.0-25:amd64                  2.4.0-1ubuntu2                                      amd64        WebKit2 API layer for WebKitGTK+     ii  libwebkitgtk-1.0-0:amd64                    2.4.0-1ubuntu2                                      amd64        Web content engine library for GTK+     ii  libwebkitgtk-1.0-common                     2.4.0-1ubuntu2                                      all          Web content engine library for GTK+ - data files     ii  libwebkitgtk-3.0-0:amd64                    2.4.0-1ubuntu2                                      amd64        Web content engine library for GTK+     ii  libwebkitgtk-3.0-common                     2.4.0-1ubuntu2                                      all          Web content engine library for GTK+ - data files     ii  mint-themes-gtk3                            3.10-5                                              all          Mint themes for GTK3     ii  python-aptdaemon.gtk3widgets                1.1.1-1ubuntu5                                      all          Python 2 GTK+ 3 widgets to run an aptdaemon client     ii  python-gtk2                                 2.24.0-3ubuntu3                                     amd64        Python bindings for the GTK+ widget set     ii  python-gtksourceview2                       2.10.1-2build1                                      amd64        Python bindings for the GtkSourceView widget     ii  python3-aptdaemon.gtk3widgets               1.1.1-1ubuntu5                                      all          Python 3 GTK+ 3 widgets to run an aptdaemon client     ii  transmission-gtk                            2.82-1.1ubuntu3                                     amd64        lightweight BitTorrent client (GTK+ interface)     ii  xdg-user-dirs-gtk                           0.10-1ubuntu1                                       amd64        tool to manage well known user directories (Gtk extension)      _qt libraries_ :               ii  libaccounts-qt5-1                           1.11+14.04.20140410.1-0ubuntu1                      amd64        QT library for single sign on     ii  libdbusmenu-qt2:amd64                       0.9.3+14.04.20140314-0ubuntu1                       amd64        Qt implementation of the DBusMenu protocol     ii  libqt4-dbus:amd64                           4:4.8.5+git192-g085f851+dfsg-2ubuntu4               amd64        Qt 4 D-Bus module     ii  libqt4-dbus:i386                            4:4.8.5+git192-g085f851+dfsg-2ubuntu4               i386         Qt 4 D-Bus module     ii  libqt4-declarative:amd64                    4:4.8.5+git192-g085f851+dfsg-2ubuntu4               amd64        Qt 4 Declarative module     ii  libqt4-declarative:i386                     4:4.8.5+git192-g085f851+dfsg-2ubuntu4               i386         Qt 4 Declarative module     ii  libqt4-designer:amd64                       4:4.8.5+git192-g085f851+dfsg-2ubuntu4               amd64        Qt 4 designer module     ii  libqt4-designer:i386                        4:4.8.5+git192-g085f851+dfsg-2ubuntu4               i386         Qt 4 designer module     ii  libqt4-help:amd64                           4:4.8.5+git192-g085f851+dfsg-2ubuntu4               amd64        Qt 4 help module     ii  libqt4-network:amd64                        4:4.8.5+git192-g085f851+dfsg-2ubuntu4               amd64        Qt 4 network module     ii  libqt4-network:i386                         4:4.8.5+git192-g085f851+dfsg-2ubuntu4               i386         Qt 4 network module     ii  libqt4-opengl:amd64                         4:4.8.5+git192-g085f851+dfsg-2ubuntu4               amd64        Qt 4 OpenGL module     ii  libqt4-opengl:i386                          4:4.8.5+git192-g085f851+dfsg-2ubuntu4               i386         Qt 4 OpenGL module     ii  libqt4-qt3support:i386                      4:4.8.5+git192-g085f851+dfsg-2ubuntu4               i386         Qt 3 compatibility library for Qt 4     ii  libqt4-script:amd64                         4:4.8.5+git192-g085f851+dfsg-2ubuntu4               amd64        Qt 4 script module     ii  libqt4-script:i386                          4:4.8.5+git192-g085f851+dfsg-2ubuntu4               i386         Qt 4 script module     ii  libqt4-scripttools:amd64                    4:4.8.5+git192-g085f851+dfsg-2ubuntu4               amd64        Qt 4 script tools module     ii  libqt4-scripttools:i386                     4:4.8.5+git192-g085f851+dfsg-2ubuntu4               i386         Qt 4 script tools module     ii  libqt4-sql:amd64                            4:4.8.5+git192-g085f851+dfsg-2ubuntu4               amd64        Qt 4 SQL module     ii  libqt4-sql:i386                             4:4.8.5+git192-g085f851+dfsg-2ubuntu4               i386         Qt 4 SQL module     ii  libqt4-svg:amd64                            4:4.8.5+git192-g085f851+dfsg-2ubuntu4               amd64        Qt 4 SVG module     ii  libqt4-svg:i386                             4:4.8.5+git192-g085f851+dfsg-2ubuntu4               i386         Qt 4 SVG module     ii  libqt4-test:amd64                           4:4.8.5+git192-g085f851+dfsg-2ubuntu4               amd64        Qt 4 test module     ii  libqt4-test:i386                            4:4.8.5+git192-g085f851+dfsg-2ubuntu4               i386         Qt 4 test module     ii  libqt4-xml:amd64                            4:4.8.5+git192-g085f851+dfsg-2ubuntu4               amd64        Qt 4 XML module     ii  libqt4-xml:i386                             4:4.8.5+git192-g085f851+dfsg-2ubuntu4               i386         Qt 4 XML module     ii  libqt4-xmlpatterns:amd64                    4:4.8.5+git192-g085f851+dfsg-2ubuntu4               amd64        Qt 4 XML patterns module     ii  libqt4-xmlpatterns:i386                     4:4.8.5+git192-g085f851+dfsg-2ubuntu4               i386         Qt 4 XML patterns module     ii  libqt5core5a:amd64                          5.2.1+dfsg-1ubuntu14                                amd64        Qt 5 core module     ii  libqt5dbus5:amd64                           5.2.1+dfsg-1ubuntu14                                amd64        Qt 5 D-Bus module     ii  libqt5gui5:amd64                            5.2.1+dfsg-1ubuntu14                                amd64        Qt 5 GUI module     ii  libqt5network5:amd64                        5.2.1+dfsg-1ubuntu14                                amd64        Qt 5 network module     ii  libqt5opengl5:amd64                         5.2.1+dfsg-1ubuntu14                                amd64        Qt 5 OpenGL module     ii  libqt5positioning5:amd64                    5.2.1-1ubuntu2                                      amd64        Qt Positioning module     ii  libqt5printsupport5:amd64                   5.2.1+dfsg-1ubuntu14                                amd64        Qt 5 print support module     ii  libqt5qml5:amd64                            5.2.1-3ubuntu15                                     amd64        Qt 5 QML module     ii  libqt5quick5:amd64                          5.2.1-3ubuntu15                                     amd64        Qt 5 Quick library     ii  libqt5sensors5:amd64                        5.2.1+dfsg-2ubuntu2                                 amd64        Qt Sensors module     ii  libqt5sql5:amd64                            5.2.1+dfsg-1ubuntu14                                amd64        Qt 5 SQL module     ii  libqt5sql5-sqlite:amd64                     5.2.1+dfsg-1ubuntu14                                amd64        Qt 5 SQLite 3 database driver     ii  libqt5test5:amd64                           5.2.1+dfsg-1ubuntu14                                amd64        Qt 5 test module     ii  libqt5webkit5:amd64                         5.1.1-1ubuntu8                                      amd64        Web content engine library for Qt     ii  libqt5widgets5:amd64                        5.2.1+dfsg-1ubuntu14                                amd64        Qt 5 widgets module     ii  libqt5xml5:amd64                            5.2.1+dfsg-1ubuntu14                                amd64        Qt 5 XML module     ii  libqtassistantclient4:amd64                 4.6.3-6                                             amd64        Qt Assistant client library (runtime)     ii  libqtcore4:amd64                            4:4.8.5+git192-g085f851+dfsg-2ubuntu4               amd64        Qt 4 core module     ii  libqtcore4:i386                             4:4.8.5+git192-g085f851+dfsg-2ubuntu4               i386         Qt 4 core module     ii  libqtdbus4:amd64                            4:4.8.5+git192-g085f851+dfsg-2ubuntu4               amd64        Qt 4 D-Bus module library     ii  libqtdbus4:i386                             4:4.8.5+git192-g085f851+dfsg-2ubuntu4               i386         Qt 4 D-Bus module library     ii  libqtgui4:amd64                             4:4.8.5+git192-g085f851+dfsg-2ubuntu4               amd64        Qt 4 GUI module     ii  libqtgui4:i386                              4:4.8.5+git192-g085f851+dfsg-2ubuntu4               i386         Qt 4 GUI module     ii  libqtwebkit4:amd64                          2.3.2-0ubuntu7                                      amd64        Web content engine library for Qt     ii  libqtwebkit4:i386                           2.3.2-0ubuntu7                                      i386         Web content engine library for Qt     ii  libsignon-qt5-1                             8.56+14.04.20140307-0ubuntu2                        amd64        Single Sign On framework     ii  python-qt4                                  4.10.4+dfsg-1ubuntu1                                amd64        Python bindings for Qt4     ii  python-qt4-dbus                             4.10.4+dfsg-1ubuntu1                                amd64        D-Bus Support for PyQt4     ii  qt-at-spi:amd64                             0.3.1-4fakesync1                                    amd64        at-spi accessibility plugin for Qt     ii  qtchooser                                   39-g4717841-3                                       amd64        Wrapper to select between Qt development binary versions     ii  qtcore4-l10n                                4:4.8.5+git192-g085f851+dfsg-2ubuntu4               all          Qt 4 core module translations     ii  sni-qt:amd64                                0.2.6-0ubuntu1                                      amd64        indicator support for Qt      ![chromium title bar](http://i.stack.imgur.com/6MVtZ.png)


what is the relationship between wvdial, pon and chat?

I've checked their man pages, but I'm still confused. I just know they are all related to ppp connections... I'm surprised that when I googled "pon wvdial relationship", I get no useful results, so I ask this question here. Who can tell me the role of these three tools? I still feel they do the same thing... and... I find that a new tool - pon.wvdial has come out, and what is it? I'm really confused with these tools...


C Shell script condition for if string contains a newline character

I'm not sure how to express this using the `csh` string matching syntax. I want to test whether a csh variable contains a newline. I'm basically looking for:               if ($mystr !~ <pattern for strings which contain a newline character>)      _Edit:_ in my particular case, I am trying to make a string like this pass:               1234ABC      And a string like this fail:               1234ABC      -------     FOOBAR      These are the output of a `sed` command, namely `sed '1d;$d'`. Not sure if that matters. The reason why I am trying to detect newlines rather than `" -------"` is for defense against changes in the formatting of the file I'm parsing. (Anyway, I don't think it matters what I'm doing with the file exactly, since I'm just looking for a general solution for detecting a newline character.)


Add autocompletion for custom script

I am currently working on a shell script I called `makeyourself.sh` (linked to `/usr/bin/mys`) which automatically installs a debian package from source (via `apt-get source -b $1`). So I decided to add an autocomplete function for the package name which is given as the first parameter: `sudo mys panth<tab><tab>` should then list every package beginning with `panth` — my try was as follows:               complete -C "apt-cache --no-generate pkgnames" mys      But it does not seem to work: when I press the tab key as mentioned above, at changes the parameter to `mys`, which returns me `sudo mys mys`. What am I doing wrong? Do I have to specify the location in the command where `complete` has to insert the string which shall be completed, like `{}` or `$1`? I use ElementaryOS, a Linux distribution based on Ubuntu. The script is a standard *.sh shell script which uses the standard `#!/bin/bash`


File not displayed using vi but visible with command ls -l CD*

I can do an `ls -l CD*` and see the following output. `CDTEST userA RW RW R` I am logged in as userA. But if I do an `ls -l` the file does not appear. If I do `vi CDTEST` it tries to create a new file named `CDTEST`. If I do a `mv` or `rm` I get the message no file of name `CDTEST` found.


How to run a command as if it is called from cron

I write a script and set it as a cron job. But due to a difference of environment variables it doesn't work as it should be. In that case I change a little bit with `crontab -e` and set a cron job time closest minute, and wait next minute to come to show the result. I feel this is a totally absurd approach, but I don't know better way to do it. If there is a way to run a script as if it is called inside cron job, I'm going to use it. Does anyone know how to do it?


Set environment inside `nsenter /bin/bash`

I'm entering a namespace with `nsenter -m -u -i -n -p -t $PID /bin/bash`. However, `printenv` inside this namespace doesn't have everything I need. I'd like to send these variables in, but I'd like to avoid prefixing my bash command like `KEY=VALUE KEY2=VALUE2 /bin/bash`. Is there a better way to do this?


Linux Image to recreate a machine with the same configuration

I have a CentOS 6.5 machine with some installed packages , I want three more identical boxes to be setup and I was wondering if I can make an image of the one machine that I have pre-configured and use that image to make copies of that one machine onto other machines. This would save me a lot of time, please let me know if this is possible ? Would OpenStack be an option here ? Thanks.


How can I find the hardware model in Linux?

I used a system information utility to take the model number of a system, and also of the motherboard.               DMI System Manufacturer     LENOVO     DMI System Product          2306CTO     DMI System Version          ThinkPad X230     DMI Motherboard Product     2306CTO        Is there a way to get model number, in this case `2306CTO`, in Linux?


grep command giving error

I am using grep to filter out the contents on some patterns(genes in my case). For more info,here is the earlier link. Find pattern from one file listed in another My code(should work) but is not.                grep -f file1 file2      Here is my subset of genes(file1):               C1QTNF3     C5orf22     C5orf28     C5orf34     C5orf38     C5orf42     C5orf49     C5orf51     C5orf64     C6     C7     C9     CAPSL     CARD6     CARTPT     CCDC125     CCDC152     CCL28     CCNB1     CCNO     CCT5     CD180     CDC20B     CDH10     CDH12     CDH18     CDH6     CDH9     CDK7     CENPH     CENPK     CKMT2     CLPTM1L     CMBL     CMYA5     COL4A3BP     CR749689     CRHBP     CRSP8P     CT49     CTNND2     CWC27     DAB2     DAP     DDX4     DEPDC1B     DHFR     DHX29     DIMT1     DMGDH      And below is my text file(file2) which is getting matched up,even though there is no gene UNC79 in file 1 as seen in SNPEFF_GENE_NAME=UNC79 show to be present in file2.                 AC=3;AF=0.016;AN=186;BaseQRankSum=0.075;DB;DP=292;Dels=0.00;FS=4.271;HaplotypeScore=0.0891;InbreedingCoeff=0.0225;MLEAC=2;MLEAF=0.011;MQ=59.18;MQ0=1;MQRankSum=0.969;QD=13.42;ReadPosRankSum=-0.373;SNPEFF_EFFECT=INTRON;SNPEFF_EXON_ID=23;SNPEFF_FUNCTIONAL_CLASS=NONE;SNPEFF_GENE_BIOTYPE=protein_coding;SNPEFF_GENE_NAME=UNC79;SNPEFF_IMPACT=MODIFIER;SNPEFF_TRANSCRIPT_ID=ENST00000256339;VQSLOD=9.31;culprit=DP      Hence,The output of grep is the whole text blob from file2. Below is the complete row from the file,which gives issue.The second column is the gene name. I dont have this gene in my file1.And so I dont want the output of this particular row.I have 1000 such rows of different genes,which need to be filtered out only for the genes that are in file1.                   intronic    UNC79   14  94062922    94062922    A   G   het 80.54   3   14  94062922    rs183710732 A   G   80.54   PASS    AC=3;AF=0.016;AN=186;BaseQRankSum=0.075;DB;DP=292;Dels=0.00;FS=4.271;HaplotypeScore=0.0891;InbreedingCoeff=0.0225;MLEAC=2;MLEAF=0.011;MQ=59.18;MQ0=1;MQRankSum=0.969;QD=13.42;ReadPosRankSum=-0.373;SNPEFF_EFFECT=INTRON;SNPEFF_EXON_ID=23;SNPEFF_FUNCTIONAL_CLASS=NONE;SNPEFF_GENE_BIOTYPE=protein_coding;SNPEFF_GENE_NAME=UNC79;SNPEFF_IMPACT=MODIFIER;SNPEFF_TRANSCRIPT_ID=ENST00000256339;VQSLOD=9.31;culprit=DP    GT:AD:DP:GQ:PL  0/1:1,2:3:33:39,0,33


RHEL & SUSE 2014 CPU & storage benchmarking tools

I have hundreds of Linux servers that we need to benchmark the CPU & Storage on. RAM & Networking would also be good. If possible I would to avoid installing a large suite, but not totally against it. Ideally I could run from a network location and not have to install anything. What we are trying to test is the infrastructure itself. So read/write IOPS, response time and GB/sec for storage for instance. I'm willing to write a script to kick off the command line, as these servers do not have a GUI on them just command line. These servers are all 64 bit with many cores and fiber attached storage. MOST of the tools and threads I found here on this topic were quite old. I was wondering if there are any modern testing tools that are open source and reliable. We would test each host one time and get the metrics, store them, then when there is an issue rerun to tests to be sure the infrastructure is not having an issue before we look at the apps etc. We will be doing the same for Windows hosts also, so if you have tools that work in both places that is a bonus. If the best tools are simply older but work great on the current RHEL and SUSE builds then I'm fine with that, it just needs to be simple to kick off a single command line or script it and capture results, without having a huge install footprint.


how to specify the libstdc++.so.6 to use

I am trying to compile a program of mine, that needs `C++11` features and a newer version of `boost` than is installed on the target machine. I therefore compiled and installed `gcc 4.9` to some local directory (`/secured/local`) with an in-tree build of all dependencies and the binutils. I then downloaded `boost 1.55` and ran `./boostrap.sh --prefix=/secured/local && ./b4 install` to install boost. Both compilations worked fine and `gcc -std=c++11` also works. My program is built using cmake with the usual `FindXX.cmake` procedure of finding files. I am running cmake like this:               cmake ../source/ -DBOOST_ROOT=/secured/local -DCMAKE_EXE_LINKER_FLAGS='-Wl,-rpath,/secured/local/lib'      which successfully finds my new boost installation and the new version of gcc. Compilation and linking both work flawlessly. However, upon execution of my program I am getting the following errors:               $ ./surface     ./surface: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by ./surface)     ./surface: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by ./surface)     ./surface: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by ./surface)     ./surface: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.19' not found (required by ./surface)     ./surface: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /secured/local/lib/libconfig++.so.9)     ./surface: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /secured/local/lib/libboost_program_options.so.1.55.0)     ./surface: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /secured/local/lib/libboost_program_options.so.1.55.0)     ./surface: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /secured/local/lib/libboost_program_options.so.1.55.0)     ./surface: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /secured/local/lib/libboost_filesystem.so.1.55.0)     ./surface: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /secured/local/lib/libboost_regex.so.1.55.0)     ./surface: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /secured/local/lib/libboost_regex.so.1.55.0)     ./surface: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /secured/local/lib/libboost_regex.so.1.55.0)     ./surface: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /secured/local/lib/libboost_regex.so.1.55.0)      Running `objdump` on boost shows               objdump -x /secured/local/lib/libboost_program_options.so.1.55.0 | grep stdc++       NEEDED               libstdc++.so.6       required from libstdc++.so.6:      It appears as if both the boost libs try to use the old `/usr/lib64/libstdc++.so.6` instead the new one in `/secured/local/lib`. What did I do wrong in my procedure? Note, that I try to avoid setting the `LD_LIBRARY_PATH` somewhere.


Ulimit unlimited stack behavior oddity

I am running an application on a Solaris 10 system. Yesterday we have set the process stack size to unlimited:               ulimit -s unlimited      Today during the load the process would not come up reporting that it is "out of memory" during loading from Oracle database when the stack size was limited again to 8192K the process came up with no issues. There was a question regarding this on Stack Overflow: What is the effect of running an application with "Unlimited Stack" size? But we're not seeing the odd and usually varying memory related issues that one would expect. So there are 2 questions:   1. Is there a specific implication of setting stack to Unlimited that would revert to some system limits that might be lower then the current ulimit set per user?   2. Where could I find what those limits might be without having root access? **EDIT** `isainfo -v 64-bit sparcv9 applications vis2 vis 32-bit sparc applications vis2 vis v8plus div32 mul32`


Updating kernel on a Chromebook to prep for Chrubuntu

Pretty simple question: I have read that by setting my Chromebook to the dev channel, it will install a later kernel. Currently it's 3.4.0, and it'd install 3.8.0 (64-bit, no less). However, after changing the channel and waiting for the updates to happen, and rebooting, the `uname -r` command still shows 3.4.0. What gives? Is there an alternative? Some background: I recently got a Chromebook. It's an Acer C710. Naturally, I want to use it as a Ubuntubook, specifically Lubuntu. However, it copies your kernel over from ChromeOS, which is just 3.4.0 on the Acer C7. Updating isn't as simple as it is with a regular install, with GRUB and all that, since GRUB doesn't come into the boot process with Chrubuntu. So it seems like the easiest way is to get the dev kernel from Google. An updated kernel is pretty important - even Steam doesn't run without at least 3.6. Thanks!


Solaris - Inheriting by files the user's ownership of directory

I have a directory with ownersip like user:group. I want to make on it something like sgid, but for user - all of new created files have a directory ownership. For example:               drwxrwx--- 2 user   group   4096 Jun  3 16:10 test      And all created files in it have automaticly set following ownership on user:               -rwxrw---- 1 user group1 0 Jun  3 16:11 file1     -rwxrw---- 1 user group2 0 Jun  3 16:11 file2     -rwxrw---- 1 user group3 0 Jun  3 16:11 file3      It is possible to do this?