title: Ubuntu 13.04 does not recognize USB drive

text: Using Ubuntu 13.04 (with Gnome 3), my new USB stick (details see dmesg/lsusb) doesn't show up automatically. Situation:   * The drive does not show up at `fdisk -l`   * The drive does appear when running `lsusb`   * The drive is correctly recognized by a Windows 8 Machine After waiting some minutes and watching the `reset high-speed USB device number 4 using ehci-pci` messages in my dmesg, I decided to pull out my stick, which resulted in a disk read failure. ### dmesg               Aug 27 19:44:48 nbuntu kernel: [  257.189068] sd 9:0:0:0: [sdc] Attached      SCSI removable disk     Aug 27 19:44:55 nbuntu kernel: [  264.349591] usb 3-2: new high-speed USB device number 4 using ehci-pci     Aug 27 19:44:55 nbuntu kernel: [  264.797502] usb 3-2: New USB device found, idVendor=0951, idProduct=162b     Aug 27 19:44:55 nbuntu kernel: [  264.797505] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3     Aug 27 19:44:55 nbuntu kernel: [  264.797507] usb 3-2: Product: DT HyperX 3.0     Aug 27 19:44:55 nbuntu kernel: [  264.797508] usb 3-2: Manufacturer: Kingston     Aug 27 19:44:55 nbuntu kernel: [  264.797510] usb 3-2: SerialNumber: 20CF30E118F8BD6180000356     Aug 27 19:44:55 nbuntu kernel: [  264.797883] scsi10 : usb-storage 3-2:1.0     Aug 27 19:44:56 nbuntu kernel: [  265.794211] scsi 10:0:0:0: Direct-Access     Kingston DT HyperX 3.0    PMAP PQ: 0 ANSI: 6     Aug 27 19:44:56 nbuntu kernel: [  265.794905] sd 10:0:0:0: Attached scsi generic sg3 type 0     Aug 27 19:44:56 nbuntu kernel: [  265.795986] sd 10:0:0:0: [sdc] 123469824 512-byte logical blocks: (63.2 GB/58.8 GiB)     Aug 27 19:44:56 nbuntu kernel: [  265.796576] sd 10:0:0:0: [sdc] Write Protect is off     Aug 27 19:44:56 nbuntu kernel: [  265.796580] sd 10:0:0:0: [sdc] Mode Sense: 45 00 00 00     Aug 27 19:44:56 nbuntu kernel: [  265.797200] sd 10:0:0:0: [sdc] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA     Aug 27 19:45:27 nbuntu kernel: [  296.403451] usb 3-2: reset high-speed USB device number 4 using ehci-pci     Aug 27 19:45:58 nbuntu kernel: [  327.264520] usb 3-2: reset high-speed USB device number 4 using ehci-pci     Aug 27 19:46:29 nbuntu kernel: [  358.221324] usb 3-2: reset high-speed USB device number 4 using ehci-pci     Aug 27 19:47:00 nbuntu kernel: [  389.178831] usb 3-2: reset high-speed USB device number 4 using ehci-pci     Aug 27 19:47:31 nbuntu kernel: [  420.087249] usb 3-2: reset high-speed USB device number 4 using ehci-pci     Aug 27 19:47:50 nbuntu kernel: [  438.752891] usb 3-2: USB disconnect, device number 4     Aug 27 19:47:50 nbuntu kernel: [  438.766483] ldm_validate_partition_table(): Disk read failed.     Aug 27 19:47:50 nbuntu kernel: [  438.766494] Dev sdc: unable to read RDB block 0     Aug 27 19:47:50 nbuntu kernel: [  438.766507]  sdc: unable to read partition table      ### lsusb               Bus 003 Device 004: ID 0951:162b Kingston Technology      Bus 004 Device 002: ID 046d:c526 Logitech, Inc. Nano Receiver     Bus 005 Device 002: ID 046d:c318 Logitech, Inc. Illuminated Keyboard     Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub     Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub     Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub     Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub     Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub     Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub     Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub     Bus 008 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub     Bus 009 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub      Someone on the sellers homepage also stated he can't use the stick with Linux, Android, his TV and his Blu-Ray Player. Can somebody give me a hint what the problem could be?


title: Backing up a large file

text: I have a test running which crashes. I need to find out how far it reached before crashing. It will restart again after crashing and wipe the log file. This wiping takes 10 minutes though. So If I'm saving the log file every 9 minutes, I should be able to get the log file. The problem is that how do I write a bash script to copy a log file to a specific location and overwrite an existing file (if any) only if the file being copied is larger than the file at the destination. Else I want to leave it alone.                25       if [ -f $testFile ]; then      26         COUNT=`cat $testFile|wc -l`      27                 if [ $COUNT -gt 0 ];then      28                     ARGS=`head -1 $testFile`      29                     echo "Executing test for ARGS"      30                     sed -i '1d' $testFile      31                     cd /testCode; sleep 600      At this point, the code sleeps for 10 minutes, as mentioned                32                     /testCode/startTest.sh $ARGS      This starts the test which removes the log file. If the test did not crash, then when the test is done it goes to the next command. Else it starts again from the top                33                     `wall "System is going down for reboot in 600 seconds. Please save your work"`      34                     sleep 600      35                     /sbin/reboot &      36                     exit 0      37                 fi      38 fi      ### UPDATE #1 I figured out a way. So when the test starts, I save the logs from the previous run. Then I have enough time to check the logs while the test has restarted. The test usually crashes after an hour or so with segfaults. That gives me ample time to check the logs. It is not a really clean way, but it will work. @Alexandre Alves also gave a good answer. That can work too. @Slm gave a good answer, but unfortunately that will not work in large tests like mine since that will clutter up the log file. Also my issue is saving the log file, not logging per se.


title: Letting an OVZ container use the hosts ip

text: I have a server over at OVH and it has Proxmox installed on it. I've created a container but I want to host a server in there and I want it to use the host's external IP. How can I do this? I hope I don't have to get a second IP for this. Both the host and containers have Debian.


title: Xmonad and X Window System

text: I installed _X Window System_ (xinit) and `xmonad` only, without installing a desktop environment. The problem is that the configuration file `~/.xmonad/xmonad.hs` does not apply after starting. I usually execute the `startx` command after logging in and then `xmonad` is already running and ignores my `xmonad.hs`. I changed the permissions to 777 for all files under the `~/.xmonad` directory. How would you fix this?


title: Running Custom commands in a Terminal Application

text: I'm running a terminal application in `/dev/pts/X` terminal that has its own console as:        ![enter image description here](http://i.stack.imgur.com/8QeZV.png) What I need is to run commands specific to this application but from another terminal. Using `ttyecho` does not work as it interacts with the shell not with the application running on the shell.


title: Is there a good way to encrypt and store a mailbox while still being able to quickly access and search it?

text: I am wondering if it is possible to :   1. Store a mailbox in a way that the system administrator (ie: root) cannot see it   2. User(s) with the valid credentials would be able to see it AND be able to search quickly in it, preferably via http access I know that I can:   * Encrypt on the partition level, but it won't disallow the system administrator from seeing files in it.   * Encrypt emails with the GPG system, but I don't if and how I could apply it to an entire mailbox (ie: past and future emails in this mailbox).   * Give access to a mailbox via an open source webmail like roundcube, but I don't know if and how he would be able to access an encrypted mailbox Do you know if this is possible?


title: Why do SELinux policies require a system restart?

text: When changing SELinux policies, I've been reading that you're required to restart the system. What changes would require this? Are there certain policy changes that would not require a restart?


title: Check multiple directory properties

text: I'd like to make this test as fast as possible: (`Bash`)               if [[ -d $directory_path && -r $directory_path && -x $directory_path ]]


title: mounting by default at startup with /etc/fstab doesn't work

text: I'm trying since a few hours to mount a partition (md0) automatically with the server start. The Content of my /etc/fstab:               # <file system> <mount point>   <type>  <options>       <dump>  <pass>     # / was on /dev/sdd1 during installation     UUID=369adef0-c8d7-4a35-9fcf-6e8cb6dc2546 /               ext4    errors=remount-ro 0       1     # swap was on /dev/sdd5 during installation     UUID=ed608f40-8f2f-4f57-8488-8981cc602010 none            swap    sw              0       0     /dev/sde1       /media/usb0     auto    rw,user,noauto  0       0     /dev/md0        /mnt/RAID       ext4    rw,user,noauto  0       0      But it doesn't work. Then I mount it manually via `mount -t ext4 /dev/md0 /mnt/RAID`, what works well. But it's very annoying to mount it manually every time the server has rebooted. Is there a way to have this done automatically? * * * As it is easily confused: this is about **mounting by default at startup** of the system, but **not about automount**. The difference is that automounting mounts the filesystem automatically on access of actual files - physical read and writes - and usually unmounts when not in use.


title: Make FreeRDP prompt user for username and password?

text: At the moment, I'm using the following command to start an FreeRDP session:               $ sudo xfreerdp /v:farm.company.com /d:company.com \         /u:oshiro /p:oshiro_password /g:rds.company.com      Works fine. However, I don't want the password to be in the command line like that. So I tried it without the password:               $ sudo xfreerdp /v:farm.company.com /d:company.com /u:oshiro /g:rds.company.com      And I got a connection failure message instead of some sort of dialog box or prompt asking me to enter in a password. Is it possible to get this to prompt the user for a password? * * * **UPDATE: Omitting the`/p` switch** Without the `/p` switch, I get the following:               oshiro@ubuntu:~$ xfreerdp /v:farm.company.com /d:company.com -u:oshiro /g:rds.company.com     connected to rds.company.com:443     connected to rds.company.com:443     Could not open SAM file!     Could not open SAM file!     Could not open SAM file!     Could not open SAM file!     rts_connect error! Status Code: 401     HTTP/1.1 401 Unauthorized     Content-Type: text/plain     Server: Microsoft-IIS/7.5     WWW-Authenticate: Negotiate     WWW-Authenticate: NTLM     WWW-Authenticate: Basic realm="rds.company.com"     X-Powered-By: ASP.NET     Date: Sun, 23 Mar 2014 10:40:30 GMT +12     Content-Length: 13          rts_connect error!     rpc_connect failed!     Error: protocol security negotiation or connection failure


title: Set default font size in Emacs 23.4?

