GCC error trying to exec 'cc1'

I was cross compiling a Linux kernel for my Raspberry Pi on a laptop (running debian 7) (followed the instructions here) but when I start compiling (`make ARCH=arm CROSS_COMPILE=${CCPREFIX}`) I get the following messages:                 CHK     include/linux/version.h       CHK     include/generated/utsrelease.h     make[1]: `include/generated/mach-types.h' is up to date.       CC      kernel/bounds.s     gcc: error trying to exec 'cc1': execvp: No such file or directory     make[1]: *** [kernel/bounds.s] Error 1     make: *** [prepare0] Error 2      I figured that the problem was that cc1 couldn't be found or gcc was not properly installed (and so I re-installed gcc with `apt-get --reinstall install gcc` but no luck). `gcc -v` gives:               Using built-in specs.     COLLECT_GCC=gcc     COLLECT_LTO_WRAPPER=/usr/lib/gcc/i486-linux-gnu/4.7/lto-wrapper     Target: i486-linux-gnu     Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.2-5' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --enable-targets=all --with-arch-32=i586 --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu     Thread model: posix     gcc version 4.7.2 (Debian 4.7.2-5)      `gcc -print-prog-name=cc1` gives:               /usr/lib/gcc/i486-linux-gnu/4.7/cc1      `gcc -print-search-dirs` gives:               install: /usr/lib/gcc/i486-linux-gnu/4.7/     programs: =/usr/lib/gcc/i486-linux-gnu/4.7/:/usr/lib/gcc/i486-linux-gnu/4.7/:/usr/lib/gcc/i486-linux-gnu/:/usr/lib/gcc/i486-linux-gnu/4.7/:/usr/lib/gcc/i486-linux-gnu/:/usr/lib/gcc/i486-linux-gnu/4.7/../../../../i486-linux-gnu/bin/i486-linux-gnu/4.7/:/usr/lib/gcc/i486-linux-gnu/4.7/../../../../i486-linux-gnu/bin/i386-linux-gnu/:/usr/lib/gcc/i486-linux-gnu/4.7/../../../../i486-linux-gnu/bin/     libraries: =/usr/lib/gcc/i486-linux-gnu/4.7/:/usr/lib/gcc/i486-linux-gnu/4.7/../../../../i486-linux-gnu/lib/i486-linux-gnu/4.7/:/usr/lib/gcc/i486-linux-gnu/4.7/../../../../i486-linux-gnu/lib/i386-linux-gnu/:/usr/lib/gcc/i486-linux-gnu/4.7/../../../../i486-linux-gnu/lib/../lib/:/usr/lib/gcc/i486-linux-gnu/4.7/../../../i486-linux-gnu/4.7/:/usr/lib/gcc/i486-linux-gnu/4.7/../../../i386-linux-gnu/:/usr/lib/gcc/i486-linux-gnu/4.7/../../../../lib/:/lib/i486-linux-gnu/4.7/:/lib/i386-linux-gnu/:/lib/../lib/:/usr/lib/i486-linux-gnu/4.7/:/usr/lib/i386-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/i486-linux-gnu/4.7/../../../../i486-linux-gnu/lib/:/usr/lib/gcc/i486-linux-gnu/4.7/../../../:/lib/:/usr/lib/      and `find / -type f -name cc1` gives:               /opt/tools/arm-bcm2708/arm-bcm2708-linux-gnueabi/libexec/gcc/arm-bcm2708-linux-gnueabi/4.7.1/cc1     /opt/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/libexec/gcc/arm-linux-gnueabihf/4.7.2/cc1     /opt/tools/arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi/libexec/gcc/arm-bcm2708hardfp-linux-gnueabi/4.7.1/cc1     /usr/lib/gcc/i486-linux-gnu/4.6/cc1     /usr/lib/gcc/i486-linux-gnu/4.7/cc1      Running `dpkg -S cc1` gives:               libopencc1:i386: /usr/share/doc/libopencc1/changelog.Debian.gz     g++-4.7: /usr/lib/gcc/i486-linux-gnu/4.7/cc1plus     cpp-4.6: /usr/lib/gcc/i486-linux-gnu/4.6/cc1     libopencc1:i386: /usr/share/doc/libopencc1     cpp-4.7: /usr/lib/gcc/i486-linux-gnu/4.7/cc1     libopencc1:i386: /usr/share/doc/libopencc1/copyright     libgcc1:i386: /usr/share/lintian/overrides/libgcc1     ncurses-term: /usr/share/terminfo/x/xterm+pcc1     libgcc1:i386: /usr/share/doc/libgcc1      Any ideas?


Installing Unity on Debian

I'm a former Ubuntu Unity user, and currently running Debian Squeeze. I love Debian's stability over Ubuntu, but I do miss being able to switch between applications use Super+1,2,3 etc. Has anyone successfully gotten Unity running on Debian Squeeze?


Permanently changing the ownership (or group) of LVM volume

How can I permanently change the ownership (or at least the group) of a LVM volume? I figured that I have to use udev, but I don't know how the rule should look like? Let's say I want to change the ownership of LVM/disk to user/group virtualbox, how would I do that?


"Digest verification failed" when updating system

When I run `sudo zypper update`:               Overall download size: 134.1 MiB. After the operation, additional 5.7 MiB will be used.     Continue? [y/n/?] (y): y     Automatically agreeing with java-1_6_0-sun-devel package license.     Automatically agreeing with java-1_6_0-sun package license.     Automatically agreeing with java-1_6_0-sun-plugin package license.     Retrieving package libbluray0-0+20111019-1.1.x86_64 (1/54), 60.0 KiB (159.0 KiB unpacked)     Retrieving: libbluray0-0+20111019-1.1.x86_64.rpm [done]     Retrieving package MPlayer-1.0rc4_r34240-2.1.x86_64 (2/54), 17.9 MiB (49.1 MiB unpacked)     Retrieving: MPlayer-1.0rc4_r34240-2.1.x86_64.rpm [done (1.9 MiB/s)]     Retrieving package libcurl4-7.22.0-59.2.x86_64 (3/54), 174.0 KiB (434.0 KiB unpacked)     Retrieving: libcurl4-7.22.0-59.2.x86_64.rpm [done (0 B/s)]     Digest verification failed for libcurl4-7.22.0-59.2.x86_64.rpm. Expected f065534feb71adf943a5e4f86c2bdb4fd930ee36b8ca8b672062f65510f66584, found d9b8e0ac120e1870d6988aa1157190bfd39225fe24aa24e3ab79a60efd3aa6ae. Continue? [yes/no] (no): yes     Package libcurl4-7.22.0-59.2 seems to be corrupted during transfer. Do you want to retry retrieval?     Abort, retry, ignore? [a/r/i] (a): i      I haven't changed anything in my repos recently so I don't know why curl isn't cooperating. What does this error mean? And where does the problem lie? **SOLVED** I ended up having to run `sudo zypper refresh` before re-trying my update. Thanks to _rozcietrzewiacz_ for hinting to it.


Unable to chown recursively

I'm using this command:               chown root:www-data /var/www/example.com -R       but I get an error message that the directory is not listed. What is wrong?


problem with /compress

I have script that was provided with some SW. The script output is something like that (in debug mode).               + changeDirectory     + '[' -d /cdr/work/proc_raw/proc ']'     + cd /cdr/work/proc_raw/proc     + echo 'Changed to the directory: /cdr/work/proc_raw/proc'     Changed to the directory: /cdr/work/proc_raw/proc     + retypeFileName     ++ echo ''\''*.old'\'''     ++ sed 's/'\''//g'     + FILE='*.old'     + case $TYPE in     + compressFiles     + echo 'files to compress: '     files to compress:      + find . -name '*.old' -mtime +3     ./file1.cdr.old     ./file2.cdr.old     ...     + find . -name '*.old' -mtime +3     + xargs compress -f     + ecode=0     + '[' 0 -gt 0 ']'     + echo 'executed: find . -name *.old -mtime +3 | xargs compress -f'      However, after that, when looking for the file1.cdr.old.Z, file1.cdr.old.Z, .. in that directory, the file is not there. If to execute the `file` command, it seems that there is no reason for compress to fail:               -bash-3.2# file file1.cdr.old     file1.cdr.old: ASCII text, with very long lines      Any suggestions? EDIT: the relevant parts from the script:               # Change to the selected directory     changeDirectory (){         if [ -d $DIRECTORY ]         then         cd $DIRECTORY         echo "Changed to the directory: $DIRECTORY" >> $LOGFILE         else             echo "$DIRECTORY does not exists" >> $LOGFILE             exit 1         fi     }          # Removes the "'" characters from filename.     retypeFileName (){        FILE=$(echo $FILE | sed s/"'"//g )     }     # COMPRESSING FILES     compressFiles () {        echo "files to compress: " >> $LOGFILE        find . -name "$FILE" -type f $ACTION_TYPE +$PARAM >> $LOGFILE             find . -name "$FILE" -type f $ACTION_TYPE +$PARAM | xargs compress -f        ecode=$?              if [ $ecode -gt 0 ]         then             dt=`date "+%Y-%b-%d %H:%M:%S"`             echo "$dt > ERROR while compressing files. Error Code was $ecode" >> $LOGFILE             exit 2         fi              echo "executed: find . -name "$FILE" -type f $ACTION_TYPE +$PARAM | xargs compress -f" >> $LOGFILE     }


lsusb outputs "Illegal Instruction" - why?

I'm trying to get a 3G USB dongle to work on a Raspberry Pi running Raspbian Wheezy, using a script called sakis3g. However, in trying to do this, I keep running into problems: when trying to connect to the USB device, the script prints "Illegal Instruction" and gets no further. I've posted a question about this on the Raspberry Pi Stack Overflow site, and was given a guide to try to follow (BigCowPi's answer). However, as I said over there, when I try to run `lsusb` (the first thing in that guide), it still outputs "Illegal Instruction" and gets no further. I've tried reinstalling usbutils and libsub-1.0-0 for armhf, but this hasn't helped the situation. It might also be worth mentioning that I haven't got access to the internet on it at present, so I've been downloading packages for installation and using dpkg, rather than something simpler like apt-get. I haven't managed to get an answer from the Raspberry Pi site, so I thought it might be worth asking here instead as it might be a more Linux-related problem anyway. ## Output from strace lsusb As requested by @Flup, here's the output from `strace`:               pi@raspberrypi ~/Desktop $ strace lsusb -o > lsusblog.log     execve("/usr/bin/lsusb", ["lsusb", "-o"], [/* 28 vars */]) = 0     brk(0)                                  = 0x914000     uname({sys="Linux", node="raspberrypi", ...}) = 0     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4005a000     access("/etc/ld.so.preload", R_OK)      = 0     open("/etc/ld.so.preload", O_RDONLY)    = 3     fstat64(3, {st_mode=S_IFREG|0644, st_size=44, ...}) = 0     mmap2(NULL, 44, PROT_READ|PROT_WRITE, MAP_PRIVATE, 3, 0) = 0x40155000     close(3)                                = 0     open("/usr/lib/arm-linux-gnueabihf/libcofi_rpi.so", O_RDONLY) = 3     read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\10\4\0\0004\0\0\0"..., 512) = 512     lseek(3, 3456, SEEK_SET)                = 3456     read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1240) = 1240     lseek(3, 2537, SEEK_SET)                = 2537     read(3, "A.\0\0\0aeabi\0\1$\0\0\0\0056\0\6\6\10\1\t\1\n\2\22\4\24\1\25"..., 47) = 47     fstat64(3, {st_mode=S_IFREG|0755, st_size=7332, ...}) = 0     mmap2(NULL, 35276, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x4022f000     mprotect(0x40230000, 28672, PROT_NONE)  = 0     mmap2(0x40237000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x40237000     close(3)                                = 0     munmap(0x40155000, 44)                  = 0     open("/etc/ld.so.cache", O_RDONLY)      = 3     fstat64(3, {st_mode=S_IFREG|0644, st_size=37860, ...}) = 0     mmap2(NULL, 37860, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40046000     close(3)                                = 0     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     open("/lib/arm-linux-gnueabihf/libusb-1.0.so.0", O_RDONLY) = 3     read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\f\"\0\0004\0\0\0"..., 512) = 512     lseek(3, 37532, SEEK_SET)               = 37532     read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1040) = 1040     lseek(3, 37256, SEEK_SET)               = 37256     read(3, "A4\0\0\0aeabi\0\1*\0\0\0\0057-A\0\6\n\7A\10\1\t\2\n\4\22"..., 53) = 53     fstat64(3, {st_mode=S_IFREG|0644, st_size=38572, ...}) = 0     mmap2(NULL, 70084, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x40122000     mprotect(0x4012b000, 28672, PROT_NONE)  = 0     mmap2(0x40132000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8) = 0x40132000     close(3)                                = 0     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     open("/lib/arm-linux-gnueabihf/libz.so.1", O_RDONLY) = 3     read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0008\33\0\0004\0\0\0"..., 512) = 512     lseek(3, 86632, SEEK_SET)               = 86632     read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1160) = 1160     lseek(3, 86300, SEEK_SET)               = 86300     read(3, "A0\0\0\0aeabi\0\1&\0\0\0\0056\0\6\6\10\1\t\1\n\2\22\4\24\1\25"..., 49) = 49     fstat64(3, {st_mode=S_IFREG|0644, st_size=87792, ...}) = 0     mmap2(NULL, 119072, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x4008f000     mprotect(0x400a3000, 32768, PROT_NONE)  = 0     mmap2(0x400ab000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14) = 0x400ab000     close(3)                                = 0     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     open("/lib/arm-linux-gnueabihf/libc.so.6", O_RDONLY) = 3     read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\210y\1\0004\0\0\0"..., 512) = 512     lseek(3, 1186592, SEEK_SET)             = 1186592     read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1360) = 1360     lseek(3, 1186156, SEEK_SET)             = 1186156     read(3, "A.\0\0\0aeabi\0\1$\0\0\0\0056\0\6\6\10\1\t\1\n\2\22\4\24\1\25"..., 47) = 47     fstat64(3, {st_mode=S_IFREG|0755, st_size=1187952, ...}) = 0     mmap2(NULL, 1230120, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x40238000     mprotect(0x40357000, 32768, PROT_NONE)  = 0     mmap2(0x4035f000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x11f) = 0x4035f000     mmap2(0x40362000, 9512, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40362000     close(3)                                = 0     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     open("/lib/arm-linux-gnueabihf/librt.so.1", O_RDONLY) = 3     read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\300\26\0\0004\0\0\0"..., 512) = 512     lseek(3, 25312, SEEK_SET)               = 25312     read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1320) = 1320     lseek(3, 24924, SEEK_SET)               = 24924     read(3, "A0\0\0\0aeabi\0\1&\0\0\0\0056\0\6\6\10\1\t\1\n\2\22\4\24\1\25"..., 49) = 49     fstat64(3, {st_mode=S_IFREG|0644, st_size=26632, ...}) = 0     mmap2(NULL, 57876, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x40063000     mprotect(0x40069000, 28672, PROT_NONE)  = 0     mmap2(0x40070000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x5) = 0x40070000     close(3)                                = 0     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     open("/lib/arm-linux-gnueabihf/libpthread.so.0", O_RDONLY) = 3     read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\274V\0\0004\0\0\0"..., 512) = 512     lseek(3, 82712, SEEK_SET)               = 82712     read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1400) = 1400     lseek(3, 82308, SEEK_SET)               = 82308     read(3, "A0\0\0\0aeabi\0\1&\0\0\0\0056\0\6\6\10\1\t\1\n\2\22\4\24\1\25"..., 49) = 49     fstat64(3, {st_mode=S_IFREG|0755, st_size=116462, ...}) = 0     mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4003c000     mmap2(NULL, 123412, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x400ad000     mprotect(0x400c1000, 28672, PROT_NONE)  = 0     mmap2(0x400c8000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13) = 0x400c8000     mmap2(0x400ca000, 4628, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x400ca000     close(3)                                = 0     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     open("/lib/arm-linux-gnueabihf/libgcc_s.so.1", O_RDONLY) = 3     read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0`\364\0\0004\0\0\0"..., 512) = 512     lseek(3, 130212, SEEK_SET)              = 130212     read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1160) = 1160     lseek(3, 129880, SEEK_SET)              = 129880     read(3, "A2\0\0\0aeabi\0\1(\0\0\0\0056\0\6\6\10\1\t\1\n\2\22\4\24\1\25"..., 51) = 51     fstat64(3, {st_mode=S_IFREG|0644, st_size=131372, ...}) = 0     mmap2(NULL, 162704, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x400cc000     mprotect(0x400ec000, 28672, PROT_NONE)  = 0     mmap2(0x400f3000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1f) = 0x400f3000     close(3)                                = 0     mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4000a000     set_tls(0x4000a4c0, 0x4000ab98, 0x40045048, 0x4000a4c0, 0x40045048) = 0     mprotect(0x400c8000, 4096, PROT_READ)   = 0     mprotect(0x40070000, 4096, PROT_READ)   = 0     mprotect(0x4035f000, 8192, PROT_READ)   = 0     mprotect(0x400ab000, 4096, PROT_READ)   = 0     mprotect(0x40132000, 4096, PROT_READ)   = 0     mprotect(0x40044000, 4096, PROT_READ)   = 0     munmap(0x40046000, 37860)               = 0     set_tid_address(0x4000a068)             = 2041     set_robust_list(0x4000a070, 0xc)        = 0     futex(0xbeb6d5e8, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1, NULL, 400c9000) = -1 EAGAIN (Resource temporarily unavailable)     rt_sigaction(SIGRTMIN, {0x400b220c, [], SA_SIGINFO|0x4000000}, NULL, 8) = 0     rt_sigaction(SIGRT_1, {0x400b20b4, [], SA_RESTART|SA_SIGINFO|0x4000000}, NULL, 8) = 0     rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0     getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0     --- SIGILL (Illegal instruction) @ 0 (0) ---     +++ killed by SIGILL +++     Illegal instruction      ## Output from strace sudo lsusb And just in case it made a difference, I tried sudo too. No `Illegal Instruction`, but no output (such as a list of devices) either.               pi@raspberrypi ~ $ strace sudo lsusb     execve("/usr/bin/sudo", ["sudo", "lsusb"], [/* 27 vars */]) = 0     brk(0)                                  = 0x10e4000     fcntl64(0, F_GETFD)                     = 0     fcntl64(1, F_GETFD)                     = 0     fcntl64(2, F_GETFD)                     = 0     access("/etc/suid-debug", F_OK)         = -1 ENOENT (No such file or directory)     uname({sys="Linux", node="raspberrypi", ...}) = 0     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40001000     access("/etc/ld.so.preload", R_OK)      = 0     open("/etc/ld.so.preload", O_RDONLY)    = 3     fstat64(3, {st_mode=S_IFREG|0644, st_size=44, ...}) = 0     mmap2(NULL, 44, PROT_READ|PROT_WRITE, MAP_PRIVATE, 3, 0) = 0x40102000     close(3)                                = 0     open("/usr/lib/arm-linux-gnueabihf/libcofi_rpi.so", O_RDONLY) = 3     read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\10\4\0\0004\0\0\0"..., 512) = 512     lseek(3, 3456, SEEK_SET)                = 3456     read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1240) = 1240     lseek(3, 2537, SEEK_SET)                = 2537     read(3, "A.\0\0\0aeabi\0\1$\0\0\0\0056\0\6\6\10\1\t\1\n\2\22\4\24\1\25"..., 47) = 47     fstat64(3, {st_mode=S_IFREG|0755, st_size=7332, ...}) = 0     mmap2(NULL, 35276, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x40160000     mprotect(0x40161000, 28672, PROT_NONE)  = 0     mmap2(0x40168000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x40168000     close(3)                                = 0     munmap(0x40102000, 44)                  = 0     open("/etc/ld.so.cache", O_RDONLY)      = 3     fstat64(3, {st_mode=S_IFREG|0644, st_size=37860, ...}) = 0     mmap2(NULL, 37860, PROT_READ, MAP_PRIVATE, 3, 0) = 0x4009c000     close(3)                                = 0     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     open("/lib/arm-linux-gnueabihf/libselinux.so.1", O_RDONLY) = 3     read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0TM\0\0004\0\0\0"..., 512) = 512     lseek(3, 107532, SEEK_SET)              = 107532     read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1120) = 1120     lseek(3, 107244, SEEK_SET)              = 107244     read(3, "A0\0\0\0aeabi\0\1&\0\0\0\0056\0\6\6\10\1\t\1\n\2\22\4\24\1\25"..., 49) = 49     fstat64(3, {st_mode=S_IFREG|0644, st_size=108652, ...}) = 0     mmap2(NULL, 142424, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x400eb000     mprotect(0x40105000, 28672, PROT_NONE)  = 0     mmap2(0x4010c000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x19) = 0x4010c000     close(3)                                = 0     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     open("/lib/arm-linux-gnueabihf/libutil.so.1", O_RDONLY) = 3     read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\344\t\0\0004\0\0\0"..., 512) = 512     lseek(3, 8688, SEEK_SET)                = 8688     read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1160) = 1160     lseek(3, 8356, SEEK_SET)                = 8356     read(3, "A0\0\0\0aeabi\0\1&\0\0\0\0056\0\6\6\10\1\t\1\n\2\22\4\24\1\25"..., 49) = 49     fstat64(3, {st_mode=S_IFREG|0644, st_size=9848, ...}) = 0     mmap2(NULL, 41128, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x40085000     mprotect(0x40087000, 28672, PROT_NONE)  = 0     mmap2(0x4008e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0x4008e000     close(3)                                = 0     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     open("/lib/arm-linux-gnueabihf/libdl.so.2", O_RDONLY) = 3     read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0(\t\0\0004\0\0\0"..., 512) = 512     lseek(3, 8652, SEEK_SET)                = 8652     read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1160) = 1160     lseek(3, 8320, SEEK_SET)                = 8320     read(3, "A0\0\0\0aeabi\0\1&\0\0\0\0056\0\6\6\10\1\t\1\n\2\22\4\24\1\25"..., 49) = 49     fstat64(3, {st_mode=S_IFREG|0644, st_size=9812, ...}) = 0     mmap2(NULL, 41136, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x40090000     mprotect(0x40092000, 28672, PROT_NONE)  = 0     mmap2(0x40099000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0x40099000     close(3)                                = 0     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     open("/lib/arm-linux-gnueabihf/libc.so.6", O_RDONLY) = 3     read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\210y\1\0004\0\0\0"..., 512) = 512     lseek(3, 1186592, SEEK_SET)             = 1186592     read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1360) = 1360     lseek(3, 1186156, SEEK_SET)             = 1186156     read(3, "A.\0\0\0aeabi\0\1$\0\0\0\0056\0\6\6\10\1\t\1\n\2\22\4\24\1\25"..., 47) = 47     fstat64(3, {st_mode=S_IFREG|0755, st_size=1187952, ...}) = 0     mmap2(NULL, 1230120, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x40169000     mprotect(0x40288000, 32768, PROT_NONE)  = 0     mmap2(0x40290000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x11f) = 0x40290000     mmap2(0x40293000, 9512, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40293000     close(3)                                = 0     mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4004c000     mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4009b000     set_tls(0x4009b4c0, 0x4009bbe8, 0x40084048, 0x4009b4c0, 0x40084048) = 0     mprotect(0x40290000, 8192, PROT_READ)   = 0     mprotect(0x40099000, 4096, PROT_READ)   = 0     mprotect(0x4008e000, 4096, PROT_READ)   = 0     mprotect(0x4010c000, 4096, PROT_READ)   = 0     mprotect(0x26000, 4096, PROT_READ)      = 0     mprotect(0x40083000, 4096, PROT_READ)   = 0     munmap(0x4009c000, 37860)               = 0     statfs64("/sys/fs/selinux", 88, 0xbef755c8) = -1 ENOENT (No such file or directory)     statfs64("/selinux", 88, {f_type="EXT2_SUPER_MAGIC", f_bsize=4096, f_blocks=931609, f_bfree=555069, f_bavail=507743, f_files=237568, f_ffree=171092, f_fsid={1545102210, 1047066944}, f_namelen=255, f_frsize=4096}) = 0     brk(0)                                  = 0x10e4000     brk(0x1105000)                          = 0x1105000     open("/proc/filesystems", O_RDONLY|O_LARGEFILE) = 3     fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0     mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x400ae000     read(3, "nodev\tsysfs\nnodev\trootfs\nnodev\tb"..., 1024) = 281     read(3, "", 1024)                       = 0     close(3)                                = 0     munmap(0x400ae000, 4096)                = 0     open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3     fstat64(3, {st_mode=S_IFREG|0644, st_size=1534656, ...}) = 0     mmap2(NULL, 1534656, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40296000     close(3)                                = 0     geteuid32()                             = 1000     open("/usr/share/locale/locale.alias", O_RDONLY) = 3     fstat64(3, {st_mode=S_IFREG|0644, st_size=2570, ...}) = 0     mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4000c000     read(3, "# Locale name alias data base.\n#"..., 4096) = 2570     read(3, "", 4096)                       = 0     close(3)                                = 0     munmap(0x4000c000, 4096)                = 0     open("/usr/share/locale/en_GB.UTF-8/LC_MESSAGES/sudo.mo", O_RDONLY) = -1 ENOENT (No such file or directory)     open("/usr/share/locale/en_GB.utf8/LC_MESSAGES/sudo.mo", O_RDONLY) = -1 ENOENT (No such file or directory)     open("/usr/share/locale/en_GB/LC_MESSAGES/sudo.mo", O_RDONLY) = -1 ENOENT (No such file or directory)     open("/usr/share/locale/en.UTF-8/LC_MESSAGES/sudo.mo", O_RDONLY) = -1 ENOENT (No such file or directory)     open("/usr/share/locale/en.utf8/LC_MESSAGES/sudo.mo", O_RDONLY) = -1 ENOENT (No such file or directory)     open("/usr/share/locale/en/LC_MESSAGES/sudo.mo", O_RDONLY) = -1 ENOENT (No such file or directory)     write(2, "sudo", 4sudo)                     = 4     write(2, ": ", 2: )                       = 2     write(2, "effective uid is not 0, is sudo "..., 54effective uid is not 0, is sudo installed setuid root?) = 54     write(2, "\n", 1     )                       = 1     close(0)                                = 0     access("/var/run/utmpx", F_OK)          = -1 ENOENT (No such file or directory)     open("/var/run/utmp", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 0     fcntl64(0, F_GETFD)                     = 0x1 (flags FD_CLOEXEC)     _llseek(0, 0, [0], SEEK_SET)            = 0     setitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={0, 0}}, {it_interval={0, 0}, it_value={0, 0}}) = 0     rt_sigaction(SIGALRM, {0x40265084, [], 0x4000000 /* SA_??? */}, {SIG_DFL, [], 0}, 8) = 0     setitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={10, 0}}, {it_interval={0, 0}, it_value={0, 0}}) = 0     fcntl64(0, F_SETLKW, {type=F_RDLCK, whence=SEEK_SET, start=0, len=0}) = 0     read(0, "\10\0\0\0&\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384     read(0, "\2\0\0\0\0\0\0\0~\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384     read(0, "\1\0\0\0002N\0\0~\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384     read(0, "\10\0\0\0\33\6\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384     read(0, "\6\0\0\0!\7\0\0tty2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384     read(0, "\7\0\0\0u\7\0\0tty1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384     read(0, "\6\0\0\0#\7\0\0tty4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384     read(0, "\6\0\0\0\"\7\0\0tty3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384     read(0, "\6\0\0\0%\7\0\0tty6\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384     read(0, "\6\0\0\0$\7\0\0tty5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384     read(0, "\6\0\0\0&\7\0\0ttyAMA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384     read(0, "\7\0\0\0\7\10\0\0pts/0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384     read(0, "", 384)                        = 0     fcntl64(0, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}) = 0     setitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={0, 0}}, {it_interval={0, 0}, it_value={9, 976098}}) = 0     rt_sigaction(SIGALRM, {SIG_DFL, [], 0x4000000 /* SA_??? */}, NULL, 8) = 0     exit_group(1)                           = ?      ## tl;dr What could cause the `lsusb` command to only print `Illegal Instruction` to the console and then exit?


How to format large Size HDD quickly

In windows we can do a Quick format just by right clicking the device and boom format. In linux How to do the same I mean if the size of HDD is 2TB or more it takes along time to format using mkfs.ext3 /dev/sda* Is there an option to format it quickily


openSUSE 12.3 (64-bit) LiveCD/LiveUSB won't work (MacBook7,1)

I wanted to try a live openSUSE 12.3 (64-bit) system on my MacBook 7,1, however:   * When I do it with a LiveUSB created with UNetbootin, it's not recognized as bootable   * When I do it with a LiveCD created with Disk Utility, it boots, but it hangs on the screen with the black-blue background with the openSUSE chameleon on a plant on the right. No matter if I boot it in EFI-mode or not. What is going wrong? It's not really important however, I just wanted to try it for fun.


I am attempting to Install Guest Additions CentOS 64 (guest), Win 8 (host) Oracle's VM Virtual Box quite unsuccessfully. I have tried to follow the method answered here. But, I get the "mount point /media/cdrom does not exist" issue also mentioned in the same post.


How to copy a list of files and adjust destination filenames on the fly?

When I don't need to adjust destination filenames I can do something like this:               $ find -type f -name '*.pat' -print0  | xargs -O cp -t /path/to/dest      It is safe because the filenames may even contain newline characters. An alternative:               $ find -type f -name '*.pat' -print0 | cpio -p -0 -d /path/to/dest      Now I have the problem that the destination is a VFAT filesystem ... thus certain characters are just not allowed in filenames (e.g. '?'). That means that I have to adjust the destination filenames. Something like               for i `find -type f -name '*.pat'` ; do         cp "$i" `echo $i | sed 's/?/_/'`     done      works only for filenames without spaces - I could change IFS to just newline - but how to set '\0' as IFS? And still - the for loop leads to as much forks/execs (of mv/sed) as you have files - which is much more excessive than the few forks/execs needed for the two examples in the beginning. What are the alternatives to solve that problem?


reading from a file and changing its pattern into an array?

I have a CSV file containging entries like this :               ipaddress,VLAN,VLANid     10.192.168.1,vlan-xyz,3     10.192.168.1,vlan-abc,8     10.192.168.1,vlan-mnp,11     10.192.163.24,vlan-llz,3     10.192.163.24,vlan-bbz,5     10.192.163.24,vlan-xggz,23      and so on and i need to execute some cisco commands on remote cisco switches like : now if i do somehting like this               while read ipaddress vlan vlanid     ssh user@ipaddress << 'ENDSSH'     int VLAN vlan-xyz     switchport access vlan  vlanid     wr     ENDSSH      done < inputfile      it is going to ssh everytime and prompt me for password for each and every line in the file even for the same ipaddress. Is there any way to get over with this. I was thinking of putting a the other two columns in the file into an array like for a single ip addresses:               eg for IP:10.192.168.1     array="     int VLAN vlan-xyz     switchport access vlan  3     wr     int VLAN vlan-abc     switchport access vlan  8     "     for next ip ......      and so on how do i do this so that i can just pass an array of command for an ip like this :               while read ipaddress     ssh user@ipaddress " $array"     done < inputfile      but still i need to make sure that if i get the similar ipaddress in the while loop it should not ssh into it but only when it finds a new ipaddress. I am using empty to pass the password non-interactively to the remote switch using ssh but its not very good also beacuse it doesn't hrough any erros if the remote commands fail.everything including passwords are logged into its log file. NOTE : all the ips have the same password for a user


Troubleshooting `$ wget -A.pdf -r site.com`

I am trying to get homework papers with the command but for some reason, it does not return them. Any idea why?               $ wget -A.pdf -r -nd https://noppa.aalto.fi/noppa/kurssi/mat-2.3152/viikkoharjoitukset/      My goal is to download all homework and then merge them with `pdftk` and then search over them with some program -- but I cannot proceed (without again going to Firefox DownloadThemAll -plugin) until I get this working. Ideas why not working? Have sysadmins set up some bans for wgets or why does it fail? I get only this robots.txt -file:               $ cat robots.txt      User-agent: *     Disallow: /          User-agent: Googlebot     Allow: /     Disallow: /cgi-bin/


How to gather DNS A record requests?

I need to record all outgoing `A` records on a RedHat PC. I tried using `tcpdump`:               tcpdumpdns=OUTPUT-FILENAME-HERE     nohup tcpdump -K dst port 53 -w $tcpdumpdns > /dev/null 2>&1 &      It makes an output file like:               19:26:12.185392 IP 172.16.0.6.57977 > google-public-dns-a.google.com.domain: 51198+ A? yahoo.com. (27)      So I need to process that to get the `yahoo.com`:               echo $tcpdumpdns | awk '/ A\? / {u = NF - 1; print $u}' | sed 's/^www.//g; s/.$//g' | sort -u      Is there any better solution to gather all the outgoing `A` record requests? p.s.: collecting DNS A records is only needed to have an up-to-date list of websites that are reachable via HTTPS. So I can generate xml files for HTTPSEverywhere Firefox Add-on. So this is just a part of a script.


Shell hangs when doing command from ssh

I'm trying to automate a server update process. What this should do is check for `git diff` files and list them, to later be copied from one place to the other. Here's my script on my local machine: # update_frontend.sh               #!/bin/sh     ssh [login details] -t -t 'bash -s' < ~/Scripts/update_frontend_cmd.sh      # update_frontend_cmd.sh               SOURCE=/var/www/git_front/mydir_front     TARGET=/var/www/front     dothis=          cd "$SOURCE"     for i in $(git diff --name-only origin/master master)         do         x=`echo $i | sed 's/mydir\///'`             dothis=`echo "     $dothis     cp './mydir/$x' '$TARGET/$x'"`         done          git pull     eval $dothis      Problem is, after any first input from me (be it login for git pull, or if I remove it, any other command I try to execute) causes the shell to hang. I just get a blank line an infinite waiting. Any idea what's causing this?


Duplicating a hard disk

I'd like to simply duplicate a hard disk drive to another hard disk drive of the same size. I know I can simply do:               dd if=/dev/sda of=/dev/sdb      (or whatever the names of the drives are in `/dev`). Is there a better tool for this which will show me visual progress? If I'm only using 30GB of the drive, will it only take as long as it takes to transfer 30GB or will it take as long as the drive capacity?


Which Linux distro/mode offers lowest interference when running your own applications?

I'm interested in a Linux distro to build C projects and test their behavior in a very predictable and controlled environment. I'm especially concerned about letting the scheduler deal as much as possible with the threads in my application and not with other processes running in the background. Size of the distro is not an issue (I don't have resource constraints)


Command line utility to learn bit twiddling hacks

I am currently reading Hacker's Delight and would like to practice as I read through the book. Is there any command line *nix tool to perform binary operations and see output in binary?


Pattern Matching and Delete the whole line

I want to delete all the Lines of File 1, if Column1 of File1 matches exactly with Column 1 File2. File 1:               r001:21:10    21    AAAAAATTTGC    *     =    XM:21     r002:21:10    21    YAAAATTTGC     *     =    nM:21     r001:21:10    21    TTAAAATTTGC    *     =    XM:21     r0012:21:10   21    LLAAAATTTGC    *     +    XM:21     r001:21:10    21    AAAAAATTTGC    *     =    GM:21      File2:               r001:21:10     r001:21:20     r002:41:36     r002:41:99     r002:41:87     r0012:21:1      Expected Output:               r002:21:10    21    YAAAATTTGC     *     =    nM:21     r0012:21:10   21    LLAAAATTTGC    *     +    XM:21      I am new in the field and would appreciate your help.


How to Increase Screen Resolution in Linux Mint. (Parallels and iMac)

I'm very new to Linux and I've decided to install Linux Mint on a Virtual Machine on my iMac 27 inch using Parallels 7. But, the screen resolution is stuck at 800x600 and there are no options in the setting that will let me change it to a higher setting. How can I increase the resolution of Linux Mint? Is there a way to do it through the terminal? I tried downloading the drivers for my raideon 6970m but it's not helping at all. I also tried installing Parallels Tools, but that did not help with the screen resolution. Also tried setting my memory settings for the VM to 512mb... still didn't work at all.


can packages marked Debian/Ubuntu be installed in Linux Mint as well?

I have been using Ubuntu 12.10 for some time now, and I kinda hate it. 12.04 was a lot better. While i can still revert to 12.04, I am thinking about trying out Linux Mint based on 12.10 (the Nadia version). I have not tried Mint before. The question I have is, can all 'Ubuntu' based packages be installed in Mint also, without any issues? For example, most of the packages that I download from respective sites list a version for linux like this "Debian/Ubuntu" and then give a .deb file, which is quite easy to install in Ubuntu. If I get such a file, is that relevant to Linux Mint as well? If a package is made for Debian/Ubuntu, will that package be directly installable in Linux Mint as well?


Native Instruments Audio Kontrol 1 - crackling sound

I am very new user to the Linux world. I istalled newest Ubuntu on my old ASUS A7CC laptop. I would like to use also my older external sound interface Native Instruments Audio Kontrol 1. I am able to choose _Analog output (Audio Kontrol 1)_ When I am at Sound settings menu. But the sound coming out is very glitchy / cracky, I dont know how to describe it... Maybe the best example is situation when you have very limited buffer size on your ASIO sound interface and you have slow PC too and you keep getting buffer underruns in some DAW application. Any idea how to fix this issue?


Accessing another user's files

I have a file `"abc"` with permissions 440 .The owner of this file is `"root"` and the group of this file is `"groupabc"` . I have a user `"user1`" .Is their anyway I can see the contents of files `"abc"` using the user `"user1"` ? I don't have the root password. What comes to my mind is that since file `"abc"` belongs to the group `"groupabc"` ,so if I can add the user `"user1"` to the group `"groupabc"`. I should be able to view the contents of the file `"abc"`. I tried command `usermod` ,but since I don't have the `sudo` access ,It didn't work.Is their anyway I can view the contents of the file `"abc"`.


Run `dbus-send` in a remote system

I'm trying to run `dbus-send` in a remote system but somehow I'm not able to run it. But the same `dbus-send`, if I run it in the local system, is working fine. **COMMAND** : `ssh remote@xx.xx.xx.xxx "dbus-send --print-reply --dest=service.name /object/path object.path.Service.method string:"XYZ""` How can I run `dbus-send` command from the remote system? **SYSTEM INFO** Linux 3.13.0-29-generic Ubuntu i686 GNU/Linux


ecryptfs mounted via command line, what do I need to backup?

I asked this question on the ecryptfs launchpad, but it expired there without answer. https://answers.launchpad.net/ubuntu/+source/ecryptfs- utils/+question/235226 It might be trivial, but I really don't want to get it wrong for obvious reasons. On the other hand, the answers that I find are all related to the Ubuntu home directory encryption where a wrapped passphrase is used and they're confusing me. Question: I am mounting a directory as ecryptfs               sudo mount -t ecryptfs -o  ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_passthrough=no,ecryptfs_enable_filename_crypto=yes /srv_backend /srv_use      Now I want to backup the encrypted folder /srv_backend. What do I need to backup apart from the obvious data there and my password. The command line reply mentions a "Filename Encryption Key (FNEK) Signature [3c2034c2f35aab36]". What is this used for? Do I need to back it up / remember it?


I can't connect with CUPS

I installed CUPS following the Debian Wiki instructions with:               apt-get install cups-client cups-pdf cups      Then started the CUPS service, `/etc/init.d/cups start`, and then tried connecting to `http://localhost:631/`, but `firefox` or `w3m` can't connect with it. When I run `/etc/init.d/cups status`, the answer is: > Status of Common Unix Printing System: cupsd is running. My OS is Debian Wheezy. Edited: Added output of logs and some commands Output from `netstat -lntp`:                   Active Internet connections (only servers)     Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name     tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      1834/rpcbind         tcp        0      0 0.0.0.0:48240           0.0.0.0:*               LISTEN      1868/rpc.statd       tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      2564/cupsd           tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      3206/exim4           tcp6       0      0 :::111                  :::*                    LISTEN      1834/rpcbind         tcp6       0      0 :::44155                :::*                    LISTEN      1868/rpc.statd        Output from `/var/log/cups/error_log`:               E [25/Sep/2013:00:07:12 +0200] Unable to bind socket for address 127.0.0.1:631 - Cannot assign requested address.     E [25/Sep/2013:00:11:42 +0200] Unable to bind socket for address [v1.::1]:631 - Cannot assign requested address.     E [25/Sep/2013:00:11:42 +0200] Unable to bind socket for address 127.0.0.1:631 - Cannot assign requested address.     E [25/Sep/2013:00:34:43 +0200] Avahi client failed, closing client to allow a clean restart     E [25/Sep/2013:08:09:21 +0200] Unable to bind socket for address [v1.::1]:631 - Cannot assign requested address.     E [25/Sep/2013:10:34:11 +0200] Unable to bind socket for address [v1.::1]:631 - Cannot assign requested address.     E [25/Sep/2013:10:47:41 +0200] Unable to bind socket for address [v1.::1]:631 - Cannot assign requested address.     E [25/Sep/2013:16:20:49 +0200] Unable to bind socket for address [v1.::1]:631 - Cannot assign requested address.     E [25/Sep/2013:16:53:56 +0200] Unable to bind socket for address [v1.::1]:631 - Cannot assign requested address.     E [25/Sep/2013:16:53:56 +0200] Unable to bind socket for address 127.0.0.1:631 - Cannot assign requested address.      Output from `/var/log/cups/access_log`:               localhost - - [25/Sep/2013:00:07:15 +0200] "POST / HTTP/1.1" 200 3498492 CUPS-Get-PPDs -      `iptables-save` has no output.


Why does VirtualBox crash when I finish the install of BackTrack?

I have a windows 7 64-bit machine in which I have installed VirtualBox and decided to install BackTrack. The installation finished fine, but when it asked me to "please remove installation media and close the tray (if any) then press ENTER" VirtualBox crashes. I have tried going through the installation process twice but it has crashed both times. Additional Info just in case: Host operating system: windows 7 64-bit 6GB of RAM, I5 ![enter image description here](http://i.stack.imgur.com/t2E2H.png) ![enter image description here](http://i.stack.imgur.com/M0hQQ.png) **SOLVED** : As I said in the comment below I found out that the crash does not affects the install...just restart virtualbox and start backtrack. But I still don't know what is causing this.


How to boot EFI kernel using QEMU (kvm)?

Hey guys I'm trying to emulate a EFI enviroment using QEMU (kmv), virtualbox takes 15 minutes to boot in EFI mode using archboot. Using legacy BIOS mode I can boot using this command:               root@citsnmaiko-deb:/home/maiko/uefi/ovmf# qemu-system-x86_64 -kernel  ../bzImage -initrd ../rootfs.gz -append "rw root=/dev/ram0  ramdisk_size=40960"      and it works with my custom kernel and file system.               file ../bzImage      ../bzImage: Linux kernel x86 boot executable bzImage, version 3.6.1 (root@citsnmaiko-deb) #4 , RO-rootFS, swap_dev 0x3, Normal VGA      it has EFI support too. I'm trying to do the same with EFI files that I downloaded from here               wget http://ufpr.dl.sourceforge.net/project/edk2/OVMF/OVMF-X64-r11337-alpha.zip -P ovmf     cd ovmf/     unzip -x OVMF-X64-r11337-alpha.zip     # rename the files for QEMU find them     mv OVMF.fd bios.bin     mv CirrusLogic5446.rom vgabios-cirrus.bin     # start QEMU     root@citsnmaiko-deb:/home/maiko/uefi/ovmf# qemu-system-x86_64 -L .  -kernel  ../bzImage -initrd ../rootfs.gz -append "rw root=/dev/ram0  ramdisk_size=40960"      Could not open option rom 'linuxboot.bin': No such file or directory     pci_add_option_rom: failed to find romfile "pxe-e1000.bin"      And I'm dropped in EFI shell not enable to boot. ![QEMU + EFI + LINUX KERNEL + SHELL](http://i.stack.imgur.com/qd4Ax.png) If I use the the latest Ubuntu release using the same EFI enviroment               root@citsnmaiko-deb:/home/maiko/uefi/ovmf# qemu-system-x86_64 -L . -boot d -cdrom ../ubuntu-12.10-desktop-amd64.iso     pci_add_option_rom: failed to find romfile "pxe-e1000.bin"      The boot process works fine ![enter image description here](http://i.stack.imgur.com/AML7H.png) I've tried to replace the Ubuntu boot files with mine but I'm not completely understand its functionality then I just replace the files after mount the iso:               mkdir tmp     bsdtar xf ubuntu-12.10-desktop-amd64.iso -C tmp     cp bzImage tmp/casper/vmlinuz     cp rootfs.gz tmp/casper/initrd.lz      genisoimage -o customUbuntu.iso tmp/     qemu-system-x86_64 -L . -boot d -cdrom customUbuntu.iso       the same EFI Shell appears. Is it ok? initrd.lz and rootfs.gz are interchangeable right ? How about bzImage and vmlinuz ? What am I missing?


How to set an alias on a per-directory basis?

Suppose you have an alias `go`, but want it to do different things in different directories? In one directory it should run `cmd1`, but in another directory it should run `cmd2` By the way, I have an aliases for switching to the above directories already, so is it possible to append the `go` alias assignment to the `foo` alias?               alias "foo=cd /path/to/foo"      Working in bash(?) on OSX.


Configuring Wireless Network

After a long struggle I finally seem to have installed the non-free wireless firmware for my wireless NIC. I'm trying to set up a file server, so I want to configure the network to be static. Would one of you guys mind helping me? For example I don't know what my /etc/network/interfaces file should look like, currently it looks like this:               auto lo     iface lo inet loopback               allow-hotplug wlan1     iface wlan1 inet static         address 192.168.10.111         netmask 255.255.255.0         network 192.168.10.0         broadcast 192.168.10.255         gateway 192.168.10.1         # wireless-* options are implemented by the wireless-tools package         wireless-mode managed         wireless-essid Optimus Pwn         wpa-psk s:roonwolf # I changed this from wiresless-key1 or something like that         dns-* options are implemented by the resolvconf package, if installed         dns-nameservers 192.168.10.1         dns-search localdomain      My ifconfig command looks like this:               lo Link encap: Local Loopback     inet addr: 127.0.0.1 Mask: 255.0.0.0     inet6 addr: ::1/128 Scope: Host     UP LOOPBACK RUNNING MTU:16436 Metric:1     RX packets: 95 errors: 0 dropped: 0 overruns: 0 frame: 0     TX packets: 95 errors: 0 dropped: 0 overruns: 0 carrier: 0     collisions: 0 txqueuelen: 0     RX bytes: 10376 (10.1KiB) TX bytes: 10376 (10.1 KiB)               wlan1 Link encap: Ethernet HWaddr 00:18:f3:85:99:07     inet addr:192.168.10.111 Bcast:192.168.10.255 Mask:255.255.255.0     UP BROADCAST MULTICAST MTU:1500 Metric:1     RX packets:0 errors:0 dropped:0 overruns:0 frame:0     TX packets:0 errors:0 dropped:0 overruns:0 carrier: 0     collisions:0 txqueuelen:1000     RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)      Here's what I get when I iwlist my ssid:               wlan1     Scan completed :           Cell 01 - Address: 00:14:D1:A4:0A:36                     Channel:6                     Frequency:2.437 GHz (Channel 6)                     Quality=70/70  Signal level=-17 dBm                       Encryption key:on                     ESSID:"Optimus Pwn"                     Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s                               9 Mb/s; 12 Mb/s; 18 Mb/s                     Bit Rates:24 Mb/s; 36 Mb/s; 48 Mb/s; 54 Mb/s                     Mode:Master                     Extra:tsf=00000003ff6381c1                     Extra: Last beacon: 100ms ago                     IE: Unknown: 000B4F7074696D75732050776E                     IE: Unknown: 010882848B960C121824                     IE: Unknown: 030106                     IE: Unknown: 0706555320010B1B                     IE: Unknown: 200100                     IE: WPA Version 1                         Group Cipher : TKIP                         Pairwise Ciphers (1) : TKIP                         Authentication Suites (1) : PSK                     IE: Unknown: 2A0100                     IE: Unknown: 32043048606C                     IE: Unknown: DD180050F2020101070003A4000027A4000042435E0062322F00                     IE: Unknown: DD1E00904C334C101BFFFF000000000000000000000000000000000000000000                     IE: Unknown: 2D1A4C101BFFFF000000000000000000000000000000000000000000                     IE: Unknown: DD1A00904C3406001900000000000000000000000000000000000000                     IE: Unknown: 3D1606001900000000000000000000000000000000000000                     IE: Unknown: DD0900037F01010000FF7F      When I ping 192.168.10.101(My primary desktop) I get               PING 192.168.10.101 (192.168.10.101) 56(84) bytes of data.     From 192.168.10.111 icmp_seq=2 Destination Host Unreachable      When I ping google.com I get(after a lengthy pause):               ping: unknown host google.com      What exactly am I doing wrong here? Should I restart the network?


Unable to access Linux share from a Windows machine with NT_STATUS_BAD_NETWORK_NAME error

On the Linux machine I changed the smb.conf like this:               [john]     path = /root/john/downloads     available = yes     valid users = john     read only = no     browsable = yes     public = yes     writable = yes      The path /root/john/downloads is mounted like this:               mount -o umask=0000,gid=1001,uid=1001 /dev/sdb1 /root/john/downloads      where gid and uid are `john`. Now when I try to access the share with the Windows machine \\192.168.0.2\john I get the error `network path was not found` with Wireshark I saw it's the NT_STATUS_BAD_NETWORK_NAME error. What is wrong with this, why isn't it working? When I choose /home/john as the path it works perfectly.


Why does --text="$@" only pass the first word?

When I run the following script with some arguments like `arg1 arg2 arg3`:               #!/bin/bash     zenity --entry --text="$@"      zenity creates an entry dialog with this text: "arg1" whereas I expect "arg1 arg2 arg3" If I use a variable like the following script it shows all arguments for the entry text.               #!/bin/bash     text="$@"     zenity --entry --text="$text"      Whats the difference between these scripts? Why the first one replaces `$@` with the first argument only?


Missing usbserial driver

I am looking for the usbserial driver: “option” for Debian Jessie and armel architecture. Is there a package that contains this and other usbserial drivers? Where is the source-code for this driver located?


Replace "<?php print t('Blabla'); ?>" to be "Blabla"

Lets say in `file.php`, there is lots of php print text: `<?php print t('Blabla'); ?>`, `<?php print t('Text Here'); ?>`, etc. What I need is to remove `<?php print t('` and `'); ?>` of the php print text. So, `<?php print t('Blabla'); ?>` will become `Blabla`, `<?php print t('Text Here'); ?>` will become `Text Here`, etc. If one php print text in one line, I think I know how to use `sed` to replace, but how about if one long line contains several php print text I just wonder how to replace it?


Samsung Ultra book won't wake up after hibernate and suspend on Crunchbang

I've been struggling for a few hours to get suspend and hibernate working on my Samsung ATIV BOOK 9 Lite. When I try to resume the screen power led goes on, but screen stays black. The capslock led doesn't react when pressing the capslock key, so increasing the brightness of the screen using the Fn keys also doesn't work. I've used kernel versions 3.11 and 3.12rc5 and the pm logs won't tell me much.               $ uname --all     Linux wiske 3.11-2-amd64 #1 SMP Debian 3.11.10-1 (2013-12-04) x86_64 GNU/Linux      My hardware:               $ lspci     00:00.0 Host bridge: Advanced Micro Devices [AMD] Family 16h Processor Root Complex     00:01.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Device 983d     00:01.1 Audio device: Advanced Micro Devices [AMD] nee ATI Device 9840     00:02.0 Host bridge: Advanced Micro Devices [AMD] Family 16h Processor Function 0     00:02.3 PCI bridge: Advanced Micro Devices [AMD] Family 16h Processor Functions 5:1     00:02.4 PCI bridge: Advanced Micro Devices [AMD] Family 16h Processor Functions 5:1     00:10.0 USB controller: Advanced Micro Devices [AMD] FCH USB XHCI Controller (rev 01)     00:11.0 SATA controller: Advanced Micro Devices [AMD] FCH SATA Controller [AHCI mode] (rev 40)     00:12.0 USB controller: Advanced Micro Devices [AMD] FCH USB OHCI Controller (rev 39)     00:12.2 USB controller: Advanced Micro Devices [AMD] FCH USB EHCI Controller (rev 39)     00:13.0 USB controller: Advanced Micro Devices [AMD] FCH USB OHCI Controller (rev 39)     00:13.2 USB controller: Advanced Micro Devices [AMD] FCH USB EHCI Controller (rev 39)     00:14.0 SMBus: Advanced Micro Devices [AMD] FCH SMBus Controller (rev 3a)     00:14.2 Audio device: Advanced Micro Devices [AMD] FCH Azalia Controller (rev 02)     00:14.3 ISA bridge: Advanced Micro Devices [AMD] FCH LPC Bridge (rev 11)     00:18.0 Host bridge: Advanced Micro Devices [AMD] Family 16h Processor Function 0     00:18.1 Host bridge: Advanced Micro Devices [AMD] Family 16h Processor Function 1     00:18.2 Host bridge: Advanced Micro Devices [AMD] Family 16h Processor Function 2     00:18.3 Host bridge: Advanced Micro Devices [AMD] Family 16h Processor Function 3     00:18.4 Host bridge: Advanced Micro Devices [AMD] Family 16h Processor Function 4     00:18.5 Host bridge: Advanced Micro Devices [AMD] Family 16h Processor Function 5     01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 0c)     02:00.0 Network controller: Atheros Communications Inc. AR9565 Wireless Network Adapter (rev 01)      Last log lines from `/var/log/pm-suspend.log`:               $ tail -n /var/log/pm-suspend.log     + maybe_chvt     + is_set true     + return 0     + return     + is_set no     + return 1     + local status=0     + log      + is_set true     + return 0     + local fmt=%s\n     + [  = -n ]     + printf %s\n           + log -n /usr/lib/pm-utils/sleep.d/99video hibernate hibernate:      + is_set true     + return 0     + local fmt=%s\n     + [ -n = -n ]     + fmt=%s     + shift     + printf %s /usr/lib/pm-utils/sleep.d/99video hibernate hibernate:      /usr/lib/pm-utils/sleep.d/99video hibernate hibernate: + hook_exit_status 0     + log success.     + is_set true     + return 0     + local fmt=%s\n     + [ success. = -n ]     + printf %s\n success.     success.     + LAST_HOOK=99video     + IFS=          + IFS=            + inhibited     + [ -f /var/run/pm-utils/pm-suspend/storage/inhibit ]     + return 0     + date     + log Tue Dec 10 22:52:08 CET 2013: performing hibernate     + is_set true     + return 0     + local fmt=%s\n     + [ Tue Dec 10 22:52:08 CET 2013: performing hibernate = -n ]     + printf %s\n Tue Dec 10 22:52:08 CET 2013: performing hibernate     Tue Dec 10 22:52:08 CET 2013: performing hibernate     + sync     + do_hibernate     + [ -n  ]     + echo -n disk      How can I enable suspend and/or hibernate on my CrunchBang installation?


How to get server's ssl certificate in a human readable form?

For example, I want to find out when the certificate for encrypted.google.com expires (i.e. `Not After` date), and what other domains may use it for authentication (Subject Alternative Names).


Debian Console Font with Nvidia Drivers?

On my Debian Squeeze (6.x) installation my system had a nice small login shell font (terminus??) but after installing the nvidia drivers for my machine it boots up using a very chunky font (on a 24 inch screen). I tried to edit the appropriate file leaving font as "fixed" but changing size from 16 to 8 (one of the suggested options) but it made no visible difference. I may wish to occasionally ditch gnome and work purely on a text console. Any solution or suggestions?


How does apache determine what directory to show from public_html?

I am using Ubuntu 12.04 and have configured apache to serve from `~/public_html`. I am trying to serve some directory contents over http on LAN. When I did the following:               ln -s ../Videos/android-internals-marakana/ android-internals-marakana        I was able to see the specified directory at localhost (in browser) with my public_html directory contents as follows:               k4rtik: public_html $ ls -l     total 12     lrwxrwxrwx 1 k4rtik k4rtik   37 May 27 15:59 android-internals-marakana -> ../Videos/android-internals-marakana/     drwxrwxr-x 2 k4rtik k4rtik 4096 May 19 13:05 cgi-bin     -rw-rw-r-- 1 k4rtik k4rtik 1406 May 19 12:20 favicon.ico     -rw-r--r-- 1 k4rtik k4rtik  178 May 19 10:21 nindex.html      But when I similarly try creating a link to android documentation with               ln -s ../bin/android-sdk-linux/docs/ droid-docs      I get the symbolic link in directory listing but not at localhost in browser. I have checked everything I could on my own - directory permissions, validity of the link, typing the dir name in the url directly (received **Forbidden** - You don't have permission to access /droid-docs on this server. there). Any clue on what's going on and how to get this to work? Is it because `bin` folder is somewhat special as compared to other folders in my `home` directory?


HTTPd shows PHP code instead of executing it

My setup:               # grep php /etc/httpd/conf/httpd.conf      LoadModule php5_module  modules/libphp5.so     AddType x-httpd-php .php     AddHandler php5-script .php          # grep PHP /etc/httpd/conf/httpd.conf      PHPIniDir /etc/          # grep open_tag /etc/php.ini      ; short_open_tag     short_open_tag = On          # /etc/init.d/httpd start     Starting httpd: [Tue Dec 04 03:26:29 2012] [warn] module php5_module is already loaded, skipping     httpd: apr_sockaddr_info_get() failed for holdsworth     httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName                                                                [  OK  ]          # cat /var/log/httpd/error_log      [Tue Dec 04 03:26:37 2012] [notice] SELinux policy enabled; httpd running as context unconfined_u:system_r:httpd_t:s0     [Tue Dec 04 03:26:37 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)     [Tue Dec 04 03:26:37 2012] [warn] module php5_module is already loaded, skipping     [Tue Dec 04 03:26:45 2012] [notice] Digest: generating secret for digest authentication ...     [Tue Dec 04 03:26:45 2012] [notice] Digest: done     [Tue Dec 04 03:26:53 2012] [warn] ./mod_dnssd.c: No services found to register     [Tue Dec 04 03:26:53 2012] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.3.3 configured -- resuming normal operations     [Tue Dec 04 03:28:35 2012] [notice] caught SIGTERM, shutting down      access_log is empty. When I open index.php, it shows its content.               [root@holdsworth steve]# ls -lah /var/www/html/php/index.php      -rwxrwxrwx. 1 root root 1.7K Oct 31 18:38 /var/www/html/php/index.php      Help please!!


What is the 't' folder?

I'm mainly a Windows guy, programming C#, but I often do use technologies that were intended for Linux machines like git, MySQL, perl scripts, memcached, php, etc... And therefore I am exposed to these tools. I like looking at the code base of these tools every once in a while, and something I realized in many code bases is a folder called `t` with a bunch of files with the `t` extension. What are these files? How come the folder doesn't have a more descriptive name?


small screen in virtualbox installed OSs

have installed two virtual OSs. The host OS is debian. Two virtual OSs are win XP and debian ( without graphical environment) . I have install guest additions too. The win XP one is displayed in fullscreen mode but the debian one isn't. Is it related to it is in text mode ? How can I bring it to fullscreen mode? I use virtualbox.


Grep with spaces suddenly doesn't work

When performing a `grep` like:               $ tail -f apilog_2014.07.09.log | grep "HELLO" | grep "99999"      I get the desired output:               12:22:35 server apache2:  HELLO FRIEND 99999     12:22:35 server apache2:  HELLO FRIEND 99999     12:22:35 server apache2:  HELLO FRIEND 99999      However if I do:               $ tail -f apilog_2014.07.09.log | grep "HELLO FRIEND" | grep "99999"      I don't get anything. My locale settings are all set to `en_US.utf8` and I've tested with `[[:space:]]` and with `\s`. No results. The file itself is `text/plain; charset=us-ascii` (checked with `file -bi apilog_2014.07.09.log`). The files themselves are written with `rsyslog`, if that is any type of hint. Using `Ubuntu 12.04.4 LTS`. Is there anything I'm missing? As requested:               $ grep "HELLO" apilog_2014.07.09.log | od -c     0000000   1   4   :   2   7   :   0   0       s   o   f   i   a       c     0000020   a   r   l   o   s   :           A   P   I   L   O   G       H     0000040   E   L   L   O       F   R   I   E   N   D       t   e   s   t     0000060   i   n   g  \n   1   4   :   3   1   :   4   5       s   o   f     0000100   i   a       c   a   r   l   o   s   :           A   P   I   L     0000120   O   G       H   E   L   L   O       F   R   I   E   N   D     0000140   t   e   s   t   i   n   g       6   3   9   0   3  \n     0000156      **UPDATE 14 Jul 2014** Answer here: Grep with spaces suddenly doesn't work Related question (same solution): Piping from grep to awk not working


Create a new command for mutt

I try to create a command (and not a macro) on mutt to print the mail in file, for this a put the following line on the `~/.muttrc`:               macro index,pager print-on-file '<enter-command>set print_command="muttprint -x --paper A4 --printer TO_FILE:/tmp/$USER.ps && zathura /tmp/$USER.ps"<enter>p' "Print on file and open it on the reader"      As you see, I try to make the command `<enter-command>set print_command="muttprint -x --paper A4 --printer TO_FILE:/tmp/$USER.ps && zathura /tmp/$USER.ps"<enter>p` by `:print-on-file` and not by pressing a single key. I know `macro` isn’t the good command but I don’t found on the mutt’s configuration. So, how to make a new command?


Why does awk not sum to 0

I have this file and I want to sum all the number in first column. Easy:               awk '{s+=$1;print $1,s}' file     -0.4157 -0.4157     0.0143 -0.4014     0.5973 0.1959     -0.5679 -0.372     -0.2041 -0.5761     0.7130 0.1369     -0.5931 -0.4562     -0.9191 -1.3753     0.1048 -1.2705     0.4196 -0.8509     0.4196 -0.4313     0.2719 -0.1594     0.0797 -0.0797     0.0797 -5.55112e-17      You see, the last one should be 0. I know that `e-17` is zero, but sometimes the output is exactly 0. If it's not 0, the output is in range of `e-15` to `e-17`, in negative or positive form. To fix this, I have to use the absolute value:               awk '{s+=$1;if (sqrt(s^2)<0.01) s=0;print $1,s}' file      Do you know why this happens?


Adding comments using 'set -x'

Sometimes it is really handy to just add               set -x      to the top of your script to show all commands before they are executed. There is only one drawback creating scripts with a decent output: I don't know how to add text output to the script this way. If I use               echo 'some comment'      it will result in printing it doubled:               + echo 'some comment'     some comment      And if I use `#` it isn't shown at all. How can I add comments that are printed out like with `echo`? If I use `set -x`?


cp --attributes-only documented but not working "now"?

**PROBLEM** : `cp --attributes-only Source Target` results in two files unchanged, where the attributes from _Source_ should be copied to _Target_. **Attempts to solve** : As I have the **8.13** version of `coreutils` installed [Aha?], I wonder why this option is mentioned, but doesn't seem to work. No error messages, no nothing, even when running it with `\--verbose`. The same goes when trying to copy the attributes from various accounts. Nothing. In `cp`'s man page I found the option `\--attributes-only -> don't copy the file data, just the attributes` In this answer I found that > With recent versions of GNU coreutils (≥ **8.6** ), you can use cp > --attributes-only to replicate the metadata … of a file on another file > without changing the target file's contents. In another posting, someone mentions to be working in Ubuntu, but then there are remarks that I doesn't work on Mac OS X. **QUESTION** : Where am I wrong? Could it be the older version of coreutils - and if so, why is there something documented that doesn't work »now«?


How do I permanently mount a separate partition as folder in a separate home partition?

I'd like to create the following situation:   * A separate partition for my user's home directory,   * A second separate partition for _~/Documents_ , and   * A third separate partition for _~/Videos_ and _~/Music_. Achieving the first point doesn't seem to be hard, and that's already covered in questions like: How can I move the home directory to a separate partition? Achieving the other two goals should follow the same pattern, but I'm not sure if I have to take care of the order of mounting somewhere/-how (i.e., **first** _/home/user_ , **then** _/home/user/whatever_ ) . AFAIK the order in _/etc/fstab_ doesn't matter at all. While it might be easier to set up, I **don't** want to make the XDG directories symbolic links, unless other solutions were overly complex.


How 'safe' is it to use new distributions of linux?

I _hope_ this is the right place to ask this. I was looking at some new distros of linux that came out fairy recently and I really like their UI. I want to start using one of these but I'm a bit skeptical about the security of the system. Is it possible that when building the system they had introduced (unintentionally) security bugs ? I trust distributions such as ubuntu and debian because they have been around a long time and have good developers working on them. Should I also trust new distros? As for the new distributions I was talking about: Elementary OS, Bodhi, Pinguy.


Allow Windows file share through a Linux Firewall

I'm struggling to enable NTFS share between two Windows (XP and 7) hosts through a Linux firewall. Here's my setup:               [XPMachine-LAN1]---------->[LINUX FIREWALL]---------->[Win7-LAN2]      What I want to do is to NAT the NTFS input from the XP machine to the same ports on the Win7 machine. The problem is that when I try from the XP machine to open the network share `\\\LINUXFIREWALL` then the firewall doesn't seem to be NATing the packets to the Win7 machine. I've opened the standard NTFS/Samba ports like 135:139 and 445, some of them need UDP and the others TCP (details available on various sites). However since I am running 2 different versions of windows I tried to google that to see if there would be a change between XP and 7 and that list is available on MS website : http://windows.microsoft.com/en- GB/windows7/Networking-home-computers-running-different-versions-of- Windows#section_2 My question is, if you are running 2 windows machine through a *nix box with iptables, can I ask what your iptables file looks like? Am I missing something? Thanks


dhcp settings wifi radar linux mint

I am trying to connect to my wifi network. Using the standard connection manager in linux mint 13 xfce was not a good idea. No wifi networks are shown there. and when I left-click on it, the wireless are is gray. I found the tool called wifi-radar which shows all available networks around. But connecting to the right network is not possible so far. I seem to have configure a lot of things to get it right. However, I receive a dhcp error and I am trying to refer the dhcp setting right. In wifi-radar, it refers to this path:               command: /sbin/dhcpcd     pid file: /etc/dhcpc/dhcpcd-%(interface)s.pid      when I lookup this file or directory, it is not there. Where should the DHCP setting refer to? and for the ssid settings: I have a WPA security set. So I guess I have to add it as the tool does not seem to recognize this automatically (why not? the windows xp zero configuration utility does not seem to be so bad at all). which settings for my wifi network do I have to set?               -wifi options:     mode:     channel:     key:     security:          -wpa:     driver:      I am dissapointed that it is so hard to connect to my wifi network using a linux version, aimed at user-friendly-ness output of `iwconfig`:                wlan1     IEEE 802.11g  ESSID:off/any             Mode:Managed  Frequency:2.412 GHz  Access Point: Not-Associated              Bit Rate:54 Mb/s   Tx-Power:10 dBm   Sensitivity=0/3             RTS thr:off   Fragment thr:off           Power Management:off           Link Quality:0  Signal level:0  Noise level:0           Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0           Tx excessive retries:0  Invalid misc:0   Missed beacon:0      output of `iwlist scan`:                Cell 04 - Address: CC:5D:4E:91:2F:CC                     ESSID:"DAroontjepower"                     Protocol:IEEE 802.11b                     Mode:Master                     Frequency:2.412 GHz (Channel 1)                     Quality:89/100  Signal level:-39 dBm  Noise level:-96 dBm                     Encryption key:on                     Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s                               9 Mb/s; 12 Mb/s; 18 Mb/s                     Extra:bcn_int=100                     Extra:atim=0                     IE: Unknown: 000E4441726F6F6E746A65706F776572                     IE: Unknown: 010C82848B960C1218243048606C                     IE: Unknown: 02050000000001                     IE: Unknown: 030101      one more thought: I read on another site that when you use ndiswrapper, for some networkadapters this means only no security or WEP-security might work. How can I found out if this cards also belongs to these cards? Might that also explain that wcid-gtk says the network is WEP encrypted?


Clearing dpkg downloaded data?

I'm using dpkg (Cydia), and a package keeps saying that it's downloading 26.2 MB, and resuming at 166.0 kB. It is consistently failing to install properly. Is there a way to clear this "saved data" and start the download fresh again?


xinerama, 2 cards, 3 monitors

I've been trying to get this right and I'm so nearly there, but not quite. This machine has an Intel adapter with one monitor, and an ATI adapter with two. I'm happy to use xinerama to get this working. Here is my xorg.conf (Ubuntu 12.04):-               Section "Monitor"         Identifier "Dell1"         Option  "DPMS"     EndSection          Section "Monitor"         Identifier "Dell2"         Option  "DPMS"         Option "Left" "Dell3"     EndSection          Section "Monitor"         Identifier "Dell3"         Option  "DPMS"     EndSection          Section "Device"         Identifier      "intel"         Driver          "intel"         BusID           "PCI:0:2:0"     EndSection          Section "Device"         Identifier      "ati"         Driver          "radeon"         BusID           "PCI:2:0:0"     #   Option          "Monitor-DVI-0" "Dell3"     #   Option          "Monitor-VGA-1" "Dell2"     EndSection          Section "Screen"         Identifier      "Screen 0"         Device          "intel"         #Monitor                "Dell1"         DefaultDepth    24     EndSection          Section "Screen"         Identifier      "Screen 1"         Device          "ati"         Monitor         "Dell2"         SubSection      "Display"                 Depth   24                 Virtual 2560 1024         EndSubSection     EndSection          Section "ServerLayout"         Option  "xinerama"      "on"         Identifier      "multihead"         Screen          "Screen 0"         Screen          "Screen 1" LeftOf "Screen 0"     EndSection          Section "Module"         Load    "glx"     EndSection      All three monitors are 1280x1024 Dells. With this, I get all three monitors live. The one connected to the Intel (the rightmost) is the primary Physical arrangement on desk:               [ Dell 3 ] [ Dell 2 ] [ Dell 1 ]     {      ATI          } {  Intel }      X server layout:               [Dell  2 ]          ] [ Dell 1 ]     [     Dell 3        ] [        ]      By this, I mean that if you start at the RHS on Dell 1, and move left, you jump to Dell 3 next. Dell 3 is showing a virtual size of 2560, and as you hit the left edge of it, it starts to pan. At this point, you also appear on Dell 2, and by the time you hit the leftmost edge, Dell 3 and 2 are showing the same thing. How can I get the monitors to lay out correctly? Many thanks! John EDIT:- Tried this instead, and again it almost works. Without the "Primary" options I get Unity on Dell1 and black screens on the others (but mouse moves across). With "Primary" options I get no Unity, background on all monitors which flickers, displays flicker when keys pressed, and it's generally very odd.               Section "Monitor"         Identifier "Dell1"         Option  "DPMS"         Option "Primary" "False"     EndSection          Section "Monitor"         Identifier "Dell2"         Option  "DPMS"         Option "Primary" "False"     EndSection          Section "Monitor"         Identifier "Dell3"         Option  "DPMS"         Option "Primary" "True"     EndSection          Section "Device"         Identifier  "intel"         Driver      "intel"         BusID       "PCI:0:2:0"     EndSection          Sec>tion "Device"         Identifier  "ati0"         Driver      "radeon"         Option      "ZaphodHeads" "DVI-0"         BusID       "PCI:2:0:0"         Screen      0     EndSection          Section "Device"         Identifier  "ati1"         Driver      "radeon"         Option      "ZaphodHeads" "VGA-1"         BusID       "PCI:2:0:0"         Screen      1     EndSection          Section "Screen"         Identifier  "Screen 0"         Device      "intel"         Monitor     "Dell1"         DefaultDepth    24     EndSection          Section "Screen"         Identifier  "Screen 1"         Device      "ati0"         Monitor     "Dell2"         DefaultDepth    24     EndSection          Section "Screen"         Identifier  "Screen 2"         Device      "ati1"         Monitor     "Dell3"         DefaultDepth    24     EndSection          Section "ServerLayout"         Option  "xinerama"  "on"         Identifier  "multihead"         Screen      "Screen 0"         Screen      "Screen 1" LeftOf "Screen 0"         Screen      "Screen 2" LeftOf "Screen 1"     EndSection          Section "Module"         Load    "glx"     EndSection


What is the network controller and how does it relate to Wi-Fi?

I am working on getting wireless up and running on my Ubuntu 12.04 machine. In this tutorial, the guy says "your network controller is your Wi-Fi." To me, that seems to imply that the network controller is the piece of hardware that handles your wireless connection. Does the network controller also handle your Ethernet connection? When I run `lspci` and `grep` for network I see that my Network controller is a Realtek Semiconductor Co. device. What exactly does that device do? My Ethernet is working fine. Do I need to find a driver that will handle both wired and wireless connections for this network controller? Or do I need a Wi-Fi driver for the network controller because the network controller only handles Wi-Fi.               $ lspci -vvnn | grep Network     03:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:818b]


How do I actually read an XML file in human form that makes sense?

I downloaded a catalog and it is in XML format. How do change it from code to human-readable form, and ideally save it as a plain text file? I've never worked/seen these before; I tried messing with xslproc as it was recommended on here for somewhat similar things, but couldn't get it to work. I successfully loaded it in textWrangler, which formats it correctly (indents/colors/etc) in XML, but i don't see how I can actually 'run' it to print its contents. I also tried Excel, Word, Notepad, and just ended up with errors. If that wasn't clear, i have stuff like this:                     51.9029244701	           47.0082067303	      and I want it like this:               51.9029244701     47.0082067303      I want to make a text file with this catalog's information.


Systemd user unit that depends on system unit (sleep.target)

I was reading doc and it is still unclear for me, whether the following is possible to accomplish: service defined in `~/.config/systemd/user/task.service` that depends on system `sleep.target` (`~/.config/systemd/user/sleep.target.wants/task.service`). Now I expect `task.service` to start when I run `$ systemctl suspend`, however `task.service` is not started. I'm running debian, with systemd version 208, `systemd --user` configured more or less as described on the ArchWiki. I wonder whether my scenario could be implemented with systemd at all, or are `\--system` and `\--user` completely isolated by design so that `\--user` unit may not be a dependency of a `\--system` unit. In case it is possible, what might be the problem in my case?


VirtualBox guest using Bridged networking unable to obtain DHCP address

I have a computer, called Loki, that works as a virtual machine host and DHCP server. The DHCP daemon is listening on port `eth0`. Part of `/etc/dhcp.conf`:               subnet 192.168.13.0 netmask 255.255.255.0 {         range 192.168.13.140 192.168.13.140;     }          host Windows7VM {         hardware ethernet 08:00:27:57:C9:69;         fixed-address 192.168.13.150;         option subnet-mask 255.255.255.0;         option broadcast-address 192.168.13.255;         option routers 192.168.13.1;     }          host TerminalAdam {         hardware ethernet ...;         fixed-address 192.168.13.151;         option subnet-mask 255.255.255.0;         option broadcast-address 192.168.13.255;         option routers 192.168.13.1;     }      `eth0` is configured like this:               ifconfig eth0 192.168.13.1 netmask 255.255.255.0      There is another computer, called TerminalAdam. The DHCP client configuration of TerminalAdam works fine. Now I need to connect Windows7 virtual machine to this network, so that both TerminalAdam and Windows7VM DHCP clients are configured by Loki's DHCP server. In VirtualBox VM network settings I choose `bridge`, device `eth0`. When I turn on the VM, I get this in `/var/log/messages.log` several times:               Apr 27 14:36:41 localhost dhcpd: DHCPDISCOVER from 08:00:27:57:c9:69 via eth0     Apr 27 14:36:41 localhost dhcpd: DHCPOFFER on 192.168.13.150 to 08:00:27:57:c9:69 via eth0      But in Windows I have "connection to network is not available" in the network adapter status and I cannot connect.


issues with GNU tail -f and combination of commands

$ tail -f /logs/filename.log | awk '!(/list)'      I am able to run this command in GNU Linux flavour But when I written in a script it is not working. test.ksh:               variable="/logs/filename.log | awk '!(/list)'"      tail -f $var      Getting the error as               tail: cannot open `|' for reading: No such file or directory     tail: cannot open `grep' for reading: No such file or directory     tail: cannot open `list' for reading: No such file or directory      How is need to work on this? Can anyone guide on this?


Succinct way to respond to user input?

Of course you can do this sort of thing,               read var; if [[ $var = 'y' ]]; then echo "Yes"; fi      But is there any way to skip the first step and do something a little more like this, (ideally without needing a subshell):               if [[ $(read var) = 'y' ]]; then echo "Yes"; fi      Of course the above doesn't work unless you add `echo`, but I'm looking for something much cleaner and simpler than this:               if [[ $(read var; echo "$var") = 'y' ]]; then echo "Yes"; fi      It would be ideal if this would work:               if [[ read = 'y' ]]; then echo "Yes"; fi


After adding FORWARD NAT rules, cannot connect system eth0

I was trying to make bridge connection between wlan and eth on Centos.. I made Forward and NAT rules and then something wrong with System eth0 connection. It does not connect anymore.. Could you help me how to solve this issue? How can I go back working eth0 settings ? Edit : Here is what I did from command line                iptables -A FORWARD -i eth1 -j ACCEPT      iptables -A FORWARD -o eth1 -j ACCEPT           sysctl -w net.ipv4.ip_forward=1


Boot SystemRescueCd using UEFI?

How would you boot SystemRescueCd if you don't have the option to use the legacy-bios? I have the new UEFI and I have no luck booting SystemRescueCd(with a USB stick). I am planning to back up my partitions to a separate HDD. My OS is x86_64 Arch Linux. Do you recommend any other distributions that boot with UEFI? Hardware: Motherboard, Toshiba VG10S, processor, i7-4700mq haswell 22nm, graphics, Nvdia geforce gt 740m. I also have failed to boot Arch Linux(2013.07.01), Ubuntu (13.04), and Parted Magic(2013.06.15).


Modify XML file based on partial name

I've been using Xmlstarlet to modify some `.xml` files but I am lost trying to figure out how to modify a tag based on a partial name. What is the best way to comment out an entire line that begins with `<` and ends with `>` when the line has a name of `spiral` in it?


Share aliases and PATH setting between zsh and bash

The shell that I normally use is `zsh`. I have several aliases to enable color in some programs such as `ls` and `grep`. I've also set my custom path so that I can execute programs in non-standard place (such as in `~/bin/`). I won't change root's shell to `zsh`, but I would like to share these setting so that root can have it as well. I find out that `zsh` is not sourcing `/etc/profile`. I can source it in `/etc/zsh/zprofile`, but I would like some other more "proper" way.


Changing user password through GUI app

I was making a GUI application to manage users and groups in Linux! I'm done with the part where it creates a new user, but stuck with the part where it gives the newly created user a new password. What my app simply does is to take the required input (username, list of groups, and password) through a GUI and runs a script passing this info as argument. Let's say we have a user account, xyz. If I want to change the password for this account, then all I need to do is simply run the command:               passwd xyz      This will ask for new password. Now I can create a new account using scripts because all the required info is passed in the command line.               useradd -m -G users -g "groups" -s /bin/bash "UserName"      I can run a script through Qt app and create the user, but in `passwd cmd`, the input is asked in the other line. How does one deal with that?


Is there a way to switch to "su -" after switching users through "su"?

Maybe the title wasn't worded quite clear. But basically what I want to be able to do is to switch to having used "su -" instead of the traditional hyphenless "su" after already using "su" to switch to another account. My initial thought was to do another "su -" but that sounded a bit silly, is there a better way to do this?


What is the font used for GNU documentation?

I am interested in learning how documentation for GNU related software is written, and am wondering what type of font is used in their PDF documentation? (for instance, the GCC manual here: http://gcc.gnu.org/onlinedocs/gcc-4.5.1/gcc.pdf) Thanks.


How do I fix unix so that I can use the arrow keys in a terminal?

Before I was able to use the `Up`/`Down` arrow keys to cycle through previous commands, but now when I press a directional key it outputs "^[[A". I'm running a bash shell. How do I fix this?


Issues using sublime text to edit command line in VI mode

I am using the following to edit the current command line in Sublime Text 2 (using a working `subl` alias) **`.zshrc`**               set -o vi          EDITOR='subl'; export EDITOR          bindkey -M vicmd v edit-command-line       This opens up sublime, but the window is blank. If I set the editor back to Vim, I am able to open a new vim buffer with the current command line in it. `fc` works just fine.


How to increase the TTY fontsize?

I have a fedora machine, I am used to working on CLI since I had CRT monitor, after switching to TFT - the experience is not the same I had with CRT, the font is smaller now. How to change it?


Auditing Linux: tell me to what IPs a connection was established

I need a command, or something that runs as a cron job, that logs what IPs my machine is communicating with, what ports, and what process did it.


SELinux denied access

I keep receiving this message from SELinux in a bug report. I am new to Linux, running Fedora 13 and I am learning as I go. Any advice on what this might be would be appreciated.               Summary:          SELinux is preventing /usr/sbin/semodule access to a leaked /tmp/tmpGTbWYh file     descriptor.          Detailed Description:          [semodule has a permissive type (semanage_t). This access was not denied.]          SELinux denied access requested by the semodule command. It looks like this is     either a leaked descriptor or semodule output was redirected to a file it is not     allowed to access. Leaks usually can be ignored since SELinux is just closing     the  leak and reporting the error. The application does not use the descriptor,     so it will run properly. If this is a redirection, you will not get output in     the /tmp/tmpGTbWYh. You should generate a bugzilla on selinux-policy, and it     will get routed to the appropriate package. You can safely ignore this avc.          Allowing Access:          You can generate a local policy module to allow this access - see FAQ     (http://docs.fedoraproject.org/selinux-faq-fc5/#id2961385)          Additional Information:          Source Context                system_u:system_r:semanage_t:s0-s0:c0.c1023     Target Context                system_u:object_r:initrc_tmp_t:s0     Target Objects                /tmp/tmpGTbWYh [ file ]     Source                        semodule     Source Path                   /usr/sbin/semodule     Port                          <Unknown>     Source RPM Packages           policycoreutils-2.0.83-28.fc13     Target RPM Packages                Policy RPM                    selinux-policy-3.7.19-62.fc13     Selinux Enabled               True     Policy Type                   targeted     Enforcing Mode                Enforcing     Plugin Name                   leaks


Ubuntu unattended install : echo keypress to dialog

Ubuntu 12.04 LTS Server 64 My unattended-mode `bootstrap.sh` script contains:               apt-get upgrade -y      I know that during execution a primitive UI for GRUB installation will be shown which requires entering keypress sequence:               up arrow      space bar      enter/return      Is it possible to pipe this sequence, something like:               echo key1 key2 key3 | apt-get upgrade -y


`cp -al` snapshot whose hard links get directed to a new file when edited

I am trying to take snapshots of a massive folder regularly. I have read here: http://www.mikerubel.org/computers/rsync_snapshots/#Incremental   that `cp -al` takes a snapshot of a folder by simply copying the hard links. That is all great, but the problem is that in this snapshot, if I change a file, it changes in all snapshots. What I would like instead is to have the system create a new file on-change and link to that instead. That way each snapshot would not become invalid on an edit of the first file. How can I achieve that? p.s. I tried `rsync -a --delete --link-dest=../backup.1 source_directory/ backup.0/`, but it has the same problem.


Permission bits not being enforced on samba share

I have a problem where permission bits are not being enforced on a samba share using a Linux client. I have samba configured on the server to force a certain user, group and permission bits and this works as expected until I touch the file or it becomes the target of IO redirection. Here's what's happening:               user@linuxbox:~-->ls -l ~/archive/foo.txt     ls: cannot access /home/user/archive/foo.txt: No such file or directory     user@linuxbox:~-->touch ~/archive/foo.txt     user@linuxbox:~-->ls -l ~/archive/foo.txt     -rw-rw-r-- 1 archive archive 0 2010-09-13 20:29 /home/user/archive/foo.txt     user@linuxbox:~-->touch ~/archive/foo.txt     user@linuxbox:~-->ls -l ~/archive/foo.txt     -rwxrwxrwx 1 archive archive 0 2010-09-13 20:30 /home/user/archive/foo.txt      Notice when I touch the existing file its permission bits are 0777. They're supposed to be 0664 like when it was first created. How can I enforce 0664 on the existing file? I have version 3.0.24 on the server and version 3.4.7 on the client. Here's my smb.conf:               [global]     interfaces = egiga0     unix charset = UTF8     workgroup = workgroup     netbios name = foo     server string = Foo     security = USER     map to guest = bad user     host msdfs = no     encrypt passwords = yes          [archive]     comment = File Archive     path = /home/archive     force user = archive     force group = archive     read only = yes     write list = @archive     guest ok = yes     create mask = 0     force create mode = 0664     security mask = 0     force security mode = 0664     directory mask = 0     force directory mode = 0775     directory security mask = 0     force directory security mode = 0775


User's Login date and login time

I want to fetch user's login time and login date, is there any command in Unix providing User's login date and User's login time ? this problem i want to perform in Shell-script where username is accepting from the end-user and after checking the availability of user, i would like to fetch that user's login time and login date in different variable and then display using 'echo' command.


Does one end of a pipe have both read and write fd?

As far as I understood one end of a pipe has both read and write fd's and the other end also has read and write fd's. Thats why when we are writing using `fd[1]`, we are closing the read end e.g. `fd[0]` of the same side of the pipe and when we are reading from the 2nd end using `fd[0]` we close the `fd[1]` of that end. Am I correct?


How to get started with CentOS?

I've been working with Debian GNU/Linux for a long time and am very proficient with it. However for a new project I've got to got familiar with CentOS ASAP. So my Question is: **How do I get started** (from a SysAdmin POV) **with CentOS ASAP**? Please remember that I'm an experienced SysAdmin, I just have no experience with RPM based Distributions in general and especially CentOS and looking for good resources to get that missing knowledge.


Grub error: file '/grub/i386-pc/normal.mod' not found?

I recently install arch (hopefully successfully) on my machine. When I went to reboot however I had a problem. I got a black screen with text saying               Grub loading.     Welcome to GRUB!     error: file '/grub/i386-pc/normal.mod' not found.     Entering rescue mode...     grub rescue>      I have since googled looking for an answer. I almost found one here on the Ubuntu forums yet then I saw one of the comments saying it was untrue. There is also another answer but I'm not sure if I want to install from the live CD for fear of messing things up. You would understand my fear if you too spent 7 hours setting this up after constantly running into partitioning, command, tutorial, and system problems. What a joy. Anyone know of an easy solution to getting grub working?


zsync vs. jigdo

What's the difference between zsync and jigdo? Their core functionality seems the same, so I'm curious on things like performance, file size, and ease-of- use. Would also be interesting to know why one got created when one already existed.


How to remove duplicate entries in 'Open With' Nautilus dialogue?

Would be nice to be shown the magic button that will help me remove this eyesore: ![alt text](http://i.stack.imgur.com/OyWPe.png) It's Nautilus **2.30** on Debian (and has been there in previous versions as far as I can remember).


Can Apache Web server Respond to SMTP/IMAP/POP3 requests?

Bear with me, please. I want to know what functions are provided by the Apache 2.4.9 Web server on Fedora 20. I understand that Apache responds to HTTP request only. I believe that SMTP and POP3 protocols don't use HTTP. Is this correct? Can Apache respond to protocols other than HTTP? Can we have more than one Apache process running on a single IP address that will respond to HTTP requests as well as mail requests? Thanks in advance..


Mail delivery problems

Once upon a time there was a server. Lets call it zzz.com, running Ubuntu LTS 10. Then, domain owner decided to create his corporate mail via Google Apps, and created account username@zzz.com. Everything looks to be fine with username@zzz.com. Mail is sent / received. But there is one mysterious problem. When PHP script at zzz.com is trying to send some mail to [ANYNAME]@zzz.com, mail is not delivered. Sendmail works fine when trying to send mail anywhere else. There is a non-delivery notification in this case in the mail log. What could this be? How can this be fixed?


My alias parser works on the command line but not from a script

I'm trying to create a simple script that will dump all my aliases into a file that bash can load when it starts up, while making sure the alias of - to popd works properly: `alias -p | sed 's/alias -=/alias -- -=/' > ~/.bash_aliases` If I run that on the command line, it seems to work, but if I put it in a script and run that (with `#!/bin/bash` at the top and `chmod +x`), instead I get an empty file. Can someone tell me what bit of bash lore I'm missing? If it matters, I'm using bash v4.2.10.


What GNU/Linux magazines, e-zines are available?

What GNU/Linux specific magazines, e-zines (free and paid) are there ?


Directory with +x permission, parents without it. When would this be useful?

Say I have a folder called `folder` in the following path:               my_path = /a/b/c/d/e/folder      and a file called `file` in that folder. Then, say I run this command to remove group permissions under /a/               > chmod g-rwx -R /a/      Now, say I give `+rx` permissions to `folder`:               > chmod g+rx /a/b/c/d/e/folder      Then, if a second user in my group runs:               > ls /a/b/c/d/e/folder      or               > cat /a/b/c/d/e/folder/file       she gets permission errors, and as far as I understand this is because I need to provide `g+x` access to to all the parents of `folder`. My question then is, **when or why** would it ever be useful to give `+x` permission to a directory whose parent does **not** have it? Thanks


Cross compiling htop libncursesw not found

I'm trying to cross compile htop on an x86 Ubuntu 13.10 machine for Raspberry Pi ARM architecture. I've a crosstool-ng toolchain correctly configured, but when I use the command: `./configure CC=/home/fb/crosstool-ng/toolchains/arm-rpi-linux- gnueabihf/bin/arm-rpi-linux-gnueabihf-gcc CXX=/home/fb/crosstool- ng/toolchains/arm-rpi-linux-gnueabihf/bin/arm-rpi-linux-gnueabihf-g++ --host=arm-rpi-linux-gnueabihf --build=i686-pc-linux-gnu --target=arm-rpi- linux-gnueabihf` I get this error: `checking for refresh in -lncursesw... no configure: error: You may want to use --disable-unicode or install libncursesw.` If I use the ./configure on the x86 machine, the procedure works, because `libncursesw5` and `libncursesw5-dev` are installed. The same on the Raspberry Pi. If I launch the ./configure then it works. I tried to specify the location of the libraries with the `LDFLAGS` but I get always the same error. Where am I supposed to put those libraries?! Or what is the problem when cross compiling?


What are "kernel data structures"?

While reading about the Linux kernel I came across the notion of kernel data structures. I tried to find more information via Google, but couldn't find anything.   * What are kernel data structures?    * What are their requirements, usage, and access?   * What's the organization of data structure inside the kernel? Examples of kernel data structures might be `file_operations` or `c_dev`.