title: How to add color themes to Gnome-Terminal's GUI preferences?

text: I use Gnome-Terminal for a lot of my work, and like separating my windows by color based on the task that I'm doing, so I've set up several profiles using the Preferences GUI. I found some color themes online that I like and would like to use as a base for some of my profiles, including any that I create in the future. However, the Preferences GUI only has a few color theme options, and I would need to change all of the colors manually any time I want to use one of these custom themes. Is there a way I can add custom themes to my Preferences GUI? If that's not possible, is there another way I can easily set a custom color theme for a profile? I know I can manually change the colors in other places, like gconf- editor, but I'd prefer an easy way to just tell it the color theme by name and have it handle the rest (like what you can do with the GUI).


title: How to convert TXT to PDF?

text: I want to convert `.txt` files to `.pdf`. I'm using this:               ls | while read ONELINE; do convert -density 400 "$ONELINE" "$(echo "$ONELINE" | sed 's/.txt/.pdf/g')"; done      But this produces one "error" -- if there's a very long line in the text file, it doesn't get wrapped. ### Input text ![Screenshot of the input file](http://i.stack.imgur.com/J03Hd.png) ### Output PDF ![Screenshot of the output PDF](http://i.stack.imgur.com/CUbzw.png) -- Also, it would also be great if the output PDF could contain text, instead of images of text. UPDATE: I have many-many-many TXT files. So don't want to do it by hand. I need an automatic solution, like the one i mentioned above.


title: Why does root get Permission denied when accessing FUSE directory?

text: I use a FUSE filesystem with no problems as my own user, but root can't access my FUSE mounts. Instead, any command gives `Permission denied`. How can I give root the permission to read these mounts?               ~/top$ sudo ls -l     total 12     drwxr-xr-x 2 yonran yonran 4096 2011-07-25 18:50 bar     drwxr-xr-x 2 yonran yonran 4096 2011-07-25 18:50 foo     drwxr-xr-x 2 yonran yonran 4096 2011-07-25 18:50 normal-directory     ~/top$ fuse-zip foo.zip foo     ~/top$ unionfs-fuse ~/Pictures bar      My user, **yonran** , can read it fine:               ~/top$ ls -l     total 8     drwxr-xr-x 1 yonran yonran 4096 2011-07-25 18:12 bar     drwxr-xr-x 2 yonran yonran    0 2011-07-25 18:51 foo     drwxr-xr-x 2 yonran yonran 4096 2011-07-25 18:50 normal-directory     ~/top$ ls bar/     Photos      But **root** can't read either FUSE directory:               ~/top$ sudo ls -l     ls: cannot access foo: Permission denied     ls: cannot access bar: Permission denied     total 4     d????????? ? ?      ?         ?                ? bar     d????????? ? ?      ?         ?                ? foo     drwxr-xr-x 2 yonran yonran 4096 2011-07-25 18:50 normal-directory     ~/top$ sudo ls bar/     ls: cannot access bar/: Permission denied      I'm running Ubuntu 10.04: I always install any update from Canonical.               $ uname -a     Linux mochi 2.6.32-33-generic #70-Ubuntu SMP Thu Jul 7 21:13:52 UTC 2011 x86_64 GNU/Linux     $ lsb_release -a     No LSB modules are available.     Distributor ID: Ubuntu     Description:    Ubuntu 10.04.3 LTS     Release:    10.04     Codename:   lucid      **Edit** : removed the implication that root used to be able to access the mounts. Come to think of it, maybe my scripts never tried to access the directory as root.


title: What filesystem should I choose for an SSD?

text: I am going to set up a new Linux system on an SSD drive. Does the filesystem choice make a difference for them? Should I go with the default _ext4_ , maybe try _XFS_ , or does it just not matter?


title: Send SIGINT to child process of shell, simulating CTRL+C (Linux)

text: Given a shell process (e.g. `sh`) and it's child process (e.g. `cat`), how to simulate the behavior of CTRL+C using the shell's process ID? * * * **This is what I've tried:** Running `sh` and then `cat`:               [user@host ~]$ sh     sh-4.3$ cat     test     test      Sending `SIGINT` to `cat` from another terminal:               [user@host ~]$ kill -SIGINT $PID_OF_CAT      `cat` received the signal and terminated (as expected). Sending the signal to the parent process does not seem to work. **Why is the signal not propagated to`cat` when sent to it's parent process `sh`?** This does not work:               [user@host ~]$ kill -SIGINT $PID_OF_SH


title: Open Source router firmware options?

text: What distro's exist that are designed for routers? Please include the following   * link to the project page   * link to supported hardware list   * what distinguishes them, why pick this option   * friendly web interface?   * above friendly interface easily disabled?   * package management for software not initially installed? (e.g. ipkg/opkg)   * good documentation?


title: Does PGPDesktop supports OpenBSD or e.g. Fedora?

text: Does PGPDesktop support OpenBSD or e.g. Fedora, or can I only encrypt my whole hard drive when I use Windows?


title: How to add packages onto a Fedora live USB

text: I want to create Fedora 14 live CD with additional packages. How to do it?


title: imaging/cloning with DHCP network rebuilding/recovery of solaris 9 and 10 sparc servers

text: I have a number of Solaris 9 and 10 sparc servers (no RAID) that are custom DVD jumpstarts provided by SONUS Networks for their softswitch VOIP products. The normal install process would be to use the DVD supplied by SONUS to do a reinstall from scratch in the event of failure. Since we deploy our softswitches to unmanned locations, having someone manually do a rebuild and reconfiguration of the servers is not the best. We have out-of-bound access to the machines' ALOMS, so running commands from OpenBoot is not a problem. I have looked at using puppet in combination with theforeman to provide network jumpstart installs and software configuration, but due to the way the custom SONUS DVDs were created a network jumpstart has been problematic and would require us to recreate the entire install process which would involve modifying the SONUS custom scripts which we don't feel comfortable doing. The best solution to us would to image/clone a server and then in the event of a failure have the option to do a install of that image/clone from a local linux server. Hopefully being able to leverge DHCP and NFS. Is this possible? Should we do it a different way?


title: Command(s) to install tempfile on CentOS 6.4

text: I'm looking to install the package for `tempfile` but am not finding it? possibly use `mktemp` but I'm not sure if there is a difference in behaviour besides a dot notation in the temp name?               $ tempfile # /tmp/file1wJzkz     $ mktemp   # /tmp/tmp.IY8k24NayM


What are the dangers of creating a normal user with UID < 500? Assuming the UID's are not duplicates of existing UID's, what could go wrong? This is not something that I want to do, but something that I have seen and want to know why it shouldn't be done. In this example, it's on RHEL5.


title: Can't install any packages

text: Can't install any packages on Debian 7.2 through the `apt-get`               root@sandbox:~# apt-get install curl     Reading package lists... Done     Building dependency tree     Reading state information... Done     Some packages could not be installed. This may mean that you have     requested an impossible situation or if you are using the unstable     distribution that some required packages have not yet been created     or been moved out of Incoming.     The following information may help to resolve the situation:          The following packages have unmet dependencies:      curl : Depends: libcurl3 (= 7.26.0-1+wheezy3) but it is not going to be installed     E: Unable to correct problems, you have held broken packages.               root@sandbox:~# apt-cache policy curl     curl:       Installed: (none)       Candidate: 7.26.0-1+wheezy3       Version table:          7.26.0-1+wheezy3 0             500 http://security.debian.org/ wheezy/updates/main amd64 Packages             500 http://mirror.yandex.ru/debian-security/ wheezy/updates/main amd64 Packages             500 http://mirror.mephi.ru/debian-security/ wheezy/updates/main amd64 Packages               root@sandbox:~# cat /etc/apt/sources.list     deb http://security.debian.org/ wheezy/updates main contrib     deb-src http://security.debian.org/ wheezy/updates main contrib          #deb http://mirror.yandex.ru/debian-security/ wheezy/updates main contrib non-free     #deb-src http://mirror.yandex.ru/debian-security/ wheezy/updates main contrib non-free     #deb http://mirror.mephi.ru/debian-security/ wheezy/updates main contrib non-free     #deb-src http://mirror.mephi.ru/debian-security/ wheezy/updates main contrib non-free      `apt-get -f install` also does not work


title: Why is Debian's root shell colorless?

text: Are there any security concerns? What is the best way to enable it?


title: Is there a "Open terminal here" from File Browser?

text: Something equivalent to Windows' "cmd prompt here", that will open a gnome- terminal on a specific folder?


title: How to determine if disk is compact flash or standard hard drive

text: I need to determine in a shell script if a given block device (e.g. `/dev/sda`) is a compact flash disk or a regular hard drive. Google did not help me out for once, and while `udevadm info --query=all --name=sda` gives me lots of information, theres nothing I recognize to mean "I'm definately (not) a flash drive" or "I'm definately (not) a hard drive". Is it possible to distinguish these two types of storage devices? I use Ubuntu 10.10.


title: Why mkfifo behaves like a LIFO?

text: If i do.               mkfifo /tmp/a     echo 'one'>/tmp/a      in the while from another terminal               echo 'two'>/tmp/a      and from a third terminal               more /tmp/a      Why i obtain as output of the last command this?               two     one


title: Tune write disk cache flushing algorithm

