proftpd via mysql & web management of FTP users

I have installed prftpd and proftpd-mysql rpm on a linux machine. Intention is to have usermanagement of ftpusers via web. So I have installed proftpadmin from Here Now when I am adding the below lines in /etc/proftpd.conf file               SQLConnectInfo                  proftpd@localhost root root      SQLAuthenticate                 users   groups      SQLAuthTypes                    Crypt   Backend      SQLUserInfo                     users userid passwd uid gid homedir shell      SQLGroupInfo                    groups groupid gid members           SQLLog                          PASS logincount      SQLNamedQuery                   logincount UPDATE "login_count=login_count+1 WHERE userid='%u'" users      SQLLog                          PASS lastlogin      SQLNamedQuery                   lastlogin UPDATE "last_login=now() WHERE userid='%u'" users      SQLLog RETR                     dlbytescount      SQLNamedQuery                   dlbytescount UPDATE "dl_bytes=dl_bytes+%b WHERE userid='%u'" users      SQLLog RETR                     dlcount      SQLNamedQuery                   dlcount UPDATE "dl_count=dl_count+1 WHERE userid='%u'" users      SQLLog STOR                     ulbytescount      SQLNamedQuery                   ulbytescount UPDATE "ul_bytes=ul_bytes+%b WHERE userid='%u'" users      SQLLog STOR                     ulcount      SQLNamedQuery                   ulcount UPDATE "ul_count=ul_count+1 WHERE userid='%u'" users      SQLUserWhereClause              "disabled!=1"      service proftpd start fails . If I remove those lines service starts, I cannot manage users via mysql, as above lines are mendatory. Can anyone please suggest where I am going wrong Please find my below /etc/proftpd.conf file               # This is the ProFTPD configuration file     # $Id: proftpd.conf,v 1.1 2004/02/26 17:54:30 thias Exp $          ServerName                      "ProFTPD server"     ServerIdent                     on "FTP Server ready."     ServerAdmin                     root@localhost     ServerType                      standalone     #ServerType                     inetd     DefaultServer                   on     AccessGrantMsg                  "User %u logged in."     #DisplayConnect                 /etc/ftpissue     #DisplayLogin                   /etc/ftpmotd     #DisplayGoAway                  /etc/ftpgoaway     DeferWelcome                    off          # Use this to excude users from the chroot     DefaultRoot                     ~ !adm          # Use pam to authenticate (default) and be authoritative     #AuthPAMConfig                  proftpd     AuthOrder                       mod_auth_pam.c* mod_auth_unix.c          # Do not perform ident nor DNS lookups (hangs when the port is filtered)     IdentLookups                    off     UseReverseDNS                   off          # Port 21 is the standard FTP port.     Port                            21          # Umask 022 is a good standard umask to prevent new dirs and files     # from being group and world writable.     Umask                           022          # Default to show dot files in directory listings     ListOptions                     "-a"          # See Configuration.html for these (here are the default values)     #MultilineRFC2228               off     #RootLogin                      off     #LoginPasswordPrompt            on     #MaxLoginAttempts               3     #MaxClientsPerHost              none     #AllowForeignAddress            off     # For FXP          # Allow to resume not only the downloads but the uploads too     AllowRetrieveRestart            on     AllowStoreRestart               on          # To prevent DoS attacks, set the maximum number of child processes     # to 30.  If you need to allow more than 30 concurrent connections     # at once, simply increase this value.  Note that this ONLY works     # in standalone mode, in inetd mode you should use an inetd server     # that allows you to limit maximum number of processes per service     # (such as xinetd)     MaxInstances                    20          # Set the user and group that the server normally runs at.     User                            nobody     Group                           nobody          # Disable sendfile by default since it breaks displaying the download speeds in     # ftptop and ftpwho     UseSendfile                     no          # This is where we want to put the pid file     ScoreboardFile                  /var/run/proftpd.score          # Normally, we want users to do a few things.     <Global>       AllowOverwrite                yes       <Limit ALL SITE_CHMOD>         AllowAll       </Limit>     </Global>          # Define the log formats     LogFormat                       default "%h %l %u %t \"%r\" %s %b"     LogFormat                       auth    "%v [%P] %h %t \"%r\" %s"          # TLS     # Explained at http://www.castaglia.org/proftpd/modules/mod_tls.html     #TLSEngine                      on     #TLSRequired                    on     #TLSRSACertificateFile          /etc/pki/tls/certs/proftpd.pem     #TLSRSACertificateKeyFile       /etc/pki/tls/certs/proftpd.pem     #TLSCipherSuite                 ALL:!ADH:!DES     #TLSOptions                     NoCertRequest     #TLSVerifyClient                off     ##TLSRenegotiate                ctrl 3600 data 512000 required off timeout 300     #TLSLog                         /var/log/proftpd/tls.log          # SQL authentication Dynamic Shared Object (DSO) loading     # See README.DSO and howto/DSO.html for more details.     #<IfModule mod_dso.c>     #   LoadModule mod_sql.c     #   LoadModule mod_sql_mysql.c     #   LoadModule mod_sql_postgres.c     #</IfModule>          # A basic anonymous configuration, with an upload directory.     #<Anonymous ~ftp>     #  User                         ftp     #  Group                                ftp     #  AccessGrantMsg               "Anonymous login ok, restrictions apply."     #     #  # We want clients to be able to login with "anonymous" as well as "ftp"     #  UserAlias                    anonymous ftp     #     #  # Limit the maximum number of anonymous logins     #  MaxClients                   10 "Sorry, max %m users -- try again later"     #     #  # Put the user into /pub right after login     #  #DefaultChdir                        /pub     #     #  # We want 'welcome.msg' displayed at login, '.message' displayed in     #  # each newly chdired directory and tell users to read README* files.     #  DisplayLogin                 /welcome.msg     #  DisplayFirstChdir            .message     #  DisplayReadme                        README*     #     #  # Some more cosmetic and not vital stuff     #  DirFakeUser                  on ftp     #  DirFakeGroup                 on ftp     #     #  # Limit WRITE everywhere in the anonymous chroot     #  <Limit WRITE SITE_CHMOD>     #    DenyAll     #  </Limit>     #     #  # An upload directory that allows storing files but not retrieving     #  # or creating directories.     #  <Directory uploads/*>     #    AllowOverwrite             no     #    <Limit READ>     #      DenyAll     #    </Limit>     #     #    <Limit STOR>     #      AllowAll     #    </Limit>     #  </Directory>     #     #  # Don't write anonymous accesses to the system wtmp file (good idea!)     #  WtmpLog                      off     #     #  # Logging for the anonymous transfers     #  ExtendedLog          /var/log/proftpd/access.log WRITE,READ default     #  ExtendedLog          /var/log/proftpd/auth.log AUTH auth     #     #</Anonymous>          SQLConnectInfo                  proftpd@localhost root root      SQLAuthenticate                 users   groups      SQLAuthTypes                    Crypt   Backend      SQLUserInfo                     users userid passwd uid gid homedir shell      SQLGroupInfo                    groups groupid gid members           SQLLog                          PASS logincount      SQLNamedQuery                   logincount UPDATE "login_count=login_count+1 WHERE           userid='%u'" users      SQLLog                          PASS lastlogin      SQLNamedQuery                   lastlogin UPDATE "last_login=now() WHERE userid='%u'"           users      SQLLog RETR                     dlbytescount      SQLNamedQuery                   dlbytescount UPDATE "dl_bytes=dl_bytes+%b WHERE           userid='%u'" users      SQLLog RETR                     dlcount      SQLNamedQuery                   dlcount UPDATE "dl_count=dl_count+1 WHERE userid='%u'"           users      SQLLog STOR                     ulbytescount      SQLNamedQuery                   ulbytescount UPDATE "ul_bytes=ul_bytes+%b WHERE           userid='%u'" users      SQLLog STOR                     ulcount      SQLNamedQuery                   ulcount UPDATE "ul_count=ul_count+1 WHERE userid='%u'"           users      SQLUserWhereClause              "disabled!=1"      SQL Script looks as below which is updated on respective Database               #     # Table structure for table `groups`     #          CREATE TABLE `groups` (       `groupid` varchar(10) NOT NULL default '',       `gid` int(10) unsigned NOT NULL auto_increment,       `members` varchar(255) NOT NULL default '',       PRIMARY KEY  (`gid`)     ) TYPE=InnoDB ;          #     # Table structure for table `users`     #          CREATE TABLE `users` (       `id` smallint(2) NOT NULL auto_increment,       `userid` varchar(10) NOT NULL default '',       `uid` int(10) unsigned NOT NULL default '',       `gid` int(10) unsigned NOT NULL default '',       `passwd` varchar(255) NOT NULL default '',       `homedir` varchar(255) NOT NULL default '',       `comment` varchar(255) NOT NULL default '',       `disabled` int(10) unsigned NOT NULL default '0',       `shell` varchar(20) NOT NULL default '/sbin/nologin',       `email` varchar(255) NOT NULL default '',       `name` varchar(255) NOT NULL default '',       `ul_bytes` bigint(20) NOT NULL default '0',       `dl_bytes` bigint(20) NOT NULL default '0',       `login_count` bigint(20) NOT NULL default '0',       `dl_count` bigint(20) NOT NULL default '0',       `ul_count` bigint(20) NOT NULL default '0',       `last_login` datetime default NULL,       PRIMARY KEY  (`id`)     ) TYPE=InnoDB ;


My local DNS don't resolv specific hostnames IP's

I've been trying to accomplish a DNS set up on my local machine using Linux and CentOS. I've been following couple of tutorials and eventually everything seemed to work but when surfing to my example website I realized it didn't... This is what I've done after installing bind. **named.conf:**                  zone "ims.be" IN {                 type master;                 file "example.com.zone";                 allow-update { none; };         };      **example.com.zone:**               $TTL 86400     @    IN    SOA    localhost.    root.localhost. (                 42 ; serial                 3600      ; refresh after 6 hours                 900       ; retry after 1 hour                 1W     ; expire after 1 week                 1D )    ; minimum TTL of 1 day          @       NS      localhost.             A       192.168.0.***     www     A       192.168.0.***     ftp     CNAME   www      **example.conf**               <VirtualHost *:80>         ServerAdmin webmaster@example.com         DocumentRoot /home/ims.be/         ServerName ims.be         ServerAlias www.ims.be         ErrorLog logs/ims.be-error_log         CustomLog logs/ims.be-access_log common     </VirtualHost>      I am able to ping, dig and nslookup to my example website called ims.be. **PING** ![PING](http://i.stack.imgur.com/o3qg0.jpg) **DIG** ![DIG](http://i.stack.imgur.com/nONzD.jpg) **NSLOOKUP** ![NSLOOKUP](http://i.stack.imgur.com/Na5IT.jpg) **NAMESERVERS** ![enter image description here](http://i.stack.imgur.com/PsuJl.jpg) But when surfing to ims.be or www.ims.be using Chrome/Firefox/IE/Safari I get an error that the webpage is not available... However when I surf to my IP address this displays the page ims.be like it should. I'm working on a Windows 7 using CentOS to access Linux. I discovered that I'm able to ping etc to ims.be from my Linux but when I'm in command line in Windows I'm unable to ping/nslookup/... ims.be: > Ping request could not find host ims.be I thought I had to change settings in Windows to get this done but nothing changed just yet... What I've done: ![enter image description here](http://i.stack.imgur.com/BjpmR.jpg) ![enter image description here](http://i.stack.imgur.com/as1td.jpg)


Why does octave give different results for 9 ^ 1/2 and 9 ^ 0.5?

Lately I've been trying to brush up on the math I should have learned in high school. (I didn't pay much attention.) Regarding this, college entrance exams and `octave` make a great pair. This morning I got to fractional powers. And `octave` had something surprising in store:               octave:41> (9 ^ 1/2)     ans =  4.5000     octave:42> (9 ^ .5)     ans =  3     octave:43> (9 ^ 0.5)     ans =  3      Maybe I dozed off when we covered this in high school, but no... According to this website, > By the way, some decimal powers can be written as fractional exponents, too. > If you are given something like "35.5", recall that 5.5 = 11/2, so: > > 3 ^ 5.5 = 3 ^ 11/2 So evidently there's some reason why `octave` evaluates these two expressions differently... Why does `octave` evaluate fractional powers differently? Is this a non- feature, or is there a good reason why it should?


