Which package currently provides nmblookup command on Gentoo?

I currently installed samba on my gentoo server with following               USE="acl client fam python upcall winbind" emerge -1 samba      But could not find the nmblookup utility after install. The samba package installed was version 3.6.18.


bash: get array name from parameter to function with saving indexes

I have a function to show index of chosen element. I'm trying to pass a parameter to function to use it as an array name. This works:               getIndex() {     arrname=$1[@]     b=("${!arrname}")     index=1; while ((index<${#b[@]})); do         if [[ "${b[$index]}" = "$VALUE" ]]; then             echo "index is $index"; return         fi               ((index++)); done          }      But the array, whose name I pass to this function, has index 1 as index of first element (I need this to have indexes similar to line numbers, from which I get patterns in the array:               a=1     while read line; do         if [[ $line =~ ^[0-9] ]]; then             avg[$a]=`echo $line | awk '{print $6}'`             ((a++));             fi      And if I'm running function getIndex() the first element of the array starts from index 0. So, the question is: Is there any way to pass array name in parameter to function with saving indexes of array? Or maybe I just need to forget about it and add +1 to function answer.


Screen brightness always maximum when logoff or restart

I am using Fedora 13 and whenever I Restart or Logoff on my laptop. The screen brightness resets to its maximum value. I am not aware of this problem. Can anyone tell me why this is causing and what is the solution for keeping it's to a constant value at all time?


How to change mountpoint name?

This question has been asked before, but because I have a few more doubts about the process. I am working in ubuntu, this is what `df -h` shows:               Filesystem             Size  Used Avail Use% Mounted on     /dev/md0               423G  337G   65G  84% /     tmpfs                   12G     0   12G   0% /lib/init/rw     udev                    12G  188K   12G   1% /dev     tmpfs                   12G     0   12G   0% /dev/shm     /dev/md1               917G  527G  344G  61% /backup      The problem is that now we are using the /dev/md1 for more than just backups, and we have decided to change its name from /backup to /drive2 I want all the content to stay where it is, the only thing that has to change is the name of the drive mountpoint. Please note however that I have certain symbolic links from the /dev/md0 to the /dev/md1, and they where built using /backup as a reference folder. Will I have to change each symbolic link or will the change be reflected automatically? Could you please explain the commands necessary and the files to edit?


xterm login prompt not gnome login prompt

instead of loading `gdm3` when i turn my pc on, i want to load into an xterm with just a window manager (no desktop environment) and i want the xterm to have the login prompt as its first action so that i can login as my user within the xterm. i have the following info in my .xinitrc file:               $ ls -la .xsession     lrwxrwxrwx 1 peter peter 8 Oct  7 18:25 .xsession -> .xinitrc     $ cat .xinitrc      #!/bin/bash     [[ -f ~/.Xresources ]] && xrdb -merge ~/.Xresources     xterm -maximized &     exec mutter      but this only runs once i login through gnome. i really just want to turn off gnome and run an xterm instead. i'm guessing i will need to modify my `/etc/X11/Xsession` or my `/etc/X11/xinit/xinitrc` file to get rid of the `gdm3 start` and replace it with something. what should i add/remove from these files? i want to bring up a login prompt within the xterm as the first action. i'm on debian 7 and currently have gnome3 desktop environment with mutter window manager


Get last set of non-empty lines

I'm running a cron job which should get only the last result of `iostat -d 1 2`. This requires some parsing: What is the simplest way to get either the **last set of non-empty lines** from standard input to standard output if the length of each set is unknown? Bad/non-working solutions:   * `tail` since I'd still need to count the number of lines in the last set. `iostat -d 1 2 | tail -$(echo "$(iostat -d 1 2 | wc -l) / 2" | bc)` depends on equal set sizes.   * `split`/`csplit` since they output to file, and keep the useless part of the data.   * `iostat -d 1 2 | sed '1,/^$/d' | sed '1,/^$/d'` works only in this special case, since it gets the third set of non-empty lines, but also includes any trailing newlines.   * `iostat -d 1 2 | tac | sed '1,/^$/d' | sed '/^$/q'` is a slightly better hack: Reverse and print the first set. However, since `iostat` outputs an empty line at the end, we first remove that then print until the next empty line in the reversed output. Other commands might output any number of newlines at the end, so it's not a general solution. Reverse again if you want to keep the original sequence.   * `grep -P` with `\Z` seems to only detect EOL, not EOF.


monitor and watch multiple systems continuously

As part of my work and collaborations and universities I've attended, I have access to many machines, about 13 or so. These are all Linux machines and I could ssh using my key-pair. There are a bunch of stuff running on these machines from time to time and also these machines are shared among users. Is there a utility which could help me monitor these systems or something like take a stock of the systems as to what is going on on them. I am looking for something lightweight which just needs a list of machine ids and a very minimal installation and could fetch me this information every morning when I log into my laptop.


Why is file ownership inconsistent between two systems mounting the same NFS share?

I have one IBM AIX server (serverA) which is connected to the san storage. I have created a volume group and also file system (jfs2) and mounted to directory /profit. After that I created a NFS share for that directory and started the NFS daemon. Over at another server, which is IBM AIX also (serverB), I created a mount point /profit and mounted the nfs share from serverA to serverB using the below command: mount 192.168.10.1:/profit /profit On serverB, I am able to access the directory and list the files in it. But the strange thing is, on serverA, the directory and files are under the oracle user ownership. But in serverB, i see them as a different user. When I touch a file in that directory at serverB, on serverA, I see it as another user id. Any clue how I can fix this? Below is the file listing from serverB               $ ls -l     total 0     -rwxrwxrwx    1 root     system            0 Mar 16 15:00 haha     -rwxrwxrwx    1 radiusd  radiusd           0 Mar 16 15:19 haha2     -rwxrwxrwx    1 radiusd  radiusd           0 Mar 16 15:31 haha3     -rw-r--r--    1 oracle   oinstall          0 Mar 17 2011  hahah3     drwxrwxrwx    2 radiusd  radiusd         256 Mar 16 14:40 lost+found      On serverA it looks like below:               # ls -l /profit     total 0     -rwxrwxrwx    1 root     system            0 Mar 16 15:00 haha     -rwxrwxrwx    1 oracle   dba               0 Mar 16 15:19 haha2     -rwxrwxrwx    1 oracle   dba               0 Mar 16 15:31 haha3     -rw-r--r--    1 10       sshd              0 Mar 17 16:01 hahah3     drwxrwxrwx    2 oracle   dba             256 Mar 16 14:40 lost+found      Below is the /etc/exports file from serverA               # more /etc/exports     /profit -vers=3,sec=sys:krb5p:krb5i:krb5:dh,rw      Thanks.


What will at actually execute?

If I do `atq` I can see a list of what is scheduled via `at` command. But how do I see what is the command that will actually run?


How do I recover a broken software RAID5 array?

Ack, I think I screwed up bad. I had a power failure on a RAID5 array which caused the metadata to be inconsistent between drives. I followed the advice here _except_ a case of fat fingers caused me to run the --create command without a missing parameter. Running the Perl script that permutates through the various combination leads me unable to mount an array. I have several questions:   1. Am I totally screwed here, is there anything else I can do? The drives themselves seem to be fine. Does the missing parameter blow out any chance I have of recovering my data?   2. Is there anyway I can get _some_ data, but mounting the drives? I'm not that familiar with how data is striped across disks so I don't know if it possible to recover some files.


Help with installation of ROOT, PATH variable is getting deleted

I am trying to install ROOT which I need for work. I run Ubuntu 10.04 64 bit on virtualbox on my laptop. After extracting the tarball, I try to source the .sh file using the command as suggested in the README $ . pathname/root/bin/thisroot.sh It shows me the following error:               $ . /home/username/Downloads/root/bin/thisroot.sh          bash:/home/username/Downloads/root/bin/drop_from_path: No such file or directory     bash:/home/username/Downloads/root/bin/drop_from_path: No such file or directory     bash:/home/username/Downloads/root/bin/drop_from_path: No such file or directory     bash:/home/username/Downloads/root/bin/drop_from_path: No such file or directory     bash:/home/username/Downloads/root/bin/drop_from_path: No such file or directory     bash:/home/username/Downloads/root/bin/drop_from_path: No such file or directory     bash: man: No such file or directory     Command 'dirname' is available in '/usr/bin/dirname'     The command could not be located because '/usr/bin' is not included in     the PATH environment variable.     dirname: command not found     /usr/bin/env: bash: No such file or directory     Command 'grep' is available in '/bin/grep'     The command could not be located because '/bin' is not included in the     PATH environment variable.     grep: command not found     Command 'grep' is available in '/bin/grep'     The command could not be located because '/bin' is not included in the     PATH environment variable.     grep: command not found      The result of this is that it somehow deleted the PATH, because now I cannot do anything else from the command line. For example:               $ vi README     Command 'vi' is available in '/usr/bin/vi'     The command could not be located because '/usr/bin' is not included in     the PATH environment variable.     vi: command not found          $ clear     Command 'clear' is available in '/usr/bin/clear'     The command could not be located because '/usr/bin' is not included in     the PATH environment variable.     clear: command not found      I have an Ubuntu 11.04 on my desktop at home, where this installation went smoothly. I also tried this on my office mac, but I don't know what is happening here.


/etc/hosts in debian resets itself on reboot

I've been having a problem where when our vps provider decides to restart the server (running Debian 5.0.8), the server fails to remember changes to `/etc/hosts`. All I need is an database alias that is used for the web applications on the server which points to `127.0.0.1` (`localhost`). I want it to look like this:               # The following lines are desirable for IPv6 capable hosts     # (added automatically by netbase upgrade)          ::1     ip6-localhost ip6-loopback     fe00::0 ip6-localnet     ff00::0 ip6-mcastprefix     ff02::1 ip6-allnodes     ff02::2 ip6-allrouters     ff02::3 ip6-allhosts               127.0.0.1 localhost.localdomain localhost webservice database     # Auto-generated hostname. Please do not remove this comment.     XXX.XX.XXX.XX xxxxxx.net.au  xxxxxx www.xxxxxxx.net.au xxxxxxx      However whenever there is a reboot it resets itself to:               # The following lines are desirable for IPv6 capable hosts     # (added automatically by netbase upgrade)          ::1     ip6-localhost ip6-loopback     fe00::0 ip6-localnet     ff00::0 ip6-mcastprefix     ff02::1 ip6-allnodes     ff02::2 ip6-allrouters     ff02::3 ip6-allhosts               127.0.0.1 localhost.localdomain localhost webservice     # Auto-generated hostname. Please do not remove this comment.     XXX.XX.XXX.XX xxxxxx.net.au  xxxxxx www.xxxxxxx.net.au xxxxxxx      without the database, and I have to manually change the file to get things to work. This has been happening for awhile and has become a nuisance, but I can't seem to find a way to get changes to stick. Anyone know what to do?


