title: Linux Mint - Blackscreen on installation

text: Whenever I try to install Linux mint 10, the Start menu (install, install compatibility, reboot) comes on, but when I choose one of them, I get a blackscreen after the kernel is loaded. Why?


title: difference between df -h and dfc

text: Why is there a difference in the used size between `dfc` and `df -h`?               $ df -h     Dateisystem    Größe Benutzt Verf. Verw% Eingehängt auf     /dev/sda7        64G     51G   11G   83% /     none            4,0K       0  4,0K    0% /sys/fs/cgroup     udev            3,9G    4,0K  3,9G    1% /dev     tmpfs           801M    1,5M  799M    1% /run     none            5,0M       0  5,0M    0% /run/lock     none            4,0G    148K  4,0G    1% /run/shm     ...          $ dfc          FILESYSTEM  (=) USED      FREE (-) %USED AVAILABLE     TOTAL MOUNTED ON      /dev/sda7   [=================---]   83%     10.6G     63.9G /     none        [--------------------]    0%      4.0K      4.0K /sys/fs/cgroup     udev        [=-------------------]    0%      3.9G      3.9G /dev     tmpfs       [=-------------------]    0%    798.7M    800.1M /run     none        [--------------------]    0%      5.0M      5.0M /run/lock     none        [=-------------------]    0%      3.9G      3.9G /run/shm     ...      I wouldnt round 3.9 up to 4 and then display 4,0 that makes no sense to me.


title: Prey anti-theft configuration on Debian

text: I would like to protect my laptop from thieves. I would configure Prey, but I can't find any tutorial for Debian/Ubuntu users. I tried to go to the control panel on the project, but whenever I try to add a device, the server redirect me to download page. I have no idea how to go ahead. Who can help me? I have installed prey from the repository of Debian Wheezy. I found the configuration file, but I have no ideas on how to configure it.


title: Setting time through GPS dongle

text: There is this code that claims to set the time of your linux environment, http://blog.petrilopia.net/linux/raspberry-pi-set-time-gps-dongle/               date -s '01/01/2014 00:01'     sleep 1     pkill ntpd     pkill gpsd     gpsd -b -n -D 2 /dev/ttyUSB0     sleep 2     GPSDATE=`gpspipe -w | head -10 | grep TPV | sed -r 's/.*"time":"([^"]*)".*/\1/' | head -1`     echo $GPSDATE     date -s "$GPSDATE"     /usr/sbin/ntpd      But When I am running this code through puTTy it sets my time to, > Sun Aug 8 06:08:11 PKT 2010 I'd like to know why it is setting my GPS time to 2010 ? while its 2013 ? Here is the Output of `gpspipe -w` command               {"class":"TPV","tag":"MID2","device":"/dev/ttyUSB0","mode":1,"time":"1990-12-22T23:59:53.020Z","ept":0.005}     {"class":"TPV","tag":"MID2","device":"/dev/ttyUSB0","mode":1,"time":"1990-12-22T23:59:54.020Z","ept":0.005}     {"class":"SKY","tag":"MID4","device":"/dev/ttyUSB0","time":"1990-12-22T23:59:55.010Z"}     {"class":"TPV","tag":"MID2","device":"/dev/ttyUSB0","mode":1,"time":"1990-12-22T23:59:55.010Z","ept":0.005}     {"class":"TPV","tag":"MID2","device":"/dev/ttyUSB0","mode":1,"time":"1990-12-22T23:59:56.020Z","ept":0.005}     {"class":"TPV","tag":"MID2","device":"/dev/ttyUSB0","mode":1,"time":"1990-12-22T23:59:57.020Z","ept":0.005}      The output is continuous , which means it is changing every second.


title: Linux Mint 15 unable to install on VM VirtualBox

text: Appears that something maybe up with my VM set-up as it wouldn't install Fedora either. Problem will be I load up the VM and hit F12 to boot from the CD/DVD which is pointed to the mounted ISO file which will at this attempt is linuxmint-15-cinnamon-dvd-64bit.iso At which point I will see a screen saying Linux Mint Autoboot in 10.. 9.. then as soon as the count down reaches zero I am stuck on this screen. ![Desktop Caption](http://img843.imageshack.us/img843/51/xd93.png) Full Size image: a link! I have 3D Acceleration Enabled and gave 128mb Vid Mem. So unsure what else I could try. I assigned 4096Mb of RAM ... The image shows 2048 but I have since changed that to 4GB. Anything I could try or troubleshoot? Most results online show issues relating to post installation or during installation, yet I cannot begin the installation. - As instructed the ISO is MD5 Verified with a checksum and when using a prepared VDI it still fails to hit the OS. I have the options to select Linux Mint.. Linux Mint +Rec ect. But soon as I choose one it hangs on a black console screen with an underscore.


title: What command will generate average lines per minute?

text: I'd like to know how many average lines are written to a file per minute. Could someone help me with a command or code to generate this number?


title: How to Replace Path in Search field using VIM

text: I'm trying to replace this text in VIM               Actual Path /home/omipenguin/Servers\ Information/systemscript.sh/sysinfo.txt      with this new path               /home/sysinfo      I tried               %s/\/home\/omipenguin\/Servers\ Information\/systemscript.sh\/sysinfo.txt//home/sysinfo/g      but VIM gives me `Pattern not Found`. Please advise, what is wrong?


title: Fixing a broken packet system (apt-get)

text: After I made a system upgrade (apt-get upgrade) on a debian box, I get an error everytime i tries to use apt-get. Example:               # apt-get -f install     Reading package lists... Done     Building dependency tree     Reading state information... Done     0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.     1 not fully installed or removed.     After this operation, 0 B of additional disk space will be used.     Setting up initscripts (2.88dsf-41+deb7u1) ...     insserv: Service killprocs has to be enabled to start service single     insserv: exiting now!     update-rc.d: error: insserv rejected the script header     dpkg: error processing initscripts (--configure):      subprocess installed post-installation script returned error exit status 1     Errors were encountered while processing:      initscripts     E: Sub-process /usr/bin/dpkg returned an error code (1)      I have tried to find a solution, but can't find anything that looks like this. First of all I have this packet which is "not fully installed or removed". But I can't find the command to locate it. Have tried:               dpkg -l | grep rc      But it list about 20 packets, so there must be a better way to find this packet. To fix the packet system I have tried normal procedures, like:               apt-get clean && sudo apt-get autoremove      apt-get -f install     dpkg --configure -a      The clean command is good, but the install command will fail with as shown above. In a desperate try, I tried to reinstall insserv (not sure it's the packet which is broken), but it fails the same way:               # apt-get install --reinstall insserv     Reading package lists... Done     Building dependency tree     Reading state information... Done     0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 8 not upgraded.     1 not fully installed or removed.     Need to get 63.8 kB of archives.     After this operation, 0 B of additional disk space will be used.     Get:1 http://ftp.us.debian.org/debian/ wheezy/main insserv armel 1.14.0-5 [63.8 kB]     Fetched 63.8 kB in 0s (85.5 kB/s)     Setting up initscripts (2.88dsf-41+deb7u1) ...     insserv: Service killprocs has to be enabled to start service single     insserv: exiting now!     update-rc.d: error: insserv rejected the script header     dpkg: error processing initscripts (--configure):      subprocess installed post-installation script returned error exit status 1     Errors were encountered while processing:      initscripts     E: Sub-process /usr/bin/dpkg returned an error code (1)      Hope some of you can help me fix the issue.


title: Periodically sync local folders using rsync (no symlinks!)

text: I am using Dropbox to have an online backup of some data. However I want to encrypt my data before uploading it to Dropbox. Therefore I have created a TrueCrypt container and I am using `rsync` to synchronize the original data with the data in the TrueCrypt container. The reason for this duplicative setup is because I want both **hassle-free local access** and an **encrypted online backup**. However now on to my question. I wrote a script which uses rsync for the local synchronisation. I however do not want to execute it manually. Could someone tell me how I can run the script, say every 30 seconds, from the moment I login to my computer? ps: I could always embed the current code of my script in a never-ending `while loop` and add `sleep 30`. However are there other more sophisticated ways?


title: Linux Red Hat Library Dependencies question

text: I have to create a script that will download 8 libraries. However, on the server where we have all the libraries, I can only find 2 or 3 of these 8. I believe these 2 or 3 actually depend on other libraries to work, so when I request via yum to download 2 or 3 of these libraries, all the 8 libraries will actually be downloaded. I know there is a command to check out the dependencies of a specific rpm package:               rpm -qpR (name of rpm package)      My question is the following: is there a "reverse" command that, given a specific library name, will look for all the rpm packages that depend on this library?


title: How do I copy/yank a multi-line expression I typed at the ZSH prompt?

text: For example, supposed I'm browsing through my history, and reach this multi- line command I'd typed earlier:               ~ >> for f in *; do     echo $f     done      I've enabled `vim` bindings in the ZLE (`bindkey -v`), so I can type `Esc` at this point and use `vim` keys to get around, move across lines, etc. I can also do `yy` to yank the current line. However, there doesn't seem to be an obvious way to copy all these lines. Any ideas?


title: How to prepare files for rsync on a case insensitive filesystem?

text: I am transferring a large number of files on a HFS+ filesystem. The files are currently on ext2 partitions. I have conflicts due to case insensitivity of the target partition (HFS+). I want to identify the files that have duplicates filenames once they are in lower case, and delete them if they are actually duplicates. I also found that I will have duplicate folder names if I convert everyhing to lower case. Basically these hard drives contain years of unsorted data, and I happen to have this problem with folder names too. Does this seem reasonable:               find . -type f | while read f; do echo $f:l; done | sort | uniq -d       `$f:l` is ZSH for convert to lower case. Now I want to keep only one instance of each file that have duplicates. How to do this efficiently ? I do not want to find files with duplicate _content_ , unless they have the same lower case filename. I will deal with duplicates later.


title: Running Debian jessie, missing some packages

text: I want to install gajim and virtualbox-fuse in Debian jessie but the repository isn't offering me these. Whats the correct approach on this? Backports, wheezy or repositories from oracle/gajim? Virtualbox seems even more complicated since virtualbox is in jessie but virtualbox-fuse is not. And virtualbox-fuse depends on virtualbox.


title: What exactly should we do to get bcache?

text: I am extremely confused about this bcache thingy here. On one hand some says that it's already incorporated into linux kernel. Then some says that I need to patch my linux kernel. If it's already incorporated, why do I have to patch the kernel? From http://pommi.nethuis.nl/ssd-caching-using-linux-and-bcache/ and from http://bcache.evilpiepirate.org/#Getting_bcache > **Bcache has been merged into the mainline Linux kernel; for the latest > stable bcache release use the latest 3.10 or 3.11 stable kernel**. For the > userspace tools, git clone http://evilpiepirate.org/git/bcache-tools.git The > udev rules, Debian/Ubuntu source package, and Ubuntu PPA are maintained > here: git clone https://github.com/g2p/bcache-tools.git To use the PPA > (Ubuntu Raring and Saucy): sudo add-apt-repository ppa:g2p/storage sudo apt- > get update sudo apt-get install bcache-tools The PPA also contains blocks, a > conversion tool. A Fedora package is available in Fedora 20, and maintained > here. So basically it says that bcache is already released on 3.11 stable kernel. Then it follows "For the userspace tools, git clone bla bla bla" What is userspace? What is git? If it's already on the kernel why do I have to do anything at all? I want to install bcache on my typical centos webserver. This is what I found: > > Hello, >> >> I would like to implement a solution with ssd caching Bcache on CentOS. Have you ever implemented a solution to this distribution (or kernel)? if so, do you have a package? > > There's no packages, it's not integrated with any distributions - you've got > to build your own kernel and tools. Check the wiki for more info. What wiki? Do there's no package, it's not distributed, then got to build my own kernel. What does it mean? How do I build my own kernel?