Why do backgrounded processes sometimes stop spontaneously?

Sometimes, some time after I've backgrounded a process with `bg` in bash, when I press Enter in the same shell to redisplay the prompt (just to check that I'm still in bash when some output from the background process has been displayed), the background process seems to stop spontaneously. If I do `bg` again the same problem recurs. The only way to fix it seems to be `fg`. Why does this happen?


Login automatically as root

I am working with a board and when it finishes the boot, appears the login. What I want to do is login as root but automatically. I mean I want to do that when boot is finish, I can see the prompt, without login.


Emacs change font of a single word (or sentence), not of the whole buffer

Somehow I don't find a way of changing the font size of a specific string of text. I know how to do it globally or temporarily for the whole buffer.Changing the default font is not the issue here. Sometimes I use math symbols like ω, Ω or ב and want to change these to a bigger font. I'd need a simple way of doing this. Alternatives to make these symbols more visible are welcome too.


Unwanted messages every time I attempt to login?

I am using Linux Mint Olivia and it worked fine for past couple of months but from yesterday it keep showing these message whenever I want to login to my PC: > Keys: Press S to skip mounting or M for manual recovery If I press `s`, then it shows another message: > Keys: Continue to wait , or press S to skip mounting or M for manual > recovery If I press `s`, then it allows me to login. Can any one tell me how can I login normally? Contents of my `/etc/fstab`:               UUID=e1867541-6f11-4fd8-8121-2318248cb9c4 / ext4 errors=remount-ro 0 1      # swap was on /dev/sda9 during installation      UUID=8f655fe6-92c5-43c8-9655-2c2b3485a836 none swap sw 0 0     UUID=[C59C-D751] /media/[bappu] vfat user,uid=1000,gid=100,dmask=027,fmask=137 0 0


Overwriting disk before encryption

I'm going to create encrypted lvm on my disk. As a encryption mechanism I choose dmcrypt with LUKS. Here's my question - should I overwrite (for security reasons) whole disk before creating encrypted container, or overwrite already encrypted container (there is some information at cryptsetup FAQ - step 6) or both? Does it matter?


Meaning of Crossing filesystem boundaries, --one-file-system, etc

I'm planning to use rsnapshot to backup my whole Linux system, though I'm confused by `-x` option (same of `one_fs` in `rsnapshot.conf`). The man page says: > -x one filesystem, don't cross partitions within each backup point I understand it's not a specific rsnapshot option since rsync, cp, tar and other commands provide this feature as well. Does file system boundaries refers to different partitions? Different mount points? And what does it mean to don't "cross" them? Back to my case, I read many people suggesting to use `-x` with rsnapshot, but I'm wondering if doing so is not going to compromise the completeness of my backup. I want to backup everything under `/`, including `/boot` and `/home`, which reside on dedicated partitions of the same disk, while at the same time I don't want to backup files and directories not strictly belonging to my system, like `/mnt`, `/media`, etc. Executing `mount` command on my system gives the following output. Pratically, using `rsnapshot -x`, what will be included and what will be left out?               /dev/sda7 on / type ext4 (rw,errors=remount-ro)     proc on /proc type proc (rw,noexec,nosuid,nodev)     sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)     none on /sys/fs/fuse/connections type fusectl (rw)     none on /sys/kernel/debug type debugfs (rw)     none on /sys/kernel/security type securityfs (rw)     udev on /dev type devtmpfs (rw,mode=0755)     devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)     tmpfs on /tmp type tmpfs (rw,noexec,nosuid)     tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)     none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)     none on /run/shm type tmpfs (rw,nosuid,nodev)     /dev/sda6 on /boot type ext3 (rw)     /dev/sda8 on /home type ext4 (rw)     binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)     gvfs-fuse-daemon on /home/myuser/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=myuser)


How can I ssh to a remote server with an automated password and no key?

I have a remote server. I planned to use public keys to connect over ssh without typing the password but the remote system rejects public key authentication. So what is the best way to do it? What about using `sshpass`?


script works fine on client machine but doesnt work in nagios

purpose: nagios check for kannel stuck     Date : dec 8, 2013          /etc/init.d/kannel status | grep -i -E "SMS: received" | awk '{ print $3 }' > kannel_temp_1.txt       /etc/init.d/kannel status | grep -i -E "SMS: received" | awk '{ print $7 }' > kannel_temp_2.txt         /etc/init.d/kannel status | grep -i -E "SMS: received" | awk '{ print $3 }' > kannel_temp_3.txt         /etc/init.d/kannel status | grep -i -E "SMS: received" | awk '{ print $7 }' > kannel_temp_4.txt          recvsms1=$(cat kannel_temp_2.txt) sentsms2=$(cat kannel_temp_3.txt) recvsms2=$(cat kannel_temp_4.txt)          if [ $sentsms1 == $sentsms2 ] && [ $recvsms1 == $recvsms2 ];     then        exitcode=0        statustxt=ok         else        exitcode=2        statustxt=critical        fi          echo "$exitcode - $statustxt"      My script works fine on client machine but returns the wrong information (always critical) in nagios.


How much can the space allocated for an LVM snapshot be reduced?

I created an LVM snapshot, then I modified the original logical volume, and now I see that I probably allocated too much space to hold the snapshot. And I want to reclaim some free space by reducing the space allocated for the snapshot. How can I check how much the space allocated for a snapshot can be reduced without breaking the snapshot? In other words: How to find out the space actually needed at the current moment for a snapshot to continue to exist? (If I know this minimal necessary size, then I probably can simply use `lvreduce` to reclaim more free space for the VG from the snapshot.)


API with no system calls

The book 'Understanding Linux Kernel' says that **'for something abstract such as math functions, there may be no reason to make system calls'**. Can any one please explain how is a system call not required in math functions? Isn't the CPU involved in mathematical operations? Can anyone give an example of such a program?


Enabling apt repository priority in LMDE

I want to set up apt repository priority ordering in Linux Mint Debian Edition 2012.04. In `/etc/apt/preferences` the order should be: LMDE -> Debian testing -> Debian unstable. In other words, I almost always want to use packages from LMDE semi-rolling repository, and only sometimes get them from testing and unstable only when absolutely necessary. I looked at http://forums.linuxmint.com/viewtopic.php?f=201&t=78882 and http://forums.linuxmint.com/viewtopic.php?f=141&p=379226, but still have not been able to get repository priority ordering to work correctly. What is the best way to do this?


How to determine if two devices are connected in network?

