title: Executable exists for everything but bash & file manager

text: I am running Debian. I was trying to use truecrypt the other day. I downloaded and extracted the zip, and ran the installer. I just extracted the file, and did not install it. I then tried executing it, and apparently it does not exist. First I just double clicked the file from thunar (xfce4 file manager), and it told me the file did not exist. I then tried the following:               ~$ cd /home/share/crypt/truecrypt/     /home/share/crypt/truecrypt$ ls -al truecrypt-linux_x86-64      -rwxrwxrwx 1 abstruselyarcane root 4873328 Feb  7  2012 truecrypt-linux_x86-64 #Its not a figment of my imagination     /home/share/crypt/truecrypt$ file truecrypt-linux_x86-64      truecrypt-linux_x86-64: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), stripped # It is indeed an executable     /home/share/crypt/truecrypt$ ./truecrypt-linux_x86-64      bash: ./truecrypt-linux_x86-64: No such file or directory # It doesn't exist?     /home/share/crypt/truecrypt$ sudo ./truecrypt-linux_x86-64      [sudo] password for abstruselyarcane:      sudo: unable to execute ./truecrypt-linux_x86-64: No such file or directory     /home/share/crypt/truecrypt$ ldd truecrypt-linux_x86-64          not a dynamic executable # file just said it is an executable!      I am very confused right now. EDIT: I has been suggested to be that I'm running a 64bit from a 32bit, I went to the other post, and tested my distro:               ~$ uname -m     x86_64


title: /bin/sh: ./check-dependencies.pl: not found — but check-dependencies.pl exists!

text: I'm trying to build Moses, but when I run `make` I get the following output:               minakshi@minakshi-Vostro-3500:~/Desktop/working-dir/moses/scripts$ make release     # Compile the parts     make all     make[1]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts'     # Building memscore may fail e.g. if boost is not available.     # We ignore this because traditional scoring will still work and memscore isn't used by default.     cd training/memscore ; \           ./configure && make \           || ( echo "WARNING: Building memscore failed."; \                echo 'training/memscore/memscore' >> ../../release-exclude )     checking for a BSD-compatible install... /usr/bin/install -c     checking whether build environment is sane... yes     checking for gawk... no     checking for mawk... mawk     checking whether make sets $(MAKE)... yes     checking for g++... g++     checking whether the C++ compiler works... yes     checking for C++ compiler default output file name... a.out     checking for suffix of executables...      checking whether we are cross compiling... no     checking for suffix of object files... o     checking whether we are using the GNU C++ compiler... yes     checking whether g++ accepts -g... yes     checking for style of include used by make... GNU     checking dependency style of g++... gcc3     checking for gcc... gcc     checking whether we are using the GNU C compiler... yes     checking whether gcc accepts -g... yes     checking for gcc option to accept ISO C89... none needed     checking dependency style of gcc... gcc3     checking for boostlib >= 1.31.0... yes     checking for cos in -lm... yes     checking for gzopen in -lz... yes     checking for cblas_dgemm in -lgslcblas... no     checking for gsl_blas_dgemm in -lgsl... no     checking how to run the C++ preprocessor... g++ -E     checking for grep that handles long lines and -e... /bin/grep     checking for egrep... /bin/grep -E     checking for ANSI C header files... yes     checking for sys/types.h... yes     checking for sys/stat.h... yes     checking for stdlib.h... yes     checking for string.h... yes     checking for memory.h... yes     checking for strings.h... yes     checking for inttypes.h... yes     checking for stdint.h... yes     checking for unistd.h... yes     checking n_gram.h usability... no     checking n_gram.h presence... no     checking for n_gram.h... no     checking for size_t... yes     checking for ptrdiff_t... yes     configure: creating ./config.status     config.status: creating Makefile     config.status: creating config.h     config.status: config.h is unchanged     config.status: executing depfiles commands     make[2]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/memscore'     make  all-am     make[3]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/memscore'     make[3]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/memscore'     make[2]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/memscore'     touch release-exclude # No files excluded by default     pwd=`pwd`; \         for subdir in cmert-0.5 phrase-extract symal mbr lexical-reordering; do \           make -C training/$subdir || exit 1; \           echo "### Compiler $subdir"; \           cd $pwd; \         done     make[2]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/cmert-0.5'     make[2]: Nothing to be done for `all'.     make[2]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/cmert-0.5'     ### Compiler cmert-0.5     make[2]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/phrase-extract'     make[2]: Nothing to be done for `all'.     make[2]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/phrase-extract'     ### Compiler phrase-extract     make[2]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/symal'     make[2]: Nothing to be done for `all'.     make[2]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/symal'     ### Compiler symal     make[2]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/mbr'     make[2]: Nothing to be done for `all'.     make[2]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/mbr'     ### Compiler mbr     make[2]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/lexical-reordering'     make[2]: Nothing to be done for `all'.     make[2]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/lexical-reordering'     ### Compiler lexical-reordering     ## All files that need compilation were compiled     make[1]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts'     /bin/sh: ./check-dependencies.pl: Permission denied     make: *** [release] Error 126     minakshi@minakshi-Vostro-3500:~/Desktop/working-dir/moses/scripts$ make release     # Compile the parts     make all     make[1]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts'     # Building memscore may fail e.g. if boost is not available.     # We ignore this because traditional scoring will still work and memscore isn't used by default.     cd training/memscore ; \           ./configure && make \           || ( echo "WARNING: Building memscore failed."; \                echo 'training/memscore/memscore' >> ../../release-exclude )     checking for a BSD-compatible install... /usr/bin/install -c     checking whether build environment is sane... yes     checking for gawk... no     checking for mawk... mawk     checking whether make sets $(MAKE)... yes     checking for g++... g++     checking whether the C++ compiler works... yes     checking for C++ compiler default output file name... a.out     checking for suffix of executables...      checking whether we are cross compiling... no     checking for suffix of object files... o     checking whether we are using the GNU C++ compiler... yes     checking whether g++ accepts -g... yes     checking for style of include used by make... GNU     checking dependency style of g++... gcc3     checking for gcc... gcc     checking whether we are using the GNU C compiler... yes     checking whether gcc accepts -g... yes     checking for gcc option to accept ISO C89... none needed     checking dependency style of gcc... gcc3     checking for boostlib >= 1.31.0... yes     checking for cos in -lm... yes     checking for gzopen in -lz... yes     checking for cblas_dgemm in -lgslcblas... no     checking for gsl_blas_dgemm in -lgsl... no     checking how to run the C++ preprocessor... g++ -E     checking for grep that handles long lines and -e... /bin/grep     checking for egrep... /bin/grep -E     checking for ANSI C header files... yes     checking for sys/types.h... yes     checking for sys/stat.h... yes     checking for stdlib.h... yes     checking for string.h... yes     checking for memory.h... yes     checking for strings.h... yes     checking for inttypes.h... yes     checking for stdint.h... yes     checking for unistd.h... yes     checking n_gram.h usability... no     checking n_gram.h presence... no     checking for n_gram.h... no     checking for size_t... yes     checking for ptrdiff_t... yes     configure: creating ./config.status     config.status: creating Makefile     config.status: creating config.h     config.status: config.h is unchanged     config.status: executing depfiles commands     make[2]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/memscore'     make  all-am     make[3]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/memscore'     make[3]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/memscore'     make[2]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/memscore'     touch release-exclude # No files excluded by default     pwd=`pwd`; \         for subdir in cmert-0.5 phrase-extract symal mbr lexical-reordering; do \           make -C training/$subdir || exit 1; \           echo "### Compiler $subdir"; \           cd $pwd; \         done     make[2]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/cmert-0.5'     make[2]: Nothing to be done for `all'.     make[2]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/cmert-0.5'     ### Compiler cmert-0.5     make[2]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/phrase-extract'     make[2]: Nothing to be done for `all'.     make[2]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/phrase-extract'     ### Compiler phrase-extract     make[2]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/symal'     make[2]: Nothing to be done for `all'.     make[2]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/symal'     ### Compiler symal     make[2]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/mbr'     make[2]: Nothing to be done for `all'.     make[2]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/mbr'     ### Compiler mbr     make[2]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/lexical-reordering'     make[2]: Nothing to be done for `all'.     make[2]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/lexical-reordering'     ### Compiler lexical-reordering     ## All files that need compilation were compiled     make[1]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts'     /bin/sh: ./check-dependencies.pl: not found     make: *** [release] Error 127      The error message says `./check-dependencies.pl` is "not found", but I see the file present in the `scripts` folder. So why does this error occur?


title: "No such file or directory" on files that exist?