text: I would like to use the free memory for write cache. Linux does that automatically, but it has some weird flushing algorithm that I would like tuned for my use. I have recently used `ddrescue` to copy a disk. It reads a block and writes the block to disk. What I would like is to have the reading read as much as possible until there is no more free then block until some space is freed, while at the same time the writing writes as fast as possible freeing up memory. So if the writing disk is faster than the reading disk no memory will be used, and if the writing disk is slower than the reading disk then all the memory will stay used until the copying is complete. In both scenarios the memory usage remains constant (unless other programs take some of the free memory). But what I see is this: ![Write cache](http://i.stack.imgur.com/H2J8C.png) The reading fills up the cache (while little to no writing is done) and when the cache hits a limit (or after er period of time) then the reading is blocked while _all_ the cache is written to disk. It is almost as if a troll is running 'sync' every now and then. I have tried changing the /proc/sys/vm/dirty_* to no avail: The only change I have been able to provoke is how tall the tops are. So an answer that mentions /proc/sys/vm/dirty_* will have to provide tested values that measurably flattens out the saw tooth graph. A tuning that will tell Linux to start writing ASAP but never block reading or writing if there is free space, will most likely suit my purpose. I am aware of tools like `mbuffer`. They will flatten out the graph, but they are not dynamic (i.e. releasing memory when the free mem is low) and they do not allow for seeks, so they will not work with programs like `ddrescue` (which has to seek back and forth).


title: sed one-liner to delete everything between a pair of brackets?

text: I am working with some text that is full of stuff between brackets [] that I don't want. Since I can delete the brackets myself, I don't need the one-liner to do that for me, but I do need a one-liner that will remove everything between them. What about parentheses () instead of brackets?


title: Debian pinning - Use stable but install from testing/unstable when necessary | Also install deps from stable, backports when available

text: I am configuring a Debian 6 (Squeeze) x86 server, and want to install some packages from testing or unstable when needed, so I'm using pinning. I have configured my /etc/apt/sources.list as follow:               deb http://ftp.br.debian.org/debian stable main     deb http://ftp.br.debian.org/debian stable-updates main     deb http://security.debian.org/ stable/updates main          deb http://backports.debian.org/debian-backports squeeze-backports main          deb http://ftp.br.debian.org/debian testing main     deb http://ftp.br.debian.org/debian testing-updates main     deb http://security.debian.org/ testing/updates main          deb http://ftp.br.debian.org/debian unstable main      And my /etc/apt/preferences as follow:               Package: *     Pin: release a=stable     Pin-Priority: 700          Package: *     Pin: release a=stable-updates     Pin-Priority: 700               Package: *     Pin: release a=squeeze-backports     Pin-Priority: 675               Package: *     Pin: release a=testing     Pin-Priority: 650          Package: *     Pin: release a=testing-updates     Pin-Priority: 650               Package: *     Pin: release a=unstable     Pin-Priority: 600      Executing apt-cache policy, I get:               100 /var/lib/dpkg/status        release a=now     600 http://ftp.br.debian.org/debian/ unstable/main i386 Packages        release o=Debian,a=unstable,n=sid,l=Debian,c=main        origin ftp.br.debian.org     650 http://security.debian.org/ testing/updates/main i386 Packages        release o=Debian,a=testing,n=wheezy,l=Debian-Security,c=main        origin security.debian.org     650 http://ftp.br.debian.org/debian/ testing-updates/main i386 Packages        release o=Debian,a=testing-updates,n=wheezy-updates,l=Debian,c=main        origin ftp.br.debian.org     650 http://ftp.br.debian.org/debian/ testing/main i386 Packages        release o=Debian,a=testing,n=wheezy,l=Debian,c=main        origin ftp.br.debian.org     675 http://backports.debian.org/debian-backports/ squeeze-backports/main i386 Packages        release o=Debian Backports,a=squeeze-backports,n=squeeze-backports,l=Debian Backports,c=main        origin backports.debian.org     700 http://security.debian.org/ stable/updates/main i386 Packages        release v=6.0,o=Debian,a=stable,n=squeeze,l=Debian-Security,c=main        origin security.debian.org     700 http://ftp.br.debian.org/debian/ stable-updates/main i386 Packages        release o=Debian,a=stable-updates,n=squeeze-updates,l=Debian,c=main        origin ftp.br.debian.org     700 http://ftp.br.debian.org/debian/ stable/main i386 Packages        release v=6.0.6,o=Debian,a=stable,n=squeeze,l=Debian,c=main        origin ftp.br.debian.org      * * * The problem I'm facing is that when I try to install some packages from testing. Ex:               apt-get install ruby1.9.1-dev/testing      I get a broken package message:               The following packages have broken dependencies:      ruby1.9.1-dev : Depends: libruby1.9.1 (= 1.9.3.194-5) but 1.9.2.0-2 is set to be installed     E: Broken Packages      This means I want to install from testing but Debian tries to install dependencies from stable. I know I can do:               apt-get install -t testing ruby1.9.1-dev      It works by installing all dependencies from testing, but I want to use the maximum possible the stable packages (install deps from stable if available). * * * Another problem I'm having is, if I install a package like this:               apt-get install -t testing ruby1.9.1-dev      And then try to install another package that depends on a library that was installed as a dependency of ruby1.9.1-dev from testing:               apt-get install gcc      I also get the Broken Packages error. * * * So the questions are: **How can I install a package from testing, but also install the maximum of dependencies possible from stable?** **Is it possible to automatically install a package from testing when it is not available in stable by just running**               apt-get install package_name      **?**


title: How do I remove a file with no permissions?

text: A hacker has dropped a file in my tmp dir that is causing issues. Nothing malicious except creating GB's of error_log entries because their script is failing. However, the file they are using to execute has no permissions and even as ROOT I can't delete or rename this file.               ----------  1 wwwusr wwwusr 1561 Jan 19 02:31 zzzzx.php          root@servername [/home/wwwusr/public_html/tmp]# rm zzzzx.php     rm: remove write-protected regular file './zzzzx.php'? y     rm: cannot remove './zzzzx.php': Operation not permitted      I have also tried removing by inode               root@servername [/home/wwwusr/public_html/tmp]# ls -il          ...     1969900 ----------  1 wwwusr wwwusr 1561 Jan 19 02:31 zzzzx.php          root@servername [/home/wwwusr/public_html/tmp]# find . -inum 1969900 -exec rm -i {} \;          rm: remove write-protected regular file './zzzzx.php'? y     rm: cannot remove './zzzzx.php': Operation not permitted      How do I delete this file?


title: Replace all white spaces with commas in a text file

text: I need to replace all white spaces inside my text with commas. I'm currently using this line but it doesn't work: I get as output a text file which is exactly the same of the original one:               sed 's/[:blank:]+/,/g' orig.txt > modified.txt      thanks


title: How is a Linux kernel capable of accessing its assigned initramfs/initrd?

text: I'm trying to understand the boot process of a machine as a whole from the time you hit the power button. There's this one piece from bootloader to initramfs stage I don't quite understand among some other smaller bits. Given this Grub configuration for an entry, taken from a recent Ubuntu default installation:               insmod gzio     insmod part_msdos     insmod ext2     set root='(hd0,msdos1)'     search --no-floppy --fs-uuid --set=root 96fb7310-5adb-4f66-bf59-04acd08d76a3     echo    'Loading Linux x.y.z ...'     linux   /vmlinuz-x.y.z root=/dev/mapper/some-device-name ro nomodeset      echo    'Loading initial ramdisk ...'     initrd  /initrd.img-x.y.z      What does this actually do in terms of the system state and memory? I understand that Grub's task is to "load and run the kernel" and it has its own set of modules to access files on devices (or network) to get to them. In the example here `insmod`s, `set root` and `search` - but this is just from the perspective of Grub, and not shared with the kernel, right? I'm also guessing that Grub is loading (a copy?) of the kernel into memory (`linux` command) and kicking it to start execution. (two different steps apparently - so, how?) The parameters given can be read in the kernel and interpreted (is this a big string mapped into memory somewhere?) and provide the options to arrange things requested. I also see this `initrd` option. This points to my gzip-compressed initramfs, needed to boot the actual root device specified by `root=`. But how is this initramfs provided to the kernel? It is not passed any memory addresses to where it can load it, nor is it able to access it itself, as it is loaded already before the kernel is started. Some kernel documentation says this initramfs file system 'device' is accessible through `/dev/ram0`, but I don't see how it becomes an accessible device file to start with. There's something happening under water I don't see, I guess. I also don't see how this relates to other boot loaders, including embedded platforms, for example using U-boot/Coreboot. Is this doing the same thing as Grub (same standard memory addresses?) and to what extent does these compare to Grub regarding loading kernel/initrd? Just to be clear on my questions, I think I do understand why the different boot stages exist and _what_ transitions take place, yet I don't see _how_ they take place and what the exact responsibilities are to each of the stages. I have the feeling I'm missing out on some "standard" to which this all comes down to. I would appreciate some explanation on this.


title: Automatizing the sequence of mounting commands

text: When I connect a device (tablet, camera, flash drive, external harddrive) to my laptop with Linux I often type the following sequence of commands.      `$ ls /dev/sd*`   Let's say that my device is /dev/sdc   optional `$ sudo mkdir /media/my_flash`   optional `$ sudo chmod 777 /media/my_flash`   `$ sudo mount /dev/sdc /media/my_flash` Then I will copy some files and   $ `sudo umount /dev/sdc` This sequence guarantees me that the files are copied and nothing bad will happen. Could you tell me how to automatize this sequence of commands? So I will only plug the device, it will recognize to which directory it should be mounted, then I will make some file transfer and then it will signal me (in some way) I can unplug the device? Is there some settings in Linux OS for this? thank you


title: How to switch between workspaces in ubuntu

text: I sent a window to another workspace in Ubuntu 10.04 but I am not able to go to that workspace. How do I do that ? Please let me know.


title: How can I fix linux disk without unmount it?

text: I had large file 200GB in my ext2 disk, then I deleted it(three are no files in Trash). And I haven't gained any free space. I don't want to use fsck as it requres me to unmount disk. I were windows user for a long time, there I could scan disk without unmounting it, is there are similar posibility in Ubuntu 10?


title: Defining key sequences in Evil-mode Emacs

text: I couldn't find any instructions on defining key sequences in the Evil doc. The example given by the developers only covers a single key.               (define-key evil-normal-state "w" 'foo)      What do I need to do, if I want to define "gv" in the normal mode or ";RET" in the insert mode? In Vim, for example, I just do:               imap ;<cr> <end>;<cr>     map gv :tabprev<cr>


title: Login command fails and closes connection

text: I’m trying to execute the `login` command but it fails. As root (via SSH) I get:               root@server:~# login     Connection to 192.168.0.50 closed.      The SSH connection is closed. In a “physical” TTY the session is closed and I go back to the login screen. As a regular user using sudo:               bilbax@server:~$ sudo login     Password:           [1]+  Stopped                 sudo login      Just before this bug appeared, I tried to use the `login` command as usual, it worked, it asked for the password. I typed it wrong, I retried, but the command froze. I tried ^C, without success. So, as root, I executed `killall login`; didn't worked too. I rebooted the system and now I have to bug described above. Did I do something wrong by killing the command? I’m on Arch Linux x86_64 (kernel 3.4.7-1-ARCH).


title: How can I "stack" shell aliases?

text: In my `.profile` (sourced in `sh` emulation mode from my `.zshrc`) I have the following snippet:               if [ -f /usr/bin/pacmatic ]; then         alias pacman=pacmatic     fi          # Colorized Pacman output     alias pacman="pacman --color auto"      However, the second alias always overrides the first:               % type pacman     pacman is an alias for pacman --color auto      How can I make it so that the second alias assignment "inherits" the first assignment, so that if `/usr/bin/pacmatic` exists, the alias becomes `pacmatic --color auto`? I'm not averse to using functions instead of aliases, but I'd prefer it if the logic wasn't performed every time `pacman` is invoked (I want `pacmatic` checked for once, at shell startup, not every time `pacman` is run). I'd also prefer an `sh`-portable script, but if this isn't possible, you can use full `zsh` syntax. (Yes, I'm aware that this could easily be solved by appending `\--color auto` to the `pacmatic` alias. But I want to do it the Right Way™.) I've tried Googling and looking through the manpages, but to no avail.


title: Replace symbolic link which linked to directory target