What does rpm -H do?

I came across someone's RPM command that wrote:               rpm -ivH ....      and then noticed that option `-H` is not documented anywhere. Command `rpm -H` no longer works with newer version of rpm, however it runs successfully under rpm version 4.8, produces no output and then exits. So what is the command `rpm -H` used to do? System is a Scientific Linux 6.1:               $ rpm --version     RPM version 4.8.0     $ rpm -H     $ echo $?     0


Arch Linux KMS loading i915 early tty doesn't show

I am on Arch Linux x64, on EFI, Nvidia Optimus with bumblebee (so i am using intel driver) and I am trying to show a splash screen at boot. I have chosen plymouth (other than being the more famous it's also the only one that compiled just out of the box without further research). Plymouth has different way to work. Since i am on i915 open source driver, it seemed obvious that i had to choose KMS. The problem is, on Arch Wiki it's written that you have to initialize KMS in early boot stage, writing:               MODULES="i915"      on the top of `/etc/mkinitcpio.conf` However, loading KMS in early stage causes all tty not to start. Fortunately, gnome starts, but if i do `CTRL+ALT+F2` (and of course with all the other f keys) nothing happens, I just see a blinking underscore. It doesn't let me log in. Also plymouth doesn't show. And , both during boot and shutdown, I see 3 little % each one followed by one square at the center of the screen. Pretty strange. Anyone got any clue? Or how do I use plymouth with EFI?


combine text files column-wise

I have two text files. The first one has content:               Languages     Recursively enumerable     Regular      while the second one has content:               Minimal automaton     Turing machine     Finite      I want to combine them into one file column-wise. So I tried `paste 1 2` and its output is:               Languages   Minimal automaton     Recursively enumerable  Turing machine     Regular Finite      However I would like to have the columns aligned well such as               Languages               Minimal automaton     Recursively enumerable  Turing machine     Regular                 Finite      I was wondering if it would be possible to achieve that without manually handling? Thanks and regards! * * * Added: Here is another example, where Bruce method almost nails it, except some slight misalignment about which I wonder why?               $ cat 1     Chomsky hierarchy     Type-0     —          $ cat 2     Grammars     Unrestricted          $ paste 1 2 | pr -t -e20     Chomsky hierarchy   Grammars     Type-0              Unrestricted     —                    (no common name)


ral0 malfunctioning

OpenBSD 4.9 using a ral card, RT2560 For some strange reason it stopped functioning, `ifconfig ral0` shows all the network information and network active, but no real connection. I keep getting DHCP requests and other built in tests repeating for the better part of 2-3 minutes before giving up. It normally starts with "ral0 no link......" I've tried rebooting, clearing the network information on `ifconfig`, and remaking the `hostname.ral0` file to no avail:               dhcp nwid (name) wpakey "(pass)"


How to replace the content of specific column with awk?

Given there is 40 columns in a record. I want to replace 35th column so that the 35th column will be replace with the content of 35th column and a "$" symbol. What came up my mind is like:               awk '{print $1" "$2" "...$35"$ "$36...$40}'      I works but because it is infeasible when the number of column is as huge as 10k. I need a better way to do this.


How do I safely perform the below changes to network parameters on Solaris 10?

I need to change and test some TCP/IP network parameters on a Oracle Solaris 10 as a possible workaround for a bug in 'Oracle Hyperion EPM 11.2.1.0' in the development environment. I am not a Solaris/UNIX expert so would appreciate any guidance to identify the correct parameters and also it would be very helpful if you could tell me the possible impact of the changes and how I could have the admin support rollback the changes.   1. I need to decrease the time wait before closing the sockets. I already have the corresponding UNIX command: `$ echo 3 > /proc/sys/net/ipv4/tcp_fin_timeout`   2. I need to check if the System is preventing the 'Oracle Hyperion EPM' application from using a large number of sockets. How do I check the port range and modify it? The UNIX command for it would be: `$ echo "1025 65535" > /proc/sys/net/ipv4/ip_local_port_range` I am advised that I need to make these changes as root and execute the following UNIX command for applying the changes: `$ /etc/rc.d/init.d/network restart` Kindly guide me to identify which are the corresponding Solaris commands. Thanks. **References:**   1. I looked at the parameters in `$ ndd /dev/tcp \?`   2. http://docs.oracle.com/cd/E19082-01/819-2724/6n50b07lr/index.html   3. http://www.informit.com/articles/article.aspx?p=101138&seqNum=6


What are all the mandatory content of the boot partition?

While studying about booting an Android on a board, I have learnt that MLO (X-loader), U-Boot and `uImage` are necessary to boot the Android on the board. But I wondered that when I have come to know about that, the IMX53quickstart Board does not need MLO to boot an Android on it.   1. How can it possible? How can the board boot without MLO?   2. Does this board have any special feature? What is that?   3. If so, why another board couldn't have this feature?   4. Can we implement this feature on all board?


Incremental backup of postgresql database

We run a database server running PostgreSQL with database size of around 130GB growing at a rate of 500MB per day. We use HP Data Protector software to take backups of the database. The issue here is that our database is on a GFS mounted partition and the current backup software license does not facilitate taking backups from GFS, NFS mounted partitions. So, as a workaround, we planned to copy the database to a local partition using `pg_dump` utility and take backups from the local partition using data protector software. But I am not sure whether we can take incremental backups using `pg_dump`. Full backup everyday is not possible for us. Please suggest steps for taking incremental backup of a PostgreSQL database.


What would I get when sudo a kernel-destructive program?

It suddenly comes to me how easy it will be for a _sudoer_ to crash the kernel, so I tried something like this:               #include<stdio.h>          int main(){         printf("hello world");         int a;         printf("%p", &a);         int *p = (int*)0xffff000000000000; //x86_64, somewhere in the kernel space         printf("%p:%d", p,*p);         *p = 1;         printf("%p:%d", p,*p);     }      Understandably, without `sudo`, running the program turns out a segment fault. **However** , I got **NOTHING** when execute it via `sudo ./a.out`! Even the `hello world` in first line is suppressed without any error or warnings at all. Can someone explain what's happening?


Install libxcb from source

I try to install libxcb from source, but I have an error, I do not understand why, this the error:               configure: error: Package requirements (pthread-stubs xau >= 0.99.2) were not met:          No package 'xau' found      I have installed from source pthread-stubs and proto-xcb-proto This is to install `qtile`. At the moment I use Debian wheezy but I will soon use jessie.


Is there a uniform way to discover information about devices?

**UPD** : Changed question title from `manage devices` to `discover information about devices` One of the frequent thing I do is look up info about devices on my systems. And I am constantly find myself confused about various different commands on Linux to query available disks, network adapters, graphics cards etc. For example, if I need to query all disk drives available, I do:               ls -la /dev/disk/by-id      If I need to query all network cards available, I do:               ls -la /sys/class/net      Is there any single point to query all device ids by type? Maybe there was initiative to unify handling of devices info and make it discoverable/accessible, but it failed? History of the question in order of appearance:   1. /dev/disk/ lists disks, why /dev/net/ doesn't list network interfaces?   2. Why are network interfaces not in /dev like other devices?


How to disable a usb sound device with udev

How can I disable USB device by Vendor ID? So I have:               [root@piotr ~]# lsusb     Bus 001 Device 002: ID 058f:9254 Alcor Micro Corp. Hub     Bus 001 Device 003: ID 0d8c:000c C-Media Electronics, Inc. Audio Adapter     Bus 001 Device 004: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)     Bus 002 Device 004: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB     Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub     Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub     Bus 002 Device 006: ID 0bc2:3320 Seagate RSS LLC SRD00F2 [Expansion Desktop Drive]      I want to disable               Bus 001 Device 003: ID 0d8c:000c C-Media Electronics, Inc. Audio Adapter      I need this unit in Windows environment but it disturb me Skype input (and only Skype). As temporary solution I just included snd_usb_audio in modprobe blacklist. But it is only workaround. Or, (maybe better) is it possible to exclude this particular USB device from udev rules? But in /usr/lib/udev/rules.d there is not definition for this device. I mean about VendorID. So my questions are: Why it is working at all and can be seen by ALSA? How can I exclude such VendorID and ProductID fron udev rules? Any idea wanted


Seemingly Inconsistent Behavior for "ln" & "ln -s"

As we all know, the `ln` command creates a link, with the default being a hard link and the `-s` option creating a symlink. The general syntax is `ln [-s] OLD NEW`, where OLD is the file you are linking to and NEW is the new file you are creating. Hard links can not be created for directories, as a hard link could be created between folders inside each other & I suppose computers do not yet have the resources to check for this without a SERIOUS slowdown. When creating the link, the path of both files must be written out, and can be absolute or relative. You can mix relative & absolute filepaths, i.e. have a relative path for the new file/folder & an absolute path for the old one. When creating a hard link with a relative path, the paths of both files are relative to the current folder, while for a symbolic link the path of the linked-to file/folder is relative to its parent folder but the path of the old file/folder is relative to the current folder. Why this is is "relative" to my question. For example, say we am in the HOME folder, `/home/user`, also known as `~`, and create 2 folders, `new` and `new2`, with the file `file` in the folder `new`. If we try `ln -s new/file new2/file`, the result is a broken link from `~/new2/file` to the currently nonexistent `~/new2/new/file`. However, if we instead run `ln -s ../new/file new2/file`, we get the expected result, which is a link from `~/new2/file` to `~/new/file`. So, my question: Why is the file path for the OLD file/folder of a symlink relative to its parent, while the other 3 paths (hard link OLD, NEW files, symlink NEW file/folder) are relative to the current folder? All this is on Fedora, but I'm sure it applies to most UNIX-based OS's. **EDIT** E Carter Young seems to hit the nail on the head with regard to my 2nd question (as well as my 1st question, which was wrong anyway). It seems that for a symbolic link, the target doesn't have to exist yet, so the system has to make its path relative to the link rather than the current directory. However, why can't the shell parse out that path when you're running the command, rather than forcing the user to figure out what the path is & enter it him/herself? The shell seems to parse pretty well, so is this a case of legacy issues? Performance issues? What?


Tails OS - Modifying boot options

When Tails OS boots, you can press tab to modify the startup options. Is there any way I can save an iso with these options already set? It's a real pain to have to press tab and set them up every time. Surely there must be a better way?


Exporting NetworkManager configurations

I am using Fedora 19, there is no `~/.gconf/networking/NetworkManager` directory, and system-wide `/etc/NetworkManager` has no files required. I want to export **my user** 's `NetworkManager` configurations, that is Wireless, VPN credentials (ip, username, password) to a file, or at least find the directory where they are stored in Fedora 19. How to do that?


apt-get install fails with error "Unable to locate package"

**Background** Hi there. I'm relatively new to linux so you'll have to excuse my noobie question. I'm trying to follow the instructions found here: http://repo.pouf.org/ to install kamailio on my Raspberry Pi. **Problem** I'm getting the error message that the system is not able to locate the package kamailio. **What I've done so far:** I navigated the repo on that site and I can see that there is a kamailio package, but it's located under http://repo.pouf.org/raspbian/pool/main/k/ folder. I've also tried to change the sources.list file to read:               deb http://repo.pouf.org/raspbian/dists/ wheezy main      But that didn't fix the issue. any suggestions would be appreciated. Thanks.


Booting failing in different Debian and Debian derivated distros?

I've tried Ubuntu, Linux Mint and Debian, even though all have worked great for me I'm keeping with Ubuntu, I tested 12.04, 12.10 and even 13.04. The 12.04 LTS is the one I work with. There's one issue persisting in the three distros I've tested, sometimes at _random_ occasions the boot fails, after GRUB, it shows only a `_` as prompt and it remains indefinitely, I've let pass up to an hour, and best I could do was to wait for a while and try again until I get it to load. Everytime this happens and I've selected **recovery mode** I get logs like these: ![Once I got this output](http://i.stack.imgur.com/RJzEB.jpg) ![enter image description here](http://i.stack.imgur.com/lidRh.jpg) So, I blame the last line: > **[ 0. .... ]Booting Node 0, Processors #1** to be the _issue_ , all first log lines appear continuously but it'll stop then. I already updated BIOS, but there's something I think it might be the _issue_ and that's the Hyperthreading, I had disabled it after BIOS update and it stopped happening, now I enabled it for installing a 64 bits OS in VMWare Player and it happened again. I googled and I've not really found a solution.


What are the side effects of having several UNIX users share one UID?

The sys-apps/shadow package on my GNU / Linux system comes with a `useradd` command that supports an option that I have previously overlooked: `\--non- unique`. For the sake of convenience when shellig home from the university, I have created an alias for my original username (casual name at home) thusly:               useradd --non-unique -u 1001 \          --no-create-home --home-dir /home/casualname \          -g 1001 -G `id casualname -G | tr ' ' ,` universityUsername      This allows me to login from campus with the login universityUsername without creating a ~/.ssh/config alias or specifying the -l option for `ssh`. After logging in, `whoami` reports that I am casualname. This is due to the fact that casualname appears closer to the top of the /etc/passwd file. I wonder how widely supported such aliases are and if there are any drawbacks to using them. And also, is there a way to select the preferred user alias as the acting one (what $USER is set to) on a system where the user can not re- order entries in /etc/passwd?


Building Virtualbox Linux Headers

I am trying to get Virtualbox running on my Acer C7 with Ubuntu 13.04. I ran the script posted here but I am getting the following error after this point in the script.               # make-kpkg kernel_image kernel_headers          make[2]: Entering directory `/usr/src/kernel' SYSHDR     arch/x86/syscalls/../include/generated/asm/unistd_32.h SYSHDR      arch/x86/syscalls/../include/generated/asm/unistd_64.h SYSHDR      arch/x86/syscalls/../include/generated/asm/unistd_x32.h SYSTBL        arch/x86/syscalls/../include/generated/asm/syscalls_32.h HOSTCC      arch/x86/tools/relocs CHK include/linux/version.h UPD      include/linux/version.h CHK include/generated/utsrelease.h UPD      include/generated/utsrelease.h CC kernel/bounds.s cc1: error: unrecognized command line option '-fstack-protector-strong'               make[3]: * [kernel/bounds.s] Error 1 make[2]: [prepare0] Error 2 make[2]:      Leaving directory /usr/src/kernel' make[1]: *** [debian/stamp/conf/kernel-conf]      Error 2 make[1]: Leaving directory/usr/src/kernel' make: **      [debian/stamp/conf/minimal_debian]      Error 2 Failed to create a ./debian directory: No such file or directory at /usr/bin/make-kpkg line 984.


What is the "kernel build", and where do I get it?

I am trying to compile OpenOnload from Solarflare for my nic on a server that I'm building. It is saying something about not having a kernel build.               root@server:/usr/src/openonload-201310-u2# ./scripts/onload_install     onload_install: Building OpenOnload.     mmakebuildtree: No kernel build at '/lib/modules/3.2.0-4-amd64/build'     onload_build: FAILED: mmakebuildtree --driver -d x86_64_linux-3.2.0-4-amd64     onload_install: ERROR: Build failed.  Not installing.     `      What is it talking about when it's saying there is supposed to be kernel build at `/lib/modules/3.2.0-4-amd64/build`? How would I get that file? I'm using Debian 7 "Wheezy". Thanks so much for your help!


Separate Chrome webapp shortcuts from Chrome in Gnome Shell

I created some webapps in Google Chrome that will open in their own windows, like Google Keep, for example. But whenever I open them, it will say Google Chrome in the black bar (Gnome Shell) and in overview, it will be listed as a Google Chrome window rather than its own. Meaning I have to move around and actually find the window rather than simply clicking on it in the dash. It's not a big deal, but it works easier for my workflow. Windows and Ubuntu treat Chrome's webapps as their own applications, how can I get Gnome to do it, too? ![See, I have Google Keep opened, but it says Chrome.](http://i.stack.imgur.com/43hvh.png)


Cannot get TFTP server working on Ubuntu using xinetd

I am trying to get a very simple `tftp` server working. I followed the guides at several websites, including how-to-setup-tftp-on-ubuntu and installing-and- testing-tftpd-in-ubuntudebian, but I haven't been able to get a `tftp` server working. The `xinetd` service is running (I know this because I do a `ps -A | grep xinetd` and see it), but I don't see `tftp` in `netstat -na | grep LIST | grep 69`. In other words, `xinetd` is running but I don't see the `tftp` server. I tried connecting to the server from my Windows `tftp` client but it failed, so I know for sure it's not running. My `/etc/xinetd.d/tftp` config file looks like this:               service tftp     {         protocol = udp         port = 69         socket_type = dgram         wait = yes         user = nobody         server = /usr/sbin/in.tftpd         server_args = -s /tftpboot          disable = no     }      The `/tftpboot` is owned by `nobody:nogroup`, and mode to `777`. I thought maybe it was a firewall issue but ufw says it is inactive. In case it matters, Ubuntu is running inside a VirtualBox VM with the ethernet adapter bridged (not NAT) to my home network. I also tried directly running `/usr/sbin/in.tftpd` and used the `\--foreground` option, but it closes right away.


Running shell script on cluster in parralel

I thought **dsh(Distributed Shel)** will be a good option but when i ran my shell script across my nodes, I didnt get expected output,               dsh -aM -c bash /home/cloudera/bash_script.sh     server2@x.x.x.110: files in folder     server2@x.x.x.110: server2     server1@x.x.x.111: server1     server1@x.x.x.111: sleep time................     server3@x.x.x.112: server3     server3@x.x.x.112: sleep time................     server2@x.x.x.110: sleep time................      bash_script.sh               #!/bin/bash          while true;     do          shopt -s nullglob     #shopt -s dotglob # To include hidden files     files=(/home/cloudera/MyFolder/*)     echo "files in folder" $files[@]          if [  ${#files[@]} -gt 0 ];     then             for entry in "/home/cloudera/EcoAxis"/*         do           cp $entry /home/cloudera/EcoBackup           var=`basename $entry`           var1=`echo ${var//[.csv]/}`           echo $var1           gawk -f abc.awk $entry           rm -r -f $entry              done     fi      echo "server2"      sleep 5s      echo "sleep time................"      sleep 10s     done      My script is working properly if i ran it without dsh,why this abnormal behavior,By default, dsh can run up to 64 commands in parallel ,does dsh support all bash commands ? what is the best option to go for parrallel processing of shell script accross nodes? Thanks.


Remapping WASD + R_Shift to arrows

I know this has already been asked so many times, but even after searching, I still can't do it. I simply want to map R_Shift + WASD to the arrow keys (Linux). I can map Shift + WASD to arrows using xmodmap, however, I want only the right shift to have this functionality (while disabling text selection when using R_Shift). (I have read the xmodmap wiki but can't really understand the way to make this possible.)


How to sort files based on the json property value inside the file?

I've downloaded list of videos via youtube-dl and each file has corresponding .json file containing certain properties. So I would like to sort the files based on the selected json property which is inside of corresponding .json file (e.g. by number of views count, property: view_count). What tools I need and how this can be achieved?


Limit memory usage for a single Linux process

I'm running `pdftoppm` to convert a user-provided PDF into a 300DPI image. This works great, except if the user provides an PDF with a very large page size. `pdftoppm` will allocate enough memory to hold a 300DPI image of that size in memory, which for a 100 inch square page is 100*300 * 100*300 * 4 bytes per pixel = 3.5GB. A malicious user could just give me a silly-large PDF and cause all kinds of problems. So what I'd like to do is put some kind of hard limit on memory usage for a child process I'm about to run--just have the process die if it tries to allocate more than, say, 500MB of memory. Is that possible? I don't think ulimit can be used for this, but is there a one-process equivalent?


Set memory allocation for applications in Ubuntu

I have an application running under Ubuntu that tries to consume all available memory. Is there a way to specify and restrict the allocations available for a given application?


Kerberos error after ArchLinux installation

I've installed ArchLinux successfully on my laptop yesterday. To do this, I've followed the Beginner's guide along with the Raid guide. I could do every step without problem, except the one for the time zone (I got an error with `ln -s` and `/etc/localtime`). One other point differs from my installation : on the raid webpage, when you have to edit the `HOOKS` section, mine is different from the one on the pages. I understood that I only had to had `mdadm_udev`. However, when I try to boot my computer, Archlinux seems booting fine. It looks like the OS loads modules without problem, then I got the following failed :               [FAILED] Failed to start Packet Filtering Framework.     See 'systemct1 status iptables.service' for details.     [FAILED] Failed to start IPv6 Packet Filtering Framework.     See 'systemct1 status ip6tables.service' for details.      Then some modules are load again and then I got the last failure :               [FAILED] Failed to start Kerberos 5 KDC.     See 'systemct1 status krb5-kdc.service' for details.      This error seems weird because before it comes, I have some lines like this :               [  OK  ] Started Kerberos 5 KDC.              Stopping Kerberos 5 KDC...     [  OK  ] Stopped Kerberos 5 KDC.              Starting Kerberos 5 KDC.      After this, I have a black screen that looks like the terminal which asks me my login. Does any have an idea how to fix this or is this normal ? PS : If you need all the step of the loading screen I can try to film the screen and type it here. EDIT : I don't know if this is a consequence of the failure of this module but I can't log in as root.


Match regex in ksh

I am looking to do something like this in KSH:               if (( $var = (foo|bar)[0-9]*$ )); then         print "variable matched regex"     fi      Is it possible at all? For the record I'm using Ksh `Version M-11/16/88i` on a Solaris 10 machine.


Non printing characters

I would love to get the mappings to work for keyboard shortcuts shown here   http://ascii-table.com/ansi-escape-sequences.php   I have the hang of color but for some reason nothing else seems to work!


Tracking what commands were executed after sudo to another user

I have provided `sudo` to ten users to become another user like `nsup`. I want to track which user executes which command after they become `nsup`. If there is a way to store the log files in a common file that would be great. I have tried looking at `/var/log/secure`, but from there I cannot distinguish which user executed which command after they became `nsup`. It shows only which user executed the command to _become_ `nsup`, and nothing beyond that.


Seem to be having a problem with RealVNC with centos can't input username

Hello I seem to be having a problem with RealVNC with centos. I want to connect to a another machine, but can't because it has been "grayed out". In otherwords, I can't type in the username in the username field and can only type in the password. My VNC viewer version is 4.1. I've installed it from the add software section from centos.


Steps to configure iPod shuffle in Fedora 19

I am using Fedora 19 GNOME version. After I plugin my iPod to the USB, it is not listed in my filesystem. The output of the `lsusb` command is:               Bus 002 Device 003: ID 090c:237c Silicon Motion, Inc. - Taiwan (formerly Feiya Technology Corp.)      Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub     Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub     Bus 001 Device 003: ID 05ac:1303 Apple, Inc. iPod Shuffle 4.Gen     Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub     Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub     Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub     Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub      the output of `fdisk -l` is:               Disk /dev/sda: 500.1 GB, 500107862016 bytes, 976773168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk label type: gpt               #         Start          End    Size  Type            Name  1         2048       411647    200M  EFI System      EFI System Partition  2     411648      1435647    500M  Microsoft basic   3      1435648    976773119  465.1G  Linux LVM                 Disk /dev/mapper/fedora-root: 53.7 GB, 53687091200 bytes, 104857600 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes               Disk /dev/mapper/fedora-swap: 4177 MB, 4177526784 bytes, 8159232 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes               Disk /dev/mapper/fedora-home: 441.5 GB, 441505021952 bytes, 862314496 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes               Disk /dev/sdb: 2018 MB, 2018496512 bytes, 492797 sectors Units = sectors of 1 * 4096 = 4096 bytes Sector size (logical/physical): 4096 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk label type: dos Disk identifier: 0x00000000             Device Boot      Start         End      Blocks   Id  System      So, `sdb` is my iPod. The output of `mount -t hfsplus /dev/sdb /media/ipod/` is:               mount: wrong fs type, bad option, bad superblock on /dev/sdb,            missing codepage or helper program, or other error                 In some cases useful info is found in syslog - try            dmesg | tail or so.      Then I tried checking the logfile `dmesg | tail -30`. The output was:               [254134.677536] usbcore: registered new interface driver usb-storage      [254135.680855] scsi 6:0:0:0: Direct-Access     Apple    iPod   2.70 PQ: 0 ANSI: 2      [254135.681654] sd 6:0:0:0: Attached scsi generic sg2 type 0      [254135.682437] sd 6:0:0:0: [sdb] 492797 4096-byte logical blocks: (2.01 GB/1.87 GiB)     [254135.683072] sd 6:0:0:0: [sdb] Write Protect is off      [254135.683077] sd 6:0:0:0: [sdb] Mode Sense: 6e 00 00 08      [254135.683678] sd 6:0:0:0: [sdb] Incomplete mode parameter data      [254135.683682] sd 6:0:0:0: [sdb] Assuming drive cache: write through      [254165.979596] usb 1-1.2: reset high-speed USB device number 3 using ehci-pci      [254197.054873] usb 1-1.2: reset high-speed USB device number 3 using ehci-pci     [254228.066118] usb 1-1.2: reset high-speed USB device number 3 using ehci-pci      [254259.205331] usb 1-1.2: reset high-speed USB device number 3 using ehci-pci      [254259.294409] sd 6:0:0:0: [sdb] 492797 4096-byte logical blocks: (2.01 GB/1.87 GiB)      [254259.295670] sd 6:0:0:0: [sdb] Incomplete mode parameter data      [254259.295674] sd 6:0:0:0: [sdb] Assuming drive cache: write through      [254290.152447] usb 1-1.2: reset high-speed USB device number 3 using ehci-pci      [254321.227721] usb 1-1.2: reset high-speed USB device number 3 using ehci-pci      [254352.238989] usb 1-1.2: reset high-speed USB device number 3 using ehci-pci      [254383.250192] usb 1-1.2: reset high-speed USB device number 3 using ehci-pci      [254383.337942]  sdb:      [254383.339261] sd 6:0:0:0: [sdb] 492797 4096-byte logical blocks: (2.01 GB/1.87 GiB)      [254383.340499] sd 6:0:0:0: [sdb] Incomplete mode parameter data      [254383.340503] sd 6:0:0:0: [sdb] Assuming drive cache: write through      [254414.261274] usb 1-1.2: reset high-speed USB device number 3 using ehci-pci      [254445.400659] usb 1-1.2: reset high-speed USB device number 3 using ehci-pci      [254476.411854] usb 1-1.2: reset high-speed USB device number 3 using ehci-pci      [254507.423071] usb 1-1.2: reset high-speed USB device number 3 using ehci-pci      [254507.509440] sd 6:0:0:0: [sdb] Attached SCSI removable disk      [254606.269395] hfsplus: unable to find HFS+ superblock      [254921.669943] hfsplus: unable to find HFS+ superblock      I also have gtpod and banshee installed. How do I get the iPod configured and running?


xfs disk usage is 15-30% bigger than the files

xfs seems to use 15-30% more disk space than the files require:               # du     0       .     # dd if=/dev/zero of=test bs=1M count=5k     5120+0 records in     5120+0 records out     5368709120 bytes (5,4 GB) copied, 10,527 s, 510 MB/s     # ls -l     total 8388608     -rw-r--r-- 1 root root 5368709120 Oct 19 16:04 test     # du     8388608 .      It seems to do that to a certain degree for the whole file system. This filesystem reports disk full when adding files less than 1% of the file system's size:               # df     /dev/sdb6  40957913088 35624042728 5333870360  87% /xfs-export      Is it caused by some fancy option when doing mkxfs (similar to the reserved 5% in ext2)?               # uname -a     Linux server 2.6.39-bpo.2-amd64 #1 SMP Tue Jul 26 10:35:23 UTC 2011 x86_64 GNU/Linux


Can I automate tar's multi-volume-feature?

Ok, so I've just had a read through this page after a way to improve my current backup solution on my Debian server. Tar seems to be offering a quite nice multi-volume feature, although when I try it out, it asks me to `Prepare volume #X for ‘mybackup.tar.gz’ and hit return:`. How should I automate this as I would like to take usage of this feature in an automated CRON script where no one is there to push return and enter whatever is rquired by the multi-volume prompt. Is using `split` the only way?


Command tool to create torrent files that includes MD5 hashes of files?

I'm aware of mktorrent, and know how to use it, but for testing purposes I require a utility that will also include the MD5 hash of every file in the torrent in the torrent meta info. I realize that the MD5 hash for each file isn't typically used with most modern torrent apps and is superfluous, but I'm hoping there's a utility out there I missed that supports this. Any suggestions?


How to schedule a job that depends on network availability?

I have cloned a git repository of some project. I want to automate `git pull` and compile the project once in a week. I am using a laptop which wont be on 24x7. Now, I cannot use `cron` as I should keep the system running at that exact moment. I cannot use `anacron` too as it might start before I connect to network. Is there some option in `anacron` that will run this particular job only when I am connected to internet? Or should I be using some other different tool for this?


Implementation of eSTREAM ciphers available?

Is there a usable implementation of the eSTREAM stream cyphers available for Linux? I was thinking to use that for encrypting data stored on tape drives, using it with `tar`. Now, there are some basic implementations in the eSTREAM suite, but they're designed for benchmarking purposes, and are not very usable for every-day use. I rely on stream cipher RC4 right now (`openssl rc4`), but as with DES and AES, I'd like to switch to something more secure, and more modern. In case there are "better" ways of using encryption on tape drives, please let me know. Block ciphers are obviously not really handy here, since those require random access.


How to trace that what had "chmod 640"'ed the "/etc/passwd" file?

On AIX 6100-05-02-1034, something is frequently changing the permissions of the `/etc/passwd` file to 640. That's bad... How could I trace that what is chmoding the file? There is no `history 1000 | fgrep -i chmod`, I think a process is chmoding the file, but which one? `dtrace` can do this? it's not on AIX


How do I export a folder to a subnet using NFS in FreeBSD 9.0

The following NFS exports file does not work on FreeBSD 9.0. How should I be specifying that I wish to share with the whole subnet?               mybox# cat /etc/exports       /storage/build 10.10.0.0/24(rw,no_root_squash)      Error from syslog:               mountd[1133]: bad exports list line /storage/build      10.10.0.0/24(rw,no_root_squash)      /etc/rc.conf               rpcbind_enable="YES"     nfs_server_enable="YES"     mountd_flags="-r"


How can I tell if xscreensaver has my screen locked?

I'm thinking through alerting stuff, and decided that, if my screen is locked, I'm not there so I should push the alerts to my phone. But, I cannot currently tell if the screen is locked. I could put something together with Perl and xscreensaver-command -watch, but I'd rather not have to make sure I have that process always running and all. That seems too heavy. Is there something I'm missing? This seems fairly obvious.


No route to host using ssh

I have a issue with remote server connection using ssh. I have a serverA on xxx.xxx.xxx.xx1 with default port 22. I have an another serverB on xxx.xxx.xxx.xx2 same default port22. Now I want to coonect serverB from serverA using ssh. I used the following command               [userA@localhost~] # ssh userB@serverB      When I run this command then I got the error as below               ssh: connect to host xxx.xxx.xxx.xx1 port 22: No route to host      One more this when I login the serverA then I see the prompt like **[userA@Localhost~] #** I did not understand that why it shows like above bold text while it should be show as `[userA@serverA ~] #` Any one has any idea to resolve this issue. thanks Note: Any query you can ask frenkly. I am newbie for remote connection using ssh updated I already ping but got the below response               [userA@localhost ~]# /bin/ping xxx.xxx.xxx.xx1     PING xxx.xxx.xxx.xx1 (xxx.xxx.xxx.xx1) 56(84) bytes of data.     From 192.168.24.1: icmp_seq=2 Redirect Host(New nexthop: xxx.xxx.xxx.xx1)     From 192.168.24.1: icmp_seq=3 Redirect Host(New nexthop: xxx.xxx.xxx.xx1)     From 192.168.24.1: icmp_seq=4 Redirect Host(New nexthop: xxx.xxx.xxx.xx1)     From 192.168.24.1 icmp_seq=2 Destination Host Unreachable     From 192.168.24.1 icmp_seq=3 Destination Host Unreachable     From 192.168.24.1 icmp_seq=4 Destination Host Unreachable     From 192.168.24.1: icmp_seq=5 Redirect Host(New nexthop: xxx.xxx.xxx.xx1)     From 192.168.24.1: icmp_seq=6 Redirect Host(New nexthop: xxx.xxx.xxx.xx1)     From 192.168.24.1: icmp_seq=8 Redirect Host(New nexthop: xxx.xxx.xxx.xx1)     From 192.168.24.1 icmp_seq=6 Destination Host Unreachable     From 192.168.24.1 icmp_seq=7 Destination Host Unreachable     From 192.168.24.1 icmp_seq=8 Destination Host Unreachable     From 192.168.24.1: icmp_seq=11 Redirect Host(New nexthop: xxx.xxx.xxx.xx1)     From 192.168.24.1 icmp_seq=10 Destination Host Unreachable     From 192.168.24.1 icmp_seq=11 Destination Host Unreachable     From 192.168.24.1 icmp_seq=12 Destination Host Unreachable     From 192.168.24.1 icmp_seq=13 Destination Host Unreachable     From 192.168.24.1 icmp_seq=14 Destination Host Unreachable     From 192.168.24.1 icmp_seq=15 Destination Host Unreachable     From 192.168.24.1: icmp_seq=17 Redirect Host(New nexthop: xxx.xxx.xxx.xx1)     From 192.168.24.1 icmp_seq=17 Destination Host Unreachable     From 192.168.24.1 icmp_seq=18 Destination Host Unreachable      Updated-2 I run the netstat command and got the result as               [userA@localhost ~]# netstat -rn     Kernel IP routing table     Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface     192.168.24.0    0.0.0.0         255.255.255.0   U         0 0          0 eth0     169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0     0.0.0.0         192.168.24.1    0.0.0.0         UG        0 0          0 eth0


What does a bash sequence '\033[999D' mean and where is it explained?

I have come across bash sequences such as `\033[999D` and `\033[2K\r` which are used to do some manipulation on a printout on a terminal. But what do these sequences mean? Where can I find a list/summary on the web to help me find out the meaning of these sequences?


Getting a website's ip with 'host'?

Why is it that when I run the command `host examplewebsite.com` it gives me website's ip, but for some websites, when I type that IP address into the address bar and hit enter, it shows me a 404 page? Shouldn't it take me to the website I got ip from?


Zabbix-agent: cannot stat 'filename.log': [13] Permission denied

I have installed Zabbix-server and zabbix-agent and trying to add trigger to check log file. But in `/var/log/zabbix/zabbix_agentd.log` I got the same error every time:               10832:20131008:125634.180 cannot stat '/home/teamcity/opt/apache-tomcat-5.5.36/logs/catalina.out.test': [13] Permission denied     10832:20131008:125634.180 Active check [log["/home/teamcity/opt/apache-tomcat-5.5.36/logs/catalina.out.test","ERROR"]] is not supported. Disabled.      I chmoded and chowned file with:               # ls -lh /home/teamcity/opt/apache-tomcat-5.5.36/logs/catalina.out.test     -rwsrwsrwx 1 zabbix zabbix 229M Oct  8 12:09 /home/teamcity/opt/apache-tomcat-5.5.36/logs/catalina.out.test      Item created with type Zabbix-agent (active) and have key:               log["/home/teamcity/opt/apache-tomcat-5.5.36/logs/catalina.out.test","ERROR"]      Trigger:               {lms-teamcity:log["/home/teamcity/opt/apache-tomcat-5.5.36/logs/catalina.out.test","ERROR"].str(ERROR)}=1      Can somebody explain what I'm doing wrong?


Extract TAR to SD-Card and verify contents afterwards

We currently extract a TAR archive to a SD-Card like this               tar xf ${ROOT}/rootfs.tar -C /cynox/${DRIVE}/${TARGET}       As a side note: The rootfs.tar contains files for an embedded Linux system. Some of those systems experience some kind of data corruption on the SD-cards. This can result in missing files, corrupted file contents etc. preventing the embedded system from functioning properly or even booting. This is most likely NOT related to problems during SD-Card creation, but to be totally sure, we also have to investigate in that direction. What is the best way to compare the contents on the SD-Card to the contents of the source TAR afterwards? Without knowing if its practical on Linux, things that come to mind are   1. Create a new archive from the SD-Card and compare the MD5 of both archives (or will those somehow naturally be different?)   2. Extract the source TAR elsewhere, calculate the MD5 of every file and compare file by file (is it practical to crawl all the folders/files?)   3. Somehow directly compare the SD-Card contents to the packed contents of the TAR file by file?   4. Do we need some special validations regarding folder structure, file/folder permissions and so on? I don't know what possibilities Linux provides for this task, so I would be thankful for any suggestions, pointers in the right direction and examples if possible.


How to start an application automatically on boot

I am new to Linux & looking forward to start application (which toggles a led every 10 sec). I have written the application program & it is working fine but now I want to start it automatically on boot. The documentation here says to copy the startup script to the `/etc/init.d` directory and make a symbolic link to the copied script in the `rc.d` directory. What should be the extension and name of these script files? Can we manually add the symbolic link in `rc.d` or is there some specific procedure for this? Any suggestion how to achieve it?


SquashFS image as rootfs in LXC

Is it possible to use a SquashFS filesystem as an LXC rootfs? I can mount an ext3 image as a rootfs just by setting `lxc.rootfs` to the filename, but if it's any other type of image, `lxc-start` just says that it can't mount an ext3 filesystem. The `lxc.conf` man page doesn't suggest any way to specify the filesystem type. Additionally, if I get past that stage, can you mount other loopback filesystems in the container just by using `lxc.mount.entry` entries with `'loop'` in the options field?


How can I make my .bashrc call to shopt -s autocd depend on the bash version?

In Ubuntu I like having               shopt -s autocd      in my `.bashrc` file for automatic CD'ing with typing 'cd', i.e. just type the directory name (and probably use tab completion too) and press return and be cd'd to the directory if it exists. On OSX this isn't valid in my `.bashrc` How can I do a 'depends on' for this? So that I can share and maintain just one .bashrc between the two OS's ? I know for a file I can do stuff like:               if [ -f /etc/bash_completion ] && ! shopt -oq posix; then         . /etc/bash_completion     fi      and for an application like tmux that depends on screen I can do               if [[ ! $TERM =~ screen ]]; then       if [ -n "$(type -P tmux)" ]; then         exec tmux       fi       fi      but I can I do this kinda thing for whether I can do `shopt -s autocd` ?


Are there GPG-signed OpenBSD ISOs with which I can verify an installation disc?

Are there GPG-signed OpenBSD ISOs that I can download and later verify the downloaded file? Or at least a GPG-signed shasum?


Configuring shortcuts for Sakura

I am massively confused by the sakura terminal emulator's .conf file. I want to make `Alt`+`;` open a new tab and `Alt`+`:` close a tab. I have tried:               add_tab_key=alt+;     add_tab_key=alt-;     add_tab_key=;      None of these seem to work. In fact no control key combination works, and only certain single keys work. The default is `add_tab_key=T` and if I leave it as this I need to press `Ctrl`+`Shift`+`T`. However I changed fullscreen to `fullscreen_key=F` and now it goes fullscreen if I press either `Shift`+`F` or `Ctrl`+`Shift`+`F`. I'm using sakura on Lubuntu 13.10 running i3wm


luksOpen: No key available with this passphrase

I've created a **encrypted volume with LUKS** at home and was looking to use it at work too. Unfortunately, that's not possible. Whyever, I'm unable to access the encrypted data on _any_ other computer than my workstation at home. After entering the passphrase, I do recieve this error message: ![Gnome screenshot](http://i.stack.imgur.com/wVkUz.png)               No key available with this passphrase.      Strangely enough, I've _no WTF complications_ to access the encrypted data on my home workstation. How can I encrypt the volume ?


Is there an online bash script testing site?

Sometimes I need to help friends with bash scripting. When I'm on a Windows machine, it's a working environment and I can't just setup Cygwin or use a VM. Is there some free scripting website I can use, preferably where I can use Putty to connect it or something similar?


Debian 7 / XFCE - NTFS partition umounts suddenly

Couple of days ago i faced strange problem: my NTFS partition (separate hard- drive) started to ummount suddenly. when i do umont/mount in terminal - usually it errors on umount, telling me that mount point is busy, so i kill processes and then mount partition again. it makes me think, that _mabye_ the problem is not on the level of ntfs-3g, but on xfce level? how can i check it? what logs should i check? anybody faced the same problem?


can't update with this error messg

I got this message: > not enough free disk space.... The upgrade needs a total of 31.8 M free > space on disk '/boot'. Please free at least an additional 31.8 M of disk > space on '/boot'. Empty your trash and remove temporary packages of former > installations using 'sudo apt-get clean' I'm really not that good of a user and have very little experience with Linux. I'd like some help with how to resolve this error.


Which option of ls should be used for understanding metadata changes?

How can one find the latest time of metadata changes to a file? Let's say I changed the ownership of a file and then I did `ls -l`. It still shows the latest file changes. But I want to see the time that I changed the ownership.


How do you binarize a colored image?

My friend has an colored image with Chinese handwriting (basically by taking photo of or scanning what he wrote on a piece of white paper), and he would like me to convert it into a black and white binary image. Are there applications under Ubuntu that can accomplish that? Here is an example image: ![enter image description here](http://i.stack.imgur.com/hWxAz.png)


How can I set all subdirectories of a directory into $PATH?

It looks like when adding a directory into $PATH, its subdirectories are not added recursively. So can I do that? Or is there a reason why this is not supported?


Refer to a file under the same directory of a script found in $PATH

I have a bash script file, which is put under some directory added to $PATH so that I can call the script from any directory. There is another text file under the same directory as the script. I wonder how to refer to the text file in the script? For example, if the script is just to output the content of the text file, `cat textfile` won't work, since when calling the script from a different directory, the text file is not found.


PS/2 to USB port for keyboard gives "unable to enumerate USB device on port 5"

I got my hands on a Logitech Ultra X (Y-SX49) keyboard, with US key marks. The US key placement is much better than my Swedish native, at least for programmers, because there are much fewer shortcuts for things typically desired when writing code. For example, all kinds of brackets, but also semicolon, backslash, etc.: such things would typically demand a key combination under the Swedish keymap (to give room for the three special Swedish characters), while, with the US placement, often a single key will do. (And the compose key will deal with Å, Ä, and Ö.) So I changed, while still using keyboards with Swedish marks. However, with this new keyboard, everything should be in sync. Only, it has this old port, which I think is called PS/2 (round, with nails for holes). I have a one decimeter wire to transform this port into USB (as I lack a PS/2 port on my laptop) but, when I type, it says (for example):               [ 258.228055] hub 4-0:1.0: unable to enumerate USB device on port 5      Anyone knows why it doesn't work and, if possible, how to fix it?


Which processes should I NOT strace?

I've created a little function for `strace`'ing a set of the current user's processes by name:               function pstrace() {         local pattern="$1";         shift;         prefixDashP $(pgrep -U $(whoami) $pattern) | xargs strace -o /dev/stdout $@;     }          function prefixDashP() {         local new_args=();         for arg; do             new_args+=( '-p' );             new_args+=( "$arg" );         done;         for arg in "${new_args[@]}"; do             echo "$arg";         done;     }          # Usage:  pstrace pattern1 pattern2 ...      The trouble is, if I accidentally specify too broad of a pattern, it tries to monitor processes that it shouldn't monitor, and so my system freezes. Is there a list of processes that I can always exclude?


Using Atlas from scipy

I installed Ubuntu 12.04 64 bit. I need to work with python and scipy, I installed them and when I run the test:               python -c "import scipy; scipy.test()"      I get the message: > ImportError: libatlas.so.3gf: cannot open shared object file: No such file > or directory However, I have libatlas libraries installed under the directory `/usr/lib/atlas-base`. I know I can copy the files directly under `/usr/lib`, but I wonder how I could setup the scipy to use the libraries from `usr/lib/atlas-base`?


How to check if virtio storage access is in use?

How to check if virtio storage access `virtio_blk` really is in use or an eventually existing fallback driver? Existing documentation doesn't answer it:   * http://www.linux-kvm.org/page/Boot_from_virtio_block_device   * http://wiki.libvirt.org/page/Virtio The following.               lsmod | grep virtio      Only shows, that the virtio kernel module is loaded. It isn't hard to load arbitrary kernel modules for hardware that you don't have installed. The question remains, is the virtio kernel module actually in use or an eventually existing fallback driver?


Specify the sector of manpage

When `man declare` in bash, I get the manpage of `declare`in sql. But I would like to get the manage of `declare` in shell. How can I do that?


Identify text/ascii files in Linux/Solaris

I have a little project to build `bash` script that search in the OS ( Linux/Solaris ) the current IP address from files and replace them with other IP address. The problem is that IP address could be in text file or in not text file as binary/data files, etc. I use the command:               file –mime $PATH ( --mime is valid only for Linux )      In order to verify if file is text file, or not text file ( as binary or data file, etc ) Please advice if I do the correct thing. Is my conclusion correct? For example if command:               file –mime $PATH      Return the results **"text/plain"** Then its text/ascii file, if not then it's not text file ? The second question:               file –mime      `\--mime` flag is valid only for Linux but not exists in Solaris, so what the alternative for Solaris? As all know `file` command sometimes not identify exactly the definition of the target file, so if someone have other idea how to identify text file, I will be happy to get any brilliant suggestion.


Why isn't there standard library to modify /etc/{passwd, shadow}?

Why doesn't glibc provide standard library to modify /etc/passwd and /etc/shadow, i.e add a user, change passwd, I came to that conclusion because I checked the source code of `shadow` and failed to find such interface


rename directory of images numeric

I'm trying to rename a directory full of images like so: > test.jpg   >  funny.gif   >  sad.png   >  filename.PNG   >  filenaaskjas.JPG to: > 1.jpg   >  2.gif   >  3.png   >  4.png   >  5.jpg I've got it working except for the uppercase --> lowercase conversion:               i=1;     shopt -s nullglob;     for f in *.jpg *.gif *.png *.jpeg *.JPG *.JPEG *.GIF; do         mv -- "$f" "$i.${f##*.}";         ((i++));     done      I also want `jpeg` to become `jpg`.


How to reduce kjournald activity

The culprit that do large write to my hard disk has been caught. It's kjournald One way to solve the issue is to change the file system to ext2. Is there an easy way to do so? Another thing that can work is to increase commit time to hard disk. What does it actually do? If I make commit time 600 seconds will my hard disk fail to write for 600 seconds? Will it mean less journalling or just delayed journalling? The data are mostly cache and I don't need perfect accuracy. We don't have journalling for windows right?


Non-Root Package Managers

From my research, I seem to notice that all package managers insist on being used as a privileged user and must be installed into `/`. Typically, what I like to do is create a throwaway account, compile some software, and install to `$HOME` for that account. I can try a variety of setups and then when I'm done, just destroy the account. However, compiling software becomes tedious. My experience is really just limited to `yum`, but I don't understand why I wouldn't be able to drop a repo file into `~/etc/yum.repos.d` and have yum install everything into a home account. Is there any reason why package managers must be used as a privleged user to install software?


'Distribution' to install in home directory (on older Linux)

> **Possible Duplicate:**   >  Non-Root Package Managers I'm stuck with a pretty old Linux distribution at work (Centos 5.4 from the end of 2009), and also don't have root access. If I want to use more recent software, I can compile it myself and install it my home directory (or somewhere where I have write access). That works fine with many programs, but it gets complicated with bigger ones (such as LibreOffice or Chromium). It is pretty complicated to track all the dependencies. I'm wondering if someone did this before, and maybe built a sort of Linux* distribution that I can install in my home directory (without root), and that brings all the needed dependencies with it. Preferably as binaries, as that would make it a lot faster and easier to install on an old machine. But I'd also take a 'ports' like system, or even just tips how to organize stuff if I have to compile it all manually. * * * *) Note to nitpickers: of course this wouldn't be a _Linux_ distribution _technically_ , since the one thing missing will be the actual _Linux kernel_. Before someone says this is not possible, I know it is possible, at least in most cases. For one, a lot of Linux libraries are backwards compatible, although this is not used nearly as much as in Windows (where there is no package manager). Second, you can compile most libraries needed yourself, the only thing you can't replace is the kernel. You can force the new libraries via LD_LIBRARY_PATH, or when compiling the programs that shall use them. I've managed to install a recent Skype some time ago, which needed a newer version of glibc. There even used to be someone who maintained Chromium with all its ridiculous dependencies for this version of CentOS. It's certainly possible, but its unwieldly, and seems like an ideal task for a computer program / distribution / package manager.


Do I need a new zone for each domain I have on my server?

I currently have a working BIND nameserver Running on my dedicated ubuntu server box. I have one zone set up.. example.com with its own nameservers. If I want to add a new domain to point to the server, can I somehow add it to the existing zone? Or do I have to create a new zone and setcoms nameservers to example.com?


Show shutdown messages from last shutdown

Where does Linux store the shutdown messages from last shutdown?


building pidgin-otr-4.0.0 on CentOS 7: can't find pidgin and purple

I have built pidgin from source on CentOS 7. This is because there is no package available yet. This went well, however, `pidgin-otr-4.0.0` cannot find the headers for `pidgin` and `purple`. They reside in `/usr/local/include`, and I can't work out what the configure script wants with its suggestion:               checking for EXTRA... configure: error: Package requirements (glib-2.0 >= 2.6 gtk+-2.0 >= 2.6 pidgin >= 2.0 purple >= 2.0) were not met:          No package 'pidgin' found     No package 'purple' found          Consider adjusting the PKG_CONFIG_PATH environment variable if you     installed software in a non-standard prefix.          Alternatively, you may set the environment variables EXTRA_CFLAGS     and EXTRA_LIBS to avoid the need to call pkg-config.     See the pkg-config man page for more details.      I tried a variety of `PKG_CONFIG_PATH` options such as `/usr/local` and `/usr/local/include`, as well as `EXTRA_LIBS`. I am not sure what to do at this point. I just need to specify somehow that `pidgin` and `purple` reside in `/usr/local/include`.


test recursive sed search and replace before running

Is there anyway to do a trial run of a recursive search and replace of sed before actually running it? I just want to print out the results before actually doing the search and replace. Something like echoing the results of,               grep -rl term1 . |xargs sed -i -e 's/term1/term2/'


Fix Version String Error in FreeNX Setup

On OpenSUSE 12.1, I would like to install and run the FreeNX Server. OpenSUSE has provided instructions about the installation for previous versions, and I can adapt them for 12.1, up to a point. I have taken these steps:               zypper ar http://download.opensuse.org/repositories/X11:/RemoteDesktop/openSUSE_12.1 RemoteDesktop     zypper ref     zypper in FreeNX     mkdir /usr/lib64/cups/backend/ipp     nxsetup --install --setup-nomachine-key      I didn't hit many of the issues that the OpenSUSE instructions page listed, so I didn't have to take those steps. However, at the `nxsetup` step, after a few normal warnings (about not being able to use a printer and things like that), the setup script gives me an error: > Error: Could not find 1.5.0 or 2.[01].0 or 3.[0123].0 version string in > nxagent. NX 1.5.0 or 2.[01].0 or 3.[0123].0 backend is needed for this > version of FreeNX. How do I address this error?


Tail multiple files and output as additional column with 'find' results

Would like to pull the last line of text from a specific (multiple) files in a directory. Additionally, I'd like the results to be in a more traditional column format (like `ls`) with path, rather than the typical format of `tail`. From the following results {1}, I'd like to append as an additional column the last row of data {2} Where {1} = `find . -iname 'updated.txt'`, and {2} = `tail -n1` I'm using `bash` in Mavericks


cross compile driver

I have a cross compile environment setup to compile for an ARM 9 processor, this works fine, now I want to compile an external third party driver within this environment. I downloaded the driver, and copied it into a directory. When I now call `make`, the compiler can't find the headers because the references are made from `../`. So what I get is:               $ make -j8 ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-     rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions Module.* modules.order     make -C /lib/modules/3.11.0-14-generic/build SUBDIRS=/home/reg/semios/ACME/linux-3.11.6/Gobi modules     make[1]: Entering directory `/usr/src/linux-headers-3.11.0-14-generic'       CC [M]  /home/reg/semios/ACME/linux-3.11.6/Gobi/GobiSerial.o     In file included from include/linux/types.h:5:0,                      from include/linux/list.h:4,                      from include/linux/wait.h:5,                      from include/linux/fs.h:6,                      from include/linux/tty.h:4,                      from /home/reg/semios/ACME/linux-3.11.6/Gobi/GobiSerial.c:47:     include/uapi/linux/types.h:4:23: fatal error: asm/types.h: No such file or directory     compilation terminated.     make[2]: *** [/home/reg/semios/ACME/linux-3.11.6/Gobi/GobiSerial.o] Error 1     make[1]: *** [_module_/home/reg/semios/ACME/linux-3.11.6/Gobi] Error 2     make[1]: Leaving directory `/usr/src/linux-headers-3.11.0-14-generic'     make: *** [all] Error 2     reg@regDesktopHome:~/semios/ACME/linux-3.11.6/Gobi$      How do I get this to compile properly?


Dwm - pertag patch - save state between restarts

I'm using Pertag patch As a Gentoo user I apply dwm patches using Portage. Basically there's a directory where user can put a patch for sourcecode and Portage will apply it during the compilation process (if patching procedure goes wrong whole compilation will fail) So basically I used just these commands:               cp ~/pertag.patch /etc/portage/patches/x11-wm/dwm     emerge -av dwm       Anyway Pertag patch seem to work fine - I can set different layouts for different tags etc, but when I restart dwm, all these changes are gone and I need to set it up again. Is there a way (maybe different patch?) to save these changes, so when I start dwm again, tag 2 still has for example monocle layout, tag 3 floating layout, and there's no statusbar on tag 4?


Red Hat Enterprise Linux installation process through virt-manager

I'm going through the installation process using virt-manager which I will install a virtual Red Hat machines with on my physical host. I have the image iso on the host and mounted it on `/media/cdrom`. Red Hat lists four installation methods.   * Local CD/DVD   * Hard drive    * NFS directory   * URL My first option is to use CD/DVD, although I end up getting a "disc was not found in any of your CDROM drives." For hard drive it lists `sda` and `sr0`. We also have a NFS directory, which I can try if I don't get it going with the first two options.


Is more or find more resource intensive in finding the number of times an item lists in a file?

I recently read How to find the total number of occurrences of text and files with find command, which asked about a way to find the number of times text "abc" appears in a file. The answer there provided the command `find . -name "*.txt" | xargs grep -i "abc" | wc -l` to find the count. Previously I have used something like `more "file_name*" |grep "abc" |wc -l` to list the number if times text "abc" appears in a specific file(s). I tried this and found that the `more` command returned faster, but seemed to use ~30% more CPU (I was also monitoring via `top`) than the `find` command. I was wondering if anyone had some more solid data on which of these two commands would be more intensive on resources if you were to query through approximately 15 files? How about 30+ files?


Rotate screen using udl driver (DisplayLink) on Ubuntu 14.04?

Recently got a DisplayLink device, it works, but I would like to rotate counter-clockwise. Apparently the driver does not allow rotation (tried via gnome-shell and xrandr). Searching on google I found this link: http://plugable.com/2010/01/02/displaylink-linux-rotation but it seems a bit outdated. The configuration file / etc/X11/xorg.conf does not exist, I guess xorg uses another configuration structure. Any tips on how I could rotate the screen in Ubuntu 14.04? Kernel: 3.13.0-32-generic   Xorg: 1.15.1   Device: Bus 002 Device 011: ID 17e9: 019e DisplayLink (DL-165?)


How to change the default line length for od and hexdump

Is there any way to change the default line length for the `od` and `hexdump` commands? Can't see anything apropriate in the man pages.


Repackaging a Debian package

I need instructions on how to do repackage a `.deb` package. Situation: I have a `.deb` package for an application with no source. I need to modify a `Description` field, save the file change and repackage back into a `.deb` package. Is there a step by step on how to do that?


When should I not kill -9 a process?

I am always very hesitant to run `kill -9`, but I see other admins do it almost routinely. I figure there is probably a sensible middle ground, so:   1. When and why should `kill -9` be used? When and why not?   2. What should be tried before doing it?   3. What kind of debugging a "hung" process could cause further problems?


gparted live CD can't resize a partition?

I recently ran out of space on a VirtualBox VM (CentOS guest) managed by Vagrant. It was using a `.vmdk` image, so I couldn't dynamically resize it. Following these instructions, I cloned the old image to a new, much larger `vdi` image, then attempted to resize the old partition using the GParted LiveCD. Unfortunately, even though I can see that the backing device is much larger, the partition (which is managed by LVM, since it is a CentOS guest) is displayed with a lock icon, and I can't resize it. I don't understand why the partition is locked: I'm using a LiveCD, so the FS is shouldn't be mounted (at least as I understand these things). Any suggestions on what I've done wrong? Thanks.


OpenVPN not connecting on one network?

I've been using my VPN (privateinternetaccess) for almost a year. I've been connecting through the same gateway, using the same username and password, with the same settings. Yesterday, it randomly refused to connect at home. I got to school and it worked fine, so I assumed it was an issue with their servers that was resolved. But when I got back home, it wasn't working again. I tried connecting to different locations my account has access to (Canada and various places in the US), but none of them worked. I usually connect to the VPN with NetworkManager, and it takes about 3 seconds to connect. The weird thing is, while NetworkManager always times out when trying to connect, running "openvpn file.ovpn" on the .ovpn file provided by the VPN provider will connect, but it will take over a minute. What could be wrong here? Just to clarify, it still works perfectly fine on my school's network, but not my home one.


Is ext2 suitable for daily use on a desktop or laptop?

Is a journaling filesystem needed in today's desktop world? A good OS doesn't kernel panic every month, and if we are using a laptop, then there aren't any power outages, so why shouldn't we use ext2 as the standard filesystem on a desktop or laptop?


Bittorrent Sync Autostart as a Service

I'm running a raspberry pi with the latest raspbian (debian) on it. I've installed btsync. Now I want to run Bittorrent Sync, when the system boots, not only when somebody logs in. Do I have to run btsync as a service in init.d? How would you solve this "Problem"?


Check for updates of packages installed through yaourt

Is there anyway to update package installed with yaourt ? `yaourt -Syu` seems to do the same as `pacman -Syu`, which only care about package in official repository.


How can I stop an amok running process from logging to systemd?

There's a process on my system called **demond** which logs around 100 entries to the systemd journal _every 15 seconds_ :               Okt 11 04:58:42 scarecrow demond[1692]: [P:1692 T:108160832] src/discovery.c : 158  getHidDevices        -- failed in opening HIDDEV file: /dev/hiddev0. No such file or directory     Okt 11 04:58:42 scarecrow demond[1692]: [P:1692 T:108160832] src/discovery.c : 158  getHidDevices        -- failed in opening HIDDEV file: /dev/hiddev1. No such file or directory     Okt 11 04:58:42 scarecrow demond[1692]: [P:1692 T:108160832] src/discovery.c : 158  getHidDevices        -- failed in opening HIDDEV file: /dev/hiddev2. No such file or directory     Okt 11 04:58:42 scarecrow demond[1692]: [P:1692 T:108160832] src/discovery.c : 158  getHidDevices        -- failed in opening HIDDEV file: /dev/hiddev3. No such file or directory     Okt 11 04:58:42 scarecrow demond[1692]: [P:1692 T:108160832] src/discovery.c : 158  getHidDevices        -- failed in opening HIDDEV file: /dev/hiddev4. No such file or directory     Okt 11 04:58:42 scarecrow demond[1692]: [P:1692 T:108160832] src/discovery.c : 158  getHidDevices        -- failed in opening HIDDEV file: /dev/hiddev5. No such file or directory     Okt 11 04:58:42 scarecrow demond[1692]: [P:1692 T:108160832] src/discovery.c : 158  getHidDevices        -- failed in opening HIDDEV file: /dev/hiddev6. No such file or directory     Okt 11 04:58:42 scarecrow demond[1692]: [P:1692 T:108160832] src/discovery.c : 158  getHidDevices        -- failed in opening HIDDEV file: /dev/hiddev7. No such file or directory     Okt 11 04:58:42 scarecrow demond[1692]: [P:1692 T:108160832] src/discovery.c : 158  getHidDevices        -- failed in opening HIDDEV file: /dev/hiddev8. No such file or directory     Okt 11 04:58:42 scarecrow demond[1692]: [P:1692 T:108160832] src/discovery.c : 158  getHidDevices        -- failed in opening HIDDEV file: /dev/hiddev9. No such file or directory     Okt 11 04:58:42 scarecrow demond[1692]: [P:1692 T:108160832] src/discovery.c : 158  getHidDevices        -- failed in opening HIDDEV file: /dev/hiddev10. No such file or directory     Okt 11 04:58:42 scarecrow demond[1692]: [P:1692 T:108160832] src/discovery.c : 158  getHidDevices        -- failed in opening HIDDEV file: /dev/hiddev11. No such file or directory     Okt 11 04:58:42 scarecrow demond[1692]: [P:1692 T:108160832] src/discovery.c : 158  getHidDevices        -- failed in opening HIDDEV file: /dev/hiddev12. No such file or directory     Okt 11 04:58:42 scarecrow demond[1692]: [P:1692 T:108160832] src/discovery.c : 158  getHidDevices        -- failed in opening HIDDEV file: /dev/hiddev13. No such file or directory     Okt 11 04:58:42 scarecrow demond[1692]: [P:1692 T:108160832] src/discovery.c : 158  getHidDevices        -- failed in opening HIDDEV file: /dev/hiddev14. No such file or directory     Okt 11 04:58:42 scarecrow demond[1692]: [P:1692 T:108160832] src/discovery.c : 158  getHidDevices        -- failed in opening HIDDEV file: /dev/hiddev15. No such file or directory      This fills up the journal very quickly and creates permanent disk access, which drains battery. The entries all have priority 7 (debug). demond is part of the Lexmark printer driver. I guess they use it for Wifi discovery of devices. I contacted Lexmark support and they said they cannot change the driver, and there's no way to suppress those messages. And since the driver is closed source, I cannot change it myself. I know that I can suppress debug level 7 altogether using `MaxLevelStore=info` in journald.conf, but this suppresses the debug level for _all_ processes. Is there a way to suppress logging _for a certain process_ such as demond? I'm using ArchLinux with latest systemd 208. I don't use syslog-ng or rsyslog.


error when apt-get install nfs-kernel-server

I'm now using the command `sudo apt-get install nfs-kernel-server` to make my Ubuntu 12.04.2 LTS server support NFS. But it reports this error:               Need to get 559 kB of archives.     After this operation, 1980 kB of additional disk space will be used.     Do you want to continue [Y/n]? Y     Err http://cn.archive.ubuntu.com/ubuntu/ precise/main libcap2 amd64 1:2.22-1ubuntu3       Temporary failure resolving 'cn.archive.ubuntu.com'      I tried to `ping cn.archive.ubuntu.com`, this address cannot be accessed. But I don't think this is the reason, because on my other good Ubuntu machine, I was able to use the command `sudo apt-get install smbfs`, and it worked. The `ping cn.archive.ubuntu.com` command also did not work from this machine. Can anyone tell me why this is not working and how to fix this issue?


Kernel panic-not syncing: no init found

When I try to boot up my custom linux from scratch it mounts the root filesystem then I get this message: `Kernel panic-not syncing: no init found.` I have the init compiled from source and I have the necessary libraries to run init. What did I do wrong?


Is it safe to only partially restore a disk image with dd?

I have saved my whole hard-disk with `dd` to an image file. The hard-disk contained some primary partitions formatted with ntfs, swap and ext4. I did it this way:               dd if=/dev/sda | ssh user@fastmachine "cat - > diskimage.img"      Then I have overwritten the first 5 to 6 GB of my hard-disk for testing purposes with a new system:   1. I created a swap primary partition with 1.5 GB.   2. I created an ext4 primary partition with 4 GB. After testing the test system now I want my old system back. But my local hard-disk is **very slow when writing.** To save time and energy I want to only restore about 6 GB from the image. Is this enough and safe? Would it work? I would do it this way:               ssh user@fastmachine "dd if=diskimage.img bs=1M count=6000" | dd of=/dev/sda      ## Update—partially restoring test It worked to only partially restore the hard-disk. ## Update—speedtest of 1.8" pata hard-disk I just testet the writing speed with               dd if=/dev/zero of=blub count=1000 bs=1M      And               ssh user@fastmachine "dd if=/dev/zero count=1000 bs=1M" | dd of=blub        * First gave me 14.5 MByte/s as writespeed to my 1.8" hard-disk—not as bad as I thought   * Second gave me 11.4 MByte/s = 91.2 Mbit/s ≈ 100 Mbit/s = speed of my ethernet connection But: **ssh over WLAN (wireless)** only was 1,3 MByte/s! That was the problem. ssh took 68 % cpu load when copying over ethernet, and only 20 % when copying over WLAN (wireless). **Conclusion:** If I had a faster network and hard-disk/flash-drive I would use netcat (nc) to copy the data.


Wrong timezone offset. How do I correct it? (help with zic timezone compiler)

I have an iPod touch (2nd gen) and constant troubles with the clock setting itself one hour ahead of the actual time when I connect it to the computer. long story short, When I SSH into the device:   * `date "+%Z"` returns `ARST` which is correct (I'm in Buenos Aires, Argentina)   * `date "+%z"` the result is `-0200`, which is wrong and should be `-0300` My question is: **How do I correct the offset of my timezone to the real value?** I have found mentions of `zic`, `zdump` and references to a "IANA Time Zone Database".   I've tried to find allready compiled files in order to replace the whole "zoneinfo" folder, but the downloads I could find seem to use a different folder structure than the one on the iPod. _edit_ : I am looking for a way to edit or update the timezone information, so that my timezone "ARST" is configured correctly. I have found several references to a compiler named `zic`, but need help in order to work out a solution.   Both `zic` and `zdump` are present on the device, which leads me to believe it can be done via SSH and UNIX-commands.


Sharing Multiple Folders with Samba

How can I share multiple folders in Samba? If I use mutiple `[public]` sections in `smb.conf` only the last 1 has effect. Then if I try to name each section differently, I samba doesnt seem to recognize them as shares.


My audio device not working

I have been setting up a new CrunchBang Linux and my sound doesn't work. When I type `lspci -v` command and `alplay -l` command in command prompt I can see that my sound card is connected and detected. Results:               ziga@ziga-laptop:~$ aplay -l     **** List of PLAYBACK Hardware Devices ****     card 0: SB [HDA ATI SB], device 0: HDA Generic [HDA Generic]       Subdevices: 0/1       Subdevice #0: subdevice #0      More results:               ziga@ziga-laptop:~$ lspci -v     00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA) (rev 40)         Subsystem: Hewlett-Packard Company Device 1604         Flags: bus master, slow devsel, latency 64, IRQ 16         Memory at 90400000 (64-bit, non-prefetchable) [size=16K]         Capabilities: <access denied>         Kernel driver in use: HDA Intel      Well I've figured out that my audio card model is `ATI SBx00` and I can't find it on www.alsa-project.org although my soundcard already worked with alsamixer when I was using Xubuntu 12.04. And it also worked with previous versions of CrunchBang Linux. So I've tried to reconfigure alsamixer by using command `alsamixer`, pressing F5 and then increasing all sliders to the max like shown below.               ┌───────────────────────────── AlsaMixer v1.0.23 ──────────────────────────────┐     │ Card: HDA ATI SB                                     F1:  Help               │     │ Chip: Realtek ID 270                                 F2:  System information │     │ View: F3: Playback  F4: Capture  F5:[All]            F6:  Select sound card  │     │ Item: PCM [dB gain: 0.00, 0.00]                      Esc: Exit               │     │                                                                              │     │                       ┌──┐     ┌──┐     ┌──┐     ┌──┐                        │     │                       │▒▒│     │▒▒│     │▒▒│     │▒▒│                        │     │                       │▒▒│     │▒▒│     │▒▒│     │▒▒│                        │     │                       │▒▒│     │▒▒│     │▒▒│     │▒▒│                        │     │                       │▒▒│     │▒▒│     │▒▒│     │▒▒│                        │     │                       │▒▒│     │▒▒│     │▒▒│     │▒▒│                        │     │                       │▒▒│     │▒▒│     │▒▒│     │▒▒│                        │     │                       │▒▒│     │▒▒│     │▒▒│     │▒▒│                        │     │                       │▒▒│     │▒▒│     │▒▒│     │▒▒│                        │     │                       │▒▒│     │▒▒│     │▒▒│     │▒▒│                        │     │                       │▒▒│     │▒▒│     │▒▒│     │▒▒│                        │     │                       │▒▒│     │▒▒│     │▒▒│     │▒▒│                        │     │                       └──┘     └──┘    L└──┘R    └──┘                        │     │                                       CAPTURE                                │     │                     100<>100 100<>100 100<>100 100<>100                      │     │                      Master <  PCM   >Capture  Digital                       │     │                                                                              │     └──────────────────────────────────────────────────────────────────────────────┘      When in alsamixer i tried to hit F2 and this menu pops out:               ┌───── Select File ──────┐     │/proc/asound/version    │     │/proc/asound/cards      │     │/proc/asound/devices    │     │/proc/asound/oss/devices│     │/proc/asound/timers     │     │/proc/asound/pcm        │     └────────────────────────┘      Below i will paste outputs of all of all menu options, here it goes:               ┌───────────────── /proc/asound/version ─────────────────┐               │Advanced Linux Sound Architecture Driver Version 1.0.21.│               └────────────────────────────────────────────────────────┘               ┌──────────────── /proc/asound/cards ─────────────────┐                 │ 0 [SB             ]: HDA-Intel - HDA ATI SB         │                 │                      HDA ATI SB at 0x90400000 irq 16│                 └─────────────────────────────────────────────────────┘                 ┌─────── /proc/asound/devices ───────┐                       │  2:        : timer                 │                       │  3:        : sequencer             │                       │  4: [ 0- 0]: digital audio playback│                       │  5: [ 0- 0]: digital audio capture │                       │  6: [ 0- 0]: hardware dependent    │                       │  7: [ 0]   : control               │                       └────────────────────────────────────┘            ┌ /proc/asound/oss/devices ┐     │  0: [0- 0]: mixer        │     │  3: [0- 0]: digital audio│     │  4: [0- 0]: digital audio│     └──────────────────────────┘     ┌──────────── /proc/asound/timers ─────────────┐                    │G0: system timer : 4000.000us (10000000 ticks)│                    │P0-0-0: PCM playback 0-0-0 : SLAVE            │                    │P0-0-1: PCM capture 0-0-1 : SLAVE             │                    └──────────────────────────────────────────────┘                    ┌─────────────────── /proc/asound/pcm ────────────────────┐               │00-00: HDA Generic : HDA Generic : playback 1 : capture 1│               └─────────────────────────────────────────────────────────┘              When i press F6 i get the menu for selecting sound card which looks like this:               ┌───── Sound Card ──────┐     │-  (default)           │     │0  HDA ATI SB          │     │   enter device name...│     └───────────────────────┘


How to align a column in a text file

Using bash on Linux, how can I process a text file such that space is inserted before a certain column so that column is aligned in the output? For example: ### Input               1653455 ASDFASDF22 bla bla bla asd xmv ASDFASDF22 AA     1944444 ASDFASDF22 klasdfmxvl yxklc erisa ask xdk asdm ase ASDFASDF22 BB     1984945 ASDFASDF22 jklyck aklsdfl asfjasl asdkkcii wdkkkxd aslasl wqe ASDFASDF22 BB      ### Output               1653455 ASDFASDF22 bla bla bla asd xmv                                ASDFASDF22 AA     1944444 ASDFASDF22 klasdfmxvl yxklc erisa ask xdk asdm ase            ASDFASDF22 BB     1984945 ASDFASDF22 jklyck aklsdfl asfjasl asdkkcii wdkkkxd aslasl wqe ASDFASDF22 BB      The columns between the two `ASDFASDF22`s must be less than 50 characters, or it should be truncated.


History of apropos command

I am writing a paper on my project, the goal of which is to write a new implementation of the `apropos(1)` command. While I realize that `apropos` was written in the early days of Unix when computing resources were scarce and hence its designers kept it simple. I am looking for a concrete source of information on this to back my point. Is there any historical document or artifact that describes when and why these commands were introduced into Unix? My Google searches have not returned anything useful so I was wondering whether perhaps those of you who have been involved with Unix since the early days might have some knowledge about it.


How can I flash_erase mtd0?

I am trying to find a way to `nandwrite` my mtd0 partition which contains my u-boot environment. When I try to `flash_eraseall /dev/mtd0` though I get: > flash_eraseall: /dev/mtd0: Permission denied Is there any way I can get permission to do this? After doing some reading I get the suspicion that I would have to modify and recompile my Kernel. I am trying to find a way to work around that though.


Running executables on an NTFS partition?

My system configuration is the following:   * UEFI computer   * Dual-boot with Windows 8 and Linux Mint 15 Olivia I would like to be able to run Linux executables that are stored on an NTFS partition rather than having to copy them each time on a Linux partition. Whenever ticking the _Execute_ check box it de-ticks itself, I guess because it's on an NTFS partition.               ![enter image description here](http://i.stack.imgur.com/PLqDm.png) I've come across this post:   * http://askubuntu.com/questions/11840/how-to-chmod-on-an-ntfs-or-fat32-partition Searching on my system, I have found that mentioned settings can be done in _Disks_ settings dialog:     ![enter image description here](http://i.stack.imgur.com/WjQw0.png) I thought about appending _exec_ at the end of default parameters but I'm not sure about these things:   * According to answer 2 of the above question: _NTFS is a POSIX-compatible_ and _To enable this, you need a "User Mapping File"_.   * So, is the _User Mapping File_ a file stored on the Linux partition? (i.e. stores Linux-specific permissions in my Linux partition instead of directly changing the permissions in the NTFS partition). **In short :** Can I safely do this as I will still use my Windows with this partition?