title: Low Disk Space on Volumn system "Root"

text: I installed Debian 7 onto a one terabyte drive, I let Debian automatically setup partitions, also selected LVM, Then installed OwnCLoud. All was working fine until I receved the message Low Disk Space on Root, it is only 35mb free, I could no longer access the cloud storage, Also Apache2 had to be restarted? which it started automaticaly. I can access the cloud after restarting Apache, But Cloud cannot access database? It must be that program cannot run due to space limitation. How can I increase this volume? I tired using Gpart live, but could not increase any volumes> Here is my fdisk -l listing!               Disk /dev/sda: 1500.3 GB, 1500301910016 bytes     255 heads, 63 sectors/track, 182401 cylinders, total 2930277168 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x8de4adf7             Device Boot      Start         End      Blocks   Id  System     /dev/sda1              63  2930272064  1465136001    7  HPFS/NTFS/exFAT          Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes     255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x00048b84             Device Boot      Start         End      Blocks   Id  System     /dev/sdb1   *        2048      499711      248832   83  Linux     /dev/sdb2          501758  1953523711   976510977    5  Extended     /dev/sdb5          501760  1953523711   976510976   8e  Linux LVM          Disk /dev/mapper/debian-root: 348 MB, 348127232 bytes     255 heads, 63 sectors/track, 42 cylinders, total 679936 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x00000000          Disk /dev/mapper/debian-root doesn't contain a valid partition table          Disk /dev/mapper/debian-swap_1: 4273 MB, 4273995776 bytes     255 heads, 63 sectors/track, 519 cylinders, total 8347648 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x00000000          Disk /dev/mapper/debian-swap_1 doesn't contain a valid partition table          Disk /dev/mapper/debian-usr: 8996 MB, 8996782080 bytes     255 heads, 63 sectors/track, 1093 cylinders, total 17571840 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x00000000          Disk /dev/mapper/debian-usr doesn't contain a valid partition table          Disk /dev/mapper/debian-var: 2998 MB, 2998927360 bytes     255 heads, 63 sectors/track, 364 cylinders, total 5857280 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x00000000          Disk /dev/mapper/debian-var doesn't contain a valid partition table          Disk /dev/mapper/debian-tmp: 398 MB, 398458880 bytes     255 heads, 63 sectors/track, 48 cylinders, total 778240 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x00000000          Disk /dev/mapper/debian-tmp doesn't contain a valid partition table          Disk /dev/mapper/debian-home: 982.9 GB, 982926753792 bytes     255 heads, 63 sectors/track, 119500 cylinders, total 1919778816 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x00000000          Disk /dev/mapper/debian-home doesn't contain a valid partition table     root@debian:/home/dmsigala#      **Edit** The output of `pvscan` and `df`:               root@debian:/home/dmsigala# pvscan      PV /dev/sdb5 VG debian lvm2 [931.27 GiB / 0 free]      Total: 1 [931.27 GiB] / in use: 1 [931.27 GiB] / in no VG: 0 [0 ]          ot@debian:/home/dmsigala# df -h      Filesystem               Size  Used  Avail  Use%  Mounted on      rootfs                   322M  294M  11M    97%   /      /dev/mapper/debian-root  322M  294M  11M    97%   /      /dev/sdb1                228M  17M   199M   8%    /boot


title: Random colored column?

text: For whatever reason, the first column is highlighted and I can't figure out why. I have not messed with my vimrc file, nor any zsh options. This column is only highlighted only with, "aliases.zsh", file. Opening any other file, or filetype, the highlighted column is non-existent. Any ideas? ![enter image description here](http://i.stack.imgur.com/0EZPu.jpg)


title: What does `mv ./*` without specifying destination do?

text: I accidentally forgot to specify destination before hitting the Return key. Where does `mv ./*` without specifying destination move the files and directories under current directory to?


title: cp with a single argument containing wildcards

text: If I have the following 2 files and 1 folder:               someuser@computer:~/Desktop/test$ ls -l     total 340     -rw-r--r-- 1 someuser someuser  45082 ago  5 09:56 file1.pdf     -rw-r--r-- 1 someuser someuser 291836 ago  5 09:56 file2.pdf     drwxrwxr-x 2 someuser someuser   4096 ago  5 09:56 this_is_a_folder.pdf      And I run the following command (notice that I ommit the destination):               cp *.pdf      `file1.pdf` and `file2.pdf` are copied into the `this_is_a_folder.pdf` folder.               someuser@computer00:~/Desktop/test$ ls this_is_a_folder.pdf/     file1.pdf  file2.pdf      Obviously `*.pdf` is expanding into matching items, so it's equivalent to               cp file1.pdf file2.pdf this_is_a_folder.pdf      ... and as `this_is_a_folder.pdf` is a folder, then the two files are copied to it. **Is this a bug ?** It's obviously a side effect of wildcard expansion and it's not what I would expect to happen. I would have expected a `missing destination file` **error**.


title: Issues With ARIA2C and basic auth- WGET working

text: I'm having some issues getting aria2c working with basic http auth. Wget works perfectly, but I'd like to use arias multi-threading features               !!link!! = https://www.site.com/directory/name      Command that works in WGET:               wget --user=username --password=123password# !!link!!/file.txt      Command that does not work in aria2c:               aria2c --log=arialog --http-user=username --http-passwd=123password# --check-certificate=false !!link!!/file.txt      The error received is               -> [HttpSkipResponseCommand.cc:207] errorCode=24 Authorization failed.      In the log, the response back from the server is:               HTTP/1.1 401 Unauthorized     Date: Fri, 22 Aug 2014 01:40:55 GMT     Server: Apache/2.4.7 (Ubuntu)     WWW-Authenticate: Digest realm="directory", nonce="ZI2m7S0BBQA=07cfdbd25e8bab3d41ad643d0a6d0fb98ecef695", algorithm=MD5, domain="/var/www/directory/ http://www.site.com/directory", qop="auth"     Content-Type: text/html; charset=iso-8859-1      The SSL labs report on my domain, reports back fine and I am not getting and trust issues in any other product. Any help would be much appreciated!


title: How can I make imwheel leave most modifier actions as default?

text: I'm attempting to horizontal scroll with `shift`+`scroll wheel`. I've tried using `imwheel`, using the following in `~/.imwheelrc`               ".*"     Shift_L, Up, Left     Shift_L, Down, Right      I then run `imwheel -b 45`. This makes `shift`+`scroll wheel` work as expected. However, it prevents some other default events, like `ctrl`+`scroll wheel` and `super`+`scroll wheel` from being passed. Instead, these appear to be interpreted as a normal (unmodified) scroll. I tried putting things like `Control_L, Up, Control_L|Up` in `~/.imwheelrc`, but this didn't work.


title: downloading debian securely

text: I have a couple of questions on getting a genuine, unmolested version of Debian. MITM attacks are very real and many parties would love to hand you their own, backdoored version of software. I know GPG is a way to authenticate software but I don't know how it works.   1. How do you download Debian securely and make sure 110% that it is an unaltered copy you're getting?   2. Does it matter what OS and machine you use to download Debian and could the OS you use compromise the download or after it reaches the computer if the OS is somehow backdoored or compromised itself?   3. Which method is best to download Debian out of the available options ie mirrors, torrent etc?   4. Is GPG a foolproof method for 110% guaranteeing secure and authentic software?   5. Does downloading it over Tor make any difference, for better or for worse and why?


Why doesn't the list command work in mail? When I try l or list, it doesn't work. It instead gives me a list of the valid commands, including list.               Commands are:     next, alias, print, type, Type, Print, visual, top, touch, preserve,      delete, dp, dt, undelete, unset, mail, mbox, more, page, More, Page,      unread, U, !, copy, chdir, cd, save, source, set, shell, version,      group, write, from, file, folder, folders, ?, z, headers, help, =,      Reply, Respond, reply, respond, edit, echo, quit, list, xit, exit,      size, hold, if, else, endif, alternates, ignore, discard, retain,      saveignore, savediscard, saveretain, core, #, clobber      **Edit:**                # cat /etc/redhat-release       CentOS release 5.5 (Final)               # mail --version     mail: invalid option -- -     Usage: mail [-iInv] [-s subject] [-c cc-addr] [-b bcc-addr] to-addr ...                 [-- sendmail-options ...]            mail [-iInNv] -f [name]            mail [-iInNv] [-u user]          # $ rpm -qf $(which mail)     mailx-8.1.1-44.2.2      Granted, I've NEVER been able to get this to work regardless of which distro. But I'll be happy to know how to do it on just one.


title: How to execute a GDB command from a string variable?

text: Say the debugged process has a string variable as follows:               char* cmd_str = "set confirm on";      How to execute the command from `cmd_str` in GDB?               (gdb) $cmd = cmd_str     (gdb) ???


title: What steps are involved in porting an Xorg OpenGL app to DirectFB?

text: I'm looking for a birds-eye view on porting a small app1 that uses some OpenGL functions from it's home on Xorg to run in a more stand-alone fashion using DirectFB. I am unfamiliar with both C and OpenGL in general. My motivation is that the embedded platform I want to run this app on (Raspberry Pi) doesn't have accelerated drivers for Xorg yet. I can only get about .5 fps running on Xorg. On the other hand, much heavier weight DirectFB apps seem to run with quite a bit of pep in their step. What modifications would likely need to be done to the code base and compile process to make a DirectFB port? What sort of dependencies / includes would need to be adapted? Should I be starting from the ground up with a blank slate and implementing each function or working backwards trying to compile/run the original? 1 I only want to run the display portion of Lyricue. Sources are `lyricue_display.c` and `lyricue_display.h`, but I'd like to see the question answered in a generic way that would be helpful for somebody else wishing to port their favorite app.


title: How to automatically enter sudo's grace period upon CLI login?

text: What I would like to do is be able to login and sudo commands immediately without entering a password again. It is very redundant to type my password twice in a row when I need to login and run a privileged command. I understand the security risk which requires us to reenter a password when we've been away for awhile but it seems like login should automatically set this session by default to prevent this but it doesn't for some reason. I am aware of these solutions but they both rely on gdm and I appear to only have LightDM installed for starters. Furthermore, I don't login to a GUI interface and AFAIK the console doesn't use either of these to manage logins in the first place. I'm using Ubuntu 13.04 in VMware if that matters. I do have a KDE installed but I don't usually load it unless I have a reason to. The ideal solution would also work from SSH logins. **Update** : Based on Gilles' suggestions I now have this working setup:               ~ tail -n1 /etc/pam.d/sshd     session optional pam_exec.so seteuid /usr/local/sbin/update_sudo_ticket      and (be sure to use `sudo visudo` to edit sudoers)               ~  sudo head -n12 /etc/sudoers|tail -n1     Defaults        !tty_tickets      and create a new script               ~ cat /usr/local/sbin/update_sudo_ticket     #!/bin/sh     touch -c "/var/lib/sudo/$PAM_USER" 2>/dev/null      and make it executable ( `sudo chmod u=+rwx,g=+rx-w,o=-rwx /usr/local/sbin/update_sudo_ticket` ):               ~  ls -la /usr/local/sbin/update_sudo_ticket     -rwxr-x--- 1 root root 57 Sep 21 20:52 /usr/local/sbin/update_sudo_ticket


