ssldump: PCAP: syntax error

I'm using:               # uname -ro     FreeBSD 9.0-RELEASE-p3      And the latest `ssldump`:               # pkg_info | grep ssldump     ssldump-0.9b3_4     SSLv3/TLS network protocol analyzer      When I try starting it with decryption - I got the following error:               # ssldump -Xnd -i em0 port 8443 -k name.pem -p password     PCAP: syntax error      I've installed `libpcap`:               # pkg_info | grep libpcap     dnstop-20121017     Captures and analyzes DNS traffic (or analyzes libpcap dump     libpcap-1.4.0       Ubiquitous network traffic capture library      Found one reference about possible problems with some network interfaces: > Support is provided for only for Ethernet and loopback interfaces So I tried to eun `ssldump` with `lo0`:               # ssldump -Xnd -i lo0 port 8443 -k name.pem -p password     PCAP: syntax error      So - how I can run`ssldump` with packets decryption? Where is my mistake?


Compiling and installing a kernel.org kernel to a custom volume on disk

I want to compile and install a kernel.org kernel on a custom HDD volume, say `/dev/sda5`, instead of being merged with my current Ubuntu's directories. I can find information about configuration and compilation process all over the web, but there's no track of how to put the kernel on a custom volume (different than the booted distro you're using at the moment of compile). What I'm asking for is like how we can install 2 different distros on 2 different volumes on 1 HDD, now think of my custom kernel as another distro.


awk command for parsing a file

I have a following text file. I am showing you the first 3 lines.               chrom   st  end gene    strand  c1  c2  c3  c4  c5  c6  c7  c8  c9  c10 c11 c12 c13 c14     chr6    3345    3543    geneA   +   36  -23 -1  3   1250    946 416 458 475 417 58  80  2   14     chr9    1302    1389    geneB   -   8   -10 -18 -8  2896    2128    635 955 372 385 -20 31  -7  -7      I want to print out first line as it is since it's the header line. Then for subsequent lines(i.e. from lines 2 and onwards), I want to print the first 5 fields as it is(till the strand info) and after that if the field(from 6th field onwards) has value >= 100 print that value as it is and if the field has value < 100 just replace it with NA. So my output file should look something like this (ideally, tab-delimited)               chrom   st  end gene    strand  c1  c2  c3  c4  c5  c6  c7  c8  c9  c10 c11 c12 c13 c14     chr6    3345    3543    geneA   +   NA  NA  NA  NA  1250    946 416 458 475 417 NA  NA  NA  NA     chr9    1302    1389    geneB   -   NA  NA  NA  NA  2896    2128    635 955 372 385 NA  NA  NA  NA


'find'  across directories named .../dirnameXX/... with XX variable

I am executing this command to find certain files in specific directory:               find ./rgs/test/maesXX/master/stdlist -name \*.extract \          -mtime +30 \! -size 0 -exec ls -lrt {} \;      where XX could be any number between 1-100. Can I use a regex for this purpose? How would I do that? Are there other ways?


Get latest Rekonq developmental source code

I see that I can get the latest stable Rekonq through http://sourceforge.net/projects/rekonq/, but I want to get the latest developmental-version/daily-build. Where can I obtain the developmental source code?


How to find which package provides a file?

For example, I can't install package `qcad` because of error: "can't find qdict.h".   How can I find the package which provides the file `qdict.h` so I can install the package `qcad`?


Volume too quiet at maximum

I recently replaced my broken Sennheiser PC350 to a Beyerdynamic DT770 Pro 80 Ohm headphones and I've encountered a really annoying issue. Everything is too low. I can listen to it, but it's almost as if I'm on 10% of max volume. On Windows this issue isn't present at all, and is almost a little too loud on 100%. Pulseaudio settings are set to 100%, and every slider in the alsamixer are set to 100% too. If I set the volume to 150%, the sound gets too saturated and distorted. My sound chip is the Realtek ALC1150. I'm running Arch. Edit After thinking it was solved, the issue came back but I believe I have more of an understanding of the issue now. Using the line out port, green one, works from time to time, but more often than not, using any of the other ports will output the what you'd expect from line out. In a way, the issue is resolved since if I use any other ports than the line out, the sound is working like it should. I'd rather not though as Windows doesn't output anything at all when not using line out, and there are times where linux too won't output to anything but line out. How come linux gets so confused? It's almost as if it believes the line out port is all of the other ports except for line out.


For downloading, youtube file format changes depending on OS?

Oh! its sad to see what I saw. I am downloading a file from youtube (the video is of 1 hr) using command line from Ubuntu13.04 as below:               ravbholua@ravbholua-Aspire-5315:~$ youtube-dl "http://www.youtube.com/watch?v=d4Z8VI3myBw"     [youtube] Setting language     [youtube] d4Z8VI3myBw: Downloading video webpage     [youtube] d4Z8VI3myBw: Downloading video info webpage     [youtube] d4Z8VI3myBw: Extracting video information     [download] Destination: d4Z8VI3myBw.mp4     [download]   0.1% of 718.62M at   13.70k/s ETA --:--      See the size is 718 MB and type is mp4. The same file I downloaded earlier from Windows 7 OS using youtube downloader. Then the type and size of the file was flv and 130 MB only. Similarly, yesterday and today I downloaded files from youtube via my Ubuntu13.04 and all were downloaded as mp4 and very very big size. But when I downloaded many videos via Windows earlier all the files had flv type and very less size as compared to mp4. I can't download youtube videos if they are downloaded like this (mp4 with big sizes). One thing is clear: the difference lies with the OS and/or the youtube downloader for Windows7. What setting needs to be changed please here in Ubuntu13.04?


Restoring the old 'lenny' Debian desktop

In _lenny_ , the Debian desktop's default image was the red Debian logo, and it looked like this: ![enter image description here](http://i.stack.imgur.com/893gv.jpg) However, in _squeeze_ , the desktop has been replaced by this: ![enter image description here](http://i.stack.imgur.com/jsOU4.png) How can one restory the _lenny_ look-and-feel; at least the background image? Are those graphics still bundled with _squeeze_ , and if not, how do I get at them?


doing OpenLDAP config changes in RHEL 6

I've been configuring OpenLDAP on RHEL 6 and its seems you have run the following to rebuild the config dirs. I'm ok with that, but my issues is, say I want to change the server passwd, do I have to go through the whole process every time I change the config? Is there a way of changing the slapd config after its been built using the RHEL6 method? Below is the advice I've found on the net here. > This example assumes that the file to convert from the old slapd > configuration is located at /etc/openldap/slapd.conf and the new directory > for OpenLDAP configuration is located at /etc/openldap/slapd.d/. Remove the > contents of the new /etc/openldap/slapd.d/ directory: > > `rm -rf /etc/openldap/slapd.d/*` > > Run slaptest to check the validity of the configuration file and specify the > new configuration directory: slaptest -f /etc/openldap/slapd.conf -F > /etc/openldap/slapd.d > > Configure permissions on the new directory: chown -R ldap:ldap > /etc/openldap/slapd.d > > `chmod -R 000 /etc/openldap/slapd.d` > > `chmod -R u+rwX /etc/openldap/slapd.d` To clarify: I'm after help on how to edit the slapd configuration using the newer versions of openldap where the config is held in a schema rather than the original `slapd.conf`.


Why can I append to a file but not overwrite it?

If I do this:               iptables -nvL > output.txt      `output.txt` ends up empty. If I do:               iptables -nvL >> output.txt      It works fine. Appending is working, but overwriting is not. Why?


Entered wrong installation path in Ubuntu

I was trying to install Huwaie 3G modem on Ubuntu. The install.txt said: >   1. Run `./install` in TERMINAL to install MobilePartner eg: # bash > //install > >   2. If you had installed this software in your system before, you will get > a prompt: "The software is exist, do you want overwrites? ([Y]/[N])", enter > "y" to overwrites or "n" to exit. > >   3. If you do not had installed this software in your system before, you > will get a prompt: "Please input the install > path[/usr/local/Mobile_Partner]:". Then you can input install > path(fullpath), or you may using the default path(/usr/local/Mobile_Partner) > by press ENTER direct > >   4. Finish installing > > > > --How to run-------------------------- > >   * From shortcut in desktop >   * Run MobilePartner in your install path eg: # `/<install > path>/MobilePartner` > But accidentally I gave it   1. Run `./install` in TERMINAL to install MobilePartner eg: # bash //install   2. If you had installed this software in your system before, you will get a prompt: "The software is exist, do you want overwrites? ([Y]/[N])", enter "y" to overwrites or "n" to exit.   3. If you do not had installed this software in your system before, you will get a prompt: "Please input the install path[/usr/local/Mobile_Partner]:". Then you can input install path(fullpath), or you may using the default path(/usr/local/Mobile_Partner) by press ENTER direct The path `/usr.local.bsnl3g`. Now the software is not getting installed. I was trying to make fresh install (by `./install`) but it prompted me to rewrite in the same {wrong} path where I have installed already. How to proceed to make it work.


netcat to capture ethernet

How can I make sure the result of the following command:               nc eth0 &> capture.txt      would capture the data + errors transmitted via eth0?


Solaris 10, pkgtrans command

What is the difference between these two commands? `1\. pkgtrans /cdrom/cdrom0/Solaris_10/Product /var/spool/pkg/stream.pkg all` `2\. pkgtrans -s /cdrom/cdrom0/Solaris_10/Product /var/spool/pkg/stream.pkg all` The two commands make the same action. **The second question is:** If I have file stream format package in `/export/home/memam/` which called `SUNWipc.pkg` and I want to translate it to file system format, does this command `pkgtrans /export/home/memam/SUNWipc.pkg /var/spool/pkg` translate make this operation


Command/scripts to check the Reverse DNS Lookup time

I am working on a project in which one master communicates with numbers of slaves. For that it has to make connection with hosts in network. But sometimes it hangs. I think that the reason behind is extra time consumption during **Reverse DNS Lookup**. So please tell me any command or script which checks or makes the list for the **Reverse DNS Lookup** time. **EDIT no. 1** Tell also that where can I add that command in rsh source code so that I got a list of time consumed by every request, whenever it connects to other hosts. So that I can find the reason behind the hanging of server.


Can not mount NFS from server on local network

I set up my NFS server without doing any bigger changes in configuration files. After that I added these entries to `/etc/exports`(both paths are valid) on server(192.168.1.11):               /export         192.168.1.0/192.168.255.255(rw,fsid=0,insecure,no_subtree_check,async)     /export/users   192.168.1.0/192.168.255.255(rw,nohide,insecure,no_subtree_check,async)      Then I restarted the computer and I tried to get exports list:               $ showmount -e 192.168.1.11     /export        192.168.1.0/192.168.255.255     /export/users  192.168.1.0/192.168.255.255      According to this output there's not problem with connection. Now I want to mount `/export` to client filesystem(192.168.1.12):               sudo mount -t nfs4 192.168.1.11:/export /mnt      After typing this there's no output and I can't do anything. Another terminal line start is not being displayed. Command is stuck. Does anybody know am I doing wrong? Please help me.


Clear Xfce4 session

How to reset Xfce session? When I start Xfce4, it always opens 2 windows of Evince, Emacs and one terminal emulator. I remember I used this configuration once a week ago, but now it starts every time after logging in. How can I make Xfce4 start cleanly with no applications?


Tips for putting ~ under source control

I want to put my home directory (~) under source control (git, in this case), as I have many setting files (.gitconfig, .gitignore, .emacs, etc.) in there I would like to carry across machines, and having them in git would make it nice for retrieving them. My main machine is my MacBook, and the way that OS X is set up, there are many folders i want to ignore (Documents, Downloads, .ssh). There are also folders which are already using git (.emacs.d). My thought was to just add all these directories to my .gitignore file, but that seems kind of tiresome, and could potentially lead to some unforeseen consequences. My next thought was to periodically copy the files I want to store into some folder in home, then commit that folder. The problem with that will be that I have to remember to move them before committing. Is there a clean way to do this?


> **Possible Duplicate:**   >  Why does this compound command report errors when copying directories? if one executes the following two commands in one line, as follows, > rm -rf dir ; cp -r dir2 dir it may complain that cp can not create directory `dir/subdir`: File exists but if these two commands are executed in two lines, no errors will be thrown. I am just wandering what is the difference? and more importantly, how to execute two commands in one line, with the effect exactly the same as by two lines... PS: what is in `dir` or `dir2` is hugh, typically 4gb


Reload ~/.profile for desktop

> **Possible Duplicate:**   >  how do i tell gnome to reread my ~/.profile   >  How to change environment variables without re-logging to UI? I'm trying to reload my ~/.profile without login out. I can use `source` to reload it in bash for example, but I haven't found out how to reload it for the whole desktop. When I launch applications from menus, they aren't aware of the changes in ~/.profile. Those changes are exclusively `export` commands. How can I reload it for the whole desktop?


how do i tell gnome to reread my ~/.profile

Gnome reads `~/.profile` upon login. When I change something in `.profile` (for example `LC_MESSAGES`) I want gnome to reread the `.profile` file without logging out and back in. In bash I can tell bash to source `.profile`. How can I do that for the running gnome session?


What makes a distribution GNU and are there Linux distributions, that are not GNU?

So GNU/Linux is an operation system, consisting of several programs at a minimum: Linux kenel, gcc, gnu-binutils, Gnome desktop, etc.   * _What makes a Linux distribution GNU? Is it the tools, with which the kernel was compiled? Is it the tools, with which the distribution is shipped?_   * _Do there exist fully functional, desktop operating systems, that are Linux based but not GNU?_


How to make processes not die after its parent dies?

I've been messing with forkbombs and noticed that if I just fork() processes repeatedly, killing the initial process will bring down the whole tree. This is not the case for forkbombs written in BASH using its backgrounding operator &, so I know there's a way around this. How do I achieve the same result in C? I've been using forkbomb examples from Wikipedia: http://en.wikipedia.org/wiki/Fork_bomb#Example_fork_bombs


Optimal Setup for Windows & Linux - Sharing and Partitioning

This question gets a little complicated so please bear with me. So we have a new custom designed desktop which we will be mostly a dedicated machine for scientific computations in FORTRAN and MATLAB. The IT initially installed Windows 7 on it and gave it to us. Our preferred OS is Ubuntu. The second choice is Fedora but we won't go there unless we absolutely have to and if someone here can give us good arguments that Fedora makes things mentioned below easier than Ubuntu. If we were to just reformat the entire drive and install Ubuntu, things are easy but my adviser makes a good case that we should keep Windows too in addition to ubuntu.   1. First question, are there any good replacements for microsoft office in a linux environment? I know about open office of course and have even used it but if I receive a complicated .doc form or something and open it in open office, boxes/tables/text/spaces/margins are messed up and misaligned. Same happens in power point. In addition, if I prepare documents in open office (document or a presentation) it is messed up when opened in microsoft office. So what is the "best" replacement for office for linux? If this question has no good answer, then we have to keep windows.   Keeping windows, I was just going to repartition the hard drive, give windows a tiny bit of space and have ubuntu on the rest. But then there is the problem of sharing files between the two. So then I thought about having a tiny partition for windows, a decent chunk for ubuntu, and the largest one for documents.   2. What is a good file system for my documents partition which will be stable in the long run and both windows and ubuntu can read and write to easily? Note some files will be quite large like giant text files containing the output from a long simulation. Should I use NTFS or ext3 or what? Windows can't use ext3, right? But how good is ubuntu with NTFS? There won't be any read/write/checksum errors/issues? And what about FAT32? Any better alternatives I don't know about?   3. Any recommendations for a good free partitioning/formatting utility? I won't be able to format the entire drive. Windows is already on it and we want to keep it without removing it and reinstalling it. So I'll just shrink windows partition, repartition the rest into two more, then format the other two appropriately. There is only one physical drive involved in all this.   4. Now is the complicated part, given two partitions on the same physical hard drive, one with windows and one with ubuntu, is there any way for me to have some sort of a virtual machine which can mount another physical partition on the same physical HD? For example, if I am logged onto ubuntu and I have some figures I need to add into and modify a powerpoint, I want to be able to start a VM in ubuntu, mount my (physical) windows partition and use powerpoint. Is there anything for ubuntu that can do this like VMWare or something? Preferably free? What about the other way if I want to use ubuntu quickly while logged into windows?   5. Given question 3, will there be any licensing issues when mounting windows on a VM from a physical partition? We only have a single license and I imagine the MAC address will change when mounting windows to a virtual drive so will windows ask us to put in the license info again or something? I know too many questions but they are all related. Just trying to plan carefully to build this machine in the least complicated way that can do everything we need and make sure it lasts a long time. I put this all here together so that the bigger picture can be seen by all and perhaps a better suggestion/strategy will be offered. FYI, I am a fairly advanced computer user, as you can tell, not afraid to partition/reformat drives but I am rather inexperienced with linux so don't be afraid to go into detail if necessary.


What is a remote config server?

I found myself enabling one of my computer on LAN to connect to a server through port 1236. A check on the list of services show:               bvcontrol 1236/tcp rmtcfg # Daniel J. Walsh, Gracilis Packeten remote config server     bvcontrol 1236/udp # Daniel J. Walsh      I really can't recall why I open up this particular port. Would appreciate if someone can explain what is a `bvcontrol` and what a remote config server does? So that I can figure out whether to keep this port open or close.


Guided tour at the console?

I think it would really enjoy a guided tour of either just the typical Linux filesystem (which I realize varies from system to system), or a guided tour of the filesystem and common console productivity patterns and everything else! Imagine you're a newbie to gnu Linux and you're sitting at a console and you type               guided-tour      Then just like the interactive REPL-aided programming tutorials that are showing up on more and more home pages for new languages and frameworks, you would be guided through the filesystem, what goes where, and common console tasks. For example the following fictional session snippet:               #Please cd to /tmp     $ cd /tmp     #This is a place to store stuff that is just for currently running programs, using the handy filesystem. Now try creating a file here.      $ nano myfile     ....etc...      Does anything remotely similar to this already exist, and do you see the appeal?


local yum repository with grouplist not working

I am trying to create a local yum repository with group list for RHEL 6. Packages from DVD are dumped at the following location `/var/www/html/rhelisos/` To create the repo, I used the following commands.               1.  createrepo -g /var/www/html/rhelisos/repodata/8afad1febf2d8844a235a9ab1aa5f15c9cec1219b9d01060d4794435cf59dffe-comps-rhel6-Server.xml /var/www/html/rhelisos/Packages     2. yum clean all     3. yum makecache      Updated config file at /etc/yum.repos.d/ to point to the yum repository . But `yum grouplist` is still failing with the error `Error: No group data available for configured repositories` `yum install` commands are working fine               # yum install httpd     Loaded plugins: product-id, security, subscription-manager     Updating certificate-based repositories.     rhel-source-beta                                                      2804/2804     Setting up Install Process     Resolving Dependencies      --> Running transaction check      ---> Package httpd.i686 0:2.2.15-15.el6 will be installed      --> Processing Dependency: libpcre.so.0 for package: httpd-2.2.15-15.el6.i686      --> Processing Dependency: libldap-2.4.so.2 for package: httpd- 2.2.15-15.el6.i686      --> Finished Dependency Resolution           Dependencies Resolved            ================================================================================       Package        Arch       Version                 Repository              Size       ================================================================================       Installing:       httpd          i686       2.2.15-15.el6           rhel-source-beta       817 k       Installing for dependencies:       apr            i686       1.3.9-3.el6_1.2         rhel-source-beta       129 k       apr-util       i686       1.3.9-3.el6_0.1         rhel-source-beta        89 k       openldap       i686       2.4.23-20.el6           rhel-source-beta       261 k       pcre           i686       7.8-3.1.el6             rhel-source-beta       195 k            Transaction Summary       ================================================================================       Install       5 Package(s)            Total download size: 1.5 M       Installed size: 4.5 M        Is this ok [y/N]:      What I am missing in the configuration steps for making `yum grouplist` to work ? Or it is problem with the `*Comps*.xml` file ? Please suggest.


What is the proper way to shrink a LVM partition?

I want to shrink a Linux LVM partition from 200GB to 150GB. A test is carried out with the following steps:   * Shrink a file system in a logical volume with `reszie2fs`   * Shrink the logical volume with `lvreduce`   * Delete the 200GB LVM partition with `fdisk`   * Recreate the same LVM partition, but with size a reduced of 150GB I am able to access a test file using the above method. But, `vgdisplay` and `vgs` both reported the old size of 200GB. I think I might have missed out a `vgreduce` step after shrinking the logical volume. But, from the man page, it seems to say that `vgreduce` can only be performed on an empty physical volume. In my situation above, the whole volume group resides in one physical volume. What is the correct way to shrink this LVM partition?


Email Configuration in Cent OS

I have hosted my web application in VPS Cent OS. Its working well, in that application if a vendor registered or any events occurs between users and website, admin needs to send emails regarding the event, password, order details, etc. I need to configure the settings to do that. I am a database administrator, this is new to me. FYI:   1. Email hosted in another third party server (Business mail).   2. I am accessing the server using putty. I have doubt that, if I redirected the domain name from email server (business mail), if it will work, whether the Cent OS **Sendmail** or **Postfix** will work similar to using my business mail? I just need to send mails from the application using my business id (sales@example.com). For remaining emails (contact/info/support) I need to access the same server as I am using now.


Help required for LAMP Stack fail-over Configuration

I am using cloud servers of digital ocean for last some months. Recently One of my cloud servers disappeared from panel with backups @ ubiquity, the server co guys put it back after 1 day. However my websites were down during those time. So I want to setup a fail over LAMP stack with one machine at digital ocean and one at ubiquity Servers. I do not want to use any third load balancer. Is there any way to achieve my goal? If yes how to do that please elaborate!


How to add additional control key?

I am using xkb to add an additional control key as follows:                  key <HENK> { [  Control_R                 ] };      However, it does not work. I even tried xmodmap without success:               xmodmap -e "keysym Henkan_Mode = Control_R"      I had no problems adding additional shift key using similar codes as above. So I don't understand why the same code does not work with the control key.


Getting error in modified GNOME extension code

Recently I am getting started with GNOME extensions development. By executing `gnome-shell-extension-tool --create-extension` in terminal I have created hello world extension but when I change the code to build a pop-up like extension I am getting this error ![enter image description here](http://i.stack.imgur.com/pFnce.png) The JS code I am using is               const St = imports.gi.St;     const Mainloop = imports.mainloop;     const Main = imports.ui.main;     const Shell = imports.gi.Shell;     const Lang = imports.lang;     const PopupMenu = imports.ui.popupMenu;     const PanelMenu = imports.ui.panelMenu;     const Gettext = imports.gettext;     const MessageTray = imports.ui.messageTray;          const _ = Gettext.gettext;          function _myButton() {         this._init();     }          _myButton.prototype = {         __proto__: PanelMenu.Button.prototype,              _init: function() {             PanelMenu.Button.prototype._init.call(this, 0.0);             this._label = new St.Label({ style_class: 'panel-label', text: _("HelloWorld Button") });             this.actor.set_child(this._label);             Main.panel._centerBox.add(this.actor, { y_fill: true });                  this._myMenu = new PopupMenu.PopupMenuItem(_('HelloWorld MenuItem'));             this.menu.addMenuItem(this._myMenu);             this._myMenu.connect('activate', Lang.bind(this, _showHello));         },              _onDestroy: function() {}     };          function _showHello() {              let text = new St.Label({ style_class: 'helloworld-label', text: _("Hello, world!") });         let monitor = global.get_primary_monitor();              global.stage.add_actor(text);         text.set_position(Math.floor (monitor.width / 2 - text.width / 2),                           Math.floor(monitor.height / 2 - text.height / 2));              Mainloop.timeout_add(3000, function () { text.destroy(); });     }               function main(extensionMeta) {              let userExtensionLocalePath = extensionMeta.path + '/locale';         Gettext.bindtextdomain("helloworld", userExtensionLocalePath);         Gettext.textdomain("helloworld");              let _myPanelButton = new _myButton();     }      Can anyone tell me why I am getting this error. I am using Fedora 20 with GNOME Shell 3.10.2.1


None of the linux programs work except 'cd'

Before stating the question, here's what I did and observed before the problem started:   1. On a fedora 18 Xfce, I tried compiling 3.6.10 kernel with a cdv driver,   2. After many attempts, it finally compiled without error, so I went ahead with `make modules_install`, and `make install`.   3. Then I had to install couple of binaries from a few tarballs. Everything seemed fine till this moment. I could use `firefox`, `vi` in terminal, `yum`, `rpm` etc. commands.   4. I installed binaries from few tarballs using `tar xvf` and a few files from these tarballs were moved to directories like `/usr`, `/usr/lib`. Even after this point, I remember using `vi` and `rpm`.   5. Then finally I installed the last tarball using same `tar xvf` and it transferred few files to `/lib`, `/lib/firmware` etc.  After the 5th step above, without doing anything else, I just tried opening one file using `vi` command and got following error:               bash: /usr/bin/vi /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory      I tried opening Firefox for solution, but it did not open. Fired few more commands from terminal but all the commands gave similar error. I checked few solutions that suggest installing glibc but neither `yum` works nor `rpm`. What might have gone wrong? How can it be fixed now when no command except `cd` is working, not even `ls`? Meanwhile the only other hiccup that happened was that I had for kill Firefox somewhere in between since the machine wasn't responding very well and some plugin in it was eating up resources.


Hardening debian?

So I have thought a bit about hardening a Debian squeeze file & VPN server lately.   Right now, we've placed the machine behind a firewall only allowing SSH connections from LAN, set a strong `root` password and installed `unattended- upgrades` to keep us fresh on those security fixes. What more should we do?


Where do I place commands to automatically be exported for all users?

I have an embedded platform running an Arago linux distribution. Right now the only "user" is `root` but there will eventually be others, but I don't know how many or what user IDs they will have. Every user of this system must have a particular environment variable exported in order for the GUI to work correctly. I found that if I created and then added the export command to `/home/root/.profile` it is set correctly for `root`. Where should I place the command such that it is exported for every (current and future) user of the system? Note: On my system, at start up there were no files present in `/home/root`, I added `.bash_profile` but that didn't work, then I added `.profile` and that did work. I thought I might have a dash shell because of that, but when I check `/bin/sh` it points to `bash`... so I tagged both.


Understanding smartctl output for a CF card

I'm testing SMART support on some Compact Flash cards. After running `smartctl -A` on my card I'm getting the output below (also available here: http://pastebin.com/BX8GcLCX). The `UPDATED` column says offline, does anyone know exactly what that means? UPDATE - it means the data is only collected offline. Also all the values seem to be at their defaults of 100 (except powercycle count). Does anyone know how to get the card to report it's values? The card I'm testing is an ATP AF1GCFI. Additionally if I try and run an offline test with "smartctl --test=short /dev/sda" I get back "Warning: device does not support Self-Test functions." Given the fact that the parameters can only be reported offline, does this mean I can't get any SMART data at all?               === START OF READ SMART DATA SECTION ===     SMART Attributes Data Structure revision number: 1      Vendor Specific SMART Attributes with Thresholds:      ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE          1 Raw_Read_Error_Rate     0x0000   100   100   000    Old_age   Offline      -       0          2 Throughput_Performance  0x0000   100   100   000    Old_age   Offline      -       0          5 Reallocated_Sector_Ct   0x0000   100   100   000    Old_age   Offline      -       0          7 Seek_Error_Rate         0x0000   100   100   000    Old_age   Offline      -       0          8 Seek_Time_Performance   0x0000   100   100   000    Old_age   Offline      -       0        12 Power_Cycle_Count       0x0000   100   100   000    Old_age   Offline      -       358      195 Hardware_ECC_Recovered  0x0000   100   100   000    Old_age   Offline      -       0      196 Reallocated_Event_Count 0x0000   100   100   000    Old_age   Offline      -       0      197 Current_Pending_Sector  0x0000   100   100   000    Old_age   Offline      -       0      198 Offline_Uncorrectable   0x0000   100   100   000    Old_age   Offline      -       0      199 UDMA_CRC_Error_Count    0x0000   100   100   000    Old_age   Offline      -       0      200 Multi_Zone_Error_Rate   0x0000   100   100   000    Old_age   Offline      -       0


Linux distro that supports touchpads and acpi on Macbook Pros

I've had a Macbook pro for 1 year running OSX, but I really miss Linux. I read plenty of docs but I never got a useful answer to the following questions:   1. How's the autonomy with Ubuntu/Arch/Fedora/Suse or other distributions?   2. How does the touchpad work? I really love the 2 & 3 fingers touchpad gestures in OSX.   3. Is it possible to utilize the same `acpi` control in Linux, as in MacOSX? I never reboot my mac just close the lid and it gets sleepy. Do you guys use a Linux distribution on your Macbook pro? I have the 7.1 model. Do you have major issues with these features?


How to run rtl8192cu driver in linux with kernel 3.8?

I have a trouble with usb WiFi dongle TPLink WN725N (rtl8192cu driver). Dongle it start, but cannot connect. Driver in official Realtek site support only 2.6.18~2.6.38 and 3.0.8 kernels. Is there a way to run it on kernel 3.8? (sorry for my english) dmesg show this error:               IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready


Suggestions to debug missing kernel messages from systemd journal

I have recently been playing around with a new freescale i.mx6 system. I have installed archlinuxarm on it. Strangely, all kernel messages are missing from the journal.               $ sudo journalctl -k     -- Logs begin at Thu 1970-01-01 10:00:07 EST, end at Thu 2014-02-13 09:25:43 EST      This is very odd. "dmesg" has a huge amount of output. systemd-journal has opened /dev/kmsg               $ sudo lsof /dev/kmsg     COMMAND    PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME     systemd      1 root    3w   CHR   1,11      0t0   62 /dev/kmsg     systemd-j 1431 root    6w   CHR   1,11      0t0   62 /dev/kmsg     systemd-j 1431 root    8u   CHR   1,11      0t0   62 /dev/kmsg      Somehow no kernel messages are ending up in the journal. Messages from other processes are all being received fine. What should I look in an attempt to solve this?


Shell script output incorrectly splitting while being passed as an argument to script

Let's say I have the following two shell scripts:               #!/bin/sh     #This script is named: args.sh          echo 1 "\"Two words\"" 3      , and:               #!/bin/sh     #This script is named: test.sh          echo "Argument 1: "$1     echo "Argument 2: "$2     echo "Argument 3: "$3      When I call the scripts as:               sh test.sh $(sh args.sh)      , I recieve:               Argument 1: 1     Argument 2: "Two     Argument 3: words"      When I expected instead to get:               Argument 1: 1     Argument 2: Two words     Argument 3: 3      Copying the output of `sh args.sh` and pasting it as the input of `sh test.sh` works just fine; so I assume this isn't actually what the shell is doing. I can achieve the desired/expected output by calling `sh args.sh | xargs sh test.sh` instead. However, I'm wondering if there's an equivalent way of doing this without piping the output of the first script (args.sh) to xargs? I want the scripts to be called in the original order; the argument script to output the parameters to the second. I'm also looking for an explanation as to why this call doesn't work as expected?


How to get past "Loading Initial Ramdisk" hang after going from x86_64 to i686 cpu

Long story short, I have a Ubuntu 12.04 64-Bit Server setup as a virtual machine with VirtualBox (4.1.18). I migrated the guest machine from an AMD chipset (a gaming machine) to an Intel Xeon (server hardware with dual processor support) thinking that there wouldn't be any issues. Once I got the guest machine setup on the server, I started the guest machine only to find that it hangs at "Loading Initial Ramdisk". I mounted the Ubuntu 12.04 64-Bit setup ISO to see if I could get in to see any logs, but get "Kernel requires x86-64 CPU, but only detects i686 CPU" when trying to boot off the ISO. Keep in mind that host OS on both source and destination machines are also Ubuntu 12.04 Server 64-Bit. This lead me to look into how the guest OS sees the CPU information within the virtual machine. I found that the CPU information looks exactly the same on the host as it does on the guest on the source machine. Source CPU Info:               Processor - AMD Phenom™ II X4     Model - 925     OPN Tray - HDX925WFK4DGI     OPN PIB - HDX925WFGIBOX     Operating Mode 32 Bit - Yes     Operating Mode 64 Bit - Yes     Revision - C2     Base Speed (MHz) - 2800     Boost Speed (MHz)     Voltages - 0.850-1.425V      Wattage - 95 W     AMD Virtualization Technology - Yes     L1 Cache Size (KB) - 128     L1 Cache Count - 4     L2 Cache Size (KB) - 512     L2 Cache Count - 4     L3 Cache Size (KB) - 6144     CMOS - 45nm SOI     Socket - AM3     AMD Business Class - No     Black Edition - No      Destination CPU Info:               3 Ghz Xeon - SL7ZF     Number of Cores - 1     Clock Speed - 3 GHz     L2 Cache - 2 MB     FSB Speed - 800 MHz     FSB Parity - Yes      Instruction Set - 64-bit     Embedded Options Available - No     Lithography - 90 nm     Max TDP - 110 W     VID Voltage Range - 1.2875V-1.3875V     Physical Address Extensions - 32-bit     ECC Memory Supported - No     Processing Die Size - 135 mm2     Number of Processing Die Transistors - 169 million     Sockets Supported - PPGA604     Intel® Hyper-Threading Technology - No     Intel® Virtualization Technology (VT-x) - No     Intel® Trusted Execution Technology - No     Intel® 64 - Yes      Idle States - Yes       I found a similar question, but wasn't sure if this is applies to my situation. The destination cpu show to support 64-Bit instructions. On the other hand, I've also read that Intel's 64-Bit is not _true_ 64-Bit. **Am I stuck rebuilding my guest VM from scratch?**


Terminating a bash shell script running in the background

I often use `bash` shell scripts to run simple commands for many different files. For example, suppose that I have the following `bash` shell script, called `script.sh`, that runs the program/command `foo` on three text files `"a.txt"`, `"b.txt"`, `"c.txt"`:               #!/bin/bash          for strname in "a" "b" "c"     do     foo $strname".txt"     done      Also, suppose that `foo $strname".txt"` is slow, so the execution of the script will take a long time (hours or days, for example). Because of this, I would like to use `nohup` so that the execution continues even if the terminal is closed or disconnected. I would also like the script to immediately go to the background, so I will use the `&` operator. Thus I will use the following command to call `script.sh`:               nohup bash script.sh &      This works fine for running the script in the background and without hangup, but now suppose that I would like to terminate the execution at some point for some reason. How can I do this? The problem that I have encountered is that, by looking at `top`, I see only the `foo` corresponding to `"a.txt"`. I can terminate that `foo` call, but then the `foo` corresponding to `"b.txt"` gets called and then I have to terminate that one as well, and so on. For tens or hundreds of text files specified in the `for` loop, it becomes a pain to terminate every `foo`, one by one! So somehow I need to instead terminate the shell script _itself_ , not the _particular_ calls issued from the shell script. When I type the command               ps -u myusername      where `myusername` is my username, I get a list of processes that I'm running. But I see two different process IDs called `bash`. How do I know which of these processes, if any, corresponds to my original call `nohup bash script.sh &`?


Creating a variable to a directory that persists until deletion

I'm currently using bash on Ubuntu, and I work a lot with a directory saved at /home/me/path/to/project_dir. It is a nuisance to change to the directory every time I open bash. So I'd like to save the path to a variable, say `projdir`, so that I can just do `cd projdir`. If my working directory changes, I should be able to change the path by overwriting the variable. I want to be able to update the variable easily, preferably with one command, without messing with .bashrc. One important thing is that this variable should persist even if I restart bash. How do I do this? I'd still like to see my home directory when I start up bash, so changing the default starting directory to project_dir is not an option.


Openbox placing cursor on the window titlebar

I was able to use one really neat thing. In many DE or WM, when you **Maximize** the window and then try drag the window from the **Titlebar** , the window would be **Unmaximized**. I achieved this by the following config:               <context name="Titlebar">      <mousebind button="Left" action="Drag">       <action name="Unmaximize"/>       <action name="Move"/>      </mousebind>     </context>      The **Move** action is necessary to keep to be still moving window. BUT there is one thing...I hope you can help me.. This way, when window becomes, **Unmaximized**. The cursor will still be on top of the screen. How to move the cursor to still be on a **Titlebar**?


Android Emulator on Arch Linux

I would like to run Android Emulator on Arch Linux. Is there any way to run Android Emulator on Arch Linux?


How you stop 'wget' after it gets a 404?

If you use brace expansion with `wget`, you can fetch sequentially-numbered images with ease:               $ wget 'http://www.iqandreas.com/sample-images/100-100-color/'{90..110}'.jpg'      It fetches the first 10 files numbered `90.jpg` to `99.jpg` just fine, but `100.jpg` and onward return a _404: File not found_ error (I only have 100 images stored on the server). These non-existent files become more of "a problem" if you use a larger range, such as `{00..200}`, with 100 non-existent files, it increases the script's execution time, and might even become a slight burden (or at least annoyance) on the server. Is there any way for `wget` to stop after it has received its first 404 error? (or even better, two in a row, in case there was a missing file in the range for another reason) The answer does not need to use brace expansion; loops are fine too.


Why do *nix filesystems support file names with newlines?

According to this page: > File names in Linux can contain any characters other than (1) a forward > slash ( / ), which is reserved for use as the name of the root directory > (i.e., the directory that contains all other directories and files) and as a > directory separator, and (2) the null character (which is used to terminate > segments of text). Spaces are permitted, although they are best avoided > because they can be incompatible with legacy software in some cases. Great, both restrictions make a lot of sense. Since it is clearly possible to forbid the inclusion of certain characters in file names, why were newlines allowed? As far as I can tell their only use is to complicate our scripts. Is there ever a valid reason to have a new line in a file name?


How do I show all files in a directory except those that have a certain extension AND display them in multiple columns?

Since I write in Python a lot it's kind of annoying to see .pyc files all the time and I would like to just hide them at this point. I tried the following, but I can't seem to figure out how to get it to print in multiple columns.               ceasarbautista@hse140:~/Desktop/Statistics/statistics/probability$ ls     __init__.py     calculus.py     conditional.py      counting.pyc        distributions.pyc   event.pyc       objects.pyc     __init__.pyc        calculus.pyc        counting.py     distributions.py    event.py        objects.py      plots.py     ceasarbautista@hse140:~/Desktop/Statistics/statistics/probability$ ls | grep -v .pyc     __init__.py     calculus.py     conditional.py     counting.py     distributions.py     event.py     objects.py     plots.py     ceasarbautista@hse140:~/Desktop/Statistics/statistics/probability$ ls -C | grep -v .pyc     conditional.py      event.py


Manipulating X key and pointer grabs on the command line

What command line tools exist to list and manage X server grabs? (That's grab as in key and pointer grabs, i.e. restricting the use of a particular key or mouse button to a particular application, or constricting the mouse pointer to remain in a particular screen area.) I'm looking for a hypothetical `xgrab` utility that would show things like               Key     0x00f00ba5  0x123   0     Button  0x00f00ba5  2            Pointer 0x00abcdef        meaning that there has been a call to `XGrabKey(display, 0x123, 0, 0x00f00ba5, ...)` and so on with `XGrabButton`, `XGrabPointer`, `XGrabKeyboard`, `XGrabServer` (if possible). The display format doesn't matter, what I want is some way to see who's grabbing what, and possibly some way of revoking these grabs (if it's possible, I'm not sure if the X11 API allows that).


What is GNU Info for?

I understand what GNU Info is and how to use it, but what is it _for_? Why does it exist in parallel to the man pages? Why not write detailed man pages rather than provide a separate utility?


Installing a platform driver

I have recently acquired a device driver for an integrated watchdog timer on a x86 board on which I am running a minimal Linux system. The kernel is 3.6.11 and it has been built using `buildroot`. My installation does not run `udev` so I am required to manually perform an `insmod` and `mknod` for any drivers that I require. I have managed to do this for a CAN driver, but for this watchdog driver, I am able to cross-compile the source code for the target and I am successfully able to `insmod` the resulting .ko file. After this there are no errors generated and a call to `lsmod` reports that the module is loaded. The problem I am having is that I need to created a device node in `/dev` for this driver and I am not sure how to proceed. I do not know how to obtain device major and minor numbers like I can for char devices. The source of this driver suggests it is a platform device driver but I am not sure what that even means. I have only heard of character and block devices and so – is the notion of major and minor numbers relevant to platform devices? If so, how can I obtain this information? There is no entry within `/proc` for this device driver name and I am unsure how to proceed.


Why not use pathless shebangs?

Is it possible to have a shebang that, instead of specifying a path to an interpreter, it has the name of the interpreter, and lets the shell find it through $PATH? If not, is there a reason why?


Can applications like VirtualBox run at startup without any users logging in ubuntu?

This question comes to mind because we are tinkering with the idea of going VM with some of our servers. KVM is a bit involved, VMWare acts like they want to be a free product, and Microsoft is just out of the question when it comes to virtualization. However, the machine is going to remote location with electrical issues long enough to surpass the capability of our UPS units. In short, **I want to be able to make phone call and tell somebody to push the power button back on and have services running again on the guest machine** without have to talk somebody through logging on (which ivolves giving user name and pw to the machine) and starting the virtual machine. **Is this possible**?


Can't get rEFIt to boot after install (Ubuntu + OSX on macbook pro)

I'm trying to dual boot Ubuntu and OSX on my macbook (`MacBookPro8,2`). As per the usual guide, I downloaded rEFIt (the .dmg) and installed it. Then I rebooted about 12 times and still always just get brought to the OSX login screen. I've never seen any rEFIt menu. Here's the output of rEFIt's partition map:               *** Report for internal hard disk ***          Current GPT partition table:      #      Start LBA      End LBA  Type      1             40       409639  EFI System (FAT)      2         409640    716757759  Unknown      3      716757760    718027295  Mac OS X Boot      4      718027296    976510983  Mac OS X HFS+          Current MBR partition table:      # A    Start LBA      End LBA  Type      1              1    976773167  ee  EFI Protective          MBR contents:      Boot Code: None          Partition at LBA 40:      Boot Code: None (Non-system disk message)      File System: FAT32      Listed in GPT as partition 1, type EFI System (FAT)          Partition at LBA 409640:      Boot Code: None      File System: Unknown      Listed in GPT as partition 2, type Unknown          Partition at LBA 716757760:      Boot Code: None      File System: HFS Extended (HFS+)      Listed in GPT as partition 3, type Mac OS X Boot          Partition at LBA 718027296:      Boot Code: None      File System: HFS Extended (HFS+)      Listed in GPT as partition 4, type Mac OS X HFS+


Run in root shell from within a user bash script

I have a script that , among other things, needs to do some stuff as root, like creating a mount folder. I tried:               echo "Linux user password is needed in order to ..."     sudo -s     # also tried:     # sudo su     ... code that requires root permission     exit     ... code that requires user permission      The problem is that the script stops after the "sudo -s" and continues only after I manually exit the automatically created root shell. **Is there a way to run root shell commands within a user script?** Thanks.


How do I check if a distribution is Fedora-based?

The Python M2Crypto library requires a slightly different installation command if the Linux distribution is Fedora-core based (e.g., Fedora, RHEL, CentOS, Scientific Linux). Is there a way to check if a distribution is Fedora-Core based, so I can write a script to execute the correct install command depending on the distribution?


What is the most portable method of launching a terminal emulator?

Say I need to write a script that will launch a terminal and execute a command and I need that to work on various systems. How can I do that in a safe and portable manner? Is `xterm` always installed? I assume that any *nix with a GUI must have some terminal emulator. How can I get to it? Debian systems have `x-terminal- emulator` but that, apparently, does not even work in Red Hat, let alone non- Linux *nixes.


Choose a terminal emulator from Java

I am writing a platform independent Java console tool and within which will have to execute some commands in separate independent terminal at runtime. However, I need to know which terminal should I be using gnome-terminal or xterm. i.e. the one available on that particular system. Since there are many different linux variants are available. I want to support at least the most obvious ones. Normally in Java `System.getProperty("os.name")` returns `Linux` but it doesn't tell you if its Ubuntu or any other Linux varient. So It is difficult to know which terminal to start at runtime. Whether gnome-terminal or xterm or if there is anything else as well that I don't know. Working sets: In Windows:               cmd /c start java -jar jarTool arguments      In Ubuntu:               gnome-terminal --execute java -jar jarTool arguments      or               xterm -e java -jar jarTool arguments      Also just for additional information,I am using `Runtime.getRuntime().exec(args or commands)` to start terminal from Java program at runtime.


How to recover a shell after a disconnection

Am doing some work on a remote centos 5.6 machine and my network keeps dropping. Is there a way i can recover my hung sessions after i reconnect? EDIT: am doing some updating and installing with yum and am worried this might be a problem is processes keep hanging in the middle of whatever theyre doing


SD card corrupt and stuck at 32MB, any way to fix it?

Using the Linux area since I'm using Linux apps and utilities. My phone crashed (several times) and managed to corrupt my microSD card. It no longer appears to have partitions and shows as 32MB rather than 2GB. That's using testdisk. dd and ddrescue only pulled 30.6MB of null off of it. It isn't a fake, SanDisk branded, purchased from a reputable retailer, and the space has been working perfectly for a year. I expect it's had it, but I didn't see the harm in asking. Even if I forget about the few files I'd like off of it, formatting will probably leave me with a fairly useless 32MB card. If anyone has any method of at least repairing the card, it would be much appreciated.


what is $# used in a script for?

In many scripts in my organisation and even on online tutorials, this is a common `if` clause I come across :               if [ $# -eq "somethng" -o $# -eq "somethng" ]      what does this `$#` condition match--some user input by default?   Can this be used on command line directly too??


Unable to log in. xsession-errors file looks like it could be useful if I understood

I am unable to log in to my account, having recently installed Linux Mint. I had this problem with Ubuntu 13.10, and no amount of re-installations seemed to fix it. However, Mint gives me a _very_ useful window alerting me that my session lasted less than 10 seconds, and displays the contents of my ~/.xsession-errors file, before returning me to the login screen. I have been able to access the terminal to execute commands thus far, and I have verified that my $PATH variable is:               /usr/local/sbin:/usr/local/bin:/usr/sbin:/user/bin:/sbin:/bin:/usr/local/games:/usr/games      The contents of my .xsession-errors is:               /etc/mdm/Xsession: Beginning session setup...     /etc/mdm/Xsession: 1: /etc/profile: id: not found     /etc/mdm/Xsession: 12: [: Illegal number:      /etc/mdm/Xsession: Executing default failed, will try to run x-terminal-emulator     /etc/mdm/Xsession: 205: exec: x-terminal-emulator: not found      EDIT: After being advised to select "Cinnamon" from the login option screen, I tried it and it didn't work. The new .xsession-errors file can be found at: http://pastebin.com/36F4daQU It looks like useful information, but, being new to Linux, I'm not sure what to do with it.


Banshee Won't Update (Linux Mint 12)

Anyone else having problems getting the latest version of Banshee from `apt- get`? I'm adding the Banshee PPA, using `apt-get update`, and then trying `apt-get upgrade` and then to be totally sure, uninstalling and reinstalling Banshee, after purging:               sudo apt-add-repository ppa:banshee-team/ppa     You are about to add the following PPA to your system:     PPA for Banshee Team     This PPA contains the latest stable debs of Banshee for Ubuntu. To install Banshee, you must first enable the PPA on your system:     1. Open Software Sources (System->Administration->Software Sources)     2. Navigate to the "Third Party Sources" tab.     3. Click "Add"     4. Enter the APT line below that corresponds to your Ubuntu version that starts with "deb".     5. Click "Add Source"     6. Click "Close"     7. It will prompt you to reload your software cache. Click "Reload".     8. Now install the package "banshee" from Synaptic, or using the command below:     sudo apt-get install banshee          For those who wish to compile from trunk, add the deb-src line and then run "sudo apt-get build-dep" to install all required dependencies before starting to compile.          Unstable (version which have odd minor version numbers) debs of Banshee can be found here:     https://launchpad.net/~banshee-team/+ar ... e-unstable     More info: https://launchpad.net/~banshee-team/+archive/ppa     Press [ENTER] to continue or ctrl-c to cancel adding it          Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /tmp/tmp.5ixe5tv1GJ --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver hkp://keyserver.ubuntu.com:80/ --recv 9D2C2E0A3C88DD807EC787D74874D3686E80C6B7     gpg: requesting key 6E80C6B7 from hkp server keyserver.ubuntu.com     gpg: key 6E80C6B7: "Launchpad PPA for Banshee Team" not changed     gpg: Total number processed: 1     gpg: unchanged: 1      And then `apt-get update` (sparing you the output there.) And then `apt-get upgrade` yeilds nothing. (At this point I have 2.2.0 installed when I want to get 2.2.1 from the PPA above there... So, I then `apt-get purge banshee`:               Reading package lists... Done     Building dependency tree     Reading state information... Done     The following packages will be REMOVED:     banshee* banshee-extension-soundmenu*     0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.     After this operation, 14.9 MB disk space will be freed.     Do you want to continue [Y/n]?     (Reading database ... 267078 files and directories currently installed.)     Removing banshee-extension-soundmenu ...     Removing banshee ...     Purging configuration files for banshee ...     Processing triggers for shared-mime-info ...     Processing triggers for man-db ...     Processing triggers for desktop-file-utils ...     Processing triggers for gnome-menus ...     Processing triggers for bamfdaemon ...     Rebuilding /usr/share/applications/bamf.index...     Processing triggers for hicolor-icon-theme ...      And then `apt-get install banshee`:               Reading package lists... Done     Building dependency tree     Reading state information... Done     The following extra packages will be installed:     banshee-extension-soundmenu     Suggested packages:     banshee-extension-ubuntuonemusicstore banshee-dbg     The following NEW packages will be installed:     banshee banshee-extension-soundmenu     0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.     Need to get 0 B/4,361 kB of archives.     After this operation, 14.9 MB of additional disk space will be used.     Do you want to continue [Y/n]?     Selecting previously deselected package banshee.     (Reading database ... 266361 files and directories currently installed.)     Unpacking banshee (from .../banshee_2.2.0-2linuxmint1_amd64.deb) ...     Selecting previously deselected package banshee-extension-soundmenu.     Unpacking banshee-extension-soundmenu (from .../banshee-extension-soundmenu_2.2.0-2linuxmint1_amd64.deb) ...     Processing triggers for hicolor-icon-theme ...     Processing triggers for desktop-file-utils ...     Processing triggers for gnome-menus ...     Processing triggers for bamfdaemon ...     Rebuilding /usr/share/applications/bamf.index...     Processing triggers for man-db ...     Processing triggers for shared-mime-info ...     Setting up banshee (2.2.0-2linuxmint1) ...     Setting up banshee-extension-soundmenu (2.2.0-2linuxmint1) ...      Never had this problem before. I even went and checked `/etc/apt/sources.list.d/`:               -rw-r--r-- 1 root root 136 2011-12-17 03:51 banshee-team-ppa-oneiric.list     -rw-r--r-- 1 root root 136 2011-12-17 03:51 banshee-team-ppa-oneiric.list.save     <snip>      And the contents of `banshee-team-ppa-oneiric.list`:               deb http://ppa.launchpad.net/banshee-team/ppa/ubuntu oneiric main     deb-src http://ppa.launchpad.net/banshee-team/ppa/ubuntu oneiric main      And, I did check the Packages folder on the PPA -- about six lines down:               Version: 2.2.1-1ubuntu2~hyper1+oneiric      And oddly, the PPA doesn't show up under the Origin tab in Synaptic? But I've definitely added it...? So, I'm totally stumped... Not sure what's going on here, but any help would be totally appreciated. No matter what I do, it seems to only grab:               2.2.0-2linuxmint1


Change sysctl parameters for all interfaces

How can i change a parameter for all interfaces in systemd ? For example:               sysctl -w "net.ipv4.conf.eth0.rp_filter=0"     sysctl -w "net.ipv4.conf.eth1.rp_filter=0"      How can change it for all interfaces ?


slow Matlab on Ubuntu LTS and ZERO Swap

I was using Matlab2012 under Win7 and my algorithm was consuming a huge amount of memory though it was fast (80 seconds for one iteration). Now I am using Matlab2013 under Ubuntu 12.04 LTS and though the usage of the RAM is very small, but the time is extremely higher than it was on windows (30 minutes for the iteration and not finished untill now). As I said the RAM is showing a usage of 1G out of 8G ...while the swap is showing 0% of 8G. I checked the default value and it is 60, but not used by anyhow!! What might be the problem, and how to speed up Matlab the way it was before?


setting up sendmail on debian?

I have a LAMP localhost server setup for some development and I want to test out if my code is working. Some of the tests involve checking if the correct emails are sent out by the code at the correct time. For this, my code needs to be able to send emails. It does not need to receive emails back. I have LAMP running on Debian. How do I setup setup sending emails on Debian? Apparently it already has something called exim instead of sendmail?


Expansion in zsh prompt

I'm struggling with zsh prompt, trying to convert my bash prompt to zsh hooks. This code should display the current kerberos ticket and update accordingly, but colors don't work, neither does the update:               # initialize advanced prompt     autoload -U promptinit && promptinit     # allow functions in prompt     setopt prompt_subst          #initialize colors     autoload -U colors && colors          # add the add-zsh-hook command     autoload add-zsh-hook          # Configure History     setopt hist_ignore_all_dups     setopt inc_append_history     export HISTIGNORE="history"          source $HOME/.zsh/prompt_krb.zsh          update_krb_env() {     if [ "`which klist 2>/dev/null`" != "" ]; then              # got kerberos support installed         ticket=`klist 2>/dev/null | grep "Principal:" | sed 's/.*Principal:\ //'`;              klist -s         if [ $? -eq 0 ]; then             __KRB_PROMPT="%{$fg_no_bold['green']%}krb id \"$ticket\"";         else             if [ "$ticket" != "" ]; then                 __KRB_PROMPT="%{$fg_no_bold['orange']%}expired krb id \"$ticket\"";             else                 __KRB_PROMPT="%{$fg_no_bold['yellow']%}no krb id";             fi         fi     else         __KRB_PROMPT="%{$fg_no_bold['yellow']%}no krb id";     fi          _KRB_PROMPT="${__KRB_PROMPT}%{$reset_color%}";     }          krb_hook_preexec() {         case "$2" in             kinit*|kdestroy*)                 __EXECUTED_KRB_CMD=1;             ;;         esac     }          krb_hook_postexec() {         if [ -n "$__EXECUTED_KRB_CMD" ]; then             update_krb_env;             unset __EXECUTED_KRB_CMD;         fi     }          add-zsh-hook preexec krb_hook_preexec     add-zsh-hook precmd krb_hook_postexec     update_krb_env;          get_krb() {         echo -n $__KRB_PROMPT;     }          PROMPT="$(get_krb) >"      I have been looking into multiple tutorials, trying to build upon the code, but I seem to be missing something.


Iptables GEOIP not working under Debian Squeeze

I've just installed xtables-*, compiled the geoip database, but when I try to use an iptables command it always gives back the following error: Command: `iptables -I INPUT -p tcp --dport 80 -m geoip --src-cc 'DE' -j DROP` Error: `Could not open /usr/share/xt_geoip/LE/DE.iv0: No such file or directory` `iptables v1.4.8: Could not read geoip database` The problem is, that the support scripts create the geoip database, but they all end as iv4 and iv6, not iv0. When I rename the DE.iv4 file to DE.iv0, the error becomes: `iptables: No chain/target/match by that name.` How can I breathe life into the system?


shell script to download info. about movies from imdb/thmb and putting it into an .nfo file for per-use

Does anybody know of a tool which will extract info. from imdb.com/themoviedb.corg and dumping it into a text file ? I have been searching but with no luck . I usually get the movie name but want to have the plot, actor's names, keywords whatever info. is there from imdb.com. If it's not possible from imdb.com then perhaps themoviedb.org ? Either of the above would be useful. As of now I have to manually scrap the movie synopsis from the imdb site, create the .nfo using mediainfo's --LogFile option to create an .nfo. Looking forward to make it easier and also down the road use more of the fields.


Vim: pasting lines line by line

Let's suppose I have a file containing:               xxx     yyy     zzz      and another file:               kkk     qqq     ppp      I want to obtain:               xxxkkk     yyyqqq     zzzppp      Is that possible in Vim with some command? (I've tried using VISUAL BLOCK but with no success). In my particular case I have two big files with many lines to paste so the answer could also be some shell command but i would like to know if there's a way to do it even within the same file.


Why does a=0; let a++ return exit code 1?

Try it:               $ a=0     $ let a++     $ echo $?     1 # Did the world just go mad?     $ echo $a     1 # Yes, it did.     $ let a++     $ echo $?     0 # We have normality.     $ echo $a     2      Contrast with this:               $ b=0     $ let b+=1     $ echo $?     0      And this (from Sirex):               $ c=0     $ let ++c     $ echo $?     0      What is going on here?               $ bash --version     GNU bash, version 4.1.5(1)-release (x86_64-pc-linux-gnu)


Ctrl-R style interactive search in custom file

I want to be able to search a custom text file similar to the interactive history search in bash. Once the wanted entry is found, executes the line. Bonus Points: have each record contain two fields - the search target, and the command that will be executed What I'm trying to accomplish with this is to allow quick auto completion of server names from a server list.


How to configure sudoers to allow running sudo command under other group and user name?

How to configure `sudoers` to prevent having the `Sorry, user ****** is not allowed to execute` error message. _Background_ For the purpose of testing how a python script under a less privileged user and group daemon account, there is a need to run:               $ sudo -u _denyhosts -g _denyhosts python /usr/local/bin/denyhosts.py      -c /usr/share/denyhosts/denyhosts.cfg -n --purge --sync --verbose      The result is:               Sorry, user ****** is not allowed to execute      '/usr/bin/python /usr/local/bin/denyhosts.py -c /usr/share/denyhosts/denyhosts.cfg      -n --purge --sync --verbose' as _denyhosts:_denyhosts on ***.***.***.      The guess is that this command fails due to an extra configuration required in `sudoers`.               $ sudo -l     Matching Defaults entries for *** on this host:         editor=/usr/bin/nano, env_reset, env_keep+=BLOCKSIZE, env_keep+="COLORFGBG         COLORTERM", env_keep+=__CF_USER_TEXT_ENCODING, env_keep+="CHARSET LANG         LANGUAGE LC_ALL LC_COLLATE LC_CTYPE", env_keep+="LC_MESSAGES LC_MONETARY         LC_NUMERIC LC_TIME", env_keep+="LINES COLUMNS", env_keep+=LSCOLORS,         env_keep+=SSH_AUTH_SOCK, env_keep+=TZ, env_keep+="DISPLAY XAUTHORIZATION         XAUTHORITY", env_keep+="EDITOR VISUAL", env_keep+="HOME MAIL"          User *** may run the following commands on this host:         (ALL) ALL      Already tried to add the group `_denyhosts` to `sudoers` by executing `sudo visudo` and inserting the line:               %_denyhosts    ALL=(ALL) ALL      Saving and trying again does not improve.


How to restrict output of iw dev wlp3s0 scan?

I am trying to configure a wireless network on a newly installed Arch Linux. The command `iw dev wlp3s0 scan` gives information about all the found networks. I only need the information about my SSID.


How to print numbers horizontally?

I would like to print something as 5,4,3,2,1. This is my program, but it prints the numbers vertically.               numbers=5     i=1     while [ "$i" -le "$numbers" ]     do     echo “$i”     i=$(( $i + 1 ))     done      Do you have any solution that could help me?


sox returns an error when I try to handle mp3 files

Hello so here is the deal, I used:               $ yum install sox       To install it in CentOS 6. After that I did a quick test:               $ sox test.mp3 test.amr      and this is what it returns:               $ sox formats: no handler for file extension `mp3'      Any help/suggestions please? I need this done with `sox` not `lame` because I will need to use it for mixing and other functions not available with `lame`.


NFS - What does the "sticky bit" mean?

I'm trying to figure how is the sticky bit used in NFS v3. RFC 1813 says on page 22: > 0x00200 Save swapped text (not defined in POSIX). What do they mean by "swapped text"? In "NFS Illustrated", the author, Brent Callaghan, says it means not to cache. However, I haven't seen this explanation in other places.


Copy only regular files from one directory to another

I'd like to copy a content of directory 1 to directory 2. However, I'd like to only copy files (and not directories) from my directory 1. How can I do that ?               cp dir1/* dir2/*      then I still have the directories issue. Also, all my files don't have any extension, so _._ won't do the trick


Reverse two finger scroll direction with BCM5974?

I'm looking to reverse the scroll direction specifically on my Apple trackpad, and I'm not sure if there's an input option to do so:               Device 'bcm5974':     Device Enabled (144):   1     Coordinate Transformation Matrix (146): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000     Device Accel Profile (262): 1     Device Accel Constant Deceleration (263):   2.500000     Device Accel Adaptive Deceleration (264):   1.000000     Device Accel Velocity Scaling (265):    12.500000     Synaptics Edges (266):  108, 1172, 68, 732     Synaptics Finger (267): 25, 30, 256     Synaptics Tap Time (268):   180     Synaptics Tap Move (269):   66     Synaptics Tap Durations (270):  180, 180, 100     Synaptics Tap FastTap (271):    0     Synaptics Middle Button Timeout (272):  75     Synaptics Two-Finger Pressure (273):    282     Synaptics Two-Finger Width (274):   7     Synaptics Scrolling Distance (275): 30, 30     Synaptics Edge Scrolling (276): 0, 0, 0     Synaptics Two-Finger Scrolling (277):   1, 1     Synaptics Move Speed (278): 1.000000, 1.750000, 0.132538, 40.000000     Synaptics Edge Motion Pressure (279):   30, 160     Synaptics Edge Motion Speed (280):  1, 120     Synaptics Edge Motion Always (281): 0     Synaptics Off (282):    0     Synaptics Locked Drags (283):   0     Synaptics Locked Drags Timeout (284):   5000     Synaptics Tap Action (285): 0, 0, 0, 0, 0, 0, 0     Synaptics Click Action (286):   1, 3, 2     Synaptics Circular Scrolling (287): 0     Synaptics Circular Scrolling Distance (288):    0.100000     Synaptics Circular Scrolling Trigger (289): 0     Synaptics Circular Pad (290):   0     Synaptics Palm Detection (291): 0     Synaptics Palm Dimensions (292):    10, 200     Synaptics Coasting Speed (293): 20.000000, 50.000000     Synaptics Pressure Motion (294):    30, 160     Synaptics Pressure Motion Factor (295): 1.000000, 1.000000     Synaptics Resolution Detect (296):  1     Synaptics Grab Event Device (297):  1     Synaptics Gestures (298):   1     Synaptics Capabilities (299):   1, 0, 0, 1, 1, 1, 1     Synaptics Pad Resolution (300): 1, 1     Synaptics Area (301):   0, 0, 0, 0     Synaptics Noise Cancellation (302): 5, 3      Is there any way I could swap the axes for two finger scrolling to make it more natural? If I globally swap it, then my mouse scrolls backwards too :(


shell scripts are still working without #!(sha-bang line)

I am new to shell scripts and many books have written that use #!(sha-bang) line in starting of the script to invoke the interpreter .And this will invoke a new shell for script and do the interpretation line by line.But one of my basic script is still running without the magic line. so my questions are:   * from where did my basic script get the interpreter.   * how did the script manages to locate the interpreter. now let me tell you about my basic script it just contains the following line: echo "basic script without the magic lines"


How to tell if syslog.conf has a typo

I recently did in fact have a typo in my syslog.conf file, but I had no idea initially why I couldn't restart the daemon. In Ubuntu, all I seemed to get was a FAIL message after a rather long wait period. Without it running properly, I was curious, is there a way I could have figured it out without scouring random logs pointlessly before considering there may have been a typo? Edit: I really felt like using service to start/restart/etc the daemon should have given more than FAIL. Perhaps it does and I just don't know where to look, but if another service had a similar silly issue, I'd hope to be able to figure it out easily as well.


Is it safe to reformat an lvm root partition?

My system currently has a volume group containing root, swap, and home logical volumes. I would like to reinstall the operating system in the root volume and format the partition in the process. I don't know how logical volumes work so I don't know if there is any information about the volume group that is stored on the root partition. If I reformat the root partition, will this remove my ability to access the volume group?


NAT with transparent proxy

is there a way to redirect all non local http requests that through my computer to use my transparent proxy, so i can log all websites are they visiting? and if possible all https requests too.. my computer was used as NAT server because we only have 1 real IP..               eth1 = w.x.y.z (real/public IP)     eth0 = a.b.c.d (fake/private IP)      my transparent proxy listen on localhost:3128 all computers in my home connected to eth0 to access the internet..


Encoding of a zip file

When I extract some file (mp3) with japanese or korean characters within its filename on Windows, they appear normally, but when I extract it on Linux (Ubuntu/Mint) they appear as something like this               5thƒAƒ‹ƒoƒ€w1“x      “¡“c–ƒˆßŽq     03 ‘²‹Æ     ?????      The question is:   1. How to fix those already extracted files?    2. How to fix the id3 tags also when I don't know what's the correct text/characters?   3. How to make extraction defaults as Windows' character encoding?


A commad to change between activities

Is there a command to swtich between activities in KDE plasma-desktop?


How do I edit the terminal launch command in Linux Mint?

In Linux Mint (Debian-based) how can I edit what the shortcut `Ctrl`+`Alt`+`t` launches? For example, I would like to issue `gnome-terminal` with the `\--maximize` option, and to have it launch tmux instantly.


How can I git diff markdown (.md) files

I have some markdown files but I can't git diff them. No result at the command line and not supported in `gitg` (visual git) Is that possible with the files as they are, without converting them to something else?


Relationship among runlevels and virtual terminals (TTY)

When I switch from rulevel 5 to 3 (with `init` command) and I press `Ctrl``Alt``F1` up to `F7`, I realize that now I’m on TTY1 instead of TTY7 and when I switch back to runlevel 5 I return back to TTY7. Why? More generally, what’s the relationship among runlevels and virtual terminals (TTY)?


apt-get or aptitude

> **Possible Duplicate:**   >  What is the real difference between "apt-get" and "aptitude"? (How about > "wajig"?) I'm new in Linux (Ubuntu) world. When I need to install something I Google for it and frequently I found some command like apt-get install [package name] My friend told me that aptitude provides more functionality and it's better to use it instead. But as I know aptitude will be removed from next version of Ubuntu (yes, it will be possible to install it, but it will be excluded by default). What better to use: apt-get or aptitude?


How can I restore the changes to shell variable?

For the purpose of an experiment... Suppose I did this               bash="unset DISPLAY; export DISPLAY"      so I can make `DISPLAY` undefined. How can I restore the original value set? Or at least know what it was?


How can I zip the contents of current directory minus all hidden files?

How can I zip up the contents (excluding hidden files and folders) of the folder I am currently in?               zip -r extension.xpi . -x "*/.*"      This is what I have so far, but I am still getting hidden files.


How can I display octal notation of permissions with ls - and can octal represent all permissions?

After looking at the `man` page for `ls` on my system and searching Google, I see there **IS a hack of way to use`awk` or `perl` to show octal permissions** when using `ls`, but with `bash` is there anything more native? ### Standard output of ls -alh               $ ll     total 0     drwxr-xr-x   5 user  group   170B May 20 20:03 .     drwxr-xr-x  17 user  group   578B May 20 20:03 ..     -rw-r--r--   1 user  group     0B May 20 20:03 example     -rw-r--r--   1 user  group     0B May 20 20:03 example-1     -rw-r--r--   1 user  group     0B May 20 20:03 example-3      ### Desired output including octal representation of permissions               $ ll     total 0     drwxr-xr-x 1775  5 user  group   170B May 20 20:03 .     drwxr-xr-x 1775 17 user  group   578B May 20 20:03 ..     -rw-r--r-- 1644  1 user  group     0B May 20 20:03 example     -rw-r--r-- 1644  1 user  group     0B May 20 20:03 example-1     -rw-r--r-- 1644  1 user  group     0B May 20 20:03 example-3      (disclaimer: not sure if those octals are _exactly_ right) ### Reasoning I am more familiar with the `drwxr-xr-x` notation for permissions but sometimes when the dashes fall in odd places I might mis-read it at a quick glance. I'd like to see the octal equivalent as well. ### Conversion Ability (question part 2) I think a long time ago octal permissions might have been limited to `000` - `777` but in recent times there are some things like `set-group-ID` and `sticky` that have given us octals with 4 places like `1775`. Is it possible to represent every possible permission in octal format? If it is not then I'd better understand why bash's `ls` command doesn't seem to have this format.


Convert the permissions in `ls -l` output to octal

I want to convert the output of `ls` to octal permission bits. I think of the shortest and clearest way to implement that excerise: Let's say that we have as input:               total 1     drwxr----x 1 user2 workers 1024 May 26 22:22 dir     -rwx-wxrw- 2 user2 workers 1024 May 26 22:22 file.txt      our output should be:               741 dir     736 file.txt


Errors in Syslog

Im getting this error on one of the server               May 21 16:45:42 ERPSSO gconfd (root-24528): Failed to write "/root/.gconf/apps/puplet/%gconf.xml": Failed to move temporary file "/root/.gconf/apps/puplet/%gconf.xml.new" to final location "/root/.gconf/apps/puplet/%gconf.xml": No such file or directory      May 21 16:45:42 ERPSSO gconfd (root-24528): Failed to sync one or more sources: Failed to write some configuration data to disk      May 21 17:45:42 ERPSSO gconfd (root-24528): Failed to write "/root/.gconf/apps/puplet/%gconf.xml": Failed to move temporary file "/root/.gconf/apps/puplet/%gconf.xml.new" to final location "/root/.gconf/apps/puplet/%gconf.xml": No such file or directory      May 21 17:45:42 ERPSSO gconfd (root-24528): Failed to sync one or more sources: Failed to write some configuration data to disk      May 21 19:45:42 ERPSSO gconfd (root-24528): Failed to write "/root/.gconf/apps/puplet/%gconf.xml": Failed to move temporary file "/root/.gconf/apps/puplet/%gconf.xml.new" to final location "/root/.gconf/apps/puplet/%gconf.xml": No such file or directory      May 21 19:45:42 ERPSSO gconfd (root-24528): Failed to sync one or more sources: Failed to write some configuration data to disk      May 21 20:45:43 ERPSSO gconfd (root-24528): Failed to write "/root/.gconf/apps/puplet/%gconf.xml": Failed to move temporary file "/root/.gconf/apps/puplet/%gconf.xml.new" to final location "/root/.gconf/apps/puplet/%gconf.xml": No such file or directory      May 21 20:45:43 ERPSSO gconfd (root-24528): Failed to sync one or more sources: Failed to write some configuration data to disk      May 21 22:45:42 ERPSSO gconfd (root-24528): Failed to write "/root/.gconf/apps/puplet/%gconf.xml": Failed to move temporary file "/root/.gconf/apps/puplet/%gconf.xml.new" to final location "/root/.gconf/apps/puplet/%gconf.xml": No such file or directory      May 21 22:45:42 ERPSSO gconfd (root-24528): Failed to sync one or more sources: Failed to write some configuration data to disk      May 22 00:45:43 ERPSSO gconfd (root-23938): Failed to write "/root/.gconf/apps/puplet/%gconf.xml": Failed to move temporary file "/root/.gconf/apps/puplet/%gconf.xml.new" to final location "/root/.gconf/apps/puplet/%gconf.xml": No such file or directory      May 22 00:45:43 ERPSSO gconfd (root-23938): Failed to sync one or more sources: Failed to write some configuration data to disk      May 22 02:45:42 ERPSSO gconfd (root-23938): Failed to write "/root/.gconf/apps/puplet/%gconf.xml": Failed to move temporary file "/root/.gconf/apps/puplet/%gconf.xml.new" to final location "/root/.gconf/apps/puplet/%gconf.xml": No such file or directory      May 22 02:45:42 ERPSSO gconfd (root-23938): Failed to sync one or more sources: Failed to write some configuration data to disk      May 22 04:45:43 ERPSSO gconfd (root-23938): Failed to write "/root/.gconf/apps/puplet/%gconf.xml": Failed to move temporary file "/root/.gconf/apps/puplet/%gconf.xml.new" to final location "/root/.gconf/apps/puplet/%gconf.xml": No such file or directory      May 22 04:45:43 ERPSSO gconfd (root-23938): Failed to sync one or more sources: Failed to write some configuration data to disk      May 22 05:45:42 ERPSSO gconfd (root-23938): Failed to write "/root/.gconf/apps/puplet/%gconf.xml": Failed to move temporary file "/root/.gconf/apps/puplet/%gconf.xml.new" to final location "/root/.gconf/apps/puplet/%gconf.xml": No such file or directory      May 22 05:45:42 ERPSSO gconfd (root-23938): Failed to sync one or more sources: Failed to write some configuration data to disk      May 22 06:45:42 ERPSSO gconfd (root-23938): Failed to write "/root/.gconf/apps/puplet/%gconf.xml": Failed to move temporary file "/root/.gconf/apps/puplet/%gconf.xml.new" to final location "/root/.gconf/apps/puplet/%gconf.xml": No such file or directory      May 22 06:45:42 ERPSSO gconfd (root-23938): Failed to sync one or more sources: Failed to write some configuration data to disk      May 22 07:45:43 ERPSSO gconfd (root-23938): Failed to write "/root/.gconf/apps/puplet/%gconf.xml": Failed to move temporary file "/root/.gconf/apps/puplet/%gconf.xml.new" to final location "/root/.gconf/apps/puplet/%gconf.xml": No such file or directory      May 22 07:45:43 ERPSSO gconfd (root-23938): Failed to sync one or more sources: Failed to write some configuration data to disk      May 22 09:45:43 ERPSSO gconfd (root-23938): Failed to write "/root/.gconf/apps/puplet/%gconf.xml": Failed to move temporary file "/root/.gconf/apps/puplet/%gconf.xml.new" to final location "/root/.gconf/apps/puplet/%gconf.xml": No such file or directory      May 22 09:45:43 ERPSSO gconfd (root-23938): Failed to sync one or more sources: Failed to write some configuration data to disk      May 22 10:45:43 ERPSSO gconfd (root-23938): Failed to write "/root/.gconf/apps/puplet/%gconf.xml": Failed to move temporary file "/root/.gconf/apps/puplet/%gconf.xml.new" to final location "/root/.gconf/apps/puplet/%gconf.xml": No such file or directory      May 22 10:45:43 ERPSSO gconfd (root-23938): Failed to sync one or more sources: Failed to write some configuration data to disk      May 22 11:37:05 ERPSSO gconfd (root-7876): starting (version 2.14.0), pid 7876 user 'root'     May 22 11:37:05 ERPSSO gconfd (root-7876): Resolved address "xml:readonly:/etc/gconf/gconf.xml.mandatory" to a read-only configuration source at position 0     May 22 11:37:05 ERPSSO gconfd (root-7876): Resolved address "xml:readwrite:/root/.gconf" to a writable configuration source at position 1     May 22 11:37:05 ERPSSO gconfd (root-7876): Resolved address "xml:readonly:/etc/gconf/gconf.xml.defaults" to a read-only configuration source at position 2      There is enough space on root /boot/and other partitions


how to sort access log efficiently in blocks

Access logs are more or less sorted by time, but to aggregate connections by time (`uniq -c`), you need to sort them a bit more. For a huge access log sort is very inefficient, because it buffers and sorts the whole file before printing out anything. Do you know any option for sort or version of sort, that could sort only given ammount of lines at once, the print that block? I have searched for the following keywords: "streaming sort", "block sort", "approximate sort". I have read the whole manual through, without use. Setting the buffer size (-S) did not influenced this.


how to solve ports dependencies conflict

What is the best approach to avoid conflict among the dependencies from two or more unrelated ports? I'm facing the following problem. A script that I'm using has the follow approach to try to install all dependencies of a port: assuming $PORTA is pointing for a specific port (/usr/ports/lang/php5 for example)               # Complete dependency chain first     BUILDLIST=`cd $PORTA && make build-depends-list 2>/dev/null`     for BUILD in $BUILDLIST; do         # Check to see if item is already built     local _PKGNAME=`make -C $PORTA -V PKGNAME`     if [ `grep -c "$_PKGNAME" /tmp/pfPort_alreadybuilt` -gt 0 ]; then        echo "    Dependency $BUILD of $PORTA already built on this run.  Skipping."     else        echo "    Building dependency $BUILD of $PORTA"        clean_build_install_clean $BUILD     fi     done      after it tried to install the whole dependencies, then it wll try to install the port. Is it any better than go through your ports and do a `make depends install clean`? With the approach listed, I'm having lot of trouble with minor versions conflicts like perl 5.12.4 is needed, but perl.14.2 is installed and I have the feeling that make depends make handle it better.


"ls -lh" reports total size less than sum of individual sizes

Under what circumstances would `ls -lh` show a total that is less than the sum of the individual files? For example:               $ ls -lh /var/lib/nova/instances/_base     total 100G     -rw-rw-r-- 1 nova         nova 4.3M 2012-02-14 14:07 00000001     -rw-rw-r-- 1 nova         nova 5.7M 2012-02-14 14:07 00000002     -rw-rw-r-- 1 nova         nova  42G 2012-03-08 15:24 1574bddb75c78a6fd2251d61e2993b5146201319.part     -rw-rw-r-- 1 libvirt-qemu kvm   24M 2012-02-14 14:07 77de68daecd823babbb58edb1c8e14d7106e83bb_sm     -rw-r--r-- 1 libvirt-qemu kvm   65G 2012-03-02 12:43 bd307a3ec329e10a2cff8fb87480823da114f8f4     -rw-rw-r-- 1 libvirt-qemu kvm  160G 2012-02-24 16:06 ephemeral_0_160_None     -rw-rw-r-- 1 libvirt-qemu kvm   80G 2012-02-24 22:38 ephemeral_0_80_None     -rw-r--r-- 1 libvirt-qemu kvm   10G 2012-02-24 22:37 fe5dbbcea5ce7e2988b8c69bcfdfde8904aabc1f     -rw-r--r-- 1 libvirt-qemu kvm   10G 2012-02-24 11:09 fe5dbbcea5ce7e2988b8c69bcfdfde8904aabc1f_sm      Edit: now showing some extra flags are per request in comment:               $ ls -aiFlh  /var/lib/nova/instances/_base/     total 143G     29884440 drwxrwxr-x 2 nova         nova 4.0K 2012-03-08 15:45 ./     29884427 drwxr-xr-x 6 nova         nova 4.0K 2012-03-08 15:05 ../     29884444 -rw-rw-r-- 1 nova         nova 4.3M 2012-02-14 14:07 00000001     29884445 -rw-rw-r-- 1 nova         nova 5.7M 2012-02-14 14:07 00000002     29884468 -rw-r--r-- 1 nova         nova  65G 2012-03-08 15:59 1574bddb75c78a6fd2251d61e2993b5146201319.converted     29884466 -rw-rw-r-- 1 nova         nova  58G 2012-03-08 15:35 1574bddb75c78a6fd2251d61e2993b5146201319.part     29884446 -rw-rw-r-- 1 libvirt-qemu kvm   24M 2012-02-14 14:07 77de68daecd823babbb58edb1c8e14d7106e83bb_sm     29884467 -rw-r--r-- 1 libvirt-qemu kvm   65G 2012-03-02 12:43 bd307a3ec329e10a2cff8fb87480823da114f8f4     29884443 -rw-rw-r-- 1 libvirt-qemu kvm  160G 2012-02-24 16:06 ephemeral_0_160_None     29884442 -rw-rw-r-- 1 libvirt-qemu kvm   80G 2012-02-24 22:38 ephemeral_0_80_None     29884447 -rw-r--r-- 1 libvirt-qemu kvm   10G 2012-02-24 22:37 fe5dbbcea5ce7e2988b8c69bcfdfde8904aabc1f     29884441 -rw-r--r-- 1 libvirt-qemu kvm   10G 2012-02-24 11:09 fe5dbbcea5ce7e2988b8c69bcfdfde8904aabc1f_sm


Connecting various process attributes reported by top, ps, /proc/pid/statm, /proc/pid/status, /proc/pid/smaps

Here are some of the common attributes I figured out: top(VIRT) , smem(VSS), /proc/pid/statm (1st entry in pages), /proc/pid/status (VmSize), ps(VSZ) top(RES) , smem(RSS), /proc/pid/statm (2nd entry in pages), /proc/pid/status (VmRSS), add all Rss: values in /proc/pid/smaps process mappings, add all Private_.* + Shared_.* values in /proc/pid/smaps process mappings, ps(RSS) top(DATA) , **not reported by smem** , /proc/pid/statm (6th entry in pages), /proc/pid/status (VmData), **not reported by ps** top(CODE) , **not reported by smem** , /proc/pid/statm (4th entry in pages), **not reported by /proc/pid/status** , **not reported by ps** top(SHR) , **not reported by smem** , /proc/pid/statm (3rd entry in pages), **not reported by /proc/pid/status** , **not reported by ps** smem(USS), add all Private_.* values in /proc/pid/smaps process mappings smem(PSS), add all Pss: values in /proc/pid/smaps process mappings smem(Swap), add all Swap: values in /proc/pid/smaps process mappings top(SWAP) = top(VIRT) - top(RES) **Question:** Are there any other relations (as mentioned above) present that I have missed above? Can you share?


"globbing" (*) comes from "global command"... Huh?

According to legend, in the early days what we now call "globbing" (i.e. using expressions like e.g. `*.c`, `./*.p?`) was supported by one certain program `/etc/glob`, whose name in turn derived from "global command"... I don't know about you, but for me, learning that "glob", "globbing", etc. comes from "global command" is about as illuminating as learning that it came from "globothymic pylotensity"... What on earth is a "global command"?


Change default Encoding in Terminator

The Title stays pretty much for itself. Tried to figure it out myself but I can´t find a config-setting nor a option in the Preferences for the Encoding. Does anybody know how to change the default Encoding in Terminator?


How can I remove GRUB2 entries in Fedora 16?

Recently, I executed the following command:               grub2-mkconfig -o /boot/grub2/grub.cfg      Now I have 6-7 Linux entries + 1 windows entry. How do I remove older kernel entries? I don't want to remove all the recovery kernel options by using:               GRUB_DISABLE_LINUX_RECOVERY="true"


Clarification on permissions with GID & UID in UNIX

If Test1 & Test2 are users, then               Test1 : UID : 501, GID :501, groups=501,100     Test2 : UID : 502, GID :502, groups=502,100      What will be the correct option from below and explain how?   * Test1 can't access any file from Test2 because both are having different GID   * Test1 and Test 2 can access each others files because both are having 100 as group


Is there a way to search manpages for typical use scenario?

I have a relatively small brain, so there is a limit to what I can store up there. I have been using Linux semi-pro-amateur for a few years and still I am amazed at how little commands I know. Simple stuff like "how do I list all my partitions in a terminal" will launch a 15 minute DuckDuckGo-hunt. I am taking a stand! It ends today! So, is there a way to search manpages for stuff like "list partitions" and getting something like:               $ man-search list partitions          Results for "list partitions"     -----------------------------          df - list drives with size or something     du - list directory usage      I think I already know the answer, but ... maybe you can suggest a quicker way to find the utility I need when I need it. Thanks!


Backslash with pipe in system command from awk

I want to invoke shell command from awk so I am using `system()` but when I am passing expression in I am getting error at backslash. Here is my expression               echo "select * from abc limit 1;"| impala-shell|grep -Eo " a-[0-9]-[0-9]* \| HS[0-9]  \| [0-9]* \| [0-9]* "      But when I am passing it to shell, I'm getting an error `backslash not last character on line`.               system("echo \"select * from abc limit 1;\"| impala-shell|grep -Eo \" a-[0-9]-[0-9]* \| HS[0-9]  \| [0-9]* \| [0-9]* \" ")      I want to get the above command result in awk programming after `system()` ,I know we can access through getline but dont know exact syntax. **EDIT** When using **\|** in system as **"\|"** got following               `warning: escape sequence `\|' treated as plain `|'`       I took some simple example to see **\|** in an expression               system("echo hey i am  \"\\|\" ashish ")     hey i am \| ashish      but when i try within double qoute and single quote yields in               system("echo \" a-[0-9]* \"\\|\" HS[0-9]  \"\\|\" [0-9]* \"\\|\" [0-9]* \" ")     a-[0-9]* | HS[0-9]  | [0-9]* | [0-9]*     //single quote     system("echo \' a-[0-9]* \"\\|\" HS[0-9]  \"\\|\" [0-9]* \"\\|\" [0-9]* \' ")     a-[0-9]* "\|" HS[0-9]  "\|" [0-9]* "\|" [0-9]*      what i am expecting is `a-[0-9]* \| HS[0-9] \| [0-9]* \| [0-9]*`.


How would you get all users history

I know there is the $HISTFILE variable where i can find the currently logged in users history-file, but how can i be sure to get every history file on the server I was thinking of the following:               sudo find /home/ -name '*_history*'      With output:               root@anders:~# sudo find /home/ -name '*_history*'     /home/seb/.bash_history     /home/adionditsak/.bash_history     /home/jakob/.bash_history     ...      Would this do the trick - or do you have a better way?


forgot to luksClose usb persistent partition, is this a problem?

Following the Kali Linux documentation for "Adding USB Persistence with LUKS Encryption", I created a persistent partition and encrypted the volume with:               cryptsetup --verbose --verify-passphrase luksFormat /dev/sdb2     cryptsetup luksOpen /dev/sdb2 my_usb     mkfs.ext3 -L persistence /dev/mapper/my_usb     e2label /dev/mapper/my_usb persistence     mkdir -p /mnt/my_usb     mount /dev/mapper/my_usb /mnt/my_usb     echo "/ union" > /mnt/my_usb/persistence.conf     umount /dev/mapper/my_usb      (substituting a volume name for "my_usb") However, I forgot to close the volume (the following line was ophaned on the next page in the documentation, so I didn't see it):               cryptsetup luksClose /dev/mapper/my_usb      Is this a problem? If so, how and is there any way to repair it? This article suggests it is but doesn't say why and the instructions don't work for me. The disk _appears_ to work fine.


Why do cpuinfo_cur_freq and /proc/cpuinfo report different numbers?

When I do ` sudo watch -n1 cat /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_cur_freq ` I get 1.8 - 2.7 GHz. It never goes above 2.7. And when I do ` watch -n1 "cat /proc/cpuinfo | grep MHz" ` I get 768 MHz - 1.8 GHz. It never goes above 1.8. Anyone know what is going on?


is there a vim shortcut or can I create one for 'tabe other_file'

When possible I create 1 or 2 letter abbreviations for aliases and the like, e.g. `x` for exit or `p` for pwd at the command line. When using vim and doing multiple tabs for different files (which I can switch between with `gt` or `gT` btw) I can edit an additional file with `:tabe filename` which also creates a new tab. Is there any shortcut or is there any way to create one (perhaps using the .vimrc file?) for something like `:ta` or `:tb` or `:tt` or `:tz` etc.


sed - replace complex lines in a file using variables

How do I replace a complex line in a file using sed? For example I want replace a udev rule in /etc/udev/rules.d/70-persistent- net.rules. This doesn't work:               OLD_RULE='SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="52:54:00:36:4c:e5", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"'          NEW_RULE='SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="52:54:00:36:4c:e5", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"'               sed -i "s/$OLD_RULE/$NEW_RULE/g" /etc/udev/rules.d/70-persistent-net.rules      The file remains unmodified.


Dual monitor configuration on Intel Ivy Bridge

I'm trying to set up a dual monitor machine with an Intel DH67BL motherboard, Ivy Bridge i5-3450 CPU and dual Samsung 204b monitors. I cant seem to get the computer to recognize more than one of these monitors at a time. I can get either monitor to work using the DVI port directly or with a DVI-VGA cable, or by using the HDMI port with an HDMI-DVI cable. I managed to sort of get them working by substituting 2 smaller monitors and hot-plugging to the 204b's, but this locked me into an appallingly low resolution, and broke as soon as I tried adjusting the resolution. KDE's display settings only shows whichever monitor is currently working as connected. The Samsung 204b's also appear to be outputting bad EDID information, so forcing monitor settings is probably going to be neccesary. Edit: I ended up adding an old nvidia card to the computer, which runs both monitors quite happily.


inittab equivalent in fedora 15?

I have just installed Fedora 15 on my laptop. I want to study `/etc/inittab` as I studied it in RedHat 9. I don't see any script in `/etc/inittab`. Also , the way the default runlevel can be changed in `inittab` has changed in Fedora 15. If there is a good tutorial to study the changes in Fedora 15? I found https://fedoraproject.org/wiki/Systemd, but was not much useful.