text: I use the following in my .emacs to set my default font to Ubuntu Mono:               (set-face-attribute 'default nil :font "Ubuntu Mono")      However, the defauly font size is too tiny for me. In my menubar I see Options->Set Default Font..., but the changes I make there does not propogate to my next session. Should I be setting something in .emacs to set default font size? (I like it to be 24) Thanks!


title: Which file system to choose for small sized files?

text: I have a partition and it has ~100 GB of audio files. Most of them are mp3 or ogg, each has size of ~15 MB. I update it on a weekly basis. Right now, the partition is formatted as `ext4`. I have read that `reiserfs` might perform better with small sized files. Would I gain anything from `reiserfs` in my case? Or do you suggest another FS for me?


title: How do I prevent tmux from wrapping around when searching?

text: When I am in edit mode in a tmux pane and I do a search, once it reaches the end, it goes back to the beginning. Is there any setting to prevent this?


title: Is there a way to monitor the temperature of CPU using lm_sensors?

text: I can successfully detect the temperatures of sensors using the sensors command. But is there a way or a tool so that I can dynamically monitor the temperatures of sensors conveniently?


title: Problem Installing .ttf with FontConfig, in userdir for user account, running RHEL

text: I'm trying to install TTF fonts, for a normal user account, on my RHEL5.4 box The steps I followed are :               $ cd ~     $ mkdir .fonts     $ cd .fonts     $ wget -q http://www.gringod.com/wp-upload/software/Fonts/Monaco_Linux.ttf     $ mkfontscale     $ mkfontdir     $ fc-cache -fv ~/.fonts      fc-list command shows that Monaco is installed               $ fc-list | grep Monaco      Monaco:style=Regular,Standard,Testo normale,Normaal,Normal,Común,Almindelig,Vanlig tekst,Normaali,\u30ec\u30ae\u30e5\u30e9\u30fc      But when I try to change font in console, Monaco is not listed.


title: What is wrong with my .bashrc PS1 line?

text: I think the screenshot should show what's going on. I open a shell, and dir colors don't work. I run bash again, and dir colors work. What's going on? ![enter image description here](http://i.stack.imgur.com/8bXyk.png)


title: Why does !! inside an alias not work?

text: I have this alias set in my system `/etc/bashrc` file:               alias root="sudo !!"      The intention of this being to run the last used command using `sudo` of course. When used, it of course appears to substitute the last command in `history` to the `bashrc` file upon shell initialization, and not the actual command that you would get if you were to run `sudo !!` in an interactive shell. I've also tried `alias root="sudo fc -s"` to no avail. I realize this is probably something to do with how the BASH does command substitutions, but can someone explain why this is, and provide a usable substitute? I'm running BASH version 3.2.51(1)-release (x86_64-apple-darwin13).


title: Suddenly changing users

text: Has anyone ever encountered a scenario where you are logged into a system going about your standard business, `cat`, `ls`, `tail`, `grep`, `vim`, `find` etc. and suddenly permissions to regular things stop working? When I do a `whoami` it turns out I'm not my regular user but another user. For example               bash>whoami          mark     bash>cat /dev/null > perm.mark     bash>clear     bash>tail -f perm.mark     bash>^C     bash>cat /dev/null > perm.mark          permission denied     bash>whoami          adam      Any ideas about what's happening here?


title: How to only zip the files of a specific user?

text: I like zip, it's simple, but recently I came with the need of only zipping the file owned by one user in a directory. I read the manual and I can't find any option to for example do things like:               zip /tmp/file.zip -own antoine -r /usr/something/*       Does I miss the option or maybe it's possible with other archive standard format (I'm open to suggestion though I work on AIX and might miss some options or binary)


title: Which Debian Architecture Should I Use? AMD Sempron 2500

text: I have an old computer with an AMD Sempron 2500 1.7GHz Processor and 512MB ram. I am trying to build a simple NAS for my home office. I downloaded the Debian Small CD file amd64 and i386, burnt them to CD and tried to boot from them. After a few minutes, nothing happened. It just sat there on a blank screen. I am familiar with the windows installer how it says "Press any key to continue...." when you try to boot from CD. So I was thinking that I might be using the wrong small cd file. But which one do I use? I am very new to anything other than Windows. I found this wonderful guide on how to setup a NAS, but it seems to be way over my head at the moment. http://versia.com/2009/11/nas-debian-lenny-raid1-encrypted/ So please talk slow and use little words :) Any suggestions for a linux newb would be great.


title: Route all HTTP traffic through polipo

text: I've set up polipo on my machine to listen to the default port `8123`. To test it, I set the in-memory cache to a ridiculously high 2 GB and downloaded a 50 MB file using `wget` utilizing the proxy.               http_proxy='http://localhost:8123' wget server/file      As expected, the first execution needs some seconds to transfer the file. Subsequent repetitions utilize caching and complete in less than a second. Now, I want to try directing all HTTP (port 80) traffic to be automatically routed through `polipo`, so that I don't have to specify the proxy with each web browser, mail client or other program I use. Although the faq indeed states that polipo is not intended for this use case, the Arch Linux Wiki mentions to do this via `iptables`               iptables -t nat -A OUTPUT -p tcp --dport 80 -m owner ! --uid-owner polipo -j ACCEPT     iptables -t nat -A OUTPUT -p tcp --dport 80 -j REDIRECT --to-ports 8123      After executing these commands as root, I again issue the `wget` command without the proxy environment variable set. All invocations need to download the file again, caching is not utilized, which is also reflected by               $ iptables -t nat -vL     [...]     Chain OUTPUT (policy ACCEPT 5 packets, 529 bytes)      pkts bytes target     prot opt in     out     source               destination                  6   312 ACCEPT     tcp  --  any    any     anywhere             anywhere             tcp dpt:http ! owner UID match polipo         0     0 REDIRECT   tcp  --  any    any     anywhere             anywhere             tcp dpt:http redir ports 8123     [...]      Only the `ACCEPT` rule is triggered, not the `REDIRECT` directive. I also tried to reverse the filter. Note the missing negation `!`.               iptables -t nat -R OUTPUT 1 -p tcp --dport 80 -m owner --uid-owner polipo -j ACCEPT      Thereafter, only the second rule was utilized, redirecting all HTTP traffic to always return the `polipo` configuration interface. How do I configure `iptables` correctly to route HTTP traffic through `polipo`? Is it even possible? Or do I have to switch to the more heavyweight squid?


title: Recursive grep vs find / -type f -exec grep {} \; Which is more efficient/faster?

text: Which is more efficient for finding which files in an entire filesystem contain a string: recursive grep or find with grep in an exec statement? I assume find would be more efficient because you can at least do some filtering if you know the file extension or a regex that matches the file name, but when you only know `-type f` which is better? GNU grep 2.6.3; find (GNU findutils) 4.4.2 Example: `grep -r -i 'the brown dog' /*` `find / -type f -exec grep -i -r 'the brown dog' {} \;`


title: Looping over a folder enter anyways the loop

text: When looping on a folder through a               for f in $path       I am experiencing an unexpected behaviour, i.e. the loops is entered anyway even if no file match the wildcard. I am using cygwin and this is my code               #!/bin/sh     here=$(pwd)     release(){         release="$1"         targetdisk="$2"         package="$3"         searchPath="../$package/${package}Setup/*/*/*.msi"         echo $searchPath         ls $searchPath         for f in $searchPath; do             mode=$(echo $file | sed -e 's:.*/.*/\(.*\)/.*\.msi:\1:')             version=$(echo $file | sed -e 's:.*/\(.*\)/.*/*.\.msi:\1:')             PREVIOUSIFS=$IFS             IFS=#             targetPath="$targetdisk:\\Software and tools\\Install\\$release"             newFile="$targetPath\\$package-$mode-$release.exe"             if [ ! -d "$targetPath" ]; then                 mkdir -p "$targetPath"             fi             echo $newFile             echo $f                       #cp $file $newFile             IFS=$PREVIOUSIFS         done;     }     release $1 $2 MyStuff      I put on purpose MyStuff, which does not exist:               $ ./release.sh 1.0-dev G     ../MyStuff/MyStuffSetup/*/*/*.msi     ls: ../MyStuff/MyStuffSetup/*/*/*.msi: No such file or directory     G:\Software and tools\Install\1.0-dev\MyStuff--1.0-dev.exe     ../MyStuff/MyStuffSetup/*/*/*.msi      As you can see however, the two echos are executed. Why this happens even if there is no match?


title: unix awk begin statement

text: I was trying to use a begin statement in awk, but somehow the begin statement is printed on top of every record instead of the very first record that I wanted. I am not very sure why, it would be grateful if someone can give me some opinions as to what goes wrong in my code.               awk 'BEGIN { OFS="\t" }{print "MARKER\tCHR\tBP\tEA\tNEA\tEAF\tP\tOR\tSE\tOR_95L\tOR95U\tN\tN_CASES\tN_CONTROLS\tSTRAND\tINFO\tHWE_P\tIMPUTED"}FNR>16 && $45!="NA" && $9>=0.4 { if ($1=="---") print $2,"'"$chr"'",$4,$6,$5,$45,$42,$48,$43,$44,$18,$23,$28,"+",$9,$33,"0" ; else print $2,"'"$chr"'",$4,$6,$5,$45,$42,$48,$43,$44,$18,$23,$28,"+",$9,$33,"1" }' ./out/expected_dcct_1kg_only${chr}_${chunk}.res > ./temp/expected_dcct_1kg_chr${chr}_${chunk}.tmp      I was hoping to see the line: Marker Chr BP .... 1 on the first line only, but somehow it seems to be printed for every record. This is a snapshot of the output:               MARKER  CHR BP  EA  NEA EAF P   OR  SE  OR_95L  OR95U   N   N_CASES N_CONTROLS  STRAND  INFO    HWE_P   IMPUTED     MARKER  CHR BP  EA  NEA EAF P   OR  SE  OR_95L  OR95U   N   N_CASES N_CONTROLS  STRAND  INFO    HWE_P   IMPUTED     MARKER  CHR BP  EA  NEA EAF P   OR  SE  OR_95L  OR95U   N   N_CASES N_CONTROLS  STRAND  INFO    HWE_P   IMPUTED     MARKER  CHR BP  EA  NEA EAF P   OR  SE  OR_95L  OR95U   N   N_CASES N_CONTROLS  STRAND  INFO    HWE_P   IMPUTED     MARKER  CHR BP  EA  NEA EAF P   OR  SE  OR_95L  OR95U   N   N_CASES N_CONTROLS  STRAND  INFO    HWE_P   IMPUTED     MARKER  CHR BP  EA  NEA EAF P   OR  SE  OR_95L  OR95U   N   N_CASES N_CONTROLS  STRAND  INFO    HWE_P   IMPUTED     MARKER  CHR BP  EA  NEA EAF P   OR  SE  OR_95L  OR95U   N   N_CASES N_CONTROLS  STRAND  INFO    HWE_P   IMPUTED     MARKER  CHR BP  EA  NEA EAF P   OR  SE  OR_95L  OR95U   N   N_CASES N_CONTROLS  STRAND  INFO    HWE_P   IMPUTED     MARKER  CHR BP  EA  NEA EAF P   OR  SE  OR_95L  OR95U   N   N_CASES N_CONTROLS  STRAND  INFO    HWE_P   IMPUTED     MARKER  CHR BP  EA  NEA EAF P   OR  SE  OR_95L  OR95U   N   N_CASES N_CONTROLS  STRAND  INFO    HWE_P   IMPUTED     MARKER  CHR BP  EA  NEA EAF P   OR  SE  OR_95L  OR95U   N   N_CASES N_CONTROLS  STRAND  INFO    HWE_P   IMPUTED     MARKER  CHR BP  EA  NEA EAF P   OR  SE  OR_95L  OR95U   N   N_CASES N_CONTROLS  STRAND  INFO    HWE_P   IMPUTED     MARKER  CHR BP  EA  NEA EAF P   OR  SE  OR_95L  OR95U   N   N_CASES N_CONTROLS  STRAND  INFO    HWE_P   IMPUTED     MARKER  CHR BP  EA  NEA EAF P   OR  SE  OR_95L  OR95U   N   N_CASES N_CONTROLS  STRAND  INFO    HWE_P   IMPUTED     MARKER  CHR BP  EA  NEA EAF P   OR  SE  OR_95L  OR95U   N   N_CASES N_CONTROLS  STRAND  INFO    HWE_P   IMPUTED     MARKER  CHR BP  EA  NEA EAF P   OR  SE  OR_95L  OR95U   N   N_CASES N_CONTROLS  STRAND  INFO    HWE_P   IMPUTED     MARKER  CHR BP  EA  NEA EAF P   OR  SE  OR_95L  OR95U   N   N_CASES N_CONTROLS  STRAND  INFO    HWE_P   IMPUTED     rs7002152   8   145000056   C   T   0.937422    0.984021    0.165311    0.71094 1.362   1304    79  1225    +   0.981763    0.309615    0     MARKER  CHR BP  EA  NEA EAF P   OR  SE  OR_95L  OR95U   N   N_CASES N_CONTROLS  STRAND  INFO    HWE_P   IMPUTED


title: How to fix xclock command not found error on Oracle Linxu 6.4?

text: I want to do GUI based installation but xclock command is not found. I have checked, I don't have xclock at all by finding it.                # xclock     -bash: xclock: command not found      If I search x11 I found following:               # find / -name X11     /usr/lib64/X11     /usr/share/X11     /etc/X11      I don't think Xorg X11 is installed, because I can't see bin path of X11 in my PATH variable. So the challenge is to install this package on my box. It does not have internet so I can not run yum command. X11 Forwarding is also yes in /etc/ssh/sshd_config. Anyone can tell me the RPM URL to download and install? And suggestion what's the way out. I am using following distribution. Output of /proc/version file:               Oracle Linux Server release 6.4     Red Hat Enterprise Linux Server release 6.4 (Santiago)


title: What is Archive field in Release file used for?

text: For example current Release file for Wheezy is following:               Archive: stable     Origin: Debian     Label: Debian     Version: 7.1     Component: main     Architecture: amd64      Now I can't find description of this Archive field neither on Debian Wiki page or anywhere else using Google. I have noticed though, that the content is similar to what the page says about "Suite" field, whereas the Suite field is missing. What is this field used for? Is it just a newer/older naming for Suite?


title: firefox not displaying youtube videos correctly in Linux Mint 15 olivia

text: I'm running Linux mint 15 olivia, Xfce 32-bit version. I try to access youtube videos in the latest Firefox, but the videos displays incorrectly for some reason. I do have flash installed, but I see there is more than one flash plugin that can be installed when I go the software manager. I installed Google Chrome also and there youtube videos displays correctly, I can watch the videos as normal. Why is this? What can I do to fix firefox? I can see that I have shockwave player also installed. Please assist.


title: In Linux, is 'make folder/path/clean' same as running 'make clean' command in folder/path?

text: I'm new to Linux, more so for Makefile. In Linux, is 'make folder/path/clean' same as running 'make clean' command in folder/path/? (folder/path/ refers to an arbitrary directory.) Apart from this question, is there a generalization one can make about this syntax (of command and argument) in Linux? Update based on comments and suggested answers: Thanks, I learned some new things. I also found that Makefile that I am using (openwrt) is different from the normal GNU Makefile in that it has more features. A summary is that that the two commands in the main question are not the same.


title: Overcoming data word length limitation of usbmon

text: When capturing USB traffic with usbmon, I sometimes see the following:               ffff8801ed3703c0 2599784347 S Bo:1:008:2 -115 74 = 24484880 087ffa7f dd7ffc08 d87fec7e d3000080 5e80a30c d1d43300 00803c9b      The data length is reported to be 74 bytes long, but the actual data word length is much shorter (32 bytes in the example above). It appears that this is by design: Quoting from https://www.kernel.org/doc/Documentation/usb/usbmon.txt: "The length of collected data is limited and can be less than the data length reported in the Data Length word." Can this limitation be overcome in order to capture all the data words?


title: Restoring a Particular User's mdbox Mailbox in Dovecot

text: A user is reporting lost emails due to a client-side error, so I need to restore emails from backup for this particular user but I'm not finding anything online (maybe my google-fu is lame). Basically, the mailbox is in mdbox format:               mdbox:/marchive/%n/mdbox:LAYOUT=fs      `maildata1` is served from an NFS export from a NetApp appliance which snapshots on a weekly basis. I wanted to revert a particular user's mailbox to the state it was in last week (which I have file-level access to) but I'm unable to find what the general procedure for doing such is. My interest is in finding the proper way to swap out their current mailbox for this older one. Is it as simple as copying the files over with `rsync -aS` ? This is on dovecot 2.0.9 and RHEL 6.5 if that makes a difference.


title: how can I get the date and time from access.log first field (squid)?

text: this is a line from access.log file which log the access Info of Squid:               1286536351.746  41762 192.168.0.227 TCP_MISS/200 5340945 GET http://v15.lscache3.c.youtube.com/videoplayback? - DIRECT/122.160.120.150 video/x-flv      as we know the first column `1286536351.746` is representing the time stamp how can I get the date and the time from this field?


title: Best practices for packaging self created software for Debian

text: I've got Debian packaging for a piece of software I've written. This software probably is too specialized to be part of Debian. In any case, for now I have no plans to try to include it in Debian. However, I'd like to follow best practices to the extent possible. Currently the Debian packaging is part of the same Mercurial repository as the software, in the subdirectory debian/. I'm wondering if I should put it in a separate repository. Also, currently the package is being built as a Debian native package, which isn't really appropriate. I guess I could add a get- orig-source target for building the orig tarball to rules, but is it Ok to build a orig.tar.gz file from a local repository, or is it necessary to get it from remote? If the former, are there any recommended approaches for, for example, passing the location of the repository to the get-orig-source target? It was suggested to me that perhaps I could put the debian directory in a separate (presumably named) branch from the actual software, and merge them together when building. That still leaves the question of how to get the orig.tar.gz with `get-orig-source`.


title: How to add crontab in FreeBSD

text: I am trying to add a job to my crontab in FreeBSD but it is not working : I have used this to add the job: `sudo crontab -e -u vaibhav`               @daily /home/vaibhav/applications/comparison/scrapy      but it is not working. Is there any way to check whether crontab is able to run this script, like `\--run-parts` in `Ubuntu`?


title: Automounting plugged devices in linux

text: Auto-mounting seems to be a bit of a messy thing in linux. The options to automount ranges from autofs, udev, hal or even filemanagers. What is the **best-practice** method to enable automounting on devices? Is there one shinning way that cuts out all the mess?


title: Preventing accidental directory deletion. Making an alias that contains options?

text: I use an alias to prevent me from accidentally deleting files, and I would like to do something similar for directories. For files, I have the following added to my `.bashrc`:               alias rm="rm -i"      I would like to also prevent myself from accidentally removing a directory, which I have tried by doing this:               alias rm -rf="rm -rfi"      and this:               alias "rm -rf"="rm -rfi"      But neither work. Any suggestions?


title: apache mod_headers use base 64

text: I am currently migrating a reverse proxy which is using apache. I have one application which need to transfert headers to the backend. For this I am using the following in my conf :               RequestHeader set SSL_CERTIFICATE_SERIAL %{SSL_CLIENT_M_SERIAL}s     RequestHeader set SSL_CERTIFICATE_DN %{SSL_CLIENT_S_DN}s      It appears that the old reverse which is running apache 1.3 (need to be confirmed) transfert the header encoded in base64. The same configuration with the new server which is running apache 2.2.21 transfert the headers in clear text. My question is : Does the apache version 1.3 mod_headers encode them in base64 ? If yes can I reproduce this with apache 2.2.21 ?


title: Hanging install blocks new installations on WebOS

text: I tried to install an application via AppScoop. From that point on no further installs were possible because of a hanging install (see picture). Can you please advice how to cancel the hanging install? I have shell access so don't mind sending shell commands. ![Hanging Software Installation](http://i.stack.imgur.com/Uo0JH.png)


title: Is it possible to name windows in emacs

text: I would like to be able to name a window in emacs, and specify that window when opening and creating new buffers. I've looked through the manual but all I can find is `find-file-other-window`, which doesn't allow me to specify which window to open the buffer in. Perhaps I'm trying to use emacs in a way it wasn't intended to be used, but what I am trying to achieve is a workspace similar to an IDE:               ----------------------------------------------     | Project  |  Main editor        | Help Docs |     | Files    |                     |           |     |          |                     |           |     |          |                     |           |     |          |                     |           |     |          |                     |           |     |          |                     |           |     |          |                     |           |     |          |---------------------|           |     |          |  Console/Shell      |           |     |          |                     |           |     ----------------------------------------------      For example, I would like to have all internal help and python docs open in the right window, and all .py files in the main window by default. Any ideas? EDIT: I should mention that I'm using emacs in no-window console mode.


title: Specialized access control for directories in RedHat

text: I have a requirement where I want to change permissions for a directory so that the directory owner (user/group) would be able to create files inside the directory and modify them, but won't be able to delete them once they are created. Is that possible to do? Also, other users should not be able to read,write or execute in the directory and the root should have the permission to delete the directory. I am using RHEL6.


title: How is the loopback network interface implemented?

text: The loopback network interface "is a virtual network device implemented entirely in software," according to another question on Unix.SE. **But how is this implementation actually accomplished, and how do you manipulate it?** As far as I know, IPs are marked as local in the local routing table:               ip route show table local        Sending to an IP marked as local will trigger the loopback device. **But is this detection done purely by routing tables or also by some other kernel operations**? My ultimate goal is to manipulate the loop-device configuration, so that sending datagrams between two WLAN adapters on my laptop will result in real traffic / datagrams in the network and _not_ in local loops. That is:               Interface 1 -> WLAN -> Interface 2       and NOT:               Interface 1 -> LOOP -> Interface 2


title: How to log processes in daemon-mode?

text: I would like to save the standard output of the program motion in a text file. If I don't use motion in daemon-mode I would simply do it by:               motion > log.txt      But what is the equivalent when I run it in daemon-mode? I cannot specify implicit logging at least according to motion's man page.


title: Zsh: Automatically modify executed command

text: I've recently installed grc (generic colorizer) to my system via MacPorts, giving me the ability to get colorized output for plenty of commands which by default don't support it (see screenshot below). ![Example of grc with traceroute.](http://i.stack.imgur.com/tc1qf.png)   I would like to make using grc automatic, however not for specific commands, but for every command. I use zsh as my shell. Essentially whenever I execute `command -parameter 1 2 3` I would like it to automatically be executed as `grc command -parameter 1 2 3`.   I'm not looking to use aliases, for example `traceroute` alias to `grc traceroute`, as I'm adding more and more commands for grc to colorize. I've looked into preexec and precmd configurations for .zshrc, but I haven't found a way to achieve what I'm looking for.


title: DHCP Problems Virtualbox

text: I have some minor issues with Ubuntu server on a virtual machine and even though I have some assumptions as to what actually happens, I'd like to ask all of you about your opinion. **Here's the deal:** I have a new laptop from my new workplace and there is a Ubuntu Virtualbox VM on it. The network configuration of the VM is a bridged network and `network-manager` is being uninstalled. DHCP is running as it is by default and a static IP will not be set in the future. When I get the laptop home it isn't able to obtain an IP from my network if left with the mentioned settings. I'd tried only one solution for now due to the limited time I had then, but I was thinking about the very reason for this behavior - why can't this VM box get an IP when the laptop is moved between locations?


title: Correct timeline of a .ts file

text: I have some MVs that is recorded from a TV, but timeline was incorrect somehow: ![enter image description here](http://i.stack.imgur.com/HvK8B.png) Anyone know some tool that can fix it ? The media plays fine, just the displayed stuff doesn't look good


title: Nagios misinterpreting Http response!

text: I've installed _Nagios 4.0.1_ on my CentOS 6.5 server. Since I'd set up Node.js to use port 80, I configured the Apache (`httpd`) service to listen to port 3000 instead. I can open Nagios console and everything looks fine using HTTP on port 3000. The problem is in the Nagios services status that shows my HTTP as CRITICAL with the description: > Connection refused HTTP CRITICAL - Unable to open TCP socket Any ideas how I can fix this issue?


title: Formatting external USB Harddrive ext4

text: What is the best way to format a non-ssd harddrive with ext4, for as fast as possible usage with a very low performance computer? I mean, options like disabling things (journaling, ...) that slow down the process of read/write.


title: Detect file-type with the help of magic-file and rename file-suffix accordingly

text: I have a folder (the iPhone Backup) with various files without a suffix. I want to run a batch process over these files, which detects each file's file-type (with the help of the magic-file database ( _/usr/share/misc/magic_ or _man file_ ), and automatically changes / renames its file-suffix (from a database file/mime-type<->suffix) accordingly. Hours of Googling and StackExchange-Searching brought no results, due to the general nature of the involved keywords "file", "magic", "rename", etc. Help appreciated!


title: How to prevent fs unmounting?

text: (Apologies in advance for giving so few details below, but trust me that the set-up and the problem I'm dealing with are truly _baroque_ , and even a superficial description would result in a far lengthier and complicated post than any of you would want to read!) I'm trying to back up a disk that has been acting very strangely lately, but my back-up attempts fail after a few minutes, because the disk's file system (at `/dev/disk4`) "spontaneously" unmounts. (I doubt this unmounting is literally "spontaneous", but to my ignorance it looks that way.) > I would like to **_"lock"_** the mount, so to speak, so that no other > process can unmount it (other than something like `umount /dev/disk4` > _issued by me_ ). Is there a way to achieve such a lock? (The flavor of Unix I'm dealing with happens to be OS X, but I am interested in, say Linux-specific solutions too, since they may provide useful keyword for further Googling. Also solutions for any other BSD-ish flavor of Unix would be welcome.) (It goes without saying that I am interested only in locking schemes that do not prevent me from backing up the disk!) If there is no way to "lock the mount" > how can I determine why the unmounting is happening? Thanks!


title: How do I get wget to download a cgi file behind robots.txt?

text: As an example - http://aok.heavengames.com/cgi- bin/aokcgi/display.cgi?action=t&fn=22. I found a way to get through the robots.txt restrictions, but even then, it just downloads a binary file that's unreadable by anything.


title: `find -path` explained

text: The `find` command provides the option `-path`. I understand that one has to define where to start looking [commonly known as "path"]. Trying to figure out what it is used for, I found many examples using `find -path -prune` to exclude some paths. **Question** : An explanation what `find -path` does; what this option is used for. Please note: It seems crystal clear to me, but then doesn't work as I guessed it would. I worked through `the` man and the `info` pages, but I don't get the full meaning of this option. **EDIT** As I understand it: `find /some/path -name stuff` should start looking for "stuff", starting in the directory "path" which is a subdirectory of "some". Works. But then, what does the `-path` option define? Definitions including sentences like > do not treat / or . specially doesn't help much and are even more confusing.


title: pkill can't kill processes with parent process id 1

text: I want to kill the following processes using               pkill "run_tcp_sender.sh"      or               pkill -SIGKILL  "run_tcp_sender.sh"                   root     14320     1  0  2012 ?        00:00:00 bash run_tcp_sender.sh 138.96.116.22         root     14323     1  0  2012 ?        00:00:00 bash run_tcp_sender.sh 138.96.116.22         root     14325     1  0  2012 ?        00:00:00 bash run_tcp_sender.sh 138.96.116.22         root     14327     1  0  2012 ?        00:00:00 bash run_tcp_sender.sh 138.96.116.22         root     14328     1  0  2012 ?        00:00:00 bash run_tcp_sender.sh 138.96.116.22         root     14330     1  0  2012 ?        00:00:00 bash run_tcp_sender.sh 138.96.116.22      but it is useless the processes remain there what is wrong with my command? BTW: I can use the following command to achieve what I want               kill -9 $(ps -ef|grep "run_tcp"|grep -v "grep"|awk '{print $2}')


title: What are my problems with my VMWare runlevel setup?

text: I recently upgraded to Debian Wheezy (7) and had to upgrade VMWare Player along with that since the version I had didn't like the 3.2 kernel. However, I notice that the kernel modules aren't starting for VMWare (such as `vmmon`, `vmnet` and `vmci`) and, because of that, the virtual machines complain bitterly when I try to start them. If I start the modules manually with `modprobe`, it works fine, at least until the next boot where they've disappeared again. It also works fine if I manually run `/etc/init.d/vmware start` beforehand, and it's this solution I have as a workaround, starting them from a script before it calls the `vmplayer` executable. I've noticed in the `rcX.d` directories (2, 3 and 5) that there is a `K01vmware` script but no `Snn` ones to be found and I believe this is what's causing it to not start. However, when I create a `Snn` link in `rc2.d` (and 2 is the correct runlevel for my system according to the `runlevel` command returning `N 2`), it still doesn't start. First off, is there any way that a `rc` service could run other than via the `S/K` scripts in `rcX.d`? It appears from my experience that it will never start the service because there's no `Snn` link to do so. Secondly, why would this _still_ not work even when I _create_ a `Snn` entry in `rc2.d`? The top of the `/etc/init.d/vmware` script follows:               #!/usr/bin/env bash     #     # Copyright 1998-2008 VMware, Inc.  All rights reserved.     #     # This script manages the services needed to run VMware software.     #          ### BEGIN INIT INFO     # Provides: vmware     # Required-Start: $network $syslog     # Required-Stop: $network $syslog     # X-Start-Before:     # X-Stop-After:     # Default-Start: 2 3 4     # Default-Stop: 0 6     # Short-Description: This service starts and stops VMware services     ### END INIT INFO      The list of all `rc` scripts with `vm` in them is:               lrwxrwxrwx 1 root root 16 Mar 20  2012 rc2.d/K01vmware -> ../init.d/vmware     lrwxrwxrwx 1 root root 30 May  6 19:09 rc2.d/K01vmware-USBArbitrator -> ../init.d/vmware-USBArbitrator     lrwxrwxrwx 1 root root 16 May  6 19:55 rc2.d/S49vmware -> ../init.d/vmware     lrwxrwxrwx 1 root root 32 May  6 16:18 rc2.d/S50vmware-USBArbitrator -> /etc/init.d/vmware-USBArbitrator          lrwxrwxrwx 1 root root 16 Mar 20  2012 rc3.d/K01vmware -> ../init.d/vmware     lrwxrwxrwx 1 root root 30 May  6 19:09 rc3.d/K01vmware-USBArbitrator -> ../init.d/vmware-USBArbitrator     lrwxrwxrwx 1 root root 32 May  6 16:18 rc3.d/S50vmware-USBArbitrator -> /etc/init.d/vmware-USBArbitrator          lrwxrwxrwx 1 root root 16 Mar 20  2012 rc5.d/K01vmware -> ../init.d/vmware     lrwxrwxrwx 1 root root 30 May  6 19:09 rc5.d/K01vmware-USBArbitrator -> ../init.d/vmware-USBArbitrator     lrwxrwxrwx 1 root root 32 May  6 16:18 rc5.d/S50vmware-USBArbitrator -> /etc/init.d/vmware-USBArbitrator      The `rc2.d/S49` one is the one I created which still doesn't work.


title: Is it possible to compile a full Linux system with Intel's compiler instead of GCC?

text: Perhaps this is a stupid idea? Maybe there are some compatibility issues? I have the impression that for Intel-based systems, the Intel compiler would potentially do a better job than GCC. Perhaps there's already a distro that has attempted this? I would think this might be quite straightforward using Gentoo.


title: Puppet problem with sysctl

text: Running CentOS 5.5 with Puppet 0.25.5 I have installed and am using the puppet-sysctl module. However the following error occurs:               //linux_tuning/Sysctl::Value[net.core.rmem_default] Sysctl[net.core.rmem_default] (err): Failed to retrieve current state of resource: No ability to determine if sysctl exists     //linux_tuning/Sysctl::Value[net.core.rmem_default]/Exec[exec_sysctl_net.core.rmem_default] (notice): Dependency sysctl[net.core.rmem_default] has 1 failures     //linux_tuning/Sysctl::Value[net.core.rmem_default]/Exec[exec_sysctl_net.core.rmem_default] (warning): Skipping because of failed dependencies      sysctl is installed. And /etc/sysctl.conf is present. Anyone have an idea as to why this is happening and have an idea as to how to fix it? An excerpt from puppet.conf:               [main]         vardir = /var/lib/puppet         logdir = /var/log/puppet         rundir = /var/run/puppet         ssldir = $vardir/ssl         runinterval = 21600


title: How to prevent from automatic reboot after shutdown?

text: I have a problem with shutting down my systems. When I shutdown my laptop everything looks normal but after few seconds it powers on by itself. I tried to shut it down through terminal with "shutdown -h now" and it worked but only on Arch in Ubuntu with "shutdown -hH now" or "shutdown -H now" it hangs on spash screen. I also looked for some "wake on LAN" BIOS entries (as those are mentioned to cause that problem) but I don't have those. How can I fix my distros to be able to shutdown distros form DE's menu without using terminal ?


title: Difference between a Window Manager and a Desktop Environment?

text: What exactly is the difference between between a Window Manager and a Desktop Environment? E.g.: sawfish vs. gnome.


title: What is supersede in a DHCP config?

text: E.g.: what does               supersede domain-name "SOMETHING.COM FOO.ORG";      exactly mean?


title: Trouble adding date to tcsh history

text: I'm trying to add the date to my tcsh history information and I can't seem to figure out how to make it work. The tcsh man page reads like this for the history setting: > The first word indicates the number of history events to save. The optional > second word (+) indicates the format in which history is printed; if not > given, `%h\t%T\t%R\n' is used. The format sequences are described below > under prompt; note the variable meaning of `%R'. Set to`100' by default. I've tried the following put a line in my `.cshrc` file using what they say is the default format, but I get an error every time I source. Here is what I've tried (with the resulting error in brackets): `set history = 2000 '%h\t%T\t%R\n'` _[set: Variable name must begin with a letter.]_   `set history = 2000 %h\t%T\t%R\n` _[set: Variable name must begin with a letter.]_   `set history = 2000 $DATE='%h\t%T\t%R\n'` _[DATE: Undefined variable.]_   `set history = 2000 $FORMAT='%h\t%T\t%R\n'` _[FORMAT: Undefined variable.]_   `set history = 2000 $TIME='%h\t%T\t%R\n'` _[TIME: Undefined variable.]_ The following doesn't give me a source error, it gives me a `history: Badly formed number.` error when I try to use history:               set history = '2000 %h\t%T\t%R\n'      I'm obviously just thrashing around here, I don't have a lot of experience with modifying the `.cshrc` file. Any help would be appreciated.


title: wget --spider: how to tell where broken links are coming from

text: I use wget's built-in spider mode as a convenience sometimes to quickly check a local site for broken links. This morning I turned its attention to a production site that we'd just put major changes on, and it's coming up with 3 broken links, but it seems impossible to tell where they are! (It only says what they're linking to and there's no straightforward way of relating that alone back to a page.) The options I'm currently using are `wget -r -nv --spider http://www.domain.com/ -o /path/to/log.txt`. Does anyone know of an option I'm overlooking, a way to read the output, or even a simple substitute for this command that will also let me know what file the links appear in (and ideally a line #)?


title: Compare two file columns

text: I have long text files with space-delimited fields:               cat file1.txt     Id    leng  sal   mon     25671 34343 56565 5565     44888 56565 45554 6868     23343 23423 26226 6224     77765 88688 87464 6848     66776 23343 63463 4534          cat file2.txt     Id    number     25671 34343      76767 34234      23343 23423      66776 23343           cat output.txt     Id    leng  sal   mon     44888 56565 45554 6868     77765 88688 87464 6848      `file1.txt` has four columns, `file2.txt` has two columns. I want to compare 1st column (`$1`) in both files (`file1.txt`, `file2.txt`) and output the file that did not match in `file2.txt`. I have tried               join -v1 file1.txt file2.txt >output.txt      But the output has some errors. Any `awk`/`sed` command is appreciated.


title: Script for emulating Windows [Win]+[Arrow] keyboard shortcut

text: I am running Fedora 14. I would like to (at least partially) emulate the behaviour of Windows when you hit `Win`+`Arrow Key`. That is, I would like it to "snap" to the left/right sides of the screen. I am not very familiar with Linux/Unix, but here is what I have come up with:               xdotool getactivewindow windowmove 0 0     xdotool getactivewindow windowmove 1680 0      for moving the current window to the left/right monitor respectively. This would work fine for my purposes, but for some programs it fails to work if the window is maximized. Does anyone know a good way to do this? I suppose one solution would be to restore the window if it is maximized, move it, then maximize it, but I don't know how to do this either.


title: how to Update gcc of OpenSuse 11.2?

text: I have OpenSuse 11.2 with gcc version 4.4.1. I would like to update my gcc version to 4.5.1. I have downloaded gcc-4.5-19.1.i586.rpm. When I rpm install it, it's asking for gcc45-4.5.1_20101208-9.8.i586.rpm which is a dependency so I downloaded it. Now when I rpm install gcc45, it's asking for a lot of dependencies. I remember downloading gcc 4.3 and it's dependencies for Opensuse 11.2 through yaST :               YaST --install  automake autoconf libtool gcc gcc43 gcc43-c++\     gcc-c++ libcom_err-devel alsa-devel docbook5-xsl-stylesheets\     texlive texlive-bin libxml2-devel zlib-devel gettext-tools\     readline-devel ncurses-devel libstdc++43-devel\     glibc-devel linux-kernel-headers gperf indent doxygen\     xorg-x11-fonts-devel xorg-x11-libX11-devel xorg-x11-libXau-devel\     xorg-x11-libxcb-devel xorg-x11-libXdmcp-devel xorg-x11-proto-devel\     xorg-x11-xtrans-devel xorg-x11-util-devel bison cvs      What about for gcc 4.5 ? how do I download it's dependencies for 11.2?


title: How do I fix the "Cannot retrieve repository metadata" error in Fedora 14?

text: When I try to install anything on Fedora 14, I get the following output: > Repository base is listed more than once in the configuration > > Could not retrieve mirrorlist > http://s2plmirror01.prod.sdl2.secureserver.net/vph/2/download/mirrors/fedora- > core-14 > > error was 14: PYCURL ERROR 6 - "" Error: Cannot retrieve repository metadata > (repomd.xml) for repository: base. Please verify its path and try again


title: Testing SSH Access from external network

text: I have an application running in my corporate environment, which users access through SSH. All the users within the corporate network as that of the server are able to access this application over SSH. However, all of a sudden users from a different network outside our corporate network, for whom necessary firewall rules are in place, are unable to access this application over SSH. From a machine on the external network, we are able to do a telnet to port 22 of the server successfully. However, when we try to establish a SSH connection to the server on the corporate network, we get a message saying that the "Server Closed the connection". Have been hanging around this issue for 2 weeks now. But unable to get a solution. When one can do telnet to port 22, does that mean the client and the server can communicate successfully over SSH without any restrictions or does the ability to telnet not imply full SSH 2 way communication between client and server ? Is there a way of testing between the client and server If SSH connection will work among them, other than telnet ?


title: sed load substitute from file

text: I'm attempting to replace a pattern in a file with the complete contents of another file using sed. Currently I am using:               sed "s/PATTERN/`cat replacement.txt`/g" "openfile.txt" > "output.txt"      However, if the replacement file contains any characters such as `'`, `"`, or `/` I start getting errors due to input not being sanitized. I have been trying to use this guide to aid me, but I am finding it quite hard to follow. If I try the suggested `r file` command, I just end up with a string. What is the best way to approach this?


title: Rsync over Rsync via cronjob

text: I have a local server which Rsync's from some computers on the LAN. It's a part of a backup solution. This Rsync runs via cronjob twice a day. Occationally people add gigantic amounts of data, like a Terabyte or so. When that happens there is no guarantee that the Rsync will finish before the second Rsync takes off. What happens in such circumstances?   Is that something to be avoided?


title: NIS users can't use yppasswd on client machines

text: I'm administrating a system where users authenticate via NIS and things went wrong when a user tried to use `yppasswd` to change her password. She got the error:               yppasswd: yppasswdd not running on NIS master host ("localhost").      Based on suggestions elsewhere around the Web, I tried setting an entry in `/etc/hosts` with the client's IP (as opposed to `127.0.0.1`) pointing to the client's host name. This didn't work. My `/etc/yp.conf` says `ypserver <my_server_IP>`. `strace` output shows that `yppasswd` consults `/etc/hosts` and `/etc/nsswitch.conf` before deciding on `127.0.0.1` for the server. What am I missing? Client is running Debian 7.0 (Wheezy) and server is running Debian 6.0.1 (Squeeze) **Note** I'm aware that NIS is nearing total obsolescence and very vulnerable. A migration to LDAP is on my agenda, but I need a solution for this in the interim. **Additional Details** Files on the client: `/etc/hosts`               127.0.0.1 localhost     <IP in current DHCP lease> host_name.domain host_name     <server_ip> server_name server_name.domain      `/etc/nsswitch.conf`               passwd:         files nis compat     group:          files nis compat     shadow:         files nis compat          hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4     networks:       files          protocols:      db files     services:       db files     ethers:         db files     rpc:            db files          netgroup:       nis


title: Will Linux as a guest be able to make use of hardware support of a Windows host?

text: I have a Radeon HD 7790 which apparently won't work as well in Linux (haven't tried it yet). My idea is to install Windows as the host and do the Linux work in a VM (which involves stuff that needs 3D acceleration). Could this work?


title: Changing Android files in root directory

text: Does anyone know how (if it is possible) to change Android files stored in root directory, particularly logo.rle? I want to change my boot splashscreen, changing the file, which is stored in `/`. I have managed to change the file with root browser. But after phone reboot, all files in `/` and `/system` revert back to their original state. I know from embedded boards, that you have to execute `saveenv` command, so that the changes you make remain after reboot...but Android doesn't have that command, even with buisybox installed :(


title: How to disable SMTP Auth Plain for James-2.3.2. on Slackware 14.0?

text: I am trying to disable SMTP Auth plain for James-2.3.2 on Slackware 14.0. Has anyone successfully done this without changing the source code?


title: libusb problems trying to run FlashTool

text: I have been trying to run FlashTool on my 32 bit Ubuntu system, but I get this complaint:               # ./FlashTool1     Running as root.     libusb.LibUsbException: Libusb not found. Minimum libusb version is 1.0.15. It can be downloaded on http://www.libusbx.org         at libusb.UsbSystem.initSystem(UsbSystem.java:28)         at libusb.UsbSystem.<init>(UsbSystem.java:15)         at linuxlib.JUsb.init(JUsb.java:21)         at gui.Main.initLinuxUsb(Main.java:36)         at gui.Main.main(Main.java:23)      Since `libusbx` merged with `libusb`, I downloaded and installed the latest `libusb` library.


title: Match first fields of two tab separated files and print matching values

text: I have two files. Match the `1st` column of first file to `1st` column of second file and print entire line of the second file. Second file is a `<tab>` separated file. I have tried many `awk` one liners, but all remove duplicate values. Like `A` and `C` here. I want to preserve these. `File 1`:               A     B     C     D     A     C      `File 2`:               A abc     B cde     C abe     D acc      Output:               A abc     B cde     C abe     D acc         A abc     C abe


title: ssh_exchange_identification: Connection closed by remote host (not using hosts.deny)

text: I'm **not** using `hosts.allow` or `hosts.deny`, further more SSH works from my windows-machine (same laptop, different hard drive) but not my Linux machine. `ssh -vvv root@host -p port` gives:                 OpenSSH_6.6, OpenSSL 1.0.1f 6 Jan 2014     debug1: Reading configuration data /etc/ssh/ssh_config     debug1: /etc/ssh/ssh_config line 20: Applying options for *     debug2: ssh_connect: needpriv 0     debug1: Connecting to host [host] port <port>.     debug1: Connection established.     debug1: identity file /home/torxed/.ssh/id_dsa type -1     debug1: identity file /home/torxed/.ssh/id_dsa-cert type -1     debug1: Enabling compatibility mode for protocol 2.0     debug1: Local version string SSH-2.0-OpenSSH_6.6     ssh_exchange_identification: read: Connection reset by peer      On the windows machine everything works fine, so i checked the security logs and the lines in there are identical, the server treats the two different "machines" no different and they are both allowed via public-key authentication.. So that leads to the conclusion that this must be a issue with my local ArchLinux laptop.. but what?               [torxed@archie ~]$ cat .ssh/known_hosts      [torxed@archie ~]$       So that's not the problem..               [torxed@archie ~]$ sudo iptables -L     Chain INPUT (policy ACCEPT)     target     prot opt source               destination                   Chain FORWARD (policy ACCEPT)     target     prot opt source               destination                   Chain OUTPUT (policy ACCEPT)     target     prot opt source               destination       No conflicts with the firewall settings (for now)..               [torxed@archie ~]$ ls -la .ssh/     total 20     drwx------  2 torxed users 4096 Sep  3  2013 .     drwx------ 51 torxed users 4096 May 11 11:11 ..     -rw-------  1 torxed users 1679 Sep  3  2013 id_rsa     -rw-r--r--  1 torxed users  403 Sep  3  2013 id_rsa.pub     -rw-r--r--  1 torxed users  170 May 11 11:21 known_hosts      Permissions appears to be fine (same on the server).. Also tried without configuring `/etc/ssh/ssh_config` with the same result except for a lot of auto-configuration going on in the client which ends up with the same error.


title: How to run a specific TCP client with a different IP?

text: My server has 3 ips. I use cronjob doing some api job. But this api has some limit: 100 calls/day. So how can i set a special ip for running some special script via cronjob? Thanks.               0,20,40 * * * * php /var/www/html/script/api_1.php >/dev/null 2>&1 --> the centos default ip address     5,25,45 * * * * php /var/www/html/script/api_2.php >/dev/null 2>&1 --> how to use a second ip address for running only this script?     10,30,50 * * * * php /var/www/html/script/api_3.php >/dev/null 2>&1 --> Or a third ip for running this one?


title: How does Linux system synchronize wtmp and /var/run/utmp?

text: Linux system normally stores current user login information in `/var/run/utmp`, and stores historical information in `/var/log/wtmp`. So, how does it synchronize information between them,   1. When a login happens, does it write to both of these files or does it merge them later?   2. /var/run/utmp is not supposed to be persistent, and it will be a lost at system shutdown or reboot?


title: ElementaryOS Gala using more than 100% CPU constantly

text: I am using ElementaryOS with the default Drivers and my Gala process is constantly using tons of CPU (sometimes more than 200%). I have looked everywhere but couldnt find a solution. I tried to install the proprietary ATI drivers but then I cant login in the system (black screen). My graphic card is an ATI Mobility Radeon 5730. Here is the result of glxinfo command:               name of display: :0     display: :0  screen: 0     direct rendering: Yes     server glx vendor string: SGI     server glx version string: 1.4     server glx extensions:         GLX_ARB_multisample, GLX_EXT_visual_info, GLX_EXT_visual_rating,          GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_OML_swap_method,          GLX_SGI_make_current_read, GLX_SGIS_multisample, GLX_SGIX_fbconfig,          GLX_SGIX_pbuffer, GLX_MESA_copy_sub_buffer, GLX_INTEL_swap_event     client glx vendor string: Mesa Project and SGI     client glx version string: 1.4     client glx extensions:         GLX_ARB_create_context, GLX_ARB_create_context_profile,          GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context,          GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_framebuffer_sRGB,          GLX_EXT_create_context_es2_profile, GLX_MESA_copy_sub_buffer,          GLX_MESA_multithread_makecurrent, GLX_MESA_swap_control,          GLX_OML_swap_method, GLX_OML_sync_control, GLX_SGI_make_current_read,          GLX_SGI_swap_control, GLX_SGI_video_sync, GLX_SGIS_multisample,          GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group,          GLX_EXT_texture_from_pixmap, GLX_INTEL_swap_event     GLX version: 1.4     GLX extensions:         GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context,          GLX_EXT_visual_info, GLX_EXT_visual_rating,          GLX_MESA_multithread_makecurrent, GLX_OML_swap_method,          GLX_SGI_make_current_read, GLX_SGIS_multisample, GLX_SGIX_fbconfig,          GLX_SGIX_pbuffer, GLX_EXT_texture_from_pixmap     OpenGL vendor string: VMware, Inc.     OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 0x300)     OpenGL version string: 2.1 Mesa 8.0.4     OpenGL shading language version string: 1.20     OpenGL extensions:         GL_ARB_multisample, GL_EXT_abgr, GL_EXT_bgra, GL_EXT_blend_color,          GL_EXT_blend_minmax, GL_EXT_blend_subtract, GL_EXT_copy_texture,          GL_EXT_polygon_offset, GL_EXT_subtexture, GL_EXT_texture_object,          GL_EXT_vertex_array, GL_EXT_compiled_vertex_array, GL_EXT_texture,          GL_EXT_texture3D, GL_IBM_rasterpos_clip, GL_ARB_point_parameters,          GL_EXT_draw_range_elements, GL_EXT_packed_pixels, GL_EXT_point_parameters,          GL_EXT_rescale_normal, GL_EXT_separate_specular_color,          GL_EXT_texture_edge_clamp, GL_SGIS_generate_mipmap,          GL_SGIS_texture_border_clamp, GL_SGIS_texture_edge_clamp,          GL_SGIS_texture_lod, GL_ARB_multitexture, GL_IBM_multimode_draw_arrays,          GL_IBM_texture_mirrored_repeat, GL_ARB_texture_cube_map,          GL_ARB_texture_env_add, GL_ARB_transpose_matrix,          GL_EXT_blend_func_separate, GL_EXT_fog_coord, GL_EXT_multi_draw_arrays,          GL_EXT_secondary_color, GL_EXT_texture_env_add, GL_EXT_texture_lod_bias,          GL_INGR_blend_func_separate, GL_NV_blend_square, GL_NV_light_max_exponent,          GL_NV_texgen_reflection, GL_NV_texture_env_combine4,          GL_SUN_multi_draw_arrays, GL_ARB_texture_border_clamp,          GL_ARB_texture_compression, GL_EXT_framebuffer_object,          GL_EXT_texture_env_combine, GL_EXT_texture_env_dot3, GL_MESA_window_pos,          GL_NV_packed_depth_stencil, GL_NV_texture_rectangle, GL_ARB_depth_texture,          GL_ARB_occlusion_query, GL_ARB_shadow, GL_ARB_texture_env_combine,          GL_ARB_texture_env_crossbar, GL_ARB_texture_env_dot3,          GL_ARB_texture_mirrored_repeat, GL_ARB_window_pos,          GL_EXT_stencil_two_side, GL_EXT_texture_cube_map, GL_NV_fog_distance,          GL_APPLE_packed_pixels, GL_APPLE_vertex_array_object, GL_ARB_draw_buffers,          GL_ARB_fragment_program, GL_ARB_fragment_shader, GL_ARB_shader_objects,          GL_ARB_vertex_program, GL_ARB_vertex_shader, GL_ATI_draw_buffers,          GL_ATI_texture_env_combine3, GL_ATI_texture_float, GL_EXT_shadow_funcs,          GL_EXT_stencil_wrap, GL_MESA_pack_invert, GL_MESA_ycbcr_texture,          GL_NV_primitive_restart, GL_ARB_fragment_program_shadow,          GL_ARB_half_float_pixel, GL_ARB_occlusion_query2, GL_ARB_point_sprite,          GL_ARB_shading_language_100, GL_ARB_sync, GL_ARB_texture_non_power_of_two,          GL_ARB_vertex_buffer_object, GL_ATI_blend_equation_separate,          GL_EXT_blend_equation_separate, GL_OES_read_format,          GL_ARB_pixel_buffer_object, GL_ARB_texture_compression_rgtc,          GL_ARB_texture_float, GL_ARB_texture_rectangle,          GL_ATI_texture_compression_3dc, GL_EXT_packed_float,          GL_EXT_pixel_buffer_object, GL_EXT_texture_compression_rgtc,          GL_EXT_texture_mirror_clamp, GL_EXT_texture_rectangle,          GL_EXT_texture_sRGB, GL_EXT_texture_shared_exponent,          GL_ARB_framebuffer_object, GL_EXT_framebuffer_blit,          GL_EXT_framebuffer_multisample, GL_EXT_packed_depth_stencil,          GL_ARB_vertex_array_object, GL_ATI_separate_stencil,          GL_ATI_texture_mirror_once, GL_EXT_draw_buffers2, GL_EXT_draw_instanced,          GL_EXT_gpu_program_parameters, GL_EXT_texture_compression_latc,          GL_EXT_texture_sRGB_decode, GL_OES_EGL_image, GL_ARB_copy_buffer,          GL_ARB_draw_instanced, GL_ARB_half_float_vertex, GL_ARB_instanced_arrays,          GL_ARB_map_buffer_range, GL_ARB_texture_rg, GL_ARB_texture_swizzle,          GL_ARB_vertex_array_bgra, GL_EXT_separate_shader_objects,          GL_EXT_texture_swizzle, GL_EXT_vertex_array_bgra,          GL_NV_conditional_render, GL_AMD_draw_buffers_blend,          GL_ARB_ES2_compatibility, GL_ARB_draw_buffers_blend,          GL_ARB_draw_elements_base_vertex, GL_ARB_explicit_attrib_location,          GL_ARB_fragment_coord_conventions, GL_ARB_provoking_vertex,          GL_ARB_sampler_objects, GL_ARB_shader_texture_lod,          GL_ARB_vertex_type_2_10_10_10_rev, GL_EXT_provoking_vertex,          GL_EXT_texture_snorm, GL_MESA_texture_signed_rgba, GL_ARB_robustness,          GL_ARB_texture_storage      **Edit** xorg.log file -> http://pastebin.com/acbCeMB5 Any help?


title: Creating an array with IFS set to a different value

text: I am trying to construct an array and write to a file in this format, i.e. the file's content should be something like this               hero_pairscore=( askdjfh sdf,sdlkfj lksf,dfgdf,dsflkgj,asdlkf ....)      Where the elements are separated by `comma`. I wrote the following code for this.               #!/bin/bash     #set -x          hero_pairscore=()     while read line     do          $( IFS=",";hero_pairscore+=( "$line" )     done < true_pairscore.txt          echo "hero_pairscore=( ${hero_pairscore[@]} )" > embed.txt      But the resultant file contains only this `hero_pairscore=( )`. What is wrong with my code and how can I correct it to give the desired output?


title: Brazilian Keyboard layout in CentOS 6.5

text: I'm Brazilian and new with Linux. I have the CentOS 6.5 with Gnome 2.28.2 running in a VirtualBox VM. I'm using it to PHP programming and I'm loving it. But I'm having a hard time to make accentuation. I have a standard US International Keyboard (NOT an ABNT2 - no "cedil" key). In Windows, I choose the Brazilian Portuguese language and United States International Keyboard layout, and everything works fine. When I want to make a cedil, I just type the accent key ('), and then the C key. The same process to make accented chars, like A with tilde (~ then A). I already tryied to search the Internet, without success... Every howto points me to ABNT2 keyboards (witch is the standard Brazilian Keyboard), but my Keyboard is the US-Intl.


title: Two or more yes/no questions in a script?

text: I'm writing a bash script which has a "yes/no" question in it, but now I want to have another yes/no question in it. The script can only cope with one yes/no, so how can I have two, or more, yes/no questions in? The yes/no script is:               read -p "Do you want to install this programme? " yn      case $yn in      [Yy]* ) sudo apt-get install "$programme";;      [Nn]* ) exit;;      * ) echo "Please answer yes or no. ";;      esac      exit


title: List packages by installation date

text: How can I list installed packages by installation date? I installed a lot of stuff to compile a certain piece of code, and I want to get a list of the required packages, which are the ones I installed in the last few days. I need to do that on debian/ubuntu, but answers for other distributions would be nice as well.


title: How to see when a package was installed?

text: I installed a package, i forgot when, using synaptic package manager, i want to know the installation date. I don't know how and Google doesn't seem to be helpful helping today.


title: run gnome-mag on kali linux

text: when i want to run gnome magnifier with command `gnome-mag` it says `command not found`!! but when i want to install it by `apt-get install gnome-mag` it says that "it is already installed"!!               Reading package lists... Done     Building dependency tree            Reading state information... Done     gnome-mag is already the newest version.     gnome-mag set to manually installed.      what is the problem?


title: Okular doesn't work any more

text: Under My Ubuntu 12.04, Okular worke fine until I recently run apt-get upgrade. Now I can start Okular, but when try to open a pdf file, Okular just flashes and exits. Here is the output when I run it from the terminal:               $ okular 1.pdf     Got bus address:  "unix:abstract=/tmp/dbus-42dKIwE1xj,guid=c600816fe140597aecffe6cb0000003d"      Connected to accessibility bus at:  "unix:abstract=/tmp/dbus-42dKIwE1xj,guid=c600816fe140597aecffe6cb0000003d"      Registered DEC:  true      okular(27689)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:     okular(27689)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:     okular(27689)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:     okular(27689)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:     okular(27689)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:     Registered event listener change listener:  true      okular: symbol lookup error: okular: undefined symbol: _ZN11KActivities16ResourceInstanceC1EmP7QObject      My Okular is installed from https://launchpad.net/~kalakris/+archive/okular, following http://unix.stackexchange.com/a/123300/674. Thanks!


title: Dual seat in Linux with 3d acceleration and one video card

text: Is there anyway to set up a dual seats (i.e. two keyboards, mice, screens) with 3d acceleration but only one video card, in particular an AMD APU? They seem to support multiple monitors, so it doesn't seem to be a hardware issue, it's just a matter of getting Linux to associate different sessions with them.


title: Subversion: how to determine when files became corrupt

text: I'm using Subversion just for private synchronization between a laptop and a desktop. Recently I discovered that several ASCII files and several binary files were corrupted. Instead of the expected contents, a long series of file names and directory structures was inserted, with some truncated stray strings of binary data. I have never encountered an update or commit reply indicating the repository is corrupt, there are no file system or hardware issues on the two clients that have used the Subversion server. My question is, is there some way I can determine when the files started to go corrupt in the repo, and then revert the files from that old commit where they were still intact?


title: Bonded network interface is not available after a reboot

text: I have some servers with multiple network interfaces, setup with bonding and some VLANs. Whenever I reboot the server, one of the bonded network interfaces is not reachable from other servers, nor can any traffic leave that interface. The status from ifconfig on that interface does indicate that the link is up, however. Simply restarting the network at this point will restore everything to normal. The fact that everything works as expected after I restart the network makes me think that my configuration is correct, but it is something in the startup order that isn't working right on reboot, but gets straightened out when restarting the network. I have 7 identical servers with the same setup (other than IP addresses differing), and it happens on all of them, every time they are rebooted. A bit more details on the setup:   * Servers: HP ProLiant DL380    * 6 network interfaces, setup as 3 bonded interfaces named: bondm, bondr, bondt.    * 4 interfaces are built-in, the remaining 2 are in an add-on PCI card   * bondm is configured with 2 VLANs   * bondm is used as the default route   * bondm is setup to use eth0 and eth2   * bondm is the interface that is failed on reboot **Update:** I've restested this with the exact same configuration and kickstart files, but with SL 6.2 vs 6.3. Everything is fine with 6.2, but I get this behavior with 6.3. Is it due to the different kernels? Here are some of the relevant config files from /etc/sysconfig/network- scripts:               $ cat ifcfg-eth0 ifcfg-eth2 ifcfg-bondm ifcfg-bondm.132 ifcfg-bondm.832      DEVICE=eth0     BOOTPROTO=none     NM_CONTROLLED=no     ONBOOT=yes     TYPE=Ethernet     HWADDR=44:1E:A1:03:71:C4     SLAVE=yes     MASTER=bondm     ETHTOOL_OPTS="-s eth0 speed 1000 duplex full"          DEVICE=eth2     HWADDR=44:1E:A1:03:71:C8     NM_CONTROLLED=no     ONBOOT=yes     SLAVE=yes     MASTER=bondm     ETHTOOL_OPTS="-s eth2 speed 1000 duplex full"          DEVICE=bondm     BOOTPROTO=none     NM_CONTROLLED=no     ONBOOT=yes     TYPE=Ethernet     IPV4_FAILURE_FATAL=yes     IPV6INIT=no     BONDING_OPTS="mode=active-backup miimon=100"          DEVICE=bondm.132     BOOTPROTO=none     NM_CONTROLLED=no     ONBOOT=yes     TYPE=Ethernet     IPADDR=192.168.13.19     PREFIX=28     GATEWAY=192.168.13.17     DEFROUTE=yes     IPV4_FAILURE_FATAL=yes     IPV6INIT=no     BONDING_OPTS="mode=active-backup miimon=100"     VLAN=yes          DEVICE=bondm.832     BOOTPROTO=none     NM_CONTROLLED=no     ONBOOT=yes     TYPE=Ethernet     IPADDR=10.123.94.69     PREFIX=28     DEFROUTE=no     IPV4_FAILURE_FATAL=yes     IPV6INIT=no     BONDING_OPTS="mode=active-backup miimon=100"     VLAN=yes


title: Kate vs VIM/Emacs regarding speed

text: I'm trying to learn C++ in school using a UNIX environment and our professor urges us to use VIM or Emacs because a GUI is disadvantageous for two reasons:   1. Moving your hands off the keyboard and using the mouse to move around reduces coding speed   2. The GUI can be slow over a network. Now I understand these reasons, but I feel like my professor is a bit bias with using non GUI editors. I mean Kate is technically through the terminal, which I really like. Besides disadvantage number 1. if you are on a fast network, is the speed difference really that slow for executing commands through SSH? I mean is it a few milliseconds slower or is it really bad to use Kate and I should just stick with VIM/Emacs? Thanks.


title: Parse log file for value changes

text: From this answer I have reduced a log file to this:               Timestamp:1359021601 2013-01-17 15:00:01     size: 10G   /mnt/SolrFiles/solr/api/     Timestamp:1359025201 2013-01-17 16:00:01     size: 11G   /mnt/SolrFiles/solr/api/     ...snip hundreds of lines...     Timestamp:1359021601 2013-01-24 10:00:01     size: 11G   /mnt/SolrFiles/solr/api/     Timestamp:1359025201 2013-01-24 11:00:01     size: 11G   /mnt/SolrFiles/solr/api/     Timestamp:1359028801 2013-01-24 12:00:01     size: 11G   /mnt/SolrFiles/solr/api/     Timestamp:1359032401 2013-01-24 13:00:01     size: 12G   /mnt/SolrFiles/solr/api/      That pattern will carry on for hundreds of lines. I would like to reduce the file to only show the Timestamps and sizes when the size changes, like this:               Timestamp:1359021601 2013-01-17 15:00:01     size: 10G   /mnt/SolrFiles/solr/api/     Timestamp:1359025201 2013-01-17 16:00:01     size: 11G   /mnt/SolrFiles/solr/api/     Timestamp:1359032401 2013-01-24 13:00:01     size: 12G   /mnt/SolrFiles/solr/api/      Can this be accomplished using common Linux CLI tools such as grep and sed?


title: How to mount aufs file system on boot in archlinux?

text: I want to use aufs to combine a few disks.I am able to mount the aufs file system using the mount command from the command line. However, when trying to mount the same through an fstab entry, it fails. Google tells me that fstab does not mount file systems in the specified order, creating this problem. I also found recommendations to add the mount command in rc.local so the aufs is mounted after fstab. I am using archlinux which uses systemd, so how can I run the mount command at boot in systemd?


title: How to get last crash log from ArchLInux

text: My system suddenly crashed, I have restart it, where could I find the last/previous crash log, since there are no `/var/log/syslog*` anymore..


title: how to list all the internet's IP ranges?

text: I was wondering if I list all the IP ranges directly available on the internet. perhaps also group them by country and ISP? I know that a lot of people do research nowadays on datamining and semantic- web, etc. I hoping to discover an elegant way that exists for achieving this.


title: tmux client/server version mismatch during distribution upgrade

text: It has become fashionable to run distribution upgrade in a `tmux` terminal to avoid remote connection issues or issues with the X server (e.g. opensuse documentation). Yet this does not take into account the risk of having a version mismatch between the already upgraded `tmux` client and the server that manages the terminal where the distribution upgrade is running. To materialize the risk one has to leave the tmux console for the normal terminal during the upgrade. If tmux client is upgraded in the meantime one would not be able to reattach to the tmux session. Instead running `tmux attach` or `tmux ls` one would get               # tmux ls     protocol version mismatch (client 7, server 6)      I ran into this client 7, server 6 version mismatch when upgrading from OpenSUSE 12.2 to 12.3. A quick solution I could come up with was to download the `tmux` rpm from the old distribution repository and unpack it with `cpio` since the machine had a network connection in the process of the upgrade.               wget http://download.opensuse.org/distribution/12.2/repo/oss/suse/i586/tmux-1.6-2.1.2.i586.rpm     rpm2cpio ../tmux-1.6-2.1.2.i586.rpm > tmux-1.6.cpio     cpio -i -d < tmux-1.6.cpio     ./usr/bin/tmux      Should one put a warning on the possible version mismatch when running distro upgrade in a tmux session? Is there an easy way to make tmux client run in a mode compatible with older servers?


title: Is there any remote GUI for ffmpeg?

text: I'm looking for some software with both Linux and Windows versions that can remotely run FFMPEG commands on my Linux server. Just like what transmisson- remote-gui does for Transmission. In summary, I want to be able to convert some videos on my Linux server remotely from my Linux/Windows laptop using a graphical interface. Is this possible?


title: Does negative vs positive matching impact firewall performance?

text: I am curious if using negative vs. positive matching impacts the performance of the `netfilter` stack. e.g. is `iptables -I INPUT -p tcp -s 192.168.0.0/16 -j DROP` equivalent to `iptables -I INPUT -p tcp !-s 192.168.0.0/16 -j ACCEPT` in terms of performance? I have been told that negative matching might yield far worse performance, but I do not think it is supported by any facts; for all I know, it is the number of matching iterations (i.e. rules) which affects performance most. Unfortunately I do not have a test setup at hand with which I could test that hypothesis. The reason I am asking this is the company I work for uses many small (both in size and in computing capabilities) MikroTik routers and I am trying to come up with a reasonable best practices firewall policy. Apparently RouterOS, the proprietary OS MikroTik ships with those routers, is based on Linux kernel 2.6.16, so I believe that limitations of a vanilla 2.6.16 kernel apply there too. As the person who claims there is a difference in performance is my boss, I want to be sure that I may safely ignore the claim.


title: Bad substitution inside xargs subshell?

text: I'm using this command to process PNG files:               find . -iname "*png" -print0 | xargs -r0 --max-procs=4 -n1 sh -c 'pngnq -s1 $1 && advpng -z -4 -q ${$1%.*}-nq8.png' -      It seems to actually work fine, but also outputs this for each file that it processes:               -: 1: -: Bad substitution      I assume that I'm doing something wrong here `${$1%.*}` - but I'm really not sure. The trailing dash is there on purpose, as per the docs here - and I can't just pipe the whole thing because `advpng` can't process things from stdin/out, sadly - so I have to use filenames. Anyone know how to fix this so it doesn't have this error?


title: Why I sometimes see "INIT: version 2.88 reloading" in the console?

text: As far as I understand, the init should automatically restart when I update the package with init or some dependency like libc6. Why I see `INIT: version 2.88 reloading` in console without having installed recently anything that important?


title: How preemption works on Linux when a program has a timer less then 4ms?

text: Jiffies in most Linux system are defaulted to 250 (4ms). The questions is that what happens when a program has a usleep() less then 4ms ? Of course it works as should when it is scheduled. But what happens when linux scheduler takes out this program to wait, because another program has to operate ? How does the preemption works in this case? Should I avoid custom programs with such a small waiting? They couldn't be accurate, could it ?


title: SSH to Linux Container from Other Machine

text: I am trying to learn about Linux Containers and this is my first encounter with servers, ssh and many other things that I do not know the terms yet. I create five different containers and authorized their keys for easy access between each other. They have internal ip (10.0.3. _*_ ). Now what I am trying is to connect these containers from other computers which are in the same network. I installed `openssh-server` to my machine for `ssh` access. But can't connect to container. I search about it through the google but couldn't find any that works and I couldn't understand some of them. Can someone explain (show me a way), assuming I am a beginner which I am, how to 'ssh' my containers from other machines? If there are any additional info I need to give, I will asap. Thanks in advance. EDIT: When computers ssh each other they use eth0 or eth1. When computer(which containers are in) tries to connect to containers it uses loopback. Now lets assume we have two different computer, comp1 and comp2, which are in the same network a cisco modem that do not have internet connection. I can connect from comp1 to comp2 by; 'ssh username@comp2-ip' But I cannot connect comp2's linux containers which are in the loopback. I want to connect them as easy as I connect comp2. Is there a way?


title: How exactly does printk work internally?

text: I know `printf` needs help from the OS to do its job. I also know `printf` does not work in the Linux source code as there is no library. And so we have `printk` for debugging. How does `printk` work when the OS is still booting then?


title: What is the Inverse of Idle in /proc/stat?

text: `/proc/stat/` includes the following fields:               "user",     "nice",     "system",     "idle",     "iowait",     "irq",     "softirq",     "guest",     "guest_nice",      Which subset of those fields + idle accounts for 100% CPU? Is there some overlap, or should the total of all fields always be 100% of CPU time?


title: How to use restricted characters in egrep?

text: I'm trying to use a regex in egrep on Centos 5.10, based on the one I made from this question on SO.               T12345 .{1,100}[\n\r].{1,100}2014.03.04      I can successfully match the regex to the content in my browser, but when I try it in an egrep, nothing is returned, even though there are several matches in my directory. Working Regex Example here Here is the egrep as I'm using it.               egrep -l "T12345 .{1,100}[\n\r].{1,100}2014.03.04" logfiles_*.txt      As far as I can tell, I'm not escaping the restricted characters properly, but nothing I've tried seems to work. **_How can I adapt this regex for use in egrep?_**


title: Changing partition sizes on FreeBSD using bsdlabel

text: I have recently installed FreeBSD but I don't like the partition sizes that I accepted during installation and would like to change them. I have followed the instructions to do so in the man pages, so as root I did               # bsdlabel -e ad0s2      (ad0s2 is the partition on which FreeBsd is installed). After I make my changes, I try to save and exit but I get the following message:               /tmp/EdDk.RBNU2c8vnz: unmodified: line 1     bsdlabel: cannot open provider /dev/ad0s2 for writing label: Operation not permitted     re-edit the label? [y]:      If I try to re-edit, I get the same message again. I even get this message if I try to save without making any changes. I am new to FreeBSD and thought maybe there is something I must do prior to altering the disk label but I cannot find any such information anywhere. Can anyone please help me here? Thanks!


title: Move folder content up one level

text: I have a directory that is unpacked, but is in a folder. How can I move the contents up one level? I am accessing CentOS via SSH.


title: Two Linux Mint 16 systems Skyping--one can see both parties on webcam, the other can see neither

text: I installed Linux Mint 16 32-bit edition on my netbook and a friend's laptop. When we Skype, I can see her live image, and I can see my own live image, so everything looks and sounds right on my end. On her end, she can see neither of our webcam images--just a static avatar for me, and a black box where her webcam image should be. Stranger still, in the Skype options under Video Devices, it says "no devices found"! (The self-view preview there doesn't work for her, either, but does work on my system.) That's really funny to me, because if Skype "can't find" a webcam device, how is it broadcasting from it to me over the internet? But more to the point, how can we get it so she can see me? As a check, Skyping with her from a Windows machine also works on my end but not hers: again, I can see both her and I, and she can see neither of us. Also, she Skyped with another person on a Windows machine, and that person had the same experience: they saw both, she saw neither. If I Skype a Windows machine from my netbook, it works fine, both parties can see themselves and each other. So my friend's laptop is the odd one out, but what could cause it to report 'not found' and yet actually function in sending an image out?


title: What is the equivalent of telnet localhost 25 with ssh?

text: What is the equivalent of               telnet localhost 25      using SSH ? Clarification : I would like to have an SMTP connection with a server using SSH, just like it can be done with a command like `telnet localhost 25`.


title: start apache script

text: I've got Apache installed on my local Linux (sabayon) OS, just for programming testing. What I want is a script so that the server starts right away when I want it. This is the code:               #!/bin/bash     # een script dat de apache server start     /etc/init.d/apache2 start      The only problem is that Apache needs root privileges, but I'm a normal user. Now can I run this script from the command line with `sudo ./apache_start.sh`, but I don't want that. I just want to double click on it and start the Apache server. So what can I do so the script is run as root instead of the normal user? I don't care if there is a prompt that asks for the password, I just don't want to open a console, navigate to the file and so on.


title: Runtime User Privilege Management ColdFusion on CentOS cPanel

text: I'm needing to understand the correct workflow for managing permissions to allow the ColdFusion 9 runtime user {coldfusion} to have access to user accounts. The germane elements ... Centos 5.8 WHM 11.32.4 cPanel EasyApache ColdFusion 9 ColdFusion 9 is installed and proxying connections to jrun server through Apache via mod_jrun22 ... On the cPanel side - Apache user are username:usergroup in vhost containers ... Apache is running as the nobody account and through suExec runs as the account user specified in the vhost container ... However, this doesn't seem to be an option for the ColdFusion user ... So the basic question is how do I give permissions to the ColdFusion user account to run the same way the Apache account does?


title: What is "Page Flipping" on Xorg?

text: Digging in the Xorg logs, I've seen that exists a feature called "Page Flipping". The search engines only shows bug reports but not a full description. So, can you give me a technical description of this feature?. I don't want comments like "is good for the performance" or "is bad for whatever". Just a full description.


title: Viewing hostnames in network

text: Is there Linux command equal to `Net View` in Windows, that shows hostnames in your network? I am in a VPN network and want to see computer names in my network.


title: Chromium browser displays blank screen

text: Xubuntu 11.10 oneiric armel   Asus eee pad slider sl101 nvidia-tegra 2 arm tablet   chromium browser 18.0.1025.151 Browsers which work fine are:   * Midori    * Epiphany    * Firefox Opening a link in Chromium actually I can see the websites are loading but nothing is being displayed on the page... Even the Chromium settings load as a blank screen. I tried installing both the Precise and Oneiric Chromium-browser packages. Both give me the same problem. I deleted the `/home/<user>/.config/chromium` folder and still get a blank screen.


I tried to create some udev rules to mount and unmount my USB flash drives; the rules for the moment are very simple:               ACTION=="add",KERNEL=="sd[b-z]",RUN+="/root/scripts/plug_flash_drive.sh %k"     ACTION=="remove",KERNEL=="sd[b-z]",RUN+="/root/scripts/unplug_flash_drive.sh %k"      plug_flash_drive.sh is also very simple:               device_name=$1     mount_options="umask=000,utf8"     if [ ! -e "/media/$device_name" ]; then         mkdir "/media/$device_name"     fi     sleep 1     /usr/bin/mount "/dev/$device_name" "/media/$device_name" -o "$mount_options"      unplug_flash_drive.sh:               device_name=$1          umount "/dev/$device_name"     rmdir "/media/$device_name"      I have done some tests so I can ascertain that:   * When plugged in, my flash drive is detected; a file is created in /dev   * plug_flash_drive.sh is called by udev   * the mkdir part of the script works   * however, it seems that the "mount" part of the script is not executed, so my drive is not mounted   * when I call my scripts on the command line, they perfectly work Does anybody know why mount is not executed when called by udev? EDIT 28/08/14: I added "grep -q /proc/mounts && echo success || echo failure" at the end of my script to check in my debug log if the device is actually mounted before the script ends. It appears that the device _is_ mounted at that point even when the script is called by udev. So the real problem is now "my block device is seemingly unmounted after the mount script end when called through udev" :s


title: Moving the mouse over a terminal window generates escape sequences

text: When using `tmux` over a ssh connection, if I launch a program to keep open, I run into troubles when I move my mouse inside the `tmux` window: > > ^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B > ^[^[ This hangs my executable. How can I prevent this from happening?


title: Ghost directory in home directory

text: I am using following command to check the disk usage in my home direcory.               du -sk * | sort -n      I am getting the following output               273240  AQP     707720  oradiag     3176872 J2EEServer     23628720        var     100000910      I get a directory of size 100000910 without a name in the last line . How can I access/delete this ghost directory in my home directory.


title: Problem uninstalling cgminer in xubuntu

text: I have installed cgminer-3.7.2 from sources. I later wanted to remove the package and followed the instructions provided in install guide. But i am still able to run the program when i type in 'cgminer' in the terminal. How to completely remove the program?


title: Cron job for every minute executing out of order?

text: I'm setting up some shell scripting to be executed every five minutes, then every minute on our client's system, to poll a log and pull some timing information to be stored and accessed by another application through an external file. The current implementation we have in place works fine as it writes a single line to two separate files. We're refining the process so now I need to write two lines to one file every five minutes, and four lines to another, for every minute. However, I've noticed in testing that every few minutes the lines seem to execute out of order. My scripts are included below:                */5 * * * *     ~/myscript.pl ~/mylog | tail -3 | head -1 > ~/myreport1      */5 * * * *     ~/myscript.pl ~/mylog | tail -2 | head -1 >> ~/myreport1           * * * * *       ~/myscript.pl ~/mylog | tail -8 | head -1 > ~/myreport2      * * * * *       ~/myscript.pl ~/mylog | tail -7 | head -1 >> ~/myreport2      * * * * *       ~/myscript.pl ~/mylog | tail -3 | head -1 >> ~/myreport2      * * * * *       ~/myscript.pl ~/mylog | tail -2 | head -1 >> ~/myreport2      In some cases, it seems that only a handful of the lines execute properly while in others, only one line is written. I don't even see the full number of lines written to the file all the time, otherwise I'd just assume the values I was pulling weren't being collected properly. I'm not sure how to judge whether all the cron lines are being executed, and what could be causing them to happen out of order, or not at all.


title: Recovering Mojibaked Files

text: I have recently been encountering several broken files whose contents got thoroughly baked in conversions between UTF-8 and ISO-Latin-1. How can I repair these files? The process that created the broken text in question went like this:   1. The original text, "ó", was saved as UTF-8 (`0xC3B3`).   2. The encoded bytes (`0xC3` and `0xB3`) were interpreted as ISO-Latin-1 characters, "Ã" and "³".   3. These characters were saved as their UTF-8 representations (`0xC383` and `0xC2B3`). The file now contains the bytes `C3 83 C2 B3`. From this, I need to reconstruct the original string, "ó". How can I repair files with this (or similar) types of corruption?


title: Hand shaking fails while trying to add PPA repository

text: I cannot add any kind off PPA repository. When I execute the following command e.g.:               sudo add-apt-repository ppa:hotot-team      I get the following error: > Cannot add PPA: '"Error reading https://launchpad.net/api/1.0/~hotot- > team/+archive/ppa: (35, 'gnutls_handshake() failed: A TLS packet with > unexpected length was received.')"'. I do have access to launchpad.net and I can ping it. What should I do to get this fixed? _(Linux: Mint 15 Mate)_


title: How to install LXDM instead of GDM3?

text: I'm running Debian Wheezy and my default Display Manager is GDM3, and I would like to replace it with LXDM. The problem is that I'm trying to run `# apt-get install lxde` and it's not working, what am I doing wrong? My `/etc/apt/sources.list` is:               deb cdrom:[Debian GNU/Linux testing _Wheezy_ - Official Snapshot i386 DVD Binar$          deb http://ftp.br.debian.org/debian wheezy main     deb-src http://ftp.br.debian.org/debian/ wheezy main          deb http://security.debian.org/ wheezy/updates main contrib     deb-src http://security.debian.org/ wheezy/updates main contrib