title: Performance of unix sockets vs TCP ports

text: For example on php-fpm:               #listen = 127.0.0.1:9000     listen = /var/run/php-fpm/php-fpm.sock      Is there any major performance differences between using unix socket-based listeners over TCP ports? (Not just for PHP but in general. Is it different for each service?)


title: primusrun not found when attempting to launch dota2 through steam

text: I am using slackware 14.0, and have gotten all the multilib stuff taken care of. I have skype,spotify and steam running. I have used steam to download Dota2, and when I go to launch the game I get an error --               /bin/sh: primusrun: command not found      I did a               updatedb     locate primusrun       Then searched for primusrun, but it wasn't found (using a whereis). Any ideas?


title: What is the name of the shell feature `>(tee copyError.txt >&2)`?

text: I need to log stdout and stderr to logfiles, but only show the error messages on screen. I can do this with:               cp -rpv a/* b 1> copyLog.txt 2> >(tee copyError.txt >&2)       Which I found somewhere in the web. I just want to know how this `>(tee copyError.txt >&2)` thing is called? I can't google for it, since Google ignores characters like angle brackets and the parentheses..


title: Dealing with Endless Config files in Home Folder

text: I'm beginning to have a lot of .[program name]rc files in my home folder. I wish i could create a folder to keep them all in, and then get every program to to look there. Is there an easy way to do this. Like changing a environment variable? What do you do?


title: CentOS Traffic Filter

text: I am trying to use Squid to filter the traffic flowing through the network. I am also trying to make this system transparent. My network setup is like so:               Router -> CentOS Machine -> The rest of the network.     Router: 192.168.1.254     CentOS: 192.168.1.104     LAN   : 192.168.1.0/24 and 81.150.192.224/28      I need all network to be passed to the router - unmodified - and then have it pass the response to Squid. The issues I've encountered so far are DNS - as in I'm unable to get the traffic sent to the machine because it is unable to look it up - issues with having two different subnets(one for my LAN and one for my Public IP's.). How would I get this to function ?


title: Use curl to download from a Url

text: I am trying to download a file from a url using `curl`:               $ curl -3 -v "https://atl1mmsget.msg.eng.t-mobile.com/mms/wapenc?location=XXXXXXXXXXX_14zbwk&rid=027"      Where the X is a digit in the phone number of the device I am testing on. but I am running into an error:               * Adding handle: conn: 0x2140cd0     * Adding handle: send: 0     * Adding handle: recv: 0     * Curl_addHandleToPipeline: length: 1     * - Conn 0 (0x2140cd0) send_pipe: 1, recv_pipe: 0     * About to connect() to atl1mmsget.msg.eng.t-mobile.com port 443 (#0)     *   Trying 66.94.0.188...     * Connected to atl1mmsget.msg.eng.t-mobile.com (66.94.0.188) port 443 (#0)     * successfully set certificate verify locations:     *   CAfile: none       CApath: /etc/ssl/certs     * SSLv3, TLS handshake, Client hello (1):     * SSLv3, TLS handshake, Server hello (2):     * SSLv3, TLS handshake, CERT (11):     * SSLv3, TLS handshake, Server finished (14):     * SSLv3, TLS handshake, Client key exchange (16):     * SSLv3, TLS change cipher, Client hello (1):     * SSLv3, TLS handshake, Finished (20):     * SSLv3, TLS change cipher, Client hello (1):     * SSLv3, TLS handshake, Finished (20):     * SSL connection using AES128-SHA     * Server certificate:     *    subject: C=US; ST=Washington; L=Bothell; O=T-Mobile USA, Inc.; CN=apgw.sipgeo.t-mobile.com     *    start date: 2013-05-21 21:02:44 GMT     *    expire date: 2014-05-22 08:35:43 GMT     *    subjectAltName: atl1mmsget.msg.eng.t-mobile.com matched     *    issuer: C=US; O=Entrust, Inc.; OU=www.entrust.net/rpa is incorporated by reference; OU=(c) 2009 Entrust, Inc.; CN=Entrust Certification Authority - L1C     *    SSL certificate verify ok.     > GET /mms/wapenc?location=18188257544_14zbwk&rid=027 HTTP/1.1     > User-Agent: curl/7.32.0     > Host: atl1mmsget.msg.eng.t-mobile.com     > Accept: */*     >      * HTTP 1.0, assume close after body     < HTTP/1.0 501 Not Implemented     < Server: BigIP     * HTTP/1.0 connection set to keep alive!     < Connection: Keep-Alive     < Content-Length: 0     <      * Connection #0 to host atl1mmsget.msg.eng.t-mobile.com left intact`      What does the `501 not implemented` error mean? How can I get around this?


title: Cross compile a raspberry pi kernel

text: I've been trying for the past few hours to cross compile a rpi kernel on my Arch Linux distro and then my Ubuntu distro when that failed, I received similar errors for both attempts. I'm currently following these guides: http://elinux.org/RPi_Kernel_Compilation http://ozzmaker.com/2012/11/26/how-to-cross-compile-the-kernel-for-the- raspberry-pi/ I have a folder in my home directory called "linux". Inside this is a folder named tools and rpi-3.6.y, these contain compilation tools and the rpi kernel source, respectively. When I reach the "Firstly, ensure your build directory is clean" step and run               make mrproper       I get the following error:               scripts/Makefile.clean:17: /home/aquacell/linux/rpi-3.6.y/arch/x86/crypto/Makefile: No such file or directory     make[2]: *** No rule to make target '/home/aquacell/linux/rpi-3.6.y/arch/x86/crypto/Makefile'. Stop.     scripts/Makefile.clean:94: recipe for target 'arch/x86/crypto' failed     make[1]: *** [arch/x86/crypto] Error 2     Makefile:1039: recipe for target '_clean_arch/x86' failed     make: *** [_clean_arch/x86] Error 2      I decided to skip this and move onto the actual cross-compilation and I get this error:               $ make ARCH=arm CROSS_COMPILE=${CCPREFIX} oldconfig          /bin/sh: /home/aquacell/linux/rpi-3.6.y/scripts/kconfig/lxdialog/check-lxdialog.sh: No such file or directory     /bin/sh: /home/aquacell/linux/rpi-3.6.y/scripts/kconfig/lxdialog/check-lxdialog.sh: No such file or directory     /bin/sh: /home/aquacell/linux/rpi-3.6.y/scripts/kconfig/lxdialog/check-lxdialog.sh: No such file or directory     /bin/sh: /home/aquacell/linux/rpi-3.6.y/scripts/kconfig/lxdialog/check-lxdialog.sh: No such file or directory     scripts/kconfig/conf --oldconfig Kconfig     arch/arm/Kconfig:945: can't open file "arch/arm/mach-mvebu/Kconfig"     /home/aquacell/linux/rpi-3.6.y/scripts/kconfig/Makefile:33: recipe for target 'oldconfig' failed     make[1]: *** [oldconfig] Error 1     Makefile:503: recipe for target 'oldconfig' failed     make: *** [oldconfig] Error 2      Can anyone provide any insight as to what I might be doing wrong? I feel like there is a very obvious step or crucial part not listed that I am missing, as I can't find any information on this. Thanks.


title: Patching the kernel source through git

text: I'm trying to understand how the patching of the kernel source works. I found the patch that I would like to try an apply on the following page. I found no .patch files that I can use to apply the patch. I would like to apply the patch on the kernel 3.10 source. My current setup includes:   * 3.10 kernel source with a git repo inside   * remote pointing to https://github.com/hzpeterchen/linux-usb.git (this is the repo referenced in the patch mail) Can someone please direct me to the next steps + the concepts behind the steps?


title: find: File system loop detected

text: When I try to find a file using `find -name "filename"` I get an error that says:               ./var/named/chroot/var/named' is part of the same file system loop as `./var/named'      I ran the `ls -ldi /var/named/chroot/var/named/ /var/named` command and the inode numbers are the same. Research indicates the fix is to delete the hard link /var/named/chroot/var/named/ using `rm -f` and recreate it as a directory but when I do this I am advised that it can't be deleted because it is a directory already. How do I fix this? I'm running Centos 6 with Plesk 11. The mount command gives this:               /dev/vzfs on / type reiserfs (rw,usrquota,grpquota)     proc on /proc type proc (rw,relatime)     sysfs on /sys type sysfs (rw,relatime)     none on /dev type tmpfs (rw,relatime)     none on /dev/pts type devpts (rw,relatime)     none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)     /etc/named on /var/named/chroot/etc/named type none (rw,bind)     /var/named on /var/named/chroot/var/named type none (rw,bind)     /etc/named.rfc1912.zones on /var/named/chroot/etc/named.rfc1912.zones type none (rw,bind)     /etc/rndc.key on /var/named/chroot/etc/rndc.key type none (rw,bind)     /usr/lib64/bind on /var/named/chroot/usr/lib64/bind type none (rw,bind)     /etc/named.iscdlv.key on /var/named/chroot/etc/named.iscdlv.key type none (rw,bind)     /etc/named.root.key on /var/named/chroot/etc/named.root.key type none (rw,bind)


title: Disabling or changing console switching keys

text: For some reasons on my Ubuntu 11.04 Natty running Linux 2.6.38-13, with an Italian layout for the keyboard, the keystrokes `Alt``Fx` switch between virtual consoles (instead of the normal `Ctrl``Alt``Fx` keys). What could I change to avoid that? I tried adding               Section "Serverflags"     Option "DontVTSwitch" "on"     EndSection          Section "InputClass"          Identifier "keyboard defaults"          MatchIsKeyboard "on"          Option "XKbOptions" "srvrkeys:none"     EndSection to the `/etc/X11/xorg.conf` file but to no avail. Is there an `xmodmap` setting that I could use?


title: how to install a lftp program on centOS

text: how to install a `lftp` program on `CentOS` and use it to transfer files between servers. I need some help on how to transfer files use `lftp`. I used the below command but got an error as bad command.               wget http://example.com/user/filename.gz.tar


title: Why does Linux allow ‘init=/bin/bash’?

text: I recently found out that if I edit GRUB before booting and I add `rw init=/bin/bash` I end up with a root shell. Being in a condition that I want to understand everything I would like to know why this happens. I mean is it a bug? is it a feature? is it there to help admins to fix things as it only works if you have physical access to a computer? Is it provided by GRUB or the actual kernel?


title: how to deal with keyboard-greedy apps

text: I'm having a very specific problem, however any help will aid in understanding X's relationship to the keyboard. I'd like to be able to launch the ElectricSheep program on top of music playing from XBMC. I've already got the launch script set up, and I can launch ElectricSheep with no problems. The problem occurs when I try to close it. If I launch ElectricSheep without XBMC running, pressing escape closes it. If XBMC is running (or even if I include a line in the script to kill xbmc before launching), it grabs all keyboard input making my only route out of ElectricSheep to either kill it from an ssh session or kill X itself. If I run xev while XBMC is running, it recieves no input. Is there any way to launch an application and explicitly give it the X keyboard? Thanks for any help!


title: daemonize rtorrent