text: In the past day, I've found at least 4 binaries that say "bin-name: No such file or directory" when I try to run them. Even if I type part of the name and tab complete it, I get the same error. I'm on an x86_64 architecture. Output of `file`:               fez-09152013-bin: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),     dynamically linked (uses shared libs), for GNU/Linux 2.6.24,     BuildID[sha1]=0x78612e4aac547367548dcc7cc3067c3cfcf2f177, stripped      Output of `strace`:               execve("./fez-09152013-bin", ["./fez-09152013-bin"], [/* 23 vars */]) = -1 ENOENT (No such file or directory)     dup(2)                                  = 3     fcntl(3, F_GETFL)                       = 0x8002 (flags O_RDWR|O_LARGEFILE)     fstat(3, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0     mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f3fda17a000     lseek(3, 0, SEEK_CUR)                   = -1 ESPIPE (Illegal seek)     write(3, "strace: exec: No such file or di"..., 40strace: exec: No such file or directory     ) = 40     close(3)                                = 0     munmap(0x7f3fda17a000, 4096)            = 0     exit_group(1)                           = ?      Output of `ldd`:               Not a dynamic executable      Output of `strings` is way too long to indent, so here's a link: http://pastebin.com/t7MmugLY apt-get error:               Reading package lists... Done     Building dependency tree            Reading state information... Done     Some packages could not be installed. This may mean that you have     requested an impossible situation or if you are using the unstable     distribution that some required packages have not yet been created     or been moved out of Incoming.     The following information may help to resolve the situation:          The following packages have unmet dependencies:      ia32-libs : Depends: ia32-libs-i386 but it is not installable     E: Unable to correct problems, you have held broken packages.


title: no such file or directory

text: I have a 64-bit Ubuntu and want to execute a 32-bit FreeRTOS binary. The error message says no such file or directory. The files are there I can read them with `ls -l`.


title: Linux From Scratch: make no such file or directory, bad interpreter

text: > **Possible Duplicate:**   >  Getting “Not found” message when running a 32-bit binary on a 64-bit system I have finished the chapter 5 of the book. And after I entered the chroot I realized that `make` is not working even though it is present.               root:/sources/linux-3.5.2# make mrproper     bash: /tools/bin/make: No such file or directory      the path is correct               echo $PATH     /bin:/usr/bin:/sbin:/usr/sbin:/tools/bin      AND                ls -l /tools/bin/make         -rwxr-xr-x 1 root root 559139 Nov 13 11:19 /tools/bin/make      I read on LFS FAQ that is probably due to a bad interpreter (link) so I did               readelf -l /tools/bin/make | grep interpreter           [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]      so it's wrong they said it should be something like **/tools/lib/ld- linux.so.2** Is there a way to precise when building it the right interpreter ? Thanks


title: Debian Wheezy 7.1 - can't launch Skype or Firefox

text: I've installed Skype by using `dkpg` and when I try to run it, this is what I get `-bash: /usr/bin/skype: No such file or directory`. Which is very strange since `ls -l | grep skype` shows this:               -rwxr-xr-x 1 root   root    30717480 May  7 01:43 skype      I had similiar problems when I installed FireFox, but since I didn't need it all that much, didn't care. However, I do need Skype on Linux. Output of my `$PATH` variable:               /home/max/.rvm/gems/ruby-2.0.0-p247/bin:/home/max/.rvm/gems/ruby-2.0.0-p247@global/bin:/home/max/.rvm/rubies/ruby-2.0.0-p247/bin:/home/max/.rvm/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games      Anyone care to explain?... Because I'm stunned.


title: Existing file can not be found?

text: /usr/share/tipp10$ ll     insgesamt 9408     drwxr-xr-x   3 myname ssl-cert    4096 Feb 26 20:07 ./     drwxr-xr-x 288 root   root       12288 Feb 26 20:07 ../     -rwxrwxrwx   1 myname ssl-cert    9480 Okt  6  2010 error.wav*     drwxrwxrwx   4 myname ssl-cert    4096 Feb 26 20:07 help/     -rwxrwxrwx   1 myname ssl-cert   16368 Dez 30  2010 license_de.txt*     -rwxrwxrwx   1 myname ssl-cert   16291 Dez 30  2010 license_en.txt*     -rwxrwxrwx   1 myname ssl-cert    5928 Okt  6  2010 metronome.wav*     -rwxrwxrwx   1 myname ssl-cert 9537480 Mär 11  2011 tipp10*     -rwxrwxrwx   1 myname ssl-cert    1255 Nov  7  2008 tipp10.png*     -rwxrwxrwx   1 myname ssl-cert   13312 Dez 18  2010 tipp10v2.template*          /usr/share/tipp10$ pwd tipp10     /usr/share/tipp10          /usr/share/tipp10$ file tipp10     tipp10: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.4, not stripped          manuel@P5KC:/usr/share/tipp10$ ldd tipp10         \tdas Programm ist nicht dynamisch gelinkt   # (Program is not dynamic linked)          /usr/share/tipp10$ ./tipp10     bash: ./tipp10: File not found      Ubuntu 12.04 x64 What the heck is wrong here? **EDIT: --------------------- SOLUTION ---------------------** .. for those, who dont want to read the complete dup article. My OS is 64-bit. I though 32-bit apps would run on 64-bit machines. 32-bit apps can run on a 64-bit machine, but only if the requisite supporting libraries are installed. For running 32-bit programs, try installing the ia32-libs package.


title: How to change the prompt in Linux?

text: The default prompt will be               root@monu dev]#      Can we change the "root@monu" part and give it a desired name?


title: Is it possible to edit the '$' or '#' symbols for users?

text: What file needs to receive edits in order to make such adjustments?


title: How can I get TaxACT 2013 to run on Debian Wheezy amd64 with Wine 1.4?

text: What can I do to run TaxACT 2013 under Wine 1.4.1 on Debian Wheezy amd64? Running TaxACTenter link description here from a terminal gives this:               $ env WINEPREFIX="/home/bill/.wine" wine "C:\TaxACT\TAXA~SPJ\TaxACT13.exe"      fixme:ieframe:PersistStreamInit_InitNew (0x14f2a8)     fixme:ieframe:WebBrowser_put_RegisterAsDropTarget (0x14f2a8)->(0)     ...      Wine also produces a backtrace that starts               Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x0075a7d0).      I can provide more details, if it's helpful. I did install the i386 version of gnome-keyring-pkcs11.so manually to get this far. FWIW, the 2012 version fails, too, but the 2011 version seems to work. Does the fixme:ieframe:... suggest something obvious?


title: Kernel - Starting the application

text: I placed the uBoot loader and the kernel into the raw flash image. This does not contain any root file system. (I copied uBoot and kernel image using dd command to a flash image). Now i have to change my kernel as to start my application at a particular address which was located in my flash image. How can I change the kernel to start my application on its own?


title: Manually setting environment variables for Metasploit

text: How do I set manually environment variables for Metasploit, when I execute `db_driver` I get this message:               [*] No Active Driver     [*]        Available:           [*]     DB Support: Enable the postgresql driver with the following command:     [*]                   * This requires libpq-dev and a build environment     [*]                 $ gem install postgres     [*]                 $ gem install pg # is an alternative that may work      After googling, I find that Metasploit set some environment variables, and with that can load the installed drivers, but to me it's looks like Metasploit does not set environment variables.


title: How are files laid out in ext2/ext3/ext4?

text: A few days ago all my metadata on a ext4 format flash card was overwritten. I am now going to speculate on how this happened. This is pure speculation. It happened just after I used a different card. The volume label on the card is now the same as the other card. So I suspect that I failed to sync/unmount the other card, when I pulled it. The card reader does not properly notify the system when a card is pulled so next system generated sync, the system did not know that I changed cards, and it overwrote the metadata. The first thing I did when this happened, is create an image using dd. The second thing I did was make the image read-only. The third thing I did is make a writeable copy of the image. I discovered photorec, which managed to recover some things, but not all. I think one of the reasons for this is that it is nondestructive. Since some of the recovered files are text, I suspect that photorec uses minimal information about the file format, if any. To try and recover any of the other files from the card, I would need to know how files are laid out in ext2. I suspect the basic is that files are broken into blocks, which are written into sectors and information on how to find the next sector is written somehow in the present sector. What I need top proceed is information on how the pointer to the next sector is written. PS: I am reading the photorec code, but am having some problems reading it. Whether it's me or whether the code is ugly, I don't know. PPS: I have found some information on how ext file systems are laid out, but can't seem to find basic file layout info.


title: Which is a better option for using OS on laptop: Linpus Linux or Linux?

text: I would like to know the difference between the two so I can install on my laptop from security point of view and as an overall performance.This is because I am being cyber bullied on internet.I have asked question on security and superuser regarding this.


title: Writing Linux Kernel module for non-MSDOS disk labels/partition tables

text: Linux supports a set of different disk label or partition table formats. For example, Sun Disk Labels and MS-DOS partition tables are both disk labels that contain (largely) the same information (partitioning) in different formats. Please note, I'm not referring to **filesystems** like ext{2,3,4} but **disklabels** like the msdos, GPT, Sun Disk Label, etc. I'd like to add support for a disk label format that's not currently in the kernel, but it looks like (from browsing `fs/partitions/`) that these are built into the kernel itself, and can't be compiled as modules. Is there any sort of kernel API I could use to add support for different disk labels? Will I have to resort to `losetup` instead?


title: Create xorg input device configuration file for only a specific device

text: I've noticed that there are a few problems with using the Apple Magic Trackpad by default on Ubuntu derivatives. I've found the solution lies in making a modification to `/etc/X11/xorg.conf.d/50-synaptic.conf` (or `/usr/share/X11/xorg.conf.d/50-synaptic.conf`, but that file recommends that you copy and edit it at the before-mentioned `/etc` path):               # Example xorg.conf.d snippet that assigns the touchpad driver     # to all touchpads. See xorg.conf.d(5) for more information on     # InputClass.     # DO NOT EDIT THIS FILE, your distribution will likely overwrite     # it when updating. Copy (and rename) this file into     # /etc/X11/xorg.conf.d first.     # Additional options may be added in the form of     #   Option "OptionName" "value"     #     Section "InputClass"             Identifier "touchpad catchall"             Driver "synaptics"             MatchIsTouchpad "on"     # This option is recommend on all Linux systems using evdev, but cannot be     # enabled by default. See the following link for details:     # http://who-t.blogspot.com/2010/11/how-to-ignore-configuration-errors.html           MatchDevicePath "/dev/input/event*"           # Fix for trackpad sensitivity.            Option "VertResolution" "75"           Option "HorizResolution" "75"     EndSection          Section "InputClass"             Identifier "touchpad ignore duplicates"             MatchIsTouchpad "on"             MatchOS "Linux"             MatchDevicePath "/dev/input/mouse*"             Option "Ignore" "on"     EndSection      The two trackpad resolution options above are the important ones. What I'd like to do is create a customized configuration file which _only_ targets Apple Magic Trackpads and submit it as a patch upstream to make life easier for people. How can I adjust my configuration file to be more specific and only target the Apple Magic Trackpad?


title: Creating Conky text variables with zero padding?

text: I've got a strange issue with my Conky setup: ![enter image description here](http://i.stack.imgur.com/AC8oX.png) What I'm looking to get rid of/fix is the fact that my CPU percentages (using `${cpu cpuX}`) won't seem to pad properly. I'd like all values to be aligned vertically so that statuses never wiggle. Here's excerpts from my conky file:               # ...     pad_percents 3     # ...     ${cpubar cpu1 6,135}$alignr${...}${cpu cpu1}%      How can I right align and pad CPU percentage values so they stop throwing off my layout? The equivalent printf would be `%3.0f` so that values will appear like this:               $ "%3.0f" % (1,)      '  1'     $ "%3.0f" % (13,)     ' 13'     $ "%3.0f" % (100,)     '100'      How can I make this happen in Conky for my CPU percentage?


title: Do I only need one swap partition for multiple Linux distros? (and other questions)

text: I have Linux Mint 14 installed as my only OS. I have one extended partition containing /swap, / and /home, and I have some unallocated space on my drive. I'm guessing that Mint decided to put this all on an extended partition instead of three primary partitions. So I want to build Linux From Scratch using some of my unallocated space. **My first question is, do I need to have a swap partition for each distro or can LFS use the swap partition I already have? If so, would the swap partition have to be a primary partition, or does it not matter?** **Is there any _practical difference_ between a primary and a logical partition?** A question about definition: **is an extended partition just a primary partition that contains logical partitions?** Finally, since deleting Windows 7 (sda 1-3), my Linux partitions are still numbered 5-7. If I create a new partition, will it be called sda1? Sorry for the question cluster but the sooner I learn this, the sooner I won't have to ask simple questions. :)


title: Adding a Column of values in a tab delimited file