Is there a free linux softwear to determine if two network devices are connected? Or a php class can be also good... I'd like to draw the network topology. I can determine the devices in the network with zenmap (it saves the results to file), but I don't know which device connected to which device... (zenmap can also draw topology, but it doesn't save it to file)


Error Installing "ia32-libs" to run ADB and Fastboot Linux Mint 16 "Petra"

I have been trying to get `adb`, `fastboot`, `avd` and others to work with the latest version of Linux Mint (16 "Petra") I originally got this error when trying to run ADB:               ➜  platform-tools  ./adb     ./adb: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory      After looking around I found suggestions saying that you need to install 32-bit compatibility libraries. So, I tried to install the package `ia32-libs`, which, however, failed horribly.               ➜  ~  sudo apt-get install ia32-libs                                        Reading package lists... Done     Building dependency tree            Reading state information... Done     Some packages could not be installed. This may mean that you have     requested an impossible situation or if you are using the unstable     distribution that some required packages have not yet been created     or been moved out of Incoming.     The following information may help to resolve the situation:          The following packages have unmet dependencies:      ia32-libs :               Depends: bluez-alsa:i386 but it is not going to be installed              Depends: gstreamer0.10-plugins-base:i386 but it is not going to be installed              Depends: gstreamer0.10-plugins-good:i386 but it is not going to be installed              Depends: gtk2-engines:i386 but it is not going to be installed              Depends: gtk2-engines-murrine:i386 but it is not going to be installed              Depends: gtk2-engines-oxygen:i386 but it is not going to be installed              Depends: gtk2-engines-pixbuf:i386 but it is not going to be installed              Depends: gvfs:i386 but it is not going to be installed              Depends: ibus-gtk:i386 but it is not going to be installed              Depends: libacl1:i386 but it is not going to be installed              Depends: libao4:i386 but it is not going to be installed              Depends: libasound2:i386              Depends: libasound2-plugins:i386 but it is not going to be installed              Depends: libasyncns0:i386 but it is not going to be installed              Depends: libattr1:i386 but it is not going to be installed              Depends: libaudio2:i386 but it is not going to be installed              Depends: libcanberra-gtk-module:i386 but it is not going to be installed              Depends: libcap2:i386 but it is not going to be installed              Depends: libcapi20-3:i386 but it is not going to be installed              Depends: libcups2:i386 but it is not going to be installed              Depends: libcupsimage2:i386 but it is not going to be installed              Depends: libcurl3:i386 but it is not going to be installed              Depends: libdbus-glib-1-2:i386 but it is not going to be installed              Depends: libesd0:i386 but it is not going to be installed              Depends: libfontconfig1:i386 but it is not going to be installed              Depends: libfreetype6:i386 but it is not going to be installed              Depends: libgail-common:i386 but it is not going to be installed              Depends: libgconf-2-4:i386 but it is not going to be installed              Depends: libgdbm3:i386 but it is not going to be installed              Depends: libgettextpo0:i386 but it is not going to be installed              Depends: libglapi-mesa:i386 but it is not going to be installed              Depends: libglu1-mesa:i386 but it is not going to be installed              Depends: libgphoto2-6:i386 but it is not going to be installed              Depends: libgphoto2-port10:i386 but it is not going to be installed              Depends: libgtk2.0-0:i386 but it is not going to be installed              Depends: libmpg123-0:i386 but it is not going to be installed              Depends: libncursesw5:i386 but it is not going to be installed              Depends: libnspr4:i386 but it is not going to be installed              Depends: libnss3:i386 but it is not going to be installed              Depends: libodbc1:i386 but it is not going to be installed              Depends: libopenal1:i386 but it is not going to be installed              Depends: libpulse-mainloop-glib0:i386 but it is not going to be installed              Depends: libpulsedsp:i386 but it is not going to be installed              Depends: libqt4-dbus:i386 but it is not going to be installed              Depends: libqt4-network:i386 but it is not going to be installed              Depends: libqt4-opengl:i386 but it is not going to be installed              Depends: libqt4-qt3support:i386 but it is not going to be installed              Depends: libqt4-script:i386 but it is not going to be installed              Depends: libqt4-scripttools:i386 but it is not going to be installed              Depends: libqt4-sql:i386 but it is not going to be installed              Depends: libqt4-svg:i386 but it is not going to be installed              Depends: libqt4-test:i386 but it is not going to be installed              Depends: libqt4-xml:i386 but it is not going to be installed              Depends: libqt4-xmlpatterns:i386 but it is not going to be installed              Depends: libqtcore4:i386 but it is not going to be installed              Depends: libqtgui4:i386 but it is not going to be installed              Depends: libqtwebkit4:i386 but it is not going to be installed              Depends: librsvg2-common:i386 but it is not going to be installed              Depends: libsane:i386 but it is not going to be installed              Depends: libsdl-image1.2:i386 but it is not going to be installed              Depends: libsdl-mixer1.2:i386 but it is not going to be installed              Depends: libsdl-net1.2:i386 but it is not going to be installed              Depends: libsdl-ttf2.0-0:i386 but it is not going to be installed              Depends: libsdl1.2debian:i386 but it is not going to be installed              Depends: libsqlite3-0:i386 but it is not going to be installed              Depends: libssl0.9.8:i386 but it is not going to be installed              Depends: libssl1.0.0:i386 but it is not going to be installed              Depends: libstdc++5:i386 but it is not going to be installed              Depends: libstdc++6:i386 but it is not going to be installed              Depends: libxaw7:i386 but it is not going to be installed              Depends: libxml2:i386 but it is not going to be installed              Depends: libxp6:i386 but it is not going to be installed              Depends: libxslt1.1:i386 but it is not going to be installed              Depends: libxss1:i386 but it is not going to be installed              Depends: libxtst6:i386 but it is not going to be installed              Depends: odbcinst1debian2:i386 but it is not going to be installed              Depends: xaw3dg:i386 but it is not going to be installed              Depends: libgl1-mesa-dri:i386 but it is not going to be installed              Depends: libgl1-mesa-glx:i386 but it is not going to be installed              Depends: libpam-winbind:i386 but it is not going to be installed     E: Unable to correct problems, you have held broken packages.      Any help would be very much appreciated. EDIT: After following Rmano's suggestion to run this: `sudo apt-get install libc6:i386 libgcc1:i386 gcc-4.6-base:i386 libstdc++5:i386` I got this error about unmet dependencies:               ➜  ~  sudo apt-get install libc6:i386 libgcc1:i386 gcc-4.6-base:i386 libstdc++5:i386 libstdc++6:i386     [sudo] password for insanity:      Reading package lists... Done     Building dependency tree            Reading state information... Done     Some packages could not be installed. This may mean that you have     requested an impossible situation or if you are using the unstable     distribution that some required packages have not yet been created     or been moved out of Incoming.     The following information may help to resolve the situation:          The following packages have unmet dependencies:     libgcc1 : Breaks: libgcc1:i386 (!= 1:4.8.1-10ubuntu9) but 1:4.8.1-10ubuntu8 is to be installed     libgcc1:i386 : Depends: gcc-4.8-base:i386 (= 4.8.1-10ubuntu8) but it is not going to be installed                 Breaks: libgcc1 (!= 1:4.8.1-10ubuntu8) but 1:4.8.1-10ubuntu9 is to be installed     libstdc++6:i386 : Depends: gcc-4.8-base:i386 (= 4.8.1-10ubuntu8) but it is  not going to be installed     E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused  by held packages.      EDIT 2: It seems that I have to downgrade to an older version of a view core utils, however, I'm not sure that it is a safe idea.


GTK-2 error when installing Glassfish plugin for Eclipse on Fedora 16 64-bit

I have Eclipse running fine on my Fedora 16. I was following these instructions to install the Glassfish Tools Bundle for Eclipse (which has to be done outside Eclipse through its own installer) and, after I went through the installer successfully, the next step was to launch the eclipse launcher in the plugin directory (so not the regular Eclipse launcher). I got the following error:               > ./eclipse          (eclipse:2300): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",          (eclipse:2300): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",          (eclipse:2300): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",          (eclipse:2300): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",          (eclipse:2300): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",          (eclipse:2300): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",          (eclipse:2300): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",          (eclipse:2300): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",          (eclipse:2300): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",          (eclipse:2300): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",          (eclipse:2300): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",          (eclipse:2300): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",          (eclipse:2300): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",          (eclipse:2300): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",          (eclipse:2300): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",          (eclipse:2300): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",          (eclipse:2300): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",     Gtk-Message: Failed to load module "pk-gtk-module"     Gtk-Message: Failed to load module "canberra-gtk-module"      That was reported in the terminal. The GUI that popped up briefly said there is also an error log file under ~/workspace/.metadata/.log, which has the following:               !SESSION 2012-09-27 22:18:52.512 -----------------------------------------------     eclipse.buildId=M20090917-0800     java.version=1.6.0_16     java.vendor=Sun Microsystems Inc.     BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US     Framework arguments:  -pluginCustomization plugin_customization.ini -showsplash org.eclipse.platform     Command-line arguments:  -os linux -ws gtk -arch x86 -pluginCustomization plugin_customization.ini -showsplash org.eclipse.platform          !ENTRY org.eclipse.equinox.p2.directorywatcher 4 0 2012-09-27 22:19:01.715     !MESSAGE The installable unit org.eclipse.jdt.compiler.apt.translated_host_properties is missing the filename property.          !ENTRY org.eclipse.osgi 4 0 2012-09-27 22:19:07.181     !MESSAGE Application error     !STACK 1     java.lang.UnsatisfiedLinkError: no swt-pi-gtk-3555 or swt-pi-gtk in swt.library.path, java.library.path or the jar file         at org.eclipse.swt.internal.Library.loadLibrary(Library.java:254)         at org.eclipse.swt.internal.Library.loadLibrary(Library.java:159)         at org.eclipse.swt.internal.gtk.OS.<clinit>(OS.java:22)         at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63)         at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54)         at org.eclipse.swt.widgets.Display.<clinit>(Display.java:131)         at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:516)         at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:161)         at org.eclipse.ui.internal.ide.application.IDEApplication.createDisplay(IDEApplication.java:143)         at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:88)         at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)         at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)         at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)         at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)         at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)         at java.lang.reflect.Method.invoke(Method.java:597)         at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)         at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)         at org.eclipse.equinox.launcher.Main.run(Main.java:1311)     !SESSION 2012-09-27 22:22:17.706 -----------------------------------------------     eclipse.buildId=M20090917-0800     java.version=1.6.0_16     java.vendor=Sun Microsystems Inc.     BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US     Framework arguments:  -pluginCustomization plugin_customization.ini -showsplash org.eclipse.platform     Command-line arguments:  -os linux -ws gtk -arch x86 -pluginCustomization plugin_customization.ini -showsplash org.eclipse.platform      I found this site but I can't follow the instructions there to save my life. All I understand is that GTK-2 needs some 32-bit libs even though the system is 64-bit but it is trying to open 64-bit ones. Help please


/dev/sdb keeps changing to whatever disk contains Windows 7?

I am trying to install Windows 7 on `/dev/sda` and Ubuntu 12.04 on `/dev/sdb`. Initially I installed Windows 7 on (call it disk 1) and when I begun installing Ubuntu it said Windows 7 was on `/dev/sdb`. Therefore I deleted Win 7 and re-installed windows on disk 2 (I didnt change any boot priorities in the BIOS). However, when I then went to install Ubuntu for a second time Windows 7 was still on `/dev/sdb`.   In other words `/dev/sdb` had changed from disk 1 to disk 2 when all I did was delete the Windows partition and install it on the other disk. I don't get why the disk I install Windows 7 on becomes `/dev/sdb` when I go to install Ubuntu.


fdisk (expert mode) options

On GNU/Linux with `fdisk (util-linux 2.20.1)`, when using, say `fdisk /dev/sda3` there are quite some options and the and even an "expert mode" (`x`). Most of these are explained through the `m` option. But I can't find an documentation on these, neither in the `man` not the `info` page. As I don't want to fumble around with my file systems at the moment - any idea? Just to make this clear: I'm not talking about the "regular" option, e.g. `fdisk -v` but the ones where `fdisk`first had to be started. My guess was that I might get luck in another, related `man`page but I couldn't find anything so far. Did I miss something?


What sets a child's STDERR, STDOUT, and STDIN?

If a program runs `fork()` what sets standard streams `STDOUT`, `STDIN` and `STDERR`?


Piping to the command substitution of a string containing pipes

This works—               $ x='grep a'     $ echo ab | $x     ab      This doesn't—               $ x='grep a | grep b'     $ echo ab | $x     grep: |: No such file or directory     grep: grep: No such file or directory     grep: b: No such file or directory      It appears in the latter case, `grep a | grep b` is seen as a single command, _i.e._ `grep a \| grep b`. How do I get the second example to work without modifying `x`?


Is this command safe to run from / as root

find . * -depth -print0 | xargs -0 rmdir      It finds and removes all empty folders (including hidden ones) recursively. **I only tired it on my home folder and a pendrive in Linux PC and it worked but I dont know if it is safe to run from / as root** I once nuked my OS by running some command off the internet (which I didnt understand) like that


CentOS 6.5 sound permissions

I am trying to configure ALSA for a CentOS 6.5 minimal install, my problem is non-root users do not have permission to access the sound devices in /dev/snd because the files are missing access control lists:               dispcentos:~$ ls -l /dev/snd     total 0     drwxr-xr-x 2 root root      60 Jan  7 02:21 by-path/     crw-rw---- 1 root audio 116, 8 Jan  7 02:21 controlC0     crw-rw---- 1 root audio 116, 4 Jan  7 02:21 midiC0D0     crw-rw---- 1 root audio 116, 7 Jan  7 02:21 pcmC0D0c     crw-rw---- 1 root audio 116, 6 Jan  7 02:21 pcmC0D0p     crw-rw---- 1 root audio 116, 5 Jan  7 02:21 pcmC0D1p     crw-rw---- 1 root audio 116, 3 Jan  7 02:21 seq     crw-rw---- 1 root audio 116, 2 Jan  7 02:21 timer      Previous suggestions have been to add the users to the audio group but this should not be necessary. The output of udevadm info shows that the ACL_MANAGE property is present as a result of /lib/udev/rules.d/70-acl.rules:               dispcentos:~$ udevadm info --query=all --name=/dev/snd/pcmC0D0c     P: /devices/pci0000:00/0000:00:11.0/0000:02:02.0/sound/card0/pcmC0D0c     N: snd/pcmC0D0c     S: char/116:7     E: UDEV_LOG=3     E: DEVPATH=/devices/pci0000:00/0000:00:11.0/0000:02:02.0/sound/card0/pcmC0D0c     E: MAJOR=116     E: MINOR=7     E: DEVNAME=/dev/snd/pcmC0D0c     E: SUBSYSTEM=sound     E: ACL_MANAGE=1     E: DEVLINKS=/dev/char/116:7      But the output of udevadm test shows that udev-acl is not run for the device:               dispcentos:~$ udevadm test /devices/pci0000:00/0000:00:11.0/0000:02:02.0/sound/card0/pcmC0D0c     run_command: calling: test     udevadm_test: version 147     This program is for debugging only, it does not run any program,     specified by a RUN key. It may show incorrect results, because     some values may be different, or not available at a simulation run.          parse_file: reading '/lib/udev/rules.d/01-log-block.rules' as rules file     parse_file: reading '/lib/udev/rules.d/10-console.rules' as rules file     parse_file: reading '/lib/udev/rules.d/10-dm.rules' as rules file     parse_file: reading '/lib/udev/rules.d/11-dm-lvm.rules' as rules file     parse_file: reading '/lib/udev/rules.d/13-dm-disk.rules' as rules file     parse_file: reading '/lib/udev/rules.d/40-isdn.rules' as rules file     parse_file: reading '/lib/udev/rules.d/40-multipath.rules' as rules file     parse_file: reading '/lib/udev/rules.d/40-redhat.rules' as rules file     parse_file: reading '/lib/udev/rules.d/42-qemu-usb.rules' as rules file     parse_file: reading '/lib/udev/rules.d/50-firmware.rules' as rules file     parse_file: reading '/lib/udev/rules.d/50-udev-default.rules' as rules file     parse_file: reading '/lib/udev/rules.d/60-alias-kmsg.rules' as rules file     parse_file: reading '/lib/udev/rules.d/60-cdrom_id.rules' as rules file     parse_file: reading '/lib/udev/rules.d/60-net.rules' as rules file     parse_file: reading '/lib/udev/rules.d/60-persistent-alsa.rules' as rules file     parse_file: reading '/lib/udev/rules.d/60-persistent-input.rules' as rules file     parse_file: reading '/lib/udev/rules.d/60-persistent-serial.rules' as rules file     parse_file: reading '/lib/udev/rules.d/60-persistent-storage-tape.rules' as rules file     parse_file: reading '/lib/udev/rules.d/60-persistent-storage.rules' as rules file     parse_file: reading '/lib/udev/rules.d/60-persistent-v4l.rules' as rules file     parse_file: reading '/etc/udev/rules.d/60-raw.rules' as rules file     parse_file: reading '/lib/udev/rules.d/61-mobile-action.rules' as rules file     parse_file: reading '/lib/udev/rules.d/61-option-modem-modeswitch.rules' as rules file     parse_file: reading '/lib/udev/rules.d/61-persistent-storage-edd.rules' as rules file     parse_file: reading '/lib/udev/rules.d/64-device-mapper.rules' as rules file     parse_file: reading '/lib/udev/rules.d/64-md-raid.rules' as rules file     parse_file: reading '/lib/udev/rules.d/65-md-incremental.rules' as rules file     parse_file: reading '/lib/udev/rules.d/69-dm-lvm-metad.rules' as rules file     parse_file: reading '/lib/udev/rules.d/70-acl.rules' as rules file     parse_file: reading '/lib/udev/rules.d/70-hid2hci.rules' as rules file     parse_file: reading '/etc/udev/rules.d/70-persistent-cd.rules' as rules file     parse_file: reading '/etc/udev/rules.d/70-persistent-net.rules' as rules file     parse_file: reading '/lib/udev/rules.d/75-cd-aliases-generator.rules' as rules file     parse_file: reading '/lib/udev/rules.d/75-net-description.rules' as rules file     parse_file: reading '/lib/udev/rules.d/75-persistent-net-generator.rules' as rules file     parse_file: reading '/lib/udev/rules.d/75-tty-description.rules' as rules file     parse_file: reading '/lib/udev/rules.d/78-sound-card.rules' as rules file     parse_file: reading '/lib/udev/rules.d/79-fstab_import.rules' as rules file     parse_file: reading '/lib/udev/rules.d/80-drivers.rules' as rules file     parse_file: reading '/lib/udev/rules.d/80-iosched.rules' as rules file     parse_file: reading '/lib/udev/rules.d/80-mpath-iosched.rules' as rules file     parse_file: reading '/lib/udev/rules.d/81-kvm-rhel.rules' as rules file     parse_file: reading '/lib/udev/rules.d/88-clock.rules' as rules file     parse_file: reading '/etc/udev/rules.d/90-alsa.rules' as rules file     parse_file: reading '/lib/udev/rules.d/91-drm-modeset.rules' as rules file     parse_file: reading '/lib/udev/rules.d/95-dm-notify.rules' as rules file     parse_file: reading '/lib/udev/rules.d/95-keyboard-force-release.rules' as rules file     parse_file: reading '/lib/udev/rules.d/95-keymap.rules' as rules file     parse_file: reading '/lib/udev/rules.d/95-udev-late.rules' as rules file     parse_file: reading '/etc/udev/rules.d/99-fuse.rules' as rules file     parse_file: reading '/dev/.udev/rules.d/99-root.rules' as rules file     parse_file: reading '/etc/udev/rules.d/99-tty.rules' as rules file     udev_rules_new: rules use 30936 bytes tokens (2578 * 12 bytes), 18240 bytes buffer     udev_rules_new: temporary index used 18460 bytes (923 * 20 bytes)     udev_device_new_from_syspath: device 0x1671c38 has devpath '/devices/pci0000:00/0000:00:11.0/0000:02:02.0/sound/card0/pcmC0D0c'     udev_device_new_from_syspath: device 0x16620a8 has devpath '/devices/pci0000:00/0000:00:11.0/0000:02:02.0/sound/card0/pcmC0D0c'     udev_device_read_db: device 0x16620a8 filled with db file data     udev_rules_apply_to_event: LINK 'char/116:7' /lib/udev/rules.d/50-udev-default.rules:4     udev_rules_apply_to_event: GROUP 63 /lib/udev/rules.d/50-udev-default.rules:46     udev_event_execute_rules: no node name set, will use kernel supplied name 'snd/pcmC0D0c'     udev_device_update_db: unable to create db file '/dev/.udev/db/sound:pcmC0D0c': Permission denied     udev_node_add: creating device node '/dev/snd/pcmC0D0c', devnum=116:7, mode=0660, uid=0, gid=63     udev_node_mknod: preserve file '/dev/snd/pcmC0D0c', because it has correct dev_t     udev_node_mknod: preserve permissions /dev/snd/pcmC0D0c, 020660, uid=0, gid=63     node_symlink: preserve already existing symlink '/dev/char/116:7' to '../snd/pcmC0D0c'     udevadm_test: UDEV_LOG=6     udevadm_test: DEVPATH=/devices/pci0000:00/0000:00:11.0/0000:02:02.0/sound/card0/pcmC0D0c     udevadm_test: MAJOR=116     udevadm_test: MINOR=7     udevadm_test: DEVNAME=/dev/snd/pcmC0D0c     udevadm_test: ACTION=add     udevadm_test: SUBSYSTEM=sound     udevadm_test: DEVLINKS=/dev/char/116:7     udevadm_test: ACL_MANAGE=1      Here is the output from a previous release (6.4) for comparison:               dispcentos:mms$ ls -l /dev/snd     total 0     drwxr-xr-x  2 root root      60 Jan  7 07:13 by-path/     crw-rw----+ 1 root audio 116, 8 Jan  7 07:13 controlC0     crw-rw----+ 1 root audio 116, 4 Jan  7 07:13 midiC0D0     crw-rw----+ 1 root audio 116, 7 Jan  7 07:14 pcmC0D0c     crw-rw----+ 1 root audio 116, 6 Jan  7 07:16 pcmC0D0p     crw-rw----+ 1 root audio 116, 5 Jan  7 07:13 pcmC0D1p     crw-rw----+ 1 root audio 116, 3 Jan  7 07:13 seq     crw-rw----+ 1 root audio 116, 2 Jan  7 07:13 timer          dispcentos:mms$ getfacl /dev/snd/pcmC0D0c      getfacl: Removing leading '/' from absolute path names     # file: dev/snd/pcmC0D0c     # owner: root     # group: audio     user::rw-     user:mms:rw-     group::rw-     mask::rw-     other::---      * * *               dispcentos:mms$ udevadm info --query=all --name=/dev/snd/pcmC0D0c     P: /devices/pci0000:00/0000:00:11.0/0000:02:02.0/sound/card0/pcmC0D0c     N: snd/pcmC0D0c     S: char/116:7     E: UDEV_LOG=3     E: DEVPATH=/devices/pci0000:00/0000:00:11.0/0000:02:02.0/sound/card0/pcmC0D0c     E: MAJOR=116     E: MINOR=7     E: DEVNAME=/dev/snd/pcmC0D0c     E: SUBSYSTEM=sound     E: ACL_MANAGE=1     E: DEVLINKS=/dev/char/116:7      * * *               dispcentos:mms$ udevadm test /devices/pci0000:00/0000:00:11.0/0000:02:02.0/sound/card0/pcmC0D0c     run_command: calling: test     udevadm_test: version 147     This program is for debugging only, it does not run any program,     specified by a RUN key. It may show incorrect results, because     some values may be different, or not available at a simulation run.          parse_file: reading '/lib/udev/rules.d/10-console.rules' as rules file     parse_file: reading '/lib/udev/rules.d/10-dm.rules' as rules file     parse_file: reading '/lib/udev/rules.d/11-dm-lvm.rules' as rules file     parse_file: reading '/lib/udev/rules.d/13-dm-disk.rules' as rules file     parse_file: reading '/lib/udev/rules.d/40-isdn.rules' as rules file     parse_file: reading '/lib/udev/rules.d/40-libgphoto2.rules' as rules file     parse_file: reading '/lib/udev/rules.d/40-redhat.rules' as rules file     parse_file: reading '/lib/udev/rules.d/40-usb-media-players.rules' as rules file     parse_file: reading '/lib/udev/rules.d/42-qemu-usb.rules' as rules file     parse_file: reading '/lib/udev/rules.d/50-firmware.rules' as rules file     parse_file: reading '/lib/udev/rules.d/50-udev-default.rules' as rules file     parse_file: reading '/lib/udev/rules.d/60-alias-kmsg.rules' as rules file     parse_file: reading '/lib/udev/rules.d/60-cdrom_id.rules' as rules file     parse_file: reading '/etc/udev/rules.d/60-fprint-autosuspend.rules' as rules file     parse_file: reading '/lib/udev/rules.d/60-libmtp.rules' as rules file     parse_file: reading '/lib/udev/rules.d/60-net.rules' as rules file     parse_file: reading '/etc/udev/rules.d/60-pcmcia.rules' as rules file     parse_file: reading '/lib/udev/rules.d/60-persistent-alsa.rules' as rules file     parse_file: reading '/lib/udev/rules.d/60-persistent-input.rules' as rules file     parse_file: reading '/lib/udev/rules.d/60-persistent-serial.rules' as rules file     parse_file: reading '/lib/udev/rules.d/60-persistent-storage-tape.rules' as rules file     parse_file: reading '/lib/udev/rules.d/60-persistent-storage.rules' as rules file     parse_file: reading '/lib/udev/rules.d/60-persistent-v4l.rules' as rules file     parse_file: reading '/etc/udev/rules.d/60-raw.rules' as rules file     parse_file: reading '/lib/udev/rules.d/60-wacom.rules' as rules file     parse_file: reading '/lib/udev/rules.d/61-gnome-bluetooth-rfkill.rules' as rules file     parse_file: reading '/lib/udev/rules.d/61-mobile-action.rules' as rules file     parse_file: reading '/lib/udev/rules.d/61-option-modem-modeswitch.rules' as rules file     parse_file: reading '/lib/udev/rules.d/61-persistent-storage-edd.rules' as rules file     parse_file: reading '/lib/udev/rules.d/61-uinput-stddev.rules' as rules file     parse_file: reading '/lib/udev/rules.d/61-uinput-wacom.rules' as rules file     parse_file: reading '/lib/udev/rules.d/64-device-mapper.rules' as rules file     parse_file: reading '/lib/udev/rules.d/64-md-raid.rules' as rules file     parse_file: reading '/lib/udev/rules.d/65-libsane.rules' as rules file     parse_file: reading '/lib/udev/rules.d/65-libwacom.rules' as rules file     parse_file: reading '/lib/udev/rules.d/65-md-incremental.rules' as rules file     parse_file: reading '/lib/udev/rules.d/69-dm-lvm-metad.rules' as rules file     parse_file: reading '/lib/udev/rules.d/69-pilot-link.rules' as rules file     parse_file: reading '/lib/udev/rules.d/70-acl.rules' as rules file     parse_file: reading '/lib/udev/rules.d/70-cups-libusb.rules' as rules file     parse_file: reading '/lib/udev/rules.d/70-hid2hci.rules' as rules file     parse_file: reading '/etc/udev/rules.d/70-persistent-cd.rules' as rules file     parse_file: reading '/etc/udev/rules.d/70-persistent-net.rules' as rules file     parse_file: reading '/lib/udev/rules.d/70-printers.rules' as rules file     parse_file: reading '/lib/udev/rules.d/71-biosdevname.rules' as rules file     parse_file: reading '/lib/udev/rules.d/75-cd-aliases-generator.rules' as rules file     parse_file: reading '/lib/udev/rules.d/75-net-description.rules' as rules file     parse_file: reading '/lib/udev/rules.d/75-persistent-net-generator.rules' as rules file     parse_file: reading '/lib/udev/rules.d/75-tty-description.rules' as rules file     parse_file: reading '/lib/udev/rules.d/77-mm-ericsson-mbm.rules' as rules file     parse_file: reading '/lib/udev/rules.d/77-mm-longcheer-port-types.rules' as rules file     parse_file: reading '/lib/udev/rules.d/77-mm-pcmcia-device-blacklist.rules' as rules file     parse_file: reading '/lib/udev/rules.d/77-mm-platform-serial-whitelist.rules' as rules file     parse_file: reading '/lib/udev/rules.d/77-mm-simtech-port-types.rules' as rules file     parse_file: reading '/lib/udev/rules.d/77-mm-usb-device-blacklist.rules' as rules file     parse_file: reading '/lib/udev/rules.d/77-mm-zte-port-types.rules' as rules file     parse_file: reading '/lib/udev/rules.d/77-nm-olpc-mesh.rules' as rules file     parse_file: reading '/lib/udev/rules.d/78-sound-card.rules' as rules file     parse_file: reading '/lib/udev/rules.d/79-fstab_import.rules' as rules file     parse_file: reading '/lib/udev/rules.d/80-drivers.rules' as rules file     parse_file: reading '/lib/udev/rules.d/80-iosched.rules' as rules file     parse_file: reading '/lib/udev/rules.d/80-mpath-iosched.rules' as rules file     parse_file: reading '/lib/udev/rules.d/80-udisks.rules' as rules file     parse_file: reading '/lib/udev/rules.d/85-regulatory.rules' as rules file     parse_file: reading '/lib/udev/rules.d/85-usbmuxd.rules' as rules file     parse_file: reading '/lib/udev/rules.d/88-clock.rules' as rules file     parse_file: reading '/lib/udev/rules.d/89-microcode.rules' as rules file     parse_file: reading '/etc/udev/rules.d/90-alsa.rules' as rules file     parse_file: reading '/etc/udev/rules.d/90-hal.rules' as rules file     parse_file: reading '/lib/udev/rules.d/90-pulseaudio.rules' as rules file     parse_file: reading '/lib/udev/rules.d/91-drm-modeset.rules' as rules file     parse_file: reading '/lib/udev/rules.d/95-devkit-power-battery-recall-dell.rules' as rules file     parse_file: reading '/lib/udev/rules.d/95-devkit-power-battery-recall-fujitsu.rules' as rules file     parse_file: reading '/lib/udev/rules.d/95-devkit-power-battery-recall-gateway.rules' as rules file     parse_file: reading '/lib/udev/rules.d/95-devkit-power-battery-recall-ibm.rules' as rules file     parse_file: reading '/lib/udev/rules.d/95-devkit-power-battery-recall-lenovo.rules' as rules file     parse_file: reading '/lib/udev/rules.d/95-devkit-power-battery-recall-toshiba.rules' as rules file     parse_file: reading '/lib/udev/rules.d/95-devkit-power-csr.rules' as rules file     parse_file: reading '/lib/udev/rules.d/95-devkit-power-hid.rules' as rules file     parse_file: reading '/lib/udev/rules.d/95-devkit-power-wup.rules' as rules file     parse_file: reading '/lib/udev/rules.d/95-dm-notify.rules' as rules file     parse_file: reading '/lib/udev/rules.d/95-keyboard-force-release.rules' as rules file     parse_file: reading '/lib/udev/rules.d/95-keymap.rules' as rules file     parse_file: reading '/lib/udev/rules.d/95-udev-late.rules' as rules file     parse_file: reading '/etc/udev/rules.d/97-bluetooth-serial.rules' as rules file     parse_file: reading '/lib/udev/rules.d/97-bluetooth.rules' as rules file     parse_file: reading '/etc/udev/rules.d/98-kexec.rules' as rules file     parse_file: reading '/etc/udev/rules.d/99-fuse.rules' as rules file     parse_file: reading '/dev/.udev/rules.d/99-root.rules' as rules file     parse_file: reading '/etc/udev/rules.d/99-tty.rules' as rules file     parse_file: reading '/etc/udev/rules.d/99-vmware-scsi-udev.rules' as rules file     udev_rules_new: rules use 187884 bytes tokens (15657 * 12 bytes), 39574 bytes buffer     udev_rules_new: temporary index used 59740 bytes (2987 * 20 bytes)     udev_device_new_from_syspath: device 0x218d3e0 has devpath '/devices/pci0000:00/0000:00:11.0/0000:02:02.0/sound/card0/pcmC0D0c'     udev_device_new_from_syspath: device 0x2175148 has devpath '/devices/pci0000:00/0000:00:11.0/0000:02:02.0/sound/card0/pcmC0D0c'     udev_device_read_db: device 0x2175148 filled with db file data     udev_rules_apply_to_event: LINK 'char/116:7' /lib/udev/rules.d/50-udev-default.rules:4     udev_rules_apply_to_event: GROUP 63 /lib/udev/rules.d/50-udev-default.rules:46     udev_device_new_from_syspath: device 0x218d590 has devpath '/devices/pci0000:00/0000:00:11.0/0000:02:02.0/sound/card0'     udev_device_new_from_syspath: device 0x218d858 has devpath '/devices/pci0000:00/0000:00:11.0/0000:02:02.0'     udev_device_new_from_syspath: device 0x218da30 has devpath '/devices/pci0000:00/0000:00:11.0'     udev_device_new_from_syspath: device 0x218dbf0 has devpath '/devices/pci0000:00'     udev_rules_apply_to_event: RUN 'udev-acl --action=$env{ACTION} --device=$env{DEVNAME}' /lib/udev/rules.d/70-acl.rules:53     udev_rules_apply_to_event: RUN 'socket:@/org/freedesktop/hal/udev_event' /etc/udev/rules.d/90-hal.rules:2     udev_event_execute_rules: no node name set, will use kernel supplied name 'snd/pcmC0D0c'     udev_device_update_db: unable to create db file '/dev/.udev/db/sound:pcmC0D0c': Permission denied     udev_node_add: creating device node '/dev/snd/pcmC0D0c', devnum=116:7, mode=0660, uid=0, gid=63     udev_node_mknod: preserve file '/dev/snd/pcmC0D0c', because it has correct dev_t     udev_node_mknod: preserve permissions /dev/snd/pcmC0D0c, 020660, uid=0, gid=63     node_symlink: preserve already existing symlink '/dev/char/116:7' to '../snd/pcmC0D0c'     udevadm_test: UDEV_LOG=6     udevadm_test: DEVPATH=/devices/pci0000:00/0000:00:11.0/0000:02:02.0/sound/card0/pcmC0D0c     udevadm_test: MAJOR=116     udevadm_test: MINOR=7     udevadm_test: DEVNAME=/dev/snd/pcmC0D0c     udevadm_test: ACTION=add     udevadm_test: SUBSYSTEM=sound     udevadm_test: DEVLINKS=/dev/char/116:7     udevadm_test: ACL_MANAGE=1     udevadm_test: run: 'udev-acl --action=add --device=/dev/snd/pcmC0D0c'     udevadm_test: run: 'socket:@/org/freedesktop/hal/udev_event'      You will see the following two lines from udevadm test that are missing from the CentOS 6.5 minimal installation:               udev_rules_apply_to_event: RUN 'udev-acl --action=$env{ACTION} --device=$env{DEVNAME}' /lib/udev/rules.d/70-acl.rules:53     udevadm_test: run: 'udev-acl --action=add --device=/dev/snd/pcmC0D0c'      Any ideas why?


Windows 7 to Linux: install without CD/DVD or USB drive

Update Sorry, Question has multiple parts see below for details: I have been using Windows for many years and only used Linux from the command line, but want to shift after realizing Windows is sloowww. Following http://mightydreams.blogspot.in/2007/09/i-am-describing-here-method- to-install.html and http://www.instantfundas.com/2007/08/install-any-linux- distro-directly-from.html Is there a better set of instructions? (I do not have a USB or CD/DVD) Have got "debian-7.0.0-amd64-DVD-1.iso" and disks 2 & 3 and renamed 1 to `d1.iso`. Step 2 says to copy `vmlinuz` and `initrd.gz` to the \C drive But I found these files in 3 places (I did a `7z.exe l -path-to-iso- >files.list`)               install.amd\gtk\vmlinuz     install.amd\vmlinuz (update plan on using this but stuck at grub see below)     install.amd\xen\vmlinuz And similarly:               install.amd\initrd.gz      install.amd\xen\initrd.gz     install.amd\gtk\initrd.gz Which one to use? * * * Stuck at grub ... Made the entry using bcdedit but it says grub is not valid. downloaded grub from the sourceforge site, copied it and pointed to it               bcdedit /create /d Linux /application  OSLOADER     bcdedit /set  {c1e718e7-3d90-11e1-a4c8-b5a356ae5e29} device partition=c:      bcdedit /set   {c1e718e7-3d90-11e1-a4c8-b5a356ae5e29}  path \grub\grub.exe          bcdedit -v      Gives me               Windows Boot Manager     --------------------     identifier              {9dea862c-5cdd-4e70-acc1-f32b344d4795}     device                  partition=\Device\HarddiskVolume2     description             Windows Boot Manager     locale                  en-US     inherit                 {7ea2e1ac-2e61-4728-aaa3-896d9d0a9f0e}     default                 {c1e718e2-3d90-11e1-a4c8-b5a356ae5e29}     resumeobject            {c1e718e1-3d90-11e1-a4c8-b5a356ae5e29}     displayorder            {c1e718e2-3d90-11e1-a4c8-b5a356ae5e29}                 {c1e718e7-3d90-11e1-a4c8-b5a356ae5e29}     toolsdisplayorder       {b2721d73-1db4-4c62-bf78-c548a880142d}     timeout                 30          Windows Boot Loader     -------------------     identifier              {c1e718e2-3d90-11e1-a4c8-b5a356ae5e29}     device                  partition=C:     path                    \Windows\system32\winload.exe     description             Windows 7     locale                  en-US     inherit                 {6efb52bf-1766-41db-a6b3-0ee5eff72bd7}     recoverysequence        {c1e718e3-3d90-11e1-a4c8-b5a356ae5e29}     recoveryenabled         Yes     osdevice                partition=C:     systemroot              \Windows     resumeobject            {c1e718e1-3d90-11e1-a4c8-b5a356ae5e29}     nx                      OptIn          Windows Boot Loader     -------------------     identifier              {c1e718e7-3d90-11e1-a4c8-b5a356ae5e29}     device                  partition=C:     path                    \grub\grub.exe     description             Linux


error using "du" command

I am on the university machine trying to estimate the disk usage I have on my space I do               du -csh ./      from the begining of my account, but an error is given that ./Yesterday/Yesterday is not a device, so I do               du -csh --exclude="Yes*" ./      and the error is stopped. But is there a more elegant way, and why is this error emerging? I can image how the Yesterday of Yesterday gets removed but whats the concepts behind the error. Best, 1) **using stat:**               [ratz]s0128943: stat Yesterday      File: `Yesterday'      Size: 12288 Blocks: 24 IO Block: 4096 directory      Device: 1dh/29d      Inode: 714342402      Links: 90 Access: (0745/drwxr--r-x)      Uid: (35559/s0128943)      Gid: (28065/ UNKNOWN)      Access: 2010-10-15 13:06:07.000000000 +0100      Modify: 2010-10-15 13:06:07.000000000 +0100      Change: 2010-10-15 13:06:07.000000000 +0100      2) **using stat on Yesterday/Yesterday**               stat ./Yesterday/Yesterday      stat: cannot stat `./Yesterday/Yesterday': No such device       3) **using uname for details**               [ratz]s0128943: uname -srv      Linux 2.6.18-194.3.1.el5.inf.1 #1 SMP Fri May 21 12:59:58 BST 2010       4) **using df on Yesterday/**               [ratz]s0128943: df Yesterday/     Filesystem           1K-blocks      Used Available Use% Mounted on     AFS                    9000000         0   9000000   0% /afs      5) **using df on Yesterday/Yesterday**               df Yesterday/Yesterday      df: `Yesterday/Yesterday': No such device      6) `mount | grep Yesterday` produces nothing