text: Just read the man page, but found no option for this. Maybe I missed it, maybe it doesn't exist. I have a server at home I'm SSHing to for rtorrent, but the torrent stops downloading and won't restart on rtorrent restart, so is there a way I can daemonize so I don't have to sit there and watch it? (if this is relevant, rtorrent is running on a fresh FreeBSD 9.1 install)


title: Most unix-like filesystem that can be mounted under windows and Mac OS X

text: I've recently purchased a usb stick which I will be using to share data between me and my colleagues. I'd like to format it as ext3, but I know this will cause trouble because for instance Mac OS X has troubles mounting that. The problem is that any other FS I've used before (except for ext2 or ext4) seems to screw up the executable bit on files that have been on it. E.g. I put up a normal non-executable pdf file on the stick, I take it off again and suddenly it's executable (e.i. the executable permission is enabled). I don't like these kinds of trickeries. What filesystem should I use? Or is this problem not FS-related?


title: bluez4: How to connect to NAP

text: Afer an hour of Googling I am giving up now and hope for someone here to help me... I want to connect a Debian system with bluez4 to an mobile phone that provides a NAP-service. At the moment I can do it using the blueman-manager GUI amd I am trying to figure out how to do it from the command-line. bluez4 does not seem to have a command-line interface as such but is controlled via the d-bus and while there used to be a tool called pand that could initiate a connection, this is now deprecated. So can someone explain to me how to initiate a connection to the PAN-service of a paired blootooth device from the command-line and not using pand (it probably is some magic dbus-send incantation). Many thanks!


title: Create multisession ISO image to burn on a remote CD

text: I need to be able to take a number of files on one machine and generate a .iso image to burn to a _multisession_ CD-R that has already had a session written to it. I can easily create an image for the first session, but I cannot find a way to do so for the second or later sessions. Currently, the primary means I have of access to the remote system is via `ssh`. I have `root` on both systems in question.


title: How to act on output from a failed command

text: > **Possible Duplicate:**   >  What is the easiest way to execute text from tail at the command line? I was guessing the ouput of a command that fails to execute should be sent to stdout and hence can be piped. It seems I am wrong, so please correct me. For example,               $easy_install     The program 'easy_install' is currently not installed.  You can install it by typing:     sudo apt-get install python-setuptools      So if I want to install with the command suggested, I tried               $easy_install | grep sudo | bash      i.e naively trying to pick out the last line and send it to the shell as a command. I even tried               $easy_install | tail -1 | bash      but get the same blurb without it doing anything. What am I doing wrong?


title: Using VIM, how do I remap directional keys from right hand to left hand?

text: This is the best solution I've seen so far:               " Map Right Directionals to Left Commands     noremap s h     noremap d k     noremap f j     noremap g l          " Map Left Commands to Right Directionals     noremap h s     noremap k d     noremap j f     noremap l g      However, when actually using this mapping, it requires a double-press on the 's' and 'g' keys when switching from left to right. Is there a better way to re-map these keys to work 100% correctly without the need to double-press keys?


title: Running a command at startup

text: I recently came across "remind" in Linux. I liked it almost immediately, but for my reminders to pop up, I needed to run 'remind' in daemon mode. Done quite simply using the following command:               remind -z -k'gmessage %s &' /home/googie/.reminders &      It would be lame for me to manually launch the 'remind' daemon every time I boot my computer (someone would have to remind me to do that!), so I thought I'll make it run automatically on boot. I was under the impression that this would be fairly straightforward to do, but I was in for a surprise. I did the following (in this sequence):   1. Made a script (with start, stop, restart cases), placed it in /etc/init.d, ran 'update-rc.d' to create some links for certain runlevels, restarted --- no luck   2. Made a 'remind.conf' file, placed it in /etc/init (referring 'http://upstart.ubuntu.com/getting-started.html'), restarted --- still no luck   3. Opened '/etc/rc.local', placed the command to start the 'remind' daemon just before 'exit 0', restarted --- still no luck   4. Opened crontab (sudo crontab -e), wrote '@reboot' followed by the command to start the 'remind' daemon on the last line, restarted --- still no luck   5. Opened 'System->Preferences->Startup Applications', added a new startup program with the command to start the 'remind' daemon, restarted --- still no luck   6. Made a script in my home directory, placed the command to start the 'remind' daemon inside the script, called this script from '/etc/rc.local', restarted --- still no luck   7. Called the script in my home directory after '@reboot' in crontab, restarted --- still no luck   8. Called the script in my home directory using 'System->Preferences->Startup Applications' --- finally worked, and the 'remind' daemon now runs!! So now for my 3 questions:   1. Is it really so complicated in Linux to run something at startup, or is it just my lack of knowledge?   2. Was trying steps 1 & 2 even advisable? I think these are used to make something a service. Isn't the 'remind' daemon a service as well?   3. Why didn't the '/etc/rc.local' or 'crontab' approach work? Are there any logs I could check to see whats going wrong? (any related references for me to read would be appreciated as well)


title: Files are missing and I want to know what happened to them

text: Somehow some files are missing in a directory and I would like to know what happened to those files. Who has moved/deleted them? How can I investigate? Can we get a history on a directory? These are ordinary user files on AIX 6.1; I don't know what file system is in use.


title: /etc/fedora-release shows wrong release

text: I'm running Fedora 14 and cat `/etc/fedora-release` shows `redhat release 5`. Besides manually modifying the file, is there a proper way of fixing this?


title: Allowed and safe characters for ZFS filesystem in FreeBSD

text: Which characters are allowed and safe for ZFS file system name? Are this characters only ASCII or UTF-8 is supported? '@' is not allowed because it is reserved for snapshots. PS: I play with FreeBSD 8.2, 9-RC1 and CURRENT+


title: b43 wireless driver error

text: I just installed Arch, and I noticed that my wifi range is very poor. I have to be about 10 feet away from the router for it to work. I also noticed that when I boot, I get this message: > Support for cores revisions 0x17 and 0x18 disabled by module param > `allhwsupport=0`. Try `b43.allhwsupport=1` I am completely new to Linux and I have no idea what this means. I would assume that I would re-install or update my drivers, but I have no idea how to do that. I looked for about 3 hours on the Arch wiki, but no where on there does it say how to actually update the drivers. It's as if it's assumed that I know how to do it. I am using a Broadcom chip, and I would like to know if it's a simple problem, or how I can update or reinstall the drivers via the terminal. Is it done with pacman? I have no idea.


title: Get current Virtual Desktop - number/name/tag/id?

text: How to get number and/or name (or tag/id... etc) of currently used virtual desktop ? Command line, scripting, C/C++ solutions allowed (, while portable to C/C++ are preferred). ;) I'm mostly interested in `KDE` and `GNOME`, as well as `dwm`, `xmonad`, `awesome` - solutions for other desktop environments are welcome (I would love to support as much as I can, in order to provide as universal solution as possible). Btw. For those interested, To be more specific about usecase: I'm interested in timetracking oriented around desktop + windows focus + xevents + multiplescreen. Currently there exist separate solutions for this (`ktimetracker` tracks tasks depending on desktops, while it's app tracking is very poor - no regular expressions support, just exact window titles -> not very usefull. On the other hand, `workrave` tracks keyboard and mouse activity, but is unaware of desktop->task I work on.), I'd like to do something, that merges those information in order to achieve more precise picture (maybe incorporating Association rule learning or other Data mining technique) of activities I have (in order to achieve more precise information related with my habits, in order with "ant-RSI fight" ;) ). So if your desktop follows in different paradigm, than "Virtual Desktop + Windows (with Names and Titles)" please, show code/cli snippet, that shows information about currently used window/frame/app + currently selected desktop/task/tags (eventually screen).


title: How to remotely turn "up" sounds?

text: So I have to Skype with someone, but he is not...well let's just say not a "geek", so I have to log in via SSH to his Fedora machine, and turn on sound [because he can't hear me when using Skype, but I can hear him, so the sound is turned off/too quiet on his side]. How?


title: installing column unix utility on windows

text: I would like to be able to use the BSD unix utilities: column, join and paste in my Cygwin installation. It seems that they are not available, or I cannot find them. Is there a way to install them so I can use them on Windows?


title: No nvidia drivers show up under restricted drivers

text: I am running Linux Mint 16 (but my experience has been consistent across other Ubuntu derivates including Xubuntu) on a Lenovo W540. I know there have been issues with linux compatibility for this machine, but I have just now been able to run all three monitors by docking and running in "Standard" mode (BIOS setting). However, I am unable to see any options for my nvidia card. The output of `lspci | grep -i vga` is:               vivin@serenity ~ $ lspci | grep -i vga     00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)     01:00.0 VGA compatible controller: NVIDIA Corporation GK107GLM [Quadro K1100M] (rev a1)      But I am unable to see any drivers. I tried installing the nvidia drivers manually (downloaded them from the NVIDIA site) but simply succeeded in ending up with a `640x480` screen and cinnamon crashing. I haven't tried `nvidia-current` because on a previous install that simply gave me a black screen on login. I am wondering if I should go ahead and do this anyway; I can simply change the `nvidia` driver to `nouveau` in `Xorg.conf`, right? Is there any other way to get the OS to recognize the fact that I _do_ have an NVIDIA card on my machine?


title: Are there any "scp -p" just like "cp -p"

text: So if I need to preserve the permissions/user/group infos of files then I can copy them with "cp -p foo fooo". But are there any "preserving" options in scp? When copying between servers.


title: What is the "Bootable flag" option when installing a distro?

text: Is the "bootable flag" needed in today's distributions? If not, then Why is it still in the installers? What is it exactly?


title: Giving non-admin users permissions ( to update, to access new wifi, but block DVD writing) in Ubuntu 12.04

text: Is there a way I can give a non sudoer the permissions necessary for them to update the system through Update Manager? I don't want the user to be able to `apt-get install` whatever like however, just updates. EDIT: I think something like               %someUser ALL=(root)NOPASSWD:/usr/bin/apt-get update,/usr/bin/apt-get      upgrade      added to the `sudoers` file via `visudo` may work? I would be grateful if someone could confirm as I have no experience of editing this. For the second part of my question I would like to know how to give the non- admin user privileges to join a WiFi network previously not joined, i.e. say at a hotel or cafe (This is distinct from just ticking the `available for all` box in edit connections for a previously established connection, I mean a genuinely new connection). Finally I want to remove the privileges for the user to burn to DVD (or CD) but still be able to read DVDs if possible (is this done by restricting permissions to `cdrecord` or would the user still be able to right-click an ISO and `write-to-disc`?)


title: Is port knocking good for a last chance when everything is locked out via the Firewall?

text: Based on this question: "Safe mode" on Linux? - So there is a configured knockd on a server, and a wrong firewall command was given out, so everybody got locked out from the server via layer3 (iptables). OK. Could this be resolved by knocking the ports as in the knockd, so then the knockd will open given ports? Could this be a last chance to get in to the server via layer3? Or it will not work, because if ex.: knockd configured to use port 5000 and port 5000 is blocked on all protocols, knockd will not work? Is knockd "before" the netfilter? (I mean INTERNET->KNOCKD->NETFILTER?)


title: How to output only given chars?

text: How can I crop unneeded chars, and only output what I need? For example: input:                   ASDFQWER      output:                   DFQ      I mean in this case I need only the 3.-4.-5. chars of the string. How do I do that?