text: How can I add a Column of values in a file which has a certain number of rows. I have a input file like this: Input file:               SPATA17 1   217947738     LYPLAL1 1   219383905     FAM47E  4   77192838     SHROOM3 4   77660162     SHROOM3 4   77660731     SHROOM3 4   77662248      Output file:               SPATA17 1   217947738 file1     LYPLAL1 1   219383905 file1     FAM47E  4   77192838  file1     SHROOM3 4   77660162  file1     SHROOM3 4   77660731  file1     SHROOM3 4   77662248  file1      In this case,I want to add a Column of values,upto the number of rows in the file.The value remains consistent,such as "file1". The reason is I have 100 of those files.I dont want to open each file and paste a column. Also is there any way to automate this,by going in a directory and adding a column of values. The value comes from the filename,which has to be added in each row of the file in the last/first column.


title: Output png as binary

text: Title says it all. I'm on a unix machine, can't figure it out. Sublime Text 2 opens the PNG as Hex and TextMate as ASCII. I need binary. How can I do it?


title: creating gif animations

text: I read some where it was possible to create a gif by adding frames to it in a browser. Does that mean on the server you can add frames to it by using cat? Are there other file types that are so simple to work with? What would be something good to do to better understand file headers that is very simple and would help explore sending data over an arduino ( which is of course a seperate issue! ).


title: How to access a KVM virtual-machine?

text: I've created a KVM VM using `virt-install`. There is an image file in the directory `/ssd/kvms`. How do I access the virtual machine and turn it on? Do I need to assign an IP address, and if so, how do I do that?


title: "who am i" after "su" not showing new user id?

text: Why is it that when I switch user 'su username' and then execute 'who am i' is outputs the previous user which I was logged as and not the one I've switched to?


title: ext4: How to account for the filesystem space?

text: I've recently formated a 1.5 TB drive with the intention of replacing ntfs with ext4. Then I noticed that the files I saved don't fit on the new partition.               df:          ext4 (ext3 & ext2 show the same behavior)     Filesystem      1K-blocks   Used  Available Use% Mounted on     /dev/sdb1      1442146364   71160 1442075204    1% /media/Seagate          ntfs (similar to all other options that gparted offers):     /dev/sdb1      1465137148  110700 1465026448    1% /media/Seagate      That 1K-blocks difference means a glaring 22 GiB less usable space. I have already executed               tune2fs -O \^has_journal     tune2fs -r 0     tune2fs -m 0      with, unsurprisingly, no effect as that does not affect blocks that just aren't there. Still, fdisk reports that the ext4 partition covers the entire disk.               fdisk -l /dev/sdb:          WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.          Disk /dev/sdb: 1500.3 GB, 1500301910016 bytes     255 heads, 63 sectors/track, 182401 cylinders, total 2930277168 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x00000000        Device Boot      Start         End      Blocks   Id  System     /dev/sdb1               1  2930277167  1465138583+  ee  GPT      And thus e. g. resize2fs reports that there's "Nothing to do!"               dumpe2fs -h /dev/sdb1:     dumpe2fs 1.41.14 (22-Dec-2010)     Filesystem volume name:   <none>     Last mounted on:          <not available>     Filesystem UUID:          d6fc8971-89bd-4c03-a7cd-abdb945d2173     Filesystem magic number:  0xEF53     Filesystem revision #:    1 (dynamic)     Filesystem features:      ext_attr resize_inode dir_index filetype extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize     Filesystem flags:         signed_directory_hash      Default mount options:    (none)     Filesystem state:         clean     Errors behavior:          Continue     Filesystem OS type:       Linux     Inode count:              91578368     Block count:              366284288     Reserved block count:     0     Free blocks:              360518801     Free inodes:              91578357     First block:              0     Block size:               4096     Fragment size:            4096     Reserved GDT blocks:      936     Blocks per group:         32768     Fragments per group:      32768     Inodes per group:         8192     Inode blocks per group:   512     Flex block group size:    16     Filesystem created:       Sat May 21 17:12:04 2011     Last mount time:          Sat May 21 17:15:30 2011     Last write time:          Sat May 21 17:24:32 2011     Mount count:              1     Maximum mount count:      32     Last checked:             Sat May 21 17:12:04 2011     Check interval:           15552000 (6 months)     Next check after:         Thu Nov 17 16:12:04 2011     Lifetime writes:          1372 MB     Reserved blocks uid:      0 (user root)     Reserved blocks gid:      0 (group root)     First inode:              11     Inode size:           256     Required extra isize:     28     Desired extra isize:      28     Default directory hash:   half_md4     Directory Hash Seed:      c334e6ef-b060-45d2-b65d-4ac94167cb09     Journal backup:           inode blocks      What is using that missing space?


title: Why is (free_space + used_space) != total_size in df?

text: > **Possible Duplicate:**   >  ext4: How to account for the filesystem space? I have a ~2TB ext4 USB external disk which is about half full:               $ df      Filesystem           1K-blocks      Used Available Use% Mounted on     /dev/sdc             1922860848 927384456 897800668  51% /media/big      I'm wondering why the total size (1922860848) isn't the same as Used+Available (1825185124)? From this answer I see that 5% of the disk might be reserved for root, but that would still only take the total used to 1921328166, which is still off. Is it related to some other filesystem overhead? In case it's relevant, `lsof -n | grep deleted` shows no deleted files on this disk, and there are no other filesystems mounted inside this one. Edit: As requested, here's the output of `tune2fs -l /dev/sdc`               tune2fs 1.41.14 (22-Dec-2010)     Filesystem volume name:   big     Last mounted on:          /media/big     Filesystem UUID:          5d9b9f5d-dae7-4221-9096-cbe7dd78924d     Filesystem magic number:  0xEF53     Filesystem revision #:    1 (dynamic)     Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize     Filesystem flags:         signed_directory_hash      Default mount options:    (none)     Filesystem state:         clean     Errors behavior:          Continue     Filesystem OS type:       Linux     Inode count:              122101760     Block count:              488378624     Reserved block count:     24418931     Free blocks:              480665205     Free inodes:              122101749     First block:              0     Block size:               4096     Fragment size:            4096     Reserved GDT blocks:      907     Blocks per group:         32768     Fragments per group:      32768     Inodes per group:         8192     Inode blocks per group:   512     Flex block group size:    16     Filesystem created:       Wed Nov 23 14:13:57 2011     Last mount time:          Wed Nov 23 14:14:24 2011     Last write time:          Wed Nov 23 14:14:24 2011     Mount count:              2     Maximum mount count:      20     Last checked:             Wed Nov 23 14:13:57 2011     Check interval:           15552000 (6 months)     Next check after:         Mon May 21 13:13:57 2012     Lifetime writes:          144 MB     Reserved blocks uid:      0 (user root)     Reserved blocks gid:      0 (group root)     First inode:              11     Inode size:           256     Required extra isize:     28     Desired extra isize:      28     Journal inode:            8     Default directory hash:   half_md4     Directory Hash Seed:      68e954e4-59b1-4f59-9434-6c636402c3db     Journal backup:           inode blocks


title: Is there something wrong with df output?

text: I'm using the command `df -h` to check disk usage on CentOS 6.4. I see an inconsistency with the output. ![df -h](http://i.stack.imgur.com/ft4pN.jpg) look at the line Filesystem: total 490Gb, used 55Gb, and Available 411Gb. What is it mean? I think that 490 - 55 = 435 ?


title: 129 MB used space shown in the SD card even after formatting it with mkfs.ext4

text: > **Possible Duplicate:**   >  ext4: How to account for the filesystem space? The full 2 GB space doesn't get shown as free space even after fully formatting it with **mkfs.ext4**. Are these some system files which have occupied the space of 129 MB?


title: make install - how to use wget, not curl

text: I do not have root access on my Ubuntu but want to install `git`. I was following this tutorial but when running `make` or `make install` it says `curl` is not installed. **Can I use`wget` instead if this is a `make` config setting?**


title: remotely query text file associated with an instance of vi

text: I have opened several text files (`a.txt`, `b.txt`, `c.txt`, ...) in different sessions of `vi` launched from different instances of a `bash` shell. Having then accessed that machine remotely, I wish to determine which session of `vi` is associated with a particular text file (e.g., `a.txt`) and specifically close that session, preferably while saving the current contents of the buffer (as opposed to executing a process `kill`). How can these actions be performed?


title: Is dash or some other shell "faster" than bash?

text: I always thought that the only benefit of using dash instead of bash was that dash was smaller, and therefore many instances of dash would start faster at boot time. But I have done some research, and found some people migrating all their scripts to dash in the hope they would run faster, and I also found this in the article DashAsBinSh in the Ubuntu Wiki: > The major reason to switch the default shell was _efficiency_. bash is an > excellent full-featured shell appropriate for interactive use; indeed, it is > still the default login shell. However, it is rather large and _slow to > start up **and operate**_ by comparison with dash. Nowadays I've been using lots of bash scripts for many things on my system, and my problem is that I have a particular script that I'm running continuously 24/7, that spawns around 200 children, which together heat my computer 10°C more than in normal usage. It is a rather large script with lots of bashisms, so porting them to POSIX or some other shell would be very time consuming (and POSIX doesn't really matter for personal use), but it would be worth if I could reduce some of this CPU usage. I know there are also other things to consider, like calling an external binary like `sed` for a simple bashism like `${foo/bar}`, or `grep` instead of `=~`. **TL;DR** is really bash slower to start up **and operate** in comparison with dash? Are there other Unix shells which are more _efficient_ than bash?


title: How to install master branch of freeradius on Centos

text: Could someone take me through the steps to install the master branch of freeradius on a fresh Centos 6 installation?


title: How to set domain name in Crunchbang GNU/Linux?

text: How can I set the domain name in GNU/Linux?, I am using Crunchbang and I need to set the domain name for my LAN network. EDIT: Let me talk more about my problem: I need to configure a LAN network for three or four PCs with GNU/Linux(college project):               PC1: acting as server  -- hostname = "server"     -- GNU/Linux Debian Squeeze     PC2: client 1          -- hostname = "crunchbang" -- GNU/Linux Crunchbang     PC3: client 2          -- hostname = "acer"       -- GNU/Linux Debian Squeeze      Crunchbang is based on debian then "I think" there is no much difference. I am guiding me with this document and there says that the domain name for all hosts in the network must be the same. The OS in PC1 and PC3 are fresh installations, Crunchbang is the OS what my friend have in his laptop. When I installed debian in PC1 and PC3 I set the domain name and the host name but now only the last is present.


title: Why do some packages use 'make install' while other use 'sudo make install'

text: I recently installed LAME encoder on my server to convert wav to mp3 and that worked with './configure, make, make install; I then tried to install OGG encoder and that requires './configure, make, **sudo** make install' - which I cannot do, since I dont have a VPS (and I'd rather not pay $15 a month for a VPN just to install a codec). I'm new to all this, and I understand sudo gives you permissions - but I have been trying to find out _why_ exactly some 'make installs' require sudo access and others dont. I haven't yet found the answer. Again, very knew to this so i'm just trying to learn whats going on.


