title: Can I get the ffmpeg command-line from an existing video?

text: I want to generate a video with the exact same settings as an existing video. I can run:               ffmpeg -i original.mp4      To get human-readable info about the contents:               Duration: 00:05:32.32, start: 0.000000, bitrate: 474 kb/s       Stream #0.0(und): Video: h264, yuv420p, 480x360, 25 tbr, 25 tbn, 50 tbc       Stream #0.1(und): Audio: aac, 44100 Hz, stereo, s16      But what I'd like is to get the command-line I'd need to convert another video into the exact same format, so something like:               ffmpeg -i source.mp4 -vcodec h264 - ....      Any ideas if such a thing is possible?


title: vim script: how to change "put =" to an append?

text: I'm trying to hack the c-vim plugin because I don't like the way it inserts comments. I want this:               /* comment */      but it gives me this:               /* comment      */      I'm sure it has its reasons, but I don't like it. So I'm digging through the c.vim file and I've found this:               function! C_CodeComment( mode, style )        if a:mode=="a"          if a:style == 'yes'            silent exe ":s#^#/\* #"            silent put = ' */'          else            silent exe ":s#^#//#"          endif        endif        if a:mode=="v"          if a:style == 'yes'            silent exe ":'<,'>s/^/ \* /"            silent exe ":'< s'^ '\/'"            silent exe ":'>"            silent put = ' */'          else            silent exe ":'<,'>s#^#//#"          endif        endif      endfunction      I have not been able to find any documentation on the `put =` statement, which I'm pretty sure is the one I have to change in order to get vim to append `*/` to the last line of the comment. Can anyone point me in the right direction, please?


title: Do we have an undo in Linux?

text: I renamed a few files in one batch script. Is there a way to undo the changes without having to rename them back? Does Linux provide some native way of `undo`ing?


title: Linux device-mapper & ext4: what happens when the COW table fills up?

text: Consider the following scenario:   * I use Linux device mapper to create a snapshot of an ext4 file system.   * The snapshot is mounted as read-only; the source volume is mounted as read-write.   * I read the snapshot, and simultaneously write (too much) to the source volume. Eventually, the copy-on-write table fills up. Now exactly what happens _in practice_ from the user's perspective? What kind of messages should I expect to see in dmesg? How do the applications that read the snapshot behave? Has someone actually tried this to see what would happen?


title: How to enable two finger scrolling without trackpad options?

text: I just installed Katya (linux mint 11) on my new Dell Inspiron 15R, and in Windows, my mouse supports multitouch (two finger scroll, three finger swipe, etc.). I have checked `Preferences->Mouse` and there is supposed to be a `Touchpad`, or similar section, but there is no such section available. Sidescrolling works, but I am unable to find any trackpad/touchpad specific settings. Anyone have a solution? **EDIT:** for clarification, i am dual booting Win7 and Mint in separate partitions on the same machine.


title: Toggle going to sleep when laptop lid closes?

text: I'm running Fedora 15 Gnome on a laptop. I can't seem to find an option to toggle if the laptop goes to sleep when the lid closes. There are certain times where I want to put the laptop away or close it but still have it do some crunching on some long running task Is there a place to toggle this option?


title: Can I have my own version control system?

text: In the linux/unix machine I am using, I am just a normal user. However, I want a version control system to manage my files to prevent accidental delete/rename/lost/modification. Obviously I don't have the right to install a version control into the machine. Do we have a portable version of such version control system? Most likely I use AIX. or Red Hat Linux.


title: Removed GNOME desktop, cannot connect to internet from terminal

text: I'm using Fedora 19. I removed my GNOME-Desktop (`sudo yum remove @gnome- desktop`). After that when I try to connect to internet from command line i'm facing all sorts of issues.. Ethernet cable is also connected however when i execute               $ ping www.google.com      returns               connect: Network is unreachable      When I try to execute commands like `wifi-menu` or `netctl`, i'm getting error that               $ bash: command not found      Any idea on how to resolve this...


title: Automount EncFS unit

text: How can I automount an EncFS unit at login/start my session? I use Fedora 20 and KDE. Please don't mention apps like Cryptkeeper and so. I would rather console solutions.


title: How to take the log of the patches we applied?

text: So here's my question I recently downloaded the linux kernel patch 3.4.101 and i applied this patch directly to the base 3.4.0 with this command:               $ cd /kernel source directory     $ gzip -cd ../path to patch/patch-3.4.101 | patch -p1      And I got some failed hunks… but since the patch was too large I was not able to analyze all the hunks and rejections… so here goes my main question: How can I get the complete log of this patching process?


title: can initramfs be paged out to swap disk?

text: I am using `initramfs` to boot Centos via PXE. The `initramfs` used memory is listed within the "cached" value in `/proc/meminfo` or via `free`. Since I need to calculate performance data, I need to know whether the memory used by the `initramfs` is reclaimable (i.e. can be swapped out to disk) or not. Typically only a very small part of the `/` filesystem tree is actually in use, so a majority of the `initramfs` could be swapped out. Reading on this i got conflicting information. Some sources claimed that `initramfs` behaves like `initrd` and is based on `ramfs`, which means claimed memory cannot be paged out to swap. Other sources claim that `initramfs` is essentially `tmpfs` which in turn would imply that it can be paged out to swap. Which is true? Can the unused parts of the `initramfs` filesystem be paged out to swap space?


title: How to test that my server is indeed in 1gbps connection?

text: I ordered a server and the host say I got 1gbps connection However, because I set up the server incorrectly, the speed drop to 10mbps I think now it has been fixed. But I want to make sure. This is what my host told me > It has nothing to do with FDCServers in particular.. Its an issue that > sometimes can occur when a NIC on a computer negotiates it's speed with a > switch. It's something that can happen from time to time and part of basic > troubleshooting. > > If you are running linux you can type run the commands man ethtool or man > mii-tool > > And if you'd like to learn about basic network information. I'm sure a quick > google search can provide some information.


title: add .pdf to the end of text in a text file - bash

text: #!/bin/bash     #read the text line by line and cut off the extension     while read filenames ; do         dataset=$filenames         nameis=${dataset%.*}         echo "$nameis" >> /infanass/dev/admin/test/parsed.txt     done < /infanass/dev/admin/test/tobeparsed.txt #location where file names w/ extensions are           while read line ; do         grep "^$line$" /infanass/dev/admin/test/parsed.txt >>matches.txt     done < /infanass/dev/admin/test/file1.txt      I compare my text between the two files and if they match they get sent to the matches.txt The values that get sent to matches.txt have no extensions (just names) i want to add .pdf to all of them when they get sent to the matches.txt Does anybody have an idea?


title: What's the difference between 'no caching page mode present' and 'assuming drive cache. write through.'

text: Post-POST, post-BIOS screen, post-GRUB; when I boot Debian with a SD card or USB stick plugged in, one of the _first_ things to pop up on the screen (so quickly that usually I don't even notice) looks a little something like:               [sdX] no caching page mode present      text, text, X starts about halfway through that long list of stuff, the text gets noticeably smaller, and just before the window manager starts, I see the very familiar device message (isn't that what `dmesg` stands for, anyhow?)               [sdX] assuming drive cache. write through      So, technically speaking, what's the difference between those two states? What's being cached? What's the page? What's 'writing through'? And what precludes the assumption of drive cache so that the writing through can happen, directly following boot?


title: Run a command for a specified time and then abort if time exceeds

text: I want know how I can run a command for a specified time say, one minute and if it doesn't complete execution then I should be able to stop it.


title: Is there a way to call a command with a set time limit and kill it when that time passes?

text: > **Possible Duplicate:**   >  Run a command for a specified time and then abort if time exceeds I was working on a continuos integration build script when a need for such a command arose. Basically put, I need to launch a command with a set time limit for it to run before it gets killed and all of the proceeding commands should immediately be run once this command launches the time -limited process in the background and not wait for it get to be killed. A sort of asynchronous concurency. Here's what I imagine:               timelimited --limit=10 'somecommand --someoptions'     someothercommand //This gets launched immediately once 'timelimited' is done creating the background process


title: How to cat a file for a certain number of seconds?

text: > **Possible Duplicate:**   >  Run a command for a specified time and then abort if time exceeds Looked all over and I can't find the answer... Simple question: How can I cat a large file for, lets say, 45 seconds and output it to the screen or redirect to another file. Thanks!


title: How do I get the nc command to end after 2 seconds?

text: I have to write a maintenance script that iterates over our IPs testing their connectivity to certain services such as `nc -sip# mailin-01.mx.aol.com 25`. It has a flag `-w ...` but it's not what I think it is. That is, I only want this program to run for at max 3 seconds and the places we are connecting to are always up (unless major network problems that the script shouldn't worry about --- not its particular job and would be noticed before the script is run). I just need it to connect and see if we are getting an error message. This is required before we assign an IP to a user for their web page (this is an alternative to CPanel stuff -- we want our own).


title: Bash nested command substitution not working

text: Hi I have a bash script that intend to run via `watch ./script.sh` It's to debug a cooling problem with my laptop, however the script I wrote isn't working as intended. I'm quite new to bash scripting so I'm sure its something simple. I have a line in my script that has a nested command substitution but the inner command doesn't appear to work or at least it looks like the inner command doesn't know the value of `$i`. Any help appreciated. here's the script:               echo "THERMAL ZONE 2:"     echo "Cur Temp: $(cat /sys/class/thermal/thermal_zone2/temp)"          for i in {2..7}     do     echo "cooling_device$i STATE: $(cat /sys/class/thermal/thermal_zone2/cdev$i/cur_state) TRIP POINT TEMP: $(cat /sys/class/thermal/thermal_zone2/trip_point_$(cat /sys/class/thermal/thermal_zone2/cdev$i_trip_point)_temp)"     done      and heres the output:               THERMAL ZONE 2:     Cur Temp: 43000     cat: /sys/class/thermal/thermal_zone2/cdev: No such file or directory     cat: /sys/class/thermal/thermal_zone2/trip_point__temp: No such file or directory     cooling_device2 STATE: 1 TRIP POINT TEMP:      cat: /sys/class/thermal/thermal_zone2/cdev: No such file or directory     cat: /sys/class/thermal/thermal_zone2/trip_point__temp: No such file or directory     cooling_device3 STATE: 1 TRIP POINT TEMP:      cat: /sys/class/thermal/thermal_zone2/cdev: No such file or directory     cat: /sys/class/thermal/thermal_zone2/trip_point__temp: No such file or directory     cooling_device4 STATE: 0 TRIP POINT TEMP:      cat: /sys/class/thermal/thermal_zone2/cdev: No such file or directory     cat: /sys/class/thermal/thermal_zone2/trip_point__temp: No such file or directory     cooling_device5 STATE: 0 TRIP POINT TEMP:      cat: /sys/class/thermal/thermal_zone2/cdev: No such file or directory     cat: /sys/class/thermal/thermal_zone2/trip_point__temp: No such file or directory     cooling_device6 STATE: 0 TRIP POINT TEMP:      cat: /sys/class/thermal/thermal_zone2/cdev: No such file or directory     cat: /sys/class/thermal/thermal_zone2/trip_point__temp: No such file or directory     cooling_device7 STATE: 0 TRIP POINT TEMP:


title: Printing failure in Linux Mint 13

text: I installed Mint 13, 64-bit, Cinnamon, and have a Canon ImageClass MF4150 printer. I retrieved and installed the drivers. I added the printer and tried to print a test page. The message said "printing", then "printing completed." However, nothing printed. I used the following commands to install drivers:               dpkg -i cndrvcups-common_2.40-2_amd64.deb          dpkg -i cndrvcups-ufr2-us_2.40-2_amd64.deb Then I add the printer in Printer settings. I also add myself as an allowed user. Then I tried printing a test page and got a message saying "Printing test page on MF4100 series". After about 2 seconds I get a message saying "Printing completed ..." but nothing prints. What am I doing wrong?


title: Applications grabing ALSA exlusively