pulseaudio suddenly stopped working?

I am using arch linux and i was using pulseaudio suddenly today pulseaudio stopped working and no sound is coming in both my speaker and headphone. I can see pulseaudio is running properly and I am able to hear the beep sound from my computer but not any other sound??? any suggestions please I had already read the wiki page. I run pulseaudio as root and I had added my root in audio group


How to disable USB autosuspend on kernel 3.7.10 or above?

I've updated my HTPC from kernel **3.7.10** to **3.10.7** and it seems **CONFIG_USB_SUSPEND** is now gone from the kernel options and included in PM. The main problem I'm facing is that I have an external HDD and when suspending and waking up the HTPC, it isn't available to the system. The HDD wakes up (you can hear it spin up again), but when you try to access the mount point you get the following error:               ZOTAC ~ # ls /media     ls: reading directory /media: Input/output error      And on dmesg:               [  253.278260] EXT4-fs warning (device sdb1): __ext4_read_dirblock:908: error reading   directory block (ino 2, block 0)      In previous kernels, setting CONFIG_USB_SUSPEND=N would solve the problem, as the HDD would handle its hibernation by itself and the mount point was always accesible. When the HDD was on sleep and the HTPC needed something from the HDD's mount point, the HDD itself would wake up and operate without issues. Right now I've tried the following without success:   1. Manually change **/sys/bus/usb/devices/usb*/power/control** to _"on"_ instead of _"auto"_.    2. Manually change **/sys/bus/usb/devices/usb*/power/autosuspend** to _"-1"_ instead of _"0"_.  But when waking up again the HTPC, the mount point is again inaccesible. As workarround I can unmount and remount the mount point and it works again without problems, but I'm sure there should be a way to avoid having the OS handle the usb autosuspend. Any idea how to disable usb autosuspend on kernel 3.7.10 or above?