title: Filesystem writes seemingly lost

text: I've been experimenting with tcpdump, and I've found some very bizarre filesystem behavior. It doesn't look to be a tcpdump problem as I'll explain in a second. The following command produces no file:               tcpdump -w test.pcap      Yet this command produces the PCAP file as expected:               tcpdump -w - > test.pcap      At first I figured that tcpdump must be encountering some error when writing the file that the shell wasn't, so I straced and found that the writes were occurring just fine!               open("test.pcap", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 4      fstat(4, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0      mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff9bf5cb000     rt_sigaction(SIGUSR1, {0x4557d0, [], SA_RESTORER, 0x7ff9bea2ab60}, {SIG_DFL, [], 0}, 8) = 0      write(2, "tcpdump: ", 9tcpdump: )                = 9      write(2, "listening on eth0, link-type EN1"..., 73listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes) = 73     poll([{fd=3, events=POLLIN}], 1, 1000)  = 1 ([{fd=3, revents=POLLIN}])     poll([{fd=3, events=POLLIN}], 1, 1000)  = 1 ([{fd=3, revents=POLLIN}])     poll([{fd=3, events=POLLIN}], 1, 1000)  = 1 ([{fd=3, revents=POLLIN}])     write(4, "\324\303\262\241\2\0\4\0\0\0\0\0\0\0\0\0\377\377\0\0\1\0\0\0001\2\210P\34\3\3\0"..., 4096) = 4096     poll([{fd=3, events=POLLIN}], 1, 1000)  = 1 ([{fd=3, revents=POLLIN}])     poll([{fd=3, events=POLLIN}], 1, 1000)  = 1 ([{fd=3, revents=POLLIN}])     write(4, "\232\241\4\17X\213\f9+\225\35\t\364QF\223\242\7\217Y\226\373l\231vQ\354\223\250i\336."..., 4096) = 4096     poll([{fd=3, events=POLLIN}], 1, 1000)  = 1 ([{fd=3, revents=POLLIN}])     poll([{fd=3, events=POLLIN}], 1, 1000)  = 1 ([{fd=3, revents=POLLIN}])     write(4, "\34\226\346%\354\210\342\331\377\373\222d\261\0\5\207wX\6i`\0U\260\350\260\300\250\0\16\335\241"..., 4096) = 4096      test.pcap gets opened as file descriptor 4, and then several writes occur to that descriptor with the syscall reporting that the requested number of bytes was in fact written. Even so, no file is created. I scoured the filesystem for test.pcap and found nothing. What could produce this behavior?               tcpdump version 4.3.0     libpcap version 1.3.0     GNU bash, version 4.2.37(1)-release (x86_64-pc-linux-gnu)     Linux persephone 3.4.9-gentoo #1 SMP Wed Oct 3 10:02:39 EDT 2012 x86_64 Intel(R) Xeon(R) CPU E5645 @ 2.40GHz GenuineIntel GNU/Linux


title: TPS Based Shell Script

text: I am writing a shell script to test my soap web service's load handling. But I am not sure how to simulate the TPS value. Can you help me to find a way to handle that ?


title: How can I create a direct 8khz audio pipe in Ubuntu?

text: I'm interested in creating musical programs like these: http://www.youtube.com/watch?v=GtQdIYUtAHg&feature=player_embedded Essentially these programs just generate sequences of integers, which (apparently), when fed directly into a 8khz audio stream (like "/dev/audio"), produce interesting music. My problem is that my system does not have /dev/audio. In fact, looking through my /dev, it's unclear to me whether any of the devices is a direct audio interface. I have two questions:   1. Is there a nice package which will let me pipe in a stream of numbers from the command line, and produce a matching 8Khz audio output?   2. If not, how might I go about directly accessing my audio device?


title: How can I track executables created by my user on Linux?

text: Using Linux, I would like to track the executables that are executed in my name, including the whole command line (in practice, every exec*() done as my own user). A program I do not control is supposed, in order to handle a task, to execute the program I pass in, but I want make sure it does so, and what options it uses. The program I don't control is sneaky, and seems to change behavior depending on the name of the program it is supposed to execute for the task, so I can't pass in a shell script that would log the info and invoke the real program. Is it possible for me to be informed of all exec*()s done as my user on the system on Linux, including full command line? Short of running `ps` in a loop, that is. I'd rather do it directly on the system on which I work and not require root access, but if need be I can spawn a system on which I have root access, install the programs and investigate there. Using Ubuntu 12.4 LTS.


title: Finding the logs in a hacked server.

text: My server has been hacked and the hacker managed to ssh as root (I know, horrible mistake on my part). What files should I be looking for to discover the origin of the attack? (At least their IP). The server is really old, it's running Red Hat 9. There wasn't anything important in it, though.


title: How can I create a local function in my bashrc?

text: My .bashrc had some code that was repetitive so I used a function to simplify it               do_stuff() {       local version=$1       export FOO_${version}_X="17"       export FOO_${version}_Y="42"     }          do_stuff '5.1'     do_stuff '5.2'      However, now when I use my shell the "do_stuff" name is in scope so I can tab- complete and run that function (potentially messing up my environment variables). Is there a way to make "do_stuff" visible only inside the .bashrc?


title: Is data=journal safer for Ext4 as opposed to data=ordered?

text: The default journal mode for Ext4 is `data=ordered`, which, per the documentation, means that > "All data are forced directly out to the main file system prior to its > metadata being committed to the journal." However, there is also the `data=journal` option, which means that > "All data are committed into the journal prior to being written into the > main file system. Enabling this mode will disable delayed allocation and > O_DIRECT support." My understanding of this is that the `data=journal` mode will journal all data as well as metadata, which, on the face of it, appears to mean that this is the safest option in terms of data integrity and reliability, though maybe not so much for performance. Should I go with this option if reliability is of the utmost concern, but performance much less so? Are there any caveats to using this option? For background, the system in question is on a UPS and write caching is disabled on the drives.


title: NVidia drivers on Macbook Pro (2008) Linux Mint?

text: Ok. I am literally installing it from scratch and tracking my process here and now. I've been fighting this for so long. Macbook Pro, 2008 I believe. ~200GB HD. I'm not dual booting. Mint and only Mint. Linux Mint 17 Cinnamon x64 w/ Codecs. In order to boot from USB, I have to edit boot options to include `nomodeset`. I get live desktop up and running. Looks normal. Double click "Install Linux Mint" > "Erase disk and install Linux Mint" (no encryption, no LVM) > "Require Password to Login" (yes Encrypt home folder). Installer finishes without problem. I don't reboot yet. Still on the Live Desktop from the USB, since the laptop uses EFI, I know I need to install efibootmgr. `sudo apt-get install efibootmgr`. Success. Running `sudo efibootmgr` prints out               BootCurrent: 0000     BootOrder: 0000,0000,0000,0000,0000,0000,0000,0000,0000     Boot0000* ubuntu     BootFFFF*      `sudo poweroff`, pull out USB, boot holding F6 to get efibootmgr's boot menu. I haven't touched nvidia drivers yet, so I still need to add `nomodeset` to the boot script. Not setting `nomodeset` will get me to a black screen and nothing ever happens. Booting from the HD and the display is off a little. The Mint splash icon is off center, there's a 1/4 to 1/2 inch gap at the top of the screen where the mouse can't go and nothing is drawn (it's solid black) and the screen generally thinks that it is bigger than it really is. After signing in, the task bar is off the bottom of the screen and there's a couple inches of missing screen off the right hand side as well. Everything else seems to function fine, no discoloration. Need an internet connection. I guess my way to the menu button and click on System Settings > Device Drivers. I insert my USB drive that I previously booted from. I go down to broadcom and click `bcmwl-kernel-source` then Apply Changes. Remove USB. Shutdown, and start back up holding F6 (still need `nomodeset`). Screen is still oversized and off center. I connect to my home network and successfully `ping 8.8.8.8`. On a different computer, I pull up this forum post and run:               sudo add-apt-repository -y ppa:ubuntu-x-swat/x-updates && sudo apt-get -y update && sudo apt-get -y install nvidia-current nvidia-settings      It finishes successfully. During previous trials, I found that I need an `xorg.conf` for xserver to start. So I run `sudo nvidia-xconfig` and then `sudo reboot` hoping it works. No F6 this time. I shouldn't have to. Now here's the problem I can't fix. After the linux splash, I get the blue background old school dialog saying "Failed to start the X server." The short version of the log is               NVIDIA: could not open the device file /dev/nvidia0 (Input/output error)     no screens found      I can login to a tty console after getting through the blue dialog and I pushed the long version of the log to my other computer's ftp. Maybe it can shed some light. Oh, and /dev/nvidia0 does exist. I have tried setting the `BusID` to `PCI:1:0:0` in xorg.conf as some people have claimed that fixed it for them, but not for me. Running `lspci | grep VGA` lists that my graphics card is `NVIDIA Corporation G84M [GeForce 8600M] (rev a1)`. I've tried running without an xorg.conf, I still get the same error. Running 'sudo startx' is no different. I'm officially out of ideas. If I didn't mention anything above, then I left it at it's default value. I've spent dozens of hours and learned a lot as I've gone, but I'm at my wit's end. Any clue what to try next? EDIT: Here's my xorg.conf generated by `sudo nvidia-xconfig` when I have `nvidia-331` drivers installed.


title: How do I drop root privileges in shell scripts?

text: The "--up" option in OpenVPN is normally used for routing etc. And so it is processed before OpenVPN drops root privileges to run as nobody. However, I am invoking shell scripts that need to run as an unprivileged user. How do I do that? I have studied Drop Process Privileges, especially polynomial's and tylerl's answers, but I do not understand how to implement. I am working in Centos 6.5, and suid is blocked, both as "chmod u+s" and as "setuid()". There is an OpenVPN plugin ("openvpn-down-root.so") which enables scripts invoked by the "--down" option to run as root. There could be an equivalent, such as "openvpn-up-user.so", but I have not found it. **Edit0** Per Nikola Kotur's answer, I've installed Ian Meyer's runit-rpm. Although the chpst command works in terminal, in the up script it fails with "command not found". What works is "sudo chpst" plus setting the proper display and language. Please see Why doesn't my terminal output unicode characters properly? Given that, the up script needs these four lines:               LANG="en_US.UTF-8"; export LANG     GDM_LANG="en_US.UTF-8"; export GDM_LANG     DISPLAY=:0; export DISPLAY     sudo chpst -u user -U user /home/user/unprivileged.sh &      **Edit1** Per 0xC0000022L's comment, I find that "sudo -u user" works as well as "sudo chpst -u user -U user":               LANG="en_US.UTF-8"; export LANG     GDM_LANG="en_US.UTF-8"; export GDM_LANG     DISPLAY=:0; export DISPLAY     sudo -u user /home/user/unprivileged.sh &      I'll study man sudoers and update if/when I get sudo alone to work.