title: curl url call in for loop?

text: I am working with bash and I am trying to make a curl url call in a for loop. Below is my simple curl call -               curl -v --header "Connection: keep-alive" "localhost:8080/user?userid=52010&client_id=20&attr=0"      And I am trying to make this curl call in for loop 100 times -               for ((i=1;i<=100;i++)); do   curl -v --header "Connection: keep-alive" "localhost:8080/user?uuid=52010&model_id=20&attr=0" done      I tried running above code as it is in the command line but it doesn't work and it gives me like this -               >      Any thoughts what wrong I am doing?


title: How can I run emacs with no shell?

text: I'm administrating an Arch Linux server. How can I securely add emacs to my `/etc/sudoers` editor variable? Currently I have "emacs" but that allows `M-x shell`. Basically, I want something like `rvim`, but for emacs.


title: How to install libltdl.so.3

text: I have Fedora 20, and am trying to install scanner software, 32-bit, for my Epson DX5000 printer. I get the messages:               [root@localhost:/home/Harry]$ rpm -Uvh iscan-2.29.3-1.usb0.1.ltdl3.i386.rpm      error: Failed dependencies:         libltdl.so.3 is needed by iscan-2.29.3-1.usb0.1.ltdl3.i386     [root@localhost:/home/Harry]$  yum install libltdl.so.3     Loaded plugins: langpacks, refresh-packagekit     No package libltdl.so.3 available.     Error: Nothing to do     [root@localhost:/home/Harry]$       I have tried searching on the Internet for `libltdl.so.3`, but I find the results very confusing. Is it perhaps part of another package? Please can anyone help me? * * * Thanks for the answers so far. I think this is another time when I asked X when I should have asked Y. I already have `libtool` installed (see the screen shot) So now the question is: why does it say `libltdl.so.3 is needed` when `libtool` is already installed? Unless I have misunderstood what is going on, again.               [root@localhost:/home/Harry]$ yum install libtool-ltdl     Loaded plugins: langpacks, refresh-packagekit     Package libtool-ltdl-2.4.2-23.fc20.i686 already installed and latest version     Nothing to do     [root@localhost:/home/Harry]$       Also:               [root@localhost:/home/Harry]$ yum install libltdl7     Loaded plugins: langpacks, refresh-packagekit     No package libltdl7 available.     Error: Nothing to do     [root@localhost:/home/Harry]$       Meta question: should I also change the title?


title: Customizing bash for many servers

text: I work with a few dozen servers. I'd really like to streamline my work, but at the same time I'm a bit reluctant, since it would be a lot of work synchronizing all servers. The servers are in different networks so there's little use setting up shared folders. What options do I have?


title: Convert Country List to Continent List in Bash

text: I am doing some geoip lookups using the `geoiplookup` command in Linux. This correctly returns the country codes for me but I need to break them down into continents instead of countries. I currently have a text file full of countries and am trying to determine the best way to convert these to continents using `bash`. I have a second text file called conversion and it looks like this:               United States:North America     Mexico:North America     Canada:North America     Argentina:South America     Bolivia:South America     Brazil:South America      Chile:South America     etc.      I was thinking of doing some sort of loop for the name in the `geo.txt` file and grep the conversion.txt file and then print out anything after the `:`. I highly doubt that is the easiest/best way so just wanted to get a few opinions on it.


title: Associative Arrays in Shell Scripts

text: I saw a trick for implementing associative arrays in a shell script. For example `print array["apples"]` could be scripted as `echo \$array$key` where key=apples. However, there was no mention of how to generate the keys to iterate over the array. The only way I could think of was to store the keys in a variable delimited by spaces so I could use a for-loop to iterate over the array. So, is there some other way to store the keys for later use?


title: Is there a way to make your process use less CPU?

text: I want my device to use less CPU to save battery. I have a program that uses a large amount of it. `nice` won't help as all it does is change scheduling when CPU is at %100, while I don't want it to get that high


title: Emulate horizontal scrolling with Shift key

text: I want to emulate horizontal scrolling when I use my (vertical) scroll wheel and pressing `Shift`. In some applications (Chrom{e,ium}) this already works, but I'm looking for a generic solution for X applications. The closest I got so far is `xbindkeys` + `xdotool`.               # ~/.xbindkeysrc     "xdotool click 6"       shift + b:4          "xdotool click 7"       shift + b:5      The Problem is that `xbindkeys` seems to miss some events, and occasionally a vertical scroll "gets through". This is very annoying. It looks like `xbindkeys` is using some kind of polling? Also I don't like spawning hundreds of shell commands per seconds. I got a small screen and have to scroll horizontally a lot. How can I achieve generic horizontal scrolling? **UPDATE:** There is another way that does mostly what I want with `xbindkeys` and `xmodmap`.               "xmodmap -e 'pointer = 1 2 3 6 7 4 5 8 9 10'"       c:50     "xmodmap -e 'pointer = default'"       release + shift + c:50      When `Shift` is held, the pointer buttons 4 and 5 are mapped to 6 and 7. (Buttons 4/5 are fore vertical scrolling and 6/7 for horizontal scrolling). `c:50` is the left `Shift` key. On key release the default pointer mapping is restored. This solves the "too many events" Problem nicely. However, the Shift key doesn't work as normal modifier anymore. I tried to re-issue the `Shift` press/release events with `xdotool` like this:               "xmodmap -e 'pointer = 1 2 3 6 7 4 5 8 9 10';  xdotool keydown Shift_L"       c:50     "xmodmap -e 'pointer = default';  xdotool keyup Shift_L"       release + shift + c:50      According to `xev` the `Shift` events get through, but I think it's not recognized as a modifier any more. For example, pressing `Shift`+`A` wouldn't produce an uppercase `A`.


title: Emacs soft line wrap at word boundary

text: How can I have emacs set to move the the last word at the 80 character mark? What I mean is this: Instead of               ran/     ge      I would like emacs to place the whole word range on the next line at the 80 character mark. Right now emacs will type past 80 characters and and cut the word at the terminal edge.


title: Difference between lib, lib32, lib64, libx32, and libexec

text: My 64 bit Ubuntu 13.04 system has the following directories in `/`:               lib     lib32     lib64     libx32     libexec      In the `/usr` directory there is:               lib     lib32     libx32     libexec      This seemed like something that could be easily answered with a search, but I found nothing online, other than that these directories store shared libraries (except libexec). But which shared libraries go in which folders (other than 32bit in lib32 and 64 bit in lib64)? Could someone explain the difference between all of these directories?


title: Why is Gnome Shell sending data over my wireless network?

text: I have been checking which processes under my Fedora Linux 18 are using my upload bandwidth and I occasionally see that Gnome Shell is one of them. Why should it be sending data over my wireless network?


title: What privileges do I have (find out within bourne shell script)

text: I am hacking away on a remote helper for git. The script is in bourne shell. I wanted to create some temporary directory in the home dir. For some reason I get permission denied. From my shell directly I can run the same command without problems. All the Environment vars look normal, $HOME, $USER, ... The homedir has normal permissions set (eg. everything is owned an writable by the user). I'm using debian testing. This is the offending command:               mkdir --mode=600 --parents /home/<user>/.tmp/$$      The peculiar thing is also that the directory is effectively created, but the next line that tries to put a file in it has a permission denied again and this time the file is not created. The shell is running with:               set -e # errexit     set -u # nounset     set -f # noglob     set -C # noclobber          set -x      but without them I still get permission denied. ps: I just tried in the $GIT_DIR, to which the user has write privileges too, and also permission denied, but this time not on the directory creation, but on the file creation the next line. **So how do I find out who is denying me and why?**


title: How to colorize last window in status line?

text: I'd like to make the last selected window (the one to which `:last-window` takes you) to stand out visually. By default it's just marked with an inconspicuous `-` after the name. Is there a way to set the attributes for last window name in the status line, like `set-option window-status-current` does for the current window name? Update: Both Debian Wheezy (stable) and Ubuntu 12.04 have tmux 1.6 that lacks the necessary option. But there's a backport which is 1.9. The solution was to upgrade.


title: Removing unused init scripts

text: On my Debian server, I have no network shares (NFS, SMB, ...). I am trying to optimize and simplify my boot process. Is it OK to remove the following init scripts?               /etc/rcS.d/S12mountnfs.sh     /etc/rcS.d/S13mountnfs-bootclean.sh      AFAICT, these are only needed, when NFS is to be mounted. However, I am not sure what purpose the `mountnfs-bootclean.sh` script has. Anyway, Is it safe to remove both these scripts, i.e.:               chkconfig mountnfs-bootclean.sh off     chkconfig mountnfs.sh off


How can I install tcl/tk8.6 on Ubuntu 12.04? The default repositories for Ubuntu 12.04 include tcl/tk8.5 which I have installed but I need the latest version. Is there a PPA that I could add which includes tcl/tk8.6 or is there another way? Note: As far as I can tell the latest version of Ubuntu has 8.6 as default.


title: default wordsize in UNIX/Linux

text: I was inspecting the preprocessed output of my C program and happened to look at the header file `wordsize.h` It is located in `/usr/include/i386-linux-gnu/bits/wordsize.h` the file contains only one macro               #define __WORDSIZE   32      My question is, is the wordsize then being decided by the compiler that is installed or does it has something to do with the OS that I have installed (32 bit or 64 bit) or does it have something to do with the Hardware configuration of my machine. I am new to development under Linux.


title: How can we trace problems of crashing programs in Linux?

text: If an application crashes in Windows we can check the Event Viewer in the Administration tools to see what has crashed. Sometimes it has useful information others not, but it is a start.   In linux if an application (any) crashes how one starts to trace what happened?   Is there e.g. some central log or something similar?


title: Sendmail relay to dmz to another relay

text: We have two domains. One of which is isolated. We're trying to forward mail from one domain, through a DMZ to a relay on the other domain. Using EHLO through telnet works. Using the mail command and specifying the relay works:               mail -S smtp=myrelay.com -s test me@mycompany.com      Sendmail does not work though but claims that the mail would be deliverable:               sendmail -bv me@mycomapany.com     me@mycompany.com...deliverable: mailer relay, host myrelay.com, user me@mycompany.com          sendmail -v me@mycompany.com     mycompany.com: Name server timeout     me@mycomapany.com... Transient parse error -- message queued for future delivery      So what's the deal? It says it's deliverable to myrelay.com but then tries to send it to mycompany.com instead. Anyone have any advice where to look to fix this?


title: How to find files containing two strings in different lines