text: So, my second question about linux audio on the site. The previous one generated quite a lot introductory information. I have `ALSA` and `PulseAudio` installed.   * Before installing PulseAudio, no audio cards were being detected in the graphical "Sound" panel. And now, under "Applications" I see listed `ALSA plug-in(firefox)`. Why do I need PulseAudio to detect the sound card and to play through ALSA?   * `alsamixer` does not work - muting the master has no effect. Furthermore, only one application can play simultaniously - starting a second one reports `device busy`.  So my software mixing is not working. How do I fix it. How do I trace what path take the signals from the applications to the hardware? Note" the audio is being streamed through USB. `alsamixer` sais `no options for ths device` and the controls that I was modifying apper to be the motherboard soundcard's.


title: Is NetworkManager itself capable of creating a new Wifi connection?

text: Manual pages of NetworkManager mentions that it "manages Wifi network interfaces", however it does not say whether it can create new Wifi connections. NetworkManager applet appears to be able to create new Wifi connections, however NetworkManager CLI manual does not mention anything about Wifi. Thus adding more to my confusion. So after all, what functions does NetworkManager provide in "managing Wifi network interfaces"? Does NetworkManager rely on other programs to create new Wifi connections?


title: Reroute one URL

text: I am looking to reroute one particular URL to another, for example : `http://website.com/page1.html` to `http://website.com/page2.html` on a third party server only on my machine. But I still want it to reply as if it was page1.html. Is there a way to do that on a client UNIX ? Alex PS : If any clarification is required, please tell me


title: Copy a File From One Zip to Another?

text: I have a file named `'sourceZip.zip'` This file (`'sourceZip.zip'`) contains two files: `'textFile.txt'` `'binFile.bin'` * * * I also have a file named `'targetZip.zip'` This file (`'targetZip.zip'`) contains one file: `'jpgFile.jpg'` * * * In linux, what bash command shall I use to copy both files (`'textFile.txt'`, `'binFile.bin'`) from the source archive (`'sourceZip.zip'`) straight into the second archive (`'targetZip.zip'`), so that at the end of the process, the second archive (`'targetZip.zip'`) will include all three files? (ideally, this would be done in one command, using 'zip' or 'unzip')


title: difference between signalfd and sigwaitinfo?

text: I went through examples and man page but couldn't figure out difference between signalfd and sigwaitinfo Apart from syntax both are doing same thing i.e. waiting for signal storing it details into some structure. in man page it is written. This provides an alternative to the use of a signal **handler or sigwaitinfo(2), and has the advantage that the file descriptor may be monitored by select(2), poll(2), and epoll(7).** Can anyone please explain me what does it exactly means?


title: Don't expand command line mapping (cmap) until pressing enter in vim

text: I have               cmap w!! %!sudo tee > /dev/null %      in my `.vimrc`. When I type a `w` while writing in the vim command line (after `:`), the cursor stays over the `w` for a few seconds before moving right. This sometimes breaks my train of thought and confuses me for a few seconds. Is there a way to make the mapping happen when pressing enter after the command so that it doesn't temporarily "eat" the `w` every time I press it? (Incidentally, this mapping also makes `w!!` expand when I'm typing a search query which isn't annoying in practice (except for the fact that the `w` is similarly delayed) but seems strange.)


title: Is there a way to list the connected devices on my wifi access point?

text: I have an Angstrom Linux device acting as an access point, running `hostapd`, `dhcpd`, which works fine. Can I get a list of devices connected to the Wi-Fi? I know I can get the DHCP leases, but I need to know which devices connect through `wlan0`. I've tried this (`iwlist` has options):               iwlist wlan0 ap     iwlist wlan0 accesspoints     iwlist wlan0 peers      but all return:               wlan0     Interface doesn't have a list of Peers/Access-Points      `iwconfig`, `iwgetid`, `iwpriv` and `iwspy` are also present in `/sbin`, but don't seem to have options to display the client list.


title: Exiting block insert mode with Ctrl-C

text: In vim, if you are in block insert mode (`Ctrl-V, Shift-I`) and exit using `Ctrl-C` (instead of `Esc`), it cancels the block edit (and only edits the first row). Why is this? In almost all other contexts, `Ctrl-C` and `Esc` are synonymous. (And ideally there's a way to fix this -- I've now gotten used to doing `Ctrl-C` and it would be a shame if I had to relearn…)


title: How can I disable terminal resizing

text: `Vim` scripts sometimes resize the whole shell (in my case the `Taglist` plugin). I don't want this behavior, which is possible with the shell command `resize`, too. Is there a way to suppress the whole resizing in shell windows? Any `.*rc` files to tune? I'm using gnome-terminal.


title: SSH and home directory permissions

text: It took me hours to solve this SSH problem with one of my class accounts on my school's servers. I couldn't ssh into one particular class account without entering my password, while passwordless authentication worked with my other class accounts. The .ssh/ directory and all of its contents had the same, correct permissions as the other class accounts. Turns out the problem was the permissions set on my own home directory. Passwordless authentication did not work when the permissions on my HOME directory were set to 770 (regardless of the permissions set for .ssh/), but it worked with permissions set to 755 or 700. Anyone know why SSH does this? Is it because the home directory permissions are too permissive? Why does SSH refuse to authenticate with the public/private keys when the home directory is set more permissive than 700?


title: Unable to use -o allow_other with sshfs (option enabled in fuse.conf)

text: I have the following on my `/etc/fuse.conf` file:               # Set the maximum number of FUSE mounts allowed to non-root users.                            # The default is 1000.                                                                        #                                                                                #mount_max = 1000                                                                                # Allow non-root users to specify the 'allow_other' or 'allow_root'                           # mount options.                                                                              #                                                                                user_allow_other          But when I try to mount a remote path with the option `allow_other`:               > sshfs name@server:/remote/path /local/path -o allow_other      I get:               fusermount: failed to open /etc/fuse.conf: Permission denied     fusermount: option allow_other only allowed if 'user_allow_other' is set in /etc/fuse.conf      I have triple checked and the option `user_allow_other` is uncommented in my `fuse.conf`,as I copied above. I have also executed `sudo adduser my_user_name fuse` (not sure if this is needed though), but I still get the same problem. Why is it not parsing the `/etc/fuse.conf` file correctly?


title: Changing DD-WRT's default IP address

text: I have Buffalo WZR-HP-G300NH wireless router and I updated the firmware to DD- WRT (the newest build). The rest of my home network is in IP scope of 192.168.0.100-200 and this router has it's own. The default IP of the router is 192.168.1.1. On the setup tab (Basic setup) there is a place where I can change the IP, gateway etc. If I set the correct configuration, press save and apply, nothing happens, or actually something happens... I have to remove the WAN cable and reset the modem to access it again. So it won't change the IP. Solutions?


title: How should I rsync files in /var/www if I want them to be owned by www-data?

text: I have set up a new ec2 ubuntu box and installed apache and php5. By default you log onto the box with the `ubuntu` user who has `sudo` privileges. I believe apache runs as `root` and php5 runs as `www-data`. I think that I want all of the files in `/var/www` to be chown'ed to `www- data:www-data`, and folders set as 755 and files as 644 - unless there is an issue with that. Things run fine like this, but my issue is that when I `rsync` files from my laptop to the server it changes the ownership on them (and adds new files) as `ubuntu:admin` I have been through the `rsync` manual and searched Google, and I've seen a syntax like:               rsync -avzcO (source) (destination) --owner=www-data --group=www-data      However it appears that `\--owner` and `\--group` don't not take an argument but instead are meant to be used to force the remote files to have the same owner as on the local file system if rsync is being done as a super user. So, I haven't found a solution with rsync to set the remote user and group of files during rsync. **What am I doing wrong?** Thoughts:   * Maybe my files in /var/www should just be owned by `ubuntu:admin` ?   * Maybe I have the rsync syntax wrong   * I guess I could rsync as the `www-data` user but that doesn't seem like a good idea   * I could use suPHP like I would do on a shared host, but that seems like quite a bit of trouble


title: Bridging ethernet interface

text: I have a server with 4 public IP's. I have it with this configuration and I want to bridge the interface eth0 for using it with KVM: So, I have 3 IP's (A.B.C.144, A.B.C.145, A.B.C.146) and another interface with the main IP that I want to bridge (188.165.X.Y) **/etc/network/interfaces** :               # The loopback network interface     auto lo     iface lo inet loopback          auto eth0     iface eth0 inet static         address 188.165.X.Y         netmask 255.255.255.0         network 188.165.255.0         broadcast 188.165.255.255         gateway 188.165.255.254          # KVM Bridge     auto br0     iface br0 inet static         address 188.165.X.Y         netmask 255.255.255.0         network 188.165.255.0         broadcast 188.165.255.255         gateway 188.165.255.254             bridge_ports eth0             bridge_fd 9             bridge_hello 2             bridge_maxage 12             bridge_stp off          auto eth0:0     iface eth0:0 inet static         address A.B.C.145         netmask 255.255.255.255          auto eth0:1     iface eth0:1 inet static         address A.B.C.146         netmask 255.255.255.255          auto eth0:2     iface eth0:2 inet static         address A.B.C.147         netmask 255.255.255.255      Everything (eth0, eth0:0: eth0:1, eth0:2) is working fine except the bridge (br0). But, If I do:               ifup br0      I lose the connection and I have to restore configuration without br0. What should I do? With @Ulrich configuration:               device eth0 entered promiscuous mode     e1000e 0000:00:19.0: irq 43 for MSI/MSI-X     e1000e 0000:00:19.0: irq 43 for MSI/MSI-X     ADDRCONF(NETDEV_UP): eth0: link is not ready     ADDRCONF(NETDEV_UP): br0: link is not ready     e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: None     e1000e 0000:00:19.0: eth0: 10/100 speed: disabling TSO     ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready     br0: port 1(eth0) entering forwarding state     br0: port 1(eth0) entering forwarding state     ADDRCONF(NETDEV_CHANGE): br0: link becomes ready


title: exit out of all SSH connections in one command and close PuTTY

text: Is there a way to back out of all SSH connections and close PuTTY in "one shot"? I work in Windows 7 and use PuTTY to SSH to various Linux hosts. An example of the way I find myself working:               SSH to host1 with PuTTY...     banjer@host1:~> #...doin some work...ooh! need to go check something on host8...     banjer@host1:~> ssh host8     banjer@host8:~> #...doin some work...OK time for lunch. lets close putty...     banjer@host8:~> exit     banjer@host1:~> exit     Putty closes.      Per above, any way to get from host8 to closing PuTTY in one shot? Sometimes I find myself up to 5 or 10 hosts deep. I realize I can click the X to close the PuTTY window, but I like to make sure my SSH connections get closed properly by using the exit command. I also realize I'm asking for tips on how to increase laziness. I'll just write it off as "how can I be more efficient".


title: Set up nvidia drivers on mobile sli configuration

text: I have been trying to get xfce running on my slackware install for a while now, but no matter which graphics driver I use it always fails with the no screens found error. I can run it at a significantly reduced resolution using the stock options, but that isn't acceptable for most purposes. Has anyone had success setting up a mobile sli configuration in linux? I am able run Ubuntu with correct resolution settings, but that was working by default.


title: Intrusion system suggestion specifically for Centos 6.4

text: We are trying to evaluate a good possible intrusion detection package specifically for centos 6.4. So far Ossec looks promising. Any other based on others experience.


title: eclipse luna UI rendering in linux

text: I installed eclipse luna in Fedora 19 and facing the following problems.               Tab headers seems to be big compared to windows installations. I googled and edited .gtkrc-2.0 file in home directory which made tabs smaller. But I'm using High Contrast appearance instead of GTK, to get the dark background. But again the tabs appears big. What is the script I have use or edit to solve this problem.          I'm using Dark theme the selection of item in tree is not highlighting. How to solve this ?          Tool bar icons seems to be big how to reduce their size?


title: Is there a way to select by several conditions in `ps`?

text: It seems I am missing something blindingly obvious, but still:               ps -f -u myuser --ppid 1      Seems to only take a look at parent pid of the process, and returns all the processes that have parent pid of 1 - even when the user is not `myuser`. The `-u` alone works correctly (selecting only processes of `myuser`):               ps -f -u myuser      What am I missing? Is there some built-in way to filter by several conditions in `ps`? **EDIT:** My current workaround:               ps -f -p $(join <(ps h --ppid 1 -o pid | sort) <(ps h -u myuser -o pid | sort))


title: Why CTRL+L in Terminal won't clear screen like cls in Powershell