title: How to enclose a quoted variable in quotes

text: I want to call: `./mjpg_streamer -i "./input_uvc.so -r 320x240" -o "./output_http.so -w ./www"` from a C program, running `system()`. The problem is that I have to enclose shell command in quotes, which arleady exist. How can I fix this?


title: A command that generates both standard error and output

text: I want to do some troubleshooting on my bash script. Is there a short and simple command that generates both `stdout` and `stderr` so that I can use `2>&1` on it? Sorry if this looks trivial, but I just can't think of one at the moment.


title: How are parenthesis interpreted at the command line?

text: While reading up on how to set up `grub`, one article mentioned that I need to use a syntax like               echo \(hd0,0\) >> /boot/grub/grub.conf      or               echo '(hd0,0)' >> /boot/grub/grub.conf      because at the command line parenthesis have a special way of being interpreted. What is special about the parenthesis? How are they interpreted?


title: How do I downgrade my nVidia Driver in openSUSE 12.1?

text: I'm trying to trouble-shoot a problem that I've been having. Downgrading my nVidia driver is about the only thing I haven't tried. I have an nVidea GeForce 6200 and installed the latest driver version 290.10, but Í'd like to try an earlier version. When I search for my driver on the nVidia website, it always brings me to the download page for the latest version. How can I find an _older_ version to install? Here's some potentially relevant information: **OS Information**               OS:                 Linux 3.1.0-1.2-default i686     System:             openSUSE 12.1 (i586)     KDE:                4.7.2 (4.7.2) "release 5"      **Display Info**               Vendor:             nVidia Corporation     Model:              GeForce 6200 (0x0221)     2D driver:          nvidia     3D driver:          NVIDIA 290.10      Please let me know if you need anything else.


title: AddDefaultCharset ISO-8859-1 not work

text: I have upgrade Apache from 2.2 to 2.4 and I am having problems with character encoding. In my pages I have `è=Ã¨` `ò=Ã²` `ì=Ã¬` etc... In my `httpd.conf` I have commented the default value and added `ISO-8859-1` (Western Europe)               #AddDefaultCharset UTF-8     AddDefaultCharset ISO-8859-1      But this didn't change anything.


title: Forced reread of partition table: difference between BLKRRPART and BLKPG ioctl? (Linux)

text: When I want Linux to consider newly created partitions without rebooting, I have several tools available to force a refresh of the kernel "partition cache":   * `partx -va /dev/sdX`   * `kpartx -va /dev/sdX`   * `hdparm -z /dev/sdX`   * `sfdisk -R /dev/sdX`   * ... I'm not sure about the difference between these techniques, but I think they don't use the same `ioctl`, like `BLKRRPART` or `BLKPG`. So, **what is the difference between those`ioctl`?**


title: stream edit >GDRLR5L04EQY8D 3931|1166 into >3931

text: I have large text DNA sequence files with the following format               >name      AACTGGGCT      I need to parse the name line which currently has extra information and special characters, while keeping any line that doesn't start with > unaltered have (that is a tab not a space between "D 3"):               >GDRLR5L04EQY8D 3931|1166     GACAAACGCTGGCGGGTGCATGAG      want:               >3931     GACAAACGCTGGCGGGTGCATGAG      I've tried `sed 's/\>*[[:blank:]]/>/g'` to get rid of the first part but that's not working. Would `gawk` work to get rid of the pipe and number after it?


title: Installation of RHEL and softwares on multiple machines

text: In our organization, we have 15 new systems of same hardware. I need to setup all the machines with RHEL 6.0 in it, multiple software's, and lot of basic configuration. I don't have any problem in installing it one-by- one but it obviously takes very much time. Is there any method/technology/script to replicate this to other machines? (I know only kickstart, but that is used only for installation of RHEL).


title: Remove duplicate fields in a given column

text: I'd like to remove from a given column ($2 in the example) the duplicate fields (comma separated). Input file:               A    1,2,3,4        B    4,5,6,3     C    2,15      Expected output:               A    1,2,3,4     B    5,6     C    15


title: A user in a group does not have group access?

text: I have a fresh install of ubuntu server 12.10. I have created a group called `www-dev` and a user called dab. the user is in the group and i can verify that by `members www-dev` which returns `dab`. I created a folder called `/etc/test` and that folder has permissions: `drwxrwsr-x root www-dev` if i type `who` i get `dab` if i go into the folder and type `echo 'test' > test` i get access denied! I'm sure it's something simple, but i can't figure out why? thanks in advance!


title: Dual screen for plymouth with NVIDIA drivers

text: If I set plymouth to work with drivers the NVIDIA splash screen only appears on one monitor. While if I set it up with the nouveau driver appears on both monitors. Does anyone know how to configure plymouth with drivers NVIDIA to splash screen look at the two monitors?


title: Haskell, C++, AWK, Bash, Lisp ... Which one is faster?

text: I was wondering, which of these programming languages are faster at handling big data files of only **strings** :               Haskell, C++(Boost), AWK, Bash, Lisp...       So far I have found the paper Haskell vs. Ada vs. C++ vs. Awk vs. .... However, this paper is a little out of date.


title: Software power off of externally-powered USB drive enclosure

text: Is it possible to power off a USB enclosure? Is there a utility or command for communicating with the enclosure? Is this functionality dependent on the enclosure or the drive? My specific enclosure appears as `174c:55aa ASMedia Technology Inc. ASMedia 2105 SATA bridge` and the drive is a Seagate Barracuda ST500DM002.


title: Check if a folder has a certain type of file present

text: How could I check if a file has a file of extension .java? So far I have:                 for javaFile in *.java ; do         {             echo "The file $javaFile has : " >> ~/Desktop/externalServers.txt             grep -E '^[^/]{2}.*http' $javaFile >> ~/Desktop/externalServers.txt                       grep -E '^[^/]{2}.*ftp' $javaFile  >> ~/Desktop/externalServers.txt                  echo "----------------------------------------" >> ~/Desktop/externalServers.txt             sed -e "s/[[:space:]]\+/ /g" ~/Desktop/externalServers.txt >> ~/Desktop/externalServersTemp.txt             rm ~/Desktop/externalServers.txt             mv ~/Desktop/externalServersTemp.txt ~/Desktop/externalServers.txt             sed 's/^\n//' ~/Desktop/externalServers.txt >> ~/Desktop/externalServersTemp.txt             rm ~/Desktop/externalServers.txt             mv ~/Desktop/externalServersTemp.txt ~/Desktop/externalServers.txt              } done      But every time I do that, I get the error: > grep: *.java: No such file or directory Basically I want to first see if the folder has any files of type .java and only continue with the script.


title: Icecat install fails with `GLIBC_2.14' and `GLIBC_2.17' not found

text: I am using gNewSense, but a lot of stuff should be working the same as in Debian. I followed the instructions: http://zachwick.com/posts/how_to_install_gnu_icecat_on_debian_wheezy.html The first time I installed it, I could use the `icecat` command, but I had another Firefox installation which seemed to interfere. I removed the other Firefox installation and the former Icecat install and tried to install Icecat again. Now I cannot even execute `icecat`:               bash: icecat: command not found      `which icecat` also shows nothing, even though the directory exists.               ls -a /usr/local/bin     .  ..  icecat  icecat-24.0      When I try to execute the file inside the icecat-24.0 or the icecat directory I get:               /usr/local/bin/icecat/icecat: /lib/libc.so.6: version `GLIBC_2.14' not found (required by /usr/local/bin/icecat/icecat)     /usr/local/bin/icecat/icecat: /lib/libc.so.6: version `GLIBC_2.17' not found (required by /usr/local/bin/icecat/icecat)


title: Use different username by default for a specific host

text: I have a different (assigned, non-changable) username on one of the servers I log to regularly, and I would like to avoid writing it down every time. Can I make these lines               [tohecz@localhost ~]$ ssh myserver.cz     [tohecz@localhost ~]$ ssh anotherserver.cz      behave as the following?               [tohecz@localhost ~]$ ssh tohecz@myserver.cz     [tohecz@localhost ~]$ ssh anotheruser@anotherserver.cz


title: Why are multiple command-line terminal consoles available/running at the same time on RHEL systems?

text: I'm studying for the RHCSA and am trying to wrap my mind around a seemingly basic concept: terminal consoles. I don't understand how/why RHEL systems make 6 terminal consoles (`/dev/tty _N_`) available for use. If I'm managing a server (or workstation for that matter), under what circumstances would I want to hop between terminals (e.g. `Ctrl`+`Alt`+`F2`)? Wouldn't I just be connected to one terminal and work from there?


title: How can I kill gnome shell widgets?

text: I have some gnome shell widgets that I need to be closed. I am unable to find which processes are behind them. Any idea how can I kill them?


title: Count number of processes with ps -Af

text: I have to count the number of emacs processes on the machine I'm remote using, by using the command ps -Af. Where do I even start?


title: Searching out a pattern from Logs

text: The format of the logs is in this manner:               Junk Junk Junk : Junk Junk Junk:IP/Port Junk Junk      I want to search using the `IP` and the output should be only the `IP/Port` part of each line in that log file. I tried out all possible combinations with `grep`, `cut` and `awk` and all that `bash` I know :D so is it possible? Or will I have to go on with some log parsing tools? **Edit:** Please note that the format is not exactly the same, the position of `Junk:IP/Port` may change such that its not possible using `awk '{print $7}'` **Update:** Adding a sample log               DATE NAME-FIREWALL : %RULE-NUM: Teardown TCP connection PKT-NUM for LAN1:X.X.X.X/XX to LAN2:X.X.X.X/XX duration 0:0:0 bytes XXXX TCP FINs     DATE NAME-FIREWALL : %RULE-NUM: Built inbound TCP connection PKT-NUM for LAN1:X.X.X.X/XX (X.X.X.X/XX) to LAN2:X.X.X.X/XX (X.X.X.X/XX)      And I need to search and get the IP/Port part alongside LAN2.


title: Sum up the selected fields

text: I have a file with a numeric value in character positions 86 to 99. I want to sum up the entire amount present in the file, only for lines which contain `RS` at position 124-125. I am trying to do like `amt=$(cat custbills.cmp| cut -c124-125|grep 'RS'|cut -c86-99|awk '{s+=$1 } END {print s }')` and when i do `echo $amt` it is showing Zero. what is wrong in this. Fields in the file from 86 to 111 like `0000000016.65201406051101` In this `16.65` is amount. I have 300 records in this file. Sample data from 1 to 136 fields: `reportname 123456-78956 customername 0000000016.65201406051101 10RS 000000`