text: A real example is: I have a Python file `util.py`, and I changed one of the function name from `foo` to `bar`. There might be other files using `foo` as function name and they are irrelevant. I want to update all the Python files in the project from `foo` to `bar`. So I would like to do a search on files for imports such as:               import project.path.util      or               from project.path.util import foo      and any calls to `foo` such as one starting with:               foo(      The solution has to be whitespace tolerant. I can search each of them using `grep` but I am uncertain about the combined search. Any suggestions will be appreciated.


title: xinput - Ctrl+<Left> misbehaves if history-search-backward is mapped

text: I am using these lines in my `~/.inputrc`:               "\e[5~": history-search-backward     "\e[6~": history-search-forward      With these settings when I type `c` on the prompt and do a `PageUp`, bash only shows command starting with `c` from the history. `PageDown` does its inverse. I find this very much productive to me. Without those lines in my inputrc file when I do `Ctrl`+`Left`, The cursor use to go to one word left and `Ctrl`+`Left` does its opposite. But with those setting mentioned above when I do `Ctrl`+`Left` and `Ctrl`+`Right` it prints `;5D` and `;5C` instead. So how do I make `Ctrl`+`Left` & `Ctrl`+`Right` do the right stuff?


title: How to get extract/compress option on right clicking?

text: I am using Linux Mint 14 Nadia . Earlier whenever I right clicked any folder I got options like Extract it, Compress etc. But now I am not getting them . Probably I changed/deleted some of the utilities . I have nautilus installed on my system . Is there any way I can get those 2 features back in the options list when I right click any folder ?


title: Debian Live-CD user password

text: I am trying to use Debian live from an USB, however I do not succeed in logging in… **What is the standard user and password to get access?** I have tried searching this question on the internet and used combinations of standard user credentials that I found such as live/live, root/root, root/live, and combinations without a password. None of them worked. This problem applies to Gnome, KDE, Xfce for me.


title: postfix configuration to verify all recipients

text: I have a mail server that should receive all mails, even if no user is existing. my big problem is the: Postfix Address Verification like mentioned here: http://www.postfix.org/ADDRESS_VERIFICATION_README.html Servers that use that kind of recipients verification, wont send me mails if there is no user to receive these mails. As mentioned in the Postfix Readme, to verify a recipient, the server is sending a probe message to my server, to check if an user exists. My goal is now, to find a way to always reply to those probe messages with the right answer to tell all servers that the user they are looking for exists. is there anything special in the settings i can use for this? i really appreciate all kinds of help! thank you:)


title: vim flag to append a line and save

text: I'm trying to mock an editor as part of writing feature tests for a CLI that I'm working on. I need to mock an editor which is opened and quit directly without saving, as well as an editor which modifies content in some way, then saves and exits. For the first test, I'm doing this:               export EDITOR='vi -c :q!'      which seems to work. But I'm having a hard time writing the second test. I've tried something along these lines:               export EDITOR='vi -c ":Loremipsum" -c ":wq"'      _(I have the Loremipsum plugin installed, but any other command which appended text would be equally fine)._ The file that's opened in this way doesn't actually get modified, so I can tell I'm doing something wrong. I'm not wrapping my head around the documentation for the -c flag, and I can't find any clear examples of its syntax. What am I doing wrong?


title: Where is my /etc/init.d/skeleton on OpenSuse 12.3?

text: On a fresh install of OpenSuse 12.3, I want to "daemonize" a program. And, on all examples found on Internet, I see I have to create first a `/etc/init.d/myscript` based on the `/etc/init.d/skeleton`... But I have no `/etc/init.d/skeleton`... Is there another place for this file? Or maybe I need to install something? The system is up-to-date, I checked that first. I know I can try to copy another existing `/etc/init.d` script and modify it, or create a new one, but I would know if I am doing wrong, or if there is another special way to do that on OpenSuse.


title: Unable to remove the files from an usb drive (neither by dd /dev/zero nor by rm -r)

text: I have a flash usb drive and up till now it has worked well. Recently I recorded iso to it using dd. Now I want to delete it.               $ lsblk     NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT     .......     sdb      8:16   1  14.6G  0 disk      └─sdb1   8:17   1  14.5G  0 part /media/alex/ARCH_201404     sr0     11:0    1  1024M  0 rom            $ mount           /dev/sdb1 on /media/alex/ARCH_201404 type iso9660    (ro,nosuid,nodev,uid=1000,gid=1000,iocharset=utf8,mode=0400,dmode=0500,uhelper=udisks2)      When I did this               $ sudo dd ibs=4096 count=1 if=/dev/zero of=/dev/sdb1     1+0 records in     8+0 records out     4096 bytes (4.1 kB) copied, 0.00053675 s, 7.6 MB/s      it seemed to succeed but when I explored the usb flash all the files were still there. When did this:               sudo rm -r /media/alex/ARCH_201404/*      and I got the error:               ..................     rm: cannot remove ‘/media/alex/ARCH_201404/loader/entries/uefi-shell-v1-x86_64.conf’: Read-only file system     rm: cannot remove ‘/media/alex/ARCH_201404/loader/entries/uefi-shell-v2-x86_64.conf’: Read-only file system     rm: cannot remove ‘/media/alex/ARCH_201404/loader/loader.conf’: Read-only file system     .....................      What can I do about it?


title: Is possible to have workspace switching via Ctl+Alt+Arrow NON CYCLIC?

text: After installing Linux Mint 16, and installing "Workspace grid (2D) and switcher", workspace switching started to work in a cyclic way. If you have many workspaces (4x4 in my case) navigating them in cyclic way feels like solving a Rubik's Cube. I.e. if you have 2x2 workspaces, pressing Ctrl+Alt+RightArrow moves you to workspace top-right workspace, pressing again moves you to top-left workspace, then top-right, then top-left and so on. Before version 2.0 pressing Ctl+Alt+RightArrow had taken you to top-right workspace and never moved you again from there. **Is there any way to return to the old behaviour?**


title: /dev/sdb: No such file or directory (but /dev/sdb1 etc. exist)

text: I'm not sure what is wrong here but when running `fdisk -l` I don't get an output, and when running                   fdisk /dev/sdb # I get this     fdisk: unable to open /dev/sdb: No such file or directory      I'm running Ubuntu 12.10 Server   Can someone please tell me what I'm doing wrong? I want to delete `/dev/sdb2-3` and just have one partition for `sdb`   The only thing I've done differently with the setup of this server is use ext4 instead of ext3, I figured the extra speed of ext4 would help since I am using SSDs now               root@sb8:~# ll /dev/sd*     brw-rw---- 1 root disk 8,  1 Nov 23 14:58 /dev/sda1     brw-rw---- 1 root disk 8,  2 Nov 23 14:55 /dev/sda2     brw-rw---- 1 root disk 8, 17 Nov 23 19:20 /dev/sdb1     brw-rw---- 1 root disk 8, 18 Nov 23 15:45 /dev/sdb2     brw-rw---- 1 root disk 8, 19 Nov 23 14:51 /dev/sdb3     brw-rw---- 1 root disk 8, 33 Nov 23 15:47 /dev/sdc1     brw-rw---- 1 root disk 8, 49 Nov 23 15:48 /dev/sdd1          root@sb8:~# cat /proc/partitions     major minor  #blocks  name             8        0  117220824 sda        8        1  112096256 sda1        8        2    5119968 sda2        8       16  117220824 sdb        8       17   20971520 sdb1        8       18   95718400 sdb2        8       19     526304 sdb3        8       48 1953514584 sdd        8       49 1863013655 sdd1        8       32 1953514584 sdc        8       33 1863013655 sdc1          root@sb8:~# ll /dev/disk/by-path/     total 8     drwxr-xr-x 2 root root 4096 Nov 23 15:48 ./     drwxr-xr-x 5 root root 4096 Nov 23 15:42 ../     lrwxrwxrwx 1 root root   10 Nov 23 14:58 pci-0000:00:1f.2-scsi-0:0:0:0-part1 -> ../../sda1     lrwxrwxrwx 1 root root   10 Nov 23 19:20 pci-0000:00:1f.2-scsi-1:0:0:0-part1 -> ../../sdb1     lrwxrwxrwx 1 root root   10 Nov 23 15:45 pci-0000:00:1f.2-scsi-1:0:0:0-part2 -> ../../sdb2     lrwxrwxrwx 1 root root   10 Nov 23 15:47 pci-0000:00:1f.2-scsi-2:0:0:0-part1 -> ../../sdc1     lrwxrwxrwx 1 root root   10 Nov 23 15:48 pci-0000:00:1f.2-scsi-3:0:0:0-part1 -> ../../sdd1          root@sb8:~# df -T /dev     Filesystem     Type 1K-blocks    Used Available Use% Mounted on     /dev/root      ext4 111986032 1993108 104388112   2% /


title: Kill a nohup mpi process

text: I have started a program in parallel using the command:                   nohup mpirun -7 mylongprogram.py &      I now want to terminate the program. When I want to kill the process by the command:                   kill -9 <PID>      I see that another process with a different PID is started. How do I kill the entire mpi program and prevent nohup from doing this?


title: ssh with sudo doesn't start services

text: I want to run command with sudo through ssh without disabling "requiretty" sudo option. According to /etc/sudoers:               #     # Disable "ssh hostname sudo <cmd>", because it will show the password in clear.      #         You have to run "ssh -t hostname sudo <cmd>".     #     Defaults    requiretty      Generally, "ssh -t" is working fine. I'm able to run commands like whoami:               ssh -t  'bnadmin@devgreg' 'sudo whoami'     root     Connection to hostname closed.      Besides the weird message "Connection to hostname closed" it's working fine. The problem comes when I'm trying to trigger services that supposed to be demonized. They are just not starting if I run it through ssh. For example tomcat:               ssh -t 'myuser@hostname' 'sudo /usr/local/tomcat/bin/startup.sh'     Using CATALINA_BASE:   /usr/local/tomcat     Using CATALINA_HOME:   /usr/local/tomcat     Using CATALINA_TMPDIR: /usr/local/tomcat/temp     Using JRE_HOME:        /usr/java/latest/     Using CLASSPATH:       /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar     Connection to hostname closed.     $ ssh -t 'myuser@hostname' 'ps aux | grep java'     myuser  21177  0.0  0.1 106096  1380 pts/2    Ss+  17:25   0:00 bash -c ps aux | grep java     myuser  21185  0.0  0.0 103244   824 pts/2    S+   17:25   0:00 grep java     Connection to hostname closed.      Besides tomcat I have the problem with any init.d startup script. If I comment out requiretty in the sudoers file and don't use -t ssh option, then it's successfully starting.               $ ssh 'myuser@hostname' 'sudo /usr/local/tomcat/bin/startup.sh'     $ ssh 'myuser@hostname' 'ps aux | grep java'     root   21235 90.8 69.3 3706044 701956 ?      Sl   17:30   0:39 /usr/java/latest//bin/java -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -javaagent:/usr/local/tomcat/bin/../spring-instrument-3.1.1.RELEASE.jar -Xms1500m -Xmx2500m -XX:PermSize=256m -Djava.endorsed.dirs=/usr/local/tomcat/endorsed -classpath /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start     myuser  21279  1.0  0.1 106096  1380 ?        Ss   17:30   0:00 bash -c ps aux | grep java     myuser  21287  0.0  0.0 103244   824 ?        S    17:30   0:00 grep java      So my question is how can trigger background processes with sudo through ssh without disabling requiretty sudo option?


title: rm -rf on vhosts directory, what should I do?

text: I was tired and unfortunately I did:               rm -rf * /var/www/vhosts repertory      on my CentOS 6.3 running with Parallel Plesk. I lost many websites, but worst: I've lost `chroot`, `default`, `fs` and `fs- passwd`. What were these folders? What did they do? What should I do now...? I have backups, but only for my websites. I miss every file and folder that were in the `vhosts` directory (`chroot`, `default`, `fs` and `fs-passwd`).


title: Get "Text Content" of Files

text: I was wondering if there is a tool to scrape text content of a file. Basically I would like to put in a pdf, word document, compressed file or anything else and get the text it contains out. There is `strings` which prints out sequences of printable characters but this doesn't work on many formats that are compressed. Its "dumb" nature also means that it often prints more than just the text. It would be a good fallback for an unknown file type though. There is the `pdftotext` command which does pretty much exactly what I want but it only works on pdfs. Is there a tool that works on multiple formats or that ties more of these tools together? ### Additional Information I lot of people has been mentioning that their tools are non-standard. I would just like to point out that this is fine.


How to add more /dev/loop* devices on Fedora 19? I do:               # uname -r     3.11.2-201.fc19.x86_64     # lsmod |grep loop          # ls /dev/loop*     /dev/loop0  /dev/loop1  /dev/loop2  /dev/loop3  /dev/loop4  /dev/loop5  /dev/loop6  /dev/loop7  /dev/loop-control     # modprobe loop max_loop=128     # ls /dev/loop*     /dev/loop0  /dev/loop1  /dev/loop2  /dev/loop3  /dev/loop4  /dev/loop5  /dev/loop6  /dev/loop7  /dev/loop-control      So nothing changes.


title: minicom showing offline

text: I am trying to use `minicom` in Ubuntu. To do this I first connect my USB to DB9 converter, then I type this command on terminal `dmesg | grep tty` to check if my USB to DB9 converter is connected properly. I got this output:               [    0.000000] console [tty0] enabled     [   54.200503] usb 2-1.2: pl2303 converter now attached to ttyUSB0     [   76.183173] cdc_acm 1-1.1:1.2: ttyACM0: USB ACM device     [  118.363275] cdc_acm 1-1.1:1.2: ttyACM0: USB ACM device     [  190.079494] cdc_acm 1-1.1:1.2: ttyACM0: USB ACM device      So, I know my USB to DB9 converter name is `ttyUSB0`. Following steps are executed in order:   * Open the `minicom` by using command `sudo minicom -o -s -w`.   * Open `serial port setup` and write `serial device` as `/dev/ttyUSB0` and write `Hardware Flow Control` to `NO`.   * Press `Enter` to exit to main menu then `Esc` to start `minicom`. After these steps it should work fine, but my `minicom` is showing "offline". Where is the mistake in my configuration? Thank you!


title: service command and non-root user

text: On the linux servers of our main customer our bash scripts were running under root for years. Now we want to change that for security reasons. Some of our scripts were triggered by the "service" command, for example "service filescontrol start". The main admin from our customer also wants these service triggered scripts to run under normal users. But is the concept of the "service" command not bound to the root user?


title: How can I get this script file's functions to load without having to source it every time? "command not found" (Bash/scripting basics)

text: How can I get this script file's functions to load without having to source it every time? I created a file `foo` with script functions I'd like to run. It's in `/usr/bin`, which is in the PATH. File **foo** :               #!/bin/bash     echo "Running foo"          function x {         echo "x"     }      However, when I type a function name like `x` in the terminal:   `x: command not found` When I type `foo`:   `Running foo` shows up (so the file is in PATH and is executable) After typing `source foo`, I can type `x` to run function x A pretty basic question, I know. I'm just trying to abstract my scripts so they're more manageable (compared to dumping everything in .profile or .bashrc).


title: Copy ssh public key to multiple Linux hosts

text: I am trying to copy .ssh/id_rsa.pub from our central server to multiple servers. I have the following script which I usually use to push changes to the different servers.               #!/bin/bash               for ip in $(<IPs); do         # Tell the remote server to start bash, but since its         # standard input is not a TTY it will start bash in         # noninteractive mode.         ssh -q "$ip" bash <<-'EOF'                    EOF          done      But in this case, I need to cat the public key on the local server and then add that to multiple servers. Is there a way by using the above here document script to execute the following.               cat .ssh/id_rsa.pub |ssh tony@0.0.0.0 'cat > .ssh/authorized_keys'


title: use mosh without giving up local scrollback / history?

text: Is there a way to use `mosh` without giving up the local scrollback? Basically, in some circumstances, IP-roaming is indeed useful and needed, but the extra terminal emulation and key prediction seems to only be getting rid of the local scrollback buffer lines and the session history.


title: Mint Linux 13 will not boot to splash screen after graphics driver enabling in hp dx2450:

text: I was trying to play some games on my computer and had graphics problems. I only have the on-board graphics (no graphics card added yet) but some of the games were extremely basic and still wouldn't run. I checked the drivers since I figured this may be the issue. Every single graphics driver in the listing was disabled, so I enabled a Nvidia one that was already installed on the machine, a HP dx2450. On rebooting, what would normally take 45 seconds ended up being a blank screen after passing the blue hp screen before getting to the splash login screen. My monitor timed out and went into sleep mode as a result. Restarting it I can get into grub via a series of keys I found online, but as this is my first time with this particular issue I'm not sure how to fix it. I'd rather not reinstall the system unless absolutely necessary, especially since this was an OEM install by HP. Don't know how this information could help, but as I already know from most tech forums that it will be asked: HP dx2450 2.3 GHz Dual-Core CPU 2 Gb DDR2 Ram 80 Gb Hard-Drive No PCI x16 Graphics Card in slot. On-Board graphics only at present.


title: awk separator preferences

text: I write ad hoc awk commands in cygwin to process tab delimited files. Pretty much every command starts with:               BEGIN {FS="\t";OFS="\t";ORS="\r\n";}        How can I make these separators the default to avoid typing them every time?


title: Pipe command to tail: when is the first command aborted?

text: In this example:               $ for i in {1..3}; do sleep 1; echo $i;  done | head -n 2      why is the first command (for loop) killed only just before the `3` is displayed ? I expected it to be killed right after the `2` is displayed. The problem I was trying to solve initially was this one:               $ for i in *(/); do c=`find "$i" -iname "*.ext" | wc -l`; echo "$c  $i"; done | head -n 3      I expected it to end as soon as three lines are on the screen, but it's running the loop four times, discarding the fourth line. What I thought would happen:               sleep 1     echo 1     sleep 1     echo 2      # 2 is printed and the for loop is killed      What actually happens:               sleep 1     echo 1     sleep 1     echo 2      sleep 1     echo 3     # 3 is not printed and the for loop is killed      Is there a way to abort the loop immediately after a given number of iterations without adding some logic inside the loop itself ?


title: Find all lines in a file with a certain character at a certain position

text: I have a lab question asking me to use `grep` with a regex pattern to match every word where the third letter from the beginning of the line is an "a" and save it with a redirect. How can I do that?


title: How can I get back into "normal" edit-mode after pressing esc in zsh (vi mode)?

text: I'm using `zsh` in `vi-mode`. When I go to normal mode with `ESC` and then back into insert mode (for example using `i`, `a` or `s`), the line editor kind of "protects" the part of the line in front of the char, at which I was when re-entering insert mode. I fixed it for the backspace char by rebinding it with               bindkey "^?" backward-delete-char      But there are still other bindings like `^W` that don't work out of the box (probably because they are bound to `vi-*`). If I understand it correctly, this behavior is normal to `vi`. Is there's a way to make `zle` behave like `vim` without having to rebind so many keys?


title: Problem configuring Access Control on Apache

text: I have a little Debian Server which runs Apache 2.2.22. I have configured, with WebMin, a Apache Webserver that listens on the port 83. Now, in the root directory of this Webserver I configured the Access Control with a password, and everything works fine. The thing that I seem unable to fully accomplish is to create a "whitelist" on my local network. Now my config file looks like this:               AuthType Basic     AuthName "Must Login"     AuthBasicProvider file     AuthUserFile /root/apache/password     require user root     allow from 192.168.1.0/255.255.255.0     allow from myname.dyndns.org     order allow,deny     Satisfy any      This works like a charm when accessing the server directly from its local address (192.168.1.9). But if I, still connected to my local network, try to access it by typing in the address bar "myname.dyndns.org", it asks me the password. In the log file I found that when I try to connect directly typing the local address it logs               [Fri Aug 29 23:22:44 2014] [debug] mod_deflate.c(700): [client 192.168.1.2] Zlib: Compressed 1880 to 527 : URL /      but when I connect using myname.dyndns.org it logs               [Fri Aug 29 23:20:14 2014] [debug] mod_deflate.c(700): [client 66.249.81.21] Zlib: Compressed 484 to 326 : URL /      How can I accomplish this and why the client from the second log line isn't my client local IP? Thanks in advance for your responses, Mauro.


title: Auto-Mounting CIFS Shares on Laptop

text: I've seen questions similar to this asked before in several variations, but I have yet to locate a satisfactory answer. Here's what I have:   * A highly mobile Debian laptop that switches networks frequently.   * A FreeNAS server at home with a bunch of CIFS shares on it. Here's what I want:   * If I access the CIFS share directory when I'm at home, auto-mount the CIFS share.   * If I access the CIFS share when I'm anywhere else, return an error immediately (i.e. don't contemplate the network for five minutes before figuring out the NAS isn't there).   * When I suspend or hibernate the machine, cleanly unmount the share so that the mount isn't pointing into thin air when the machine wakes back up again. If the share can't be cleanly unmounted (a process is using a directory), either:      * Abort the suspend/hibernate and tell me who's camping on the mount; or     * Force the unmount anyway and proceed with suspend/hibernate.   * Extra Credit: When the network connection drops (pull the plug or lose association with the WAP), attempt to cleanly unmount the share.   * Extra Credit: This magic should be independent of the network manager in use. None of the various options I've read about seem to be appropriate:   * `autofs` seems to be reliable, but doesn't appear to have any awareness of suspend/hibernate.   * The `_netdev` option in `mount` and `/etc/fstab` looks interesting, but appears to apply only to NFS shares.   * I have not yet been able to get `gvfs` to work, but then I haven't tried very hard. Any suggestions on how to approach this? ADDENDUM: Here's the short version of what I ended up doing so far. I installed `autofs`, and wrote a small shell script to force-expire all auto-mounted volumes, which gets called whenever a network interface goes down. I created an automounter map for my CIFS server, with the credentials stored in an external file (yuck). I then wrote the following shell script:               #!/bin/sh -e          # Expire everything in the automounter.     if [ -f /var/run/autofs.pid ]; then         kill -USR1 "$(cat /var/run/autofs.pid)"     fi      Sending the USR1 signal to the automount daemon causes it to force-expire all unused mounts. I then placed this script in `/etc/network/if-down.d/autofs`, with a softlink in `/etc/network/if-post-down.d/autofs`. NetworkManager invokes all the scripts in the latter directory when a connection drops, so any auto-mounted filesystems should be unmounted. I'm not terribly happy with the arrangement, however. For a start, `autofs` makes no distinction between auto-mounted volumes, and, upon receiving USR1, will unmount _all_ inactive volumes, including non-network volumes, which is rather heavy-handed. Further, the login password for the CIFS server has to be stored in a file. I would much prefer to be prompted for it. Anyway, that's what I've kluged together so far. It works, but I'll be happy to use something better...


title: How to use `smart-compile` without confirmation in Emacs

text: I'm using `smart-compile` in Emacs. It works fine, but if possible I want to omit the confirmation like `Compile command: ruby foo.rb`. How can I do it?


title: Sort based on the third column

text: I'm facing a huge 4-columns file. I'd like to display the sorted file in stdout based on its 3rd column:               cat myFile | sort -u -k3      Is that enough to perform the trick?


title: What is the meaning of "\_" in output of 'ps ef'?

text: When I executed `ps ef` command in a linux server, I saw that one of the command starts with `\\_`. For example,               \_ /bin/sh /usr/      Could any one please let me know what is the meaning of `\\_` in this command?


title: How to install Ruby 1.9.3 on Arch?

text: The wiki suggests using `$sudo pacman -S ruby1.9` but the package isn't there... I'd rather not compile it from source but I can if no one knows.


title: mdadm - Accidentally ran "mdadm --create" on an existing raid-1. The superblock is now corrupt and I am unable to recover data. Did I bork my data?

text: I have `/dev/sdb1` and `/dev/sdc2` that were previously setup into a RAID-1 with `mdadm`, but then I reinstalled and lost the old configuration. Out of idiocy, I ran               sudo mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb1 /dev/sdc1      in an attempt to reconfigure the RAID. After I let the drives sync (oops?), now none of `/dev/md0`, `/dev/sdb1`, or `/dev/sdc2` will mount. For `/dev/md0`, it complains about a bad magic number in the super block. For the `/dev/sd{b,c}1`, it complains about missing inodes. In short, the question is this: Did I just bork all my data, or is it possible to recover the array still? The following is the output of `dumpe2fs` for those partitions:               brent@codpiece:~$ sudo dumpe2fs /dev/md0      dumpe2fs 1.42 (29-Nov-2011)     dumpe2fs: Bad magic number in super-block while trying to open /dev/md0     Couldn't find valid filesystem superblock.     brent@codpiece:~$ sudo dumpe2fs /dev/sdb1      dumpe2fs 1.42 (29-Nov-2011)     Filesystem volume name:   <none>     Last mounted on:          /var/media     Filesystem UUID:          1462d79f-8a10-4590-8d63-3fcc105b601d     Filesystem magic number:  0xEF53     Filesystem revision #:    1 (dynamic)     Filesystem features:      has_journal ext_attr resize_inode dir_index filetype extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize     Filesystem flags:         signed_directory_hash      Default mount options:    (none)     Filesystem state:         clean     Errors behavior:          Continue     Filesystem OS type:       Linux     Inode count:              61054976     Block count:              244189984     Reserved block count:     12209499     Free blocks:              59069396     Free inodes:              60960671     First block:              0     Block size:               4096     Fragment size:            4096     Reserved GDT blocks:      965     Blocks per group:         32768     Fragments per group:      32768     Inodes per group:         8192     Inode blocks per group:   512     Flex block group size:    16     Filesystem created:       Wed Feb 10 21:04:42 2010     Last mount time:          Fri May 10 20:25:34 2013     Last write time:          Sun May 12 14:41:02 2013     Mount count:              189     Maximum mount count:      38     Last checked:             Wed Feb 10 21:04:42 2010     Check interval:           15552000 (6 months)     Next check after:         Mon Aug  9 22:04:42 2010     Lifetime writes:          250 GB     Reserved blocks uid:      0 (user root)     Reserved blocks gid:      0 (group root)     First inode:              11     Inode size:           256     Required extra isize:     28     Desired extra isize:      28     Journal inode:            8     Default directory hash:   half_md4     Directory Hash Seed:      7cd5ce46-b823-4453-aa66-00ddaff69952     Journal backup:           inode blocks     dumpe2fs: A block group is missing an inode table while reading journal inode      Edit: It seems like @hauke-laging was correct that I created a 1.2 metadata version RAID-1 over what used to be a 1.0 metadata raid. I've reran `mdadm --create` for the right version, but now my filesystem is corrupt. Do I need to mess with the partition table, or can I simply run `fsck /dev/md0`? The following is the new output of `fsck` and `dumpe2fs`:               brent@codpiece:~$ sudo fsck /dev/md0      fsck from util-linux 2.20.1     e2fsck 1.42 (29-Nov-2011)     The filesystem size (according to the superblock) is 244189984 blocks     The physical size of the device is 244189952 blocks     Either the superblock or the partition table is likely to be corrupt!          brent@codpiece:~$ sudo dumpe2fs /dev/md0     Filesystem volume name:   <none>     Last mounted on:          <not available>     Filesystem UUID:          1462d79f-8a10-4590-8d63-3fcc105b601d     Filesystem magic number:  0xEF53     Filesystem revision #:    1 (dynamic)     Filesystem features:      has_journal ext_attr resize_inode dir_index filetype extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize     Filesystem flags:         signed_directory_hash      Default mount options:    (none)     Filesystem state:         not clean     Errors behavior:          Continue     Filesystem OS type:       Linux     Inode count:              61054976     Block count:              244189984     Reserved block count:     12209499     Free blocks:              240306893     Free inodes:              61054965     First block:              0     Block size:               4096     Fragment size:            4096     Reserved GDT blocks:      965     Blocks per group:         32768     Fragments per group:      32768     Inodes per group:         8192     Inode blocks per group:   512     Flex block group size:    16     Filesystem created:       Wed Feb 10 21:04:42 2010     Last mount time:          n/a     Last write time:          Mon May 13 10:38:58 2013     Mount count:              0     Maximum mount count:      38     Last checked:             Wed Feb 10 21:04:42 2010     Check interval:           15552000 (6 months)     Next check after:         Mon Aug  9 22:04:42 2010     Reserved blocks uid:      0 (user root)     Reserved blocks gid:      0 (group root)     First inode:              11     Inode size:           256     Required extra isize:     28     Desired extra isize:      28     Journal inode:            8     Default directory hash:   half_md4     Directory Hash Seed:      7cd5ce46-b823-4453-aa66-00ddaff69952     Journal backup:           inode blocks     Journal features:         journal_incompat_revoke     Journal size:             128M     Journal length:           32768     Journal sequence:         0x00215ad3     Journal start:            0               Group 0: (Blocks 0-32767) [ITABLE_ZEROED]       Checksum 0x4453, unused inodes 0       Primary superblock at 0, Group descriptors at 1-59       Reserved GDT blocks at 60-1024       Block bitmap at 1025 (+1025), Inode bitmap at 1041 (+1041)       Inode table at 1057-1568 (+1057)       23513 free blocks, 8181 free inodes, 2 directories       Free blocks: 12576-12591, 12864-12879, <...>       Free inodes:      Group 1: (Blocks 32768-65535) [ITABLE_ZEROED]       Checksum 0x348a, unused inodes 0       Backup superblock at 32768, Group descriptors at 32769-32827       Reserved GDT blocks at 32828-33792       Block bitmap at 1026 (bg #0 + 1026), Inode bitmap at 1042 (bg #0 + 1042)       Inode table at 1569-2080 (bg #0 + 1569)       31743 free blocks, 8192 free inodes, 0 directories       Free blocks: 43232-43239, 43264-43271, <...>       Free inodes:      Group 2: (Blocks 65536-98303) [ITABLE_ZEROED]       Checksum 0x2056, unused inodes 0       Block bitmap at 1027 (bg #0 + 1027), Inode bitmap at 1043 (bg #0 + 1043)       Inode table at 2081-2592 (bg #0 + 2081)       32768 free blocks, 8192 free inodes, 0 directories       Free blocks: 66417-66432, 66445-66456, 66891, <...>       Free inodes: 23921-24576     Group 3: (Blocks 98304-131071) [ITABLE_ZEROED]       Checksum 0x4254, unused inodes 0       Backup superblock at 98304, Group descriptors at 98305-98363       Reserved GDT blocks at 98364-99328       Block bitmap at 1028 (bg #0 + 1028), Inode bitmap at 1044 (bg #0 + 1044)       Inode table at 2593-3104 (bg #0 + 2593)       31743 free blocks, 8192 free inodes, 0 directories       Free blocks: 99334-99339, 99438-99443, 99456-99459, <...>       Free inodes: 24585-32768     Group 4: (Blocks 131072-163839) [ITABLE_ZEROED]       Checksum 0x6a00, unused inodes 0       Block bitmap at 1029 (bg #0 + 1029), Inode bitmap at 1045 (bg #0 + 1045)       Inode table at 3105-3616 (bg #0 + 3105)       32768 free blocks, 8192 free inodes, 0 directories       Free blocks: 131074-131075, 131124-131129, <...>       Free inodes: 32769-40960     Group 5: (Blocks 163840-196607) [ITABLE_ZEROED]       Checksum 0x37e0, unused inodes 0       Backup superblock at 163840, Group descriptors at 163841-163899       Reserved GDT blocks at 163900-164864       Block bitmap at 1030 (bg #0 + 1030), Inode bitmap at 1046 (bg #0 + 1046)       Inode table at 3617-4128 (bg #0 + 3617)       31743 free blocks, 8192 free inodes, 0 directories       Free blocks: 164968-164970, 164979, <...>       Free inodes: 40961-49152     Group 6: (Blocks 196608-229375) [ITABLE_ZEROED]       <...>


title: zsh refusing to accept new autocomplete script

text: I have a software project that I'm attempting to write zsh completions for. After installing a package that provided a number of pre-made completions, I found they were put here:               /usr/share/zsh/site-functions      So I wrote my completion script, and threw it in there too. ...and was frustrated by failure. I've tried the following:   1. Symlinking to the original script from the directory above.   2. Putting a copy of the script directly into the directory above.   3. Setting my login shell to zsh (instead of just switching to it from another shell)   4. (Probably) all permutations of `compinit` and `rehash`.   5. Dumbing-down my original script so that there's no way it could be wrong.   6. Changing the contents of another script. The changes worked, so the directory is correct and zsh is detecting completions scripts there. Here is the dumbed-down script:               #compdef aura          _arguments -s \       '-V[Version!]' \       '-h[Helpppp]'      And the current contents of my .zshrc. I'm not normally a zsh user.               autoload -U compinit     compinit     zstyle ':completion:*' rehash true      Please and thank you for any insight you can give. What am I missing? EDIT: Contents of /usr/share/zsh/site-functions is: `_ack _adb _android _attach _aura _baselayout _bpython _brew _bundle _cap _choc _coffee _cower _cpanm _debuild _dhcpcd _ditz _emulator _eselect _fab _gas _gcc-config _geany _gem _genlop _gentoolkit _gentoo_packages _git-flow _github _git-pulls _git-wtf _google _gradle _heroku _jmeter _jmeter-plugins _jonas _knife _language_codes _layman _lein _lunar _lunchy _manage.py _mosh _mvn _node _optirun _pacman _pactree _pear _perf _periscope _pgsql_utils _pip _pkcon _play _port _portage _portage_utils _pygmentize _redis-cli _rvm _sbt _scala _sdd _setup.py _showoff _smartmontools _srm _ssh-copy-id _subliminal _symfony _systemd _teamocil _thor _tmuxinator _vagrant _virtualbox _vnstat _vpnc _yaourt`


title: How can you pdfjoin smartly different sized pictures?

text: I'm running the default `pdfjoin` and getting results like this: ![enter image description here](http://i.stack.imgur.com/g0cMv.png) **How can you`pdfjoin` different sized pictures?** My first idea is to add an empty page in front of all things.


title: Freebsd equivalent build-essential

text: I'm already familiar with Debian and Ubuntu. At the moment I'm fiddling around with FreeBSD on a server, after installing it I'm wondering what the best way would be to install the 'essential' packages.


title: Why X server runs on TTY1 and not TTY7 on Arch Linux?

text: I've used Debian derivates (*buntu, CrunchBang), Mandriva, OpenSuSE, Fedora, name it.. all of them had X server at TTY7 (at least I think it was 7), accessed with:               Ctrl + Alt + F7      Now, I moved to Arch, and it's on TTY1 now -               Ctrl + Alt + F1      All the others are regular TTY's with login prompt. Why is that? Is it perhaps because Arch uses Systemd?


title: ncurses-devel problems in SuSE Linux Enterprise Desktop 11

text: Searching on the WEB, I found this tutorial (the only one that has convinced me) for installing a new kernel and I followed the steps provided. But, I got these problems: In the first step I tried to install the `ncurses-devel` via terminal using the `zypper` and the YaST Software Management, but in the first case I got this error:               No provider of 'ncurses-devel' found.      Using the YaST, I didn't find the source of the package listed. Then, I downloaded the application from the WEB site and I got the following error: Executing the `make` command               /bin/sh: -I../c++: No such file or directory     make[1]: *** [../objects/cursesf.o] Error 127     make[1]: Leaving directory `/home/nat64/Desktop/SW/ncurses-5.9/c++'     make: *** [all] Error 2      In the same way, when I execute the `make install`, the terminal showed me the same errors. Finally, I wrote in the terminal `yast -i ncurses-devel`, without success. It marked me that the source was not found. I need to install 7 kernels for the project that I'm doing in my virtual machine.


title: Setting icon theme for Qt based apps in non kde environment

text: How could I set icon theme for Qt based apps in a non-kde environment? In KDE I could specify a different one, otherwise it would go for the default gnome theme.


title: Monitor outgoing web requests as they’re happening

text: I want to see a list of all outgoing HTTP requests from my desktop. I think it should be possible to monitor HTTPS hostnames as well for local clients using Server Name Indication (SNI). OS X has a nice GUI utility called Little Snitch, which is a per-app HTTP monitor and firewall rule front-end. I would settle for a nice terminal utility. `tcpdump` is overkill as I just want to see where the traffic is going in real-time and not the transmitted data. Ideally, I would like to see what process made the request as well, but just seeing what dials home would be a nice start.


title: Invalid mail alert

text: When I log in to Unix, I get new mail alert:               [YOU HAVE NEW MAIL]      I checked my mail and I don't have any:               $ mail     Mail [5.2 UCB] [AIX 5.X]  Type ? for help.     "/var/spool/mail/userId": 0 messages     No mail      How to prevent invalid mail alerts?


title: Using sed to remove string from list of files fails

text: I'm on bash (Mac OS X). I have a list of files and there's a string I want to remove:               $ grep -l \</html\> *.html       21888601.html       21906283.html       21977081.html       ...      All matching files are named in this format (.html). Then I try this:               $ grep -l \</html\> 27776977.html | xargs -0 sed -i.back '/<\/html>/d'      The shell just prints out the list of files returned from grep and an error:               sed: 21888601.html       21906283.html       21977081.html       ...     : File name too long      These filenames are obviously not too long, so there is some other error here. Also, when I test this on files that have alpha names (not all numbers), I don't get the error. I also tried:               $ grep -l \</html\> 27776977.html | xargs -0 sed -i.back '/<\/html>/d'     sed: 27776977.html     : No such file or directory          $ grep -l \</html\> 27776977.html     27776977.html      Is sed unable to handle numerical filenames? Or is there some other problem here?


title: Bootable USB appearing as HDD not Removable Device

text: I have a unique problem with an older Toshiba satellite laptop that happens to be a LegacyFree laptop meaning you can't access the bios via the normal F2, Del, Esc, etc. I can only select a boot option in the beginning such as HDD, Removeable, CD, Floppy, etc. The problem I ran into is the bootable USB I created is appearing as a bootable HDD not as a removable device and thus it is booting from the HDD in the computer because I can't change the HDD device priority. Is there anyway when making the bootable USB to make it appear as a USB instead of HDD? I've been using unetbootin and LinuxLive to create these bootable USBs. **NOTE:** I am aware you can access LegacyFree Bios is through a program called Tsetup or HwSetup through windowsXP problem is that The laptop doesn't have any OS currently installed.


title: Finding out *what* is synchronizing two Linux servers

text: The last person to maintain these Red Hat servers somehow set it up so they stay in sync -- if I delete files on one it automatically deletes them on the other. I need to set up a new configuration on just one of them, so I need to disable the synchronization, but I don't know what's causing it. Where should I look?


title: mounting iso image: message "block device is write protected, mounting read-only"!

text: I want to delete a few files from my iso image on hard disk. So, I did:               ravbholua@ravbholua-Aspire-5315:/media/ravbholua/f34890dd-20d2-4d78-92c9-1de7c0957f00$ sudo mount -o loop check_bholua99.iso /media/iso2     mount: block device /media/ravbholua/f34890dd-20d2-4d78-92c9-1de7c0957f00/check_bholua99.iso is write-protected, mounting read-only          ravbholua@ravbholua-Aspire-5315:/media/ravbholua/f34890dd-20d2-4d78-92c9-1de7c0957f00$ cd /media/iso2     ravbholua@ravbholua-Aspire-5315:/media/iso2$ ls | tail     DSC00966.JPG     DSC00969.JPG     DSC00970.JPG     DSC00972.JPG     DSC00973.JPG     DSC00974.JPG     DSC00975.JPG     DSC00977.JPG     DSC00980.JPG     DSC00982.JPG     ravbholua@ravbholua-Aspire-5315:/media/iso2$ sudo rm DSC00982.JPG     rm: cannot remove ‘DSC00982.JPG’: Read-only file system      As it failed to delete for the said reason, I tried to remount with the option of `rw`               ravbholua@ravbholua-Aspire-5315:/media/ravbholua/f34890dd-20d2-4d78-92c9-1de7c0957f00$ sudo umount /media/iso2     ravbholua@ravbholua-Aspire-5315:/media/ravbholua/f34890dd-20d2-4d78-92c9-1de7c0957f00$ sudo mount -o loop,rw check_bholua99.iso /media/iso2     mount: block device /media/ravbholua/f34890dd-20d2-4d78-92c9-1de7c0957f00/check_bholua99.iso is write-protected, mounting read-only      Why it messages that the block device is write-protected? Please suggest how to mount it `rw` so that I can edit it. ( I know one way is to copy the files of the iso onto a diff. directory and edit/delete it; then make a new iso image. But this is not what I prefer. )


title: Why does Stackoverflow in Iceweasel cause high CPU usage for Xorg?

text: If I go to the front page of this site, and hit page down/page up repeatedly, it's pretty quick, and firefox-bin (iceweasel) uses maybe 50% CPU, Xorg uses maybe 40%. If I go to Stackoverflow's main page instead, though, each page down/up takes ~1.1s, and Xorg pegs an entire core (almost 100%), but Iceweasel uses almost no CPU. This only happens in Iceweasel (8.0-3). I have tested with a new profile (no difference). Chromium is fine. Konqueror (despite doing smooth scrolling!) is fine. Conkeror (which is based on XULRunner) also has the problem, but Iceape 2.0.14 (aka Mozilla Seamonkey) does not. I've never noticed this on other machines, even when they're fairly similar software-wise (also nVidia, also Debian testing/unstable). Though the other one is much more powerful, so maybe I just don't notice it. (Edit: Checked closer, it pegs Xorg, just not for as long.) I've put xtrace output of a page down on pastebin (at over 1300 lines, too long to inline here). I'm just watching these `top` in an xterm. CPU is an Athlon 4400+ (dual core); 4G of RAM; machine is not thrashing, and there is no disk activity during test (confirmed by `iostat -kx 10`). Video card is a GeForce 7600 GT using the nVidia drivers (290.10-1). OS is Debian testing/unstable; xorg 1:7.6+9. Window manager is Enlightenment DR16. Compositing is not in use. TwinView is in use, with two 1600x1200 LCDs (both DVI). `xorg.conf` doesn't really have anything interesting—most everything is autoprobed. How can I resolve this?


title: How can I "cat" a file and remove commented lines?

text: I'd like to know if there is a way that I could `cat` file like `php.ini` and remove all lines starting with `;` For example, if the file contained this:               ;   - Show all errors, except for notices     ;     ;error_reporting = E_ALL & ~E_NOTICE     ;     ;   - Show only errors     ;     ;error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR     ;     ;   - Show all errors except for notices     ;     error_reporting  =  E_ALL & ~E_NOTICE      and I ran the correct command `cat | {remove comments command}`, then I would end up with:               error_reporting  =  E_ALL & ~E_NOTICE      **Note** - I assumed that `cat` would be the best way to do this but I'm actually fine with the answer using another utility like `awk`, `sed`, `egrep`, etc.


title: How to have tail -f show colored output

text: I'd like to be able to tail the output of a server log file that has messages like:               INFO     SEVERE      etc, and if it's `SEVERE`, show the line in red; if it's `INFO`, in green. What kind of alias can I setup for a `tail` command that would help me do this?


title: FLAC correctness using MD5 placed in STREAMINFO

text: I know from [Sources], that FLAC computes CRC and MD5. What I am afraid that `flac --test` only does CRC test - as stated in `man flac` : `same as -d except no decoded file is written` . How to check flac file correctness, using MD5 of raw PCM placed in STREAMINFO in given .flac file ? If `flac --test` makes job, are there any reliable (like in flac documentation) references that shows it? Sources: http://en.wikipedia.org/wiki/Free_Lossless_Audio_Codec we can find: > FLAC uses CRC checksums for identifying corrupted frames when used in a > streaming protocol, and also has a complete MD5 hash of the raw PCM audio > stored in its STREAMINFO metadata header. http://flac.sourceforge.net/comparison.html > By default when processing files, flac computes the MD5 sum while encoding > and decoding. To see md5sums in STEAMINFO we can use:               $ metaflac --show-md5sum *.flac


title: How to correct a weird bash prompt on a Debian (Squeeze) server?

text: I have never had to deal much with BASH setup under Debian Linux, but this time, somebody has given me a server that acts weird. When I log on as root, everything works as I am used to: I see a normal prompt telling me who/where I am, pressing the UP key displays previously typed commands, etc. But when I log on as a created user, the prompt is "$", the UP key displays the characters ^[[A and when I try to change the prompt by typing PS1="\u@\h:\w\$ " the prompt literally becomes \u@\h:\w\$ - i.e. \u is not replaced by user name, etc. Looking at the etc/profile and the etc/bash.bashrc files does not give me any clues. And I have I tried Google'ing to no avail. Can anybody point me in the right direction? A step-by-step guide to which files to look at and what they should could be helpful. Another approach could be to reset a user's bash settings (without having to delete and restore the user).