text: I compared the `CTRL`+`L` in the Linux Debian terminal and the `cls` in Powershell. When I pressed `CTRL`+`L`, it doesn't really clear the screen, it just prints newlines a few times. But when I type `cls` in Powershell, it cleared the screen. Why isn't the terminal clearing the screen like in Powershell?


title: tcpdump don't show src and dst address

text: I'm having a problem with a tcpdump. The output is:               21:53:53.877873 MPLS (label 266837, exp 0, [S], ttl 255), IP, length: 193     21:53:53.878037 MPLS (label 326819, exp 0, [S], ttl 255), IP, length: 1332     21:53:53.878037 MPLS (label 326819, exp 0, [S], ttl 255), IP, length: 1332     21:53:53.878050 MPLS (label 326819, exp 0, [S], ttl 255), IP, length: 1332     21:53:53.878070 MPLS (label 326819, exp 0, [S], ttl 255), IP, length: 1332     21:53:53.878149 MPLS (label 326819, exp 0, [S], ttl 255), IP, length: 1332     21:53:53.878430 MPLS (label 279951, exp 0, [S], ttl 255), IP, length: 50      And not the expected:               22:08:12.029608 IP 10.57.169.224.49612 > 68.171.231.64.51620: Flags [.], ack 2761, win 65535, length 0     22:08:12.029620 IP 10.57.169.224.49612 > 68.171.231.64.51620: Flags [.], ack 4141, win 65535, length 0     22:08:12.029631 IP 10.57.169.224.49612 > 68.171.231.64.51620: Flags [.], ack 5521, win 65535, length 0     22:08:12.029657 IP 206.51.26.193.19063 > 10.45.14.157.19060: UDP, length 386     22:08:12.029694 IP 206.51.26.193.19064 > 10.56.143.63.19060: UDP, length 1300      So, with this output, the host filter don't work. When i put the -v option or -vv option, i get the IP's (src and dest):               21:54:04.727826 MPLS (label 299984, exp 0, [S], ttl 255)             IP (tos 0x0, ttl 55, id 26147, offset 0, flags [DF], proto TCP (6), length 1500)         72.21.91.19.http > 186.165.14.97.42408: Flags [.], seq 702450604:702452064, ack 2572860166, win 245, length 1460     21:54:04.727867 MPLS (label 262205, exp 0, [S], ttl 255)             IP (tos 0x48, ttl 252, id 357, offset 0, flags [none], proto UDP (17), length 1328)         10.101.12.105.19060 > 206.51.26.193.19061: UDP, length 1300     21:54:04.727880 MPLS (label 279961, exp 0, [S], ttl 255)             IP (tos 0x0, ttl 49, id 50980, offset 0, flags [DF], proto TCP (6), length 109)         69.167.149.108.9933 > 181.185.41.153.53120: Flags [P.], seq 3203122401:3203122470, ack 2844602734, win 63504, length 69     21:54:04.727891 MPLS (label 264603, exp 0, [S], ttl 255)             IP (tos 0x0, ttl 81, id 59423, offset 0, flags [DF], proto TCP (6), length 200)         69.171.247.29.https > 186.25.255.129.50605: Flags [P.], seq 2597755680:2597755840, ack 2375027064, win 35, length 160      But -v and -vv option don't work with -w option, so the filter don't work and the file generated is empty. Anyone know how to make the tcpdump print the IP's and host filter works? I'm using SVOS 9.20.0200 (FreeBSD 8.2 based), tcpdump version 4.0.0 and libpcap version 1.0.0


title: How to know if a process is attached to a tap interface?

text: I sometimes come upon machine with tap interfaces (eg, when KVM is running). How can i know which process is attached to the tap interface ?


title: Find out that driver is installed properly

text: I have got a pci sata controller on my machine. I am not sure that the driver is installed properly. The `lspci -v` output of the card is:               00:09.0 RAID bus controller: VIA Technologies, Inc. VT6421 IDE RAID Controller (rev 50)     Subsystem: VIA Technologies, Inc. VT6421 IDE RAID Controller     Flags: bus master, medium devsel, latency 32, IRQ 18     I/O ports at cc00 [size=16]     I/O ports at d000 [size=16]     I/O ports at d400 [size=16]     I/O ports at d800 [size=16]     I/O ports at dc00 [size=32]     I/O ports at e000 [size=256]     [virtual] Expansion ROM at 40000000 [disabled] [size=64K]     Capabilities: <access denied>     Kernel driver in use: sata_via     Kernel modules: sata_via      Could you please help me to examine that this driver is installed properly?


title: E763 with vim and spell checker

text: I want to add germand spell checking to vim. So I set               :set spl=de_de spell      then there is a dialogue, where I can create a directory called `.vim/spell`. And then there is another question where I can download a `.spl` file. And again for a `.sug` file. But when I download both files I get an error               Fehler beim Ausführen von "~/.vim/spell/de.utf-8.spl":     E763: 'Word Characters' unterscheiden sich zwischen Rechtschreibwörterbüchern      But despite the error I can use the spell checking and even the suggestion works. Also I could not `:mksp` my own `.spl`-file from myspell, cause it wouldn't read the `.dic`-file. And I deleted the `spell`directory and retried it. Nothing worked.


title: Grub2 without arrow keys

text: My laptop keyboard recently had a losing encounter with a beer, and the arrow keys don't work anymore. No big deal, I figured -- I remapped CAPS+hjkl to the arrows in xkb, and after a little getting used to it's an improvement. The one problem is that I can't navigate the menu in GRUB anymore. Is there any alternative way to choose which option to boot in GRUB, besides scrolling up and down? PgUp and PgDn will get me the first and last options, so I can put the two most common choices there and get the rest as needed with a USB keyboard. Obviously this isn't ideal. I vaguely remember that in the old GRUB the options could be selected by number -- is it possible to enable this somehow?


title: How to delete old packages installed by pacman in Arch Linux?

text: I have recently installed Arch Linux and found that I am eating away at a lot of memory relatively quickly. For whatever reason I have already used 17GB in just about 2 weeks. I do not have a great deal of software installed so I am led to believe that all of the old packages are maintained somewhere. To support this, I have noticed that if I installed a package, remove that package, and then re-install it that pacman merely unpacks and re-installs the software without having to re-download it. After I installed my base system, before extra software, I used about 2GB or so maybe. I have since only installed Matlab, Skype, Wine, and a few other small programs. Of course I have also installed missing libraries and the like, but not nearly 15GB worth. Am I completely wrong here or does Arch never delete old packages when downloading/upgrading to new versions? If so, how do I delete these un-used packages? Also, when I remove installed packages I use `pacman -R ...`


title: Trying to send HTML mail on mac OSX Mountain Lion

text: I'm trying to send email with an html file as the body (it's actually a cucumber results report if that matters) or an attachment (if sending it as the body does not work) via the command line I've tried the following based on the mutt example in this answer to another question, but it is resulting in an error.               cat <<'EOF' Audit_Results.html | mutt -H -     To: cvanderlinden@xxxxxx.com     Subject: "test sending html mail"     Content-Type: text/html          EOF      when I do this I get the following error               No recipients were specified.      Mutt was installed using `brew install mutt` and it looks like that installed version 1.5.21. I am able to send mail via the 'interactive' interface but just tested that with simple text mail, nothing html or with an attachment. My objective is to send the cucumber results file "Audit_Results.html" file out as an email. Although the file includes some screenshots that are created using webdriver's `.screenshot_as(:base64)` method, and embedded using cucumber's `embed("data:image/png;base64,#{encoded_img}",'image/png')` function which seems to pose a bit of a problem. So far the one time I've managed to create a html mail from the report (using sendmail) it did not display properly in gmail. (although if sent as an attachment, it will format properly when downloaded and opened with a browser) Seems like gmail at least does not like html email with images embedded in that format. So it may be that I will end up needing to send the html report as an attachment.


title: How do I tell I'm running in a chroot?