title: bash: insert character at specified position in file

text: Lets say I have following file               word1          something       blabla     anotherword    somethingelse   asdf     yetanother     else            123      For each line, I need to put a comment infront of the second column, which always starts at position 15 (that is, to insert `#` at position 15). How can I do it?


title: Multiple display works in Linux Mint Live CD but not my Gentoo installation

text: I tried to connect a VGA display to my Gentoo laptop and use multi-display. However, the two screens behave like one big screen instead of two separate ones. That is, if I maximize a window, it crosses the screens. In Linux Mint Live CD, however, they act like two screens. I tracked down the problem to every level including KDE, X, udev, and kernel but I can't find the problem. I've asked the question on http://forums.gentoo.org/viewtopic-p-7446050.html , but seems that no one read it. The only difference I see is that my `xf86-video-intel` seems to recognize my card incorrectly, and not reading EDID from display, and not using `crtc`. However, I tried combinations of kernels, configs, downgraded drivers, removing the nVidia drivers, etc., but none worked. Also, if I click "identify outputs" in KDE, both "LVDS1" and "VGA1" will display on BOTH screens, but on LiveCD LVDS1 displays on my laptop and VGA1 displays on the external screen.   * Why would this have happened?    * Does anyone have any ideas?


title: Why should I use Debian 6 with FreeBSD kernel?

text: Debian 6 will also be available with the FreeBSD kernel. Why did they decide to to that and why should I use it?


title: Open PDF previewer width specific size and position and "always on top" from command line

text: I'm using `latexmk -pdf -pvc` to keep compiling my LaTeX files to PDFs while they are displayed in `evince`. I'm doing that a lot with different files and I keep needing to zoom the PDF content, resize the window and enable "always on top". I like to be able to do this automatically using the command line. Using -geometry doesn't work with `evince` ("`Unknown option`") and the command line help doesn't say anything about it as well. I tried the preview `-w` option which gives me a nice sized window, but the automatic update feature I need seems to be disabled in this mode. I'm using Ubuntu 11.10 with the classic desktop and the default window manager. Is there a possibility to set both the size and position as well as "always on top" from the command line for `evince` (or similar PDF viewer with auto-update)? I think there might be some window manager control tool which can resize and configure windows from the command line. I'm aware of an `evince` feature request to add `size` and `position` arguments, which would be half the job already, but I don't think it will be implemented soon.


title: My default browser is set to Firefox but links open with Chromium

text: I'm using Linux Mint Debian edition and I have set Firefox as my default browser in my settings. But HTTP links in other apps like hotot and pidgin open with Chromium! Why is this happening is there any way to track the problem?


title: After cloning Fedora 14 install to another machine, onboard NIC is seen as eth1 instead of eth0. Why?

text: I have the following procedure for replicating a Fedora workstation setup.   1. Boot from a Live CD, make tgz's of the filesystems.   2. Go to new machine, make filesystems, dump the tgz's in the proper places.   3. Adjust UUID's in /etc/fstab and /boot/grub/menu.lst   4. Run grub-install   5. Reboot! The nice thing is that DHCP assigns the new machine an unique name, and users have /home mounted on the server. Graphics configuration aren't a worry either, since recent versions of Xorg are wicked smart in auto-detecting graphic adapters. So everything works like a snap... with the exception of one small quirk: In the first boot of the new machine, network startup fails. It turns out the machine thinks there's no such thing as an eth0, but there _is_ an eth1 and it is the machine's onboard ethernet. So I have to go to /etc/sysconfig/network- scripts, rename ifcfg-eth0 to ifcfg-eth1, and edit the DEVICE= line in it. _Then_ I reboot and everything works. I believe somewhere, in some file, there is information associating eth0 with the MAC of the "Master Mold" machine's eth0. But where? P.S.: I don't use NetworkManager.


title: Linux: CentOS Libcurl

text: Does anyone have a working method of downloading `libcurl` on CentOS 6? I'm trying to download it but all the mirrors are down for some reason.   And `yum install` "Developer Tools" doesn't come with it.


title: = sign at the end of .sock files in the ls output

text: I'm running the zsh shell in emacs. When I run `ls` I get a `=` at the end of `.sock` files. What does the `=` mean? Is it unique to unix sockets?


title: When to mount /tmp (and other temporary directories)