Changing my default primary GID for every login session

I read the following about `newgrp`:               The newgrp command is used to change the current group ID during a            login session.       This made me think, how can I change my default's primary group **permanently**? I imagine I can have a `newgrp` line in my startup files for my shell, but is there a way to change my primary ID for every login session without resorting to `newgrp`? I am interested in a generic solution, but in case it depends on the distribution, I am interested in solutions for **Ubuntu 11.10** and for **Red Hat Enterprise Linux Server** (I have administrator priviledges in the former, but not in the latter). ### Addendum: From the great answer @Shawn provided below to the these questions, I read "I won't be able to do this without root privileges". This made me wonder: **why?** Assuming that I have privileges to run `newgrp` immiediately after login, wouldn't this be the same as changing my default primary GUID for all practical purposes?


Where to find the downloaded file after dragging a FTP URL to the terminal?

Usually, when I drag a link to the terminal, the link target is pasted in the terminal. However, when I just dragged a FTP link from Chromium to my Terminal (first result on Google for "ftp pdf", ftp://ftp.ipswitch.com/ipswitch/manuals/ftpserv.pdf), a file download was immediately initiated (I knew because a desktop notification appeared). I tried to locate the downloaded file using `find ~ -iname '*.pdf'` (also in `/tmp`), but I didn't find any traces. When I tried to reproduce the problem by dragging the ftp-URL again, the download completed much faster than before, from which I infer that the file is still cached, somewhere. So, my question are:   * Why is the ftp resource being downloaded after I drag the link to my Terminal?   (instead of being pasted as text, like http-URLs)   * Where can I find the downloaded file? (I want to delete it)


Why does command substitution fails in ssh remote call?

I have this script:               exportFile(){         file=$1         skippedBytes=$2         exportCommandString=$3              #This works:         #dd if=$file bs=1 skip=$skippedBytes | ssh sshConnection 'cat - >> /remote/dir/myTarget.txt.output' > export.output 2>&1              #This does not work:         dd if=$file bs=1 skip=$skippedBytes | $($exportCommandString $file) > export.output 2>&1              cat export.output     }          sshExportCommand(){         userAtServer=$1         targetDir=$2         filename=$3         echo 'ssh '$userAtServer' '\''cat - >> '$targetDir'/'$filename'.output'\'         #Same result with this:         #echo "ssh $userAtServer 'cat - >> $targetDir/$filename.output'"      }          exportFile mySource.txt 9 "sshExportCommand sshConnection /remote/dir myTarget.txt"      When invoking it, I obtain the following output:               85+0 records in     85+0 records out     85 bytes (85 B) copied, 0.00080048 s, 106 kB/s     Read bytes: 85     ovh_ssh: cat - >> /remote/dir/myTarget.txt.output: No such file or directory      What does prevent this from working ? Is this command substitution ? Anything else I missed ?


touchpad scrolling lost when switching between physical and virtual tty

I have setup touchpad scrolling by running the following script in .xsession               $ cat ~/bin/enablescrolling      # enable two finger scroll     synclient VertTwoFingerScroll=1     synclient HorizTwoFingerScroll=1     synclient EmulateTwoFingerMinW=5     synclient EmulateTwoFingerMinZ=48      .xsession               $ cat ~/.xsession     ....     enablescrolling     ....     gnome-session --session cinnamon      when i switch to /dev/tty6 and come back to /dev/tty8, I lose scrolling. I have captured a few logs. Can someone please point out why this happens? /var/log/syslog               Mar 10 19:15:00 rag-tos-laptop acpid: client 1411[0:0] has disconnected     Mar 10 19:15:00 rag-tos-laptop acpid: client connected from 1411[0:0]     Mar 10 19:15:00 rag-tos-laptop acpid: 1 client rule loaded      /var/log/ConsoleKit/history               1362942899.557 type=SEAT_ACTIVE_SESSION_CHANGED : seat-id='Seat1' session-id=''     1362942900.367 type=SEAT_ACTIVE_SESSION_CHANGED : seat-id='Seat1' session-id='Session1'      /var/log/Xorg.0.log                18561.016] (II) XKB: reuse xkmfile /var/lib/xkb/server-20D7C92BD55EB53CEBBE18F981CB2A77F469F038.xkm     [ 18812.499] (II) AIGLX: Suspending AIGLX clients for VT switch     [ 18814.442] (II) Open ACPI successful (/var/run/acpid.socket)     [ 18814.442] (II) AIGLX: Resuming AIGLX clients after VT switch     [ 18814.953] (--) synaptics: SynPS/2 Synaptics TouchPad: touchpad found     [ 18819.746] (II) XKB: reuse xkmfile /var/lib/xkb/server-20D7C92BD55EB53CEBBE18F981CB2A77F469F038.x


Creating Windows self-extracting executables that can auto-run a script

Does a tool exist (preferably packaged in Debian) to create Windows self- extracting executables that can auto-run a script in the archive once the extracting is done? I've been toying with NSIS but I am not sure it can do what I'm asking and is rather heavyweight for this purpose.


Grep for single and double digit

i have path name as below,   1. abc4/2012   2. abc4/2013   3. abc45/2014   4. abc45/2014 When i grep for 45 it is showing one instance of 4 and for 4 its showing all 45. i need to grep both single digit and double digit separately. please help


How to make log-rotate change take effect

I followed this link to change log-rotate configuration. https://access.redhat.com/site/documentation/en- US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/s1-logfiles-locating.html After I made the change to config file, what should I do to let this take effect?


How to disable nvidia ion on Asus eeepc 1201NL?

It seems that my netbook consumes battery too aggressively. I've been told that Nvidia ION videocard embedded into it has 2 cores and one of them is consuming battery all the time in Linux, since it has been designed for Windows usage only, and there's no driver capable to manage it in Linux. Is there any way to turn it off completely and use only one video core? My distro is Debian based CrunchBang.


Counting numbers in Emacs

Say I have the following long line selected in Emacs. How can I cound how many numbers (or NaN) I have? I tried `M-x count-words` but it yields the wrong number. It says `1 line 1135 words and 3565 characters`, but it actually has `640` numbers > 0.967 1.043 1.313 1.598 1.879 2.151 2.421 2.918 3.209 3.478 3.736 3.975 > 0.917 1.012 1.317 1.607 1.900 2.173 2.437 2.929 3.203 3.473 3.714 3.954 > 1.081 1.297 1.570 1.753 1.964 2.209 2.456 2.699 2.947 3.196 3.566 3.822 > 4.050 4.268 4.423 0.950 1.080 1.212 1.343 1.617 1.911 2.219 2.487 2.750 > 3.213 3.489 3.732 3.957 4.180 0.965 1.074 1.176 1.280 1.381 1.636 1.871 > 2.108 2.357 2.614 3.080 3.374 3.666 3.943 4.205 0.992 1.151 1.294 1.422 > 1.527 1.653 1.894 2.094 2.311 2.557 2.820 3.263 3.559 3.849 4.115 4.349 > 0.895 0.997 1.119 1.215 1.313 1.401 1.649 1.898 2.152 2.411 2.667 3.143 > 3.446 3.723 3.969 4.207 0.947 1.155 1.369 1.599 1.838 2.094 2.597 2.941 > 3.265 3.570 3.852 1.120 1.396 1.680 1.970 2.297 2.781 3.075 3.344 3.596 > 3.835 1.020 1.181 1.335 1.514 1.675 1.868 2.124 2.401 2.719 2.995 3.255 > 3.617 3.896 4.131 4.309 4.461 0.893 1.003 1.094 1.202 1.464 1.732 2.022 > 2.289 2.562 3.030 3.338 3.609 3.852 4.095 1.026 1.219 1.403 1.585 1.759 > 2.041 2.285 2.535 2.796 3.058 3.486 3.754 4.009 4.210 4.394 0.900 1.005 > 1.127 1.255 1.415 1.715 2.015 2.322 2.622 2.924 3.346 3.624 3.842 4.034 > 4.212 0.926 1.045 1.143 1.392 1.648 1.905 2.155 2.423 2.912 3.227 3.509 > 3.767 4.017 0.968 1.154 1.335 1.511 1.655 1.813 1.968 2.188 2.428 2.659 > 2.932 3.204 3.591 3.878 4.122 4.334 4.506 1.027 1.194 1.315 1.433 1.536 > 1.699 1.826 2.063 2.352 2.653 2.960 3.187 3.575 3.842 4.058 4.247 4.427 > 0.963 1.147 1.351 1.539 1.679 1.883 2.070 2.279 2.551 2.828 3.234 3.564 > 3.886 4.150 4.315 0.966 1.141 1.294 1.446 1.596 1.857 2.156 2.413 2.669 > 2.879 3.307 3.592 3.828 4.064 4.300 0.924 1.163 1.428 1.712 1.992 2.291 > 2.778 3.103 3.397 3.659 3.893 0.896 1.008 1.109 1.196 1.296 1.532 1.781 > 2.038 2.301 2.574 3.059 3.354 3.630 3.893 4.144 0.930 1.063 1.330 1.580 > 1.865 2.160 2.439 2.912 3.221 3.520 3.784 3.988 0.954 1.079 1.205 1.282 > 1.465 1.676 1.908 2.160 2.411 2.881 3.246 3.554 3.831 4.081 0.905 0.972 > 1.040 1.287 1.541 1.802 2.080 2.384 2.876 3.183 3.471 3.730 3.969 1.045 > 1.235 1.398 1.583 1.758 2.048 2.294 2.522 2.763 3.009 3.417 3.689 3.941 > 4.184 4.411 0.964 1.075 1.186 1.291 1.525 1.782 2.063 2.347 2.606 3.079 > 3.394 3.661 3.899 4.131 0.957 1.118 1.276 1.404 1.611 1.848 2.118 2.406 > 2.680 3.129 3.465 3.764 3.997 4.192 0.982 1.114 1.263 1.527 1.800 2.084 > 2.382 2.680 3.137 3.429 3.688 3.917 4.127 0.982 1.054 1.133 1.189 1.243 > 1.327 1.568 1.822 2.075 2.351 2.629 3.086 3.386 3.667 3.922 4.153 0.965 > 1.098 1.238 1.399 1.503 1.591 1.670 1.895 2.128 2.371 2.622 2.886 3.341 > 3.634 3.897 4.126 4.338 0.915 1.050 1.183 1.300 1.443 1.558 1.825 2.069 > 2.348 2.641 2.916 3.360 3.634 3.893 4.109 4.308 1.025 1.187 1.363 1.512 > 1.657 1.806 2.085 2.346 2.595 2.846 3.091 3.500 3.755 3.999 4.232 4.454 > 1.065 1.231 1.400 1.560 1.717 1.870 1.984 2.198 2.427 2.655 2.896 3.110 > 3.524 3.813 4.060 4.287 4.501 0.895 0.991 1.089 1.183 1.302 1.409 1.666 > 1.926 2.168 2.434 2.700 3.148 3.438 3.718 3.988 4.230 1.027 1.169 1.348 > 1.439 1.581 1.788 1.992 2.272 2.564 2.977 3.327 3.601 3.871 4.052 4.181 > 4.181 4.181 6235366411468800.000 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN > NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN > NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN > NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN > NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN > NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN > NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN > NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN > NaN


How to limit network bandwidth after some data transferred?

So the question is in the name of topic. How to limit bandwidth I know. Using `tc`. But how to do so after, for example, traffic had reached 500MB. And after some time reset the limits.


What's the best way to determine the working directory for UNIX process using 'ps'?

I am running a Ruby command line script (`rufus.sh`)which ultimately calls `Thread.new`, which spawns a UNIX process as shown below. I run this script for more than 1 directory as the output of the `ps` command shows below. The last (right most) column below is `COMMAND` (`COMD`) which is essentially the name of the process. The problem is that `COMMAND` doesn't include the working directory (the current directory when the process was launched). What is the best way to figure that out or include it in `COMMAND`? Thanks, Chirag               ps -ef | grep runner     web       7532     1  0 Oct08 ?        00:02:08 /usr/local/bin/ruby ./script/runner ./config/jobs/control.rb critical_alert start     web      21114     1  1 Oct09 ?        02:49:28 /usr/local/bin/ruby ./script/runner ./config/jobs/control.rb task start     web      19028     1  1 10:45 pts/0    00:00:34 /usr/local/bin/ruby ./script/runner ./config/jobs/control.rb task start     web      19029     1  0 10:45 pts/0    00:00:10 /usr/local/bin/ruby ./script/runner ./config/jobs/control.rb critical_alert start


Problems with booting with Kubuntu 13.04 / Windows 7 Dual boot

So I've had Kubuntu running on my Lenovo laptop as the only operating system for most of the summer. Earlier this week, I decided to shrink the home partition in order to add a Windows 7 partition. After installing Windows 7, I was then stuck where I could boot into Windows 7, but could not boot into Kubuntu. I ended up using a Kubuntu live USB in order to use the boot-repair tool, which let me regain access to GRUB, which now correctly lists Kubuntu and Windows 7 as the bootable operating systems, but it crashes any time I try to boot into windows. It is able to successfully boot into Kubuntu. I ran the windows startup repair tool several times without success, as well as re-running the boot repair tool. Below is a link to the boot repair summary from the most recent attempt at boot-repair. http://paste.ubuntu.com/6146103/ Any suggestions as to how I could fix this without just wiping the drives and starting over?


QEMU for ARM programs with GDB

I want to emulate an ARM processor for running the assembly programs using QEMU in RHEL. I have installed QEMU but I still have problems in running the assembly program. I got the assembly program, memory map and the makefile from this link. However, if I run the below command,               qemu-system-arm -S -s -M versatilepb -daemonize -m 128M -d in_asm,cpu,exec -kernel hello_world.bin ; gdb-multiarch --batch --command=hello_world.gdb      I get an error as "hello_world.bin - No such file or directory". I am not sure what is to be done to run the above command. So, I got an ARM image from this link. Instead of hello_world.bin, if I specify the kernel name as " **zImage.Integrator** ", I am getting a QEMU console window. However, I am not able to type or do anything in that window. Can someone please let me know how to run an assembly program using QEMU for ARM?


httpd cant write to folder/file because of selinux

Does anyone know which sebool it is to allow httpd write access to /home/user/html? When I disable selinux `echo 0 > /selinux/enforce` I can write, so definitely selinux. Just don't know which one is the right one without opening a big hole and Google isn't being much help.               #[/home]ls -Z     drwxr-x---. user       apache     unconfined_u:object_r:user_home_dir_t:s0 user          #sestatus -b     Policy booleans:     abrt_anon_write                             off     abrt_handle_event                           off     allow_console_login                         on     allow_cvs_read_shadow                       off     allow_daemons_dump_core                     on     allow_daemons_use_tcp_wrapper               off     allow_daemons_use_tty                       on     allow_domain_fd_use                         on     allow_execheap                              off     allow_execmem                               on     allow_execmod                               on     allow_execstack                             on     allow_ftpd_anon_write                       off     allow_ftpd_full_access                      off     allow_ftpd_use_cifs                         off     allow_ftpd_use_nfs                          off     allow_gssd_read_tmp                         on     allow_guest_exec_content                    off     allow_httpd_anon_write                      off     allow_httpd_mod_auth_ntlm_winbind           off     allow_httpd_mod_auth_pam                    off     allow_httpd_sys_script_anon_write           off     allow_java_execstack                        off     allow_kerberos                              on     allow_mount_anyfile                         on     allow_mplayer_execstack                     off     allow_nsplugin_execmem                      on     allow_polyinstantiation                     off     allow_postfix_local_write_mail_spool        on     allow_ptrace                                off     allow_rsync_anon_write                      off     allow_saslauthd_read_shadow                 off     allow_smbd_anon_write                       off     allow_ssh_keysign                           off     allow_staff_exec_content                    on     allow_sysadm_exec_content                   on     allow_unconfined_nsplugin_transition        off     allow_user_exec_content                     on     allow_user_mysql_connect                    off     allow_user_postgresql_connect               off     allow_write_xshm                            off     allow_xguest_exec_content                   off     allow_xserver_execmem                       off     allow_ypbind                                off     allow_zebra_write_config                    on     authlogin_radius                            off     cdrecord_read_content                       off     clamd_use_jit                               off     cobbler_anon_write                          off     cobbler_can_network_connect                 off     cobbler_use_cifs                            off     cobbler_use_nfs                             off     condor_domain_can_network_connect           off     cron_can_relabel                            off     dhcpc_exec_iptables                         off     domain_kernel_load_modules                  off     exim_can_connect_db                         off     exim_manage_user_files                      off     exim_read_user_files                        off     fcron_crond                                 off     fenced_can_network_connect                  off     fenced_can_ssh                              off     ftp_home_dir                                on     ftpd_connect_db                             off     ftpd_use_passive_mode                       off     git_cgit_read_gitosis_content               off     git_session_bind_all_unreserved_ports       off     git_system_enable_homedirs                  off     git_system_use_cifs                         off     git_system_use_nfs                          off     global_ssp                                  off     gpg_agent_env_file                          off     gpg_web_anon_write                          off     httpd_builtin_scripting                     on     httpd_can_check_spam                        off     httpd_can_network_connect                   off     httpd_can_network_connect_cobbler           off     httpd_can_network_connect_db                on     httpd_can_network_memcache                  off     httpd_can_network_relay                     off     httpd_can_sendmail                          on     httpd_dbus_avahi                            on     httpd_enable_cgi                            on     httpd_enable_ftp_server                     off     httpd_enable_homedirs                       on     httpd_execmem                               off     httpd_manage_ipa                            off     httpd_read_user_content                     off     httpd_setrlimit                             off     httpd_ssi_exec                              off     httpd_tmp_exec                              off     httpd_tty_comm                              on     httpd_unified                               on     httpd_use_cifs                              off     httpd_use_gpg                               off     httpd_use_nfs                               off     httpd_use_openstack                         off     icecast_connect_any                         off     init_upstart                                on     irssi_use_full_network                      off     logging_syslogd_can_sendmail                off     mmap_low_allowed                            off     mozilla_read_content                        off     mysql_connect_any                           off     named_write_master_zones                    off     ncftool_read_user_content                   off     nscd_use_shm                                on     nsplugin_can_network                        on     openvpn_enable_homedirs                     on     piranha_lvs_can_network_connect             off     pppd_can_insmod                             off     pppd_for_user                               off     privoxy_connect_any                         on     puppet_manage_all_files                     off     puppetmaster_use_db                         off     qemu_full_network                           on     qemu_use_cifs                               on     qemu_use_comm                               off     qemu_use_nfs                                on     qemu_use_usb                                on     racoon_read_shadow                          off     rgmanager_can_network_connect               off     rsync_client                                off     rsync_export_all_ro                         off     rsync_use_cifs                              off     rsync_use_nfs                               off     samba_create_home_dirs                      off     samba_domain_controller                     off     samba_enable_home_dirs                      off     samba_export_all_ro                         off     samba_export_all_rw                         off     samba_run_unconfined                        off     samba_share_fusefs                          off     samba_share_nfs                             off     sanlock_use_nfs                             off     sanlock_use_samba                           off     secure_mode                                 off     secure_mode_insmod                          off     secure_mode_policyload                      off     sepgsql_enable_users_ddl                    on     sepgsql_unconfined_dbadm                    on     sge_domain_can_network_connect              off     sge_use_nfs                                 off     smartmon_3ware                              off     spamassassin_can_network                    off     spamd_enable_home_dirs                      on     squid_connect_any                           on     squid_use_tproxy                            off     ssh_chroot_rw_homedirs                      off     ssh_sysadm_login                            off     telepathy_tcp_connect_generic_network_ports off     tftp_anon_write                             off     tor_bind_all_unreserved_ports               off     unconfined_login                            on     unconfined_mmap_zero_ignore                 off     unconfined_mozilla_plugin_transition        off     use_fusefs_home_dirs                        off     use_lpd_server                              off     use_nfs_home_dirs                           on     use_samba_home_dirs                         off     user_direct_dri                             on     user_direct_mouse                           off     user_ping                                   on     user_rw_noexattrfile                        on     user_setrlimit                              on     user_tcp_server                             off     user_ttyfile_stat                           off     varnishd_connect_any                        off     vbetool_mmap_zero_ignore                    off     virt_use_comm                               off     virt_use_fusefs                             off     virt_use_nfs                                off     virt_use_samba                              off     virt_use_sanlock                            off     virt_use_sysfs                              on     virt_use_usb                                on     virt_use_xserver                            off     webadm_manage_user_files                    off     webadm_read_user_files                      off     wine_mmap_zero_ignore                       off     xdm_exec_bootloader                         off     xdm_sysadm_login                            off     xen_use_nfs                                 off     xguest_connect_network                      on     xguest_mount_media                          on     xguest_use_bluetooth                        on     xserver_object_manager                      off


Check multiple files with string

i.e. for each .csv file, do the following:   * Check if the file contains the string “HEADER” in the first line. If its missing, do the following:     1. Display, “ERROR: Missing HEADER record for ”     2. Rename the file from .csv to .head     3. Proceed to process the next file


Install CUDA 6.0 on Debian 7 via package manager

I am following the official installation guide for Ubuntu. I first installed the cuda-repo package (`cuda-repo-ubuntu1304_6.0-37_amd64.deb`), which adds the NVIDIA repository to `apt`. Then it gives when installing that:               $ uname -a     Linux debian 3.14-1-amd64 #1 SMP Debian 3.14.10-1 (2014-07-07) x86_64 GNU/Linux          $ dpkg -i cuda-repo-ubuntu1304_6.0-37_amd64.deb     $ aptitude update     $ aptitude install cuda          The following packages have unmet dependencies:      nvidia-settings : Depends: screen-resolution-extra (>= 0.12) which is a virtual package.      nvidia-331 : Depends: xorg-video-abi-11 which is a virtual package. or                            xorg-video-abi-12 which is a virtual package. or                            xorg-video-abi-13 which is a virtual package. or                            xorg-video-abi-14 which is a virtual package.      I cannot find any package named `screen-resolution-extra` via `aptitude search`. And there is only a `xorg-video-abi-15` in the repository which cannot be installed. How can I solve this if I want to install CUDA via package manager?


xfce4 loses title bars on all windows

I'm running `Debian Wheezy` using `gdm3` as window manager and `xfce4` as desktop environment. Every so often, when I login, the desktop environment starts OK, but all windows are missing the title bar and are positioned at location (0,0). Usually logging out and back in, or restarting `gdm3` and logging in, fixes it, but today it didn't. I switched to 'GNOME classic' which works fine, indicating it's probably a setting in `xfce4` that's got corrupted. Short of just zapping every file in `.config/` and `.cache/` which refers to `xfce`, is there a simple fix/edit?


Why do I need to escape regex characters in sed to be interpreted as regex characters?

It seems e.g.   `cat sed_data.txt | sed 's/\b[0-9]\{3\}\b/NUMBER/g'`   that I _must_ escape characters to form a regular expression. In this case I had to escape braces in order to be interpreted as a number of times.   Why? I was expecting that everything would be a regex character unless escaped. I.e. the opposite.


Remove shadows from Metacity windows

My goal is to remove the dropshadow from all metacity windows. I realize there is not a setting to do this and I may need to recompile metacity. If this is so than I'll need some help on where to start. If I can simply do it by editing source files without compiling, an ideas where I can start on that?


Open a RPM on a Mac?

I am on a MacBook Pro running Apple Leopard (Mac OS X 10.5.8). I would like to unpackage a RPM and view the files contained within the wget-1.11.4-2.el5_4.1.src.rpm . I don't need to install the files to a particular location or run any %postinstall scripts or anything. I just want to unpackage this RPM so that I can view the source files underneath. Is it possible to unpackage a RPM file on a non-RedHat/CentOS system?


How do I recover an ext4 volume overwritten by an LVM logical volume?

I was running an Ubuntu desktop. The OS was installed on a SSD. I had two additional drives formatted ext4 and mounted on /storage (1TB) and /storage- bak (1.5TB). I installed Centos over Ubuntu on the SSD and the install put a 2.3GB Logical volume on my two "storage" drives. I didn't want this. I guess I missed something during the Centos install. Centos used the LV to mount /home on it. I booted once and logged in. Not much was written to it.   Is there any way to remove the LV and get my drives back to the state they were in.... data intact? I just want a /dev/sdb1 and a /dev/sdc1 so I can mount them as generic EXT4 drives.


How to verify that my uImage is good?

I had a zImage file and I used mkimage tool to convert it into a uImage format. When I am booting this file, it is not been found by u-boot:               Wrong Image Format for bootm command     ERROR: can't get kernel image!     U-Boot-PetaLinux>      So I thought of verifying that the uImage generated after conversion with mkimage is a valid image or not. The exact command that I used is:               mkimage -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008000 -n "Linux kernel" -d zImage uImage      How do I verify this image?


The Case of the Conflicting Bootloaders

A server with a 2-disk RAID array (mirrored) is serviced by a 4-port 3Ware controller. Recently it became inaccessible after a restart. At the console it asked for the runlevel. Indeed, the /etc directory had been deleted. How, I have no idea. The old Centos 5 installation would not recover, so I unplugged the array disks, installed a new disk on an unused RAID controller port, and then installed Ubuntu Server 14. All went according to plan. The intent was to return the mirrored drives to service after the new disk install. I took the RAID array out during this process to avoid any chance of overwrite. Now that the RAID array is back, it attempts to boot, despite the presence of my new drive. So there's clearly a conflict with MBR's. Ideally it would be nice to tell my system that it should boot from a certain disk first. Unfortunately the RAID array isn't arranged at that level. It all looks like a single device to BIOS. So I must, I think, remove the bootblock from the RAID array's MBR. Correct? But.. how to do this safely?


Capture transcript of program with redirected input and output

A typical interaction for a program I've written might look like this:               Enter command: a_command     Completed a command          Enter command: another_command     Completed another command      I typically run my program like `./program < input.txt`, where `input.txt` would contain:               a_command     another_command      I want to be able to capture the entire interaction (not just the output) like above. How can I do this with bash? EDIT: `program` is a binary (specifically, it's in C++), not a bash script. I have access to the source code, but I'd like to do this without having to modify the source code.


Overwrite file and apply file system rights of overwritten files?

I backed up some linux configuration files to a windows machine, so the file system rights were lost. Now I would like to restore my backed up configuration by overwriting the configuration currently present on the linux machine. Is there a command like "overwrite configuration.conf with backup/configuration.conf and apply the file rights of the overwritten configuration.conf to the new configuration.conf" ? Thanks for any hint :-)