text: I want to upgrade tomcat server from 7.0.19 to 7.0.20. I've already `ln -s apache-tomcat-7.0.19 tomcat7` before, so now I need to _link_ `tomcat7` to new target using the following command `ln -s --force apache-tomcat-7.0.21 tomcat7`, but it does not worked as what I expected: it created a symbolic link `tomcat7/apache-tomcat-7.0.21` instead of replace existing `tomcat7` symbolic link with new target. **Example**               # mkdir v1 v2     # ln -s v1 v     # ln -s v2 v     # ll v*     lrwxrwxrwx. 1 root root    2 Sep  5 16:02 v -> v1          v1:     total 0     lrwxrwxrwx. 1 root root 2 Sep  5 16:02 v2 -> v2          v2:     total 0      I checked the manual of `ln`, I think `ln -s --force apache-tomcat-7.0.21 tomcat7` use the 3rd form instead of 1st form to explain the parameters. That's so ambiguous between the 1st and 3rd form. So how to replace symbolic link in this case?


title: how to increase memory usage manually?

text: There is Solaris 10 OS on our server, and I would like to make test on this server. For this test memory usage should be high. So I wonder if there is an easy way to increase memory usage manually ?


title: Determining Dependencies and Installing from Directory

text: I have a directory with all Dependencies in .deb format. But there are lots of them. I need only those that i need for gimp.               biggenius@hacbook:~/Desktop/rocks/packages$ dpkg-deb -I gimp_2.6.12-1ubuntu1_i386.deb       new debian package, version 2.0.      size 4722192 bytes: control archive= 7927 bytes.         1894 bytes,    27 lines      control                      15660 bytes,   219 lines      md5sums                        353 bytes,    14 lines   *  postinst             #!/bin/sh          160 bytes,     5 lines   *  postrm               #!/bin/sh          331 bytes,    11 lines   *  preinst              #!/bin/sh          245 bytes,    14 lines   *  prerm                #!/bin/sh      Package: gimp      Version: 2.6.12-1ubuntu1      Architecture: i386      Maintainer: Ubuntu Desktop Team <ubuntu-desktop@lists.ubuntu.com>      Installed-Size: 12814      Depends: libgimp2.0 (>= 2.6.12), libgimp2.0 (<= 2.6.12-z), gimp-data (>= 2.6.12), gimp-data (<= 2.6.12-z), python-gtk2 (>= 2.8.0), libaa1 (>= 1.4p5), libbabl-0.0-0, libc6 (>= 2.15), libcairo2 (>= 1.2.4), libdbus-1-3 (>= 1.0.2), libdbus-glib-1-2 (>= 0.88), libexif12, libfontconfig1 (>= 2.8.0), libfreetype6 (>= 2.2.1), libgdk-pixbuf2.0-0 (>= 2.22.0), libgegl-0.0-0 (>= 0.0.22), libglib2.0-0 (>= 2.31.2), libgtk2.0-0 (>= 2.24.0), libjpeg8 (>= 8c), liblcms1 (>= 1.15-1), libmng1 (>= 1.0.10), libpango1.0-0 (>= 1.18.0), libpng12-0 (>= 1.2.13-4), libpoppler-glib8 (>= 0.18), librsvg2-2 (>= 2.14.4), libtiff4, libwebkitgtk-1.0-0 (>= 1.3.10), libwmf0.2-7 (>= 0.2.8.4), libx11-6, libxext6, libxfixes3, libxmu6, libxpm4, zlib1g (>= 1:1.1.4), python (>= 2.7.1-0ubuntu2), python2.7      Recommends: ghostscript      Suggests: gimp-help-en | gimp-help, gimp-data-extras, gvfs-backends, libasound2      Provides: gimp-helpbrowser, gimp-python      Section: graphics      Priority: optional      Homepage: http://www.gimp.org      Description: The GNU Image Manipulation Program       GIMP is an advanced picture editor. You can use it to edit, enhance,       and retouch photos and scans, create drawings, and make your own       images. Lots of tools are available; you can sharpen and resize photos,       and remove dust and red-eyes, for example.       .       It has a large collection of professional-level editing tools and       filters, similar to the ones you might find in PhotoShop. Numerous       fine-control settings and features like layers, paths, masks, and       scripting give you total control over your images.       .       Many image file formats are supported, including JPEG, PhotoShop       (.psd), and Paint Shop Pro (.psp) files. It can also be used to scan       and print photos.      Original-Maintainer: Ari Pollak <ari@debian.org>      How can i install only these decencies from Directory. http://i.stack.imgur.com/8duJE.png


title: Bash script doesn't read input

text: I have a script that is suppose to run a command in the background, and it does that. The problem is that when the script comes upon a read command, it doesn't pause and accept input. Here it is:               printf "Where is yo music?: "     read musicPath          cd $musicPath     ls | while read currentSong;do       seconds=`mdls "$currentSong"|sed -n '20p'|awk '{print $3}'|cut -d. -f1`       hours=$((seconds / 3600))       seconds=$((seconds % 3600))       minutes=$((seconds / 60))       seconds=$((seconds % 60))       echo "Song: $currentSong"       echo "Length: $hours:$minutes:$seconds"       afplay "$currentSong"&       printf "yes (y), no (n), or maybe (m): "       read choice       case $choice in         y)           mkdir ../Yes           mv "$currentSong" ../Yes         ;;         n)           mkdir ../No           mv "$currentSong" ../No         ;;         m)           mkdir ../Maybe           mv "$currentSong" ../         ;;         *)           echo "Invalid option! Continuing..."         ;;       esac       kill $!     done


title: How to configure character encoding in OpenFT?

text: When transferring files over: http://ts.fujitsu.com/products/software/openseas/openft.html then the charset of files get's scrumbled...I can't seem to find any character encoding settings, how to set it to use ONLY UTF-8?


title: I/O error but no bad block is reported in syslog

text: I got errors like this in my syslog, but there's no bad block or sector defined in kernel report, I can't just replace the HDD right now and I prefer to reallocate the bad blocks for now, so I need the number of bad sectors. Any suggestion on how to find the number of sectors as fast as possible? In other server that I have, kernel always reports sector number but on this server no sector reported.               res 41/40:08:a0:11:76/00:00:53:00:00/00 Emask 0x409 (media error) <F> ata1.00: error: { UNC }     sd 0:0:0:0: [sda] Add. Sense: Unrecovered read error - auto reallocate failed     res 41/40:08:a0:11:76/00:00:53:00:00/00 Emask 0x409 (media error) <F> ata1.00: error: { UNC }     res 41/40:08:a0:11:76/00:00:53:00:00/00 Emask 0x409 (media error) <F> ata1.00: error: { UNC }     res 41/40:08:a0:11:76/00:00:53:00:00/00 Emask 0x409 (media error) <F> ata1.00: error: { UNC }     res 41/40:08:a0:11:76/00:00:53:00:00/00 Emask 0x409 (media error) <F> ata1.00: error: { UNC }     res 41/40:08:a0:11:76/00:00:53:00:00/00 Emask 0x409 (media error) <F> ata1.00: error: { UNC }     res 41/40:08:a0:11:76/00:00:53:00:00/00 Emask 0x409 (media error) <F> ata1.00: error: { UNC }     sd 0:0:0:0: [sda] Add. Sense: Unrecovered read error - auto reallocate failed     res 41/40:08:a0:11:76/00:00:53:00:00/00 Emask 0x409 (media error) <F> ata1.00: error: { UNC }     res 41/40:08:a0:11:76/00:00:53:00:00/00 Emask 0x409 (media error) <F> ata1.00: error: { UNC }     res 41/40:08:a0:11:76/00:00:53:00:00/00 Emask 0x409 (media error) <F> ata1.00: error: { UNC }     res 41/40:08:a0:11:76/00:00:53:00:00/00 Emask 0x409 (media error) <F> ata1.00: error: { UNC }     res 41/40:08:a0:11:76/00:00:53:00:00/00 Emask 0x409 (media error) <F> ata1.00: error: { UNC }     res 41/40:08:a0:11:76/00:00:53:00:00/00 Emask 0x409 (media error) <F> ata1.00: error: { UNC }     sd 0:0:0:0: [sda] Add. Sense: Unrecovered read error - auto reallocate failed      My question is just why this server's kernel is not reporting the number of bad sector? like the other one does?


title: ask about diskpart in windows 7 to access file in ubuntu 12.04

text: I am using Ubuntu 12.04 in VMware 7 as ISO file through Windows 7. I am having `diskpart` in Windows 7 with a partition of 21GB of IDE disk. Whatever, I want to ask about disk partition code to access file of Windows 7 from Ubuntu. So which code can be supposed to be used to access files of Windows 7 of 21GB partition from Ubuntu ?


title: What specific vulnerabilities am I creating by disabling the sudo password?

text: Here are some instructions on how to disable your `sudo` password. These carry the following warning > If you disable the `sudo` password for your account, you will seriously > compromise the security of your computer. Anyone sitting at your unattended, > logged in account will have complete `root` access, and remote exploits > become much easier for malicious crackers. I'm not worried about people gaining physical access to my machine. What remote exploits are made possible or easier if I were to ignore this warning and disable the password?


title: Creating UFW rule to allow application to use dynamic ports

text: I am currently trying to get a Google Chromecast device to work through my Ubuntu 13.04 based computer. Currently, the Google Chrome extension shows "no devices found" as long as my UFW firewall is enabled. If I disable the firewall I am able to see my Chromecast device without any issues. I notice that everytime I click on the Chromecast browser extension a new port is opened up by the Chrome application. It is a different port every time. Is there a way to set a rule in UFW that would always allow the chrome application to access any port it wants? Is there a name for this type of behavior? The port that chrome is using changes everytime I try to find the Chromecast device. I imagine I won't be the only person having this issue. ![Screenshot of Chrome trying to find Chromecast devices](http://i.stack.imgur.com/jC8aX.png)


I'm looking to disable the touchpad in Crunchbang 11 (Waldorf) while I am typing. The processes I've found online do not work for me. All guides I have found (this thread, for instance) indicate to toggle a flag in `/etc/hal/fdi/policy/`, but the entire `/etc/hal` folder does not exist on my computer. Since Crunchbang uses Openbox, I found this guide; however, this option does not exist within my version of Openbox. `find | grep shmconfig.fdi` (the file typically modified in these guides) returns no lines; that file does not exist on my computer. That is to be expected, though; the guides state that the file may not exist. How do I disable the touchpad while I'm typing?


title: binding ip address to hostname

text: I just registered a domain name and paid for hosting with CentOS and I found that I had to do the binding myself following the lengthy steps http://www.linux-sxs.org/internet_serving/bind9.html I was wondering, is there an easier way to do this binding? I thought by configuring the dns name in Apache should be enough, is that wrong? Any feedbacks appreciated.


title: How can I create a new user but with a home directory that already exists?

text: Let's say I have a user called **panos** and he has his home directory located at `/home/panos`. Then, I create a another user called **Tom** :               adduser Tom      It creates a user **Tom** who has home dir: `/home/Tom` The question is: what if I would like to create a new user and give him as home dir the home dir of another user. For example, let's create the user **Jerry** and pass him as his home dir the home dir of user **Panos** :               adduser -d /home/panos Jerry      but there's an error saying:               adduser: warning: the home directory already exists.     Not copying any file from skel directory into it.      However, if you take a look at the `/etc/passwd` file:               tail -n 3 /etc/passwd     anthony:x:501:501::/home/anthony:/bin/bash     panos:x:502:502::/home/panos:/bin/bash     Jerry:x:503:503::/home/panos:/bin/bash      it seems it worked. But when I tried to log in as Jerry:               [root@LinuxAcademy ~]# su Jerry     bash-4.1$ bash: /home/panos/.bashrc: Permission denied     bash-4.1$       it prevents me from loggin in as Jerry and it also changes my prompt (the _PS1_ ). So, how can I do this? Is it possible?


