Server load is very high with unusual iftop result

Sometimes my server load is insanely high. Things like 120 or something. I checked what's wrong. What I see can be seen in this question: How do I interpret this IFTOP result Basically when I run iftop, a lot of connection has things like ns2.zerolimites.com,ns2.zerolimites.com,ns1.zerolimites.com,ns1626.ztomy.com,ns1626.ztomy.com I have no idea what zerolimites.com is, what ztomy.com is. Suddenly the left side of iftop is filled with that sort of thing and my load exploded. People say that the left side of iftop is for "me". I wonder what it means. Obviously the left side of iftop is filled with many different IP and hosts. They can't all be me. So what should I do?


Unable to clone git repository: foo.git/info/refs not found

I tried to clone a git repository using the command:               git clone http://git.denx.de/cgibin/gitweb.cgi?p=uboot.git;a=summary      but I got the error: > fatal: http://git.denx.de/cgibin/gitweb.cgi?p=uboot.git/info/refs not > found: did you run git update-server-info on the server?


How to install caffeine on Scientific Linux 6.3

caffeine     Traceback (most recent call last):       File "/usr/bin/caffeine", line 40, in <module>         import caffeine       File "/usr/lib64/python2.6/site-packages/caffeine/__init__.py", line 23, in <module>         from gi.repository import Gtk, Gio     ImportError: No module named gi.repository      This is what I get after installing caffeine.               rpm -qa | egrep -i 'caffeine|gobject'     caffeine-2.4.419-1.el6.nux.noarch     pygobject2-2.20.0-5.el6.x86_64      How can I install it? what am I missing? https://launchpad.net/caffeine


How to find last matching line with ex?

The `ex` command `$` navigates to the **first** character of the last line. Therefore, when doing a backwards search it skips the line it's currently on. How do I navigate to the last character with `ex`, or alternatively search for the last occurrence of a regular expression? Example:               $ cd -- "$(mktemp --directory)"     $ printf '%s\n' foo bar foo bar > test.txt     $ ex -c '$' -c '?bar' -c 'visual' test.txt      At this point the cursor is on line 2 instead of line 4, as expected. Using `ex -c '?bar' -c 'visual' test.txt` produces the same result, even though I'd expect it to find the last line when wrapping around (`vim` does). Using Vim 7.3.


Simulate desktop over SSH?

I want some kind of desktop DE when connecting to my linux box over ssh. Something like winscp works but I'll be running on linux instead of windows. The box doesn't have much ram and is not running a DE. I'd want to execute programs/scripts but it's ok if it disappears and I need to use the command line to see/connect to it


How to do "netcat" relays properly so that I have more control?

How to use the `netcat` to have relays? Like following I tried but not working:               cd /tmp     mknod backpipe p     nc -l -p 7007 0<backpipe | nc 192.168.1.101 9001 | tee backpipe        1. I want to receive data on 7007 must be listening mode   $ another application is putting packets here   2. what ever comes to 7007 I need to move to 9001 (which is also a listening port)              $ telnet localhost 9001      will show 7007 packets? Any idea? Optional: will it be also possible that I can put some extra header packets? to simulate http headers as image content type?


What does this awk script do

echo 1 | awk '{ srand(); print int (rand()*67) }'      I get a different o/p everytime I run it. However if I omit the 1 I get same o/p ..why?


Information about the device files: /dev

ls /dev       command lists the device files. How to know the **associated drivers** /major_numbers/minor_numbers with those device files?


List symlinks in current directory?

This question talks about finding directories in a current diretory. The solution is basically:               ls -d */      That's great but how can I easily list symlinks? Do I have to use something like               find . -xtype l -d 1     (intended to find symlinks max depth 1 - doesn't work)      Or is there an easier way? Can ls be used for this?


GSettings is reset during reboot

Formatting is a pain, especially due to all the package installation, configurations and so on. To make this easier, I made a large script with simple config files that is easily changed. So once I need a format (like when new OS versions is out), I just install and then execute the script after the first boot and I'm ready to go. Or at least that is how it was meant to be. But for some reason gsettings does not work properly.               gsettings set schema key value      The above line works just fine. But the script is executed as root since it needs to access config files on /etc, install and update package etc. so the above is not an option.               sudo $user -c "gsettings set schema key value"      Using `sudo` should work, but it does not. Some of the keys will take affect right away, others will not. And once I reboot or logout, everything is reset to default.               sudo $user -c "gsettings get schema key"      If I test the values using the above command, I do get the correct ones. So it seems that they do get set correctly, but still they only affect some and they still get reset during reboot or logout. I'm currently running Ubuntu Gnome 14.04. This used to work in 13.04 and before, but since 13.10 this has been a problem.


Allowing a user to use sudo without a password

On a sandbox VM environment, I have a setup of Ubuntu Linux which is firewalled and cannot be accessed from outside the local system. Therefore, on that VM, I'd like to give the administrative user (which I set up) the ability to run anything with sudo and not need a password. While I know this is not secure, this VM is not on all the time, and requires my personal passcode to run. So even though this is not "secure", is there a way to get the desired functionality?


udiskd: force -o data=journal for ext3/4 filesystems

LinuxMint uses udiskd to automount removable drives (e.g. USB). It works reasonably well, though I often have to re-plug the device before udiskd discovers the device. I would prefer if the removable disks never had data-loss (at least not more than the currently file being written). I have earlier succeeded by using ext3fs with -o data=journal. How can I force udiskd to mount removable devices with ext3fs and ext4fs using -o data=journal?


Minimal Linux distribution for compiling C programs

What would be the Linux distribution that is minimal? Just enough to run eclipse and the c/c++ compiler. This Linux will be installed on a VM so I don't want to have a full loaded distribution. What I need is just: Linux kernel with a GUI, c/c++ compiler, java, and eclipse *debian base is preferable


Customising markdown syntax highlighting in Geany

I'm using Geany 1.23.1 on Lubuntu 13.10. I've copied over `filetypes.markdown` from `/usr/share/geany` to `~/.config/geany/filedefs`. `filetypes.markdown` has the following content:               # For complete documentation of this file, please see Geany's main documentation     [styling]     # Edit these in the colorscheme .conf file instead     default=default     strong=string_3     emphasis=string_4     header1=keyword_1     header2=keyword_1     header3=keyword_1     header4=keyword_1     header5=keyword_1     header6=keyword_1     ulist_item=tag_unknown     olist_item=tag_unknown     blockquote=tag_unknown     strikeout=tag_unknown     hrule=tag_unknown     link=keyword_1     code=attribute_unknown     codebk=attribute_unknown          [settings]     # default extension used when saving files     extension=mkd          # sort tags by appearance     symbol_list_sort_mode=1      Why is the third line present: **# Edit these in the colorscheme .conf file instead**? What is wrong with editing `filetypes.markdown` itself? I would think that, at least from a user's perspective, editing `~/.config/geany/filedefs/filetypes.markdown` (or any other filetypes file) would be preferable to editing a `.conf` file (in `~/.config/geany/colorschemes`) as suggested because editing a `.conf` file would affect all filetypes not just `filetype.markdown`.


How do I prevent Xorg from loading one-time?