title: Moving linux install to a new computer

text: I know that it can, in some circumstances, be difficult to move a Windows installation from one computer to another (physically move the hard drive), but how does that work on linux? Aren't most of the driver modules loaded at bootup? So theoretically would it be that much of a hassle? Obviously xorg configs would change and proprietary ATI drivers and such would have to be recompiled (maybe?). Is there more to it than I'm thinking of? Assume the 2 computers are from the same era, ie both i7s but slightly different hardware. Update:   Thanks for the answers. This is mostly for my own curiosity. I have my linux system up and running at work, but eventually I'd like to move to a computer that I can get dual video cards into so I can run more than 2 monitors. But not any time soon


title: Getting new server. How do I move everything over?

text: > **Possible Duplicate:**   >  Moving linux install to a new computer A buddy of mine has found me a new server for our role-playing forums we run and my other web sites. I finally have my current server stable and running good though it is a bit slow (AMD 2400+ 2 GB RAM). I am running Ubuntu 11.4 (maybe?). I don't know what I am getting yet or if there are hard drives in the system. If there are no hard drives, can I just put my hard drive from the existing computer into the new one? If there is a hard drive (or RAID), what would be the best approach to migrate the server to the new one? I am running LAMP with WordPress, phpBB and couple other small web applications. I also have SVN running. That is basically it. I keep all software up-to-date.


title: Copying a working Linux instead of installing a new one

text: It is possible to move an installed Linux from one drive to another or from one disk to another by two methods:   1. `dd` command which copies sector by sector including boot sector   2. `cp` command, and then installing/updating `grub` These are very handy and easy methods, but I have no seen any instruction for using these methods for installing a new Linux on a new machine. Is there any disadvantage for this? For example, we can boot from a Live CD, and copy the files of a minimal installed Linux (without grub); then installing grub through `chroot`. In other words, we can have a minimal linux on a USB drive, and install it on any machine (by boot from it, copy itself, chroot, etc). The only things that should be altered (to my knowledge) is `grub` and `fstab` from on machine to another. Is there any disadvantage or drawback? NOTE: I know that Live CD installers somehow do a similar task, but I am curious if simple copying can cause problem on a new machine?


title: How do I make "at"-tasks repeat at a specific time?

text: I want to schedule a script to run every Monday at 9am. How can I do this? I can only find examples for given days, not repeating things with `at`. Cron is not a solution.


title: Ubuntu displays Shutdown window then turns off system

text: Some weeks ago, I've downloaded `unetbootin` both Windows and Linux versions to make a startup Ubuntu USB. I was going to use it to rescue my damaged Ubuntu partition. Tried the Linux version but didn't work 'cause some software was missing. Then I used the Windows version. Since, my computer has been faulty. Shutting down in the middle of a session whether I'm in Windows or Linux (Hard Drive or Live USB). Then keeps turning on/off the system until I remove power. I read somewhere a warning NOT to hit the Reboot button to close `unetbootin`. Which I might have. That might be what started the whole trouble. Some space (around 100MB) was used on my Windows partition, certainly to corrupt my system. Also on the Live USB I've made there were some files like !!MS1826. NRI (about 1GB big) which had nothing to do with the Ubuntu ISO. I cleaned the USB, made a fresh Live. After going through some forum threads, I fixed the Windows partition. But I still wasn't sure the problem (a virus?) was gone. I plugged in the hard drive back. And run Windows for about 6 hrs, nothing wrong, no shutdown. Then next day as I was browsing Live (with the hard drive in), that Shutdown window showed up again. And I was thinking 'Damn,this thing is back again'. If I'm not mistaken, I've got the `unetbootin` from their homepage on SourceForge. Is it that the software packages on that page are corrupted or is a virus using that page as a link to infect computers? I saved many logs about the issue. I've attached to this post the `syslog` file. If you want more,just ask and I'll post it. To get the system going again I had to remove everything NO hard disk, no ram, no cmos battery. After some time, I put the ram back then many trials ensue and at last the system is back. No more power On/Off, no more shutting down. And I'm not using the hard disk for now. Until I find the cure to this issue. With nothing else on board then Ram and/without my Live USB,the power On/power Off fault still occurs. So I think my Bios may be infected by that 'virus'. In which case, I'll have to flash it. Regarding the hard drive, I'm in the dark. My system is a DELL Inspiron E1405, 4GB Ram, 80GB hdd. Now I hope someone will explain what this is all about. And that I will get enough help to repair the system. Thanks in advance for all answers,   Etonam.


title: How to hide an OpenBSD 5.3 server as it would be a windows server or something else?

text: There is an OpenBSD 5.3 server. It only listens on port 443 with an apache (on higher port an sshd listens, but port knocking is used). How can I hide the servers operating system/webserver to be recognized as something else thatn OpenBSD. ex.: some Linux distribution, etc.


title: Measure time to get DHCP address?

text: Is there any tool or way to measure how much time your DHCP router needs to give you IP address? I'm sure that there is something, as it's pretty important when debugging network.


title: Installing Fedora on VMWare error: CPU disabled by guest operating system

text: When I try to install Fedora 16 on VMWare I'm getting the error CPU has been disabled by guest operating system. Any clues?


title: Change/Create permissions for a folder

text: How can I create (if the folder is new) or change (if the folder was already existent) permissions for a folder? In particular, I want to create a subdirectory in `/etc/bind/` where I can put the `named_dump.db` file, so I've to create the new directory with write permission for `bind` user and group.   First of all, is it right?   And if I want to change `/etc/bind/` permissions and save there `named_dump.db`?


title: Ubuntu - Install Options