title: Printing decimal to ascii character, my command does not output as intended

text: I wanted to output a string of all the ascii characters with the following command               for i in `seq 32 127`; do printf "%c" $i; done      The output of the above command is: 33333334444444444555555555566666666667777777777.............. It's the first (from the left) digit of each number. Looking through this site I came across the answer to my problem How to print all printable ASCII chars in CLI?, however I still don't understand why my original snippet does not output the ascii characters as intended.


title: Mounting a Windows partition without giving execute permission

text: How can I mount a Windows partition so that the files within it don't have execution permission? I mount a Windows partition using:               sudo mount /dev/sda3 win      `win` is a folder in my home dir. This of course works. But files in the mounted partition are given execute permission, or to be specific, `777`. How to mount the partition so that files are given `666` or other permission?


title: FATAL : No Bootable medium found! System halted

text: I just got a .iso of the linux distro Backtrack 5 R2. I set it up, using virtual box, and set it up to run using the .iso, and hard drive as a .vdi. Here's the setup: **System:** Base Memory: 1500 MB Boot Order: CD/DVD-ROM, Hard Disk Acceleration: VT-x/AMD-V, Nested Paging **Storage:** IDE Controller IDE Primary Master (CD/DVD): BT5R2-KDE-64.iso (2.62 GB) SATA Controller SATA Port 0: Backtrack 5 R2.vdi (Normal, 8.00 GB) Why would I be getting this error? Everything looks fine to me. And also, I'm running virtual box in a Windows 7 64bit OS.


title: File command database and identifying text files

text: Please let me know if below two statements are correct or not: Folder `/usr/share/mime/magic` has a database/table that will give me what are the current possible file formats (outputs that I can get when I type the `file` command and follow it by a file name). Whenever the `file` command output contains the word "text" it refers to something that you can read with a text viewer, and anything without "text" is some kind of binary.


title: lpr with reverse video

text: When sending a text file to the printer from the command line (by, e.g., `lpr -P printer-name file.txt`), is it possible to specify that inverted colors be used by the printer (i.e., white text on black background)?


title: HDMI port not working after installing KDE Desktop Enviroment for Ubuntu

text: My laptop can't detect the HDMI port and my Samsung TV shows no signal. When I run `xrandr`, my HDMI port doesn't show in the output.               Screen 0: minimum 320 x 200, current 1366 x 768, maximum 8192 x 8192     LVDS1 connected 1366x768+0+0 (normal left inverted right x axis y axis) 344mm x 194mm        1366x768       59.6*+        1360x768       59.8     60.0          1024x768       60.0          800x600        60.3     56.2          640x480        59.9       VGA1 disconnected (normal left inverted right x axis y axis)     DP1 disconnected (normal left inverted right x axis y axis)     TV1 disconnected (normal left inverted right x axis y axis)


title: What changed in Linux kernel (2.6.22) that gives hdparm support for power-on in standby?

text: Hdparm man page lists for parameter `-s`: > Enable/disable the power-on in standby feature, if supported by the drive. > VERY DANGEROUS. Do not use unless you are abso- lutely certain that both the > system BIOS (or firmware) and the operating system kernel (Linux >= 2.6.22) > support probing for drives that use this feature. Could you point to a commit or lines in source code that gives the support for "power-on in standby". In other words what is the change in Linux kernel (2.6.22) that made PUIS/POIS possible?


title: Saving with CTRL-s in vim

text: I have added this line in .vimrc so that pressing control-s saves the current file               :nmap <C-s> :w!<cr>     :imap <C-s> <esc>:w!<cr>      But this is not working. Any suggestions about what I am doing wrong?


title: Why is mount.cifs not installed suid by default?

text: I am using Gentoo, and on my machine at least `mount.cifs` is not installed suid root by default. In particular, this means that I can't use the `user` mount option with CIFS shares. I noticed that `mount.nfs` has suid set. Is there some reason in particular that this is done for CIFS/samba, or is it just Gentoo being overly cautious? If it matters, I am using `net-fs/samba` and not `net-fs/mount-cifs`. **More Information:** It seems that historically it was very insecure, however as far back as 2010 the Samba team themselves were happy to reallow suid root access, so is this still an issue? I've tried adding suid to `mount.cifs`, and it works but I want to get some more information about this if someone is in the know.


title: Run if statement on remote machine

text: I'm trying to run a set of commands on a remote machine, that includes an if statement. I'm using this to shutdown a list of kvm instances. The first line should be fine, but could be prettier, rest needs some help.               ssh root@kvmsrv 'virsh shutdown $host 2> /dev/null; virsh destroy $host 2> /dev/null; sleep 2; virsh undefine $host 2> /dev/null'          # Also needs to be run on remote machine     # to disconnect iscsi     iscsiadm -m session | grep $host     if [ $? == 0 ]; then       iscsiadm -m node -T $stserver.$host -u     fi          # then on local machine     tid=`ssh root@storage1 'cat /proc/net/iet/volume' | grep $host | head -1 | awk '{print $1}' | awk -F: '{print $2}'`     if [ $tid ]; then       echo "Deleting tid:$tid from $stserver."       ssh root@$stserver "ietadm --op delete --tid=$tid"     fi      I guess I could do the same for the second portion, just separate it all with ; but if anyone goes to read my code later on they'd probably be scratching their heads... Is there a way to format all this so its readable and still makes sense and have all the remote commands execute properly?


title: Accessing file from the Windows host in a VirtualBox virtual machine

text: I am running Ubuntu 14.04 as the guest operating system in a VirtualBox virtual machine. The host runs Windows 8 (24GB). I want to access a folder of the host inside the guest. Since the source is huge, I am trying to use it directly from Windows and mount it on the guest system. I searched online, and installed `virtualboximage.iso` and shared my folder in windows 8 in the settings of VirtualBox (basic steps). I checked for my shared folder under `/mnt` folder but it is empty. How can I access the folder from Windows 8 to the guest system?


title: How to mount multiple iSCSI images too loop

text: I have to mount iscsi images to loop.   Yesterday someone with a similar problem asked that already. The difference is, my iscsi image is splitted into 5 parts.               ls -la     insgesamt 4718592004     -rw-rw-rw- 1 root root 1099511627776 Mai 10 10:20 iSCSI_1_LUN0_000     -rw-rw-rw- 1 root root 1099511627776 Mai 5 11:47 iSCSI_1_LUN0_001     -rw-rw-rw- 1 root root 1099511627776 Mai 5 11:47 iSCSI_1_LUN0_002     -rw-rw-rw- 1 root root 1099511627776 Mai 5 11:47 iSCSI_1_LUN0_003     -rw-rw-rw- 1 root root 433791696896 Mai 5 11:21 iSCSI_1_LUN0_004          size1=$(blockdev --getsz /dev/loop0)     size2=$(blockdev --getsz /dev/loop1)     size3=$(blockdev --getsz /dev/loop2)     size4=$(blockdev --getsz /dev/loop3)     size5=$(blockdev --getsz /dev/loop4)     dmsetup create my-backup << EOF     0 $size1 linear /dev/loop0 0     $size1 $size2 linear /dev/loop1 0     $size1 $size2 $size3 linear /dev/loop2 0     $size1 $size2 $size3 $size4 linear /dev/loop3 0     $size1 $size2 $size3 $size4 $size5 linear /dev/loop4 0     EOF              device-mapper: reload ioctl failed: Das Argument ist ungültig         Command failed      In `dmesg` can see the following: > device-mapper: table: 252:0: 2147483648: unknown target type device-mapper: > ioctl: error adding target to table Can someone give me a hint what I need to do.


title: Automatic security updates on Debian squeeze server

text: For a production Debian squeeze server, what are the best practices or recommendations for handling security updates? I have seen various articles on cron-apt, apticron, unattended-updates, apt cron jobs, etc. that download and/or install security updates as they are released. It seems like there are two philosophies on this:   1. Download all security updates and notify with an email, and then have an admin come in and manually apply the updates.   2. Download and install all security updates as they are released, sending an email notification letting the admin know what packages were upgraded. For these two cases, what is the recommended way to configure automatic security upgrades on a Debian server?


title: How to remove SSL certificate?

text: I've been asked to remove certificates from some of our servers, but I don't know anything about httpd configuration. If I have one server where if I do this `/usr/sbin/httpd -t -DDUMP_CERTS 2>/dev/null | /bin/sort -u` I get               /etc/httpd/certs/domain1.certificate     /etc/httpd/certs/domain2.certificate     /etc/httpd/certs/domain3.cert     /etc/pki/tls/certs/localhost.crt      and I only want to keep domain3.cert. How can I remove the others? If `/etc/pki/tls/certs/localhost.crt` is the only one on a machine, do I have to remove it in a different way? I tried commenting out the line mentioning that localhost.crt in `/etc/httpd/conf.d/ssl.conf` but then httpd reports `failed` when I do a service restart.


title: how to redirect output to multiple log files

text: How to redirect standard output to multiple log files Following seems to be not working. Any help is appreciated. `some_command 1> output_log_1 output_log_2 2>&1`


title: Record audio from multiple devices with ALSA and Pulseaudio