text: When is the right time to mount `/tmp` (on Debian)? For `/home` I would not feel bad just to `echo "/dev/foo /home type defaults 0 0" >>/etc/fstab` - but can I be sure that `/tmp` is not used by any programs when the `fstab` is applied? * * * **I am using** either Ubuntu or plain Debian or Debian/Grml - this would not make much difference I guess. **What I have read so far:**   * The internet is full of advice to just add `tmpfs /tmp tmpfs <optionns> 0 0` - but I am unsure.   * I found this answer on what to do when `/tmp` is full without rebooting (in short: It's best to reboot anyway, except maybe for a union mount).   * The [Deban policy] does not explain where to add the mount, or when the first access to `/tmp` may happen. More helpful are `/etc/init.d/README` and `/etc/rcS/README` on my Ubuntu (read them online). **Background:** I am going to use some Debian flavor on my Netbook (no HD, 8 GB SSD, 1 GB RAM - will double the RAM when neccessary). _I am not low on memory._ Some tasks are much too slow (building medium-sized C programs or compiling PDF from TeX both take 5+ seonds), but they take no time on a tmpfs. I want to mount a tmpfs on /tmp to accelerate them.


title: How to convert Windows 7 partitions to qcow2?

text: I know I can use `qemu-img` tool to convert a raw partition into a image file. But Windows 7 has two partitions. I tried:               qemu-img convert /dev/sda1 /dev/sda2 win7.qcow2      But the generated file does not have the correct partition infomation, thus cannot work. I also tried converting only the _System_ partition and let the Windows 7 installation program to fix it for me, and the program says it cannot fix it ;( I then used the disk2vhd utility to create VHD image, then tried to convert it into qcow2, but qemu-img returned error:               File too large.      The generated VHD image file is about 15GB. **The file system I am working on is ext4.** So I do not think it is a file system limit issue.


title: substituting third occurrence of a pattern using sed

text: Here is a `sed` command. I want to substitute third occurrence of `00` to `11`               echo "0000000000000000" | sed -e 's/00/11/3'      The output is:               0000110000000000      But I thought output would be:               0011000000000000      first occurrence of `00`:               {00}00000000000000      second one:               0{00}0000000000000      and third one:               00{00}000000000000      Can someone explain what is happening?


title: Fedora 20 - wifi hotspot almost work but something wrong

text: I have a Sony Vaio notebook with WiFi, and need to setup a hotspot (an ad-hoc one) under Fedora 20. I successfully did it under Debian and SuSE, but under Fedora I am struggling to understand the basis of the system or something. I found two ways to configure a hotspot:   1. dhcp + hostapd   2. dnsmasq + hostapd Dnsmasq-way doesn't work for me - something errors and Android cannot see my new network. dhcp-way almost works - Android connects to the network, I have new IP, but something is wrong with dns resolve or masquerading, I don't know what. Android shows me a white WiFi icon and can't connect to the internet after a request timeout expires (to play.google for example). My wifi interface is wlp7s0 My internet connection is p5p1 Below I show my config and dhcp-way scripts.               # cat /etc/dhcp/dhcpd.conf     subnet 192.168.0.0 netmask 255.255.255.0 {             range 192.168.0.2 192.168.0.30;             option subnet-mask 255.255.255.0;             option domain-name-servers 8.8.4.4, 8.8.8.8;             option routers 192.168.0.1;     }               # cat /etc/hostapd/hostapd.conf     ctrl_interface=/var/run/hostapd     ctrl_interface_group=wheel     macaddr_acl=0     auth_algs=1     ignore_broadcast_ssid=0     # WPA & WPA2 support with a pre-shared key     wpa=3     wpa_key_mgmt=WPA-PSK     wpa_pairwise=TKIP     rsn_pairwise=CCMP     # WPA passphrase     wpa_passphrase=MYCOOLPASS     driver=nl80211     interface=wlp7s0     hw_mode=g     channel=11     ssid=NETNAME      Script to start hotspot (in manual mode):               systemctl stop NetworkManager.service     service dhcpd stop     service hostapd stop          sleep 1          ifconfig wlp7s0 192.168.0.1 netmask 255.255.255.0 up     sysctl net.ipv4.ip_forward=1     iptables -t nat -A POSTROUTING -o p5p1 -j MASQUERADE          sleep 1          service dhcpd start     service hostapd start      Any advice on how to get this to work?


title: How reliable of using "nameofmychoice="anyname""

text: For backup MySQL MyISAM database, I'm using:               backupdb=siteone     mysqldump -u root -pthepass --lock-tables --add-locks --disable-keys --skip-extended-insert --quick $backupdb > /var/www/html/db2.sql      Even after long time using it, I still dont know what is the name of using `nameofmychoice=anyname`. After typing `backupdb=siteone` I need to know how long it will kept in memory? If I running many lines of command which takes very long time, do I need to type `backupdb=siteone` again and again from time to time to regenerate the alias? Is using this way really safe for almost anything? I'm worried of data loss since I'm dealing with database.


title: OpenSSH, chroot user: Root needs to own the user directory, is there any consequence?

text: I want to create an account for my friend on my computer, but I don't want my friend to be able to view all my files. I saw that with OpenSSH, there is an option for that. Inside the SSHD configuration file:               /etc/ssh/sshd_config      With the line:               ChrootDirectory /home/%u      However, the user home directory needs to be owned by `root`. Is that a bad thing? Are there any consequences or repercussions if admin owns the directory? I tagged this question for 2 distributions and FreeBSD, since I use them all. I'm wondering if maybe the requirement of `root` owning the user home directory will be different between distributions and/or OS.


title: How to open a port early in boot process to unlock LUKS via SSH

text: I have a fully encrypted server running Debian 7 and have set up dropbear and busybox to unlock the LUKS container via SSH (as described in this tutorial and in this U&L answer). Unfortunately, whenever I try and SSH to the server (over the LAN) at reboot, I get a "Connection refused" error. I have tried `telnet` and `nmap` to the default port (22) and both say the port is closed. The server has a `ufw` rule to accept all traffic from the LAN:               Anywhere         ALLOW       192.168.1.0/24 I have tried changing the port that dropbear listens on in `/etc/defaults/dropbear` but `ssh` and `telnet` are still refused connections1. How can I ensure that a port is open at that stage in the boot process so that I can connect to unlock the LUKS container? Disabling the firewall makes no difference: `nmap` shows all ports still closed. ## Update 2/14 I added `break=premount` to the kernel line and had a poke around in the initramfs. `dropbear` has started, but the network is _not_ up at that point. After exiting, the network comes up and boot continues until the prompt to unlock the LUKS device. At this point, the network _is_ up, and the host has been assigned the correct IP address, but port 22 is still closed. The IP line in `/etc/initramfs-tools/intiramfs.conf` I am using is:               export IP=192.168.1.200::192.168.1.1:255.255.255.0::eth0:off Consistent with the directions in `/usr/share/doc/cryptsetup/README.remote.gz` I have tried just adding the device option, but that is not sufficient to bring the network up and obtain a dhcp lease.


title: Analyzing the behavior of a threaded program

text: Is there an application that will do what Threadscope or the parallel tools of Visual Studio does for multithreaded program analysis in Linux?


title: Remote BIOS update from current running Linux OS

text: Recently my bios vendor has updated some custom features for my OEM motherboard i have started updating in the sites. with a bootable USB device - AFUDOS OS : Debian 6 Since , I have sites located in different areas. what is the feasibility of performing BIOS update from remote location from LINUX OS Was just reading some alternatives: http://ubuntuforums.org/showthread.php?t=318789


title: Cannot login for one user, changing password have no effect

text: I have change the user's (user1) password using `root`               passwd user1      but when i tried to `ssh user@localhost` or through `gdm` or `tty` it always failed the `journalctl` log shows               Failed password for user1 from ::1      FAILED LOGIN 1 FROM tty3 FOR user1, Authentication failure     pam_unix(gdm-password:auth): conversation failed     pam_unix(gdm-password:auth): auth could not identify password for [user1]      I'm using fresh Arch Linux installation (64-bit)


title: How does Linux winbindd determine available domain controller?

text: We are actually in preparation of taking down one of our three domain controller (Win2k3). They are all serving the same domain. Actually we still see connections incoming from Debian (5/6/7) Servers using winbindd for domain authentication to the server we want to take down. /etc/krb5.conf on the debian hosts looks like this:               [libdefaults]             default_realm = DOMAIN.COM     [realms]             LOKAL.CMS-DIREKT.DE = {                     kdc = dc1.domain.com                     kdc = dc2.domain.com                     admin_server = dc1.domain.com                     default_domain = domain.com             }     [domain_realm]             .domain.com = DOMAIN.COM             domain.com = DOMAIN.COM          [login]             krb4_convert = true             krb4_get_tickets = false      So how does winbindd determine the available domain-controller(dc)? Is it done by Broadcasts, even if there are dc entries in krb5.conf?


title: Error compiling FTDI VCP drivers: Cannot find version.h

text: driver installation fails of FTDI VCP driver during `make install`. Running ElementaryOS with kernel 3.11.0-14-generic               make install     awk: cannot open /lib/modules/3.11.0-14-generic/build/include/linux/version.h     (No such file or directory)     awk: cannot open /lib/modules/3.11.0-14-generic/build/include/linux/version.h (No such file or directory)     install -d /lib/modules//misc     install -c ftdi.o /lib/modules//misc     install: cannot stat `ftdi.o': No such file or directory     make install      The directory exists and it has multiple files in it but no version.h. Update: After creating a symbolic link from `uapi` to `modules` as recommended by @slm `ln -s /usr/src/linux-headers-$(uname -r)/include/generated/uapi/linux/version.h` `/lib/modules/linux-($uname -r)/generic/build/include/linux/version.h` the `awk` errors disappear but the sytem still reports:               install -d /lib/modules//misc     install -c ftdi.o /lib/modules//misc     install: cannot stat `ftdi.o': No such file or directory


title: Expand Disk on VMware but no effect?

text: I have a Virtual Host (CentOS 6.4) running on VMware. Hard disk of this PC is 100GB but I want to expand it to 500GB. I tried to expand the Hard Disk (SCSI) to 500GB. It's ok, no errors. But another PC (Windows 7) connected to this PC (CentOS 6.4) via samba, just shows "9GB free of 100GB". It means the PC (CentOS 6.4) has not expanded the disk. I used an external HDD (500 GB) to run this PC (CentOS 6.4). What did I do wrong?   Did I missed something?


title: Compiling code from apue

text: Just now I have began reading the book: Advanced Programming in the UNIX® Environment. I wanted to try running its first code example. I am running Scientific Linux 6.4. I downloaded the source code and as it says in its README, I ran `make` in the uncompressed file. I wrote the first program (a mock `ls` command)               #include "./include/apue.h"     #include <dirent.h>          int     main(int argc, char *argv[])     {         DIR           *dp;         struct dirent *dirp;              if(argc!=2)             err_quit("usage: test directory_name");              if((dp=opendir(argv[1]))==NULL)             err_sys("Can't open %s", argv[1]);              while((dirp=readdir(dp))!=NULL)             printf("%s\n", dirp->d_name);              closedir(dp);         return 0;     }      and put it in the uncompressed file. As the book had advised I then ran: `gcc myls.c`. But I get this error:               # gcc myls.c     /tmp/ccWTWS2I.o: In function `main':     test.c:(.text+0x20): undefined reference to `err_quit'     test.c:(.text+0x5b): undefined reference to `err_sys'     collect2: ld returned 1 exit status      I wanted to know how I can fix this problem. I also want to be able to run a code I write in any directory, can anyone guide me on that too?


title: SCP files from machineB to machineA

text: I am trying to scp the files from `machineB` to `machineA`. I need to run the `scp command` from `machineA` to copy files from `machineB` to `machineA`. The file that I need to copy from machineB is -               /bat/data/snapshot/5.data      And where I need to copy the file into machineA is -               /data01/primary      in which I have root access as well and `/data01/primary` has only root credentials. Below is the `ls -lt` on `machineA`               david@machineA:/$ ls -lt          drwxr-xr-x   3 root root  4096 Nov  7 17:43 data02     drwxr-xr-x   3 root root  4096 Nov  7 17:42 data01     drwxr-xr-x   4 root root  4096 Nov  7 17:26 opt      So I was trying the below scp command on machineA to copy the files -               scp david@machineB:/bat/data/snapshot/5.data root@machineA:/data01/primary      but I am always getting -               Host key verification failed.      I do have root access to machineA but not root access to machineB. And I can ping machineB from machineA as well. And both machines are in production domain as well.


title: Fdisk cannot read size of this disk is 4.0 TB under RAID-0 enviroment

text: I have server from OVH data center , I have Two SATA Hard Disk Drive , each Disk Size 2.0 T.B , I have RAID controller card but I convert the RAID-1 to RAID-0 through OVH Rescue mode and here is the result 1 volume is active, 2 physical disks are active               Volume 0 is Bus 0 Target 0, Type IS (Integrated Striping)       Volume Name:       Volume WWID:  00953d9517ee4ae9       Volume State:  optimal, enabled       Volume Settings:  write caching enabled       Volume draws from Hot Spare Pools:  0 1 2 3 4 5 6 7       Volume Size 3815156 MB, Stripe Size 64 KB, 2 Members       Member 0 is PhysDisk 1 (Bus 0 Target 2)       Member 1 is PhysDisk 0 (Bus 0 Target 1)      After I install OS through OVH Control panel , the capacity not showing the actual size of the two hard disk which it suppose to be 4.0 T.B but it shows only 2.0T.B , this is normal because the OVH installation using `fdisk` through the OS setup Here is the output from `fdisk -l` command               WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.               WARNING: The size of this disk is 4.0 TB (4000481017856 bytes).     DOS partition table format can not be used on drives for volumes     larger than 2.2 TB (2199023255040 bytes). Use parted(1) and GUID     partition table format (GPT).               Disk /dev/sda: 4000.4 GB, 4000481017856 bytes     255 heads, 63 sectors/track, 486364 cylinders     Units = cylinders of 16065 * 512 = 8225280 bytes             Device Boot      Start         End      Blocks   Id  System     /dev/sda1               1      267350  2147483647+  ee  EFI GPT      this is on `/dev/sda` drive and that contain the system and data, if I use to re-partition by parted to fix the size and GPT problem I have to delete the data then I install again through control panel then I will have the same problem , I don't have kvm or anything else to install the system by my custom partition I made through the rescue mode How can I solve this problem without format or delete the data on the hard disk by fixing the size and continue to partition the rest of space by using any program ?


title: Accidentally reformatted /dev/sda1 - any hope for recovery?

text: All day today, I've been reformatting a USB flash drive repeatedly and I was doing this multiple times in a row, and I began to grow a little too careless... Without paying attention, I accidentally reformatted my /dev/sda1 in the GNOME _Disks_ manager utility in Fedora. I didn't overwrite all the data with 0s, but instead just did the quick rewrite. After rebooting, my mistake was made clear when my laptop immediately booted into rescue grub mode. :( Is there any hope for recovery? I know /dev/sda1 was 512MB, so I think my actual data is safe and fine, on /dev/sda2. But is there a way I can get Fedora to successfully reboot again? Any and all help is appreciated.


title: xargs inside a for loop

text: So we got most of it figured out but here's what happens.               for i in $(arp |sort |awk '{print $1}'|grep IPADDRESS)     do     ssh USERNAME@$i "ps -ef |grep X11|grep -v grep |awk '{print $2}'|xargs kill"     done          kill: USERNAME: invalid process id      I've SSH'd using the username I'm using for the loop and ran `ps -ef | grep X11| grep -v grep | awk '{print $2}'| xargs kill` just fine but it looks like xargs is picking up the username instead of whats being printed. Any thoughts?


title: Curl. Check redirect

text: Lets suppose that we have 3 links: link1, link2, link3. link1 redirects to link2 and link2 redirects to link3. So how to see that with curl?


title: What this page means for the Debian's package version

text: I am trying to figure out what these web page means for the version. I know that the epoch is the number previous the double dot. But I can't figure out what this all means ? ![enter image description here](http://i.stack.imgur.com/QHkCQ.png) I found this here


title: How can I avoid mangling arguments with spaces in Exim's ${run{...}} expansion?

text: I have a program, `/usr/local/bin/rt_queue_exists`, which takes one argument. If the argument smells good, the program exits with status 0; non-zero otherwise. I want a router that accepts messages only if the local part smells good, according to this program. Further, this program relies on a configuration file which is readable only by root and www-data, so I thought I'd configure sudo to allow `rt_queue_exists` to be invoked as www-data by Exim. Thus, I came up with this in my router options:               condition = ${run{/usr/bin/sudo -u www-data /usr/local/bin/rt_queue_exists $local_part}{yes}{no}}      It works, usually, except when there's a space in the local part (yes that's allowed). When there's a space in the local part, `rt_queue_exists` is invoked with _two_ arguments. This is bad because:   * some of my queue names have spaces in them   * if I can alter the command with spaces, can I perform more serious injection attacks? There is a similar problem in bash:               cat $file   # BAD! NO!     cat "$file" # good!      What's the analogous solution in exim?


title: Upgrade okular in debian wheezy

text: I have okular version 0.14.3 with KDE 4.8.4. I use debian wheezy and I dont know how I can upgrade to 0.15 version of okular.


title: Route SSH to host through interface

text: Is it possible to route all outgoing requests for SSH (port 22) to `mydynamicdns.afraid.org` via `wlan0` instead of `eth0` when both are connected? Since my IP is dynamic, I would like to use a name instead of IP.


title: Getting internet to Linux VM without being detected by Network

text: I'm trying to get internet to a Linux VM (Backtrack 5 on VMWare Workstation). Unfortunately I was told to not "bridge" the connection from the VM because it could be detected by our companies network admins. Our company has a firewall and proxies for normal web browsing. I can get around it by ssh tunneling to a linux server (putty + ssh) Is there a way I can get my Linux VM to have internet connection via SSH/Putty tunneling without it being detected on our corporate network? I'm not sure if I need to bridge my VM and change some settings on the Linux VM or if I need to alter VMWare somehow to grant internet to VMs via tunneling...? Would appreciate any areas topics I should read into or any lead I can take to get accomplish this.


title: How to use scp and ssh command in a single script without any keys?

text: How to use `scp` and `ssh` command in a same script? First I have to copy one file from my local server to remote. Then from local server itself, I have to check the size of the copied file.


title: How do I make www-data run vim command (and find plugins)

text: I use the vimwiki plugin for note taking, and for those rare cases when I can't reach my home server over ssh, I use a simple html-form to update the textfiles. In vimwiki there is a command to export the textfiles to html-files and I want to trigger that command from the html-form. The setup: Lighttpd, a python script that calls a shell-script using os.system(). The shell script contains the following lines:               #!/bin/bash     vim -c ":e wiki/index.wiki" -c ":VimwikiAll2HTML" -c ":q"      which should generate the html-files. But I get this output (in the web browser):               wiki/index.wiki" [dos] 13L, 227C     Error detected while processing command line:     E492: Not an editor command: :VimwikiAll2HTML     E138: Can't write viminfo file $HOME/.viminfo!      Tested to log in as www-data (after setting password) and ran the same line and it works as expected (i.e. as I want it to). Back to running the script from a web browser I also noticed that environment varibles (like $HOME) aren't set, so my guess is that I am missing some login-script but I can't get it right. What am I missing? Is there a better way to accomplish what I want to do? Solved: see sporticvs answer


title: How to avoid overwriting existing files while using tar command?

text: The **tar** command just overwrote my file an hour ago while I was trying to make a tar to backup it. I ran               tar zcvf foo.tex foo.bib      and after that my tex source file lost. What's worse, this is the second time I lost my file in this way. I use gvim, but 'u' command can recover my file. After browsing some help entries about 'backup', 'undofile', I just can not find a way to avoid tar command from overwriting my file again. Then I try to find a parameter like '-i' from **cp** or **mv** , but among the many parameters of **tar** I can't find one. I wonder how can I avoid this kind of things happening again, for I am a little unconfident about remembering to add the new foo.tar thing that I always forget next time.


title: Prevent creating directories but allow creating files

text: I have a directory shared through Samba. I want users to be able to create/modify/delete files but not create/erase directories. I haven't found a way to do it. Maybe with SELinux? But how?


title: Incrementing a variable each time the system boots up

text: The idea is to initialize a variable and set it to 0. Then create a script that executes on boot and increments that variable by 1 each time the system boots up again. Sounds simple enough right?


title: How to run gnukhata software in ubuntu 12.04

text: I have tried to install GNUKhata in ubuntu 12.04, but it's not successfull. Requirements : i) Download gnukhata1.2 software from gnukhata.org, ii)python2.7 (default in 12.04), then installed postgresql and nginx (Refer www.gnukhata.org ) Now run in browser to open the GNUKHATA first page then enter organization name and company detailed address, then its save to not working. The screenshots will be described as follows : (last page will be error) ![enter image description here](http://i.stack.imgur.com/Hg1lH.png) ![enter image description here](http://i.stack.imgur.com/FuZFM.png) ![enter image description here](http://i.stack.imgur.com/0Ud5P.png) ![Error page](http://i.stack.imgur.com/KU2FX.png)


title: Save entire process for continuation after reboot

text: I developed an algorithm for a fairly hard problem in mathematics which is likely to need several months to finish. As I have limited resources only, I started this on my Ubuntu 12.04 (x86) laptop. Now I want to install some updates and actually restart the laptop (the "please reboot" message is just annoying). Is there a way to save an entire process including its allocated memory for continuation beyond a reboot? Here is some information about the process you might need. Please feel free to ask for further information if needed.   * I called the process in a terminal with the command "`./binary > ./somefile &`" or "time ./binary > ./somefile &", I cannot really remember.   * It's printing some debug information to std::cerr (not very often).   * It's currently using roughly 600.0 kiB and even though this will increase, it's unlikely to increase rapidly.   * the process runs with normal priority   * the kernel is 3.2.0-26-generic-pae, the cpu is an AMD, the operating system is Ubuntu 12.04 x86.   * it runs since 9 days and 14 hours (so too long to cancel it ;-) )


title: configure gsm connection using nmcli

text: I have a system without X display and I want to use `nmcli` to configure my cell modem to connect to a certain apn. I can get it going with this modem just fine on Ubuntu (with X) and I would like to achieve the same now on the command line. How can I setup the connection? so far I get this:               # nmcli dev status          ** (process:2379): WARNING **: Could not initialize NMClient /org/freedesktop/NetworkManager: Permissions request failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.PolicyKit1 was not provided by any .service files     DEVICE     TYPE              STATE             ttyUSB1    gsm               disconnected      eth0       802-3-ethernet    connected


title: Resin Server - Can't install into Eclipse kepler

text: I'm using CentOS 6.4. I have downloaded Resin server from the this official website. I have the folder in /home/admin/. I followed this site for adding resin server into Eclipse. but couldn't able to see resin option. Is there any way to add resin server into Eclipse. ?


title: Files missing from NTFS drive and drive is split into many

text: Using kali linux 1.0 in dual boot with windows 8. I have an NTFS partition (D: on windows) I usually mount it on both OS. I face the following problem 1. cannot access some folders in NTFS partition. (unable to see them on linux but works fine with windows). I don't face any errors while mounting it. also my /media directory shows 3 files with same name which represent my D: (ntfs drive m talking about) here is output of `ls` command in `/media` directory               root@code:/media# ls     01CD1F0FE77B9960   01CD1F0FE77B9960__  cdrom0       usb   usb1     01CD1F0FE77B9960_  cdrom               truecrypt11  usb0      01CD1F0FE77B9960 is the NTFS partition. How can i get rid of this?


title: Broadcast or send machine readable code to ssh clients

text: Here's an interesting situation. I have:   * A Linux box that is a motion sensor and can execute command line commands upon receiving a motion event (see the Linux motion app).   * Another Linux box that (I would like to) dedicated to additional processing in the event that a motion is detected. The reason I don't want the first Linux box to do additional processing is that it is woefully underpowered and isn't conveniently connected to other systems that I'd like to activate. So my question is, how do I broadcast or send **machine readable code** from that first Linux box to another Linux box (or any ssh client) to trigger further processing based on the type of code? I tried the broadcast command but for some reason, it shows up as empty in the clients instead of a specific code. In addition, how do I enable the 2nd Linux box to act upon the code? Should it be a cronjob or some sort of listener?


title: Sometimes don't have permission to create new folders on an NTFS partition in Evince

text: My hard drive has an NTFS partition mounted under Ubuntu 12.04. I use Evince as the default application to open PDF files downloaded under Firefox. I often save copies of PDF files opened in Evince to the NTFS partition, and before that, I would like to create new folders in the NTFS partition, for where the PDF files will be saved, by hitting "Save a Copy ..." and "Create Folder" under Evince. Sometimes new folders in the NTFS partition could not be created using the above way in Evince, for the reason of "Error creating directory: Permission denied", and alternatively, I have to create new folders under Nautilus before I can save copies of PDF files into them under Evince. This is troublesome, because I can't create new folders and save PDF files both under Evince. But the problem doesn't always happen, and sometimes I can be permitted to create new directories in the NTFS partition under Evince. So I wonder why the problem happens and what I can do to solve the problem?


title: Stanford's StanfordCPPLib on Linux

text: I'm using SUSE Linux 13.1 and self studying Stanford's CS 106B course. Here I have found the following `zip` file, cs106b-hw2-ngrams-starter-files.zip, and downloaded. ### Now questions   1. This libs are for Windows, so some changes will be needed to make them work correctly in Linux. What changes?   2. Where to put this folder, so that `gcc` compiler could automatically find this libs?


title: Why doesn't yum list anything?

text: In a Kubuntu I installed yum.               ~$ sudo apt-get install yum                                                                                [sudo] password for jim:        Reading package lists... Done       Building dependency tree            Reading state information... Done       The following extra packages will be installed:         debugedit liblua5.2-0 librpm3 librpmbuild3 librpmio3 librpmsign1 libsqlite0 python-libxml2 python-rpm python-sqlite python-sqlitecachec python-urlgrabber rpm rpm-common rpm2cpio       Suggested packages:         rpm-i18n python-sqlite-dbg alien elfutils       The following NEW packages will be installed:         debugedit liblua5.2-0 librpm3 librpmbuild3 librpmio3 librpmsign1 libsqlite0 python-libxml2 python-rpm python-sqlite python-sqlitecachec python-urlgrabber rpm rpm-common rpm2cpio yum       0 upgraded, 16 newly installed, 0 to remove and 320 not upgraded.       Need to get 1965 kB of archives.       After this operation, 7550 kB of additional disk space will be used.       Do you want to continue [Y/n]? Y       Get:1 http://nl.archive.ubuntu.com/ubuntu/ saucy/main liblua5.2-0 amd64 5.2.2-1 [95,7 kB]       Get:2 http://nl.archive.ubuntu.com/ubuntu/ saucy/main librpmio3 amd64 4.11.1-2 [80,8 kB]     Get:3 http://nl.archive.ubuntu.com/ubuntu/ saucy/main debugedit amd64 4.11.1-2 [16,9 kB]     Get:4 http://nl.archive.ubuntu.com/ubuntu/ saucy/main librpm3 amd64 4.11.1-2 [184 kB]     Get:5 http://nl.archive.ubuntu.com/ubuntu/ saucy/main librpmbuild3 amd64 4.11.1-2 [66,2 kB]       Get:6 http://nl.archive.ubuntu.com/ubuntu/ saucy/main librpmsign1 amd64 4.11.1-2 [9074 B]       Get:7 http://nl.archive.ubuntu.com/ubuntu/ saucy/universe libsqlite0 amd64 2.8.17-8fakesync1 [188 kB]       Get:8 http://nl.archive.ubuntu.com/ubuntu/ saucy/main python-libxml2 amd64 2.9.1+dfsg1-3ubuntu2 [192 kB]       Get:9 http://nl.archive.ubuntu.com/ubuntu/ saucy/universe python-sqlite amd64 1.0.1-9 [32,4 kB]       Get:10 http://nl.archive.ubuntu.com/ubuntu/ saucy/main python-urlgrabber all 3.9.1-4ubuntu2 [48,5 kB]       Get:11 http://nl.archive.ubuntu.com/ubuntu/ saucy/main rpm-common amd64 4.11.1-2 [25,1 kB]       Get:12 http://nl.archive.ubuntu.com/ubuntu/ saucy/main rpm2cpio amd64 4.11.1-2 [5740 B]       Get:13 http://nl.archive.ubuntu.com/ubuntu/ saucy/main rpm amd64 4.11.1-2 [135 kB]       Get:14 http://nl.archive.ubuntu.com/ubuntu/ saucy/universe python-rpm amd64 4.11.1-2 [43,0 kB]       Get:15 http://nl.archive.ubuntu.com/ubuntu/ saucy/universe python-sqlitecachec amd64 1.1.4-1 [21,4 kB]       Get:16 http://nl.archive.ubuntu.com/ubuntu/ saucy/universe yum all 3.4.3-2ubuntu1 [821   kB]       Fetched 1965 kB in 1s (1537 kB/s)       Selecting previously unselected package liblua5.2-0:amd64.       (Reading database ... 112109 files and directories currently installed.)       Unpacking liblua5.2-0:amd64 (from .../liblua5.2-0_5.2.2-1_amd64.deb) ...       Selecting previously unselected package librpmio3.       Unpacking librpmio3 (from .../librpmio3_4.11.1-2_amd64.deb) ...       Selecting previously unselected package debugedit.       Unpacking debugedit (from .../debugedit_4.11.1-2_amd64.deb) ...       Unpacking librpm3 (from .../librpm3_4.11.1-2_amd64.deb) ...       Selecting previously unselected package librpmbuild3.       Unpacking librpmbuild3 (from .../librpmbuild3_4.11.1-2_amd64.deb) ...       Selecting previously unselected package librpmsign1.       Unpacking librpmsign1 (from .../librpmsign1_4.11.1-2_amd64.deb) ...        Selecting previously unselected package libsqlite0.        Unpacking libsqlite0 (from .../libsqlite0_2.8.17-8fakesync1_amd64.deb) ...       Selecting previously unselected package python-libxml2.       Unpacking python-libxml2 (from .../python-libxml2_2.9.1+dfsg1-3ubuntu2_amd64.deb) ...       Selecting previously unselected package python-sqlite.       Unpacking python-sqlite (from .../python-sqlite_1.0.1-9_amd64.deb) ...        Selecting previously unselected package python-urlgrabber.       Unpacking python-urlgrabber (from .../python-urlgrabber_3.9.1-4ubuntu2_all.deb) ...       Selecting previously unselected package rpm-common.       Unpacking rpm-common (from .../rpm-common_4.11.1-2_amd64.deb) ...       Selecting previously unselected package rpm2cpio.       Unpacking rpm2cpio (from .../rpm2cpio_4.11.1-2_amd64.deb) ...       Selecting previously unselected package rpm.       Unpacking rpm (from .../rpm_4.11.1-2_amd64.deb) ...       Selecting previously unselected package python-rpm.       Unpacking python-rpm (from .../python-rpm_4.11.1-2_amd64.deb) ...       Selecting previously unselected package python-sqlitecachec.       Unpacking python-sqlitecachec (from .../python-sqlitecachec_1.1.4-1_amd64.deb) ...       Selecting previously unselected package yum.       Unpacking yum (from .../yum_3.4.3-2ubuntu1_all.deb) ...       Processing triggers for man-db ...       Setting up liblua5.2-0:amd64 (5.2.2-1) ...       Setting up librpmio3 (4.11.1-2) ...       Setting up debugedit (4.11.1-2) ...       Setting up librpm3 (4.11.1-2) ...       Setting up librpmbuild3 (4.11.1-2) ...       Setting up librpmsign1 (4.11.1-2) ...       Setting up libsqlite0 (2.8.17-8fakesync1) ...       Setting up python-libxml2 (2.9.1+dfsg1-3ubuntu2) ...       Setting up python-sqlite (1.0.1-9) ...       Setting up python-urlgrabber (3.9.1-4ubuntu2) ...       Setting up rpm-common (4.11.1-2) ...       Setting up rpm2cpio (4.11.1-2) ...       Setting up rpm (4.11.1-2) ...       Setting up python-rpm (4.11.1-2) ...       Setting up python-sqlitecachec (1.1.4-1) ...       Setting up yum (3.4.3-2ubuntu1) ...       Processing triggers for libc-bin ...       But when I do a list nothing is output. Does yum list what yum installed?               :~$        :~$ yum list installed       :~$         But when I do:               :~$ yum provides /etc/yum/yum.conf                                                                                No Matches found        Still nothing found. Why does the yum does not list anything?


title: iperf gives wrong output

text: I ran iperf on Windows and Linux machine to check bandwidth speed. Windows bandwidht speed, I explicitly set to 10Mbps/Full and Linux's BW speed is 100Mbps/Full. Following is the strange output I got: Client Side ( Linux Box ):               iperf -c 192.168.1.72 -r     Server listening on TCP port 5001     TCP window size: 85.3 KByte (default)     Client connecting to 192.168.1.72, TCP port 5001     TCP window size: 16.0 KByte (default)     [  5] local 192.168.1.70 port 52358 connected with 192.168.1.72 port 5001     [ ID] Interval       Transfer     Bandwidth     [  5]  0.0-10.2 sec  11.6 MBytes  **9.60 Mbits/sec**     [  4] local 192.168.1.70 port 5001 connected with 192.168.1.72 port 1334     [  4]  0.0-10.1 sec  11.2 MBytes  **9.34 Mbits/sec**      And on server side ( Windows Box ):               iperf.exe -s     Server listening on TCP port 5001     TCP window size: 64.0 KByte (default)     [  4] local 192.168.1.72 port 5001 connected to 192.168.1.70 port 52358     [ ID] Interval Transfer Bandwidth     [  4] 0.0-10.4 sec 11.6 MBytes **9.40 Mbits/sec**     Client connecting to 192.168.1.70 port 5001     TCP window size: 64.0 KByte (default)     [  4] local 192.168.1.72 port 1334 connected with 192.168.1.70 port 5001     Waiting for server threads to complete. Interrupt again to force quit.     [  4] 0.0-10.1 sec 11.2 MBytes **9.35 Mbits/sec**      I don't understand this difference between output


title: renaming a directory and its subdirs without affecting their files

text: I have to rename directories under the root directory with prefix "ms_PF" and then rename their subdirectories with the modified name of the main directory with an extra "_", and then copy all directories and their subs to root as follows:               root        maindir1        maindir2                subdir1                subdir2                subdir3      maindir1 and maindir2 to be renamed with prefix "ms_PF_" and copied direct to root, because maindir2 has subdirectories they will carry the new name of maindir2 which is ms_PF_maindir2 plus and underscor (_) then all subs will be copied to root as follows:               ms_PF_maindir1     ms_PF_maindir2_subdir1     ms_PF_maindir2_subdir2     ms_PF_maindir2_subdir3      Assistance in this matter is highly appreciated. My attempted solution is something like this, but it actually needs fixing:               root_dir="/dwn/icbu_dwn/LL"     prefix="ms_PF_"     do_it () {     awk '{ print "mv $root_dir $prefix ${root_dir/\//_}" }' | sh     }     find "$root_dir" -depth -type d | do_it


title: Why do I get "authentication" errors on this "Open" configuration?

text: I have the following `ifcfg-wlan0` file:               DEVICE=wlan0     BOOTPROTO=none     ONBOOT=yes     IPADDR=192.168.5.1     NETMASK=255.255.255.0     NETWORK=192.168.5.0     NAME=wlan0     USERCTL=no      the following `dhcpd.conf` file:               DHCPDARGS=wlan0;     default-lease-time 600;     max-lease-time 7200;     authoritative;          subnet 192.168.5.0 netmask 255.255.255.0 {       range 192.168.5.10 192.168.5.200;     }      the following `hostapd.conf` file:               ctrl_interface=/var/run/hostapd     ctrl_interface_group=wheel          macaddr_acl=0     auth_algs=1     ignore_broadcast_ssid=0          driver=nl80211     interface=wlan0     hw_mode=g     channel=1     ssid=HOTSPOT      The SSID:HOTSPOT shows up on my device as 'Open' but when it tries to connect I get "authentication error". I've tried from several devices, with the same results. It seems on the surface that it is a hostapd config problem. Is it possible it is a problem with my dhcpd or my interface config?


title: Compose and pipe a gzipped tar archive in one go

text: I'm trying to come up with an effective way to create a gzipped archive of various system partitions on Android, piping everything out to stdout so as to be able to encrypt it as it comes across via `gpg`. The workflow looks like this:               adb shell "/data/dobackup.sh" | gpg --output suchbackup.tar.gz.gpg --encrypt --sign --recipient me@myemail.com      The shell script needs to basically do this:               cat /dev/block/platform/msm_sdcc.1/by-name/recovery > recovery.img     cat /dev/block/platform/msm_sdcc.1/by-name/system > system.img     ...      However, as seen, I'd like to do this whole thing over an adb shell execution so that everything is transferred over USB, into memory, and quickly is encrypted then written to disk, ie leaving no unencrypted trace. The problem I'm having is that I'm not sure how to manufacture the internals of the script into a tar.gz file composed of multiple files/sources. Basically, I'm looking to output a tar.gz file from stdout from this script which includes the following files inside:               /recovery.img     /system.img     /userdata.img     /cache.img     /...      Is there any way I can do this? I haven't encountered a problem like this in my travels so far.


title: how to suspend other nonrelated processes to allow a proces in interest to occupy the CPU?

text: Is it possible to   * first find out what processes are necessary to run a process in interest, and    * then suspend all other unrelated processes to allow the process in interest to use the CPU as much as possible   * when the process in interest finishes running, resume the suspended processes? For example, a process in interest is djview Thanks.


title: Same file, different filename due to encoding problem?

text: I was about to diff a backup from it's source to manually verify that the data is correct. Some chars, like åäö, is not shown correctly on the original data but as the clients (over samba) interpret it correctly it's nothing to worry about. The data restored from backup shows the chars correctly, leading diff to not consider them to be the same files (with diffs, but rather completely different files). md5 sums, same file but different name.               # md5sum /original/iStock_000003637083Large-barn*     e37c34968dd145a0e25692e1cb7fbdb1  /original/iStock_000003637083Large-barn p? strand.jpg          # md5sum /frombackup/iStock_000003637083Large-barn*     e37c34968dd145a0e25692e1cb7fbdb1  /frombackup/iStock_000003637083Large-barn på strand.jpg      Mount options and filesystems               /dev/sdb1 on /original type ext4 (rw,noatime,errors=remount-ro)     /dev/sdc1 on /frombackup type ext4 (rw)      Locale               LANG=sv_SE.UTF-8     LANGUAGE=     LC_CTYPE="sv_SE.UTF-8"     LC_NUMERIC="sv_SE.UTF-8"     LC_TIME="sv_SE.UTF-8"     LC_COLLATE="sv_SE.UTF-8"     LC_MONETARY="sv_SE.UTF-8"     LC_MESSAGES="sv_SE.UTF-8"     LC_PAPER="sv_SE.UTF-8"     LC_NAME="sv_SE.UTF-8"     LC_ADDRESS="sv_SE.UTF-8"     LC_TELEPHONE="sv_SE.UTF-8"     LC_MEASUREMENT="sv_SE.UTF-8"     LC_IDENTIFICATION="sv_SE.UTF-8"     LC_ALL=      od -c               # ls "/original/iStock_000003637083Large-barn p� strand.jpg" | od -c     0000000   /   v   a   r   /   w   w   w   /   m   e   d   i   a   b   a     0000020   n   k   e   n   _   i   m   a   g   e   s   /   k   u   n   d     0000040   i   d   8   0   /   _   B   a   r   n   /   i   S   t   o   c     0000060   k   _   0   0   0   0   0   3   6   3   7   0   8   3   L   a     0000100   r   g   e   -   b   a   r   n       p 345       s   t   r   a     0000120   n   d   .   j   p   g  \n     0000127               # ls "/frombackup/iStock_000003637083Large-barn på strand.jpg" | od -c     0000000   /   d   a   t   a   /   v   a   r   /   w   w   w   /   m   e     0000020   d   i   a   b   a   n   k   e   n   _   i   m   a   g   e   s     0000040   /   k   u   n   d   i   d   8   0   /   _   B   a   r   n   /     0000060   i   S   t   o   c   k   _   0   0   0   0   0   3   6   3   7     0000100   0   8   3   L   a   r   g   e   -   b   a   r   n       p 303     0000120 245       s   t   r   a   n   d   .   j   p   g  \n     0000135


title: Using curl sequences without knowing the ending point

text: Is there a way in curl to use sequences but not give it a maximum value? So that it will download everything from the start of the sequence up? For example: > curl ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.[548-*] or something like that?


title: Help with understanding a regular expression

text: I have this regular expression `\\\\..\\\\{3\\\\}$` I want to understand how this expression works to match a string. My thought is that it matches any 8 characters at the end of the line. Is that how this expression works? If so, I think something like this would match the string: `rs.efg$tu`


title: Find directories that do not contain subdirectories

text: I'm writing script is ksh. Need to find all directory names directly under the current directory which contain only files, not subdirectories. I know that I could use `ls -alR` and recursively parse output for the first letter in the first field (`d` for a directory). I think `awk` is the best way to parse and find but I'm a little confused with it. Please help!! For example, a simple `ls -al` output in the current directory:                  drwxr-xr-x  22 af      staff    748 18 Mar 22:21 .        drwxr-xr-x   5 root    admin    170 17 Mar 18:03 ..        -rw-------   1 af      staff      3 17 Mar 16:37 .CFUserTextEncoding        drwxr-xr-x   5 af      staff    170 17 Mar 17:12 Public        drwxr-xr-x   9 af      staff    306 18 Mar 17:40 Sites        -rw-------   1 af      staff      3 17 Mar 16:37 textd        …      There are 2 directories in this output: `Public` and `Sites`. The directory `Public` doesn't contain subdirectories, but `Sites` does. There are 3 subdirectories in `Sites`. So I need to echo only the directories which don't contain directories in them. In my case, this is only `Sites`.


title: Invoke a command/script disconnected from the controlling terminal?

text: I'm investigating the behaviour of a script that is normally run as an automated process (e.g. cron, Jenkins). The script can (eventually) invoke commands that behave differently (seeking user input) when run interactively; for example, `patch` will ask what to do with a reversed patch, and `svn` will ask for passwords, but I need to see what happens when they're run non- interactively. Persuading `patch` that it's non-interactive is fairly easy; I just need to redirect `stdout` to be a non-tty:               $ </dev/null > >(cat) /path/to/myscript --args      However `svn` will connect to the controlling terminal if it exists; editing the scripts to pass `\--non-interactive` isn't really an option as this is coming from several levels deep and it'd be difficult to be certain I'd found every invocation. Is there a way to invoke a script/command non-interactively, without a controlling terminal (so that `/dev/tty` doesn't exist)? I'd prefer stdout/stderr to still go to my terminal. (I found the question Run script in a non interactive shell? but the answers to that discuss the differences between the cron and user environment; I've already eliminated all differences except non-interactivity.)


title: vnc connection working with PuTTY but not with command line

text: I am using PuTTY to connect to a distant network to then set up x11vnc and then using ssl/sshvnc as a client. in the host name for PuTTY I have: ssh.inf.uk and port: 22 in the ssh tunnel options I have source port set to: 5910 and destination: markinch.inf.uk Then putty brings up an xterm and I am prompted for my username and password. I get to the common gateway machine and do               ssh markinch      then I set up the x11vnc server               x11vnc -ssl -usepw -rfbport 5910 -create -geometry 1200x800      I use ssl/ssh vnc viewer with the verify certs off and host port set to, localhost:10 and put the password, and connect fine. ---Now I want to bypass usuing PuTTY, and do the ssh connection via command line. So I do                ssh -L localhost:5910:ssh.inf.uk:5910 vass@ssh.inf.uk      which brings me into the gateway machine, then I need to log into a specific desktop                ssh -L localhost:5910:markinch.inf.uk:5910 markinch      Then I set up the x11vnc server,               x11vnc -ssl -usepw -rfbport 5910 -create -geometry 1200x800      then I use ssl/ssh vnc viewer with verify certificates off, localhost:10, and with the password in, and get: PORT=5910               SSLPORT=5910          channel 3: open failed: connect failed: Connection refused      What is putty doing so different? Best,


title: Show jobs count only if it is more than 0

text: I have a `jobscount()` function:               jobscount() {        local stopped='$(jobs -s | wc -l | tr -d " ")'        local running='$(jobs -r | wc -l | tr -d " ")'        echo -n "${running}r/${stopped}s"     }      I use this function in my `$PS1`:               PS1=" \w $(jobscount) \$ "      The only problem is if there is no background process running or there is no stopped jobs, this function uselessly occupies `$PS1` space. What I want is if either of the `stopped` or `running` value is more than `0`, **only then** it shows up.


title: Can I use APT on TinyCore?

text: Will tinyCore let me use APT? I am looking forward to use a very light version of Linux on a netbook or something. For the last few years I been using Linux Mint and I like it, but I am getting tired of it, since it is too big to my taste now, and I want an easier, faster and more lightweight one, however I am used to apt-get in Ubuntu and Debian. I only use my computers for coding and web development stuff, so I don't wanna get my hands dirty on a Linux stuff for long, all I need is a lightweight OS that doesn't look stupid and big, vim and a browser to test... however APT is important to me, will it work with TinyCore or something similar?


title: Can't connect to WLAN with netctl

text: I can't connect to a WiFi network. I tried various methods such as `wpa_supplicant` and `wicd`. At the moment I'm trying `netctl`. When I enter the command: `systemctl --type=service` I see the following errors: ![enter image description here](http://i.stack.imgur.com/8lEHZ.png) **netctl start wireless-home**               Job for netctl@wireless\x2dhome.service failed. See 'systemctl status     netctl@wireless\x2dhome.service' and 'journalctl -xn' for details.      This is the profile file for `wireless-home`:               Description='A simple WPA encrypted wireless connection'     Interface=wlan0     Connection=wireless     Security=wpa     IP=dhcp     ESSID='Pruthenia 3.OG'     Key='XXXXXXXXXX'      **systemctl status netctl@wireless\x2dhome.service**               netctl@wirelessx2dhome.service - Networking for netctl profile wirelessx2dhome      Loaded: loaded (/usr/lib/systemd/system/netctl@.service; static)      Active: inactive (dead) Docs: man:netctl.profile(5)      **journalctl -xn output -->**               Dec 12 08:01:01 webcampi CROND[2765]: pam_unix(crond:session): session closed for user root     Dec 12 09:01:01 webcampi crond[3490]: pam_unix(crond:session): session opened for user root by (uid=0)     Dec 12 09:01:01 webcampi CROND[3491]: (root) CMD (run-parts /etc/cron.hourly)     Dec 12 09:01:01 webcampi CROND[3490]: pam_unix(crond:session): session closed for user root     Dec 12 10:01:01 webcampi crond[4216]: pam_unix(crond:session): session opened for user root by (uid=0)     Dec 12 10:01:01 webcampi CROND[4217]: (root) CMD (run-parts /etc/cron.hourly)     Dec 12 10:01:01 webcampi CROND[4216]: pam_unix(crond:session): session closed for user root     Dec 12 11:01:01 webcampi crond[4941]: pam_unix(crond:session): session opened for user root by (uid=0)     Dec 12 11:01:01 webcampi CROND[4942]: (root) CMD (run-parts /etc/cron.hourly)     Dec 12 11:01:01 webcampi CROND[4941]: pam_unix(crond:session): session closed for user root      How can I fix this?


title: How do I remove every file that has x in its title?

text: I have a lot of directory where there are hundreds of files. In every directory there are pairs of my_file-01.jpg and my_file-€01.jpg I want to remove every file that contains € sign in its title: how to do that?


title: Searching a pattern in file names with number

text: I have a large number of files in a folder each with the date as the filename.   For example               20130101     20130102     20130103     .     .     .     20130131      similarly for other months 20130201 to 20130230, the pattern is [Year][Month][Day]. I need to make a tar file of the first fifteen files from JAN to APRIL (i.e `2013[01-04][01-15]`), since double digit number range is not allowed in `grep`. How should I search this pattern?


title: How do I find a command if I don't know its name?

text: As a Unix beginner, I often find myself wanting to know the name of the command that achieves a particular function I'm after. How can I go about finding out the name of the command, given a description of what it does?


title: tmux disable confirmation prompt on kill-window

text: I've looked through the man pages so this might be asking in vain. I get annoyed at the confirmation message for kill-window (`Ctrl-b &` or `Ctrl-b kill-window` on the default setup). This always gives: > Confirm 'kill-window'? (y/n) Personally, I would essentially never hit `Ctrl-b &` unintentionally. Is there any way to disable this prompt, or prompts in general in tmux?


title: Bash Script To Find Debian Release Number from /etc/debian_version

text: The following is what I'm currently using for testing the version of Debian. Instead of doing it this way, can I make it more succinct?               #!/bin/bash     VERSION=NONE     if [ $(cat /etc/debian_version) == '7.3' ]; then       VERSION=7     elif [ $(cat /etc/debian_version) == '7.2' ]; then       VERSION=7     elif [ $(cat /etc/debian_version) == '7.1' ]; then       VERSION=7     elif [ $(cat /etc/debian_version) == '7.0' ]; then       VERSION=7     fi      I know it's not the most attractive way of doing this. What I want, is to understand how to use the file at `/etc/debian_version` to read the version number before the `.` and ignore the number after. I tried using               if [ $(cat /etc/debian_version) == '7.*' ]; then      and I also tried               if [ $(cat /etc/debian_version) == '7.2|7.1|7.0' ]; then      But neither of these worked for me. I want to future proof my script so that if Debian 7.4 gets released, then I won't have to go back over all the scripts that rely on this and alter them I am also aware of the `lsb_release -a` showing me the relative information, I just don't know how to "cut" what I want from that and check that it is Debian 6 or 7. The original script, as you can imagine, is quite lengthy. Any other posts you can point me to, would also be appreciated with using the method of "cutting" apart the response to only section out the part that I want.


title: Using a Unix Domain Socket to Control VLC

text: I am interested in using a UNIX-Domain Socket to control VLC playback. This functionality is outlined in the VideoLan documentation for using oldrc. So what I need to is startup vlc with a command such as:               cvlc <path to media> -I oldrc --rc-unix /some/socket      And then I should be able to send vlc commands to `/some/socket` to control the playback. Are there any general-purpose sockets floating around somewhere on my Kubuntu 12.10 system that I could use for this?


title: How to lock-down input on a Linux machine?

text: We need to put out a web browser to a public place to show informations. I need to lock down all the input interfaces via software methods. So ex.: if someone plugs a USB keyboard to the machine it wouldn't be able to use it. How to do it under ex.: Ubuntu 12.04? How can I disable USB/other input methods?


title: At init, run my own script instead of the shell

text: This is purely theoretical but suppose I would like to deploy a linux distribution on many servers. The only solution I can think of would be to create an initramfs with a custom script to perform checks on the underlying hardware, then format the main hard drive and install the OS. Now I am not entirely satisfied by my approach, I would rather do the same thing after the kernel has launched `init`. Usually, what `init` does is spawn a shell for the user to log in. How can I replace this with my own script?


title: Grabbing the extension in a file name

text: How do I get the file extension from bash? Here's what I tried:               filename=`basename $filepath`     fileext=${filename##*.}      By doing that I can get extension of `bz2` from the path `/dir/subdir/file.bz2`, but I have a problem with the path `/dir/subdir/file-1.0.tar.bz2`. I would prefer a solution using only bash without external programs if it is possible. To make my question clear, I was creating a bash script to extract any given archive just by a single command of `extract path_to_file`. How to extract the file is determined by the script by seeing its compression or archiving type, that could be .tar.gz, .gz, .bz2 etc. I think this should involve string manipulation, for example if I get the extension `.gz` then I should check whether it has the string `.tar` before `.gz` — if so, the extension should be `.tar.gz`.


title: Monitoring activity on my computer.

text: So recently I found that someone has been using my computer without consent, browsing folders, etc.... I could change all my passwords straight away, but I'm curious as the what the intruding party was looking for. So I would like to set up a trap ( evil grin ). What software will monitor any activity on my computer? While I know that capturing my screen will work here. I'd rather use a logfile. For example: **/var/log/activity.log** > [1 Aug 2010 20:23] /usr/bin/thunar accessed /multimedia/cctv-records/   >  [1 Aug 2010 20:25] /usr/bin/mplayer accessed /multimedia/cctv- > records/00232.avi   >  [3 Aug 2010 02:34] /usr/bin/thunderbird was run   >  [3 Aug 2010 03:33] incomming ssh session from 12.32.132.123 Activities I would like to log is:   * Access to files and folders on the filesystem   * Commands run ( from console or otherwise )   * User Sessions ( login's, ssh sessions and failed attempts )


title: Ubuntu postfix installation error: trying to overwrite '/usr/sbin/validlocale', which is also in package libc-bin 0:2.10.1-0ubuntu18

text: I am trying to install Postfix on Ubuntu 10.04 using command `sudo apt-get install postfix` but there comes error as shown below:               Preconfiguring packages ...     (Reading database ... 164023 files and directories currently installed.)     Preparing to replace locales 2.9+git20090617-3 (using .../locales_2.11.2-7_all.deb) ...     Unpacking replacement locales ...     dpkg: error processing /var/cache/apt/archives/locales_2.11.2-7_all.deb (--unpack):      trying to overwrite '/usr/sbin/validlocale', which is also in package libc-bin 0:2.10.1-0ubuntu18     Processing triggers for man-db ...     Errors were encountered while processing:      /var/cache/apt/archives/locales_2.11.2-7_all.deb     E: Sub-process /usr/bin/dpkg returned an error code (1)      Please help me what to do


title: Fedora 20: Failed to start LSB: Bring up/down networking

text: I'm trying to restart my networking service in Fedora 20, and I get the following error:               [dev@localhost das]$ sudo service network restart     [sudo] password for dev:      Restarting network (via systemctl):  Job for network.service failed. See 'systemctl status network.service' and 'journalctl -xn' for details.                                                                [FAILED]               [dev@localhost das]$ systemctl status network.service     network.service - LSB: Bring up/down networking        Loaded: loaded (/etc/rc.d/init.d/network)        Active: failed (Result: exit-code) since Wed 2014-07-30 11:26:17 CDT; 8min ago          Jul 30 11:26:16 localhost.localdomain network[22542]: RTNETLINK answers: File exists     Jul 30 11:26:16 localhost.localdomain network[22542]: RTNETLINK answers: File exists     Jul 30 11:26:16 localhost.localdomain network[22542]: RTNETLINK answers: File exists     Jul 30 11:26:16 localhost.localdomain network[22542]: RTNETLINK answers: File exists     Jul 30 11:26:16 localhost.localdomain network[22542]: RTNETLINK answers: File exists     Jul 30 11:26:16 localhost.localdomain network[22542]: RTNETLINK answers: File exists     Jul 30 11:26:16 localhost.localdomain network[22542]: RTNETLINK answers: File exists     Jul 30 11:26:17 localhost.localdomain systemd[1]: network.service: control process exited, code=exited status=1     Jul 30 11:26:17 localhost.localdomain systemd[1]: Failed to start LSB: Bring up/down networking.     Jul 30 11:26:17 localhost.localdomain systemd[1]: Unit network.service entered failed state          [dev@localhost das]$ ll /etc/sysconfig/network-scripts       total 216     -rw-r--r--. 1 root root   254 Jan 14  2014 ifcfg-lo     -rw-r--r--. 1 root root   319 Dec 23  2013 ifcfg-p2p1     lrwxrwxrwx. 1 root root    24 Jun  4 16:04 ifdown -> ../../../usr/sbin/ifdown     -rwxr-xr-x. 1 root root   627 Jan 14  2014 ifdown-bnep     -rwxr-xr-x. 1 root root  5553 Jan 14  2014 ifdown-eth     -rwxr-xr-x. 1 root root   781 Jan 14  2014 ifdown-ippp     -rwxr-xr-x. 1 root root  4141 Jan 14  2014 ifdown-ipv6     lrwxrwxrwx. 1 root root    11 Jun  4 16:04 ifdown-isdn -> ifdown-ippp     -rwxr-xr-x. 1 root root  1642 Jan 14  2014 ifdown-post     -rwxr-xr-x. 1 root root  1068 Jan 14  2014 ifdown-ppp     -rwxr-xr-x. 1 root root   837 Jan 14  2014 ifdown-routes     -rwxr-xr-x. 1 root root  1444 Jan 14  2014 ifdown-sit     -rwxr-xr-x. 1 root root  1599 Mar 31 03:52 ifdown-Team     -rwxr-xr-x. 1 root root  1556 Mar 31 03:52 ifdown-TeamPort     -rwxr-xr-x. 1 root root  1462 Jan 14  2014 ifdown-tunnel     lrwxrwxrwx. 1 root root    22 Jun  4 16:04 ifup -> ../../../usr/sbin/ifup     -rwxr-xr-x. 1 root root 12449 Jan 14  2014 ifup-aliases     -rwxr-xr-x. 1 root root   859 Jan 14  2014 ifup-bnep     -rwxr-xr-x. 1 root root 10293 Jan 14  2014 ifup-eth     -rwxr-xr-x. 1 root root 12039 Jan 14  2014 ifup-ippp     -rwxr-xr-x. 1 root root 10430 Jan 14  2014 ifup-ipv6     -rwxr-xr-x. 1 root root   804 Jan 14  2014 ifup-ipx     lrwxrwxrwx. 1 root root     9 Jun  4 16:04 ifup-isdn -> ifup-ippp     -rwxr-xr-x. 1 root root   642 Jan 14  2014 ifup-plip     -rwxr-xr-x. 1 root root  1043 Jan 14  2014 ifup-plusb     -rwxr-xr-x. 1 root root  2609 Jan 14  2014 ifup-post     -rwxr-xr-x. 1 root root  4154 Jan 14  2014 ifup-ppp     -rwxr-xr-x. 1 root root  1925 Jan 14  2014 ifup-routes     -rwxr-xr-x. 1 root root  3263 Jan 14  2014 ifup-sit     -rwxr-xr-x. 1 root root  1755 Mar 31 03:52 ifup-Team     -rwxr-xr-x. 1 root root  1876 Mar 31 03:52 ifup-TeamPort     -rwxr-xr-x. 1 root root  2607 Jan 14  2014 ifup-tunnel     -rwxr-xr-x. 1 root root  1621 Jan 14  2014 ifup-wireless     -rwxr-xr-x. 1 root root  4623 Jan 14  2014 init.ipv6-global     -rw-r--r--. 1 root root 13793 Jan 14  2014 network-functions     -rw-r--r--. 1 root root 26134 Jan 14  2014 network-functions-ipv6


title: Fedora make command broken, kernel mismatch

text: On a new Dell Inspiron 3521, I tried installing Linux. First try was Ubuntu, but couldn't get the WiFi working. After trying all sort of things and commands, some errors started to show. I then installed Fedora to check it out and see if it would pick up the WiFi. But it didn't either. Now, I want to install some drivers that should fix it. I've extracted a tarball. The directory contains a Makefile, but when I run make, the following error is thrown:               KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd`     make: *** /lib/modules/3.11.10-301.fc20.x86_64/build: No such file or directory.  Stop.     make: *** [all] Error 2      Now I tried to see if that `build` directory exists, and it does, but as a symlink to a directory that does not exist. It points to `/usr/src/kernels/3.11.10-301.fc20.x86_64`. In the `kernels` directory, I only have `3.12.6-300.fc20.x86_64`.


title: Show icons for open windows on multiple desktop panels

text: By default, the bottom desktop panel in centos(6) gnome displays icons for all open windows in the workspace. However, with two monitors, these icons are frequently sitting in my blind spots, causing me to miss notifications in the form of flashing icons. I'd like to try and solve this by duplicating the panel on both monitors, so that I can see notifications regardless of which screen I'm reading on. If I try to create a new panel and add the Window List to it, each panel with a Window List only shows the windows that are on that monitor. Is there a way to have two panels, each with the full list of icons?


title: Clear file system cache on AIX

text: I'm using AIX 6.1 and for testing.   I want to clear the file system cache.   Something similar a this on linux : `echo 2 > /proc/sys/vm/drop_caches` Is this possible?


title: how to check if the kernel support for ip alias?

text: it surprisingly that I get no explicit results when I googled "kernel ip alias support", and I have looked up the _linux network administrator, 3rd edition_ , it says: > check that you have a /proc/net/ip_alias file; if not, you will have to > recompile your kernel it seems this statement is out-dated, because I don't have the `/proc/net/ip_alias` file, but I can run `sudo ifconfig eth0:0 192.168.0.1` and the output of `sudo ifconfig -a` is:               eth0      Link encap:Ethernet  HWaddr f0:de:f1:b8:2b:b9                 inet addr:10.2.14.102  Bcast:10.2.14.255  Mask:255.255.255.0               inet6 addr: fe80::f2de:f1ff:feb8:2bb9/64 Scope:Link               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:167089 errors:0 dropped:0 overruns:0 frame:0               TX packets:147915 errors:53 dropped:0 overruns:0 carrier:53               collisions:78714 txqueuelen:1000                RX bytes:142585362 (135.9 MiB)  TX bytes:25127121 (23.9 MiB)               Interrupt:20 Memory:f2500000-f2520000           eth0:0    Link encap:Ethernet  HWaddr f0:de:f1:b8:2b:b9                 inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               Interrupt:20 Memory:f2500000-f2520000


title: swap symbols with numbers in keyboard layout

text: I'm looking to modify my keyboard layout such that holding down `Shift` and pressing a number key will result in a number being printed to the screen instead of the symbol that's on the key. For example `SHIFT`+`9` would print `9`, while `9` will print `(`. I'd also like to switch "[" and "]" with "{" and "}" respectively, in the same manner. I suspect the program `setxkbmap` will be useful, but I don't know how to use it for this purpose. Incidentally, there exists a similar question, but it's not exactly what I'm looking for. I use Linux Mint 16 Mate Edition.


title: validate all packages to be correct

text: I have two machines. One of which started to act strange lately (aptitude segfaulting, apt requiring a library named lkbm.qo.6). As the broken machine is not vital to me, I don't want to squash and reinstall it from scratch, but to investigate the problem however long it takes. So, I have second machine thats acting fine so I would like to scan all installed packages on the broken machine and have the libs hash checked against the good ones. Of course I can write a script for that, but I wanted to be sure that nobody else has solved that already. The point is that I don't trust the broken machine. While it being intruded by an outsider is unlikely in this situation I would love to have a solution that would work even then. (I'd love to add a `validation` tag, but could not find one.)


title: The ls command is not working for a directory with a huge number of files

text: I had a directory which had around **5 million** files. When I tried to run the `ls` command from inside this directory, my system consumed a huge amount of memory and it hung after sometime. Is there an efficient way to list the files other than using the `ls` command?


title: Is Openbox a non-reparenting window manager?

text: Installing jre7-openjdk prints this message: > when you use a non-reparenting window manager set > _JAVA_AWT_WM_NONREPARENTING=1 in /etc/profile.d/jre.sh My WM is openbox, have I to edit the file?


title: Remotely accessing cassandra running on local loopback IP/port 127.0.0.1

text: I have been using ccm for some time and it's pretty awesome tool to test out admin stuff. Now, I really want to test modeling data by trying to access ccm running cassandra using Thrift based pycassaShell client from remote hosts (not locally). My setup is like this: Lets say, private IP of this machine is: 10.11.12.13 (Just an example)               lo    Link encap:Local Loopback             inet addr:127.0.0.1  Mask:255.0.0.0           inet6 addr: ::1/128 Scope:Host           UP LOOPBACK RUNNING  MTU:16436  Metric:1           RX packets:67392708 errors:0 dropped:0 overruns:0 frame:0           TX packets:67392708 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:0            RX bytes:7398829042 (6.8 GiB)  TX bytes:7398829042 (6.8 GiB)          lo:1  Link encap:Local Loopback             inet addr:127.0.0.2  Mask:255.255.255.0           UP LOOPBACK RUNNING  MTU:16436  Metric:1          lo:2  Link encap:Local Loopback             inet addr:127.0.0.3  Mask:255.0.0.0           UP LOOPBACK RUNNING  MTU:16436  Metric:1          lo:3  Link encap:Local Loopback             inet addr:127.0.0.4  Mask:255.0.0.0           UP LOOPBACK RUNNING  MTU:16436  Metric:1      and 127.0.0.1 (node1), 127.0.0.2 (node2), 127.0.0.3 (node3), 127.0.0.4 (node4)               $ ccm status       node1: UP         node3: UP       node2: UP       node4: UP      How to connect to any of the instance from non-local hosts? When I do: pycassaShell --host 10.11.12.13 --port 9160, it throws an exception, thrift.transport.TTransport.TTransportException: Could not connect to 10.11.12.13:9160 Is there a way to make it work? ### References In case you're unfamiliar,CCM, or Cassandra Cluster Manager is a script for managing instances of Cassandra nodes. _excerpt_ > A script/library to create, launch and remove a Apache Cassandra cluster on > localhost. > > The goal of ccm and ccmlib is to make is easy to create, manage and destroy > a small cluster on a local box. It is meant for testing of a Cassandra > cluster.


title: Linux Mint 15 no audio with NVidia MCP51

text: I updated from Linux Mint 14 to 15 recently, and since then my audio driver seems to be gone or nonfunctional. I don't have a ton of experience with drivers under Linux (grew up a Windows guy), but the couple of drivers I attempted to install haven't worked. lspci gives me               00:10.1 Audio device [0403]: NVIDIA Corporation MCP51 High Definition Audio [10de:026c] (rev a2)     Subsystem: Hewlett-Packard Company Presario V3242AU [103c:30b5]     Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-     Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-     Latency: 0 (500ns min, 1250ns max)     Interrupt: pin B routed to IRQ 10     Region 0: Memory at c0000000 (32-bit, non-prefetchable) [size=16K]     Capabilities: [44] Power Management version 2         Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot+,D3cold+)         Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-     Capabilities: [50] MSI: Enable- Count=1/1 Maskable+ 64bit+         Address: 0000000000000000  Data: 0000         Masking: 00000000  Pending: 00000000     Capabilities: [6c] HyperTransport: MSI Mapping Enable- Fixed+      Then if I run: `aplay -l` the output gives me:               aplay: device_list:252: no soundcards found...      I can't recall the exact model of sound card I have, but I believe it's an nForce 4-series. Searching several forums gave me no help.


title: what is "an invisible whitespace character that takes up space"

text: One can look up Unicode Characters with Regular Expressions. On Jan Goyvaerts website I found a RegExp whose meaning I don't understand : > `\p{Zs}` or `\p{Space_Separator}`: a whitespace character that is invisible, > but does take up space So I wonder if I got this right: a `Whitespace Character`   * is the 'empty' space between two words, columns, lines, whatever   * it's 'invisible' in so far as it contains nothing than the blank paper ⁄ screen   * it 'takes up space' in so far as the place taken through it can't be occupied through a letter, symbol, anything comparable According to this I came to the following **questions** :   * **are there ' _visible_ whitespace characters'**   * **could a whitespace character ' _take no space up_ '** This would be quite the opposite of what is defined. Both make perfectly sense, but then both could describe the same, depending on the point of view: an empty space is visible through the absence of anything displayed there except the blank paper ⁄ screen but then it is invisible as there is nothing to see. At this point I sense a border with Philosophy: How does one measure the amount of Nothingness than through it's counterpart, or so.


title: Grub does not fit the screen

text: I have a problem with my grub installation. The screen is "moved" to the left a couple of pixels, which means that I cannot read the first 20 or so characters of the entries when I boot. I'm running: Grub 1.99.21-ubuntu (the system is a Kubuntu 12.04). My video card is a Radeon HD 5400, running @ 1920x1080. My monitor, if it makes a difference is a Samsung SyncMaster P2470HN . When the boot process start itself (with the kubuntu log) the screen fits normally. Also, my other terminals (TTY1-6) suffers from the same problems.


title: Starting screensaver from terminal

text: I like the 'Black Screen' screen-saver. Because it makes the monitor look like turned-off. But my CentOS takes minimum 1 min. to start it automatically. Can I start it instantly from the terminal? I sometimes need this feature while working with 2 monitors with two different OS. CentOS is on my VNC.


title: Process owner vs process user (Gnome's system monitor)

text: Gnome's system monitor has a "User" column in the Processes tab. There's also an "Owner" column, (that seems to be hidden by default). Most of the processes have the same values on both columns. However, a few don't. I was wondering what exactly does each column show, and what's the difference between the two.


title: git completion with zsh: filenames with spaces aren't being escaped properly

text: Git completion: I'm having difficulty with git's filename autocompletions on my system. I'm using `zsh` (5.0.5) with `git` (1.9.3) on OS X (10.9.3). Both `zsh` and `git` have been installed via homebrew. (Full version output are at the bottom of the post.) `git`'s filename completion isn't inserting spaces like I expect. When I type the name of a file with a space in the name, the shell inserts the filename without spaces escaped. `zsh`'s built-in completion doesn't do this, but `git`'s does. Here's an example of what I'm seeing. I have a repository with a few files with spaces in their names.               % ls -la     test     test four - latest.txt     test three.txt     test two      The shell backslash escapes the filenames as expected when I use tab completion to insert the file name.               % echo "testing" >> test<tab>      autocompletes to this after hitting tab three times.               % echo "testing" >> test\ four\ -\ latest.txt     ––– file     test                       test\ four\ -\ latest.txt  test\ three.txt            test\ two                      `git status` shows these filenames in quotes (it totally understands what's up):               % git status --short      M test      M "test four - latest.txt"      M "test three.txt"      M "test two"      but when I try to `git add` with tab autocompletion, it goes sideways.               % git add test<tab>      results in this after hitting tab three times:               % git add test four - latest.txt     test                    test four - latest.txt  test three.txt          test two      I've tried regressing this a bit: my dotfiles are in version control, so I've tried `zsh 4.3.15`, `git 1.8.3`, and my dotfiles from a year ago, when I'm nearly certain this worked. Weirdly, this setup was still broken. I _have_ narrowed it down to the `_git` completion file that is being sourced from `/usr/local/share/zsh/site-functions`:               % echo $FPATH     /usr/local/share/zsh/site-functions:/usr/local/Cellar/zsh/5.0.5/share/zsh/functions     % ls -l /usr/local/share/zsh/site-functions     _git@ -> ../../../Cellar/git/1.9.3/share/zsh/site-functions/_git     _hg@ -> ../../../Cellar/mercurial/3.0/share/zsh/site-functions/_hg     _j@ -> ../../../Cellar/autojump/21.7.1/share/zsh/site-functions/_j     git-completion.bash@ -> ../../../Cellar/git/1.9.3/share/zsh/site-functions/git-completion.bash     go@ -> ../../../Cellar/go/HEAD/share/zsh/site-functions/go      If I manually change `$FPATH` before my `.zshrc` runs `compinit` (or simply remove the `/usr/local/share/zsh/site-functions/_git` symbolic link), then completions fall back to `zsh` and work as expected. The `zsh` completion without `_git`:               % git add test<tab>      hitting tab three times produces correct results:               % git add test\ four\ -\ latest.txt     ––– modified file     test                       test\ four\ -\ latest.txt  test\ three.txt            test\ two                      Side note: I've tried removing the `git-completion.bash` link, and it just totally breaks things:               % git add test<tab>      produces this busted-ness:               % git add test__git_zsh_bash_func:9: command not found: __git_aliased_command         git add test     ––– file     test                       test\ four\ -\ latest.txt  test\ three.txt            test\ two                      * * * I **really** want to get this working properly: the rest of the `_git` completions were great because they're more repo-aware than the `zsh` ones, but I need filenames with spaces or other special characters to be properly escaped. * * * Software versions:               % zsh --version     zsh 5.0.5 (x86_64-apple-darwin13.0.0)          % git --version     git version 1.9.3          % sw_vers     ProductName:    Mac OS X     ProductVersion: 10.9.3     BuildVersion:   13D65      * * * I've uploaded the `_git` and `git-completion.bash` files: git-completion.bash and _git (renamed to `_git.sh` so CloudApp will make it viewable in the browser.)


title: How to have command history with timestamps output to the terminal continuously?

text: I use a simple _alias_ to enable the "tracking" of commands in one or many terminal window(s):               alias trackmi='export PROMPT_COMMAND="history -a; $PROMPT_COMMAND"'      Then I just `tail -f` my _.bash_history_ file in another terminal on the workspace to get immediate feedback. I have just enabled unlimited history and updated my history format (`export HISTTIMEFORMAT="[%F %T] "`) in _.bashrc_. Of course the `history` command displays the timestamps. But the format the history file per se is:               #1401234303     alias     #1401234486     cat ../.bashrc       How can I have the Unix time converted and the whole command displayed on a single line just like with the `history` command, including numbering:               578  [2014-05-27 19:45:03] alias     579  [2014-05-27 19:48:06] cat ../.bashrc       ...and follow that. Or find a way to continuously output the output of the `history` command to the terminal?


title: What graphical launcher program can I use?

text: I have the following setup: I am running Ubuntu on VirtualBox in a Windows Environment. I am using Xming launcher to start xterm from Ubuntu as a client from where I can launch other graphical programs. However, starting multiple programs from xterm with `&` means that the xterm window receives the output from the other applications and becomes very cluttered. Is there some other program I can run in the Ubuntu system that acts as a graphical launcher/tray for other apps?


title: How to disable Network and Bluetooth driver loading

text: I dont need Bluetooth and Ethernet. SO I want that the next time I boot my system the OS do not waste time in loading corresponding drivers. How do I do in general in any linux flavor ?


title: Gnome mouse focus stops working

text: When using Linux, I normally set the focus mode to follow my mouse. As far back as I can remember, there is something wrong with this in Gnome3, it just stops working and I have to restart Gnome3 for it to come back. This happens in Ubuntu, Debian and Fedora at least. Any idea how to prevent this?. This is how I normally enable focus follow mouse in the first place:               settings set org.gnome.desktop.wm.preferences focus-mode sloppy


title: Randomizing the source port for new connections

text: Generally whenever source port is selected by a network application, it is selected in a sequential manner among the free ports like 32000, 32001 and so on. I want to randomize the source port selection. I tried this using iptables as follows but this didnt help.                Chain POSTROUTING (policy ACCEPT 462 packets, 31025 bytes)      743 44580 MASQUERADE  tcp  --  *      !lo     0.0.0.0/0            0.0.0.0/0           masq ports: 32768-61000 random      Can someone help me in solving this.