text: I have three possibilities to installing and running Ubuntu as my main operating system. 1) Install onto an external SSD: Obviously, this would mean installing onto the External SSD and connecting through USB. I would have my main drive at start up select this driver, if not, it will select the Mac boot up (therefore, I don't have to completely remove OSX). I will also make nightly back-ups of my SSD to another external HD plugged into my main computer. 2) I completely remove OSX and install Ubuntu onto my main machine, use the external SSD to store all the files and libraries needed to carry out my programming duties. I prefer option one since I can take the external HD to work with me and just boot straight into there. I'm just asking for your opinions guys. P.S. Also, I'm running VMWARE at the moment. Can I therefore just use the .iso that I already have? I don't really want to completely re-install Ubuntu as on the VMWARE I have already installed a large number of libraries.


title: Getting sound working on Linux mint 13 Mate

text: I have just installed linux mint 13 and I haven't used linux before so I apologise upfront if this question seems basic. I am unable to hear any form of audio on file which I try to play in any "media playing" application but I am not sure why. When I log onto the system I get the start-up sound (before entering login details). I can hear audio from my speakers if I right click the speaker icon, select "Sound preferences" > Hardware > select my speakers from the device list and click test speakers. I am also able to hear audio on sites such as youtube. I have run this command               lspci -v | grep -A7 -i "audio"      and I got two results returned as follows:               00:1b.0 Audio device: Intel Corporation X79 series chipset High Definition Audio Controller (rev 05)     Subsystem: ASUSTeK Computer Inc. Device 84f8     Flags: bus master, fast devsel, latency 0, IRQ 112     Memory at fa720000 (64-bit, non-prefetchable) [size=16K]     Capabilities: <access denied>     Kernel driver in use: snd_hda_intel     Kernel modules: snd-hda-intel          --     02:00.1 Audio device: NVIDIA Corporation GF110 High Definition Audio Controller (rev a1)     Subsystem: Giga-byte Technology Device 3515     Flags: bus master, fast devsel, latency 0, IRQ 28     Memory at fa080000 (32-bit, non-prefetchable) [size=16K]     Capabilities: <access denied>     Kernel driver in use: snd_hda_intel     Kernel modules: snd-hda-intel      Which I _think_ means my sound card (which is integrated on a Rampage IV Extreme mobo) should be ok. What I think might be happening is that the applications such as VLC, Banshee, Totem movie player etc might be reading the default audio output device from a different place than the mint install itself is. I am basing this on the fact that when I first installed the system a week or so ago no sound would play and I had to go to Sound preferences > Output and select my speakers from the list as the default choice was "Built-in Audio Analogue Stereo", once I made this change system sounds would play but not any media files such as songs or movies. Therefore I reckon that maybe the applications are still trying to output audio through the "Built-in Audio Analogue Stereo" instead of my speakers. This is driving me a little bit insane now and any help would be greatly appreciated. My theory is just a theory (I have no previous experience using linux) so any ideas or suggestions are welcome. If any more information is needed, let me know and I can provide it.


title: To display the selected part in line of text file

text: I have the following in a text file:               0400903071220312  20120322 20:21     1TRANTELSTRAFLEXCAB22032012CMP201323930000812201108875802100A003485363          12122011AUS          182644             000C28122011        0000                     000      How can I pull just the `3071` out of the first line?


title: How to create a single page PDF file out of multiple EPS files with GhostScript

text: I'm trying to merge eps files into a pdf file using GS, however, I cannot get it to put multiple eps files without page breaks in between even if original files are small. The command I'm using is:               gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=out_file [list of eps files...]


title: Install Fedora 17 to iSCSI Target, Boot from iSCSI Target

text: I have installed Fedora 17 to an iSCSI target by:   1. Booting with the Fedora 17 ISO   2. Chose LiveCD so I could install iscsi-initiator-utils   3. Started the installer   4. Chose iSCSI target from native Fedora installer   5. Installed as normal Using iPXE (gpxe/etherboot fork) to boot with `sanboot iscsi:HOSTIP::::TARGET:LUN`, but Fedora bombs after about 10 seconds with the following errors:               Cannot open font file True          dracut Warning: Unable to process initqueue     dracut Warning: /dev/disk/by-uuid/{UUID} does not exist          Dropping to debug shell          dracut:/#      A Redhat fellow from this bugzilla suggested dracut-network (including the initramfs rebuild) and some kernel param voodoo, but I get the same errors.


title: Bash executes a different file from the one prompted, even when providing full path

text: I imagine there's a environment variable or some setting I'm unaware of, but this is driving me nuts.               baco:~ # ls -la /root/subversion-1.4.6/subversion/svnadmin/.libs/svnadmin            -rwxr-x---  1 root root 57263 Mar 10  2008 /root/subversion-1.4.6/subversion/svnadmin/.libs/svnadmin     baco:~ # ls -la /usr/local/subversion-1.6.1/subversion/svnadmin/.libs/svnadmin       -rwxr-xr-x  1 root root 76125 Apr 20  2009 /usr/local/subversion-1.6.1/subversion/svnadmin/.libs/svnadmin      I have two versions of svnadmin compiled there. If I execute one I get it               baco:~ # /usr/local/subversion-1.6.1/subversion/svnadmin/.libs/svnadmin --version     svnadmin, version 1.6.1 (r37116)        compiled Apr 20 2009, 16:09:36          Copyright (C) 2000-2009 CollabNet.     Subversion is open source software, see http://subversion.tigris.org/     This product includes software developed by CollabNet (http://www.Collab.Net/).          The following repository back-end (FS) modules are available:          * fs_base : Module for working with a Berkeley DB repository.     * fs_fs : Module for working with a plain file (FSFS) repository.      If I execute the other, with full path, I still get the earlier!               baco:~ # /root/subversion-1.4.6/subversion/svnadmin/.libs/svnadmin --version     svnadmin, version 1.6.1 (r37116)        compiled Apr 20 2009, 16:09:36          Copyright (C) 2000-2009 CollabNet.     Subversion is open source software, see http://subversion.tigris.org/     This product includes software developed by CollabNet (http://www.Collab.Net/).          The following repository back-end (FS) modules are available:          * fs_base : Module for working with a Berkeley DB repository.     * fs_fs : Module for working with a plain file (FSFS) repository.      If I run svnadmin without path information, I also get the 1.6.1 version (normal, due to $PATH). Via cron I can get the 1.4.6 executed, so this has to be something particular to interactive or login shells. EDIT: I know that cron is executing the 1.4.6 because I've run `/root/subversion-1.4.6/subversion/svnadmin/.libs/svnadmin --version` via cron and I get output from a 1.4.6 version (with the proper compilation date). If I run the 1.6.1 version with full path via cron I do get 1.6.1's output. Both are binary files:               baco:~ # file /root/subversion-1.4.6/subversion/svnadmin/.libs/svnadmin     /root/subversion-1.4.6/subversion/svnadmin/.libs/svnadmin: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), not stripped     baco:~ # file /usr/local/subversion-1.6.1/subversion/svnadmin/.libs/svnadmin     /usr/local/subversion-1.6.1/subversion/svnadmin/.libs/svnadmin: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), not stripped      They are not hard links either               baco:~ # stat -c %h /usr/local/subversion-1.6.1/subversion/svnadmin/.libs/svnadmin     1     baco:~ # stat -c %h /root/subversion-1.4.6/subversion/svnadmin/.libs/svnadmin        1


title: FreeBSD 8.4 pkgdb fails after upgrade to Ruby 1.9

text: I just upgrade Ruby 1.8 to Ruby 1.9. After the upgrade I followed the instructions in the UPDATING file located in `/usr/ports`. I issued the following two commands:               portmaster -o lang/ruby19 lang/ruby18     portmaster -R -r ruby-1.9      When I issue a `pkgdb` I get the following error: > /usr/local/lib/ruby/1.9/rubygems/custom_require.rb:36:in `required cannot > load such file -- pkgtools (LoadError) Short of restoring the system to the backup before the upgrade, can someone suggest an alternate solution?


title: How to turn off the help menu in Lynx

text: I have a really small space reserved to Lynx for a quick lookup, as I need that often. However, the "Help" menu takes a lot of space and I don't really need it now. ![enter image description here](http://i.stack.imgur.com/H5SrL.png) The red oval is what I want to get rid of. How to do it?


title: Screen resolution problem in Fedora 17 on Oracle VirtualBox 4.2

text: I have HP Pavilion dv6 6119tx system which has a screen resolution of 1366X768. But after installing fedora 17 on VirtualBox with Guest additions, the default resolution is 1280X768. Whenever I switch to fullscreen mode, I have some black space left on both left and right sides of screen. Please help. Please also suggest me some resources to learn basics of Linux, commands in Linux(specifically Fedora 17).


title: Linux From Scratch 7.2: Error while making binutils-2.22 in chapter 6

text: I get the following error while executing `make tooldir=/usr`               ../../binutils-2.22/libiberty/regex.c:130:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]     ../../binutils-2.22/libiberty/regex.c:130:7: warning: conflicting types for built-in function 'malloc' [enabled by default]     ../../binutils-2.22/libiberty/regex.c:131:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]     ../../binutils-2.22/libiberty/regex.c:131:7: warning: conflicting types for built-in function 'realloc' [enabled by default]     In file included from /usr/include/bits/string2.h:1296:0,                  from /usr/include/string.h:633,                  from ../../binutils-2.22/libiberty/regex.c:149:     /usr/include/stdlib.h:470:14: error: conflicting types for 'malloc'     ../../binutils-2.22/libiberty/regex.c:130:7: note: previous declaration of 'malloc' was here     In file included from ../../binutils-2.22/libiberty/regex.c:638:0:     ../../binutils-2.22/libiberty/regex.c: In function 'byte_regex_compile':     ../../binutils-2.22/libiberty/regex.c:2439:7: warning: implicit declaration of function 'free' [-Wimplicit-function-declaration]     ../../binutils-2.22/libiberty/regex.c:2439:33: warning: incompatible implicit declaration of built-in function 'free' [enabled by default]     ../../binutils-2.22/libiberty/regex.c:2500:17: warning: incompatible implicit declaration of built-in function 'free' [enabled by default]     ../../binutils-2.22/libiberty/regex.c:2533:36: warning: incompatible implicit declaration of built-in function 'free' [enabled by default]     ../../binutils-2.22/libiberty/regex.c:2640:28: warning: incompatible implicit declaration of built-in function 'free' [enabled by default]     ../../binutils-2.22/libiberty/regex.c:3643:26: warning: incompatible implicit declaration of built-in function 'free' [enabled by default]     ../../binutils-2.22/libiberty/regex.c:4150:5: warning: incompatible implicit declaration of built-in function 'free' [enabled by default]     ../../binutils-2.22/libiberty/regex.c: In function 'byte_re_compile_fastmap':     ../../binutils-2.22/libiberty/regex.c:4835:11: warning: implicit declaration of function 'abort' [-Wimplicit-function-declaration]     ../../binutils-2.22/libiberty/regex.c:4835:11: warning: incompatible implicit declaration of built-in function 'abort' [enabled by default]     ../../binutils-2.22/libiberty/regex.c: In function 'byte_re_match_2_internal':     ../../binutils-2.22/libiberty/regex.c:7424:11: warning: incompatible implicit declaration of built-in function 'abort' [enabled by default]     ../../binutils-2.22/libiberty/regex.c: In function 'xregcomp':     ../../binutils-2.22/libiberty/regex.c:7978:4: warning: incompatible implicit declaration of built-in function 'free' [enabled by default]     ../../binutils-2.22/libiberty/regex.c: In function 'xregexec':     ../../binutils-2.22/libiberty/regex.c:8053:7: warning: incompatible implicit declaration of built-in function 'free' [enabled by default]     ../../binutils-2.22/libiberty/regex.c: In function 'xregerror':     ../../binutils-2.22/libiberty/regex.c:8081:5: warning: incompatible implicit declaration of built-in function 'abort' [enabled by default]     ../../binutils-2.22/libiberty/regex.c: In function 'xregfree':     ../../binutils-2.22/libiberty/regex.c:8114:3: warning: incompatible implicit declaration of built-in function 'free' [enabled by default]     make[2]: *** [regex.o] Error 1     make[2]: Leaving directory `/sources/binutils-build/libiberty'     make[1]: *** [all-libiberty] Error 2     make[1]: Leaving directory `/sources/binutils-build'     make: *** [all] Error 2      The complete output is here, and the page I was using is here Can anyone help me? EDIT: `/usr/include/stdlib.h` (line 470)               extern void *malloc (size_t __size) __THROW __attribute_malloc__ __wur;      `binutils-2.22/libiberty/regex.c` (line 130)               char *malloc ();


title: How to list namespaces in Linux?

text: Is there any method in Linux to list all namespaces on the running host? I need to check namespaces for particular processes (e.g. processes running in LXC-container and all other processes on the host) and then find out cgroups of them.


title: Hidding an encrypted folder in a shared system without root access (unshare -m)

text: I'm a graduate student trying to use a cluster at my university. These machines are shared, so I want to protect the source code I use (I signed a NDA, so I'm scared about publishing the code by accident or making it public very easily). So far, I managed to put my source code in a ecryptfs. To disable access from other users, I use:               unshare -m /bin/bash       and then:               mount -n -t ecryptfs ~home/crypt ~home/crypt      This works very nice on my workstation, encrypting the folder ~home/crypt only in the current session. Even the same user cannot access the encrypted files without mounting it again. The problem I have is that I need to be a sudoer to run these commands. The cluster administrator gave access to:               sudo mount -n -t ecryptfs ~/crypt ~/crypt      But,               sudo unshare -m /bin/bash      would give me a root shell and this is a show stopper. Is there another solution for this? Can a sudoers config solve this kind of problem? I'm compiling a C++ system using some external libraries. So far, I'm building a VM to compile my code with the same libraries used on the Cluster (same Linux distro, etc). But this solution won't be ok for a long time, as Cluster updates would break my next build/release cycle. I will try to release my code in static mode too, but I really don't like this approach. I'm using a Linux CentOS 6.3 64 bits (Intel) machine. Source files are stored in a NAS (8TB) with FTP access and a very weak web interface.


title: rearranging from colum to row in a csv

text: I have a CSV file that presently has an output like this 1 2 3 4 5 what I need to do is reconfigure the output as follows 1 2 3 4 5 all the entry data on one line, any help would be greatly appreciated.


title: Can I force notify-send to appear on a different monitor?

text: I am using notify-send to present occasional information to my users. However, in a two-monitor setup, notify-send always maps the window in the lower-right corner of the right monitor. The users would like the popup moved to the lower-right corner of the left monitor. notify-send doesn't appear to allow the -geometry command-line argument, and Control Center -> Window-Specific Settings can't seem to identify the window class automatically. Is there a way to force notify-send to appear at a specific location, or is there a suitable alternative that comes with RHEL5?


title: passing file as a parameter with sed and loop