text: I want to record audio from multiple input devices using ALSA and Pulseaudio. More precisely, I want to play UltraStar Deluxe. It is a game using SDL. As far as I can tell, it supports ALSA only. Everything is working fine as long as I simply use the virtual ALSA "pulse" device for output and input. Unfortunately, this only allows one input device, but I want to record from three independent (USB) microphones. Downmixing the three sources into one is not an option. https://wiki.archlinux.de/title/Pulseaudio#Mehrere_PulseAudio_ALSA_Ger.C3.A4te suggests to define an additional ALSA PCM by adding               pcm.<pcmname> {       type pulse       device <devicename>     }      to my `~/.asoundrc`. Unfortunately, I cannot work out what to use for the pulseaudio device name. I tried with what I guess it the pulseaudio name `alsa_card.usb-0d8c_C-Media_USB_Audio_Device-00-Device`. `arecord -L` shows the additional virtual ALSA PCM, but fails to record from it giving the error message `ALSA lib pcm_pulse.c:752:(pulse_prepare) PulseAudio: Unable to create stream: Entität nicht vorhanden` (that last german bit translates to something along `Entity not existant`). The virtual ALSA PCM does not show in UltraStar Deluxe. How can I achieve this? Is it possible at all? I use Pulseaudio for everything else and it works fine. Without Pulseaudio working with many programs is cumbersome and audio is flaky. Here is the output of `pacmd list-cards`:               4 card(s) available.     index: 0     ... (HDMI Output Device stripped)     index: 1     name: <alsa_card.pci-0000_00_1b.0>     driver: <module-alsa-card.c>     owner module: 6     properties:     alsa.card = "0"     alsa.card_name = "HDA Intel PCH"     alsa.long_card_name = "HDA Intel PCH at 0xf6130000 irq 48"     alsa.driver_name = "snd_hda_intel"     device.bus_path = "pci-0000:00:1b.0"     sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"     device.bus = "pci"     device.vendor.id = "8086"     device.vendor.name = "Intel Corporation"     device.product.id = "1e20"     device.product.name = "7 Series/C210 Series Chipset Family High Definition Audio Controller"     device.form_factor = "internal"     device.string = "0"     device.description = "Internes Audio"     module-udev-detect.discovered = "1"     device.icon_name = "audio-card-pci"     profiles:     input:analog-stereo: Analog Stereo Eingang (priority 60, available: unknown)     output:analog-stereo: Analog Stereo Ausgang (priority 6000, available: unknown)     output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (priority 6060, available: unknown)     output:analog-surround-40: Analog Surround 4.0 Ausgang (priority 700, available: unknown)     output:analog-surround-40+input:analog-stereo: Analog Surround 4.0 Ausgang + Analog Stereo Eingang (priority 760, available: unknown)     output:analog-surround-41: Analog Surround 4.1 Ausgang (priority 800, available: unknown)     output:analog-surround-41+input:analog-stereo: Analog Surround 4.1 Ausgang + Analog Stereo Eingang (priority 860, available: unknown)     output:analog-surround-50: Analog Surround 5.0 Ausgang (priority 700, available: unknown)     output:analog-surround-50+input:analog-stereo: Analog Surround 5.0 Ausgang + Analog Stereo Eingang (priority 760, available: unknown)     output:analog-surround-51: Analog Surround 5.1 Ausgang (priority 800, available: unknown)     output:analog-surround-51+input:analog-stereo: Analog Surround 5.1 Ausgang + Analog Stereo Eingang (priority 860, available: unknown)     output:iec958-stereo: Digital Stereo (IEC958) Ausgang (priority 5500, available: unknown)     output:iec958-stereo+input:analog-stereo: Digital Stereo (IEC958) Ausgang + Analog Stereo Eingang (priority 5560, available: unknown)     off: Aus (priority 0, available: unknown)     active profile: <output:analog-stereo>     sinks:     alsa_output.pci-0000_00_1b.0.analog-stereo/#0: Internes Audio Analog Stereo     sources:     alsa_output.pci-0000_00_1b.0.analog-stereo.monitor/#0: Monitor of Internes Audio Analog Stereo     ports:     analog-input: Analoge Eingabe (priority 10000, latency offset 0 usec, available: unknown)       properties:          analog-input-microphone: Mikrofon (priority 8700, latency offset 0 usec, available: no)       properties:         device.icon_name = "audio-input-microphone"     analog-input-linein: Line In (priority 8100, latency offset 0 usec, available: no)       properties:          analog-output: Analoge Ausgabe (priority 9900, latency offset 0 usec, available: unknown)       properties:          iec958-stereo-output: Digitaler Ausgang (S/PDIF) (priority 0, latency offset 0 usec, available: unknown)       properties:          index: 2     name: <alsa_card.usb-0d8c_C-Media_USB_Audio_Device-00-Device>     driver: <module-alsa-card.c>     owner module: 7     properties:     alsa.card = "1"     alsa.card_name = "C-Media USB Audio Device"     alsa.long_card_name = "C-Media USB Audio Device at usb-0000:00:1d.0-1.5, full speed"     alsa.driver_name = "snd_usb_audio"     device.bus_path = "pci-0000:00:1d.0-usb-0:1.5:1.0"     sysfs.path = "/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.5/2-1.5:1.0/sound/card1"     udev.id = "usb-0d8c_C-Media_USB_Audio_Device-00-Device"     device.bus = "usb"     device.vendor.id = "0d8c"     device.vendor.name = "C-Media Electronics, Inc."     device.product.id = "0008"     device.product.name = "C-Media USB Audio Device   "     device.serial = "0d8c_C-Media_USB_Audio_Device"     device.string = "1"     device.description = "C-Media USB Audio Device   "     module-udev-detect.discovered = "1"     device.icon_name = "audio-card-usb"     profiles:     input:analog-mono: Analog Mono Eingang (priority 1, available: unknown)     output:analog-stereo: Analog Stereo Ausgang (priority 6000, available: unknown)     output:analog-stereo+input:analog-mono: Analog Stereo Ausgang + Analog Mono Eingang (priority 6001, available: unknown)     output:iec958-stereo: Digital Stereo (IEC958) Ausgang (priority 5500, available: unknown)     output:iec958-stereo+input:analog-mono: Digital Stereo (IEC958) Ausgang + Analog Mono Eingang (priority 5501, available: unknown)     off: Aus (priority 0, available: unknown)     active profile: <input:analog-mono>     sources:     alsa_input.usb-0d8c_C-Media_USB_Audio_Device-00-Device.analog-mono/#1: C-Media USB Audio Device    Analog Mono     ports:     analog-input-microphone: Mikrofon (priority 8700, latency offset 0 usec, available: unknown)       properties:         device.icon_name = "audio-input-microphone"     analog-output: Analoge Ausgabe (priority 9900, latency offset 0 usec, available: unknown)       properties:          iec958-stereo-output: Digitaler Ausgang (S/PDIF) (priority 0, latency offset 0 usec, available: unknown)       properties:          index: 3     name: <alsa_card.usb-0d8c_C-Media_USB_Audio_Device-00-Device_1>     driver: <module-alsa-card.c>     owner module: 8     properties:     alsa.card = "2"     alsa.card_name = "C-Media USB Audio Device"     alsa.long_card_name = "C-Media USB Audio Device at usb-0000:00:1d.0-1.6, full speed"     alsa.driver_name = "snd_usb_audio"     device.bus_path = "pci-0000:00:1d.0-usb-0:1.6:1.0"     sysfs.path = "/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6/2-1.6:1.0/sound/card2"     udev.id = "usb-0d8c_C-Media_USB_Audio_Device-00-Device_1"     device.bus = "usb"     device.vendor.id = "0d8c"     device.vendor.name = "C-Media Electronics, Inc."     device.product.id = "0008"     device.product.name = "C-Media USB Audio Device   "     device.serial = "0d8c_C-Media_USB_Audio_Device"     device.string = "2"     device.description = "C-Media USB Audio Device   "     module-udev-detect.discovered = "1"     device.icon_name = "audio-card-usb"     profiles:     input:analog-mono: Analog Mono Eingang (priority 1, available: unknown)     output:analog-stereo: Analog Stereo Ausgang (priority 6000, available: unknown)     output:analog-stereo+input:analog-mono: Analog Stereo Ausgang + Analog Mono Eingang (priority 6001, available: unknown)     output:iec958-stereo: Digital Stereo (IEC958) Ausgang (priority 5500, available: unknown)     output:iec958-stereo+input:analog-mono: Digital Stereo (IEC958) Ausgang + Analog Mono Eingang (priority 5501, available: unknown)     off: Aus (priority 0, available: unknown)     active profile: <input:analog-mono>     sources:     alsa_input.usb-0d8c_C-Media_USB_Audio_Device-00-Device_1.analog-mono/#2: C-Media USB Audio Device    Analog Mono     ports:     analog-input-microphone: Mikrofon (priority 8700, latency offset 0 usec, available: unknown)       properties:         device.icon_name = "audio-input-microphone"     analog-output: Analoge Ausgabe (priority 9900, latency offset 0 usec, available: unknown)       properties:          iec958-stereo-output: Digitaler Ausgang (S/PDIF) (priority 0, latency offset 0 usec, available: unknown)       properties:      Regards Hermann


How can one run multiple programs in the background with single command? I have tried the commands below, but they do not work.               nohup ./script1.sh & && nohup ./script2.sh &     -bash: syntax error near unexpected token '&&'          nohup ./script1.sh & ; nohup ./script2.sh &     -bash: syntax error near unexpected token ';'


title: Rsnapshot via SSH speed issue

text: I am trying to backup bunch of desktops running RedHat 6.4 (i86_64) LVM on the top of ext4 to our file server running RedHat using rsnapshot and ssh. I am on 1GbE. I am finding the speed of the first back up abysmal. It takes me about 1 hour to push 1Gb of data. This is my rsnapshot.conf file. What am I doing wrong? Could people suggest some alternatives to rsnapshot.               config_version  1.2          snapshot_root   /mnt/backup/desktops/test/          cmd_cp          /bin/cp     cmd_rm          /bin/rm     cmd_rsync       /usr/bin/rsync      cmd_ssh /usr/bin/ssh     cmd_logger      /usr/bin/logger     cmd_du          /usr/bin/du     #cmd_preexec    /path/to/preexec/script     #cmd_postexec   /path/to/postexec/script          linux_lvm_cmd_lvcreate  /sbin/lvcreate     linux_lvm_cmd_lvremove  /sbin/lvremove     linux_lvm_cmd_mount     /bin/mount     linux_lvm_cmd_umount    /bin/umount               linux_lvm_snapshotsize  2G     linux_lvm_snapshotname  rsnapshot     linux_lvm_vgpath        /dev     linux_lvm_mountpath     /mnt/lvm-snapshot               retain  hourly  6               #              GLOBAL OPTIONS              #     verbose         2     loglevel        3     logfile /var/log/rsnapshot     lockfile        /var/run/rsnapshot.pid          # Default rsync args. All rsync commands have at least these options set.     rsync_short_args        -az     rsync_long_args --delete --numeric-ids --relative --delete-excluded --rsync-path     ="sudo /usr/bin/rsync"          # ssh has no args passed by default, but you can specify some here.     ssh_args        -p 22 -i /root/.ssh/backup_key_dsa               exclude '*.core'          backup--backup@land.lab.edu:/home/me/     land/  +rsync_long_args=--bwlimit=16


title: X client forwarded over SSH "cannot open display: localhost:11.0"