text: I have a unix installation that's supposed to be usable both as a chroot and as a standalone system. If it's running as a chroot, I don't want to run any service (cron, inetd, and so on), because they would conflict with the host system or be redundant. How do I write a shell script that behaves differently depending on whether it's running in a chroot? My immediate need is a modern Linux system, with `/proc` mounted in the chroot, and the script is running as root, but more portable answers are welcome as well. More generally, suggestions that work for other containment methods would be interesting. The practical question is, is this system supposed to be running any services? (The answer being no in a chroot, and yes in a full-fledged virtual machines; I don't know about intermediate cases such as jails or containers.)


title: Systemd: Timeout a service

text: Is there a way to have systemd stop a service after it has been running for X amount of seconds? I looked at just wrapping `ExecStart` with `timeout`, however I believe it might not work if my service is the `forking` type.


title: Is it possible to start administering a linux box via Ansible with just the root account and its password?

text: I recently rented a Linux box and I intend to provision it using Ansible. I'd like to use Ansible as early as possible in the process. At this stage I only have a root account and the corresponding password. ### Questions   * Given the fact that my target box as well as OpenSSH-Server is running, would it be possible to copy my public key to the server and configure it with Ansible at this early stage?   * Do I have to manually copy the pub key to the server and configure ssh for Ansible to be able to communicate with the server in the first place?  EDIT 1: I should've mentioned, that after reading the docs I used the following syntax:               ansible <nameoftargetbox> -m ping -u root -k      The command basically means use user root ( -u ) and ask for password ( -k ). I am correctly prompted for the password, but I keep getting this response:                <nameoftargetbox>| FAILED => to use -c ssh with passwords, you must install the sshpass program      Needless to say that a common `ssh root@<targetbox>` works flawlessly. After researching some more I found a solution in the Ansible github issue tracker. I'll post it as an answer to this question.


title: How can I give a permssion to all users for a path using the octal notation?

text: I'd like to give execute permissions on a path recursively so I can read a file in the directory. The `chmod` binary that I'm using on Android only supports the octal/numeric notation though. Normally I'd do `chmod -R a+x /this/file/is/here/filename.txt` but don't know how I'd do this numerically. I've Googled but haven't found an answer to this. * * * Looking at at the question "Is it possible to represent the +X symbolic permission with an octal value?", I don't think this is possible but what would the easiest recommended way.


title: How to check if NTPD updates Linux machine's time successfully using shell?

text: I'm trying to use NTPD to update my Linux machine's time to a specified NTP server.   Here is the scenario: Each time the Linux machine starts up, I want to update the time from NTP server and **if it's not successful, I want to try again every 5 minutes until successfully** (max is 2 hours). I searched around and find that I should(?) use NTPD and use some command like: `#ntpdate ntp.server.com` (before starting NTPD)   `#ntpd some_options_to_start` The questions are:   1. How can I know if the time was successfully updated by these commands?   2. Can I set the interval to update time from ntpd? (or I have to use something like `sleep` and loop with `do`..`while`/`for` in shell?) Note that I want to execute the above commands in a shell script and will put the shell in a web server. Then clients (with a web browser browser) will execute the script on the website. So I need to check if the update is successful or not to send result to the client (over the web).


title: Removing the last n characters from every line in an emacs buffer

text: Using Emacs built-in facilities, is there a good way to remove the last n characters (for n >= 1) from every line in an Emacs buffer? I suppose it is possible to define a keyboard macro to do this, but that is not what I have in mind here. There is an elegant solution on Stack Overflow to the corresponding question of how to append characters to every line in emacs, namely Appending characters to the end of each line in Emacs, but I could not find an answer to this question. NOTES:   1. Since XEmacs is mostly dead (RIP), the question can be assumed to be   exclusively about GNU Emacs.   2. There are easy solutions for this using Unix stream editors and the like.   Operating on an Emacs buffer is more flexible, though.   3. I could of course do this by hand, but I've made a sort-of New Year   resolution to make better use of Emacs capabilties. After all, I've been   using it a mere 20 years, and know almost nothing about it.


title: killall gives me `no process found ` but ps

text: Could somebody explain to me the difference between `kill` and `killall`? Why doesn't `killall` see what `ps` shows?               # ps aux |grep db2     root      1123  0.0  0.8 841300 33956 pts/1    Sl   11:48   0:00 db2wdog                                              db2inst1  1125  0.0  3.5 2879496 143616 pts/1  Sl   11:48   0:02 db2sysc                                             root      1126  0.0  0.6 579156 27840 pts/1    S    11:48   0:00 db2ckpwd                                             root      1127  0.0  0.6 579156 27828 pts/1    S    11:48   0:00 db2ckpwd                                             root      1128  0.0  0.6 579156 27828 pts/1    S    11:48   0:00 db2ckpwd           # killall db2ckpwd     db2ckpwd: no process found          # kill -9 1126     # kill -9 1127     # kill -9 1128      System is SuSe 11.3 (64 bit); kernel 2.6.34-12; procps version 3.2.8; killall from PSmisc 22.7; kill from GNU coreutils 7.1


title: Documentation of kernel parameters

text: Where can I find a technical description of the kernel parameters listed in `/proc/sys` (ob Linux)?


title: Why do some of my lvm partitions have "-real" appended to their names?

text: In the /dev/mapper directory I can see my lvm partitions, but then I'll see some other ones with the same names, but with "-real" appended to them. What's that about?


title: GUI input for shell script

text: I have a shell script which installs a program in RedHat. I need to add a GUI for entering some parameters so that it looks like an installation wizard . I tried Xdialog, Zenity, and Yad, but they each only support a single data input per window; I need to display all the steps in a single window. What can I use to do that?


title: finding the absolute directory

text: Here is the scenario:               foo/     > data/     > stuff/     > scripts/ -> /.../generic/scripts      When calling `foo/scripts/bar.sh` from any location (other folder or inside the folder), I would like to be able for the script to use `foo/data` and `foo/stuff` However, if I simply use `foo_dir='dirname $0'/..` then it'll go down the directory pointed by the symbolic link! (And obtain `generic` instead of `foo`!) If I use some pattern to eat up the end of `$0`, then it's not working either since you could also call the script from inside the directory. So, in the end... The only thing I have found is this extremely ugly stuff:               dir=`dirname $0`     cd $dir     dir=`pwd | sed -r 's_/[^/]+$__'`     cd -      ...but I'm sure there is a better way, isn't there? _**What I used:_**               dir=$( dirname $( cd `dirname $0`; pwd ) )      Dunno if it is perfect but it seems to behave as expected.


title: How to avoid apache reload when rotating logs?

text: I use logrotate to rotate Apache access-, error- and rewrite-logs. My config file looks like this:               /apache/*log {         compress         dateext         rotate 365         size=+300M         olddir /log/old/apache         notifempty         missingok         lastaction          /bin/apache reload         endscript     }      My problem is that whenever a rotation occurs Apache has to be reloaded because Apache doesn't write anymore in the just rotated logfile. Is there a way to avoid Apache reloads everytime logrotate does a rotation?


title: grep for n or more periods on a given line

text: I want to be able to arbitrarily match lines that contain a lot of periods, like this:               $ echo "there's. someone on the wing. some. thing." | grep -stuFF [[:idunno:]]{4,}     there's. someone on the wing. some. thing.      I tried, blindly gropingly:               grep -P [[.]]{\4,\} textfile     grep -P \.{\4,\} textfile      and then tried something I knew would work at some level               grep -P [[:punct:]]{\4,\} textfile      but `[[:punct:]]{\4,\\}` disappointingly just picked up a lot of the lines I wanted grep to miss so that I could turn the command around and do a `grep -v`. Even doing `grep -P '\\.{4,}'` does not return the lines I am trying to grep for, which look like:                   Sullivan, G.R. Tetrahedron Lett. 1971, 223; Pascal, Jr., R.A.; Winans, C.G.; Van Engen, D. J. Am. Chem.     compounds (i.e., shielding and deshielding of nuclei) can be measured by a simple     Plavic, D.; Babic, D.; Nikolic, S.; Trinajstic, N. Gazz. Chim. Ital., 1993, 123, 243.     Hess, Jr., B.A.; Schaad, L.J. J. Am. Chem. Soc. 1971, 93, 305.     as N-oxides or pyridinium ions are still aromatic. However, for nitrogen heterocycles there are more signiﬁcan$     given in Coulson, C.A.; Streitwieser, Jr., A. A Dictonary of p Electron Calculations, W.H. Freeman, San     Hydrocarbons, Elsevier, NY, 1987; Clar, E. Polycyclic Hydrocarbons, 2 vols., Academic Press, NY, 1964.     Zhang, J.; Ho, D.M.; Pascal Jr., R.A. J. Am. Chem. Soc. 2001, 123, 10919.     See Herndon, W.C.; Ellzey Jr., M.L. J. Am. Chem. Soc. 1974, 96, 6631.     Dauben Jr., H.J.; Riﬁ, M.R. J. Am. Chem. Soc. 1963, 85, 3041; also see Breslow, R.; Chang, H.W. J. Am     1973, 1, 29; Kolomnikova, G.D.; Parnes, Z.N. Russ. Chem. Rev. 1967, 36, 735; Harmon, K.H., in Olah,     Bertelli, D.J.; Andrews, Jr., T.G. J. Am. Chem. Soc. 1969, 91, 5280; Bertelli, D.J.; Andrews Jr., T.G.;     Nikitina, T.V. Organomet. React., 1972, 4, 163; Bublitz, D.E.; Rinehart Jr., K.L. Org. React., 1969, 17, 1;      Note that the first of those lines contains 10 periods.


title: stunnel - how to setup stunnel to handle ssl and attach http with it?

text: I am running Google App Engine which is a http web server with some redirecting and other real-time stuff. But it does not have SSL to include so its unable to make HTTPS. Therefore, i was trying `stunnel` to make SSL and connect the HTTP on it, but its not working when using Google App Engine and Stunnel.               $ cat /etc/stunnel/stunnel.conf     pid = /stunnel.pid     cert=/var/tmp/server.pem     socket = l:TCP_NODELAY=1     socket = r:TCP_NODELAY=1     client=yes     ; Some debugging stuff useful for troubleshooting     debug = 7     output = /var/log/stunnel.log     [SSL]     accept=0.0.0.0:443     connect=80      **See the logs:**               2014.02.06 09:13:34 LOG5[8293:140556325660608]: Threading:PTHREAD SSL:ENGINE Sockets:POLL,IPv6 Auth:LIBWRAP     2014.02.06 09:13:34 LOG6[8293:140556325660608]: file ulimit = 1024 (can be changed with 'ulimit -n')     2014.02.06 09:13:34 LOG6[8293:140556325660608]: poll() used - no FD_SETSIZE limit for file descriptors     2014.02.06 09:13:34 LOG5[8293:140556325660608]: 500 clients allowed     2014.02.06 09:13:34 LOG7[8293:140556325660608]: FD 9 in non-blocking mode     2014.02.06 09:13:34 LOG7[8293:140556325660608]: FD 10 in non-blocking mode     2014.02.06 09:13:34 LOG7[8293:140556325660608]: FD 11 in non-blocking mode     2014.02.06 09:13:34 LOG7[8293:140556325660608]: SO_REUSEADDR option set on accept socket     2014.02.06 09:13:34 LOG7[8293:140556325660608]: SSL bound to 0.0.0.0:443     2014.02.06 09:13:34 LOG7[8299:140556325660608]: Created pid file /stunnel.pid          2014.02.06 09:14:06 LOG7[8299:140556325660608]: SSL accepted FD=12 from 82.x.x.LocalPC:49651     2014.02.06 09:14:06 LOG7[8299:140556325660608]: SSL accepted FD=13 from 82.x.x.LocalPC:49652     2014.02.06 09:14:06 LOG7[8299:140556325656320]: SSL started     2014.02.06 09:14:06 LOG7[8299:140556325656320]: FD 12 in non-blocking mode     2014.02.06 09:14:06 LOG7[8299:140556325586688]: SSL started     2014.02.06 09:14:06 LOG7[8299:140556325656320]: TCP_NODELAY option set on local socket     2014.02.06 09:14:06 LOG7[8299:140556325586688]: FD 13 in non-blocking mode     2014.02.06 09:14:06 LOG7[8299:140556325656320]: Waiting for a libwrap process     2014.02.06 09:14:06 LOG7[8299:140556325586688]: TCP_NODELAY option set on local socket     2014.02.06 09:14:06 LOG7[8299:140556325586688]: Waiting for a libwrap process     2014.02.06 09:14:06 LOG7[8299:140556325656320]: Acquired libwrap process #0     2014.02.06 09:14:06 LOG7[8299:140556325586688]: Acquired libwrap process #1     2014.02.06 09:14:06 LOG7[8299:140556325656320]: Releasing libwrap process #0     2014.02.06 09:14:06 LOG7[8299:140556325586688]: Releasing libwrap process #1     2014.02.06 09:14:06 LOG7[8299:140556325656320]: Released libwrap process #0     2014.02.06 09:14:06 LOG7[8299:140556325586688]: Released libwrap process #1     2014.02.06 09:14:06 LOG7[8299:140556325656320]: SSL permitted by libwrap from 82.x.x.LocalPC:49651     2014.02.06 09:14:06 LOG7[8299:140556325586688]: SSL permitted by libwrap from 82.x.x.LocalPC:49652     2014.02.06 09:14:06 LOG5[8299:140556325656320]: SSL accepted connection from 82.x.x.LocalPC:49651     2014.02.06 09:14:06 LOG5[8299:140556325586688]: SSL accepted connection from 82.x.x.LocalPC:49652     2014.02.06 09:14:06 LOG7[8299:140556325656320]: FD 15 in non-blocking mode     2014.02.06 09:14:06 LOG7[8299:140556325586688]: FD 16 in non-blocking mode     2014.02.06 09:14:06 LOG6[8299:140556325656320]: connect_blocking: connecting 82.x.x.x:80     2014.02.06 09:14:06 LOG6[8299:140556325586688]: connect_blocking: connecting 82.x.x.x:80     2014.02.06 09:14:06 LOG7[8299:140556325656320]: connect_blocking: s_poll_wait 82.x.x.x:80: waiting 10 seconds     2014.02.06 09:14:06 LOG5[8299:140556325656320]: connect_blocking: connected 82.x.x.x:80     2014.02.06 09:14:06 LOG7[8299:140556325586688]: connect_blocking: s_poll_wait 82.x.x.x:80: waiting 10 seconds     2014.02.06 09:14:06 LOG5[8299:140556325656320]: SSL connected remote server from 82.x.x.x:36426     2014.02.06 09:14:06 LOG5[8299:140556325586688]: connect_blocking: connected 82.x.x.x:80     2014.02.06 09:14:06 LOG7[8299:140556325656320]: Remote FD=15 initialized     2014.02.06 09:14:06 LOG5[8299:140556325586688]: SSL connected remote server from 82.x.x.x:36427     2014.02.06 09:14:06 LOG7[8299:140556325656320]: TCP_NODELAY option set on remote socket     2014.02.06 09:14:06 LOG7[8299:140556325586688]: Remote FD=16 initialized     2014.02.06 09:14:06 LOG7[8299:140556325656320]: SSL state (connect): before/connect initialization     2014.02.06 09:14:06 LOG7[8299:140556325586688]: TCP_NODELAY option set on remote socket     2014.02.06 09:14:06 LOG7[8299:140556325656320]: SSL state (connect): SSLv3 write client hello A     2014.02.06 09:14:06 LOG7[8299:140556325656320]: SSL alert (write): fatal: handshake failure     2014.02.06 09:14:06 LOG3[8299:140556325656320]: SSL_connect: 1408F10B: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number     2014.02.06 09:14:06 LOG7[8299:140556325586688]: SSL state (connect): before/connect initialization     2014.02.06 09:14:06 LOG5[8299:140556325656320]: Connection reset: 0 bytes sent to SSL, 0 bytes sent to socket     2014.02.06 09:14:06 LOG7[8299:140556325586688]: SSL state (connect): SSLv3 write client hello A     2014.02.06 09:14:06 LOG7[8299:140556325656320]: SSL finished (1 left)     2014.02.06 09:14:06 LOG7[8299:140556325586688]: SSL alert (write): fatal: handshake failure     2014.02.06 09:14:06 LOG3[8299:140556325586688]: SSL_connect: 1408F10B: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number     2014.02.06 09:14:06 LOG5[8299:140556325586688]: Connection reset: 0 bytes sent to SSL, 0 bytes sent to socket     2014.02.06 09:14:06 LOG7[8299:140556325586688]: SSL finished (0 left)     2014.02.06 09:14:06 LOG7[8299:140556325660608]: SSL accepted FD=12 from 82.x.x.LocalPC:49653     2014.02.06 09:14:06 LOG7[8299:140556325586688]: SSL started     2014.02.06 09:14:06 LOG7[8299:140556325586688]: FD 12 in non-blocking mode     2014.02.06 09:14:06 LOG7[8299:140556325586688]: TCP_NODELAY option set on local socket     2014.02.06 09:14:06 LOG7[8299:140556325586688]: Waiting for a libwrap process     2014.02.06 09:14:06 LOG7[8299:140556325586688]: Acquired libwrap process #1     2014.02.06 09:14:06 LOG7[8299:140556325586688]: Releasing libwrap process #1     2014.02.06 09:14:06 LOG7[8299:140556325586688]: Released libwrap process #1     2014.02.06 09:14:06 LOG7[8299:140556325586688]: SSL permitted by libwrap from 82.x.x.LocalPC:49653     2014.02.06 09:14:06 LOG5[8299:140556325586688]: SSL accepted connection from 82.x.x.LocalPC:49653     2014.02.06 09:14:06 LOG7[8299:140556325586688]: FD 13 in non-blocking mode     2014.02.06 09:14:06 LOG6[8299:140556325586688]: connect_blocking: connecting 82.x.x.x:80     2014.02.06 09:14:06 LOG7[8299:140556325586688]: connect_blocking: s_poll_wait 82.x.x.x:80: waiting 10 seconds     2014.02.06 09:14:06 LOG5[8299:140556325586688]: connect_blocking: connected 82.x.x.x:80     2014.02.06 09:14:06 LOG5[8299:140556325586688]: SSL connected remote server from 82.x.x.x:36428     2014.02.06 09:14:06 LOG7[8299:140556325586688]: Remote FD=13 initialized     2014.02.06 09:14:06 LOG7[8299:140556325586688]: TCP_NODELAY option set on remote socket     2014.02.06 09:14:06 LOG7[8299:140556325586688]: SSL state (connect): before/connect initialization     2014.02.06 09:14:06 LOG7[8299:140556325586688]: SSL state (connect): SSLv3 write client hello A     2014.02.06 09:14:06 LOG7[8299:140556325586688]: SSL alert (write): fatal: handshake failure     2014.02.06 09:14:06 LOG3[8299:140556325586688]: SSL_connect: 1408F10B: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number     2014.02.06 09:14:06 LOG5[8299:140556325586688]: Connection reset: 0 bytes sent to SSL, 0 bytes sent to socket     2014.02.06 09:14:06 LOG7[8299:140556325586688]: SSL finished (0 left)     2014.02.06 09:14:06 LOG7[8299:140556325660608]: SSL accepted FD=12 from 82.x.x.LocalPC:49654     2014.02.06 09:14:06 LOG7[8299:140556325586688]: SSL started     2014.02.06 09:14:06 LOG7[8299:140556325586688]: FD 12 in non-blocking mode     2014.02.06 09:14:06 LOG7[8299:140556325586688]: TCP_NODELAY option set on local socket     2014.02.06 09:14:06 LOG7[8299:140556325586688]: Waiting for a libwrap process     2014.02.06 09:14:06 LOG7[8299:140556325586688]: Acquired libwrap process #1     2014.02.06 09:14:06 LOG7[8299:140556325586688]: Releasing libwrap process #1     2014.02.06 09:14:06 LOG7[8299:140556325586688]: Released libwrap process #1     2014.02.06 09:14:06 LOG7[8299:140556325586688]: SSL permitted by libwrap from 82.x.x.LocalPC:49654     2014.02.06 09:14:06 LOG5[8299:140556325586688]: SSL accepted connection from 82.x.x.LocalPC:49654     2014.02.06 09:14:06 LOG7[8299:140556325586688]: FD 13 in non-blocking mode     2014.02.06 09:14:06 LOG6[8299:140556325586688]: connect_blocking: connecting 82.x.x.x:80     2014.02.06 09:14:06 LOG7[8299:140556325586688]: connect_blocking: s_poll_wait 82.x.x.x:80: waiting 10 seconds     2014.02.06 09:14:06 LOG5[8299:140556325586688]: connect_blocking: connected 82.x.x.x:80     2014.02.06 09:14:06 LOG5[8299:140556325586688]: SSL connected remote server from 82.x.x.x:36429     2014.02.06 09:14:06 LOG7[8299:140556325586688]: Remote FD=13 initialized     2014.02.06 09:14:06 LOG7[8299:140556325586688]: TCP_NODELAY option set on remote socket     2014.02.06 09:14:06 LOG7[8299:140556325586688]: SSL state (connect): before/connect initialization     2014.02.06 09:14:06 LOG7[8299:140556325586688]: SSL state (connect): SSLv3 write client hello A     2014.02.06 09:14:06 LOG7[8299:140556325586688]: SSL alert (write): fatal: handshake failure     2014.02.06 09:14:06 LOG3[8299:140556325586688]: SSL_connect: 1408F10B: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number     2014.02.06 09:14:06 LOG5[8299:140556325586688]: Connection reset: 0 bytes sent to SSL, 0 bytes sent to socket     2014.02.06 09:14:06 LOG7[8299:140556325586688]: SSL finished (0 left)      EDIT: here to verify locally the ssL               $ openssl s_client -ssl3 -connect localhost:443     CONNECTED(00000003)     write:errno=104     ---     no peer certificate available     ---     No client certificate CA names sent     ---     SSL handshake has read 0 bytes and written 0 bytes     ---     New, (NONE), Cipher is (NONE)     Secure Renegotiation IS NOT supported     Compression: NONE     Expansion: NONE     SSL-Session:         Protocol  : SSLv3         Cipher    : 0000         Session-ID:          Session-ID-ctx:          Master-Key:          Key-Arg   : None         Krb5 Principal: None         PSK identity: None         PSK identity hint: None         Start Time: 1391675538         Timeout   : 7200 (sec)         Verify return code: 0 (ok)     ---      EDIT: Goal: visitor visits a valid address for example: https://www.yumyumyum.com (assume its valid and has CA, KEY, CERT files) and he is not forwarded to http://www.yumyumyum.com it should remain as https 1) when used Google App Engine it does not have HTTPS option as a result everything has to run as HTTP, now the service is running as HTTP, but when users use it as http, it causes other security problems 2) therefore, we needed a SSL Proxy to that HTTP so that the user always get https even behind the screen they are attached with http is this clear description?


title: Fencing VM nodes

text: I'm using VMware Workstation as my hypervisor. I want to create a cluster with two nodes and a sharing storage with FreeNAS. My questions are around fencing.   * Is it possible to do it in this case?   * If yes please how to it?


title: Edit really big files with vi

text: How can I edit a really big file with vi? e.g.: a 20 GByte log file. Are there any modifications for it to handle this size?


title: What are the virtues of multitasking with traditional job control vs Tmux/Screen?

text: tmux and screen let you run different processes (e.g. vim, a bash script, mysql, psql, etc) in different virtual windows. But traditional Unix job control (using CTRL-z, fg, bg, and jobs) seem to give you some of the same functionality. Are there any advantages of multitasking using traditional job control over the newer ways via tmux and screen?


title: Find server with small ping latency (my script, but can anyone write it in e.g.: Perl?)

text: I want to download OpenBSD with FTP with a script, and I want to download it from a server that is near me. So I want to choose a mirror that has low "ping latency". I wrote a little script, that works just fine (only tested under bash/Linux):               LATESTRELVER=`curl -s 'www.openbsd.org' | fgrep 'The current release is ' | sed 's/OpenBSD /\n/' | sed 's/<\/a>/\n/' | grep "^[0-9]" | head -1`     FASTESTSRV=`curl -s "http://www.openbsd.org/ftp.html#ftp" | fgrep '<a href="ftp://' | sed 's/"ftp:\/\//\n/' | cut -d "/" -f1 | fgrep -v '/dev/null | fgrep ' time=' | sed 's/ time=/\n/' | grep ' ms' | sed 's/ ms$/ /' | sed 's/\./ |/' | cut -d "|" -f1 | tr -d '\n'; if [ $? -eq 0 ]; then echo "$MIRRORSRVS"; fi; done | grep "^[0-9]" | sort -un | head -1 | awk '{print $2}'`     LATESTRELVERSHORT=`echo $LATESTRELVER | sed 's/\.//g'`          # NEEDEDARCH=i386     NEEDEDARCH=amd64          wget "$FASTESTSRV/pub/OpenBSD/$LATESTRELVER/$NEEDEDARCH/install$LATESTRELVERSHORT.iso" -O "install$LATESTRELVERSHORT-$NEEDEDARCH.iso"      Q: can someone write this script in Perl? :P (with a smaller, nicer code?) The main purpose of this script to e.g.: not use foreign country's bandwidth.


title: Problems with vuze plugins

text: I needed a torrent client that supports feeds and mailing me when stuff is finished. Vuze supports feeds and a plugin was supposed to do the trick about mailing me. But I have encountered great difficulties installing the plugin. I've selected it and then the application hangs when it tries to install it through the installation guide. I think I could just copy the files over to the vuze plugins folder and restart vuze. Would that work? And where does the vuze install the plugins folder when I installed it with `yum`?


title: Bash, curious about echo $variable

text: I was hacking at a small script earlier and noticed something I can't explain. Running this command               (time wget --spider http://www.google.co.uk/) 2>&1  | egrep 'real|response'      gives me this output (which I expect)               HTTP request sent, awaiting response... 200 OK     real    0m0.086s      I capture the output above in a variable               Result=$((time wget --spider http://www.google.co.uk/) 2>&1  | egrep 'real|response')      If I               echo "$Result"         I get the expected output               HTTP request sent, awaiting response... 200 OK     real    0m0.086s      However if I               echo $Result      I get               HTTP request sent, awaiting response... 200 OK real    0m0.086s      Why is that ?


title: /etc/rc*: Why does this command stop NFS services from starting at boot?

text: I recently found this home networking tutorial surprisingly enlightening. However, there is one thing I don't understand: > Disabling NFS Start On Boot: If you are not planning on regularly accessing > files via NFS, you should not leave the NFS server running and vulnerable to > outside attacks. The startup scripts for NFS are in the /etc/rc* directories > and you should rename them with the K prefix instead of the S prefix so they > do not start at boot time: the tutorial then gives the following command:               sudo rename s/S/K/ /etc/rc*/*nfs*      I have never really understood the way /etc/rc*/ works. But I assume there are certain directories in which the `service servicename start` scripts are always run, right? That's just a guess. So, in this case, why does renaming these have an effect? How does the naming of directories affect this particular instance? What does that rename command actually do? Why does the new directory name ensure that NFS is not started at boot time?


title: Packaging Google Chrome and Flash into a Linux Distro?

text: I've been working on a Linux distro based on Arch, and I want to include Google Chrome and Adobe's Flash Plugin. Can I get in trouble with Google or Adobe if I pre-install both of those pieces of software into a Linux distro which I plan to release within the upcoming month?


title: Wipe last 1MB of a Hard drive

text: Is there an easy command that I can use to zero out the last 1MB of a hard drive? For the start of the drive I would `dd if=/dev/zero of=/dev/sdx bs=1M count=1`. The `seek` option for dd looks promising, but does someone have an easy way to determine exactly how far I should seek? I have a hardware RAID appliance, that stores some of the RAID configuration at the end of the drive. I need the RAID appliance to see the drives as un- configured, so I want to remove the RAID configuration without having to spend the time to do a full wipe of the drives. I have a dozen 2TB drives, and a full erase of all of those drives would take a long time.


title: Storing Abbreviations in Vim

text: I frequently use `:ab` to save typing time during coding. For e.g. `:ab mat matrix` to replace mat by matrix every time I type mat. **Is there any way of storing and loading the abbreviations I create for a given file?** I want something to store my abbreviations as and when I declare them and also reload them when I open a file. I would prefer the abbreviations to be "local" to a file rather than global but I can work around this if necessary.


title: How to multiply two columns in awk?

text: I want to multiply column 1 with column 2 (till end of file) in input file and should output 1 column and multiplied 3 column in separate file. input.txt               1 677679866     2 121867616     3 49413198     4 40415982      output.txt               1 677679866     2 243735232     3 148239594     4 161663928


title: Where, in automysqlbackup, do I add mysqldump parameters?

text: How to stop automysqlbackup's cron.daily script -- as installed and configured from `apt-get install automysqlbackup` -- throwing the following error:                mysqldump: Got error: 1142: SELECT,LOCK TABL command denied to user      'debian-sys-maint'@'localhost' for table 'cond_instances' when using LOCK TABLES      This occurs after having upgraded to MySQL 5.5 as a side-effect of having upgraded to Ubuntu 12.04 LTS. The correct solution (thanks @sr_ for pointer to the appropriate bug report) is to exclude the 'performance_schema' database from mysqldump. So the question is: How to do this whilst respecting the Debian packages and configurations? The problem occurs daily after having upgraded to MySQL 5.5. **Background:** My aim is to stay with the Ubuntu Debian-installed packages and configurations in as standard a manner as possible. But actually, this is a bug with the way the packages are installed / upgraded, so it is necessary to update one of the supplied configuration files. `debian-sys-maint` has fullest privileges anyway, so already has sufficient to lock each table before dumping it. What's confusing is that `/usr/share/doc/automysqlbackup/README.Debian` says that > All parameters can be setup by editing the /etc/default/automysqlbackup file `/etc/default/automysqlbackup` invokes mysqlbackup with settings in `/etc/mysql/debian.cnf` which says: > Automatically generated for Debian scripts. DO NOT TOUCH!.


title: How to understand Hot plugin mechanism for a USB in an Android stack?

text: I want to know where I could get some material to study USB hot plug-in mechanism in Android Stack. I tried googling many a times, but din't find anything useful.


title: How to debug an inserted kernel module?

text: I would like to debug a loaded kernel module I don't have the source code to; I suspect it's a virus. Is there a way to feed it into GDB for analysis?


title: Why doesn't dzen2 work when invoked via at?

text: dzen2 is a notification utility of sorts. This command will make a notification that says "Hi" appear on the screen:               echo Hi | dzen2 -p      Debian's at is a utility that schedules events to occur in the future. This command will make the file "foo" appear in your user directory after 1 minute:               echo "touch ~/foo" | at now + 1 minute      So why is it that this command doesn't cause a `dzen2` notification to appear after 1 minute?               echo "echo Hi | dzen2 -p" | at now + 1 minute      I have been investigating for hours and cannot seem to find a reason why this doesn't work! I have a hunch that it has to do with the shell that is invoked by at, but I just don't understand why it fails. As a counterpoint example, this command works just fine:               echo "notify-send Hi" | at now + 1 minute


title: Who wrote the "Linux kernel" (Linus Torvalds and his team)?

text: Who are the authors of the pure Linux kernel from scratch, which was integrated with GNU tools and formed the full GNU/Linux Operating system in the 1990s? I have read some wiki articles but I haven't got any clear cut idea on the history.


title: startx error doesn't load from terminal

text: I have installed GNOME v2 in my freebsd but when I try to do `startx` it gives the following error. Please Help. ![ScreenShot](http://i.stack.imgur.com/qUv9g.jpg)


title: System.map file update

text: I found that System.map file contains addresses of symbols. Does it involve system calls? I read that it is only updated when a new kernel is newly compiled. So does that means that except for a new kernel compilation, these are always stored in the same address?


title: Running 64-bit Linux with 750 MB of RAM: worth it?

text: I have a Debian server VPS, and the provider installed 64-bit Debian 5. Should I ask for an 32-bit install, given that I have only 750 MB RAM and I have heard that variables take more RAM on 64-bit systems?


title: Why rsync attempts to copy file that is already up-to-date?

text: I have two same files, on local machine and on remote one. Their sizes are equal, and file on local machine is newer than on remote one - but rsync still attempts to copy the file. I invoke rsync as follows:               rsync -nv -e "ssh -p 2222" user@host:/data/file.fif data/file.fif      (if I don't use `-n` option, it initiates the copy operation) Rsync docs explicitly state that it shouldn't be happening:               Rsync  finds files that need to be transferred using a "quick check" algorithm (by default) that looks for files that have changed in size or in last-modified time.      Outputs from `stat`:               # remote file       File: `data/fif/Skovorodko_Olga_45_raw.fif'       Size: 1137551966  Blocks: 2221784    IO Block: 4096   regular file     Device: fd00h/64768d    Inode: 286338      Links: 1     Access: (0664/-rw-rw-r--)  Uid: ( 1037/  platon)   Gid: ( 1047/  platon)     Access: 2013-08-08 18:40:16.907581658 +0400     Modify: 2013-07-16 12:01:09.158763284 +0400     Change: 2013-07-16 12:01:09.158763284 +0400          # local file       File: `data/fif/Skovorodko_Olga_45_raw.fif'       Size: 1137551966  Blocks: 2221792    IO Block: 4096   regular file     Device: 801h/2049d  Inode: 12987232    Links: 1     Access: (0644/-rw-r--r--)  Uid: ( 1005/  platon)   Gid: ( 1003/  platon)     Access: 2013-08-08 19:02:57.146223369 +0400     Modify: 2013-08-08 19:02:57.146223369 +0400     Change: 2013-08-08 19:02:57.146223369 +0400      Why does this happen? **UPDATE:** Doing `rsync --size-only` results file not being copied:               delta-transmission enabled     Skovorodko_Olga_45_raw.fif is uptodate     total: matches=0  hash_hits=0  false_alarms=0 data=0          sent 14 bytes  received 114 bytes  85.33 bytes/sec     total size is 1137551966  speedup is 8887124.73 (DRY RUN)


title: Why is sort -o useful?

text: UNIX philosophy says: do one thing and do it well. Make programs that handle text, because that is a universal interface. The `sort` command, at least GNU sort, has an `-o` option to output to a file instead of `stdout`. Why is, say, `sort foobar -o whatever` useful when I could just `sort foobar > whatever`?


title: Access time is not being updated when i run ` ls a ` and then ` stat a`

text: On CentOS Linux desktop let's create a folder named `a`.               mkdir a      Then let's access it               ls a      and then let's get it's statistics               stat a            File: `a'       Size: 4096        Blocks: 8          IO Block: 4096   directory     Device: fd00h/64768d    Inode: 1183593     Links: 2     Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)     Access: 2013-08-30 21:35:55.089404752 -0400     Modify: 2013-08-30 21:35:54.077415503 -0400     Change: 2013-08-30 21:35:54.077415503 -0400      Okay let's access it again               ls a      and get it's access time again               stat a            File: `a'       Size: 4096        Blocks: 8          IO Block: 4096   directory     Device: fd00h/64768d    Inode: 1183593     Links: 2     Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)     Access: 2013-08-30 21:35:55.089404752 -0400     Modify: 2013-08-30 21:35:54.077415503 -0400     Change: 2013-08-30 21:35:54.077415503 -0400      As you can see there is no difference between the "ACCESS" times. Here are two access times right next to each other.               Access: 2013-08-30 21:35:55.089404752 -0400     Access: 2013-08-30 21:35:55.089404752 -0400      They look absolutely identical! What can i do about this? I'm simply using CentOS Linux desktop, which uses GNOME by default.


title: Finding out whether rsync modified target?

text: My program copies/synchronizes several directories from source to target, each using rsync. For each directory, if the version in target is not identical to source, and thus rsync modifies the target, I would like to notify the user with a message like "directory X has been synchronized to target". On the other hand, if target version is already identical to target, I can skip showing this message since there is no change in target. Exit status and -n option do not differentiate between the two condition. Aside from parsing the output of -v, is there any other way for me to get rsync to provide this information?


title: The command ` ls -ltu ` fails to list folders/files based on last accessed time

text: First on your linux desktop create 2 folders.               a     b      Now run this in the terminal               ls -ltu      the result is               drwxr-xr-x 2 root root 4096 Aug 30 20:33 b     drwxr-xr-x 2 root root 4096 Aug 30 20:33 a      Let's click on a and re-run it.   Same exact result as above. Let's click on b and re-run it.   Same exact result as above. I'm trying to arrange folders based on which one was last clicked on. They recommended `ls -ltu` but it's not working.


title: Add udev rule alias for input device

text: I am trying to add a udev alias rule for my xboxdrv (x-box controller) and I can't seem to figure it out.               dmesg | grep "input"      I see:               [    6.239955] input: Microsoft X-Box 360 pad as /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3:1.0/input/input2     [   27.057308] input: Xbox Gamepad (userspace driver) - Keyboard Emulation as /devices/virtual/input/input3     [   27.058307] input: Xbox Gamepad (userspace driver) as /devices/virtual/input/input4      It looks likes its input 3 and 4. So I check:               sudo udevadm info -a -p /devices/virtual/input/input3      which gives me:               looking at device '/devices/virtual/input/input3':         KERNEL=="input3"         SUBSYSTEM=="input"         DRIVER==""         ATTR{name}=="Xbox Gamepad (userspace driver) - Keyboard Emulation"         ATTR{phys}==""         ATTR{uniq}==""         ATTR{properties}=="0"      And input4                 looking at device '/devices/virtual/input/input4':         KERNEL=="input4"         SUBSYSTEM=="input"         DRIVER==""         ATTR{name}=="Xbox Gamepad (userspace driver)"         ATTR{phys}==""         ATTR{uniq}==""         ATTR{properties}=="0"      I think I have enough info to create my udev rule. I create a new file called `99-x-box.rules` in '/etc/udev/rules.d'. I added the following:               SUBSYSTEM=="input", ATTR{name}=="Xbox Gamepad (userspace driver) - Keyboard Emulation", ATTR{properties}=="0", SYMLINK+="xboxcontroller"      I reboot. I dont see the alias in `/dev/input'. I also tried:               SUBSYSTEM=="input", ATTR{name}=="Xbox Gamepad (userspace driver)", ATTR{properties}=="0", SYMLINK+="xboxcontroller"      thanks for the help.


title: How are directories managed in the filesystem?

text: On behalf of this particular question I would like to know how directories are managed in the file system. What does the author of the above question mean by telling > each directory has n+2 pointers to itself I would like to get more clarity and info on this.


title: Dynamic port forwarding using socat

text: I'm trying to replicate the functionality of `ssh -D <PORT> user@machineX` to tunnel all my traffic from my current machine via `machineX`. I do not need the ssh shell open at all, I simply wish to tunnel my HTTP/HTTPS traffic. Can this be achieved using `socat` ? So far I've only seen examples of forwarding one port to another. If not is there another alternative?


title: Switch user on terminal

text: I'm switching user using command:               sudo su - userName      On my terminal I always have:               user@user directory $ (some command)      But when I switch user I have only :               $ (some commands)      It is hard to explain what I mean but I'm new in linux and I have't found this in other questions. How to keep this whole data before $ sign after relogin? Edit: Ok It work for me I recreated user using command: adduser name But I have another question. This command create /home directory but It is empty. Is some command to initialize /home for new user?


title: Problems with YUM/Scientifix Linux 6.3 (inconsistent rpm database?..)

text: Recently I saw this:               [root@NOTEBOOK /etc/yum.repos.d] yum update     Loaded plugins: fastestmirror, presto, security     Loading mirror speeds from cached hostfile     epel/metalink                                                                                |  17 kB     00:00           * epel: mirror.pmf.kg.ac.rs      * rpmforge: ftp.lug.ro      * sl: ftp.scientificlinux.org      * sl-security: ftp.scientificlinux.org     Setting up Update Process     Resolving Dependencies     --> Running transaction check     ---> Package wine.x86_64 0:1.2.3-1.el6 will be updated     ---> Package wine.x86_64 0:1.4.1-1.el6 will be an update     --> Processing Dependency: wine-openal(x86-64) = 1.4.1-1.el6 for package: wine-1.4.1-1.el6.x86_64     --> Processing Dependency: wine-openal(x86-32) = 1.4.1-1.el6 for package: wine-1.4.1-1.el6.x86_64     ---> Package wine-capi.i686 0:1.2.3-1.el6 will be updated     ---> Package wine-capi.x86_64 0:1.2.3-1.el6 will be updated     ---> Package wine-capi.i686 0:1.4.1-1.el6 will be an update     ---> Package wine-capi.x86_64 0:1.4.1-1.el6 will be an update     ---> Package wine-cms.i686 0:1.2.3-1.el6 will be updated     ---> Package wine-cms.x86_64 0:1.2.3-1.el6 will be updated     ---> Package wine-cms.i686 0:1.4.1-1.el6 will be an update     ---> Package wine-cms.x86_64 0:1.4.1-1.el6 will be an update     ---> Package wine-common.noarch 0:1.2.3-1.el6 will be updated     ---> Package wine-common.noarch 0:1.4.1-1.el6 will be an update     ---> Package wine-core.i686 0:1.2.3-1.el6 will be updated     ---> Package wine-core.x86_64 0:1.2.3-1.el6 will be updated     ---> Package wine-core.i686 0:1.4.1-1.el6 will be an update     --> Processing Dependency: libgstreamer-0.10.so.0 for package: wine-core-1.4.1-1.el6.i686     --> Processing Dependency: libgstbase-0.10.so.0 for package: wine-core-1.4.1-1.el6.i686     --> Processing Dependency: libgstapp-0.10.so.0 for package: wine-core-1.4.1-1.el6.i686     ---> Package wine-core.x86_64 0:1.4.1-1.el6 will be an update     ---> Package wine-courier-fonts.noarch 0:1.2.3-1.el6 will be updated     ---> Package wine-courier-fonts.noarch 0:1.4.1-1.el6 will be an update     ---> Package wine-desktop.noarch 0:1.2.3-1.el6 will be updated     ---> Package wine-desktop.noarch 0:1.4.1-1.el6 will be an update     ---> Package wine-fonts.noarch 0:1.2.3-1.el6 will be updated     ---> Package wine-fonts.noarch 0:1.4.1-1.el6 will be an update     --> Processing Dependency: wine-tahoma-fonts = 1.4.1-1.el6 for package: wine-fonts-1.4.1-1.el6.noarch     --> Processing Dependency: wine-ms-sans-serif-fonts = 1.4.1-1.el6 for package: wine-fonts-1.4.1-1.el6.noarch     ---> Package wine-ldap.i686 0:1.2.3-1.el6 will be updated     ---> Package wine-ldap.x86_64 0:1.2.3-1.el6 will be updated     ---> Package wine-ldap.i686 0:1.4.1-1.el6 will be an update     ---> Package wine-ldap.x86_64 0:1.4.1-1.el6 will be an update     ---> Package wine-marlett-fonts.noarch 0:1.2.3-1.el6 will be updated     ---> Package wine-marlett-fonts.noarch 0:1.4.1-1.el6 will be an update     ---> Package wine-pulseaudio.i686 0:1.2.3-1.el6 will be updated     ---> Package wine-pulseaudio.x86_64 0:1.2.3-1.el6 will be updated     ---> Package wine-pulseaudio.i686 0:1.4.1-1.el6 will be an update     --> Processing Dependency: wine-alsa(x86-32) = 1.4.1-1.el6 for package: wine-pulseaudio-1.4.1-1.el6.i686     --> Processing Dependency: alsa-plugins-pulseaudio(x86-32) for package: wine-pulseaudio-1.4.1-1.el6.i686     ---> Package wine-pulseaudio.x86_64 0:1.4.1-1.el6 will be an update     --> Processing Dependency: wine-alsa(x86-64) = 1.4.1-1.el6 for package: wine-pulseaudio-1.4.1-1.el6.x86_64     ---> Package wine-small-fonts.noarch 0:1.2.3-1.el6 will be updated     ---> Package wine-small-fonts.noarch 0:1.4.1-1.el6 will be an update     ---> Package wine-symbol-fonts.noarch 0:1.2.3-1.el6 will be updated     ---> Package wine-symbol-fonts.noarch 0:1.4.1-1.el6 will be an update     ---> Package wine-system-fonts.noarch 0:1.2.3-1.el6 will be updated     ---> Package wine-system-fonts.noarch 0:1.4.1-1.el6 will be an update     ---> Package wine-twain.i686 0:1.2.3-1.el6 will be updated     ---> Package wine-twain.x86_64 0:1.2.3-1.el6 will be updated     ---> Package wine-twain.i686 0:1.4.1-1.el6 will be an update     ---> Package wine-twain.x86_64 0:1.4.1-1.el6 will be an update     ---> Package wine-wow.x86_64 0:1.2.3-1.el6 will be updated     ---> Package wine-wow.x86_64 0:1.4.1-1.el6 will be an update     --> Running transaction check     ---> Package alsa-plugins-pulseaudio.i686 0:1.0.21-3.el6 will be installed     ---> Package gstreamer.i686 0:0.10.29-1.el6 will be installed     ---> Package gstreamer-plugins-base.i686 0:0.10.29-1.el6 will be installed     --> Processing Dependency: libtheoraenc.so.1(libtheoraenc_1.0) for package: gstreamer-plugins-base-0.10.29-1.el6.i686     --> Processing Dependency: libcdda_interface.so.0 for package: gstreamer-plugins-base-0.10.29-1.el6.i686     --> Processing Dependency: liboil-0.3.so.0 for package: gstreamer-plugins-base-0.10.29-1.el6.i686     --> Processing Dependency: libtheoradec.so.1(libtheoradec_1.0) for package: gstreamer-plugins-base-0.10.29-1.el6.i686     --> Processing Dependency: libvisual-0.4.so.0 for package: gstreamer-plugins-base-0.10.29-1.el6.i686     --> Processing Dependency: libcdda_paranoia.so.0 for package: gstreamer-plugins-base-0.10.29-1.el6.i686     --> Processing Dependency: libtheoradec.so.1 for package: gstreamer-plugins-base-0.10.29-1.el6.i686     --> Processing Dependency: libgudev-1.0.so.0 for package: gstreamer-plugins-base-0.10.29-1.el6.i686     --> Processing Dependency: libtheoraenc.so.1 for package: gstreamer-plugins-base-0.10.29-1.el6.i686     ---> Package wine-alsa.i686 0:1.4.1-1.el6 will be installed     ---> Package wine-alsa.x86_64 0:1.4.1-1.el6 will be installed     ---> Package wine-ms-sans-serif-fonts.noarch 0:1.4.1-1.el6 will be installed     ---> Package wine-openal.i686 0:1.4.1-1.el6 will be installed     --> Processing Dependency: libopenal.so.1 for package: wine-openal-1.4.1-1.el6.i686     ---> Package wine-openal.x86_64 0:1.4.1-1.el6 will be installed     --> Processing Dependency: libopenal.so.1()(64bit) for package: wine-openal-1.4.1-1.el6.x86_64     ---> Package wine-tahoma-fonts.noarch 0:1.4.1-1.el6 will be installed     --> Running transaction check     ---> Package cdparanoia-libs.i686 0:10.2-5.1.el6 will be installed     ---> Package libgudev1.i686 0:147-2.40.el6 will be installed     --> Processing Dependency: libudev = 147-2.40.el6 for package: libgudev1-147-2.40.el6.i686     --> Processing Dependency: libudev.so.0 for package: libgudev1-147-2.40.el6.i686     ---> Package liboil.i686 0:0.3.16-4.1.el6 will be installed     ---> Package libtheora.i686 1:1.1.0-2.el6 will be installed     ---> Package libvisual.i686 0:0.4.0-9.1.el6 will be installed     ---> Package wine-openal.i686 0:1.4.1-1.el6 will be installed     --> Processing Dependency: libopenal.so.1 for package: wine-openal-1.4.1-1.el6.i686     ---> Package wine-openal.x86_64 0:1.4.1-1.el6 will be installed     --> Processing Dependency: libopenal.so.1()(64bit) for package: wine-openal-1.4.1-1.el6.x86_64     --> Running transaction check     ---> Package libudev.i686 0:147-2.40.el6 will be installed     ---> Package wine-openal.i686 0:1.4.1-1.el6 will be installed     --> Processing Dependency: libopenal.so.1 for package: wine-openal-1.4.1-1.el6.i686     ---> Package wine-openal.x86_64 0:1.4.1-1.el6 will be installed     --> Processing Dependency: libopenal.so.1()(64bit) for package: wine-openal-1.4.1-1.el6.x86_64     --> Finished Dependency Resolution     Error: Package: wine-openal-1.4.1-1.el6.i686 (epel)            Requires: libopenal.so.1     Error: Package: wine-openal-1.4.1-1.el6.x86_64 (epel)            Requires: libopenal.so.1()(64bit)      You could try using --skip-broken to work around the problem      You could try running: rpm -Va --nofiles --nodigest     [root@NOTEBOOK /etc/yum.repos.d] yum update --skip-broken     Loaded plugins: fastestmirror, presto, security     Loading mirror speeds from cached hostfile      * epel: mirror.pmf.kg.ac.rs      * rpmforge: ftp.lug.ro      * sl: ftp.scientificlinux.org      * sl-security: ftp.scientificlinux.org     Setting up Update Process     Resolving Dependencies     --> Running transaction check     ---> Package wine.x86_64 0:1.2.3-1.el6 will be updated     ---> Package wine.x86_64 0:1.4.1-1.el6 will be an update     --> Processing Dependency: wine-openal(x86-64) = 1.4.1-1.el6 for package: wine-1.4.1-1.el6.x86_64     --> Processing Dependency: wine-openal(x86-32) = 1.4.1-1.el6 for package: wine-1.4.1-1.el6.x86_64     ---> Package wine-capi.i686 0:1.2.3-1.el6 will be updated     ---> Package wine-capi.x86_64 0:1.2.3-1.el6 will be updated      ...bla-bla               --> Processing Dependency: wine-common = 1.2.3-1.el6 for package: wine-desktop-1.2.3-1.el6.noarch     --> Processing Dependency: wine-common = 1.2.3-1.el6 for package: wine-core-1.2.3-1.el6.i686     --> Processing Dependency: wine-common = 1.2.3-1.el6 for package: wine-core-1.2.3-1.el6.x86_64     --> Finished Dependency Resolution     Skip-broken could not solve problems     Error: Package: wine-openal-1.4.1-1.el6.i686 (epel)            Requires: libopenal.so.1     Error: Package: wine-openal-1.4.1-1.el6.x86_64 (epel)            Requires: libopenal.so.1()(64bit)      You could try running: rpm -Va --nofiles --nodigest     [root@NOTEBOOK /etc/yum.repos.d]      [root@NOTEBOOK /etc/yum.repos.d] rpm -Va --nofiles --nodigest     [root@NOTEBOOK /etc/yum.repos.d]      ..and the same starts again if I yum update.. I can't install the               wine-openal.i686 : Openal support for wine     wine-openal.x86_64 : Openal support for wine      why?? I tryied to yum remove wine*..ok it removed all the wine* packages from my system, but... when I tried to yum install wine... the same error message with "Requires: libopenal.so.1"...came up.. I tried to:               rm -f /var/lib/rpm/__db*     rpm -vv --rebuilddb      but it didn't helped..               [root@NOTEBOOK /etc/yum.repos.d] ls     epel.repo           linux_signing_key.pub    mirrors-rpmforge-testing  sl.repo           virtualbox.repo     epel-testing.repo   mirrors-rpmforge         rpmforge.repo             sl.repo;502df2db     google-chrome.repo  mirrors-rpmforge-extras  sl-other.repo             sl.repo;502e1e13     [root@NOTEBOOK /etc/yum.repos.d]       I primary use rpmforge, and epel is just this:               [root@NOTEBOOK /etc/yum.repos.d] cat epel.repo      [epel]     name=Extra Packages for Enterprise Linux 6 - $basearch     #baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch     mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch     failovermethod=priority     enabled=1     gpgcheck=1     gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6     includepkgs=nss-mdns wine* gparted cups-pdf       Q: How can I resolve this problem? =============================================== UPDATE: I tried to download the:               http://rpm.pbone.net/index.php3/stat/4/idpl/15175751/dir/scientific_linux_6/com/openal-soft-1.12.854-1.el6.x86_64.rpm.html     http://rpm.pbone.net/index.php3/stat/4/idpl/15174245/dir/scientific_linux_6/com/openal-soft-1.12.854-1.el6.i686.rpm.html      but it gives "Error 550" ... ... So... I tried:               http://pkgs.org/centos-6-rhel-6/atrpms-i386/openal-soft-1.12.854-1.el6.i686.rpm/download/     http://pkgs.org/centos-6-rhel-6/epel-x86_64/openal-soft-1.12.854-1.el6.x86_64.rpm/download/      "rpm -i"-ed the two rpm packages (these packages provided the libopenal.so.1's..), then:               [root@NOTEBOOK /etc/yum.repos.d] yum install wine     Loaded plugins: fastestmirror, presto, security     Loading mirror speeds from cached hostfile      * epel: mirror.pmf.kg.ac.rs      * rpmforge: ftp.lug.ro      * sl: ftp1.scientificlinux.org      * sl-security: ftp1.scientificlinux.org     Setting up Install Process     Resolving Dependencies     --> Running transaction check     ---> Package wine.x86_64 0:1.4.1-1.el6 will be installed     --> Processing Dependency: wine-wow(x86-64) = 1.4.1-1.el6 for package: wine-1.4.1-1.el6.x86_64     --> Processing Dependency: wine-twain(x86-64) = 1.4.1-1.el6 for package: wine-1.4.1-1.el6.x86_64     --> Processing Dependency: wine-twain(x86-32) = 1.4.1-1.el6 for package: wine-1.4.1-1.el6.x86_64     --> Processing Dependency: wine-pulseaudio(x86-64) = 1.4.1-1.el6 for package: wine-1.4.1-1.el6.x86_64     --> Processing Dependency: wine-pulseaudio(x86-32) = 1.4.1-1.el6 for package: wine-1.4.1-1.el6.x86_64     --> Processing Dependency: wine-openal(x86-64) = 1.4.1-1.el6 for package: wine-1.4.1-1.el6.x86_64     --> Processing Dependency: wine-openal(x86-32) = 1.4.1-1.el6 for package: wine-1.4.1-1.el6.x86_64     --> Processing Dependency: wine-ldap(x86-64) = 1.4.1-1.el6 for package: wine-1.4.1-1.el6.x86_64     --> Processing Dependency: wine-ldap(x86-32) = 1.4.1-1.el6 for package: wine-1.4.1-1.el6.x86_64     --> Processing Dependency: wine-fonts = 1.4.1-1.el6 for package: wine-1.4.1-1.el6.x86_64     --> Processing Dependency: wine-desktop = 1.4.1-1.el6 for package: wine-1.4.1-1.el6.x86_64     --> Processing Dependency: wine-core(x86-64) = 1.4.1-1.el6 for package: wine-1.4.1-1.el6.x86_64     --> Processing Dependency: wine-core(x86-32) = 1.4.1-1.el6 for package: wine-1.4.1-1.el6.x86_64     --> Processing Dependency: wine-cms(x86-64) = 1.4.1-1.el6 for package: wine-1.4.1-1.el6.x86_64     --> Processing Dependency: wine-cms(x86-32) = 1.4.1-1.el6 for package: wine-1.4.1-1.el6.x86_64     --> Processing Dependency: wine-capi(x86-64) = 1.4.1-1.el6 for package: wine-1.4.1-1.el6.x86_64     --> Processing Dependency: wine-capi(x86-32) = 1.4.1-1.el6 for package: wine-1.4.1-1.el6.x86_64     --> Running transaction check     ---> Package wine-capi.i686 0:1.4.1-1.el6 will be installed     ---> Package wine-capi.x86_64 0:1.4.1-1.el6 will be installed     ---> Package wine-cms.i686 0:1.4.1-1.el6 will be installed     ---> Package wine-cms.x86_64 0:1.4.1-1.el6 will be installed     ---> Package wine-core.i686 0:1.4.1-1.el6 will be installed     --> Processing Dependency: wine-common = 1.4.1-1.el6 for package: wine-core-1.4.1-1.el6.i686     --> Processing Dependency: libgstreamer-0.10.so.0 for package: wine-core-1.4.1-1.el6.i686     --> Processing Dependency: libgstbase-0.10.so.0 for package: wine-core-1.4.1-1.el6.i686     --> Processing Dependency: libgstapp-0.10.so.0 for package: wine-core-1.4.1-1.el6.i686     ---> Package wine-core.x86_64 0:1.4.1-1.el6 will be installed     ---> Package wine-desktop.noarch 0:1.4.1-1.el6 will be installed     ---> Package wine-fonts.noarch 0:1.4.1-1.el6 will be installed     --> Processing Dependency: wine-tahoma-fonts = 1.4.1-1.el6 for package: wine-fonts-1.4.1-1.el6.noarch     --> Processing Dependency: wine-system-fonts = 1.4.1-1.el6 for package: wine-fonts-1.4.1-1.el6.noarch     --> Processing Dependency: wine-symbol-fonts = 1.4.1-1.el6 for package: wine-fonts-1.4.1-1.el6.noarch     --> Processing Dependency: wine-small-fonts = 1.4.1-1.el6 for package: wine-fonts-1.4.1-1.el6.noarch     --> Processing Dependency: wine-ms-sans-serif-fonts = 1.4.1-1.el6 for package: wine-fonts-1.4.1-1.el6.noarch     --> Processing Dependency: wine-marlett-fonts = 1.4.1-1.el6 for package: wine-fonts-1.4.1-1.el6.noarch     --> Processing Dependency: wine-courier-fonts = 1.4.1-1.el6 for package: wine-fonts-1.4.1-1.el6.noarch     ---> Package wine-ldap.i686 0:1.4.1-1.el6 will be installed     ---> Package wine-ldap.x86_64 0:1.4.1-1.el6 will be installed     ---> Package wine-openal.i686 0:1.4.1-1.el6 will be installed     ---> Package wine-openal.x86_64 0:1.4.1-1.el6 will be installed     ---> Package wine-pulseaudio.i686 0:1.4.1-1.el6 will be installed     --> Processing Dependency: wine-alsa(x86-32) = 1.4.1-1.el6 for package: wine-pulseaudio-1.4.1-1.el6.i686     --> Processing Dependency: alsa-plugins-pulseaudio(x86-32) for package: wine-pulseaudio-1.4.1-1.el6.i686     ---> Package wine-pulseaudio.x86_64 0:1.4.1-1.el6 will be installed     --> Processing Dependency: wine-alsa(x86-64) = 1.4.1-1.el6 for package: wine-pulseaudio-1.4.1-1.el6.x86_64     ---> Package wine-twain.i686 0:1.4.1-1.el6 will be installed     ---> Package wine-twain.x86_64 0:1.4.1-1.el6 will be installed     ---> Package wine-wow.x86_64 0:1.4.1-1.el6 will be installed     --> Running transaction check     ---> Package alsa-plugins-pulseaudio.i686 0:1.0.21-3.el6 will be installed     ---> Package gstreamer.i686 0:0.10.29-1.el6 will be installed     ---> Package gstreamer-plugins-base.i686 0:0.10.29-1.el6 will be installed     --> Processing Dependency: libtheoraenc.so.1(libtheoraenc_1.0) for package: gstreamer-plugins-base-0.10.29-1.el6.i686     --> Processing Dependency: libcdda_interface.so.0 for package: gstreamer-plugins-base-0.10.29-1.el6.i686     --> Processing Dependency: liboil-0.3.so.0 for package: gstreamer-plugins-base-0.10.29-1.el6.i686     --> Processing Dependency: libtheoradec.so.1(libtheoradec_1.0) for package: gstreamer-plugins-base-0.10.29-1.el6.i686     --> Processing Dependency: libvisual-0.4.so.0 for package: gstreamer-plugins-base-0.10.29-1.el6.i686     --> Processing Dependency: libcdda_paranoia.so.0 for package: gstreamer-plugins-base-0.10.29-1.el6.i686     --> Processing Dependency: libtheoradec.so.1 for package: gstreamer-plugins-base-0.10.29-1.el6.i686     --> Processing Dependency: libgudev-1.0.so.0 for package: gstreamer-plugins-base-0.10.29-1.el6.i686     --> Processing Dependency: libtheoraenc.so.1 for package: gstreamer-plugins-base-0.10.29-1.el6.i686     ---> Package wine-alsa.i686 0:1.4.1-1.el6 will be installed     ---> Package wine-alsa.x86_64 0:1.4.1-1.el6 will be installed     ---> Package wine-common.noarch 0:1.4.1-1.el6 will be installed     ---> Package wine-courier-fonts.noarch 0:1.4.1-1.el6 will be installed     ---> Package wine-marlett-fonts.noarch 0:1.4.1-1.el6 will be installed     ---> Package wine-ms-sans-serif-fonts.noarch 0:1.4.1-1.el6 will be installed     ---> Package wine-small-fonts.noarch 0:1.4.1-1.el6 will be installed     ---> Package wine-symbol-fonts.noarch 0:1.4.1-1.el6 will be installed     ---> Package wine-system-fonts.noarch 0:1.4.1-1.el6 will be installed     ---> Package wine-tahoma-fonts.noarch 0:1.4.1-1.el6 will be installed     --> Running transaction check     ---> Package cdparanoia-libs.i686 0:10.2-5.1.el6 will be installed     ---> Package libgudev1.i686 0:147-2.40.el6 will be installed     --> Processing Dependency: libudev = 147-2.40.el6 for package: libgudev1-147-2.40.el6.i686     --> Processing Dependency: libudev.so.0 for package: libgudev1-147-2.40.el6.i686     ---> Package liboil.i686 0:0.3.16-4.1.el6 will be installed     ---> Package libtheora.i686 1:1.1.0-2.el6 will be installed     ---> Package libvisual.i686 0:0.4.0-9.1.el6 will be installed     --> Running transaction check     ---> Package libudev.i686 0:147-2.40.el6 will be installed     --> Finished Dependency Resolution     Error: Protected multilib versions: libudev-147-2.40.el6.i686 != libudev-147-2.41.el6.x86_64     Error: Protected multilib versions: libgudev1-147-2.40.el6.i686 != libgudev1-147-2.41.el6.x86_64      You could try using --skip-broken to work around the problem      You could try running: rpm -Va --nofiles --nodigest     [root@NOTEBOOK /etc/yum.repos.d]      [root@NOTEBOOK /etc/yum.repos.d] rpm -qa | grep -i libudev     libudev-147-2.41.el6.x86_64     [root@NOTEBOOK /etc/yum.repos.d]      ...so now I got a: Error: Protected multilib versions: libudev-147-2.40.el6.i686 != libudev-147-2.41.el6.x86_64 Error: Protected multilib versions: libgudev1-147-2.40.el6.i686 != libgudev1-147-2.41.el6.x86_64 error message... what to do next?? how can I fix this??


title: Moving /usr to its own filesystem/logical volume

text: My Fedora 17 (x64 - running on VMware Workstation 8) root filesystem is running out of space (this was an install using the default layout as suggested by the Fedora installer):               # df -h     Filesystem                    Size  Used Avail Use% Mounted on     rootfs                         18G   17G  937M  95% /     devtmpfs                      1.5G     0  1.5G   0% /dev     tmpfs                         1.5G  224K  1.5G   1% /dev/shm     tmpfs                         1.5G   51M  1.5G   4% /run     /dev/mapper/vg_bloss-lv_root   18G   17G  937M  95% /     tmpfs                         1.5G   51M  1.5G   4% /run     tmpfs                         1.5G     0  1.5G   0% /sys/fs/cgroup     tmpfs                         1.5G     0  1.5G   0% /media     /dev/sda2                     485M   85M  376M  19% /boot      The bulk of the space is taken up by the `/usr` directory. I have added a 40GB disk to the virtual machine (`/dev/sdb`) and wish to move `/usr` to its own logical volume. LVM is a bit new to me but I think I've worked out the steps to add this disk using LVM:               fdisk /dev/sdb      # (create a new 0x8e LVM partition type using all of the disk)          pvcreate /dev/sdb1     vgextend vg_bloss /dev/sdb1     lvcreate -l +100%FREE -n lv_usr vg_bloss /dev/sdb1     mkfs -t ext4 /dev/vg_bloss/lv_usr     # mount fs     mkdir /mnt/usr     mount -t ext4 /dev/vg_bloss/lv_usr /mnt/usr      I was then going to use the following steps to move `/usr` onto this new filesystem:               cp -aR /usr/* /mnt/usr     umount /mnt/usr     # add relevant mount entry in /etc/fstab:     # /dev/mapper/vg_bloss-lv_usr /usr    ext4    defaults    1 1     mv /usr /usr_old     mkdir /usr     mount -t ext4 /dev/vg_bloss/lv_usr /usr     reboot      Then when I'm happy that `/usr` seems intact and behaving normally I'll just delete it to free up space on `/`. Does this look sane?