text: Here File1 is the template. File2 is a csv with 200 rows with the columns scriptname ,jobname, templatename, location   The templatename is column with in the file2. Is it possible to do it as below. The purpose is to use different templates (file1's) for different rows in file2. Any help is appreciated   $templatename I want to change with rows of flie 2. Is it possible? The following is not working:   * samplefile1 * * *               scriptname          statments go here          change jobname      save in the location folder (already there)   * sample file2 * * *               scriptname, jobname, templatename, location          qqqtest,sew-test,/san00/test/file1, /san00/test/          qqqtest,sew-test,/san00/test/file2, /san00/test/      What I am expecting is to change the file1, file2 templates etc. each time with the below update by reading csv?               while IFS=, read scriptname jobname templatename location;      do sed -e "s/scriptname/$scriptname/" \       -e "s/jobname/$jobname/" $templatename > "$location"      done < (file2)       How I update the $templatename?


title: How to list keys added to ssh-agent with ssh-add?

text: How and where can I check what keys have been added with `ssh-add` to my `ssh- agent` ?


title: Can a FAT32 and NTFS file system exist without UUID?

text: I have an USB disk drive partioned with 2 FAT32 partitions, which is not getting detected in the embedded device, but gets detected in a Fedora system. Basically in the udev rules, I am not able to get the UUID of the USB disk. Is it possible to have a filesystem FAT32/NTFS to exist without having UUIDs?


title: How to run a .jar file? No main class found

text: How do I run a `jar` file? I tried this : `java iCChecker.jar` but I got next trace :               Exception in thread "main" java.lang.NoClassDefFoundError: iCChecker/jar     Caused by: java.lang.ClassNotFoundException: iCChecker.jar             at java.net.URLClassLoader$1.run(Unknown Source)             at java.security.AccessController.doPrivileged(Native Method)             at java.net.URLClassLoader.findClass(Unknown Source)             at java.lang.ClassLoader.loadClass(Unknown Source)             at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)             at java.lang.ClassLoader.loadClass(Unknown Source)             at java.lang.ClassLoader.loadClassInternal(Unknown Source)     Could not find the main class: iCChecker.jar.  Program will exit.      So, what am I doing wrong? And how to start this jar file?


title: How to generate random IP addresses

text: $ nmap -n -iR 0 -sL > RANDOM-IPS-TMP.txt     $ grep -o "[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" RANDOM-IPS-TMP.txt |           egrep -v "10.*|172.[16-32].*|192.168.*|[224-255].*" > RANDOM-IPS.txt     egrep: Invalid range end     $       How can I generate random IP Addresses outside the private IP address range and the multicast IP Address range?


title: Measuring Python script bandwidth usage

text: I have a python script that uses `urllibs` to parse some web pages, and uses selenium to scrape pages with javascript, and I would like to know its cumulative bandwidth usage. I've looked at nethogs, but its tells me the usage per second, but won't tell me how much data the script has received or sent on eth0, for example. Ideally, I would want it to track all new processes after I start monitoring, and then keep a table of what each process has used as a total. Does such a tool exist? If not, is there a library in Python that I can implement in the script to track this?


title: How to determine why my computer crashed?

text: Yesterday, I ran a `bash` script for about 10 hours. When I went to use the computer, it locked up.   * I have an Eee PC with Debian.   * The screen was still visible, but the mouse or keyboard had not effect.   * I tried `Ctrl``Alt``Delete`, `Ctrl``Alt``Backspace`, `Ctrl``Alt``F1`, but to no effect.   * The hard drive light showed no activity. How can I determine what went wrong? What logs can I check?


title: How do I dual-boot 2 (or more) Linux distributions with gummiboot and UEFI?

text: I have Arch installed as my main OS with `gummiboot` for booting. I'm planning to dual boot with Fedora 20 soon but I am currently held back by some doubts.   * Do I need to install Grub2 for Fedora even if `gummiboot` is already installed?      * If I don't install Grub2, do I use `efibootmgr` from within Arch to add Fedora to the EFI boot entries?   * Is it okay to mount the EFS to `/boot/efi` instead of `/boot` (as it is on Arch)?   * For the `loader/entries/fedora.conf`, how do I specify the `linux` and `initrd` entries if my EFS is mounted to `/boot/efi` instead of in `/boot`?      * This doubt arose because I initially installed Arch and opted to mount EFS to `/boot/efi` instead of `/boot`. In my `loader/entries/arch.conf` file, I had `linux` option set to `/vmlinuz-linux`. When I rebooted the system I got a big, fat **"cannot find vmlinuz-linux"** error. I re-installed and this time mounted EFS to `/boot` and everything booted fine using the same value for `linux` I don't want to b0rk my boot setup as I have configured Arch to my liking (and don't want to re-install should I mess up). Off the top of my head, here's an approach I think might work.   1. Start Fedora 20 in live mode and run installer   2. Install Fedora **WITHOUT** a boot loader   3. `chroot` into the installed Fedora from live session (mounting the EFS to `/boot`) and...      * copy Fedora's `vmlinuz-linux` and `initramfs-linux.img` to EFS (as soon as I find out where to get it from)     * create `/boot/loader/entries/fedora-20.conf`     * add an entry in `/etc/fstab` to mount EFS to `/boot` on startup   4. Reboot (and cross fingers it doesn't b0rk the boot setup) _Note: I did an`efibootmgr -v` in Arch and the entries are `Boot0000* Linux Boot Manager` (which I presume to be `gummiboot`) and `Boot0001* Hard Drive`. So I'm thinking that using `efibootmgr` isn't necessary, but I could be wrong._ The above approach _may_ work but I'm not sure it's optimal i.e. if Fedora 20 gets a kernel upgrade, then I'd probably have to copy the new `vmlinuz-linux` and `initramfs-linux.img` files to the ESP. * * * Some background: I used to have Debian Wheezy installed as my main OS and installed Arch for dual-boot, (both using UEFI booting). During my installation of Arch, I chose Grub2 instead of `gummiboot`. When I rebooted my PC, Arch displayed it's Grub2 menu but failed to boot and then Debian's Grub2 displayed after. So I knew I had 2 Grub2 menus chainloading and I didn't want that. I've since switched to Arch as my main OS using `gummiboot` and now want Fedora 20 for dual-boot. This time around, I don't want to mess up my boot options, hence this question.


title: Detect process if not found then run it

text: I am running several process at startup using "crontab -e"               @reboot tranmission-daemon && python defualt.py && python MonitorService.py      But for some reason, those service can terminate by itself due to hdd insufficient, or web host killed it, how do I check if those service are killed and I re run it again? I am using CentOS 6


title: touch: setting times of No such file or directory

text: I got strange issue with TeamCity server (from log-file): `[2013-12-26 16:48:52,915] WARN - jetbrains.buildServer.SERVER - Failed to save custom data to the file: /home/teamcity/.BuildServer/system/pluginData/customDataStorage/buildTypes/bt9/1094615606, error: java.io.FileNotFoundException: /home/teamcity/.BuildServer/system/pluginData/customDataStorage/buildTypes/bt9/1094615606.bak (Invalid argument)` And if I try create file there:                $ touch 1      touch: setting times of `1': No such file or directory      `CentOS release 6.4 (Final)`                Filesystem            Size  Used Avail Use% Mounted on      /dev/sda3             193G   36G  148G  20% /      tmpfs                 1.9G  631M  1.3G  33% /dev/shm      /dev/sda1             194M   86M   99M  47% /boot           # mount      /dev/sda3 on / type ext4 (rw)      proc on /proc type proc (rw)      sysfs on /sys type sysfs (rw)      devpts on /dev/pts type devpts (rw,gid=5,mode=620)      tmpfs on /dev/shm type tmpfs (rw)      /dev/sda1 on /boot type ext4 (rw)      none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)


title: When can one reboot from inside a chroot environment?

text: Sometimes when I chroot into some folder , I could use `reboot` to reset my box, but sometimes I can't. So I want to know why I could do that sometimes and why. **UPDATE** The chroot environment is another Linux system installed on a different partition and I prepare the chroot as follows:               mount --bind /dev chroot/dev     mount --bind /sys chroot/sys     mount -t proc proc chroot/proc


title: Remove all files created before a certain date

text: I have a directory containing a high number of files (like logs for every day of the year). I would like to remove all files created before let's say 22/11. How can I achieve that ? Must I use `find` then exec `-rm`? I'm using ksh.


title: Find and remove sub-directories without error?

text: I need to find a way to remove sub-directories from within a particular directory without receiving an error if no sub-directories exist. This command will successfully remove sub-directories if they exist               find /path/to/dir/* -maxdepth 1 -type d -exec rm -rf {} \;      But if none exist I will get this error: > find: /path/to/dir/*: No such file or directory Also, I am using the `find` instead of just plain `rm` because there are too many directories for `rm` to handle and they must be handled individually with `find`. Also I noticed that `find /path/to/dir/ -maxdepth 1 -type d -exec rm -rf {} \;` with no wildcard actually removes the _dir_ directory as well.


title: How do I restore my MySQL databases that were dumped from phpMyAdmin?

text: I recently did a clean install of Linux Mint 16 Petra on my laptop. Before I wiped the old system, I did a backup of all my MySQL databases by going to the Export tab in phpMyAdmin and dumping all the databases into one file. I didn't use any compression. Now, on the new system, in phpMyAdmin, when I go to the Import tab and try to upload the SQL file, I get this error:               #1046 - No database selected      ... Of course no database is selected, I am trying to restore them. I am not at all an expert in MySQL, I use it to support my web design projects, so I don't understand why this isn't working. It seems to me phpMyAdmin should be able to read from a file that phpMyAdmin created. How do I restore my databases from the SQL dump file that I created?


title: How do I change login shell to nologin for an LDAP user RHEL 6?

text: yum install ypchsh and yum install ldapmodify both don't find a package. I only want to change the shell for certain ldap users on this one server. Someone please help, I can't seem to figure this simple thing out. the passwd file won't work because the user isn't listed there I think. I dont just create an entry there I suppose. If I edit ther login shell in their LDAP profile I think it would apply to all systems. There must be a mapping file somewhere in etc I am guessing to map their attributes to local system settings.


title: How can I create my own distro and include a custom kernel & packages?

text: I wanted to know how to add packages to the Linux kernel and then package it to a ISO or CD for friends. Thanks in advance and please don't point me to LFS - Linux From Scratch!


title: Unable to ssh into Ubuntu 12.04 LTS [could not resolve hostname (hostname): Name or service not known

text: I'm just starting with a clean install of Ubuntu Server 12.04. I've run:               $ sudo apt-get update     $ sudo apt-get upgrade      I've added the following to `/etc/hosts`:               127.0.0.1       (hostname)      The file previously contained:               127.0.0.1       localhost     127.0.1.1       (hostname).hsd1.(state).(ISP).net        (hostname)          # The following....     ...      I was only able to save edits to that file once I became root [by: `su -l`]. I'm able to ssh with username@ip. However, I'd like to be able to ssh with @hostname What am I missing? My goal is to set up a simple LAMP Web Server for PHP website testing.


title: How can I have my .bashrc only invoke TMUX if it exists on my system?

text: I use tmux on most boxes, but not all. I have the following line in my .bashrc file:               [ -z "$TMUX" ] && export TERM=xterm-256color && exec tmux      which invoke tmux if it exists. I _thought_ the `[ -z $TMUX ]` meant that it would only be used if tmux exists. However on another system, without tmux, I get -bash: exec: tmux: not found and the login attempt fails On my main system I see               $ echo $TMUX     /private/var/folders/ks/266xy5lj7x35gfj4csc66444b48rvq/T/tmux-373580663/default,55084,4      I also tried just `[ $TMUX ]` (i.e. no `-z`) but that didn't help I'm also looking for a robust solution that works in Ubuntu as well as OSX