text: I have enabled X forwarding on remote machine where SSH server is running:               # grep -i forward /etc/ssh/sshd_config      X11Forwarding yes     #       On local machine, I have started SSH client with `-X` flag which instructs the SSH server, running on remote machine, to set up a X-server proxy. In addition, it creates the `$DISPLAY` variable which points to this proxy and calls the `xauth` to install a _proxy key_ which authenticates to this X-server proxy on remote machine:               # echo "$DISPLAY"     localhost:11.0     # xauth list | grep 11     A58/unix:11  MIT-MAGIC-COOKIE-1  39324086672d1ae35e373476c3891a77     #       However, X clients on remote machine do not start properly:               # wireshark           (wireshark:10083): Gtk-WARNING **: cannot open display: localhost:11.0     # xterm     Warning: This program is an suid-root program or is being run by the root user.     The full text of the error or warning message cannot be safely formatted     in this environment. You may get a more descriptive message by running the     program as a non-root user or by removing the suid bit on the executable.     xterm: Xt error: Can't open display: %s     #       X forwarding doesn't use `xhost` so at least this can be excluded. I tried to find some useful log entries both on machine where SSH server is running and machine where SSH client is running with `find /var/log/ -mmin -5 -type f` command, but this did not give any hints. SSH server version is OpenSSH_5.9p1 and SSH client version is OpenSSH_5.2p1. Output of /tmp/.X11-unix/ directory on remote machine can be seen below:               # ls -la /tmp/.X11-unix/     total 0     drwxrwxrwt 2 root root 40 Dec  9 15:44 .     drwxrwxrwt 4 root root 80 Jan 13 09:17 ..     #       As seen above, there are no Unix domain sockets there. Output of `strace xterm` is following:               # strace xterm      execve("/usr/bin/xterm", ["xterm"], [/* 16 vars */]) = 0     brk(0)                                  = 0x9e50000     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb77bd000     access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)     open("/etc/ld.so.cache", O_RDONLY)      = 3     fstat64(3, {st_mode=S_IFREG|0644, st_size=42995, ...}) = 0     mmap2(NULL, 42995, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb77b2000     close(3)                                = 0     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     open("/usr/lib/i386-linux-gnu/libXft.so.2", O_RDONLY) = 3     read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\3604\0\0004\0\0\0"..., 512) = 512     fstat64(3, {st_mode=S_IFREG|0644, st_size=82952, ...}) = 0     mmap2(NULL, 85732, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb779d000     mmap2(0xb77b1000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13) = 0xb77b1000     close(3)                                = 0     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     open("/usr/lib/i386-linux-gnu/libXaw.so.7", O_RDONLY) = 3     read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300\327\0\0004\0\0\0"..., 512) = 512     fstat64(3, {st_mode=S_IFREG|0644, st_size=428900, ...}) = 0     mmap2(NULL, 432592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7733000     mmap2(0xb7796000, 28672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x62) = 0xb7796000     close(3)                                = 0     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     open("/usr/lib/libutempter.so.0", O_RDONLY) = 3     read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\360\6\0\0004\0\0\0"..., 512) = 512     fstat64(3, {st_mode=S_IFREG|0644, st_size=4572, ...}) = 0     mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7732000     mmap2(NULL, 7432, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7730000     mmap2(0xb7731000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0xb7731000     close(3)                                = 0     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     open("/lib/i386-linux-gnu/libtinfo.so.5", O_RDONLY) = 3     read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0Pd\0\0004\0\0\0"..., 512) = 512     fstat64(3, {st_mode=S_IFREG|0644, st_size=125416, ...}) = 0     mmap2(NULL, 129100, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7710000     mmap2(0xb772d000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1c) = 0xb772d000     close(3)                                = 0     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     open("/lib/i386-linux-gnu/i686/cmov/libc.so.6", O_RDONLY) = 3     read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240o\1\0004\0\0\0"..., 512) = 512     fstat64(3, {st_mode=S_IFREG|0755, st_size=1413288, ...}) = 0     mmap2(NULL, 1427832, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb75b3000     mprotect(0xb7709000, 4096, PROT_NONE)   = 0     mmap2(0xb770a000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x156) = 0xb770a000     mmap2(0xb770d000, 10616, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb770d000     close(3)                                = 0     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     open("/usr/lib/i386-linux-gnu/libfontconfig.so.1", O_RDONLY) = 3     read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300J\0\0004\0\0\0"..., 512) = 512     fstat64(3, {st_mode=S_IFREG|0644, st_size=215828, ...}) = 0     mmap2(NULL, 219492, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb757d000     mmap2(0xb75b1000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x33) = 0xb75b1000     close(3)                                = 0     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     open("/usr/lib/i386-linux-gnu/libX11.so.6", O_RDONLY) = 3     read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240g\1\0004\0\0\0"..., 512) = 512     fstat64(3, {st_mode=S_IFREG|0644, st_size=1273544, ...}) = 0     mmap2(NULL, 1277496, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7445000     mmap2(0xb7579000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x133) = 0xb7579000     close(3)                                = 0     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     open("/usr/lib/i386-linux-gnu/libXmu.so.6", O_RDONLY) = 3     read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\200N\0\0004\0\0\0"..., 512) = 512     fstat64(3, {st_mode=S_IFREG|0644, st_size=102028, ...}) = 0     mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7444000     mmap2(NULL, 101644, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb742b000     mmap2(0xb7443000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x18) = 0xb7443000     close(3)                                = 0     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     open("/usr/lib/i386-linux-gnu/libXt.so.6", O_RDONLY) = 3     read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0000\315\0\0004\0\0\0"..., 512) = 512     fstat64(3, {st_mode=S_IFREG|0644, st_size=380284, ...}) = 0     mmap2(NULL, 380628, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb73ce000     mmap2(0xb7427000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x59) = 0xb7427000     close(3)                                = 0     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     open("/usr/lib/i386-linux-gnu/libICE.so.6", O_RDONLY) = 3     read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300:\0\0004\0\0\0"..., 512) = 512     fstat64(3, {st_mode=S_IFREG|0644, st_size=92148, ...}) = 0     mmap2(NULL, 102224, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb73b5000     mmap2(0xb73cb000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15) = 0xb73cb000     mmap2(0xb73cd000, 3920, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb73cd000     close(3)                                = 0     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     open("/usr/lib/i386-linux-gnu/libfreetype.so.6", O_RDONLY) = 3     read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320\202\0\0004\0\0\0"..., 512) = 512     fstat64(3, {st_mode=S_IFREG|0644, st_size=632928, ...}) = 0     mmap2(NULL, 635732, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7319000     mmap2(0xb73b0000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x96) = 0xb73b0000     close(3)                                = 0     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     open("/usr/lib/i386-linux-gnu/libXrender.so.1", O_RDONLY) = 3     read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0p\25\0\0004\0\0\0"..., 512) = 512     fstat64(3, {st_mode=S_IFREG|0644, st_size=35744, ...}) = 0     mmap2(NULL, 38540, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb730f000     mmap2(0xb7318000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8) = 0xb7318000     close(3)                                = 0     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     open("/usr/lib/i386-linux-gnu/libXext.so.6", O_RDONLY) = 3     read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`,\0\0004\0\0\0"..., 512) = 512     fstat64(3, {st_mode=S_IFREG|0644, st_size=70320, ...}) = 0     mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb730e000     mmap2(NULL, 73416, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb72fc000     mmap2(0xb730d000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10) = 0xb730d000     close(3)                                = 0     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     open("/usr/lib/i386-linux-gnu/libXpm.so.4", O_RDONLY) = 3     read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0P%\0\0004\0\0\0"..., 512) = 512     fstat64(3, {st_mode=S_IFREG|0644, st_size=67776, ...}) = 0     mmap2(NULL, 66460, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb72eb000     mmap2(0xb72fb000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10) = 0xb72fb000     close(3)                                = 0     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     open("/usr/lib/i386-linux-gnu/libz.so.1", O_RDONLY) = 3     read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300\32\0\0004\0\0\0"..., 512) = 512     fstat64(3, {st_mode=S_IFREG|0644, st_size=90192, ...}) = 0     mmap2(NULL, 92868, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb72d4000     mmap2(0xb72ea000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15) = 0xb72ea000     close(3)                                = 0     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     open("/lib/i386-linux-gnu/libexpat.so.1", O_RDONLY) = 3     read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0@#\0\0004\0\0\0"..., 512) = 512     fstat64(3, {st_mode=S_IFREG|0644, st_size=165192, ...}) = 0     mmap2(NULL, 167996, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb72aa000     mprotect(0xb72d0000, 4096, PROT_NONE)   = 0     mmap2(0xb72d1000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26) = 0xb72d1000     close(3)                                = 0     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     open("/usr/lib/i386-linux-gnu/libxcb.so.1", O_RDONLY) = 3     read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0P\221\0\0004\0\0\0"..., 512) = 512     fstat64(3, {st_mode=S_IFREG|0644, st_size=136968, ...}) = 0     mmap2(NULL, 139728, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7287000     mmap2(0xb72a8000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x20) = 0xb72a8000     close(3)                                = 0     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     open("/lib/i386-linux-gnu/i686/cmov/libdl.so.2", O_RDONLY) = 3     read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`\n\0\0004\0\0\0"..., 512) = 512     fstat64(3, {st_mode=S_IFREG|0644, st_size=9844, ...}) = 0     mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7286000     mmap2(NULL, 12408, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7282000     mmap2(0xb7284000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0xb7284000     close(3)                                = 0     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     open("/usr/lib/i386-linux-gnu/libSM.so.6", O_RDONLY) = 3     read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0 \26\0\0004\0\0\0"..., 512) = 512     fstat64(3, {st_mode=S_IFREG|0644, st_size=28320, ...}) = 0     mmap2(NULL, 31120, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb727a000     mmap2(0xb7281000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6) = 0xb7281000     close(3)                                = 0     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     open("/usr/lib/i386-linux-gnu/libXau.so.6", O_RDONLY) = 3     read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`\n\0\0004\0\0\0"..., 512) = 512     fstat64(3, {st_mode=S_IFREG|0644, st_size=8592, ...}) = 0     mmap2(NULL, 11384, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7277000     mmap2(0xb7279000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0xb7279000     close(3)                                = 0     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     open("/usr/lib/i386-linux-gnu/libXdmcp.so.6", O_RDONLY) = 3     read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0P\17\0\0004\0\0\0"..., 512) = 512     fstat64(3, {st_mode=S_IFREG|0644, st_size=19364, ...}) = 0     mmap2(NULL, 22144, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7271000     mmap2(0xb7276000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x4) = 0xb7276000     close(3)                                = 0     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     open("/lib/i386-linux-gnu/libuuid.so.1", O_RDONLY) = 3     read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0@\22\0\0004\0\0\0"..., 512) = 512     fstat64(3, {st_mode=S_IFREG|0644, st_size=17992, ...}) = 0     mmap2(NULL, 20716, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb726b000     mmap2(0xb726f000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3) = 0xb726f000     close(3)                                = 0     mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb726a000     mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7269000     set_thread_area({entry_number:-1 -> 6, base_addr:0xb7269700, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0     mprotect(0xb726f000, 4096, PROT_READ)   = 0     mprotect(0xb7284000, 4096, PROT_READ)   = 0     mprotect(0xb72a8000, 4096, PROT_READ)   = 0     mprotect(0xb72d1000, 8192, PROT_READ)   = 0     mprotect(0xb73b0000, 16384, PROT_READ)  = 0     mprotect(0xb7427000, 4096, PROT_READ)   = 0     mprotect(0xb75b1000, 4096, PROT_READ)   = 0     mprotect(0xb770a000, 8192, PROT_READ)   = 0     mprotect(0xb772d000, 8192, PROT_READ)   = 0     mprotect(0x80a9000, 4096, PROT_READ)    = 0     mprotect(0xb77db000, 4096, PROT_READ)   = 0     munmap(0xb77b2000, 42995)               = 0     geteuid32()                             = 0     getegid32()                             = 0     getuid32()                              = 0     getgid32()                              = 0     setuid32(0)                             = 0     brk(0)                                  = 0x9e50000     brk(0x9e71000)                          = 0x9e71000     ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0     open("/proc/meminfo", O_RDONLY)         = 3     fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0     mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb77bc000     read(3, "MemTotal:        2039468 kB\nMemF"..., 1024) = 1024     close(3)                                = 0     munmap(0xb77bc000, 4096)                = 0     socket(PF_NETLINK, SOCK_RAW, 0)         = 3     bind(3, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 0     getsockname(3, {sa_family=AF_NETLINK, pid=16008, groups=00000000}, [12]) = 0     time(NULL)                              = 1389599545     sendto(3, "\24\0\0\0\26\0\1\0039\233\323R\0\0\0\0\0\0\0\0", 20, 0, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 20     recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"0\0\0\0\24\0\2\0009\233\323R\210>\0\0\2\10\200\376\1\0\0\0\10\0\1\0\177\0\0\1"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 164     recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"@\0\0\0\24\0\2\0009\233\323R\210>\0\0\n\200\200\376\1\0\0\0\24\0\1\0\0\0\0\0"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 320     recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\24\0\0\0\3\0\2\0009\233\323R\210>\0\0\0\0\0\0\1\0\0\0\24\0\1\0\0\0\0\0"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 20     close(3)                                = 0     socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3     connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)     close(3)                                = 0     socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3     connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)     close(3)                                = 0     open("/etc/nsswitch.conf", O_RDONLY)    = 3     fstat64(3, {st_mode=S_IFREG|0644, st_size=475, ...}) = 0     mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb77bc000     read(3, "# /etc/nsswitch.conf\n#\n# Example"..., 4096) = 475     read(3, "", 4096)                       = 0     close(3)                                = 0     munmap(0xb77bc000, 4096)                = 0     open("/etc/host.conf", O_RDONLY)        = 3     fstat64(3, {st_mode=S_IFREG|0644, st_size=9, ...}) = 0     mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb77bc000     read(3, "multi on\n", 4096)             = 9     read(3, "", 4096)                       = 0     close(3)                                = 0     munmap(0xb77bc000, 4096)                = 0     getpid()                                = 16008     open("/etc/resolv.conf", O_RDONLY)      = 3     fstat64(3, {st_mode=S_IFREG|0644, st_size=108, ...}) = 0     mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb77bc000     read(3, "domain data.ee\nsearch data.ee li"..., 4096) = 108     read(3, "", 4096)                       = 0     close(3)                                = 0     munmap(0xb77bc000, 4096)                = 0     open("/etc/ld.so.cache", O_RDONLY)      = 3     fstat64(3, {st_mode=S_IFREG|0644, st_size=42995, ...}) = 0     mmap2(NULL, 42995, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb77b2000     close(3)                                = 0     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     open("/lib/i386-linux-gnu/i686/cmov/libnss_files.so.2", O_RDONLY) = 3     read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0P\32\0\0004\0\0\0"..., 512) = 512     fstat64(3, {st_mode=S_IFREG|0644, st_size=42628, ...}) = 0     mmap2(NULL, 45768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb725d000     mmap2(0xb7267000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9) = 0xb7267000     close(3)                                = 0     mprotect(0xb7267000, 4096, PROT_READ)   = 0     munmap(0xb77b2000, 42995)               = 0     open("/etc/hosts", O_RDONLY|O_CLOEXEC)  = 3     fstat64(3, {st_mode=S_IFREG|0644, st_size=256, ...}) = 0     mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb77bc000     read(3, "127.0.0.1\tlocalhost\n127.0.1.1\tTh"..., 4096) = 256     read(3, "", 4096)                       = 0     close(3)                                = 0     munmap(0xb77bc000, 4096)                = 0     socket(PF_INET, SOCK_STREAM|SOCK_CLOEXEC, IPPROTO_TCP) = 3     setsockopt(3, SOL_TCP, TCP_NODELAY, [1], 4) = 0     setsockopt(3, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0     connect(3, {sa_family=AF_INET, sin_port=htons(6011), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 ETIMEDOUT (Connection timed out)     close(3)                                = 0     open("/usr/lib/i386-linux-gnu/X11/XtErrorDB", O_RDONLY) = -1 ENOENT (No such file or directory)     getuid32()                              = 0     geteuid32()                             = 0     getuid32()                              = 0     write(2, "Warning: This program is an suid"..., 302Warning: This program is an suid-root program or is being run by the root user.     The full text of the error or warning message cannot be safely formatted     in this environment. You may get a more descriptive message by running the     program as a non-root user or by removing the suid bit on the executable.     ) = 302     write(2, "xterm: ", 7xterm: )                  = 7     write(2, "Xt error: Can't open display: %s"..., 33Xt error: Can't open display: %s     ) = 33     exit_group(1)                           = ?     #       `strace xterm` hangs for 60 seconds after printing the line below: > connect(3, {sa_family=AF_INET, sin_port=htons(6011), > sin_addr=inet_addr("127.0.0.1")}, 16 EDIT: after allowing connections from 127.0.0.0/8 to 127.0.0.0/8, I was able to pass the `connect` system call and now the issue seems to be an invalid MIT-MAGIC-COOKIE-1 key:               connect(3, {sa_family=AF_INET, sin_port=htons(6010), sin_addr=inet_addr("127.0.0.1")}, 16) = 0     getpeername(3, {sa_family=AF_INET, sin_port=htons(6010), sin_addr=inet_addr("127.0.0.1")}, [16]) = 0     uname({sys="Linux", node="ThinkCentreA58", ...}) = 0     access("/root/.Xauthority", R_OK)       = 0     open("/root/.Xauthority", O_RDONLY)     = 4     fstat64(4, {st_mode=S_IFREG|0600, st_size=522, ...}) = 0     mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7726000     read(4, "\0\0\0\4\177\0\0\1\0\0041000\0\22MIT-MAGIC-COOKIE"..., 4096) = 522     read(4, "", 4096)                       = 0     close(4)                                = 0     munmap(0xb7726000, 4096)                = 0     getsockname(3, {sa_family=AF_INET, sin_port=htons(37220), sin_addr=inet_addr("127.0.0.1")}, [16]) = 0     fcntl64(3, F_GETFL)                     = 0x2 (flags O_RDWR)     fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK)  = 0     fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0     poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])     writev(3, [{"l\0\v\0\0\0\22\0\20\0\0\0", 12}, {"", 0}, {"MIT-MAGIC-COOKIE-1", 18}, {"\0\0", 2}, {"I%f9\331-f\f\235i\321\354:a~\341", 16}, {"", 0}], 6) = 48     recv(3, 0x94b0ec8, 8, 0)                = -1 EAGAIN (Resource temporarily unavailable)     poll([{fd=3, events=POLLIN}], 1, -1)    = 1 ([{fd=3, revents=POLLIN}])     recv(3, "\0\36\v\0\0\0\10\0", 8, 0)     = 8     recv(3, "Invalid MIT-MAGIC-COOKIE-1 key\0\0", 32, 0) = 32     write(2, "Invalid MIT-MAGIC-COOKIE-1 key", 30Invalid MIT-MAGIC-COOKIE-1 key) = 30     shutdown(3, 2 /* send and receive */)   = 0     close(3)                                = 0     open("/usr/lib/i386-linux-gnu/X11/XtErrorDB", O_RDONLY) = -1 ENOENT (No such file or directory)     getuid32()                              = 0     geteuid32()                             = 0     getuid32()                              = 0     write(2, "Warning: This program is an suid"..., 302Warning: This program is an suid-root program or is being run by the root user.     The full text of the error or warning message cannot be safely formatted     in this environment. You may get a more descriptive message by running the     program as a non-root user or by removing the suid bit on the executable.     ) = 302     write(2, "xterm: ", 7xterm: )                  = 7     write(2, "Xt error: Can't open display: %s"..., 33Xt error: Can't open display: %s     ) = 33     exit_group(1)                           = ?     #       If any additional information is needed, please ask! Any ideas how to proceed with troubleshooting?