qemu-kvm savevm very slow

I have up to date gentoo system with kvm images located on 500 gb partition with 200 gb of free space and defragmented, running machine with Windows XP and 2gb ram, I have problem with making snapshot of runing vm. When I try to save state via the `savevm` command using qemu monitor it starts to use 100% of disk IO and writes data very slowly (<1mb/s). It also causing very big fragmentation very fast. Does anyone know a solution to this problem? After ~half hour I have this:               filefrag tmp_sys.img         tmp_sys.img: 25154 extents found      and it's still saving... Completely unusable.


Guide on how to install FreeBSD on a laptop

Is there a guide on how to install FreeBSD on a Laptop with some basic GUI elements or a Desktop Manager? Please assist and I know some more people would want to know this.


apt-get failed to fetch package

I want to install curl on my ubuntu:               sudo apt-get install curl      It gave the following error:               Err http://it.archive.ubuntu.com/ubuntu/ maverick/main curl i386 7.21.0-1ubuntu1       404  Not Found [IP: 193.206.140.45 80]     Failed to fetch http://it.archive.ubuntu.com/ubuntu/pool/main/c/curl/curl_7.21.0-1ubuntu1_i386.deb  404  Not Found [IP: 193.206.140.45 80]      Then I did an update and retried install. But this didn't make any difference.               sudo apt-get update      What should I do?