My current Xorg configuration is freezing the machine (and text based terminals don't seem to work). Is there a way (e.g. holding down a hot-key) I can prevent the loading of X at boot time? I cannot access the terminal at this time.


How to delete (not disable/mask) a unit in Systemd?

Sometimes I make a new unit in mistake, and then I have to go to /etc/systemd to look for the unit and delete all of its associated files/scripts/links/etc. Is there a better way? Like a single command that deletes everything associated with a unit name?


Can you run a linux system properly without internet connection?

I am have come across my old computer in my attic. It is a very old windows 98 HP computer. I can give more specs if needed. I was wondering if I could install Damn Small Linux on a flash drive and boot to it and install it over the current operating system and run linux properly without an internet connection. Like what is there to do on a linux system without internet? will this be a good learning environment for me to familiarize myself with linux? Should/Could I possibly try to take apart the operating system and look into it. Another added on question is should I maybe run archlinux instead of DSL and temporarily connect to the internet to get that set up or is that too advanced for me and even that old of a computer. The reason that I cannot connect to the internet is because I am going to be hooking this computer up in my bedroom and the internet is in my parents room and I do not believe that this old of a system can run with wireless internet. However, I can temporarily connect via ethernet cable but not for long.


Linux tool to track directory space over time

Are there any common Linux tools that track disk space over time, not just a filesystem overall, but for example, so I could easily see which directory trees swelled up and shrunk historically? The problem happens on servers which seem to keep hitting 0 free space despite routine house-cleaning of cache and tmp files, logs etc. I already use tools like `df`, `du` and `lsof` often and schedule `at` jobs to find aged files over a certain size/type when low water- marks are hit, etc. Preferably a Debian/Ubuntu package.


Why not simply use %h in OpenSSH ssh's ControlPath option?

Why do the "ssh_config(5)" manpages recommend that the `ControlPath` option should contain at least the `%h`, `%p` and `%r` placeholders in order to **uniquely identify** each shared connection? I thought that multiple sessions should **share** the same socket with a connection to the same host. Wouldn't it make sense then to have a simple definition such as:               ControlPath ~/.cache/ssh/mux/%h      Instead of something like:               ControlPath ~/.cache/ssh/mux/%r@%h:%p      In my understanding with the first definition one connection is shared between multiple sessions with different remote users, to the same remote host, on different remote ports. I want to have the first defintion in the host default section so that it suffices to say `ssh -o ControlMaster=no`. I want to share the connection to the same remote host between all sessions initiated by the same local user regardless of the remote user and remote port. The master client's socket should live beneath the local user's home directory.


vector images in linux

Gimp cannot create vector images, is there a good linux application for this?


How can I limit downloaded file size in wget?

I want to use `wget` (from a php script) to download image files, but don't want to download files over a certain size. Can I limit file size with `wget`? If not, what is a better way?


permission denied when executing a binary

I used these instructions to install mongodb on my OS X machine. I did not make the files owned by root though, I used my local user (markdsievers), and installed to `/usr/local/mongodb` and `usr/local/mongodb_data`. I've chmod'ed and chown'ed all files and subdirectories of those to `rwxrwxr-x markdsievers staff`. As user `markdsievers` I can start up the database without error using:               $ sudo mongod --dbpath=/usr/local/mongodb_data      However, if I start it with:               $ mongod --dbpath=/usr/local/mongodb_data/      I get:               Unable to create / open lock file for lockfilepath: /usr/local/mongodb_data/mongod.lock errno:13 Permission denied      What am I missing here?


PID file not accessible after update of nginx

After I removed the version 0.7.x which was delivered by the Debian standard packages, I installed the version 1.4.1 of nginx by source. It is possible to start nginx with `service nginx start` and I see that nginx is reserving the port 80 when I do netstat. `netstat -apn | grep nginx` output:               tcp      0    0 0.0.0.0:80            0.0.0.0:*             LISTEN    3115/nginx       The problem is, when I do `service nginx status` or `service nginx stop` I get this message: > could not access PID file for nginx ... failed! Who can I fix this? And how do I prevent getting this problem? **EDIT: solution**   1. `remove nginx`   2. then go to the source and `./configure --pid-path=/var/run/nginx.pid`   3. `make`   4. `checkinstall make install`


How to set a static IP in Ubuntu

How do I set my computer to have a static IP in Ubuntu 11.04? The only two lines in `/etc/network/interfaces` are:               auto lo     iface lo inet loopback      I think usually when people do this they have a wired connection and just edit the eth0 settings, however I'm using a wireless adapter.


OpenVPN on OpenWrt

I have a step-by-step guide for OpenVPN on an OpenWRT 10.03 router: (wl500gpv2) ### Needed packages               opkg install openvpn_2.1.1-1_brcm-2.4.ipk kmod-tun_2.4.37.9-1_brcm-2.4.ipk libopenssl_0.9.8m-3_brcm-2.4.ipk liblzo_2.03-3_brcm-2.4.ipk openssl-util_0.9.8m-3_brcm-2.4.ipk ntpd_4.2.6-4_brcm-2.4.ipk      ### Generate certs               # 0)     mkdir -p /etc/ssl/certs/demoCA/newcerts /etc/ssl/certs/demoCA/private /etc/ssl/private; touch /etc/ssl/certs/demoCA/index.txt; echo "01" >> /etc/ssl/certs/demoCA/serial; cd /etc/ssl/certs          # 1)     # cakey.pem: CA's private key - needed by key signing machine only, purpose: Root CA key, keep it in SECRET!!     # cacert.pem: CA's cert - needed by server + all clients, purpose: Root CA certificate, not secret     # common name: "vpnserver" - in every other case just hit enter     time openssl req -nodes -new -x509 -days 3650 -keyout /etc/ssl/certs/demoCA/private/cakey.pem -out demoCA/cacert.pem          # 2)     # server.key: needed by server only, purpose: Server Key, keep it in SECRET!!     # server.csr: [???]     # common name: "vpnserver" - in every other case just hit enter     time openssl req -nodes -new -keyout /etc/ssl/private/server.key -out server.csr # password not advised - only if you're paranoic..          # 3)     # server.crt: needed by server only, purpose: Server Certificate, not secret     # Sign the certificate? [y/n]:y     # 1 out of 1 certificate requests certified, commit? [y/n]y     time openssl ca -cert demoCA/cacert.pem -keyfile /etc/ssl/certs/demoCA/private/cakey.pem -out server.crt -in server.csr -days 3650          # 4)     # shared.key: [???]     time openvpn --genkey --secret shared.key          # 5)     # dh.pem: Diffie-Hellman file for secure SSL/TLS negotiation, identical on the server and all clients     time openssl dhparam -out dh.pem 1024          # 6)     # give a common name! it will be the user name     # client1.key: needed at client1 only, purpose: Client1 Key, keep it in SECRET!     # client1.csr: [???]     # client1.crt: needed at client1 only, purpose: Client1 Certificate, not secret     # Give the client's key file a password for better security.     time openssl req -nodes -new -keyout /etc/ssl/private/client1.key -out client1.csr     # Sign the certificate? [y/n]:y     # 1 out of 1 certificate requests certified, commit? [y/n]y     time openssl ca -out client1.crt -in client1.csr      copy the certs               # on the router     mkdir -p /etc/ssl/certs/client1; cp demoCA/cacert.pem client1.crt /etc/ssl/private/client1.key shared.key dh.pem client1; tar -cvf /root/client1.tar client1; rm -fr /etc/ssl/certs/client1          # on the pc [with a normal user]     mkdir ~/.cert/; rm ~/.cert/*; cd ~/.cert/; scp root@192.168.1.1:/root/client1.tar ~/.cert/; tar -xvf ~/.cert/client1.tar; mv ~/.cert/client1/* .; rm -fr client1; chmod 600 ~/.cert/*          # if you're using e.g.: Fedora/SELinux, then     restorecon -Rv ~/.cert*      ### OpenVPN server config               mkdir /etc/openvpn; vim /etc/openvpn/server.conf          port 1194     proto udp     dev tun     ca /etc/ssl/certs/demoCA/cacert.pem     cert /etc/ssl/certs/server.crt     key /etc/ssl/private/server.key     dh /etc/ssl/certs/dh.pem     tls-auth /etc/ssl/certs/shared.key 0     server 192.168.80.0 255.255.255.0     push "redirect-gateway"     comp-lzo     keepalive 10 120     status /tmp/openvpn.status      ### Firewall on the OpenWrt router               vim /etc/firewall.user          iptables -t nat -A prerouting_wan -p udp --dport 1194 -j ACCEPT     iptables -A input_wan -p udp --dport 1194 -j ACCEPT     iptables -A INPUT -i tun+ -j ACCEPT     iptables -A FORWARD -i tun+ -j ACCEPT     iptables -A OUTPUT -o tun+ -j ACCEPT     iptables -A FORWARD -o tun+ -j ACCEPT      ### Reboot               sync; sync; sync     reboot      ### Start and check               openvpn --daemon --config /etc/openvpn/server.conf          root@OpenWrt:/etc/ssl/certs# ps aux | fgrep -i openvpn     941 root      2876 S    openvpn --daemon --config /etc/openvpn/server.conf      root@OpenWrt:/etc/ssl/certs# netstat -tulpn | fgrep -i 1194     udp        0      0 0.0.0.0:1194            0.0.0.0:*                           941/openvpn     root@OpenWrt:/etc/ssl#       ### Client config               yum install openvpn     vim /etc/openvpn/client.conf          client     dev tun     proto udp     remote 192.168.1.1 1194     nobind     ca /home/USERNAME/.cert/cacert.pem     cert /home/USERNAME/.cert/client1.crt     key /home/USERNAME/.cert/client1.key     dh /home/USERNAME/.cert/dh.pem     tls-auth /home/USERNAME/.cert/shared.key 1     comp-lzo      ### Go!               openvpn /etc/openvpn/client.conf      * * * But after I try it out, the client gives an error: (and when I use the VPN, I can't ping google.com from the client.. just the router)               Sat Jul  9 13:14:19 2011 OpenVPN 2.1.1 i686-redhat-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] built on Jan  5 2010     Sat Jul  9 13:14:19 2011 WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.     Sat Jul  9 13:14:19 2011 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables     Sat Jul  9 13:14:19 2011 Control Channel Authentication: using '/home/USERNAME/.cert/shared.key' as a OpenVPN static key file     Sat Jul  9 13:14:19 2011 LZO compression initialized     Sat Jul  9 13:14:19 2011 UDPv4 link local: [undef]     Sat Jul  9 13:14:19 2011 UDPv4 link remote: 192.168.1.1:1194     Sat Jul  9 13:14:19 2011 [vpnserver] Peer Connection Initiated with 192.168.1.1:1194     Sat Jul  9 13:14:21 2011 TUN/TAP device tun0 opened     Sat Jul  9 13:14:21 2011 /sbin/ip link set dev tun0 up mtu 1500     Sat Jul  9 13:14:21 2011 /sbin/ip addr add dev tun0 local 192.168.80.6 peer 192.168.80.5     Sat Jul  9 13:14:21 2011 OpenVPN ROUTE: omitted no-op route: 192.168.1.1/255.255.255.255 -> 192.168.1.1          Sat Jul  9 13:14:21 2011 WARNING: potential route subnet conflict between local LAN [192.168.80.0/255.255.255.0] and remote VPN [192.168.80.1/255.255.255.255]          Sat Jul  9 13:14:21 2011 Initialization Sequence Completed     ^CSat Jul  9 13:16:10 2011 event_wait : Interrupted system call (code=4)     RTNETLINK answers: No such process     Sat Jul  9 13:16:10 2011 ERROR: Linux route delete command failed: external program exited with error status: 2     Sat Jul  9 13:16:10 2011 /sbin/ip addr del dev tun0 local 192.168.80.6 peer 192.168.80.5     Sat Jul  9 13:16:10 2011 SIGINT[hard,] received, process exiting      The question is, what am I doing wrong? Why doesn't it work? Am I giving wrong subnets? How can I give good ones? (e.g.: bad "server" line in the "openvpn server config"?)      ---      Topology:      ISP -> OPENWRT ROUTER(giving 192.168.1.0/24) -> MYPC(dhcp, not static ip)      Thanks for any help/tips. I already googled for hours and asked many experts, but no luck. My purpose is to openvpn to this openwrt router from my PC to have a secured "channel" (from a netcafe, or from the mentioned topology, etc.). The "MYPC" is runing Fedora 14      UPDATE Q:   Can somebody explain what are these files?:      # server.csr: [???]   # shared.key: [???]   # client1.csr: [???]


Unable to boot Chromium OS from USB drive

I have tried both my own builds of Chromium OS and Hexxeh's daily Vanilla builds, and neither work. I copy them over to my flash drive, but when I try to boot from it, nothing happens except my backlight flashing on and off a few times, then a reboot. System: Compaq Presario CQ50-140US http://h10025.www1.hp.com/ewfrf/wc/document?docname=c01550071&tmp_task=prodinfoCategory&lc=en&dlc=en&cc=us&site=null&lang=en&product=3795225&key=null


How does the Linux file system/organization differ from Windows?

One of the things that really slows me down in catching on with Linux is the huge difference between the file system in Linux versus Windows. Up until the last 3-4 years I only used Windows systems and its only been the last 2-3 months that I've really worked at getting accustomed to Linux. I think one of the things that really bothers me at this point is that I felt like I could find just about anything I wanted to when I began digging through the various folders in Windows. I had become accustomed to what kinds of things were placed where and when. I don't have that with Linux. I'm learning a few things like the /opt folder is where most third-party programs get installed... but my understanding is limited. What things are important to know to really understand the file system and to be able to locate different files and programs and such?


For loop in Unix : including files from sub directories

A simple for loop in Unix would be:               for FILE in $BASE_WORK_DIR/*.pdf        do          echo $FILE        done      This will echo all `.pdf` files inside BASE_WORK_DIR directory. What if `BASE_WORK_DIR` contains sub directories as well which also contain the pdf file. In that case how can I design my for loop to take all pdf files from `BASE_WORK_DIR` as well as sub directories of `BASE_WORK_DIR` ?


passing filename with spaces to a shell script

The shellscript is very simple:               retroarch $* -c /tmp/retroarch/Data/retroarch/gambatte.cfg      ("retroarch" is another shellscript) If the filename passed contains spaces it fails:               RetroArch [ERROR] :: Could not read ROM file.


Cannot execute files on another partition

On my system I have three partitions: one is shared between W7 and Linux Mint (NTFS), and the other two are OS-specific. In my home directory I have created a symbolic link to another directory on the shared partition. I have a simple `.cpp` file there which I compiled via `g++ name.cpp`. Usually, this would also make the file executable, but this time I had to manually `chmod 755` it. Strangely, this didn't work either, the console said it did not have the required permission. So I executed `sudo chmod 755 a.out`. This asked me for my password, and reported no errors. However, it had no effect. `a.out` was not executable. I've noticed some other strange behaviors in symlink directories too. Whats going on and how can I fix it? **Edit:**   My mount options:               # /etc/fstab: static file system information.     #     # Use 'blkid' to print the universally unique identifier for a     # device; this may be used with UUID= as a more robust way to name devices     # that works even if disks are added and removed. See fstab(5).     #     # <file system> <mount point>   <type>  <options>       <dump>  <pass>     proc            /proc           proc    nodev,noexec,nosuid 0       0     # / was on /dev/sda6 during installation     UUID=7c50dab1-730b-4d3c-a944-51da19c8e2c6 /               ext4    errors=remount-ro 0       1     # swap was on /dev/sda7 during installation     UUID=12e39b76-7f19-4c6d-a724-81ea29211db1 none            swap    sw              0       0     /dev/sda5 /media/yannbane/Shared ntfs defaults,fmask=117,dmask=007,gid=46 0 0


Removing builtin modules in Linux

I'm currently attempting to remove the usbserial module in order to install a new driver module. When I attempt to remove the module I get the following issue:               [root@localhost xr21v141x-lnx-3.0-pak]# modprobe -r usbserial     FATAL: Module usbserial is builtin      How can I remove the usbserial module?


Create Logical Volume with non-LVM partition

I'm not sure if the title actually depicts my question, but I will try to explain. I have seen everywhere it is mentioned to create a partition of type LVM (8e) and then create logical volume with lvcreate. My question is, what if I create logical volume using lvcreate with non-LVM (83 Linux) disks/parition? I have actually created one so it is possible without changing it to LVM (8e) but I wonder what's the disadvantage of doing this? Is there anything/feature I won't be able to do using this way? Thank you, I hope the question makes sense. Edit: Just to demonstrate my point with an example:               # fdisk -l /dev/sdb        Device Boot      Start         End      Blocks   Id  System     /dev/sdb1               1         132     1060258+  82  Linux swap / Solaris     /dev/sdb2             133         394     2104515   83  Linux     /dev/sdb3             395         656     2104515   83  Linux     /dev/sdb4             657        1044     3116610   83  Linux      Note all sdb[234] are type 83               [root@localhost ~]# pvs       PV         VG          Fmt  Attr PSize PFree        /dev/sdb2  vol_group01 lvm2 a--  2.00g 52.00m       /dev/sdb3  vol_group01 lvm2 a--  2.00g  2.00g       /dev/sdb4  vol_group01 lvm2 a--  2.97g  2.97g                         [root@localhost ~]# vgdisplay -v  vol_group01         Using volume group(s) on command line         Finding volume group "vol_group01"       --- Volume group ---       VG Name               vol_group01       System ID                    Format                lvm2       Metadata Areas        3       Metadata Sequence No  5       VG Access             read/write       VG Status             resizable       MAX LV                0       Cur LV                1       Open LV               0       Max PV                0       Cur PV                3       Act PV                3       VG Size               6.98 GiB       PE Size               4.00 MiB       Total PE              1786       Alloc PE / Size       500 / 1.95 GiB       Free  PE / Size       1286 / 5.02 GiB       VG UUID               3lw7zo-rIb1-Px1v-qn5Q-FErx-eFAp-QvTosm            --- Logical volume ---       LV Path                /dev/vol_group01/Log_Vol01       LV Name                Log_Vol01       VG Name                vol_group01       LV UUID                Z6FMzG-WHFS-Z8iQ-gnps-DqkM-oJtc-kPupmq       LV Write Access        read/write       LV Creation host, time localhost.localdomain, 2013-01-19 21:13:58 +0000       LV Status              available       # open                 0       LV Size                1.95 GiB       Current LE             500       Segments               1       Allocation             inherit       Read ahead sectors     auto       - currently set to     256       Block device           253:2            --- Physical volumes ---       PV Name               /dev/sdb2            PV UUID               5IFORy-K475-xgYl-w7wL-ILA8-B4Ib-e6RobL       PV Status             allocatable       Total PE / Free PE    513 / 13            PV Name               /dev/sdb3            PV UUID               v4wc0X-16P2-x1cY-A9Pu-Dl3W-Us1N-A26EBp       PV Status             allocatable       Total PE / Free PE    513 / 513            PV Name               /dev/sdb4            PV UUID               L4uHEc-0Fnt-BLIa-9T5v-0IxP-o8PX-diQx5N       PV Status             allocatable       Total PE / Free PE    760 / 760


How to mount iso9660 filesystem as read write

Hey my iso file won't accept device files so I was wondering how I could mount a cdrw with an iso9660 filesystem as read write to copy device files to the cdrw.


Installing install-info

I do not have root privileges in my system and I have noticed that I don't have access to a `install-info` binary, even though I need to install an Emacs package (CEDET). In the past, whenever I had to use a binary not provided by the system admin, I downloaded it to my home directory and installed it there for my personal use. I would like to do the same thing with `install-info` (i.e. install it under my home directory) but I don't know where to download it from. How can I get `install-info` and install it in my home directory?


Weston Global Configuration

I have installed Weston, and I would like to change the keyboard default layout it uses. Is there a global file to do this in? I know I can do it on a per-user base but that seems redundant as everyone will be using the same layout. I'm running ArchLinux if it matters.


Bandwith monitoring in Linux

I just need to get how much bandwidth is used in 3 or 4 days. Do you have any application in the terminal to do it? I'd prefer if it didn't use SNMP. I found `iptraf`, `wireshark`, `cacti`, but they were not what I am looking for. Of course I need to save my results; for a single computer, not a network. It's very important that I can see the total size of inbound and outboud traffic. What solutions are there for me?


Automatically change file permission upon write to a folder

How can I create directories so:               /data     /data/user1     /data/user2      and make sure that whenever `root` writes inside them, depending on which directory it writes to, different owners are set. Example:   1. Root writes to /data -> normal file creation    2. Root writes to /data/user1 -> any files created therein are automatically owned by user1 and readable by others (the same should apply if user1 writes to the dir himself)


Is there a way to change device names in /dev directory?

I wrote this rule for testing purpose:               SUBSYSTEMS=="usb", ATTRS{manufacturer}=="Kingston", ATTRS{serial}=="001CC0EC34A2BB318709004B", ATTRS{idVendor}=="0951", ATTRS{idProduct}=="1642", SYMLINK+="pen", NAME="pendrak"      based on the following info:               # udevadm info --name=/dev/sdb --attribute-walk          Udevadm info starts with the device specified by the devpath and then     walks up the chain of parent devices. It prints for every device     found, all possible attributes in the udev rules key format.     A rule to match, can be composed by the attributes of the device     and the attributes from one single parent device.            looking at device '/devices/pci0000:00/0000:00:1d.7/usb2/2-5/2-5:1.0/host2/target2:0:0/2:0:0:0/block/sdb':         KERNEL=="sdb"         SUBSYSTEM=="block"         DRIVER==""         ATTR{ro}=="0"         ATTR{size}=="30299520"         ATTR{stat}=="     419        0     3352     1208        0        0        0        0        0     1120     1208"         ATTR{range}=="16"         ATTR{discard_alignment}=="0"         ATTR{events}=="media_change"         ATTR{ext_range}=="256"         ATTR{events_poll_msecs}=="3000"         ATTR{alignment_offset}=="0"         ATTR{inflight}=="       0        0"         ATTR{removable}=="1"         ATTR{capability}=="51"         ATTR{events_async}==""            looking at parent device '/devices/pci0000:00/0000:00:1d.7/usb2/2-5/2-5:1.0/host2/target2:0:0/2:0:0:0':         KERNELS=="2:0:0:0"         SUBSYSTEMS=="scsi"         DRIVERS=="sd"         ATTRS{rev}=="PMAP"         ATTRS{type}=="0"         ATTRS{scsi_level}=="0"         ATTRS{model}=="DT 101 G2       "         ATTRS{state}=="running"         ATTRS{queue_type}=="none"         ATTRS{iodone_cnt}=="0x2da"         ATTRS{iorequest_cnt}=="0x2da"         ATTRS{evt_capacity_change_reported}=="0"         ATTRS{timeout}=="30"         ATTRS{evt_media_change}=="0"         ATTRS{max_sectors}=="240"         ATTRS{ioerr_cnt}=="0x2"         ATTRS{queue_depth}=="1"         ATTRS{vendor}=="Kingston"         ATTRS{evt_soft_threshold_reached}=="0"         ATTRS{device_blocked}=="0"         ATTRS{evt_mode_parameter_change_reported}=="0"         ATTRS{evt_lun_change_reported}=="0"         ATTRS{evt_inquiry_change_reported}=="0"         ATTRS{iocounterbits}=="32"         ATTRS{eh_timeout}=="10"            looking at parent device '/devices/pci0000:00/0000:00:1d.7/usb2/2-5/2-5:1.0/host2/target2:0:0':         KERNELS=="target2:0:0"         SUBSYSTEMS=="scsi"         DRIVERS==""            looking at parent device '/devices/pci0000:00/0000:00:1d.7/usb2/2-5/2-5:1.0/host2':         KERNELS=="host2"         SUBSYSTEMS=="scsi"         DRIVERS==""            looking at parent device '/devices/pci0000:00/0000:00:1d.7/usb2/2-5/2-5:1.0':         KERNELS=="2-5:1.0"         SUBSYSTEMS=="usb"         DRIVERS=="usb-storage"         ATTRS{bInterfaceClass}=="08"         ATTRS{bInterfaceSubClass}=="06"         ATTRS{bInterfaceProtocol}=="50"         ATTRS{bNumEndpoints}=="02"         ATTRS{supports_autosuspend}=="1"         ATTRS{bAlternateSetting}==" 0"         ATTRS{bInterfaceNumber}=="00"            looking at parent device '/devices/pci0000:00/0000:00:1d.7/usb2/2-5':         KERNELS=="2-5"         SUBSYSTEMS=="usb"         DRIVERS=="usb"         ATTRS{bDeviceSubClass}=="00"         ATTRS{bDeviceProtocol}=="00"         ATTRS{devpath}=="5"         ATTRS{idVendor}=="0951"         ATTRS{speed}=="480"         ATTRS{bNumInterfaces}==" 1"         ATTRS{bConfigurationValue}=="1"         ATTRS{bMaxPacketSize0}=="64"         ATTRS{busnum}=="2"         ATTRS{devnum}=="4"         ATTRS{configuration}==""         ATTRS{bMaxPower}=="200mA"         ATTRS{authorized}=="1"         ATTRS{bmAttributes}=="80"         ATTRS{bNumConfigurations}=="1"         ATTRS{maxchild}=="0"         ATTRS{bcdDevice}=="0100"         ATTRS{avoid_reset_quirk}=="0"         ATTRS{quirks}=="0x0"         ATTRS{serial}=="001CC0EC34A2BB318709004B"         ATTRS{version}==" 2.00"         ATTRS{urbnum}=="1927"         ATTRS{ltm_capable}=="no"         ATTRS{manufacturer}=="Kingston"         ATTRS{removable}=="unknown"         ATTRS{idProduct}=="1642"         ATTRS{bDeviceClass}=="00"         ATTRS{product}=="DT 101 G2"            looking at parent device '/devices/pci0000:00/0000:00:1d.7/usb2':         KERNELS=="usb2"         SUBSYSTEMS=="usb"         DRIVERS=="usb"         ATTRS{bDeviceSubClass}=="00"         ATTRS{bDeviceProtocol}=="00"         ATTRS{devpath}=="0"         ATTRS{idVendor}=="1d6b"         ATTRS{speed}=="480"         ATTRS{bNumInterfaces}==" 1"         ATTRS{bConfigurationValue}=="1"         ATTRS{bMaxPacketSize0}=="64"         ATTRS{authorized_default}=="1"         ATTRS{busnum}=="2"         ATTRS{devnum}=="1"         ATTRS{configuration}==""         ATTRS{bMaxPower}=="0mA"         ATTRS{authorized}=="1"         ATTRS{bmAttributes}=="e0"         ATTRS{bNumConfigurations}=="1"         ATTRS{maxchild}=="8"         ATTRS{bcdDevice}=="0312"         ATTRS{avoid_reset_quirk}=="0"         ATTRS{quirks}=="0x0"         ATTRS{serial}=="0000:00:1d.7"         ATTRS{version}==" 2.00"         ATTRS{urbnum}=="89"         ATTRS{ltm_capable}=="no"         ATTRS{manufacturer}=="Linux 3.12-1-amd64 ehci_hcd"         ATTRS{removable}=="unknown"         ATTRS{idProduct}=="0002"         ATTRS{bDeviceClass}=="09"         ATTRS{product}=="EHCI Host Controller"            looking at parent device '/devices/pci0000:00/0000:00:1d.7':         KERNELS=="0000:00:1d.7"         SUBSYSTEMS=="pci"         DRIVERS=="ehci-pci"         ATTRS{irq}=="23"         ATTRS{subsystem_vendor}=="0x1458"         ATTRS{broken_parity_status}=="0"         ATTRS{class}=="0x0c0320"         ATTRS{companion}==""         ATTRS{consistent_dma_mask_bits}=="32"         ATTRS{dma_mask_bits}=="32"         ATTRS{local_cpus}=="00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000003"         ATTRS{device}=="0x27cc"         ATTRS{uframe_periodic_max}=="100"         ATTRS{enable}=="1"         ATTRS{msi_bus}==""         ATTRS{local_cpulist}=="0-1"         ATTRS{vendor}=="0x8086"         ATTRS{subsystem_device}=="0x5006"         ATTRS{numa_node}=="-1"         ATTRS{d3cold_allowed}=="1"            looking at parent device '/devices/pci0000:00':         KERNELS=="pci0000:00"         SUBSYSTEMS==""         DRIVERS==""      and:               # udevadm info --name=/dev/sdb     P: /devices/pci0000:00/0000:00:1d.7/usb2/2-5/2-5:1.0/host2/target2:0:0/2:0:0:0/block/sdb     N: sdb     S: disk/by-id/usb-Kingston_DT_101_G2_001CC0EC34A2BB318709004B-0:0     S: disk/by-path/pci-0000:00:1d.7-usb-0:5:1.0-scsi-0:0:0:0     S: pen     E: DEVLINKS=/dev/disk/by-id/usb-Kingston_DT_101_G2_001CC0EC34A2BB318709004B-0:0 /dev/disk/by-path/pci-0000:00:1d.7-usb-0:5:1.0-scsi-0:0:0:0 /dev/pen     E: DEVNAME=/dev/sdb     E: DEVPATH=/devices/pci0000:00/0000:00:1d.7/usb2/2-5/2-5:1.0/host2/target2:0:0/2:0:0:0/block/sdb     E: DEVTYPE=disk     E: ID_BUS=usb     E: ID_INSTANCE=0:0     E: ID_MODEL=DT_101_G2     E: ID_MODEL_ENC=DT\x20101\x20G2\x20\x20\x20\x20\x20\x20\x20     E: ID_MODEL_ID=1642     E: ID_PART_TABLE_TYPE=dos     E: ID_PATH=pci-0000:00:1d.7-usb-0:5:1.0-scsi-0:0:0:0     E: ID_PATH_TAG=pci-0000_00_1d_7-usb-0_5_1_0-scsi-0_0_0_0     E: ID_REVISION=PMAP     E: ID_SERIAL=Kingston_DT_101_G2_001CC0EC34A2BB318709004B-0:0     E: ID_SERIAL_SHORT=001CC0EC34A2BB318709004B     E: ID_TYPE=disk     E: ID_USB_DRIVER=usb-storage     E: ID_USB_INTERFACES=:080650:     E: ID_USB_INTERFACE_NUM=00     E: ID_VENDOR=Kingston     E: ID_VENDOR_ENC=Kingston     E: ID_VENDOR_ID=0951     E: MAJOR=8     E: MINOR=16     E: SUBSYSTEM=block     E: USEC_INITIALIZED=32380484      But when I wanted to test it, it gave me this log:               # udevadm test /devices/pci0000:00/0000:00:1d.7/usb2/2-5/2-5:1.0/host2/target2:0:0/2:0:0:0/block/sdb     calling: test     version 204     This program is for debugging only, it does not run any program     specified by a RUN key. It may show incorrect results, because     some values may be different, or not available at a simulation run.          === trie on-disk ===     tool version:          204     file size:         5729797 bytes     header size             80 bytes     strings            1262125 bytes     nodes              4467592 bytes     load module index     Skipping overridden file: /lib/udev/rules.d/95-keymap.rules.     read rules file: /lib/udev/rules.d/42-usb-hid-pm.rules     read rules file: /lib/udev/rules.d/50-firmware.rules     read rules file: /lib/udev/rules.d/50-udev-default.rules     read rules file: /lib/udev/rules.d/55-dm.rules     read rules file: /lib/udev/rules.d/56-lvm.rules     read rules file: /lib/udev/rules.d/60-cdrom_id.rules     read rules file: /lib/udev/rules.d/60-fuse.rules     read rules file: /lib/udev/rules.d/60-gnupg.rules     read rules file: /lib/udev/rules.d/60-libfreenect0.2.rules     read rules file: /lib/udev/rules.d/60-libgphoto2-6.rules     read rules file: /lib/udev/rules.d/60-libpisock9.rules     read rules file: /lib/udev/rules.d/60-libsane.rules     read rules file: /lib/udev/rules.d/60-nvidia-kernel-common.rules     read rules file: /lib/udev/rules.d/60-pcmcia.rules     read rules file: /lib/udev/rules.d/60-persistent-alsa.rules     read rules file: /lib/udev/rules.d/60-persistent-input.rules     read rules file: /lib/udev/rules.d/60-persistent-serial.rules     read rules file: /lib/udev/rules.d/60-persistent-storage-dm.rules     read rules file: /lib/udev/rules.d/60-persistent-storage-tape.rules     read rules file: /lib/udev/rules.d/60-persistent-storage.rules     read rules file: /lib/udev/rules.d/60-persistent-v4l.rules     read rules file: /lib/udev/rules.d/60-virtualbox-dkms.rules     read rules file: /lib/udev/rules.d/60-virtualbox.rules     read rules file: /lib/udev/rules.d/61-accelerometer.rules     read rules file: /etc/udev/rules.d/61-removable-storage-polling.rules     read rules file: /lib/udev/rules.d/64-btrfs.rules     read rules file: /lib/udev/rules.d/64-xorg-xkb.rules     read rules file: /lib/udev/rules.d/69-cd-sensors.rules     IMPORT found builtin 'usb_id --export %p', replacing /lib/udev/rules.d/69-cd-sensors.rules:89     read rules file: /lib/udev/rules.d/69-libmtp.rules     read rules file: /lib/udev/rules.d/69-lvm-metad.rules     read rules file: /lib/udev/rules.d/69-xorg-vmmouse.rules     read rules file: /lib/udev/rules.d/70-btrfs.rules     read rules file: /etc/udev/rules.d/70-persistent-cd.rules     read rules file: /etc/udev/rules.d/70-persistent-net.rules     read rules file: /lib/udev/rules.d/70-power-switch.rules     read rules file: /lib/udev/rules.d/70-udev-acl.rules     read rules file: /etc/udev/rules.d/70-zram.rules     read rules file: /lib/udev/rules.d/75-cd-aliases-generator.rules     read rules file: /lib/udev/rules.d/75-net-description.rules     read rules file: /lib/udev/rules.d/75-persistent-net-generator.rules     read rules file: /lib/udev/rules.d/75-probe_mtd.rules     read rules file: /lib/udev/rules.d/75-tty-description.rules     read rules file: /lib/udev/rules.d/78-sound-card.rules     read rules file: /lib/udev/rules.d/80-btrfs-lvm.rules     read rules file: /lib/udev/rules.d/80-drivers.rules     read rules file: /lib/udev/rules.d/80-net-name-slot.rules     read rules file: /lib/udev/rules.d/80-networking.rules     read rules file: /lib/udev/rules.d/85-hdparm.rules     read rules file: /lib/udev/rules.d/85-hwclock.rules     read rules file: /lib/udev/rules.d/90-alsa-restore.rules     read rules file: /lib/udev/rules.d/90-pulseaudio.rules     read rules file: /lib/udev/rules.d/91-permissions.rules     read rules file: /lib/udev/rules.d/95-cd-devices.rules     read rules file: /lib/udev/rules.d/95-keyboard-force-release.rules     read rules file: /etc/udev/rules.d/95-keymap.rules     read rules file: /lib/udev/rules.d/95-udev-late.rules     read rules file: /lib/udev/rules.d/97-bluetooth-hid2hci.rules     read rules file: /etc/udev/rules.d/99-local.rules     rules contain 393216 bytes tokens (32768 * 12 bytes), 31233 bytes strings     27768 strings (226512 bytes), 24687 de-duplicated (198361 bytes), 3082 trie nodes used     IMPORT builtin 'usb_id' /lib/udev/rules.d/60-persistent-storage.rules:68     /sys/devices/pci0000:00/0000:00:1d.7/usb2/2-5/2-5:1.0: if_class 8 protocol 6     IMPORT builtin 'path_id' /lib/udev/rules.d/60-persistent-storage.rules:89     LINK 'disk/by-id/usb-Kingston_DT_101_G2_001CC0EC34A2BB318709004B-0:0' /lib/udev/rules.d/60-persistent-storage.rules:108     LINK 'disk/by-path/pci-0000:00:1d.7-usb-0:5:1.0-scsi-0:0:0:0' /lib/udev/rules.d/60-persistent-storage.rules:130     IMPORT '/sbin/blkid -o udev -p /dev/sdb' /lib/udev/rules.d/60-persistent-storage.rules:151     starting '/sbin/blkid -o udev -p /dev/sdb'     '/sbin/blkid -o udev -p /dev/sdb' [12103] exit with return code 0     RUN '/etc/init.d/hdparm hotplug' /lib/udev/rules.d/85-hdparm.rules:1     GROUP 6 /lib/udev/rules.d/91-permissions.rules:4     GROUP 25 /lib/udev/rules.d/91-permissions.rules:5     GROUP 25 /lib/udev/rules.d/91-permissions.rules:9     NAME="pendrak" ignored, kernel device nodes can not be renamed; please fix it in /etc/udev/rules.d/99-local.rules:1     LINK 'pen' /etc/udev/rules.d/99-local.rules:1     handling device node '/dev/sdb', devnum=b8:16, mode=0660, uid=0, gid=25     preserve permissions /dev/sdb, 060660, uid=0, gid=25     preserve already existing symlink '/dev/block/8:16' to '../sdb'     found 'b8:16' claiming '/run/udev/links/\x2fdisk\x2fby-id\x2fusb-Kingston_DT_101_G2_001CC0EC34A2BB318709004B-0:0'     creating link '/dev/disk/by-id/usb-Kingston_DT_101_G2_001CC0EC34A2BB318709004B-0:0' to '/dev/sdb'     preserve already existing symlink '/dev/disk/by-id/usb-Kingston_DT_101_G2_001CC0EC34A2BB318709004B-0:0' to '../../sdb'     found 'b8:16' claiming '/run/udev/links/\x2fdisk\x2fby-path\x2fpci-0000:00:1d.7-usb-0:5:1.0-scsi-0:0:0:0'     creating link '/dev/disk/by-path/pci-0000:00:1d.7-usb-0:5:1.0-scsi-0:0:0:0' to '/dev/sdb'     preserve already existing symlink '/dev/disk/by-path/pci-0000:00:1d.7-usb-0:5:1.0-scsi-0:0:0:0' to '../../sdb'     found 'b8:16' claiming '/run/udev/links/\x2fpen'     creating link '/dev/pen' to '/dev/sdb'     preserve already existing symlink '/dev/pen' to 'sdb'     .ID_FS_TYPE_NEW=     ACTION=add     DEVLINKS=/dev/disk/by-id/usb-Kingston_DT_101_G2_001CC0EC34A2BB318709004B-0:0 /dev/disk/by-path/pci-0000:00:1d.7-usb-0:5:1.0-scsi-0:0:0:0 /dev/pen     DEVNAME=/dev/sdb     DEVPATH=/devices/pci0000:00/0000:00:1d.7/usb2/2-5/2-5:1.0/host2/target2:0:0/2:0:0:0/block/sdb     DEVTYPE=disk     ID_BUS=usb     ID_FS_TYPE=     ID_INSTANCE=0:0     ID_MODEL=DT_101_G2     ID_MODEL_ENC=DT\x20101\x20G2\x20\x20\x20\x20\x20\x20\x20     ID_MODEL_ID=1642     ID_PART_TABLE_TYPE=dos     ID_PATH=pci-0000:00:1d.7-usb-0:5:1.0-scsi-0:0:0:0     ID_PATH_TAG=pci-0000_00_1d_7-usb-0_5_1_0-scsi-0_0_0_0     ID_REVISION=PMAP     ID_SERIAL=Kingston_DT_101_G2_001CC0EC34A2BB318709004B-0:0     ID_SERIAL_SHORT=001CC0EC34A2BB318709004B     ID_TYPE=disk     ID_USB_DRIVER=usb-storage     ID_USB_INTERFACES=:080650:     ID_USB_INTERFACE_NUM=00     ID_VENDOR=Kingston     ID_VENDOR_ENC=Kingston     ID_VENDOR_ID=0951     MAJOR=8     MINOR=16     SUBSYSTEM=block     USEC_INITIALIZED=32380484     run: '/etc/init.d/hdparm hotplug'     unload module index      And as you can see, the symlink is created, but the name hasn't changed, and I got the following error:               NAME="pendrak" ignored, kernel device nodes can not be renamed; please fix it in /etc/udev/rules.d/99-local.rules:1      The other thing is that the link points randomly to sdb, sdb1, sdb2, etc:               # ls -al /dev/pen     lrwxrwxrwx 1 root root 3 Mar 13 12:49 /dev/pen -> sdb     # ls -al /dev/pen     lrwxrwxrwx 1 root root 4 Mar 13 12:53 /dev/pen -> sdb2     # ls -al /dev/pen     lrwxrwxrwx 1 root root 4 Mar 13 12:53 /dev/pen -> sdb1     # ls -al /dev/pen     lrwxrwxrwx 1 root root 4 Mar 13 12:53 /dev/pen -> sdb2     # ls -al /dev/pen     lrwxrwxrwx 1 root root 4 Mar 13 12:53 /dev/pen -> sdb3      It changes every time I plug the pendrive in. The task here is to change the name of the device from sdb (or whatever that would be) to `pendrak` and also create a link to it. The error claimed that "kernel device nodes can not be renamed" -- does it mean that I can't change the name at all, and all I can do is to create symlinks?


SUSE Linux 12 - configuring IP alias

I want to setup an IP address alias on a network card. I created a file `/etc/sysconfig/network/ifcfg-ens160` and its contents are:               BOOTPROTO='static'     STARTMODE='onboot'     IPADDR='192.168.0.113'     NETMASK='255.255.255.0'     BROADCAST=''     ETHTOOL_OPTIONS=''     MTU=''     NAME=''     NETWORK=''     REMOTE_IPADDR=''     IPADDR_0='192.168.0.194'     NETMASK_0='255.255.255.0'     LABEL_0='0'      Restarted network using `systemctl restart network.service`. Still when I do `ifconfig -a` I do not get IP address from alias (IPADDR_0) only it shows IP address mentioned in `IPADDR`. When I do individual interface restart:               ifdown ens160:0     ifdown: no matching interfaces          ifup ens160     wicked: No valid configuration files found at /etc/wicked/ifconfig     ifup: no matching interfaces      But I notice that pings to both IP address works. It just that it does not showup in the list when I give ifconfig -a. I suspect that I have to create a config file in /etc/wicked/ifconfig to get this listed in ifconfig -a. Is there any way to detect if IP alias is set other than ifconfig -a.


As root, how can I list the crontabs for all users?

I have a script being run automatically that I can't find in the crontab for the expected users, so I'd like to search all users' crontabs for it. Essentially I want to run a `crontab -l` for all users.


how to record different values of a "flag" file

I have a black-box system that periodically updates a single-line "flag" file. This single-line file takes, over the course of the system's life various different values, corresponding to the states of an FSM. E.g. like "downloading", "validating", "posting", etc. At any given point in time the value is different so the software must be opening the "flag" file, truncating it, and writing the new single-line value. How can I maintain a log of the succession of different values? I was thinking something like `tail -f` but with the ability to record the different values and with a way that's guaranteed not to mess with the file system when the software is updating of those values. A simple `tail -f` fails with "file truncated" after some time.


Secure FOSS alternative to Skype on Linux & OpenBSD?

Criteria:   * Makes audio/video calls   * Encrypts the whole traffic (using good encryption)   * Is cross-platform (including Windows 7, etc.)   * Runs on modern Linux distributions (Fedora, Ubuntu, etc.)   * Runs on OpenBSD Does anybody know a good Free and Open-Source alternative to Skype?


What is "link beat"?

I have a Linux 2.6 box that uses ifplugd to bring up the network. While initialising, the logs say, `"Initialisation complete. Link beat not detected."` and then it goes into releasing the present address and obtaining lease all over again. My question therefore would be:   * What is link beat?    * What does it mean if a link beat is not detected?    * Why is this so critical? What determines if a link beat is present or not?


Google Chrome on OpenBSD

How can I install Google Chrome on OpenBSD?


Linux boots sometimes into kernel instead of Openbox

I have a Solid-Run Cubox and installed Debian Netboot on it. Now I want to configure it as webserver/kiosk PC to run a self made webapp. I installed `xorg`, `openbox`, `apache`/`php` libs and wrote my own python script as a web browser and did this to boot as root into the Openbox application: I changed in `/etc/inittab` (auto login as root):               T0:23:respawn:/sbin/getty -L ttyS0 115200 linux      into               1:2345:respawn:/bin/login -f root tty1 </dev/tty1 >/dev/tty1 2>&1      and in my `/etc/rc.profile` I added (to start Openbox at boot):               startx      and added my python script to `/etx/xdg/openbox/autostart.xml`               /usr/bin/web.py &      Unfortunately, it sometimes (1 in 3 boots) only boots to the kernel, I'm logged in as root, but my Openbox hasn't started. When I manually type the `startx` command everything works fine. Someone who has an idea to fix this?


GStreamer and sample rate conversion

I have a soundcard that is only partially supported in Alsa, i.e. playback is only working in 48 kHz. Most of my audio files are in 44.1 kHz, and I would like to use Exaile as my audio player, as it has all the functionality that I need. The problem is, that gstreamer - the backend for exaile - does not convert the sample rate with my current settings, so playing back the audio files will result in a speed up, while playing the files with mplayer works just fine, mplayer does sample rate conversion on playback. Is there a way to get gstreamer to convert the sample rate? **EDIT:** The sound card in question is an E-MU 0404 PCI express, see http://alsa-project.org/main/index.php/Matrix:Vendor-Creative_Labs and http://alsa-project.org/main/index.php/Matrix:Module-emu10k1-fpga


Monitor does not switch off

I set the monitor to switch off after 14 minutes. But what happens is that it cycles between being off a second and backlight comes on another. I am sure that this is a Linux issue for the monitor does switches off after a set time in Windows 7. I run Debian Jessie, 3.10-3-amd64, KDE 4.10.5. I use DVI for connection. Graphic card: Nvidia GeForce 7600gs, Monitor: Lenovo Thinkvision L220x. I don't use any screensaver. Also, despite I use DVI, KDE system settings think that I use VGA (maybe this is normal): ![enter image description here](http://i.stack.imgur.com/BGFlS.png) This is how my power settings are: ![enter image description here](http://i.stack.imgur.com/6aQlE.png)


Configure timestamp format of kernel log?

Is there a way to change the format of timestamp in kernel logs? It was something like `2012-08-27T8:54:35.939421+03:00` now, I also checked `sysctl -a | grep log`, nothing found really.


Download only recently modified files with wget over FTP

When fetching recursively with `wget` from an FTP server, how can I download only files modified after a given date? The use case is that I need to sync with several servers nightly, but I only need the data from a couple days back. The `\--mirror` flag would suffice, except that syncing the rest of the data (even just once) would take forever.


Remove empty directory trees (removing as many directories as possible but no files)

Suppose I have a dir tree like this:               ROOTDIR         └--SUBDIR1             └----SUBDIR2                 └----SUBDIR3      I am looking for a command such that when I input:               $ [unknown command] ROOTDIR      The whole dir tree can be deleted **if there is no file but only dirs inside the whole tree**. However, say if there is a file called hello.pdf under SUBDIR1:               ROOTDIR         └--SUBDIR1             └--hello.pdf             └----SUBDIR2                 └----SUBDIR3      Then the command must only delete SUBDIR2 and below.


Use desktop speakers over SSH from laptop

I have VLC media player and media files on a desktop CentOS 6.3 set up (without a GUI). I can play the media files at the machine but when I issue the command via SSH it is silent. I'm guessing it's because there is peripheral confusion when using SSH. I looked into X11 forwarding but I must not be understanding it correctly because it still doesn't work. I'm starting to think that's for GUI purposes and not CLI. How can I SSH to my desktop and use the peripherals of the desktop when I issue the commands remotely?


What is the general format of keyname for key bindings in "inputrc" file?

I understand that the format for key bindings in `inputrc` file is:               keyname: function-name or macro      For keyname, I saw things like:               "\e[B"     "\e[1~"     "\e[5D"     "\M-l"     "\C-[OD"     "\e\e[D"      What is the meaning of these keynames, and what is the general format for keyname ? Please share a link to docs.


How to fix a fragmented ext disk - myth or truth?

I just read this article about the virtually non-existent disk fragmentation on *nix filesystems. It was mentioned that due to the way `ext` handles writing data to the disks, fragmentation may only begin manifesting on hard drives that are at least 80%, where the free space between the files starts to run out. On how to deal with this fragmentation, the final paragraph reads: > If you actually need to defragment a file system, the simplest way is > probably the most reliable: Copy all the files off the partition, erase the > files from the partition, then copy the files back onto the partition. The > file system will intelligently allocate the files as you copy them back onto > the disk. That sounds illogical to me. Because as far as I understand, when copying all files back to the erased drive, a similar process should take place where files are written and written with gradually decreasing portions of free space between them, to the point where fragmentation will manifest again. Am I right on this one?


Restart USB mouse driver?

Sometimes, after some event that I can't determine, my USB mouse gets stuttery - like the refresh rate drops down to about 5-10Hz. It still works fine other than that, but it's incredibly annoying, and makes the computer feel really slow. It appears to happen frequently after a sleep, but it sometimes happens when the computer has just booted up. A reboot usually fixes it. I've tried:   * unplugging and replugging the mouse.   * `rmmod` in usbhid and hid, and modprobing them (and psmouse, which is irrelevant)   * restarting `udev` (with mouse in and out)   * killing X, and starting it again   * plugging in a second USB mouse - problem remains, with both mice. I would like to find a way to "reset" my mouse, without having to reboot. Is there anything else I should try? I am running Kubuntu 12.04. this is a laptop, and the touchpad is unaffected.


Which Gentoo profile?

I'm installing Gentoo as a guest on a VMware virtual machine on an iMac host. I'm asked to select a profile and the list has 22 options.               [1]  default/linux/amd64/10.0     [2]  default/linux/amd64/10.0/selinux     [3]  default/linux/amd64/10.0/desktop     [4]  default/linux/amd64/10.0/desktop/gnome     ...     [7]  default/linux/amd64/10.0/no-multilib *     ...     [10] default/linux/amd64/13.0     ...      Currently the 10.0/no-multilib profile is selected. I'm intending to use the virtual machine for experimenting, web browsing, running things that the Mac doesn't offer or that I don't want to install permanently. I will probably run neither Gnome nor KDE but a lightweight WM. I am inclined to select the 'desktop' profile, but which should I use, 10 or 13 (and what happened to 11 and 12)? What do the 10/13 mean? They don't seem to correspond to a Gentoo 'version'. I've got the no-multilib profile currently because I downloaded the nm stage3. Perhaps I should stick with the no-multilib profile and adjust the USE flags?


Linux Mint 13 Xfce - Use Super_L in multiple shortcuts

I'm using the XfApplet for integrating the mintMenu into my Mint Xfce installation.   As shortcut I defined `Super_L` which works fine.   Additionally I want to define a shortcut `<Super_L>r` to execute `gnome- terminal`.   Unfortunately the `Super_L` keystroke gets interpreted and consumed early so that the mintMenu appears and types `r` into the search field. _Is it possible to configure that both shortcuts`Super_L` and `<Super_L>r` work properly?_ **Edit:** This is how the mintmenu looks like.   ![enter image description here](http://i.stack.imgur.com/JJ6SI.png)


Co Record Verification

I have a task requiring some awk to verify a few records quickly. Let' say:               A1,A2     B1,B2     C1,C2     C2,C1     A1,C1     A1,B1     B1,A1      Which would be the best way to check for reciprocity only between the A# the B# and the C# and output only the non reciprocal. For instance: the above should output               A2 -> A1     B2 -> B1      A# belong to one group, B# to another and so on. There's no interest in findind any sort of conexion between A# and C# or B#. Instead it is required to keep the search within the group of As, Bs, Cs and so on.


Does Chrome run on Debian kFreeBSD?

I know that some Linux applications run on FreeBSD. All the more so, they should run on Debian kFreeBSD (since it only uses a FreeBSD kernel while Linux userspace). Does Google Chrome (not Chromium, as I need flash) run on Debian kFreeBSD?


How to switch HP printer from CDROM mode to Printer/Scanner mode

I have an HP multifunction printer/scanner M1123 MFP. I installed the latest hplip that should support it and also hp-plugin. However, when I plug the device in, I only see a CDROM detected in `dmesg`. `lsusb` only shows "Hewlett Packard" without anything else. This is one of those devices that shows up as a CDROM and then auto-installs the driver on Windows. Is there some command to make it switch from CDROM/USB memory more to "Printer/scanner" mode? `xsane` reports that it fails to find any device.


simple command to strip header and footer from a file

I want a simple little command to strip an XML-Header and Footer from a file:               <?xml version="1.0" encoding="UTF-8"?>     <conxml>     <MsgPain001>         <HashValue>A9C72997C702A2F841B0EEEC3BD274DE1CB7BEA4B813E030D068CB853BCFECA6</HashValue>         <HashAlgorithm>SHA256</HashAlgorithm>         <Document>                     ...         </Document>         <Document>                     ...         </Document>     </MsgPain001>     </conxml>      ... Should become just               <Document>              ...         </Document>         <Document>               ...         </Document>      (note the indenting, the indent of the first document-tag should be stripped of. This sounds like a (greedy) regex               <Document>.*</Document>      But I don't get it due to the linefeeds. Could someone provide a simple `sed` script or similar to get it? I need it in a pipe to compute a hash over the contained documents.


process works without ampersand but doesn't work with ampersand

I wrote a small script to run as a daemon, everything seems to work when I run the command in unix:               php script.php      everything seems to work correctly, when I terminate that script and us the following, de script isn't running in the background:               php script.php &      What am I doing wrong? could it be a server problem or a script problem?


Is it safe to remove the .oh-my-zsh directory?

One point in time, I tried oh my zsh but it causes a lot of issues so I'm back at bash. I'm trying to clean up some files and notice there is a oh my zsh folder. The github instructions tell me to run uninstall oh my zsh but I don't see that script in my folder. Is it safe to remove `.oh-my-zsh` folder?


SAMBA Share - Keep user from deleting a file

I'm creating a hidden "Access Log" `.txt` file of employees accessing a program I've created and need to know how to make it so this file cannot be deleted. Reason being, this program helps to automate a lot of tasks that we perform on workstations, and it can do a lot of damage as well. So I need to track who accesses it just in case it becomes an issue. Reiterating the question, how do I keep anyone from deleting this file while still being able to write to it.


SSH - How to make X applications run on client?

I have the reverse problem that most people seem to be having. If I start an X application while logged into ssh, it displays on the server(host) machine instead of the client(local). This is the command I use               $ ssh -X -p 6623 pinker@192.168.0.200      My $DISPLAY variable appears correct on the client.               $ echo $DISPLAY     :0      I want X applications from the server to display locally on the client (the machine I'm physically at). I don't know what is causing this.


"Virtual" shell, ie. jailing an user inside a process after the (SSH) login

The title might not say much about the issue at hand so let me get straight to the point. Let's assume I have a casual user who can log in to the system via SSH into a bash shell. I also have a PHP (though the language is irrelevant here) script that acts as a process accepting various commands and other user input and acts according to them (essentially a 'shell-like' script). Now, what I want to do is to lock the user inside said PHP script, ie. run it as soon as the user logs in (this part is simple via .bashrc) but at the same time ensure that when the script execution ends, the user is also automatically 'kicked out' of bash and consequently the ssh session, so that he cannot do anything via bash itself and stays limited to what the PHP script offers. Is that even possible? If yes, how would I go about doing it? **Update:** Based on the answers so far - having bash inbetween my script and the user logging in via SSH is no requirement whatsoever. It just seemed like a necessity to me at first. Anything that forces the user into my script only directly after a SSH login is a welcome answer.


Cannot install Ubuntu on EFI/GPT scheme

Shame on me, I have more than 10 years using Linux and all of this about EFI and GPT is a nightmare :( I have a Dell Inspiron 14z Ultrabook and I cannot install Ubuntu; when I launch the installer it does not see any partitions. This is the output of `gdisk`:               root@ubuntu:/home/ubuntu# gdisk -l /dev/sda     GPT fdisk (gdisk) version 0.8.8          Caution: invalid backup GPT header, but valid main header; regenerating     backup header from main header.          Partition table scan:       MBR: protective       BSD: not present       APM: not present       GPT: damaged          ****************************************************************************     Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk     verification and recovery are STRONGLY recommended.     ****************************************************************************     Disk /dev/sda: 976773168 sectors, 465.8 GiB     Logical sector size: 512 bytes     Disk identifier (GUID): 4F89526A-5F1B-4BF9-8CD8-2ABAD827386D     Partition table holds up to 128 entries     First usable sector is 34, last usable sector is 976768613     Partitions will be aligned on 2048-sector boundaries     Total free space is 4029 sectors (2.0 MiB)          Number  Start (sector)    End (sector)  Size       Code  Name        1            2048         1026047   500.0 MiB   EF00  EFI system partition        2         1026048         1107967   40.0 MiB    FFFF  Basic data partition        3         1107968         1370111   128.0 MiB   0C01  Microsoft reserved part        4         1370112         2373631   490.0 MiB   2700  Basic data partition        5         2373632       956454911   454.9 GiB   0700  Basic data partition        6       956454912       976766598   9.7 GiB     2700  Microsoft recovery part               GPT fdisk (gdisk) version 0.8.8          Caution: invalid backup GPT header, but valid main header; regenerating     backup header from main header.          Partition table scan:       MBR: protective       BSD: not present       APM: not present       GPT: damaged          ****************************************************************************     Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk     verification and recovery are STRONGLY recommended.     ****************************************************************************     Disk /dev/sdb: 62533296 sectors, 29.8 GiB     Logical sector size: 512 bytes     Disk identifier (GUID): E570001D-72F5-4B82-9140-55C7BE414621     Partition table holds up to 128 entries     First usable sector is 34, last usable sector is 16777182     Partitions will be aligned on 2048-sector boundaries     Total free space is 4029 sectors (2.0 MiB)          Number  Start (sector)    End (sector)  Size       Code  Name        1            2048        16775167   8.0 GiB     8400  Basic data partition      This message appeared when I tried in the BIOS to change SATA from ISRT to AHCI, but anyway, Windows boots fine (I even disabled the fast startup thing). Before that Ubuntu installer had never seen the existing partitions. Please could you help me to install Linux?


yum - No package httpd available (new VPS)

So I have a new VPS that only has the bare bones. Not what I was expecting at all and I may be well past my depth but I'm trying to get the essentials running. The host is Swedish and aggressively unhelpful. `uname -a` output: > Linux myhostname.com 2.6.32-431.el6.i686 #1 SMP Fri Nov 22 00:26:36 UTC 2013 > i686 i686 i386 GNU/Linux So I was trying to locate and start Apache. `apachectl start` is unknown. `lsof -nPi | grep ":80 (LISTEN)"` has no output. There's no reference to `httpd` or `apache2` in `/etc/init.d/`. So I started by trying to install Apache like so:               $ yum install httpd     Loaded plugins: fastestmirror     Loading mirror speeds from cached hostfile      * base: ftp.sunet.se      * extras: ftp.sunet.se      * updates: ftp.sunet.se     Setting up Install Process     No package httpd available.     Error: Nothing to do      `rpm -qa | grep httpd` has no output so I checked `/etc/yum.conf` and I see `httpd` in exclude line:               exclude=bind-chroot courier* dovecot* exim* filesystem httpd* mod_ssl* mydns* mysql* nsd* php* proftpd* pure-ftpd* ruby* spamassassin* squirrelmail*      I'm stuck as to what to do. I'm pretty sure Apache is not present and PHP as well. MySQL is running fine. ### Questions   * Since the host is ignoring my emails what would be the harm in removing `httpd` from the ignore list?    * Also if `yum.conf` has no repositories listed do I need to add them?


Running Visual Studio 2010 in Linux

Is there any possible way to run Visual Studio 2010 in Linux (Red Hat)?


how to detect what DISPLAY is active/has input focus?

Is there some command (or trick) to detect what DISPLAY is active?   I mean active in a sense that it will "eat" all key strokes, and mouse clicks and moves; so it has the input focus.   I mean also for the simple hardware installation where the user has only one physical keyboard and only one mouse (usb or ps2). The default X session loads at ctrl+alt+f7 (:0) here.   I have another X at ctrl+alt+f8/f9 (:1).   I want to code a script that, when I go to :1, it automatically lock :0, or :1 accordingly. When the mouse is stopped and no key is being pressed, we are just staring at the screen; but, I think the "current active? (or both are?)" X must be watching the input for changes, while the other X is unable to watch such changes, that channel must be uniquely accessed in some way... any tips?


Aptitude - Remove all Packages in X11 catagory, except for dependencies of a specific package

I would like to remove most of the packages in the X11 category from my system, however some of those packages are depended on by the 'beaglebone' package. How could I ask aptitude to remove everything in the X11 category, with the exception of the packages depended on by 'beaglebone'? You can see below that it recommends 'beaglebone' as one of the packages that should be uninstalled at the risk of being broken.     ![Aptitude recommended removal. Beaglebone is included.](http://i.stack.imgur.com/jipE9.png) How can I make sure that this package and its dependencies are retained after the removal?


How to get GRUB back after overwrite?

I have an internal hard drive with the Linux distro I use daily. Today, I wanted to test another distro, I installed it on a USB flash drive, but GRUB was installed on my internal hard drive. Why on hell would GRUB go on my hard drive, and how can I recover my previous GRUB menu? (My daily distro is Fedora with encrypted LVM).


Default files in home dir for each user

I'm using ubuntu server 14.04. I want to add some files and folders by default in each user's home directory, whenever a user account is created.


How to create a customized distribution based on Debian?

I need to create a network with a small group of users. I thought about using Debian distro within computers. To automate it, I searched for automatic installation and customization tools for Linux distros. I could not find any exact matches that are suitable for my needs. How can I create an ISO image that has the programs I need?


How to jump on a position specified by line and column?

When opening a file one can use               $ emacs +2:9 practice.b      Which will open file ‘practice.b’ on line 2 and character 9 on that line. How do I jump like this in an already running Emacs? I know about `M-x goto-line` but it doesn’t recognize semicolon.


One ubuntu machine in LAN cannot access internet

I have 4 ubuntu machines connected in a LAN network by a `single switch`.Their IP address is from `192.168.10.10-192.168.10.13`.But after I restarted one of them since disk problem,I find that this machine cannot access internet(others can access internet),but all the 4 machines can be accessed from each other. I use "`sudo ufw status`" ,it shows `inactive`. I use "`cat /etc/hosts`" , it shows:               127.0.0.1       localhost     192.168.10.12   mongodb          # The following lines are desirable for IPv6 capable hosts     ::1     ip6-localhost ip6-loopback     fe00::0 ip6-localnet     ff00::0 ip6-mcastprefix     ff02::1 ip6-allnodes     ff02::2 ip6-allrouters      The others have the same config(of cource the LAN ip is different). So , I really don't know what happened. I tried to use command "`sudo ifconfig eth0 restart`",it reports:               Host name lookup failure               mongodb@mongodb:/var$ ifconfig eth0     eth0      Link encap:Ethernet  HWaddr d4:ae:52:c9:61:5f                 inet addr:192.168.10.12  Bcast:192.168.10.255  Mask:255.255.255.0               inet6 addr: fe80::d6ae:52ff:fec9:615f/64 Scope:Link               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:16199 errors:0 dropped:91 overruns:0 frame:0               TX packets:14260 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000                RX bytes:2198421 (2.1 MB)  TX bytes:2664354 (2.6 MB)          mongodb@mongodb:/var$ cat /etc/resolv.conf      # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)     #     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN     nameserver 192.168.10.1          mongodb@mongodb:/var$ route -n     Kernel IP routing table     Destination     Gateway         Genmask         Flags Metric Ref    Use Iface     0.0.0.0         192.168.10.1    0.0.0.0         UG    100    0        0 eth0     192.168.10.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0


what are some of the best resources to learn advanced debugging techniques using gdb?

I know the basics of how to use gdb. But I would like to learn some advanced debugging techniques using gdb. What are the best resources - books, blogs, tutorials - that any of you use regularly. I did look at this question: Tips or resources for learning advanced debugging techniques GDB in xcode but what I'm looking for is the GDB equivalent of the following: http://www.dumpanalysis.org/ http://WinDbg.info Memory Dump Analysis Anthology I understand that this is subjective question. But there are lot of questions which are very similar in nature (e.g The Definitive C++ Book Guide and List) and this question is not asked in here. If there is a duplicate that I missed please site it in the comments and close this question.


"No space left on device" on AUFS

In my own custom OS, I use aufs for mounting packages on every boot. These packages can be added/removed on the fly. The size of the storage device is 2.0 GB and size of total packages is 1.1 G. But whenever I try to copy a few files, I am greeted with an error message: > No space left on device Is this because of `aufs`, or is something else triggering this problem? EDIT:               shw# fdisk -l     Disk /dev/sda: 8012 MB, 8012390400 bytes, 15649200 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x00000000             Device Boot      Start         End      Blocks   Id  System     /dev/sda1   *        2048     4196351     2097152   83  Linux          shw# df -h /dev/sda1     Filesystem      Size  Used Avail Use% Mounted on     /dev/sda1       2.0G  1.9G   24M  99% /          shw# du -schx /*     1020M   /FS      0       /bin     9.3M    /boot     379M    /data     0       /dev     0       /etc     0       /home     0       /lib     0       /opt     0       /pkgs     0       /proc     4.9M    /root     560K    /run     0       /sbin     0       /sys     4.0K    /tmp     0       /usr     0       /var     1.4G    total      As there is only one partition `/dev/sda1`. `df` says only few MB space is available, but in reality only 1400MB is utilized. I do not have /etc/fstab file


no sound in fedora 18

I installed Fedora 18 Xfce Spin as a guest operating system on VirtualBox.It has no sound. The operating system settings are:   * Host Driver:Windows DirectSound   * Controller:ICH AC97 How can I solve this problem?


Unable to mount the file system from server to client while booting through network

I want a client which loads a kernel and a file system from the server through network. Until now, on the server side, I changed the settings in `/etc/dhcp/dhcpd.conf` to get an ip-address to the client. After that I executed the command               service isc-dhcp-server restart      I built openwrt kernel image openwrt-x86-generic-vmlinuz by downloading necessary packages. I created one directory with name `/tftpboot` and I copied `pxelinux.0` from `/usr/lib/pxelinux.0` to `/tftpboot` And I also copied `openwrt-x86-generic-vmlinuz` in `/tftpboot` Inside `/tftpboot` I created one directory with name `pxelinux.cfg` `/tftpboot/pxelinux.cfg/default`:               default openwrt label openwrt kernel openwrt-x86-generic-vmlinuz append boot=nfs root=/dev/nfs nfsroot=nfs:server-ip:/tftpboot ip=dhcp rw      I executed:               service tftpd-hpa restart      At client side, I restarted system and I selected the boot options to pxe booting It is loading the kernel openwrt-x86-generic-vmlinuz smoothly. Not mounting the file system which I had given in `/etc/exports` file My question is how can I mount the filesystem from server to client while booting? Any mistakes in boot arguments, or any other method to mount file system while booting?


How do I set bash aliases and variables from within vim?

In cmdline mode, the following examples do not work for me.               !alias lol='echo lol'     !lol='echo lol'


Which linux distros have GNOME as the default desktop manager?

Where can I find which distros have GNOME as the default desktop manager? Personaly I don't need a comprehensive list.


Non destructive installation : Ubuntu 13.10 -> Debian 7.2

How to make a non destructive installation of Debian 7.2 over Ubuntu 13.10 ?


Any packages for download management (some thing like DAP 4 W$ ) in opensuse-Gnome?

I'm looking for a package that can manage my internet downloads. Especially to expedite the download process.


Regex for all 10 letter words, with unique letters

I am trying to write a regex that will display all words that are 10 characters long, and none of the letters are repeating. So far, I have got               grep --colour -Eow '(\w{10})'      Which is the very first part of the question. How would I go about checking for the "uniqueness"? I really don't have a clue, apart from that I need to use back references.


How can I find out where the firefox bin is?

I am trying to add Firefox to my PATH like in this tutorial. I have Firefox in the Applications folder of my GUI on my mac book air. I am familiar with adding locations to my path. But I don't know how to find the firefox executable on my machine. Where does the applications folder go to look for the Firefox executable?


Where can I find updated TAR.rpm for Oracle VM Server?

I'm using tar for my incremental backup script on `Oracle VM Server 3.2.2` and it comes with `tar 1.15.1` I need this command:               tar -cf drive-C.full.tar --no-check-device \         --listed-incremental=drive-C.full.snapshot drive-C/      But I get this error:               tar: unrecognized option `--no-check-device'      * * * Edit... I'm doing incremental backups on VMs disks. I need the "no-check-device" because every time the vm disk .img file is mounted, the device numbers change and that messes up with tar's incremental backups. Continues on: How to do incremental backup of .img files containing windows partition?


Cron job results are different from executing from own shell

I am using Ubuntu 12.0.4 I have a script basically with the following codes:               lockfile=/var/tmp/mylock          if ( set -o noclobber; echo "$$" > "$lockfile") 2> /dev/null; then         exit_normally "instance is running"     else         echo "no instance is running"     fi      The file /var/tmp/mylock doesn't exists in my system, so when I execute my script manually I get "no instance is running" which is correct. But when the shell script is executed by cron, it always return "instance is running" I am not sure where to check or what to look for to find the root cause for the problem above, hopefuly I can get a few pointers here..


How can I change locale/encoding to avoid getting weird characters in terminal?

I have installed `tree` on my ubuntu box, when i connect to it from Putty and I launch `tree` i get this :               $ tree     âââ html.vim -> xml.vim     âââ js.vim -> xml.vim     âââ xml.vim      instead of this :               $ tree --charset=ANSII     |-- html.vim -> xml.vim     |-- js.vim -> xml.vim     `-- xml.vim      I also get this problem when e.g. I list my packages from `npm` (package manager from `nodejs`)               $ npm list     /home/monkey/scripts/chatter     âââŹ express@3.0.6     â âââ buffer-crc32@0.1.1     â âââ commander@0.6.1     â âââŹ connect@2.7.2     â â âââ bytes@0.1.0      How can I change that (either from Putty or linux box) ?


Find -exec + vs find | xargs. Which one to choose?

I understand that the `-exec` can take a `+` option to mimic the behaviour of `xargs`. Is there any situation where you'd prefer one form over the other? I personally tend to prefer the first form, if only to avoid using a pipe. I figure surely the developers of `find` must've done the appropriate optimizations. Am I correct?


What is a vi equivalent of vim's 'set ruler' command?

Is there a way to show the current row and column position in **vi**? In **vim** , I know there is the `set ruler` command, but what are my options when using **vi**?


Chainload two Grub2 installations

This is really getting me down. I have Gentoo and Ubuntu, both with Grub2. Gentoo has a dedicated `/boot` partition, while Ubuntu does not. I have a `menuentry` in Gentoo's `/etc/grub.d/40_custom` to boot Ubuntu (and Ubuntu does boot OK). Because Ubuntu comes with Grub I want to chainload into that one, instead of maintaining my entry which sets the root, kernel, initrd and stuff. This is what I have for the chainloader (Ubuntu is on `/dev/sda4` and I have already installed Grub there):               menuentry 'Chainloader' {         insmod chain         set root=(hd0,4)         chainloader +1     }      It is giving me `error: Invalid signature` and I found no solution available. Can someone point out something? This is the result of `</dev/sda4 head -c 512 | hd`               00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|     *     00000200      This is the result of `fdisk -l`. `/dev/sda1` is `/boot` of Gentoo, Gentoo is in `/dev/sda2`, Ubuntu is in `/dev/sda4`. Ubuntu's `/boot` is in `/dev/sda4` too.               Disk /dev/sda: 160.0 GB, 160041885696 bytes     255 heads, 63 sectors/track, 19457 cylinders     Units = cylinders of 16065 * 512 = 8225280 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0xe001152b             Device Boot      Start         End      Blocks   Id  System     /dev/sda1               1           9       72261   83  Linux     /dev/sda2              10       13064   104864287+  8e  Linux LVM     /dev/sda4   *       18152       19457    10490445   83  Linux      There is no error with `grub-install /dev/sda4 --no-floppy --force`               /usr/sbin/grub-setup: warn: Attempting to install GRUB to a partition instead of the MBR.  This is a BAD idea..     /usr/sbin/grub-setup: warn: Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.  However, blocklists are UNRELIABLE and their use is discouraged..     Installation finished. No error reported.


What does ^d mean in ls -l | grep ^d?

When I do `ls -l | grep ^d` it lists only directories in the current directory. What I'd like to know is what does the caret `^` in `^d` mean?


vnc over ssh port assignment

At the office I have on the servers a vnc server running. In Windows I use putty to connect to the server, I log in and then use realvnc to see the desktop. But I cannot get this to work on Linux. I have done it in the past struggling but never again. What I have done is try to bind my localhost to the port 5901 and then to the port 5901 on the server machine               ssh -L localhost:5901:server.dog.com:5901 vass@server.dog.com      I am using the vnc client "remote desktop viewer". Best,


Copying Files in a Folder To Individual Folders

This might sound like something quite odd but for my HTPC, I need to rearrange how my files are stored such that each of the individual files in a folder needs to be moved to a subdirectory of its own (with the same name as the file). I.E. - Currently the directory is:               directory/     - a.file     - b.file     - c.file      and I want to change it to:               directory/     - a/     -- a.file     - b/     -- b.file     - c/     -- c.file      I don't think this is terribly tricky but it's just odd and I haven't found anybody doing it before: I think it can be done with find and exec but I'm a bit of a battler and can't quite get it. Thank you very much in advance (or even just for taking the time to read this).


Auto de-crypt all LUKS partitions in Debian

I use Debian Wheezy and have all partitions encrypted using LUKS, except /boot. I want to decrypt the partitions automatically without having to type the password in each of the 7 encrypted partitions (it is the same in 7). How I can do this? With cryptsetup? How do I make the hook script from initramfs? /boot: No crypt /: crypt /home: crypt I need decryp / and /home in initramfs, in Debian.


How to use SCSUDO to run scripts with positional parameters?

I am trying to use `scsudo` to run a number of defined commands to stop and start processes on a UNIX host. The issue I am experiencing is that `scsudo` does not seem to like the use of positional parameters when script is called with `scsudo` from command configuration file. I have been tasked with implementing `scsudo` to reduce the number of functional access requests to stop and start processes and other defined commands, and the administrative overhead associated with this. Here is an example:               scsudo - <functional_id> "/opt/scripts/Start_Process_script.sh parameter1 parameter2 parameter3"     Password:     Reason:     execvp: No such file or directory      It looks like the scsudo configuration file does not seem to handle the parameters when calling script and so fails to find script it has been asked to run. I have placed parentheses around command including parameters but this still has not resolved the problem? I have searched the web and Stack Exchange thoroughly but have been unable to return much if anything related to `scsudo` in terms of guides or knowledge base for the use of `scsudo`. I would be very grateful for your assistant on this matter.


Ipv6 bridged network not working on Debian 3.2.46-1

I am on Debian 3.2.46-1 running VMWare with a Windows 7 Pro guest. I'm trying to set up a bridged network through eth0 interface, and give the windows virtual machine a static, external IPv6 address. I set `sysctl net.ipv6.conf.all.forwarding = 1` on my debian box, selected the "bridged network through eth0" setting in my VM settings, and typed in my IP address and gateway manually into 'local area connection' IPv6 properties in the windows virtual machine, but I'm getting 'destination host unreachable' when I try to `ping -6` or `tracert -6` my DNS or host. Other than that `ping6` and `traceroute6` work fine on the Linux host. Just to clarify - I set the gateway in the Windows VM to be the same gateway on my Debian box, and gave the virtual machine a legal external IPv6 address within the range I purchased from my hosting company. What could be wrong with my setup?


Mount a filesystem read-only, and redirect writes to RAM?

Is it possible to mount a loopback file as read-only, and redirect all writes to RAM?


How to add a custom widget to gnome panel

How could I add a custom widget to the GNOME panel. Which tool is used to create the widget. I want to create something like the weather widget. ![enter image description here](http://i.stack.imgur.com/c3fT5.jpg)


move file by list in file

I have a file the contain filenames, for example: `/tmp/list.txt` (it is with the spaces at the start of each line):                 /tmp/file.log       /app/nir/home.txt       /etc/config.cust      I want, using one line, to move all the files listed in `/tmp/list.txt` to `/app/dest` so it should be something like that:               cat /tmp/list.txt | xargs mv /app/dest/


Busybox `uname -r` shows wrong kernel version

My kernel is 3.2.27 and `/lib/modules/` contains **3.2.27 +** folder. But when I am using               /# uname -r     3.1.9+      It's showing a strange output. My problem is that for modprobe depends on uname when I put               /# modprobe somemodule     modprobe: chdir(3.1.9+): No such file or directory       It finding the modules in a wrong path. I have cross compiled the kernel with `gcc` version 4.5.2. Can anyone tell me why this strange problem happens? Thank you


How to repair lost gpt partition table?

I have a 3TB Seagate. The disk was from an raid system and had 1 partition sdb1 with 3TB and ext4 filesystem. As i wanted to prepair a new disk for a raid, i exchanged in sgdisk sdb1 with an raid disk which had sdc1 sdc2 sdc3 sdc4. After that mistake i take another seagate sdd with same size 3TB and ext4 and do an sgdisk over sdc. That is the actual status of sdb. I have make a backup with ddrescue to another disk and tried testdisk and parted, but could repair the partition table. Now i need help for doing it right, because i am not sure which commands in testdisk or sgdisk are right.


Fix dependencies without updating package?

I updated my Debian installation at home and it updated `chromium` to the (IMO) awfull 35.0 version. I removed it by using `apt-get remove chromium` and `apt-get autoremove`. I went here and grabbed the .deb for the 34.0 version I had previously installed. I used `dpkg -i filename.deb` to install it, but there were unmet dependencies:               dpkg: dependency problems prevent configuration of chromium:      chromium depends on libc6 (>= 2.15); however:       Version of libc6:amd64 on system is 2.13-38+deb7u3.      chromium depends on libfontconfig1 (>= 2.11); however:       Version of libfontconfig1:amd64 on system is 2.9.0-7.1.      chromium depends on libgcrypt20 (>= 1.6.1); however:       Package libgcrypt20 is not installed.      chromium depends on libglib2.0-0 (>= 2.37.3); however:       Version of libglib2.0-0:amd64 on system is 2.33.12+really2.32.4-5.      chromium depends on libpango-1.0-0 (>= 1.22.0); however:       Package libpango-1.0-0 is not installed.      chromium depends on libpangocairo-1.0-0 (>= 1.14.0); however:       Package libpangocairo-1.0-0 is not installed.      chromium depends on libudev1 (>= 183); however:       Package libudev1 is not installed.      chromium depends on chromium-inspector; however:       Package chromium-inspector is not installed.      Which I thought was odd, since it claims some libraries are "too old", even though I just updated the system (and `chromium`, which I assume depends on those libraries being in their latest version too). Anyway I used `apt-get -f install` to fix them, but apt "fixed" it by updating the package to the latest version (35.0) and downloading the dependencies in their latest version too. So... Is there a way to automatically fix those dependencies without updating chromium to 35.0, or do I have to download every dependency in their "correct" version? Wouldn't that cause some conflicts?


How do I suppress the title bar and window decorations on a maximized window in Gnome 3.12?

I'm trying to get rid of the top title bar on a fullscreen-sized window under Gnome 3.12.2, using the gnome-shell WM. In earlier versions of Gnome this was not difficult to do, but it apparently has become impossible in recent versions. The "Maximus" extension doesn't work correctly for me (https://extensions.gnome.org/extension/354/maximus/); it makes the title bar narrower but doesn't remove it. What are my options, if any, for making this work?


USB Linux with Wireless support

My friend has a laptop without HDD. I have installed Slax to a USB stick however it didn't recognize the wireless adapter. Are there any thumb Linuxes with support of variety wireless cards? I suspect that the wireless adapter is Broadcom.


Sharing content/apps between console and VNC console

I have a linux box that I use a lot from my Mac laptop (1920x1200 resolution screen) via VNC. At work, I have a dual-monitor setup for the Linux Box (1600x1200 each monitor). I use the VNC connection to provide a "persistent" desktop for my work. However, when I get to work (rarely, it seems), I'd like to pick up those projects that I have been working on in the desktop console. I haven't found an easy way to "migrate" from the VNC to the desktop. Is that technically possible? Any suggestions on how this can be done or what you do to accomplish a similar effect of having a "persistent" environment would be great to hear.


Can we find page count of a file in Unix/Linux?

I want to count number of pages in the file `/var/log/messages`, so that I can use `pr` command to start printing from the page I want to. For example, suppose that `/var/log/messages` file contains 300 pages, then I can use the following to print last 5 pages.               pr +295 /var/log/messages      Note: `pr` command will list the page count when we specify page number that exceeds number of pages available in the file as mentioned below.               pr +400 /var/log/messages     pr: starting page number 400 exceeds page count 313       Having said that I would like know if there is a specific command to find the page count.


Git and Puppet Master Lifecycle

I'm looking to setup a Puppet Master which hosts its configuration in a Git repository. I assume that I'd host my Puppet Configuration in a Git repository centrally organized on a Git hosting service like GitLab or GitHub. I assume that I'd have commit hooks which would trigger the Puppet Master server to pull the changes down to its local repository. Does a project or a tutorial exist on how to set this up? I'm simply looking to be able to automate configuration of my servers in a way as minimally complicated as possible.


Why are some ports reported by nmap filtered and not the others?

I'm scanning a server which should have a pretty simple firewall using _iptables_ : by default everything is DROPped besides `RELATED` and `ESTABLISHED` packets. The only type of `NEW` packets allowed are TCP packets on port 22 and 80 and that's it (no HTTPS on that server). The result of _nmap_ on the first 2048 ports gives 22 and 80 as open, as I expect. However a few ports appear as "filtered". My question is: why do port 21, 25 and 1863 appear as "filtered" and the 2043 other ports do not appear as filtered? I expected to see only 22 and 80 as "open". If it's normal to see 21,25 and 1863 as "filtered", then why aren't all the other ports appearing as "filtered" too!? Here's the _nmap_ output:               # nmap -PN 94.xx.yy.zz -p1-2048          Starting Nmap 6.00 ( http://nmap.org ) at 2014-06-12 ...     Nmap scan report for ksXXXXXX.kimsufi.com (94.xx.yy.zz)     Host is up (0.0023s latency).     Not shown: 2043 closed ports     PORT     STATE    SERVICE     21/tcp   filtered ftp     22/tcp   open     ssh     25/tcp   filtered smtp     80/tcp   open     http     1863/tcp filtered msnp      I really don't get why I have 2043 closed ports:               Not shown: 2043 closed ports      and not 2046 closed ports. Here's an _lsof_ launched on the server:               # lsof -i -n     COMMAND   PID USER   FD   TYPE   DEVICE SIZE NODE NAME     named    3789 bind   20u  IPv4     7802       TCP 127.0.0.1:domain (LISTEN)     named    3789 bind   21u  IPv4     7803       TCP 127.0.0.1:953 (LISTEN)     named    3789 bind  512u  IPv4     7801       UDP 127.0.0.1:domain      sshd     3804 root    3u  IPv4     7830       TCP *:ssh (LISTEN)     sshd     5408 root    3r  IPv4 96926113       TCP 94.xx.yy.zz:ssh->aa.bb.cc.dd:37516 (ESTABLISHED)     sshd     5411    b    3u  IPv4 96926113       TCP 94.xx.yy.zz:ssh->aa.bb.cc.dd:37516 (ESTABLISHED)     java    16589    t   42u  IPv4 88842753       TCP *:http-alt (LISTEN)     java    16589    t   50u  IPv4 88842759       TCP *:8009 (LISTEN)     java    16589    t   51u  IPv4 88842762       TCP 127.0.0.1:8005 (LISTEN)      _(note that Java / Tomcat is listening on port 8009 but that port is DROPped by the firewall)_


Installing CentOS to a flashdrive trouble

I have been using `GParted` and `UNetBootin` to install `CentOS-6.5-x86_64-minimal.iso` onto a flashdrive. I have partitioned the flashdrive as I have a seperate ISO installed on there. The other partition I want to have `CentOS` on has been partitioned for 2GB and has `ext3` filetype. However, when I go through the installation process, it prompts me to choose as shown below: ![enter image description here](http://i.stack.imgur.com/l2OUl.jpg) I looked up instructions on this and some instructions advised me to choose `vmlinuz` as the disk image, but when I do this I get: ![enter image description here](http://i.stack.imgur.com/6DgyI.jpg) Does anyone know a way around this?


Egrep multiple strings in an XML file

I have a collection of XML files in a standard format that I'd like to search to see if they match two strings. Here is the idea:               <ELEMENT1>Dave</ELEMENT>     <DON'TCARE1>Blaa</DON'TCARE2>     <DON'TCARE2>Blaa2</DON'TCARE2>     <ELEMENT2>History</ELEMENT2>      _**How can I match the content of ELEMENT1 and ELEMENT2 with egrep and return the filename that contains them?_**


using udptunnel with openvpn

I'm trying to tunnel `openvpn` traffic (UDP protocol) over a firewall using `udptunnel`   I can't use `openvpn` itself on TCP protocol.   On the server I'm running `udptunnel` like this:               udptunnel -s 9999 127.0.0.1/1196      but I'm getting `setup_udp_recv: bind: Address already in use` because openvpn is listening on this UDP port.   How should I run `udptunnel` on server to forward tunneled openvpn's traffic from port 9999 TCP over same server's 1196 UDP?