title: Recovering data from a failing RAID 5 setup

text: I have a four disk RAID 5 array that is in the process of failing hard. One disk is completely dead and `smartctl` is telling me that a second disk is failing. All the data on the RAID is backed up, however about 1 TB is non trivial to restore since it is ripped CDs and DVDs and I would have to rip them again. I have a spare disk that I can swap out for the dead drive and attempt to rebuild, if that is the right term, the RAID and then backup the difficult data to a different fully healthy new RAID 6 setup. I could also backup the data from the now non-redundant RAID directly to the new RAID. Is is gentler on a disk from a non-redundant four disk RAID to "restore" the RAID or copy the data directly. If it matters the disks are 2 TB each giving a total RAID size of 6 TB. There is about 5 TB of data on the RAID and I would want to get 1 TB off of it.


title: searching for sysvinit in a linux tree

text: This is the tree for petalinux. https://github.com/Xilinx/linux-xlnx/tree/xlnx_3.8 I am looking for sysvinit package,which contains things like init ,halt etc. When this source code is compiled we get corresponding binaries in /sbin/. I found after compiling binary files like init.sysvinit,halt.sysvinit etc. I can download the source code separately from here But the same package must be there in petlainux source also. How do I search these source code in petalinux tree above?


title: What is IBM PowerLinux?

text: I've just heard about something called IBM PowerLinux, but i don't find a clear definition of what it is. Can someone please explain this in few words ?


title: Run script without ./ before the name

text: I am running a quite complicated script which changes directories and runs many other commands. All these commands are run using 'scriptname', which works fine when I execute the main script from my terminal. However, sometimes I have to ssh into a server and run the main script from there, it fails as there isn't a ./ before each command. I'd rather not go through all the scripts and executables and add a ./ to the commands, so is there another way to solve this problem?


title: How to catch hold of Linux basics

text: I am a windows user and I really want to learn how to use Linux. I know little bit of programming and networking concepts if that helps. I want to learn everything from scratch. Like what command does what, how to configure etc. I would really prefer paying for CBT Videos training that books, but if book is recommended, then I don't mind using books either. I did visit CBTnuggets.com but I really couldn't figure out which training is the most basic one. Please recommend me few Videos(Preferred), Books and any such material. Thank you in advance.


title: Evince fails to start because it cannot read .Xauthority

text: I'm logged in remotely over SSH with X forwarding to a machine running Ubuntu 10.04 (lucid). Most X11 applications (e.g. xterm, gnome-terminal) work fine. But Evince does not start. It seems unable to read `~/.Xauthority`, even though the file exists, and is evidently readable (it has the right permissions and other applications read it just fine).               $ evince     X11 connection rejected because of wrong authentication.     Cannot parse arguments: Cannot open display:     $ echo DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY     DISPLAY=localhost:10.0 XAUTHORITY=     $ strace evince     …     access("/home/gilles/.Xauthority", R_OK) = 0     open("/home/gilles/.Xauthority", O_RDONLY) = -1 EACCES (Permission denied)     …     $ ls -l ~/.Xauthority     -rw------- 1 gilles gilles 496 Jul  5 13:34 /home/gilles/.Xauthority      What's so special about Evince that it can't read `~/.Xauthority`? How can I make it start?


title: To-do's after installing Scientific-Linux 6.1 for Desktop purposes

text: How can I install fresh versions of these apps on Scientific-Linux 6.1/64bit?:   * VLC player (it's not in the default repositories and all I can find is an outdated VLC in rpmforge)   * Chromium/Google Chrome   * Flash Player   * VirtualBox   * A Microsoft Paint alternative


title: Minimalist window decorations etc in OpenBox or similar

text: I am currently customising my netbook's ArchLinux install. I really like the minimalist basic style of things like the ThinMC window borders in Gnome, and the FullFlat Firefox theme. What options are available to recreate this look on something like OpenBox or LXDE? (This is a small netbook, so I want to avoid installing loads of Gnome packages...) [I asked this question on SuperUser earlier, but perhaps this is a better place for it...]


title: How to tell if a running program is 64-bit in Linux?

text: In Mac OS X, I could use the Activity Monitor program to see if a running program/process is 64-bit. How do I do that in a Linux OS, regardless of flavour?


title: Apache 2 and PHP 5 not working

text: I have a test.php file in the web server directory with `php phpinfo();` content. When I try to execute `php test.php` at a shell then it executes correctly. But when I try to open the web page in a browser, it shows `php phpinfo();`. How can I troubleshoot Apache 2 and PHP 5 on my UNIX machine?


title: Problem with RAID5

text: I have a CentOS server with RAID5. Every time RAID5 re-syncs my server stop working. The hosting company stopped the httpd service so that RAID5 can re- sync itself, a process which can take as long as 3-4 hours. The problem reoccurs frequently, so the Hosting company swaped my server hardware and I migrated to new hardware. I still have this problem (on the new server). Is this something normal in RAID5? How can we solve this issue permanently? If every time RAID5 wants to re-sync my server overloads and my website will not be accessible, then RAID5 sucks. I would really appreciate if you can suggest a solution for this disaster. Here is /proc/mdstat report:               root@host [~]# watch 'cat /proc/mdstat'     Every 2.0s: cat /proc/mdstat                            Mon May  9 01:25:30 2011          Personalities : [raid1]     md0 : active raid1 xvda1[0] xvdb1[1]           104320 blocks [2/2] [UU]          md1 : active raid1 xvda2[0] xvdb2[1]           2096384 blocks [2/2] [UU]          md2 : active raid1 xvda5[0] xvdb5[1]           484086528 blocks [2/2] [UU]           [=====>...............]  resync = 29.5% (142978880/484086528) finish=77.7m     in speed=73108K/sec          unused devices: <none>


title: Removing Linux from a dual-boot setup. How to recover Windows bootloader or keep GRUB?

text: I recently discovered that running a Linux virtual machine is both cheap (RAM/CPU-wise) and easy; it seems like there's absolutely no need to have a dual-boot Windows/Linux machine (if this is not true - please tell me why!). That said, I would like to format my HDD's Linux partition and allocate that space to Windows. The only thing I'm worried about is the GRUB file, which (I assume) lives on the Linux partition, because I installed Linux second after Windows. Is it possible that by formatting the Linux partition I can damage the GRUB file and be unable to boot? Details: Windows 7/Ubuntu 13.04 living on an SSD. When I turn on my computer the screen to choose an OS to boot to is the Ubuntu one (vivid purple color).


title: Telnet send Ctrl-C

text: I use telnet to connect to a terminal server, which proxies the traffic to a RS-232 port. Unfortunately when using some of the devices it is not possible to send the `CTRL`+`C` character (0x03). Instead of transmitting the character, it seems like the local client has catches the keystroke, and I'm left in "some-other- mode". What I wanted was just to send a character. To debug this I have been playing around with:               ^] toggle termdata      and               ^] toggle options      Here is what happens when I press `CTRL`+`C` on a terminal server which does not work:               telnet 10.10.129.101 2012     Trying 10.10.129.101...     Connected to termserv-val3 (10.10.129.101).     Escape character is '^]'.     ^]     telnet> toggle options     Will show option processing.     ^]     telnet> toggle termdata     Will print hexadecimal representation of terminal traffic.     SENT IAC IP     SENT DO TIMING MARK      Here is what happens on terminal servers which do work:               telnet termserv-val2 2012     Trying 10.10.128.93...     Connected to termserv-val2 (10.10.128.93).     Escape character is '^]'.          telnet> toggle options     Will show option processing.          telnet> toggle termdata     Will print hexadecimal representation of terminal traffic.     < 0x0   03     ^C      I have tried `toggle localchars` but it did not make any difference. I have also tried `mode character` which allowed me to send the `CTRL`+`C` character, but here I did not get any output back from the device. How can I configure my telnet client to solve this?


title: Editing output of command as a new command

text: I have a script that outputs a string that I would like to edit and then run as a command. For example, I am using               cat ... | xsel -p      And then I want to edit the output of `xsel -op´ and run the edited string as a new command. So I am trying:               cat ... | xsel -p     $(xsel -op) TAB      But this of course fails. So how can I output the contents of `xsel -op` (in this case) to my command line, edit that new command, and then run the command? Thanks


title: How do I count the total number of unique strings from a file using linux

text: In `File1`:               OrderChange[a.1],partition=ORDER     OrderChangeResponse[2.b],partition=ORDER      I used below cmd getting output as 2 but it should be 1 as OrderChange in above file is 1.               cat File1|grep -i "OrderChange"|grep -i "ORDER"|wc -l


title: Analyse the performance of an rsync command from FreeNAS to a USB drive

text: I infrequently run a task where I `rsync` my photos (~30 directories with 10-100 files in each) from my FreeNAS machine to an external USB hard drive (500GB WD) as a redundant backup. I execute the following commands:               mount_msdosfs -o large /dev/da1s1 /mnt/usbbak/     rsync -rtvu /mnt/volume1/home/demo/Photos/camera /mnt/usbbak/      After the above `rsync` command has made it through half of all the files it begins to slow down. To the point where the machine/FreeNAS becomes unresponsive for several seconds/minutes. At this point I skip the current directory and `rsync` the rest of the files fine. However when I go back to `rsync` the directory I skipped the slow down reappears. I am not sure where to begin or how to debug/determine what could be happening? Is this an `rsync` issue? Maybe an issue with the USB hard drive?


title: How to create script that toggles one value in synclient?

text: I use `synclient touchpadoff=1` to disable touchpad and `synclient touchpadoff=0` to enable touchpad.               $synclient | grep TouchpadOff         TouchpadOff             = 1      I'd like to create script that will toggle this value. Then I will bind to key in OpenBox.


title: Can I delete my home partition and create a new(larger) partition with the same files without issue?

text: I installed arch linux and figured I might want to have another distro or 5, so I left over half my hard drive space unallocated. Due to the fact that I wouldn't know how to add another distro to my bootloader(gummiboot) if I wanted to and that I am fine with only having arch, I would like to use the remaining space for my home partition. I didn't make it an LVM partition so I don't think it would be as easy as booting from a LiveCD and resizing. Would backing up my home folder contents, deleting the home partition, creating a larger one and restoring the files provide the result that I want? If not, what would be the best way of doing this? If it helps at all, here is the output of the lsblk command on my system:               [$user@arch ~]$ lsblk     NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT     sda      8:0    0 298.1G  0 disk      ├─sda1   8:1    0   512M  0 part      ├─sda2   8:2    0    15G  0 part /     └─sda3   8:3    0   120G  0 part /home      And then there's 160GB of free space. Edit Thanks for the help, guys. I resized the partition from root after unmounting it.


title: How can I automate the process of copying files from one folder to another in Centos

text: I have a statistical application which runs every minute and creates charts accordingly. In order to make these charts available to other users, I need to copy the whole folder containing the charts and paste it to a shared folder where other users can see the contents. How can I automate this process so that e.g each 5 minutes the files and folders are updated?


title: Change IP remotely over ssh

text: I am using CentOS. I have a management server which has password-less ssh access to four other servers. I don't have physical access to these servers. In other words, I have to make all configurations over ssh. I want to create a bash script on the management server to change the IP address for the other servers, but if I give a wrong IP (ex. the IP used in network), the management server will lose access to the other server. What can I do to prevent or mitigate this problem?


title: How to make gdb not ask me "y or n"?

text: When I use GDB command `add-symbol-file` to load the symbol, GDB always asks me 'y or n', like this:               gdb> add-symbol-file mydrv.ko 0xa0070000     add symbol table from file "mydrv.ko" at             .text_addr = 0xa0070000     (y or n)      How to make it not ask and execute quietly?


title: Run a command on all the files in a directory tree and put the output into a variable

text: I want to run this bash command :               #!/bin/bash     rep="*"          for f in `ls -R`$rep; do     d='git log '$f'| wc -l'     c=$d     echo $c     done      how to excute a command `git log myFile | wc -l` from bash ? ps : this command will return a number : `git log myFile | wc -l`


title: Root filesystem nearly full - should I be worried?

text: me@netbook:~$ df -h     Filesystem            Size  Used Avail Use% Mounted on     /dev/sda5             323M  292M   15M  96% /     tmpfs                 5.0M  4.0K  5.0M   1% /lib/init/rw     tmpfs                 100M  740K   99M   1% /run     tmpfs                 5.0M     0  5.0M   0% /run/lock     tmpfs                 368M   11M  339M   3% /tmp     udev                  492M     0  492M   0% /dev     tmpfs                 199M  240K  199M   1% /run/shm     /dev/sda10             91G   80G  6.0G  94% /home     /dev/sda9             368M   11M  339M   3% /tmp     /dev/sda6             8.3G  6.2G  1.7G  79% /usr     /dev/sda7             2.8G  538M  2.1G  21% /var     /dev/sdb1             1.9G  1.5G  471M  76% /media/usb0      I got GNOME's warning about my root filesystem being filled up. But using `baobab` to try and figure out what is clogging the already quite small root filesystem confused me. _And all of these partitions were assigned automatically based on percentages anyway_... Is it such a bad thing to have 15M left on the root filesystem? And if so, then why did the Debian installer only assign a very small percentage of the available free space for that purpose?


title: Command re-assigned

text: I found a Bash script snippet earlier with which to echo a string to stderr:               echoerr() { echo "$@" 1>&2; }     echoerr hello world      This remained in my clipboard, and when I wanted to edit a file (with VIM) I accidentally pasted this snippet again instead of the file name:               vim echoerr() { echo "$@" 1>&2; }     echoerr hello world      It seems to have re-assigned `echoerr` to `vim`:               $ where vim     vim () {         echo "$@" 1>&2;     }     /usr/bin/vim      Also, attempting to open a file with VIM now just echos the file name back:               vim path/to/some-file      Prints:               path/to/some-file      **What happened?** (I'm running zsh inside tmux)


title: proxifier-like software on Unix?

text: Having some pleasant time with Proxifier, I just wonder if that kind of software is feasible under Unix/Linux? Is it easy to start a project like that, or are there existing projects available? Are they nearly as good as Proxifier (capture all TCP/IP packages and forward them through the proxy)?