title: Screen reptyring screen

text: Having recently discovered `reptyr`, my first action was to do everything I could to break it. This included `reptyr`ing screen into a screen session as follows:               $ screen     My zshrc cats some stuff here.     $ reptyr $(pgrep screen)      I thought that this would fail either gracefully or badly, but the failure had some interesting side effects:               zsh: suspended  screen                       %     Unable to attach to pid 24799: Operation not permitted     The kernel denied permission while attaching. If your uid matches     the target's, check the value of /proc/sys/kernel/yama/ptrace_scope.     For more information, see /etc/sysctl.d/10-ptrace.conf     $ jobs     zsh: command not found: jos     $ jobs     zsh: command not found: obs     $ jobs     [1]  + running screen     $ exit      My input is thoroughly garbled here, I'm not really sure what's going on with that process, and the exit command doesn't warn me about any jobs. What is the explanation for this?


title: How to get modification time for a file (in UNIX TIME!) on AIX?

text: $ istat TESTFILE.txt     Inode 2317 on device 12/7       File     Protection: rw-------        Owner: 4847(testuser)           Group: 346(testuser)     Link count:   1         Length 1480 bytes          Last updated:   Sun Jun 15 08:20:17 2014     Last modified:  Sun Jun 15 08:20:17 2014     Last accessed:  Sun Jun 15 13:03:37 2014          $       istat doesn't know any format for UNIX TIME on AIX? **My question:** How can I display the modification time for a file in UNIX TIME format on AIX?


title: How to utilize extended attributes for image preview?

text: Is there any file browsers for Linux that cache image previews, just like Windows Explorer cache them to a file named `Thumbs.db`? As in the latest ext3/4 filesystems, an inode can hold extended attributes, is it utilizied by any file browser? Well, the default 256B inode size may be too small to hold the preview, I can reformat it to get a bigger inode. I'll be very glad to hear good news, because to refresh the previews for large images and video files are very slow in Nautilus, and noises from the harddisks ..


title: RT2800USB wireless adapter stops scanning

text: I have a Linux machine, and I'll switch between using an RTL8187 based card, and a RT2800USB based card (the cards are both USB dongles by the same manufacturer). I've loaded the drivers for both cards:               modprobe rtl8187     modprobe rt2800usb      I can run an iwlist scan against the RTL8187 card until I'm blue in the face, but after a few minutes of doing the same with the RT2800USB card, it stops working, and displays the following:               $ sudo iwlist wlan0 scan     wlan0     No scan results      What can I do to get the card to work 100%?


title: Keep ext4 journal on another system, how much space would be necessary?

text: I'm going to move journal to another partition, but I don't know how to correctly caculate the size needed for journal? I'm running `ext4` file system with 15GB capacity.


title: How to create an user only with SSH -access and easily-set-up .ssh -dir perms?

text: I often mess up when I manually set up the .ssh -dir, easy to forget some flag. I often need to create a new user and only allowing access with SSH, how can I do that? Basically, I want to stop doing this `"# mkdir .ssh; cd .ssh; ssh-keygen; cat myKey > authorized_keys; cd ..; chown go-r; scp .ssh/myKey friend@IP' etc"`, I am sure I even now did some mistake somewhere -- I am pretty sure some command such as ssh-copy-id may be a solution here, at least it fixes the perms with .ssh when used rightly. **Want something like this, perhaps with ssh-copy-id?** > >        # adduser tester >        # ssh-key-gen docs >        # ssh-copy-id docs /home/tester/  # not working, how to do this > easily? >   > > and then on client side >   >   >        $ eval `ssh-agent` >        $ ssh-add ~/.ssh/docs >        $ ssh tester@IP >   > > that should give the access to the repo with the priv -key. **Perhaps related** >   1. How to add a ssh user who only has permissions to access specific > folder? > >   2. How would you create a user with the HOME_DIR field in /etc/passwd > completely blank? > >


title: Program only sees 1 input device

text: I have a program (advancemame) running on Raspian (Raspberry Pi) which like most programs gets its input from the keyboard. I'm using a program which implements `uinput` to convert GPIO pins HI/LOW readings to key presses (pikeyd). I run `pikeyd` in the background from the terminal, which has a GPIO pin mapped to key 5. I set the corresponding GPIO to HI, it prints out "5" to the terminal. However, when I run `advancemame`, it doesn't recognize the `uinput`. If I unplug the keyboard and reboot, then `advancemame` sees `uinput` and everything works. From what it looks like is the program will read the first input device, `input0` (keyboard). Is there a way to make `uinput` `input0`? That is, set the order of the input devices               $ ls /sys/class/input/       event0  event1  event2  input0  input1  input2  mice  mouse0  mouse1          $ ls /sys/devices/virtual/input/input2/       capabilities  event2  id  modalias  mouse1  name  phys  power  properties  subsystem  event  uniq      I'm not sure if there is a setting in `advancemame` that will look at all input devices. I have 3 images I built from scratch, 1 of the 3 images works where `advancemame` sees all the input devices. I can use my `uinput` and the keyboard at the sometime. I've compared config settings between the images and can't seem to find why one works and the others don't. I am wondering if it may be a security permission. Also, is there a way to disable event0 and event1? I am not using `X11`, so `xinput` is not an option. **EDIT** Here are my input devices:               pi@raspberrypi ~ $ cat /proc/bus/input/devices     I: Bus=0003 Vendor=0d62 Product=0500 Version=0100     N: Name="2.4G Wireless Keyboard with Touchpad"     P: Phys=usb-bcm2708_usb-1.2/input0     S: Sysfs=/devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2:1.0/input/input0     U: Uniq=     H: Handlers=sysrq kbd event0      B: PROP=0     B: EV=120013     B: KEY=10000 7 ff9f207a c14057ff febeffdf ffefffff ffffffff fffffffe     B: MSC=10     B: LED=7          I: Bus=0003 Vendor=0d62 Product=0500 Version=0100     N: Name="2.4G Wireless Keyboard with Touchpad"     P: Phys=usb-bcm2708_usb-1.2/input1     S: Sysfs=/devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2:1.1/input/input1     U: Uniq=     H: Handlers=kbd mouse0 event1      B: PROP=0     B: EV=1f     B: KEY=4837fff 72ff32d bf544446 0 0 1f0001 20f90 8b17c000 677bfa d9415fed 9ed680 4400 0 10000002     B: REL=143     B: ABS=7f01 0     B: MSC=10          I: Bus=0003 Vendor=0001 Product=0001 Version=0001     N: Name="uinput-sample"     P: Phys=     S: Sysfs=/devices/virtual/input/input2     U: Uniq=     H: Handlers=sysrq kbd mouse1 rfkill event2      B: PROP=0     B: EV=100007     B: KEY=10000 ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe     B: REL=3      Any help is appreciated.


title: Two-step remote ssh without password

text: I'm looking to ssh from my localhost to a remote server, and from there to a remote computer. I currently have it set up so that the remote computer and remote server have passwordless ssh-ing set up between them, but if I ssh from my localhost into the server, and then try to ssh to the computer from there, I get:               Enter passphrase for key '/home/user/.ssh/id_dsa':      Permission denied (publickey,gssapi-keyex,gssapi-with-mic,keyboard-interactive).      If I try to ssh from a terminal open on the remote server to the remote computer, it works just fine. Does it have something to do with my display not being `:0.0`, or something else entirely? I've tried `xhost +local:` but been lost past that. Thanks


title: Compiling the kernel with default configurations

text: Assumptions:   * The platform:   `anisha@linux-dopx:~/> uname -a`   `Linux linux-dopx 2.6.34-12-desktop #1 SMP PREEMPT 2010-06-29 02:39:08 +0200 x86_64 x86_64 x86_64 GNU/Linux`   * The kernel downloaded is the latest stable one from kernel.org.   * We let the defaults remain (make no changes) in the options of `make menuconfig`.   * Simply type `make`, `make install`, `grub-update`, and reboot. Now, following these assumptions, are we still required to make some additional changes to files or compile some extra drivers to ensure a error free reboot? If yes, then on what things do those changes depend on? EDIT 1:               anisha@linux-dopx:/> sudo /sbin/lspci -n     00:00.0 0600: 8086:29c0 (rev 10)     00:02.0 0300: 8086:29c2 (rev 10)     00:1b.0 0403: 8086:27d8 (rev 01)     00:1c.0 0604: 8086:27d0 (rev 01)     00:1c.1 0604: 8086:27d2 (rev 01)     00:1d.0 0c03: 8086:27c8 (rev 01)     00:1d.1 0c03: 8086:27c9 (rev 01)     00:1d.2 0c03: 8086:27ca (rev 01)     00:1d.3 0c03: 8086:27cb (rev 01)     00:1d.7 0c03: 8086:27cc (rev 01)     00:1e.0 0604: 8086:244e (rev e1)     00:1f.0 0601: 8086:27b8 (rev 01)     00:1f.1 0101: 8086:27df (rev 01)     00:1f.2 0101: 8086:27c0 (rev 01)     00:1f.3 0c05: 8086:27da (rev 01)     01:00.0 0200: 10ec:8136 (rev 01)      * * *


title: StackExchange with Elinks

text: I use Elinks to browse while I am connected remotely. I am unable to login to stackexchange using my OpenID. I enter the correct URL, and upon submission, I get the "No OpenID endpoint found." text. I am certain that I am entering the correct URL. Has anybody else had any success logging in via elinks? Any help will be appreciated.


title: How can I clean out duplicate entries from my PATH?

text: Currently, my $PATH has two identical entries for `/usr/local/bin` and I'm curious whether there's a way to clean that up, or if I should just not worry about it. It looks like this (broken up into a readable list):               /Users/myself/.rvm/gems/ruby-2.0.0-p353/bin     /Users/myself/.rvm/gems/ruby-2.0.0-p353@global/bin     /Users/myself/.rvm/rubies/ruby-2.0.0-p353/bin     /usr/local/bin <--( Here )     /usr/bin     /bin     /usr/sbin     /sbin     /usr/local/bin <--( Here )     /opt/X11/bin     /usr/texbin     /Users/myself/.rvm/bin


title: Efficiently delete large directory containing thousands of files

text: We have an issue with a folder becoming unwieldy with hundreds of thousands of tiny files. There are so many files that performing `rm -rf` returns an error and instead what we need to do is something like: `find /path/to/folder -name "filenamestart*" -type f -exec rm -f{} \;` This works but is very slow and constantly fails from running out of memory. Is there a better way to do this? Ideally I would like to remove the entire directory without caring about the contents inside it.


title: Transposing rows and columns

text: I have a file with the lines like below.               title1:A1     title2:A2     title3:A3     title4:A4     title5:A5          title1:B1     title2:B2     title3:B3     title4:B4     title5:B5          title1:C1     title2:C2     title3:C3     title4:C4     title5:C5          title1:D1     title2:D2     title3:D3     title4:D4     title5:D5 How can I achieve this?               title1    title2     title3    title4     A1         A2         A3         A4     B1         B2         B3         B4     C1         C2         C3         C4     D1         D2         D3         D4 `


title: Command to transpose (swap rows and columns of) a text file

text: Is there currently a generic command that will "pivot" input. e.g.               #labeled.file     name: bob     title: code monkey          name: joe     title: pointy haired      is converted to:               name title     bob  code monkey     joe  pointy haired      and vice-versa


title: How to install with yum all python packages except broken?

text: I want to install all python packages on my Fedora 20 system, and there are broken dependencies. How can I install all except the broken or with errors?               ]$ sudo yum install *python*      .....               --> Finished Dependency Resolution     Error: Package: python-qpid_messaging-0.24-3.fc20.x86_64 (fedora)                Requires: qpid-cpp-client(x86-64) = 0.24                Available: qpid-cpp-client-0.24-6.fc20.x86_64 (fedora)                    qpid-cpp-client(x86-64) = 0.24-6.fc20                Installing: qpid-cpp-client-0.26-3.fc20.x86_64 (updates)                    qpid-cpp-client(x86-64) = 0.26-3.fc20     Error: Package: gcc-python2-debug-plugin-0.12-15.fc20.x86_64 (fedora)                Requires: gcc = 4.8.2-1.fc20                Installed: gcc-4.8.2-7.fc20.x86_64 (@updates)                    gcc = 4.8.2-7.fc20                Available: gcc-4.8.2-1.fc20.x86_64 (fedora)                    gcc = 4.8.2-1.fc20     Error: Package: gcc-python3-plugin-0.12-15.fc20.x86_64 (fedora)                Requires: gcc = 4.8.2-1.fc20                Installed: gcc-4.8.2-7.fc20.x86_64 (@updates)                    gcc = 4.8.2-7.fc20                Available: gcc-4.8.2-1.fc20.x86_64 (fedora)                    gcc = 4.8.2-1.fc20     Error: Package: python-neutron-2013.2.3-2.fc20.noarch (updates)                Requires: python-neutronclient >= 2.3.4                Available: python-neutronclient-2.3.1-2.fc20.noarch (fedora)                    python-neutronclient = 2.3.1-2.fc20                Installing: python-neutronclient-2.3.1-3.fc20.noarch (updates)                    python-neutronclient = 2.3.1-3.fc20     Error: Package: gcc-python3-debug-plugin-0.12-15.fc20.x86_64 (fedora)                Requires: gcc = 4.8.2-1.fc20                Installed: gcc-4.8.2-7.fc20.x86_64 (@updates)                    gcc = 4.8.2-7.fc20                Available: gcc-4.8.2-1.fc20.x86_64 (fedora)                    gcc = 4.8.2-1.fc20     Error: Package: gcc-python2-plugin-0.12-15.fc20.x86_64 (fedora)                Requires: gcc = 4.8.2-1.fc20                Installed: gcc-4.8.2-7.fc20.x86_64 (@updates)                    gcc = 4.8.2-7.fc20                Available: gcc-4.8.2-1.fc20.x86_64 (fedora)                    gcc = 4.8.2-1.fc20      You could try using --skip-broken to work around the problem      You could try running: rpm -Va --nofiles --nodigest      I've tried:               ]$ sudo yum install *python* --skip-broken      But it gives this:               Running transaction check     Running transaction test               Transaction check error:       file /etc/bash_completion.d/django_bash_completion from install of python3-django15-1.5.6-1.fc20.noarch conflicts with file from package python-django-bash-completion-1.6.4-1.fc20.noarch       file /etc/bash_completion.d/django_bash_completion from install of python-django15-1.5.6-1.fc20.noarch conflicts with file from package python-django-bash-completion-1.6.4-1.fc20.noarch       file /usr/lib/python2.7/site-packages/tests/__init__.py conflicts between attempted installs of python-libturpial-1.7.0-1.fc20.noarch and python-django-federated-login-1.0.0-1.fc20.noarch       file /usr/lib/python2.7/site-packages/tests/__init__.pyc conflicts between attempted installs of python-libturpial-1.7.0-1.fc20.noarch and python-django-federated-login-1.0.0-1.fc20.noarch       file /usr/lib/python2.7/site-packages/tests/__init__.pyo conflicts between attempted installs of python-libturpial-1.7.0-1.fc20.noarch and python-django-federated-login-1.0.0-1.fc20.noarch       file /usr/lib/python3.3/site-packages/queuelib/__pycache__/__init__.cpython-33.pyc conflicts between attempted installs of python3-queuelib-1.1.1-1.fc20.noarch and python3-python-queuelib-1.0-2.fc20.noarch       file /usr/lib/python3.3/site-packages/queuelib/__pycache__/__init__.cpython-33.pyo conflicts between attempted installs of python3-queuelib-1.1.1-1.fc20.noarch and python3-python-queuelib-1.0-2.fc20.noarch       file /usr/lib/python3.3/site-packages/queuelib/__pycache__/pqueue.cpython-33.pyc conflicts between attempted installs of python3-queuelib-1.1.1-1.fc20.noarch and python3-python-queuelib-1.0-2.fc20.noarch       file /usr/lib/python3.3/site-packages/queuelib/__pycache__/pqueue.cpython-33.pyo conflicts between attempted installs of python3-queuelib-1.1.1-1.fc20.noarch and python3-python-queuelib-1.0-2.fc20.noarch       file /usr/lib/python3.3/site-packages/queuelib/__pycache__/queue.cpython-33.pyc conflicts between attempted installs of python3-queuelib-1.1.1-1.fc20.noarch and python3-python-queuelib-1.0-2.fc20.noarch       file /usr/lib/python3.3/site-packages/queuelib/__pycache__/queue.cpython-33.pyo conflicts between attempted installs of python3-queuelib-1.1.1-1.fc20.noarch and python3-python-queuelib-1.0-2.fc20.noarch       file /usr/lib/python3.3/site-packages/queuelib/pqueue.py conflicts between attempted installs of python3-queuelib-1.1.1-1.fc20.noarch and python3-python-queuelib-1.0-2.fc20.noarch       file /usr/lib/python3.3/site-packages/queuelib/queue.py conflicts between attempted installs of python3-queuelib-1.1.1-1.fc20.noarch and python3-python-queuelib-1.0-2.fc20.noarch       file /usr/lib/python3.3/site-packages/queuelib/tests/__pycache__/__init__.cpython-33.pyc conflicts between attempted installs of python3-queuelib-1.1.1-1.fc20.noarch and python3-python-queuelib-1.0-2.fc20.noarch       file /usr/lib/python3.3/site-packages/queuelib/tests/__pycache__/__init__.cpython-33.pyo conflicts between attempted installs of python3-queuelib-1.1.1-1.fc20.noarch and python3-python-queuelib-1.0-2.fc20.noarch       file /usr/lib/python3.3/site-packages/queuelib/tests/__pycache__/test_pqueue.cpython-33.pyc conflicts between attempted installs of python3-queuelib-1.1.1-1.fc20.noarch and python3-python-queuelib-1.0-2.fc20.noarch       file /usr/lib/python3.3/site-packages/queuelib/tests/__pycache__/test_pqueue.cpython-33.pyo conflicts between attempted installs of python3-queuelib-1.1.1-1.fc20.noarch and python3-python-queuelib-1.0-2.fc20.noarch       file /usr/lib/python3.3/site-packages/queuelib/tests/__pycache__/test_queue.cpython-33.pyc conflicts between attempted installs of python3-queuelib-1.1.1-1.fc20.noarch and python3-python-queuelib-1.0-2.fc20.noarch       file /usr/lib/python3.3/site-packages/queuelib/tests/__pycache__/test_queue.cpython-33.pyo conflicts between attempted installs of python3-queuelib-1.1.1-1.fc20.noarch and python3-python-queuelib-1.0-2.fc20.noarch       file /usr/lib/python3.3/site-packages/queuelib/tests/test_pqueue.py conflicts between attempted installs of python3-queuelib-1.1.1-1.fc20.noarch and python3-python-queuelib-1.0-2.fc20.noarch       file /usr/lib/python3.3/site-packages/queuelib/tests/test_queue.py conflicts between attempted installs of python3-queuelib-1.1.1-1.fc20.noarch and python3-python-queuelib-1.0-2.fc20.noarch          Error Summary     -------------


title: Merging files into one also adding a new line between each file

text: I'm using               find . -type f \( -name "*.js" ! -name "*-min*" \) -exec cat {} \; > all.js      to merge files together. Unfortunately I don't get a new line after each file but it ends and the new file starts on the same line. How can I add a newline between each file?


title: Black screen after installing Arch Linux, conventional fixes don't work

text: I recently installed Arch Linux on my HP Pavilion dv6 (Radeon HD 6770m graphics card) to dual boot with Windows 7 by following the beginner's guide found on the Arch wiki. After grub loads, I choose "Arch Linux", but nothing is displayed on the screen. A quick Google search revealed that appending `nomodeset` or `radeon.modeset=0` to the `linux` command in grub might fix the problem, but it does not appear to change anything. The line I'm using to load the kernel is               linux /boot/vmlinuz-linux root=<UUID> rw nomodeset


title: Madwifi VAP (and wlanconfig) modern equivalent

text: It appears that the Madwifi project is deprecated, so I am curious if there is a replacement for the `wlanconfig` utility that allowed users create Virtual APs. I did search for wlanconfig in my package repositories but it seems to be gone as well According to the manual page, VAPs are: > The current MadWifi driver supports multiple APs and concurrent AP/Station > mode operation on the same device. The devices are restricted to using the > same underlying hardware, thus are limited to coexisting on the same channel > and using the same physical layer features. Each instance of an AP or > station is called a Virtual AP (or VAP). Each VAP can be in either AP mode, > station mode, ``special'' station mode, and monitor mode. Every VAP has an > associated underlying base device, which is created when the driver is > loaded. Essentially, I am wondering if I can get my Atheros (`ath9k`) card to act as an AP and a station at the same time... Thanks.


title: Safety of SMB versus SFTP

text: I have a server with OpenSSH enabled. I use it to make distant backups. I mainly use rsync over SSH and SFTP. I understood that these protocols are quite safe. I am interested in enabling Samba share on the server so that I can access content easily with some IOS apps that I have. My question is as follows: - Is Samba a secure protocol? - Is the security level similar to SSH? - Would you guys rather stick with SSH/SFTP instead of opening up SMB?


title: pwd: show mountpoint

text: I have mounted a directory to another directory using `mount --bind` so that an sftp user of my server can access this directory.               mount --bind /path/share /path/home/user/stuff I have put this in `/etc/fstab` and it is working great. If I `cd` into the mounted directory and do `pwd`, it seems as if the directory is actually, physically there:               /path/home/user/stuff/share Is there a command that shows where the 'original' directory is located (just as symlinks: when you do `ls -fsl` you see the original path)?


title: Installing Android 4.3 onto my computer not working

text: I'm trying to install android 4.3 onto my laptop but when I boot my LiveUsb and click Install it doesn't show my main hard drive as a place I can install to. It just shows my EFI partition for storing programs I download, and my USB. When I try to install it onto my EFI partition it doesn't have enough room and I have to clear my partition. And it just wont let me install on the USB. I can't even run it off of my USB. When I try to run it, it'll boot up and everything except the image it totally messed up, its not even recognizable. Is there anything I can do to officially install it? Running Ubuntu 12.04LTS   Installing Android 4.3


title: Postfix mail how to debug transmission to mail handling agent

text: I have a postfix server running on Ubuntu (and Debian previously). The server is configured to read users and groups from an OpenLDAP server and delivers mail first the spam filter and then to a Zarafa dagent which makes the mail available in the Zarafa groupware. This works pretty well, however when sending mail to groups, only one member of the group receives the mail. For example I got a group mail "info@example.com" (domain names have been replaced), this is set up to deliver mail to "user1@example.com" and "user2@example.com". When I look at the log files, it actually looks pretty good:               Jan 19 10:03:30 nx01 postfix/smtpd[24603]: connect from dub0-omc2-s32.dub0.hotmail.com[157.55.1.171]     Jan 19 10:03:30 nx01 postfix/smtpd[24603]: 98188112027D: client=dub0-omc2-s32.dub0.hotmail.com[157.55.1.171]     Jan 19 10:03:30 nx01 postfix/cleanup[24606]: 98188112027D: message-id=<DUB123-W355AE0C8CE96FD543E9078DBA0@phx.gbl>     Jan 19 10:03:30 nx01 postfix/qmgr[1001]: 98188112027D: from=<derkork@xxxxxxx.com>, size=1515, nrcpt=2 (queue active)     Jan 19 10:03:30 nx01 spamd[12448]: spamd: connection from localhost [127.0.0.1] at port 42219     Jan 19 10:03:30 nx01 spamd[12448]: spamd: setuid to spam succeeded     Jan 19 10:03:30 nx01 spamd[12448]: spamd: processing message <DUB123-W355AE0C8CE96FD543E9078DBA0@phx.gbl> for spam:997     Jan 19 10:03:30 nx01 postfix/smtpd[24603]: disconnect from dub0-omc2-s32.dub0.hotmail.com[157.55.1.171]     Jan 19 10:03:30 nx01 spamd[12448]: spamd: clean message (-0.5/6.0) for spam:997 in 0.2 seconds, 1469 bytes.     Jan 19 10:03:30 nx01 spamd[12448]: spamd: result: . 0 - BAYES_00,HTML_MESSAGE scantime=0.2,size=1469,user=spam,uid=997,required_score=6.0,rhost=localhost,raddr=127.0.0.1,rport=42219,mid=<DUB123-W355AE0C8CE96FD543E9078DBA0@phx.gbl>,bayes=0.000000,autolearn=ham     Jan 19 10:03:30 nx01 spamd[1519]: prefork: child states: II     Jan 19 10:03:31 nx01 postfix/pickup[20834]: 044AF1120847: uid=997 from=<derkork@xxxxxxxx.com>     Jan 19 10:03:31 nx01 postfix/pipe[24607]: 98188112027D: to=<user1@example.com>, orig_to=<info@example.com>, relay=spamfilter, delay=0.43, delays=0.18/0/0/0.25, dsn=2.0.0, status=sent (delivered via spamfilter service)     Jan 19 10:03:31 nx01 postfix/pipe[24607]: 98188112027D: to=<user2@example.com>, orig_to=<info@example.com>, relay=spamfilter, delay=0.43, delays=0.18/0/0/0.25, dsn=2.0.0, status=sent (delivered via spamfilter service)     Jan 19 10:03:31 nx01 postfix/qmgr[1001]: 98188112027D: removed     Jan 19 10:03:31 nx01 postfix/cleanup[24606]: 044AF1120847: message-id=<DUB123-W355AE0C8CE96FD543E9078DBA0@phx.gbl>     Jan 19 10:03:31 nx01 postfix/qmgr[1001]: 044AF1120847: from=<derkork@xxxxxxx.com>, size=1829, nrcpt=2 (queue active)     Jan 19 10:03:31 nx01 postfix/pipe[24617]: 044AF1120847: to=<user1@example.com>, relay=zarafa, delay=0.26, delays=0.11/0/0/0.15, dsn=2.0.0, status=sent (delivered via zarafa service)     Jan 19 10:03:31 nx01 postfix/pipe[24617]: 044AF1120847: to=<user2@example.com>, relay=zarafa, delay=0.26, delays=0.11/0/0/0.15, dsn=2.0.0, status=sent (delivered via zarafa service)     Jan 19 10:03:31 nx01 postfix/qmgr[1001]: 044AF1120847: removed      Problem is: only user2@example.com actually finds the mail in his mailbox, but user1@example.com does not, even though the log file clearly shows that two mails have been handed over to Zarafa. I think postfix is working correctly here, but I am not sure whether or not Zarafa is. In my master.cf I have configured a pipe to the zarafa dagent:               zarafa unix -   n       n       -       10      pipe flags= user=vmail argv=/usr/bin/zarafa-dagent ${user}      Question is: Is there some way to debug the communication between postfix and Zarafa done over the pipe? If possible, show stdout, stdin and any error messages and exit status of the zarafa dagent? Oh and clinging to a straw: has anyone had such an issue with Zarafa before and solved it? If not, any debugging aids would be welcome as well :)


title: datetime stamp when running history command in zsh shell

text: When I run the history command on my ubuntu server, I get output as follows:                  history        ...        25  cd ~        26  ls -a        27  vim /etc/gitconfig        28  vim ~/.gitconfig      I want to view the datetime of a particular user. However when I assume them:               su otheruser     export HISTTIMEFORMAT='%F %T  '     history     ...     25  cd ~     26  ls -a     27  vim /etc/gitconfig     28  vim ~/.gitconfig      It still doesn't show datetime. I am using zsh shell.


title: sandboxing approaches

text: do you know where to find another comparison between sandboxing approaches like this one? Also, I'd like you guys to explain to me why isn't SELinux or Seccomp included in that table.


title: How to unlock/unfreeze the desktop on Linux Mint 16 kde

text: I have just installed Linux Mint 16 kde and started to populate my desktop with my favorite programs. I find that the icons are frozen in place on the desktop. What I want to do is have the icons line up along the left side of the desktop, just like Mint 15 or any version of Windows. Can anyone help?


title: Ways of logging to Linux machine

text: How many ways to log to a Linux machine there are?   1. Direct login, using connected keyboard :)   2. Remote login via ssh (-Y) to console or GUI is there any other means - defaultly allowed, or enabled in some distributions, or just commonly known - except those two ? Surely, one can replace getty with some program allowing other means of access but this is not the case. Since we were told to create IT account with root privileges, i'd like to know how should I know what changes were made to system, what should i log or check? I've read about rootsh, but one with root can simply escape that shell. Data from _last_ command can be cleaned. Other than that what could i do, except from informing myself via mail, that a remote login took place, and know what changed?


title: How to select 30 files and do a bunch of sed commands on them

text: I want new copies of the files, so I want to do something like:               dir *.rb     foreach file       make a copy of the file, e.g. 'blob.rb' to 'blob_processed.rb'       do the 50 sed commands to process the blob_processed.rb file     end      How can I do this without creating 30 files that do these steps (the copy and then all the seds). The seds are a little long but they work and they will be exactly the same for each file. One example:               sed -i "s#require "selenium-webdriver"#require 'my_helper' #" blob_processed.rb


title: How to export a function in bash over ssh?

text: I would like to write a function in bash, then export that function and execute it over ssh. Is that possible, and if yes, how? I tried               #!/bin/bash          function myfunc() {         echo $1     }             export -f myfunc      but this doesn't seem to work.


title: Interface and alias up at the same time

text: I have on my `eth0` NIC card the following IP alias (I'm running CentOS 6.2): `eth0` - IP: 192.168.50.1 `eth0:5` - IP: 10.0.0.1 Now, when I boot the server, both interfaces come up and respond, but if I try to run: `ifup eth0` or `ifup eth0:5`, it no longer permits me to keep them both up. Only the interface declared in the command will be up. The other will be disconnected. Can anybody explain me why that happens, and how to bring up both interfaces when I need to reset one of them?


title: Remove numbers from filenames

text: I've a problem modifying the files' names in my `Music/` directory. I have a list of names like these:               $ ls     01 American Idiot.mp3     01 Articolo 31 - Domani Smetto.mp3     01 Bohemian rapsody.mp3     01 Eye of the Tiger.mp3     04 Halo.mp3     04 Indietro.mp3     04 You Can't Hurry Love.mp3     05 Beautiful girls.mp3     16 Apologize.mp3     16 Christmas Is All Around.mp3     Adam's song.mp3     A far l'amore comincia tu.mp3     All By My Self.MP3     Always.mp3     Angel.mp3      And similar and I would like to cut all the numbers in front of the filenames (not the 3 in the extension). I've tried first to `grep` only the files with the number with `find -exec` or `xargs` but even at this first step I had no success. After being able to `grep` I'd like doing the actual name change. This is what I tried by now:               ls > try-expression     grep -E '^[0-9]+' try-expression      and with the above I got the right result. Then I tried the next step:               ls | xargs -0 grep -E '^[0-9]+'     ls | xargs -d '\n' grep -E '^[0-9]+'     find . -name '[0-9]+' -exec grep -E '^[0-9]+' {} \;     ls | parallel bash -c "grep -E '^[0-9]+'" - {}      And similar but I got error like 'File name too long' or no output at all. I guess the problem is the way I'm using `xargs` or `find` as expressions in separate commands work well. Thank you for your help


title: Is the system time correct when no date has been set?

text: If I was looking through a debian log file and I come across Jan 1st 1970 08:21:34 in a log, did the action happen at 08:21:34, just the correct date had not been set? Or if no date had been set is the time wrong too? Is there any way to verify? My eventual aim is to establish how long my installation took but the first records in my log have the year 1970...


title: Reclaiming space from one filesystem to give it to another without LVM

text: I want to add one file system space to another file system.               /dev/cciss/c0d0p2    152358920 143606116    888588 100% /db2     /dev/cciss/c0d0p15   203899764  50767420 142607764  27% /db2/ade/sapdata1      From `/db2/ade/sapdata1` to `/db2` in this case. Our server is also not installed in LVM format. How can I some of the free space to `/db2`?


title: How to disable system beep for non-privileged user

text: How to disable system beep on Linux? I don't have superuser powers so I cannot recompile kernel/unload module.


title: apt-get install - where does it go?

text: Just a basic question on this utility... I did `sudo apt-get install libhtmlparser-java` And I would like to see the source I just downloaded. On Linux (Ubuntu) where ought I look for this?


title: System Management Mode in embedded systems

text: I wish to install Xenomai which works on Linux providing a kind of hard real time environment. x86/64 architectures are supposed to contain the _"System Management Mode"_ which prevents them from being used for hard real time systems. By _"System Management Mode"_ I mean this: http://en.wikipedia.org/wiki/System_Management_Mode Do embedded boards like ARM also have this "System Management Mode"?   Answers with references will be appreciated.


title: When will the support end for SLES 9.4?

text: I just can't find any description when will the support end for SLES 9.4? **QUESTION** : can someone point me to an URL/anything that says that SLES 9.4 support will end on XXXX.XX.XX?


title: How do I remove persistent config data from APT?

text: When I remove packages from my system with APT-based programs, they often leave behind some kind of residue (referred to as "residual config") that seems to serve no purpose other than annoying me. Cleaning these is normally quite trivial: just purge them in Synaptic or run `aptitude purge '?config- files'`. Some packages are more persistent. Purging them with Synaptic returns the message "ignoring request to remove [package] which is not installed" and Aptitude does likewise, also using the words "not installed". I want a way to remove these unusually persistent packages. Specific examples of this behavior: a previous Ubuntu setup did this with `fglrx` and `fglrx-updates`, depending on with one I had installed. My current Mint 14 install is doing it with `libav-tools`, which I replaced with `ffmpeg` from the official Launchpad PPA. I think that I have had this problem with other packages too, but I don't remember specifically. I don't know what they have in common, unless they share a bug in the package design and their maintainers just need to use lintian. Bonus points for a solution that uses Synaptic.


title: pvcreate error on partition

text: I can't create this partition, I'm getting this error shown below: > Device /dev/mapper/vg_paperino-lv_rootp1 not found (or ignored by filtering) Below are the steps that I'm doing on CentOS:               [root@pippo ~]# fdisk /dev/mapper/vg_paperino-lv_root          WARNING: DOS-compatible mode is deprecated. It's strongly recommended to              switch off the mode (command 'c') and change display units to              sectors (command 'u').          Command (m for help): p          Disk /dev/mapper/vg_paperino-lv_root: 18.8 GB, 18832424960 bytes     255 heads, 63 sectors/track, 2289 cylinders     Units = cylinders of 16065 * 512 = 8225280 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0xdb344dbe                                    Device Boot      Start         End      Blocks   Id  System     /dev/mapper/vg_paperino-lv_rootp1               1           3       24066   83  Linux     Command (m for help): q     [root@pippo ~]# pvcreate /dev/mapper/vg_paperino-lv_rootp1     Device /dev/mapper/vg_paperino-lv_rootp1 not found (or ignored by filtering).


title: How to increase the size of rootfs?

text: So I got this error today and decided to investigate:               /etc/init.d/mysql: ERROR: The partition with /var/lib/mysql is too full! ... failed!      I'm not sure how... but I've filled up my rootfs               root@crunchbang:/var/lib/mysql# df -h     Filesystem                                              Size  Used Avail Use% Mounted on     rootfs                                                  9.2G  8.9G     0 100% /     udev                                                     10M     0   10M   0% /dev     tmpfs                                                   397M  648K  396M   1% /run     /dev/disk/by-uuid/84406341-a86f-444a-a89c-0b3f37a6e0a3  9.2G  8.9G     0 100% /     tmpfs                                                   5.0M     0  5.0M   0% /run/lock     tmpfs                                                   2.4G  2.3M  2.4G   1% /run/shm     /dev/sda6                                               277G   19G  244G   8% /home     tmpfs                                                   2.4G  324K  2.4G   1% /tmp      Most of the space seems to be taken up by /var/log               root@crunchbang:/var/lib/mysql# du -hx --max-depth=1 /     0   /run     3.6G    /usr     7.4M    /bin     1.7G    /opt     12M /sbin     4.0K    /mnt     0   /sys     4.0K    /selinux     3.3G    /var     146M    /lib     4.0K    /.pulse     16K /lost+found     8.8M    /etc     0   /proc     4.0K    /srv     12K /media     57M /root     4.0K    /lib64     4.0K    /home     18M /boot     0   /dev     0   /tmp     8.7G    /      Here is my /var/log               root@crunchbang:/var/log# ls -al     total 3108     drwxr-xr-x 17 root        root      4096 Jun  2 12:59 .     drwxr-xr-x 12 root        root      4096 Mar 22 17:42 ..     -rw-r--r--  1 root        root       935 Jun  2 19:14 alternatives.log     -rw-r--r--  1 root        root       310 May 30 22:20 alternatives.log.1     -rw-r--r--  1 root        root       982 Apr 16 01:54 alternatives.log.2.gz     -rw-r--r--  1 root        root      4847 Mar 24 16:28 alternatives.log.3.gz     drwxr-x---  2 root        adm       4096 Jun  2 07:35 apache2     drwxr-xr-x  2 root        root      4096 Jun  1 07:35 apt     -rw-r--r--  1 root        root         0 Apr  1 07:35 aptitude     -rw-r--r--  1 root        root       389 Mar 29 08:02 aptitude.1.gz     -rw-r-----  1 root        adm      15367 Jun  2 19:21 auth.log     -rw-r-----  1 root        adm     120508 Jun  2 07:30 auth.log.1     -rw-r-----  1 root        adm       5329 May 26 07:30 auth.log.2.gz     -rw-r-----  1 root        adm       6070 May 19 07:30 auth.log.3.gz     -rw-r-----  1 root        adm       7739 May 12 07:30 auth.log.4.gz     -rw-r--r--  1 root        root     41044 Jan 19 10:35 bootstrap.log     -rw-rw----  1 root        utmp         0 Jun  1 07:35 btmp     -rw-rw----  1 root        utmp         0 May  1 07:35 btmp.1     drwxr-xr-x  2 root        root      4096 Jun  1 07:35 ConsoleKit     -rw-r-----  1 root        adm      77597 Jun  2 19:26 daemon.log     -rw-r-----  1 root        adm     181164 Jun  2 03:51 daemon.log.1     -rw-r-----  1 root        adm       6464 May 26 00:46 daemon.log.2.gz     -rw-r-----  1 root        adm       4139 May 19 03:21 daemon.log.3.gz     -rw-r-----  1 root        adm      20493 May 12 06:46 daemon.log.4.gz     drwxr-xr-x  2 root        root      4096 Mar 22 17:42 dbconfig-common     -rw-r-----  1 root        adm      56560 Jun  2 12:59 debug     -rw-r-----  1 root        adm     119093 May 31 15:17 debug.1     -rw-r-----  1 root        adm       5038 May 25 13:46 debug.2.gz     -rw-r-----  1 root        adm        482 May 15 07:43 debug.3.gz     -rw-r-----  1 root        adm      14620 May 11 19:26 debug.4.gz     -rw-r-----  1 root        adm      53357 Jun  2 12:59 dmesg     -rw-r-----  1 root        adm      53776 Jun  2 12:55 dmesg.0     -rw-r-----  1 root        adm      14006 May 31 15:16 dmesg.1.gz     -rw-r-----  1 root        adm      13999 May 31 15:15 dmesg.2.gz     -rw-r-----  1 root        adm      14236 May 31 15:14 dmesg.3.gz     -rw-r-----  1 root        adm      14384 May 30 22:06 dmesg.4.gz     -rw-r--r--  1 root        root    110430 Jun  2 19:22 dpkg.log     -rw-r--r--  1 root        root     64780 May 30 22:21 dpkg.log.1     -rw-r--r--  1 root        root      5205 Apr 23 15:51 dpkg.log.2.gz     -rw-r--r--  1 root        root     90165 Mar 29 08:03 dpkg.log.3.gz     drwxr-s---  2 Debian-exim adm       4096 Jun  2 07:35 exim4     -rw-r--r--  1 root        root     32064 May 27 21:48 faillog     -rw-r--r--  1 root        root      2726 May 30 22:20 fontconfig.log     drwxr-xr-x  2 root        root      4096 Mar 20 22:31 fsck     drwxr-xr-x  3 root        root      4096 Mar 20 22:34 installer     -rw-r-----  1 root        adm     175398 Jun  2 19:14 kern.log     -rw-r-----  1 root        adm     356143 Jun  1 22:08 kern.log.1     -rw-r-----  1 root        adm      17875 May 25 13:46 kern.log.2.gz     -rw-r-----  1 root        adm       2101 May 18 21:48 kern.log.3.gz     -rw-r-----  1 root        adm      51111 May 11 19:26 kern.log.4.gz     -rw-rw-r--  1 root        utmp    292584 May 27 21:48 lastlog     -rw-r-----  1 root        adm          0 Mar 20 22:36 lpr.log     -rw-r-----  1 root        adm        285 Jun  2 07:35 mail.err     -rw-r-----  1 root        adm        283 Jun  1 07:35 mail.err.1     -rw-r-----  1 root        adm        179 May 31 07:35 mail.err.2.gz     -rw-r-----  1 root        adm        285 Jun  2 07:35 mail.info     -rw-r-----  1 root        adm        283 Jun  1 07:35 mail.info.1     -rw-r-----  1 root        adm        179 May 31 07:35 mail.info.2.gz     -rw-r-----  1 root        adm        285 Jun  2 07:35 mail.log     -rw-r-----  1 root        adm        283 Jun  1 07:35 mail.log.1     -rw-r-----  1 root        adm        179 May 31 07:35 mail.log.2.gz     -rw-r-----  1 root        adm        285 Jun  2 07:35 mail.warn     -rw-r-----  1 root        adm        283 Jun  1 07:35 mail.warn.1     -rw-r-----  1 root        adm        179 May 31 07:35 mail.warn.2.gz     -rw-r-----  1 root        adm     120680 Jun  2 19:14 messages     -rw-r-----  1 root        adm     238251 Jun  2 07:35 messages.1     -rw-r-----  1 root        adm      13398 May 26 07:35 messages.2.gz     -rw-r-----  1 root        adm       1947 May 19 07:35 messages.3.gz     -rw-r-----  1 root        adm      37332 May 12 07:35 messages.4.gz     drwxr-xr-x  2 mongodb     mongodb   4096 Apr  4 15:38 mongodb     drwxr-s---  2 mysql       adm       4096 Mar 22 17:43 mysql     -rw-r-----  1 mysql       adm          0 Jun  2 19:22 mysql.err     -rw-r-----  1 mysql       adm          0 Jun  2 19:22 mysql.log     -rw-r-----  1 mysql       adm         20 Jun  1 07:35 mysql.log.1.gz     -rw-r-----  1 mysql       adm         20 May 31 07:35 mysql.log.2.gz     -rw-r-----  1 mysql       adm         20 May 30 07:35 mysql.log.3.gz     -rw-r-----  1 mysql       adm         20 May 29 07:35 mysql.log.4.gz     -rw-r-----  1 mysql       adm         20 May 28 07:35 mysql.log.5.gz     -rw-r-----  1 mysql       adm         20 May 27 07:35 mysql.log.6.gz     -rw-r-----  1 mysql       adm         20 May 26 07:35 mysql.log.7.gz     drwxr-xr-x  2 root        root      4096 Mar 20 22:36 news     drwxr-xr-x  2 ntp         ntp       4096 May 12  2012 ntpstats     -rw-r--r--  1 root        root      1865 Jun  2 12:59 pm-powersave.log     -rw-r--r--  1 root        root     11190 May 31 15:17 pm-powersave.log.1     -rw-r--r--  1 root        root       571 Apr 30 20:33 pm-powersave.log.2.gz     -rw-r--r--  1 root        root       484 Mar 29 16:12 pm-powersave.log.3.gz     drwxr-sr-x  2 proxy       adm       4096 Jun  2 07:35 polipo     -rw-r--r--  1 root        root         0 Apr  8 12:25 pycentral.log     drwxr-x---  2 root        adm       4096 Jan  5 14:18 samba     -rw-r--r--  1 root        root       122 Jun  2 12:59 slim.log     -rw-r--r--  1 root        root       183 Jun  2 07:35 slim.log.1     -rw-r--r--  1 root        root        61 May 31 07:35 slim.log.2     -rw-r--r--  1 root        root        61 May 24 18:33 slim.log.3     -rw-r--r--  1 root        root       183 May 12 07:35 slim.log.4     -rw-r-----  1 root        adm     267596 Jun  2 19:26 syslog     -rw-r-----  1 root        adm      38816 Jun  2 07:35 syslog.1     -rw-r-----  1 root        adm      60952 Jun  1 07:35 syslog.2.gz     -rw-r-----  1 root        adm      23526 May 31 07:35 syslog.3.gz     -rw-r-----  1 root        adm       1881 May 30 07:35 syslog.4.gz     -rw-r-----  1 root        adm       1789 May 29 07:35 syslog.5.gz     -rw-r-----  1 root        adm       3166 May 28 07:35 syslog.6.gz     -rw-r-----  1 root        adm       3400 May 27 07:35 syslog.7.gz     drwxr-s---  2 debian-tor  adm       4096 May 31 07:35 tor     drwxr-xr-x  2 root        root      4096 Apr 12 19:19 unattended-upgrades     -rw-r-----  1 root        adm       4773 Jun  2 19:14 user.log     -rw-r-----  1 root        adm       7094 May 31 15:17 user.log.1     -rw-r-----  1 root        adm        107 May 24 18:29 user.log.2.gz     -rw-r-----  1 root        adm        296 May 17 07:35 user.log.3.gz     -rw-r-----  1 root        adm        451 May 11 19:26 user.log.4.gz     -rw-rw-r--  1 root        utmp     20352 Jun  2 18:59 wtmp     -rw-rw-r--  1 root        utmp    122880 May 31 23:56 wtmp.1     -rw-r--r--  1 root        root     44007 Jun  2 12:59 Xorg.0.log     -rw-r--r--  1 root        root     31638 Jun  2 12:55 Xorg.0.log.old      So essentially:   * What files can I purge from /var/log? Will it lead to any errors?   * Better yet: Is there a way to make my rootfs any bigger?


title: tee stdout to stderr?

text: I'd like to send stdout from one process to the stdin of another process, but also to the console. Sending stdout to stdout+stderr, for instance. For example, I've got `git edit` aliased to the following:               git status --short | cut -b4- | xargs gvim --remote      I'd like the list of filenames to be sent to the screen as well as to `xargs`. So, is there a `tee`-like utility that'll do this? So that I can do something like:               git status --short | \         cut -b4- | almost-but-not-quite-entirely-unlike-tee | \         xargs gvim --remote


title: Need original file of Mint 13 for recovery

text: I messed up one file and I didn't do a backup. Someone could post the original file usr/share/cinnamon/js/ui/windowAttentionHandler.js of Linux Mint 13 Maya?


title: How to highlight the whole log-line in color with multitail

text: I'm trying to use `multitail` to tail logs with color highlights. I defined a custom color scheme in multitail.conf, something like this:               colorscheme:my-color     cs_re:red:^\[E     cs_re:yellow:^\[W     cs_re:magenta:^\[D     cs_re:green,,bold:All session(s) filled for.*       What I want to achieve with each line:   1. Color **the whole log-line** Red if it starts with string '[E'   2. Color ................................ Yellow if it starts with string '[W'   3. Color ................................ Magenta if it starts with string '[D'   4. Color ................................ Green if the line contains the string 'All session(s) filled for' Unfortunately, none of the above is happening for me. For the first 3, it does color correctly the substring (e.g. '[E', '[W', etc) but not the whole log- line. In the last case, it doesn't color at all. I also want to color the whole line by matching the third character of a line, e.g. color it Blue if the third character is 'A', how should I do this reliably with `multitail`?


title: rsync error: some files/attrs were not transferred

text: I'm trying to move my emails `Maildir` from an old centos server to a new debian server. `rsync -avz /home/me/Maildir ssh root@ipaddress:/var/vmail/me/Maildir` I tried to copy an 8gb account, didn't work, try to move another about 20mb, didn't work, tried to use `-avn`, didn't work either. `sync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1039) [sender=3.0.6]`


title: emacs: in terminal selected string gets lost on ctrl-k

text: 1. I select an absolute file name with the mouse in a terminal   2. I want to open this file in a running emacs: `ctrl`+`x` `ctrl`+`f`   3. Emacs mini buffer: contains "~/...."   4. I enter ctrl-a ctrl-k to delete "~/...."   5. I want to paste with middle button   6. "~/...." gets inserted, not the file name of step one. How can I stop emacs from overwriting my text I selected with the mouse?


title: copying parallel directories Why does cp -r work this way?

text: The following works correctly (ie does what I want)                cd /var/www/release/      mkdir wiki      cp -rp ../html/wiki ./      However if I do (what seems more intuitive)                cp -r ../html/wiki ./wiki      it will create /var/www/release/wiki/wiki (what I never want) This behaviour is the same with mv. I am hoping that someone will explain the logic behind this behaviour so I get it right first time in future


title: Looking for lines which is in one file but not in other using Unix and Awk

text: I have 2 files with 7 fields and I want to print the lines which are present in file1 but not in file2 based on field1 and field2. Logic: I want to print all the lines, where there is a particular column1 and column2. And we do not find the set of column1 and column2 in file2. Example: "sc2/10 10" this set you would not see in file 2, therefore it is printed as output. File1:               sc2/80         20      .        A       T         86       F=5;U=4     sc2/60         55      .        G       T         76       F=5;U=4     sc2/10         10      .        G       C         50       F=5;U=4     sc2/68         20      .        T       C         71       F=5;U=4     sc2/24         24      .        T       G         31       F=5;U=4     sc2/11         30      .        A       T         60       F=5;U=4      File2:               sc2/80         20      .        A       T         30       F=5;U=4      sc2/60         55      .        T       T         77       F=5;U=4      sc2/68         20      .        C       C         01       F=5;U=4     sc2/24         29      .        T       G         31       F=5;U=4     sc2/24         19      .        G       G         11       F=5;U=4     sc2/88         89      .        T       G         51       F=5;U=4      Expected Output:               sc2/10         10      .        G       C         50       F=5;U=4      sc2/11         30      .        A       T         60       F=5;U=4       I would appreciate your help.


title: How do remove identical lines in one file from another, using sed?

text: I have two files, one being a superset of the other. I want to remove the identical lines in the smaller files from the larger file. One possible complication is that the lines contain backslashes. How do I do this?


title: Two IP addresses assigned to the same machine?

text: I seem to be using two IP addresses on my PC. I use DHCP to get an IP address and then I statically set an IP address and activate it. ifconfig says that I am using the address given by DHCP but I am also able to connect to a device on the network of the statically set IP. What is going on here? DHCP address: 172.16.1.99 Statically set address: 10.1.49.200 OS: Fedora 8


title: How to create a custom debian liveCD (customize which packages are preinstalled)?

text: How would I do this? I have tried simple-cdd, but it did not work:               $ build-simple-cdd      FINISHED --2013-08-28 17:57:11--     Total wall clock time: 51s     Downloaded: 54 files, 5.5M in 9.9s (568 KB/s)     Warning: No VerifyRelease line in 'default' or any rule it includes via 'From:'.     Release.gpg cannot be checked unless you tell which key to check with.     (To avoid this warning and not check signatures add 'VerifyRelease: blindtrust').     Warning: No VerifyRelease line in 'default-base' or any rule it includes via 'From:'.     Release.gpg cannot be checked unless you tell which key to check with.     (To avoid this warning and not check signatures add 'VerifyRelease: blindtrust').     Warning: No VerifyRelease line in 'default-udebs' or any rule it includes via 'From:'.     Release.gpg cannot be checked unless you tell which key to check with.     (To avoid this warning and not check signatures add 'VerifyRelease: blindtrust').     Warning: No VerifyRelease line in 'default-security' or any rule it includes via 'From:'.     Release.gpg cannot be checked unless you tell which key to check with.     (To avoid this warning and not check signatures add 'VerifyRelease: blindtrust').     aptmethod error receiving 'http://security.debian.org/dists/precise/updates/Release':     '404  Not Found [IP: 195.20.242.89 80]'     aptmethod error receiving 'ftp://ftp.us.debian.org/debian/dists/precise/Release':     'Unable to fetch file, server said â€˜Failed to open file.  â€™ [IP: 64.50.236.52 21]'     aptmethod error receiving 'ftp://ftp.us.debian.org/debian/dists/precise/Release':     'Unable to fetch file, server said â€˜Failed to open file.  â€™ [IP: 64.50.236.52 21]'     aptmethod error receiving 'ftp://ftp.us.debian.org/debian/dists/precise/Release':     'Unable to fetch file, server said â€˜Failed to open file.  â€™ [IP: 64.50.236.52 21]'     There have been errors!     gzip: /home/samuel/Documents/custom-debian/tmp//mirror/lists/precise_default_deb_main_amd64.gz: No such file or directory     awk: cmd. line:1: fatal: cannot open file `/home/samuel/Documents/custom-debian/tmp//mirror/dists/precise/main/binary-amd64/Packages' for reading (No such file or directory)     Warning: No VerifyRelease line in 'default' or any rule it includes via 'From:'.     Release.gpg cannot be checked unless you tell which key to check with.     (To avoid this warning and not check signatures add 'VerifyRelease: blindtrust').     Warning: No VerifyRelease line in 'default-base' or any rule it includes via 'From:'.     Release.gpg cannot be checked unless you tell which key to check with.     (To avoid this warning and not check signatures add 'VerifyRelease: blindtrust').     Warning: No VerifyRelease line in 'default-udebs' or any rule it includes via 'From:'.     Release.gpg cannot be checked unless you tell which key to check with.     (To avoid this warning and not check signatures add 'VerifyRelease: blindtrust').     Warning: No VerifyRelease line in 'default-security' or any rule it includes via 'From:'.     Release.gpg cannot be checked unless you tell which key to check with.     (To avoid this warning and not check signatures add 'VerifyRelease: blindtrust').     Error opening '/home/samuel/Documents/custom-debian/tmp//mirror/lists/default-security_precise%2Fupdates_Release': No such file or directory     There have been errors!     awk: cmd. line:1: fatal: cannot open file `/home/samuel/Documents/custom-debian/tmp//mirror/dists/precise/main/binary-amd64/Packages' for reading (No such file or directory)     cat: /home/samuel/Documents/custom-debian/tmp//mirror/dists/precise/main/binary-amd64/Packages: No such file or directory     Merging...                                                          0      Fatal error: exception Failure("Warning: package ignored because it has no name")


title: grep: display filename once, then display context with line numbers

text: Our source code has error codes scattered throughout. Finding them is easy with grep, but I'd like a bash function `find_code` that I can execute (eg. `find_code ####`) which will provide output along these lines:               /home/user/path/to/source.c          85     imagine this is code     86     this is more code     87     {     88         nicely indented     89         errorCode = 1111     90         that's the line that matched!     91         ok this block is ending     92     }     93 }      Here is what I have currently:               find_code()     {         # "= " included to avoid matching unrelated number series         # SRCDIR is environment variable, parent dir of all of projects         FILENAME= grep -r "= ${1}" ${SRCDIR}         echo ${FILENAME}         grep -A5 -B5 -r "= ${1}" ${SRCDIR} | sed -e 's/.*\.c\[-:]//g'     }      Problems: 1) This doesn't provide line numbers 2) it only matches .c source files. I'm having trouble getting sed to match .c, .cs, .cpp, and other source files. We do use C, though, so simply matching - or : (the characters that grep appends to the filename before each line of code) matches `object->pointers` and messes everything up.


title: Why can't list file/directory relative to .. from a symbolic link directory (No such file or directory)?

text: I have a `/usr/tomcat6/logs` directory linked to `/var/log/tomcat6`. When I changed directory to `/usr/tomcat6/logs` and try to `ls` files using a relative pathname `../conf/Catalina/localhost`, a **No such file or directory** error occurs. However, `cd ../conf/Catalina/localhost` works. See the following:               [root@fedora ~]# ll /usr/tomcat*     lrwxrwxrwx. 1 root root 21 Jun 17 15:00 /usr/tomcat6 -> apache-tomcat-6.0.32/     lrwxrwxrwx. 1 root root 21 Jun 17 13:03 /usr/tomcat7 -> apache-tomcat-7.0.16/     [root@fedora ~]# cd /usr/tomcat6     [root@fedora tomcat6]# ll logs     lrwxrwxrwx. 1 root root 16 Jun 17 14:51 logs -> /var/log/tomcat6     [root@fedora tomcat6]# cd logs     [root@fedora logs]# cd ../conf/Catalina/localhost     [root@fedora localhost]# pwd     /usr/tomcat6/conf/Catalina/localhost     [root@fedora localhost]# cd /usr/tomcat6/logs     [root@fedora logs]# ll ../conf/Catalina/localhost     ls: cannot access ../conf/Catalina/localhost: No such file or directory      How could this happened? Is it a bug or special behaviour of symbolic link?


title: User sharing in Unix

text: How does Unix or Linux stop other users from accessing or modifying each others files? I know permissions are a part of it. Is there a specific concept in use?


title: Can't do chown/chgrp/chmod on shared dir in VirtualBox Ubuntu 10.04

text: I installed Guest Additions on my Ubuntu 10.04 VM running out of `VirtualBox` in order to enable directory sharing, following these instructions. Set the shared folder in the VirtualBox GUI and it mounted it on the VM, where it appeared fine. However, when I tried going into the shared directory on the VM (located in `/media`), I could not `cd` into it nor change ownership or permissions, the commands returning without an error but not actually having done their job:               mysuser@ubnt-xdev:/media$ ls -la     total 12     drwxr-xr-x  4 root root   4096 2013-08-28 11:34 .     drwxr-xr-x 22 root root   4096 2013-08-28 10:48 ..     drwxr-xr-x  2 root root   4096 2013-08-28 11:29 cdrom     drwxrwx---  1 root vboxsf   68 2013-08-28 11:19 sf_vmshare     mysuser@ubnt-xdev:/media$ cd sf_v*     -bash: cd: sf_vmshare: Permission denied     mysuser@ubnt-xdev:/media$ sudo chown mysuser sf_vmshare     [sudo] password for mysuser:      mysuser@ubnt-xdev:/media$ ls -la sf_vmshare     drwxrwx---  1 root vboxsf   68 2013-08-28 11:19 sf_vmshare     mysuser@ubnt-xdev:/media$ sudo chgrp mysuser sf_vmshare     mysuser@ubnt-xdev:/media$ ls -la sf_vmshare     drwxrwx---  1 root vboxsf   68 2013-08-28 11:19 sf_vmshare     mysuser@ubnt-xdev:/media$ sudo chmod 777 sf_vmshare     mysuser@ubnt-xdev:/media$ ls -la sf_vmshare     drwxrwx---  1 root vboxsf   68 2013-08-28 11:19 sf_vmshare      Which makes the shared directory unusable. The directory works fine on the host. Anybody know what is going on?


title: Custom PAM modules and security considerations

text: I am writing my own PAM module that will be part of an application that I am developing, but I'm not sure exactly where to put it. My module basically does network-level authentication (with other mojo of course) similar to LDAP. There are a lot of config files in my `/etc/pam.d/` directory, and I know what most of the services do (except a couple, like atd, polkit, ppp). I assume that authentication with PAM stack goes something like this:   1. Runs stack based on service name (if a config file exists)   2. If not authenticated, fall back on common-*, where * is the module-type (auth, account, etc)   3. Return success or fail to calling application (and any other data of course) **Am I correct in this assumption?** **Do all platforms have common-auth, common-account, common-password, and common-session?** If so, I was thinking about just putting it at the top of common-* as a `sufficient` module so that on failure the regular PAM stack would be left unaffected. This is particularly advantageous because I can programmatically do this on software install. Am I missing any potential security vulnerabilities? I couldn't find very good documentation on where to integrate custom PAM modules or security issues surrounding where to put modules.


title: First steps: installing a compatible Bluetooth card to my laptop?

text: I'm looking to install a Bluetooth card to my laptop, as it currently doesn't have Bluetooth support and I'd like to get away from having to use an external USB dongle. I own a Gateway NV51 series laptop, but I don't know really where to even start with this. If it were a desktop, I'd know at least which direction to head in, but since it's a notebook, I'm lost. Is this even possible? I think that at the very least, I can upgrade my wireless card, perhaps I need to just open up my notebook and take a look. Does anyone have any recommendations for a card that will be very compatible with a recent kernel as well as one that will be compatible to be put into a notebook? I don't have a side-port on the notebook, so it'll have to be internal if I'm going to install it.


title: What causes cron to continuously send mail and how can I disable it?

text: I have a problem on CentOS 6.3 system where the crond process tries to unsuccessfully send mail over and over (at least I think this is what its doing) until the OS eventually generates a "too many files open" error. This computer is not connected to a network. ### Symptoms After running overnight, the system produces a "too may files open" error when a user tries to log in.   If I examine the process list after it has been running for a few hours, I see this trio of processes listed several times (the number or repetitions continue growing as time goes on):               CROND     /usr/sbin/sendmail -FCronDaemon -i -odi -oem -i -t ...     /usr/sbin/postdrop -r      ### Attempted fixes   * I disabled the postfix process, which seems to be related to the mail sending features    * I modified `/etc/crontab` and `/etc/anacrontab`, and changed the line:              MAILTO=root      to              MAILTO=""      Neither of these attempted fixes have resolved the problem. It appears that it's actually the `postdrop` process that is hanging. If I kill it, the other two processes also die. Barring some more elegant solution, my next plan of attack is to replace `postdrop` with a bash script that does nothing and exits to prevent these processes from accumulating. Any advice is appreciated!


title: errors trying to transfer via SCP

text: I'm trying to transfer a file between two servers and i'm getting different errors. **Option 1: Logged at OLDSERVER via SSH** > scp file.tar.gz root@IPADDRESS:/var/www/. The error in this case is > /usr/bin/ssh: no such file or directory **Option 2: Logged at new server via SSH** > scp OLDUSER@OLDURL:/var/htdocs/file.tar.gz /var/www/ The error in this case is > ssh: connect to host OLDURL port 22: Connection refused Do you know what could be the problem?


title: Automount USB sticks on Gentoo

text: I have a bare-bone Genoo installed with two user and a guest account enabled. I want to auto-mount the usb sticks whenever they are plugged in for all accounts with user read-write permission. What is the best way to do it? I am superuser on this system and can install or modify system files. I am looking for a easy solution i.e. I should be able to do it without modifying many files.


title: How can I start an application at start up as a different user?

text: I am trying to start an application in Linux at start up with a different user (like alpha). I want it to run it in the background and it has to be started with with parameters. One is a file system and other is an application so first file system should start then the application should start with parameters. I tried to use crontab @ reboot but is it possible to use init.d?


title: View song's title on terminal

text: How to view currently playing song's title on terminal using `vlc` media player?


title: Open a terminal with a login prompt

text: I want to open a terminal (xterm, gnome-terminal, tilda, whatever) and have it prompt for a username and password to login as. I thought this would be simple but all my Google results are polluted with stuff about making bash a login shell, which means something completely different as running `bash --login` produces does not ask for a username and password. Surely there is a way to do this? **EDIT:** The environment is an embedded device. I want to have a way for technicians to be able to open a terminal overtop of the WebUI/browser, login and fix stuff. **ANSWER:** `xterm -e login` OR (more dangerously) something along the lines of:               #!/bin/bash     while :; do       read -p "User: " USER       su - $USER -c "bash";     done;


title: How to log to file and to console

text: I know that I can log to file by adding               > log.txt       to the end of a command but how can I log to file AND to console?


title: How to disable tmpfs on /media in openSUSE?

text: In OS 11.4 `/media` is a regular directory. Whatever I put there, it stays. In OS 12.1 `/media` is tmpfs. Whatever I put there, on next restart is gone. **The question is** -- how to get rid of tmpfs on `/media`, and "convert" it to regular directory as before. _I checked_ `/etc/fstab` _-- there is no entry for_ `/media` _._


title: How to handle live audio input, process, and redirect to audio output

text: I'm wondering how I can get audio input from a jack, process it sample by sample, then send the processed sample to an audio output jack. My plan is to run this on a raspberry pi with a USB soundcard to make a guitar pedal. If there are any libraries available that can do this (and leave me the freedom of controlling what's in the middle) that would be great. Preferably in python but C/C++ wouldn't be so bad either. Where do I get started? **EDIT:** When I say "process" I want to manipulate the sample values as they come in, then send that same value (or a buffer of them) to the "out" jack. Basically, in pseudo-code:               double sample = input_jack.read();     sample *= 2;  //apply a gain of 2     output_jack.write(sample);


title: Issue with permissions with a USB flash drive

text: I am running xubuntu 13.04. When I insert a flash drive in my account, I can't save things to the flash drive or remove them from the flash drive. I am able to read from the flash drive. How can I give myself permissions (using sudo) to perform these operations for all flash drives?


title: Allow users administrative access to some of the KVM VM's

text: I am running a KVM virtualization server on CentOS 6. How can I allow certain users administrative access (reboot, reinstall, erase) to only _some_ virtual machines, but not other? I am using buth command-line interface and `virt-manager`, and I'd like the access restrictions work for both, but I suppose it won't require additional configuration anyway? If it will, Id be ok with letting restricted users use just `virt-manager`.


title: Linking the `mail` and `sendmail` commands to Dovecot and Postfix

text: I have recently set up my mail server with Debian 7.2 (Wheezy), Dovecot, and Postfix, as described in this guide. This is all working fine, and I have installed and configured Roundcube and Postfixadmin and got everything working nicely together. What I would like to do now is link my normal user account to the `mail` and `sendmail` programs so that:   * `mail` reads the messages from the inbox for the e-mail account myuser@mydomain.com.   * `sendmail` sends messages from myuser@mydomain.com **and** it copies the sent e-mail into the "Sent Messages" folder of the mailbox of the user myuser@mydomain.com. Is there an easy way to accomplish this?


title: How to compile Chromium OS

text: I know that there is this guide, but every time I tried to compile Chromium OS I never finished. I need some clear instructions to compile Chromium OS project and install it on my machine. There is an abandoned project on GitHub, here: https://github.com/dz0ny/lightdm-login-chromeos


title: How can I know if patch command is working?

text: I am trying to apply a patch that is provided by the seek-for-android project to code I downloaded from Cyanogenmod. The code compiled successfully with make, so I know all the files are there. I just can not get any visibility into what patch is doing or if it is even working. I tried the -verbose option. I don't know how long it takes for patch to traverse the directory and look for the files to update. I don't see much of an activity in my cpu. Here are the instructions I am following: enter link description here Here is a screen capture of what I see:                  root@ubuntu:~/android/system# ls         abi       cm-11-2      docs             Makefile   sdk         android   cm-11-3      external         ndk        smartcard-api-3_1_0         art       cts          frameworks       out        smartcard-api-3_1_0.tgz         bionic    dalvik       hardware         packages   system         bootable  developers   kernel           pdk        tools         build     development  libcore          prebuilt   vendor         cm-11     device       libnativehelper  prebuilts         root@ubuntu:~/android/system# cd smartcard-api-3_1_0         root@ubuntu:~/android/system/smartcard-api-3_1_0# cd ..         root@ubuntu:~/android/system# patch -p1 smartcard-api-3_1_0/smartcard-api.patch   ^C          root@ubuntu:~/android/system# patch -p1 -R smartcard-api-3_1_0/smartcard- api.patch          ^C         root@ubuntu:~/android/system# patch -p1 -verbose smartcard-   api-3_1_0/smartcard-           api.patch          patch 2.6.1         Copyright (C) 1988 Larry Wall         Copyright (C) 2003, 2009 Free Software Foundation, Inc.      I think in some cases, I should look for the target file? The output below seems to say that one patch was successful, while the other file was not found? I guess I have to find the target file and specify it? For some reason even a full path is not recognized.               root@ubuntu:~/android/system# patch -p1 < smartcard-api-3_1_0/uicc.patch      patching file frameworks/base/telephony/java/com/android/internal/telephony  /ITelephony.aidl     Hunk #1 FAILED at 304.     1 out of 1 hunk FAILED -- saving rejects to file frameworks/base/telephony /java/com/android/internal/telephony/ITelephony.aidl.rej     patching file frameworks/base/telephony/java/com/android/internal/telephony  /RILConstants.java     Hunk #1 FAILED at 55.     Hunk #2 FAILED at 262.     2 out of 2 hunks FAILED -- saving rejects to file frameworks/base/telephony/java/com/android/internal/telephony/RILConstants.java.rej     patching file frameworks/opt/telephony/src/java/com/android/internal/telephony /CommandException.java     Hunk #1 FAILED at 42.     Hunk #2 FAILED at 83.     2 out of 2 hunks FAILED -- saving rejects to file frameworks/opt/telephony  /src/java/com/android/internal/telephony/CommandException.java.rej     patching file frameworks/opt/telephony/src/java/com/android/internal/telephony /CommandsInterface.java     Hunk #1 succeeded at 1250 (offset 109 lines).     patching file frameworks/opt/telephony/src/java/com/android/internal/telephony /IccCard.java     Hunk #1 FAILED at 214.     1 out of 1 hunk FAILED -- saving rejects to file frameworks/opt/telephony  /src/java/com/android/internal/telephony/IccCard.java.rej     patching file frameworks/opt/telephony/src/java/com/android/internal/telephony  /RIL.java     Hunk #1 succeeded at 2592 (offset 253 lines).     Hunk #2 succeeded at 4109 (offset 467 lines).     Hunk #3 succeeded at 4619 (offset 543 lines).     patching file frameworks/opt/telephony/src/java/com/android/internal/telephony/sip/SipCommandInterface.java     Hunk #1 FAILED at 536.     1 out of 1 hunk FAILED -- saving rejects to file frameworks/opt/telephony/src/java/com/android/internal/telephony/sip/SipCommandInterface.java.rej     patching file frameworks/opt/telephony/src/java/com/android/internal/telephony  /test/SimulatedCommands.java     Hunk #1 FAILED at 1655.     1 out of 1 hunk FAILED -- saving rejects to file frameworks/opt/telephony /src/java/com/android/internal/telephony/test/SimulatedCommands.java.rej     patching file frameworks/opt/telephony/src/java/com/android/internal/telephony/uicc/IccCardProxy.java     Hunk #1 succeeded at 844 (offset 102 lines).     patching file frameworks/opt/telephony/src/java/com/android/internal/telephony/uicc/UiccCardApplication.java     Hunk #1 FAILED at 44.     Hunk #2 succeeded at 437 (offset 100 lines).     Hunk #3 succeeded at 941 (offset 194 lines).     1 out of 3 hunks FAILED -- saving rejects to file frameworks/opt/telephony  /src/java/com/android/internal/telephony/uicc/UiccCardApplication.java.rej     patching file frameworks/opt/telephony/tests/telephonytests/src/com/android    /internal/telephony/gsm/UsimDataDownloadCommands.java     Hunk #1 succeeded at 651 with fuzz 2 (offset 21 lines).     can't find file to patch at input line 404     Perhaps you used the wrong -p or --strip option?     The text leading up to this was:     --------------------------      diff --git a/packages/apps/Phone/src/com/android/phone  /PhoneInterfaceManager.java b/packages/apps/Phone/src/com/android/phone    /PhoneInterfaceManager.java     |index 6600ae5..2ae6739 100644     |--- a/packages/apps/Phone/src/com/android/phone/PhoneInterfaceManager.java     |+++ b/packages/apps/Phone/src/com/android/phone/PhoneInterfaceManager.java     --------------------------     File to patch:


title: Lots of processes killed by SIGTRAP

text: Since yesterday, my Linux ( **Fedora 20** ) randomly kills processes for no reason at all (at least from my point of view), and the bugs reports say that all these processes are **"killed by SIGTRAP"**. It happens with evolution, gls, the weather app, Google Chrome, and so on ... Also, when trying to run a Scala Play Framework application, I get the error:               java.lang.OutOfMemoryError: unable to create new native thread      I stuck with this, it makes my Linux partition totally unusable! Does anyone have an idea about what causes this?


title: When I move a file to a different directory on the same partition, does the file's data actually move on disk?

text: I could see it going both ways. If the filesystem stores it's directory structure and list of files in each directory, and then points to the disk location of each of the files, it shouldn't require the file's data to actually be moved on disk in order to 'move' a file. On the other hand, I could see the 'move' being implemented by copying the file, checking the copy, and then deleting the original if the copy checks out. Does the answer depend on the type of filesystem?


title: Dual booting with Windows 7 and Fedora 20

text: I am creating a dual boot system for Windows 7 & Fedora 20. While installing to hard drive I get this error **Installation destination** `Error checking storage configuration`. I have shrunk my hard drive partition to have 30 GB of space. But the installer only shows 1.99 MB available. Now 1.99 MB is the amount of space on my Pen Drive, but the drive the installer picks is my hard drive listed as 479 GB. How do I proceed with my installation of Fedora 20? **using Parted -l** **output::**               Model: ATA WDC WD5000AAKX-0 (scsi)     Disk /dev/sda: 500GB     Sector size (logical/physical): 512B/512B     Partition Table: msdos     Disk Flags:           Number  Start   End    Size    Type      File system  Flags      1      1049kB  106MB  105MB   primary   ntfs         boot      2      106MB   210GB  210GB   primary   ntfs      3      210GB   294GB  84.2GB  primary   ntfs      4      294GB   500GB  206GB   extended               lba      5      294GB   500GB  206GB   logical   ntfs               Model: Kingston DataTraveler G2 (scsi)     Disk /dev/sdb: 4011MB     Sector size (logical/physical): 512B/512B     Partition Table: msdos     Disk Flags:           Number  Start   End     Size    Type     File system  Flags      1      4129kB  4011MB  4007MB  primary  fat32        boot               Model: Linux device-mapper (snapshot) (dm)     Disk /dev/mapper/live-osimg-min: 4295MB     Sector size (logical/physical): 512B/512B     Partition Table: loop     Disk Flags:           Number  Start  End     Size    File system  Flags      1      0.00B  4295MB  4295MB  ext4               Model: Linux device-mapper (linear) (dm)     Disk /dev/mapper/live-base: 4295MB     Sector size (logical/physical): 512B/512B     Partition Table: loop     Disk Flags:           Number  Start  End     Size    File system  Flags      1      0.00B  4295MB  4295MB  ext4               Model: Linux device-mapper (snapshot) (dm)     Disk /dev/mapper/live-rw: 4295MB     Sector size (logical/physical): 512B/512B     Partition Table: loop     Disk Flags:           Number  Start  End     Size    File system  Flags      1      0.00B  4295MB  4295MB  ext4      still problem is persist here are screen shots DOC link


title: Pimp rsyslogd to have less i/o (cron, pam,...) and less logging

text: On my raspberry I really don't need crons and pam logging and I want to have less i/o to make the SD card life a little longer.. I have already removed cron with the second line `cron.none`, I'm currently testing the `authpriv.none`               auth,authpriv.*                 /var/log/auth.log     *.*;auth,authpriv.none,cron.none             -/var/log/syslog     #cron.*                         /var/log/cron.log     daemon.*                        -/var/log/daemon.log     kern.*                          -/var/log/kern.log     lpr.*                           -/var/log/lpr.log     mail.*                          -/var/log/mail.log     user.*                          -/var/log/user.log      Basically, all I want to log is fatals, hardware stuff, kernel/dmesg, and failed logins What else can I improve?


title: tsocks doesn't redirect connection

text: After installing tsocks using slackbuilds I made /etc/tsocks.conf by the parameters for using tor.               server = 127.0.0.1     server_port = 9050     server_type = 5      Then I tried `tsocks firefox` to check it. But When I checked my IP (by whatismyipaddress.com and google) it was the same as I didn't use tor/tsocks. another strength is that when I run `tsocks on` and then `tsocks show` I get the output: `LD_PRELOAD=""`, Which I think seems not set the libtsocks.so library to `LD_RELOAD`! Is this incorrect? > I need tsocks for redirecting the connection of other applications than > firefox like wget and mininube. How can I get tsocks to redirect connection through tor?


title: problem with airmon-ng start waln0

text: I'm new in Kali Linux, I have a USB wireless adapter, Realtek RTL8187 wireless802.11b my command               airmon-ng      it shows the waln0, but when I type the command `airmon-ng start waln0`. It doesn't show that the network in mon mode Why is this?


title: How to assign shell command to key?

text: I want to assign my script to special key on my keyboard. xmodmap recognize this key as XF86AudioMute, but I want to execute my script when it pressed. How to do it? My window manager is Window Maker, but I am looking for a solution independent of wm.


title: gmrun stopped searching user added path

text: gmrun started ignoring the PATH variable I defined in `~/.bashrc` for no obvious reason. Anyone has any idea how I can find out a way to solve this annoying problem? ## EDIT I have not found the solution, but I ended up switch to bashrun2, which does what I need it to do.


title: Disk copying with two OS on it

text: I want to change HDD in my laptop to bigger one. I have installed WIN XP and Mageia Linux and GRUB ver 1 as bootloader. So I want to use such procedure for copying and changing disk:   * plug new one disk to USB enclose   * boot laptop from LIVE version of Linux Mageia (from DVD)   * connect new HDD to USB port   * run such command              dd if=/dev/sda of=/dev/sdb        * After copying, plug new one HDD to laptop, replacing older one.   * Boot to check the proper work   * boot again from LIVE DVD to use GParted for resizing partitions Is it correct way I want to preceded?


title: linux command stuck

text: I have strange problem on my Linux machine When I do the following simple command                chmod +x  /tmp/file      chmod is stuck and not returned the prompt what could be the problem?   * the same issue when I run other commands as **cp** or **ls –ltr**


title: Blender not starting Lubuntu 13.04 PowerPC

text: I have installed Blender via `apt-get` on a PowerPC G4 Mac Mini running Lubuntu 13.04, and now it will not start over **VNC**. Output from running `blender` in the terminal:               Color management: using fallback mode for management     Xlib:  extension "XInputExtension" missing on display "lubuntu:1".     connect failed: No such file or directory     /build/buildd/blender-2.66a/intern/ghost/intern/GHOST_WindowX11.cpp:192: X11 glXQueryVersion() failed, verify working openGL system!     initial window could not find the GLX extension, exit!      I know GLX is part of OpenGL, but I have no knowledge of how to install it.


title: MySQL 5.1.73 - community edition : Where is MySQL configuration file?

text: I have installed **MySQL 5.1.73-community edition** in my **Oracle LINUX 5** server. I am able to start / stop and execute MySQL commands. But, I am unable to locate the MySQL installation directory as well as my.cnf file where I can change the configuration as per my requirements.


title: convert bulk of text files to pdf with naming based upon header file

text:
Knowing that "How to convert from text to .pdf" is already well answered here link and here link, I am looking for something more specific: Using Claws-Mail [website] and a Plug-In [RSSyl] to read RSS feeds I collected a lot of text files. These I want to convert into .pdf files. **Problem** : The files inside the folders are numbered [1, 2, …, 456]. Every feed has it's own folder, but inside I have 'just' numbered files. Every file contains a header [followed by the message's content]:               Date: Tue,  5 Feb 2013 19:59:53 GMT     From: N/A     Subject: Civilized Discourse Construction Kit     X-RSSyl-URL: http://www.codinghorror.com/blog/2013/02/civilized-discourse-construction-kit.html     Message-ID: <http://www.codinghorror.com/blog/2013/02/civilized-discourse-construction-kit.html>     Content-Type: text/html; charset=UTF-8          <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">     <base href="http://www.codinghorror.com/blog/2013/02/civilized-discourse-construction-kit.html">
URL: http://www.codinghorror.com/blog/2013/02/civilized-discourse-construction-kit.html

           **Question** : A way to convert each file into a `.pdf` file and rename it, based upon the name given under _Subject_. Super-awsome would be converting and re-naming this way: `"folder.name"_"date"_"file name"` with each information taken from the header data. As this are a few hundred files, I am looking for a batch processing way. EDIT: The files are `html` formated, but without a `.htm[l]` suffix.


title: Problem running Google Chrome in Kali Linux

text: I want to run google-chrome in Kali Linux. But I am facing some problem.(otherwise why would I be asking a question :D ) I have installed google chrome by following the steps mentioned here. It is successfully installed with chrome being displayed on               Application -> Internet -> Google Chrome      To run google chrome I followed Part 3 of the same series. There are three different ways listed on how we can run chrome. One option is it says to edit the file using leafpad `leafpad /opt/google/chrome/google-chrome` find the lines `exec -a "$0" "$HERE/chrome" "$@"` and append it with **-user-data- dir**. But the same file is a bit different in my computer, it looks something like this.               exec -a "$0" "$HERE/chrome" "$PROFILE_DIRECTORY_FLAG" \     "$@"      But even though I tried to add **-user-data-dir** to the end which now looks like               exec -a "$0" "$HERE/chrome" "$PROFILE_DIRECTORY_FLAG" \     "$@"-user-data-dir.      But it is not working anyway. Then i tried another option. It says that first we have to create a user using   `useradd -m chromeuser` and then type `gksu -u chromeuser google-chrome` to run chrome. However I am getting the following error after running the last command. It says               /usr/bin/google-chrome: /usr/lib/i386-linux-gnu/libnss3.so: version `NSS_3.14.3' not found (required by /usr/bin/google-chrome)      How can I install chrome successfully?


title: CentOS 7 gnome Version Network issue

text: I just installed Cent-OS 7 with GUI Interface, but now I am logging in but I can not connect to network, in virtual machine I see it's connect with bridge (VMware) but I cannot connect to network, I don't know what should i do? I try to install some packages but I have no connection to internet? ![enter image description here](http://i.stack.imgur.com/BAvcE.jpg) In the above image you see + button, when I click on it the below menu coming I tried some but they did not work maybe I can't configure it will. ![enter image description here](http://i.stack.imgur.com/PLfXp.jpg)


title: Print output of some my data in a file that should start with first line without blank space

text: By using some shell command i filter some output Please can some one suggest how i can print this output in some file For example I filtered some line and save it to some file but problem is it is starting with 2 nd line in first line it is showing blank line in second line it is showing my output can any one suggest how i can print my data in first line of file means how we can delet that space               cat file1 | awk '{if ($2==$3) { print }}' | awk '{print $5, $6, $7, $8}' > file      Thanks Yisha


title: How to kill all processes for a given user that take longer then X time

text: When I list processes with `ps auxf` I often see some that are stuck and I need to manually kill them. How can I do it with one command? Example ps result:               $ ps auxf     USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME     COMMAND     tommass   7971 62.3  1.1 316428 45844 ?        R    Aug08 29133:14  xxxxxxxx     tommass   7978  0.0  2.6 455072 105964 ?       S    Aug08   8:56    xxxxxxxx     tommass   7979  0.0  2.6 454436 105360 ?       S    Aug08   8:57    xxxxxxxx     tommass  15034 67.8  1.1  51828 43760 ?        R    Aug14 26411:38  xxxxxxxx     tommass   7982  0.0  2.6 455012 105904 ?       S    Aug08   8:28    xxxxxxxx        1. How can I kill all processes for a given user "tommass" that take longer then 1 hour   2. How can I kill all processes for a given user "tommass" whose STAT is "R"


title: Change the size of my memory pages?

text: I would like to change my kernel's page size from 4KB to 4MB as I have had a large addition of RAM to my computer and I am never running out of anymore. The idea is that programs requiring large amounts of memory will spend less time on allocating pages. I suppose it would improve performance, and I would like to try. I can’t find anywhere when running `make menuconfig`. Is there a way to do that?


title: Is a monolithic kernel more secure than a microkernel?

text: I don't know much about what microkernels can do so bear with me if I'm being ignorant: In one instance, there are monolithic kernels which allow the user control over services before reaching hardware but this could compromise the kernel itself. On the other hand microkernels do the same thing and software does not reach the kernel but, since it speaks directly to the hardware through the servers, is this making it potentially unstable and insecure?


title: How to determine if and which linux security module (LSM) is available?

text: Is there a way to find out if and in case which linux security LSM (apparmor, selinux, grsecurity) is used by the kernel? To be more specific let's assume I am a legimate root user of the machine? If information available also it would be nice to furthermore know: With regard to the question, is there a difference with considering the machine being (a) a local computer, (b) a dedicated server and (c) a virtual server "vServer" ## update I know that I could for instance install the user-space stuff (on a debian for instance `apt-get install apparmor`) and check if it yields results related to the specific LSM. So I could do for apparmor `sudo apparmor_status` which would then for instance yield: `apparmor module is not loaded.` which helps me rule out that option. Yet I was looking for a more general approach covering most/all LSM. ## update2 I have discovered the path `/sys/kernel/security`. Maybe this is helpful finding an answer?


title: Advanced logrotate on huge number of files when single instance of logrotate cannot keep up

text: I'm managing a server which works as a remote log repository for huge number of files. Currently a single `logrotate` instance cannot keep up with this number of logs. What's the best way to accelerate log rotation, possibly running many instances in parallel? Below is the addendum for the clarification:   * Disk I/O is not the problem; also, I'm not losing any logs or entries.   * System is a beast when compared to this job (it's a quad core Xeon with sufficient power) the bottleneck is at compression. One core tops up w/ 1.00 load and cannot finish its compression queue.   * Logfiles are not copied. Only a daily backup is taken to another disk, but again is not a bottleneck.   * I can group the logfiles by patterns. Files are not huge, only they are a lot. I just don't know how to parallelize the logrotate altough I have ideas but unable to find any resources for it. Actually, the core of the question is _does logrotate spawn a child process for every stub in the config file or configuration file?_   * I'm a computer engineer and an experienced Linux user and developer. I also manage a cluster but somehow I'm new at "old school system management" issues. So you can go as technical / hardcore as you can get. I'll do my best to understand it.


title: Easy voice talk between 2 computers in 2 countries?

text: My plan is to enable 2 sets of unsophisticated users (children and their grandparents) in 2 different countries to talk easily. In practice I see it as:   1. A quiet linux computer is on all the time in both places.    2. The user at one computer should be able to switch to an already running application and call the other party in the other country.   3. The computer in the other country should ring.   4. The person in the other country hearing the ring, should be able to answer the call. Again - nothing more complicated than pressing a button in an application.   5. Video option is a bonus but not a must. I unfortunately have little experience with voip. But I could do a fair job setting up firewalls as it might be necessary in such scenario. I am also used to various linux distros. The question really is what applications could fit my purpose and if I must run a server (voip?) in one of the countries. As for users - less choice is better, if I could I would use this just for communication between these 2 "computer stations". Maybe even with telephone headsets :) Many thanks for your suggestions.


title: How does Google manage its service package installation and upgrade?

text: The RPM, yum or apt tools are very popular in the Linux world, but I don't know whether Google uses these tools in their internet service management work, and use these tools to manage the service version, service rollback.


title: What happens to UIDs upon mount of file system

text: I have a very basic question and still failed to find the answer after ~10 google requests and skimming through my unix textbook, so: Consider a system with 2 hard drives, having root file system at `/dev/sda1` and /home partition at `/dev/sdb1`. Now, a process with UID=1000:GID=1000 wants to mount `/dev/sdb1` file system at `/mnt/backup`. I can imagine 2 scenarios of how it happens: ![enter image description here](http://i.stack.imgur.com/D8peg.png) I wonder, under what UIDs and GIDs he freshly mounted file system is visible: **1.** The UIDs and GIDs might be preserved, as on the picture. ![enter image description here](http://i.stack.imgur.com/Lhcml.png) **2.** The UIDs and GIDs on the mounted file system might be set to the mounting process's UID and GID=1000. If there were no UIDs and GIDs in the file system at all, this case takes place: ![enter image description here](http://i.stack.imgur.com/7WgQL.png) My questions are:   1. In what situations cases 1 and 2 take place? What parameters of `mount` _system call_ determine, which of them takes place?   2. In case 2, how do I determine the actual UIDs and GIDs of the files. In my example both `/mnt/backup/john` and `/mnt/backup/jane` in the mounted filesystem are set to UID=1000, but in fact their UIDs were 1002 and 1003. How do I know them?   3. In case 1 what happens if the Jane's UID=1003 doesn't exist on the system?


title: Why are reboot, shutdown and poweroff symlinks to systemctl?

text: In Arch Linux, if I do `ls -l` in `/sbin`, I can see that `reboot`, `shutdown` and `poweroff` are all symlinks to `/usr/bin/systemctl`. But issuing `reboot`, `shutdown` and `systemctl` commands obviously does not all have the same behaviour. Is `ls -l` not showing me full information regarding symlinks? How can I, for example, know what the real symlink of `reboot` is?


title: How to know which firmware is loaded by kernel?

text: I have an Intel wireless card driven by `iwlwifi`, and I can see the following message in dmesg:               iwlwifi 0000:03:00.0: loaded firmware version 17.168.5.3 build 42301      But how do I know which firmware is loaded?


title: What is the most compatible tiny X server?

text: I've been building LFS/BLFS for about a month now, with multiple failures and almost no successes, and I've just been informed that there exist Xorg-like window systems that are incredibly tiny, as Xorg's LFS build is over _200MB of just source packages_. I Googled around the web, but the Wikipedia article on TinyX pointed me to a nonexistent home page for a nice Xorg clone. I'm looking to build a DSL-like distro (truthfully, it's a faster clone of ChromeOS), and I've got everything ready, except an X server. What I was looking for was the following:   * Something that's reasonably small, as I was hoping to get my distro down to 50MB when it is compressed.   * Something that is fairly compatible with the normal X server (I don't know what I'm talking about, but I was hoping for something that works with any X application).   * Something that will work fully (no hiccups!) with OpenBox or FluxBox (preferably OpenBox, as I've almost made my theme for it).   * Something that works with Plymouth, as an epic boot screen make a bad operating system look good in the eyes of simple users. Also, as a side question, how do I package my final build? I've built a small rendering system which I wish to distribute, but I can't figure out how to make an ISO out of it, like Ubuntu or DSL.


title: yum require an older version of a package as dependency

text: I have installed TexLive 2012 via the official site and want to install epydoc which depends on an older version. However, when I try to install epydoc which depends on texlive, I get the below error. How can I fix this?               ; sudo yum install epydoc          Loaded plugins: fastestmirror, langpacks, presto, refresh-packagekit, remove-     Loaded plugins: fastestmirror, langpacks, presto, refresh-packagekit, remove-                   : with-leaves     Loading mirror speeds from cached hostfile      * fedora: ftp.tudelft.nl      * livna: rpm.livna.org      * rpmfusion-free: ftp.upjs.sk      * rpmfusion-free-updates: ftp.upjs.sk      * rpmfusion-nonfree: ftp.upjs.sk      * rpmfusion-nonfree-updates: ftp.upjs.sk      * updates: ftp.tudelft.nl     Resolving Dependencies     --> Running transaction check     ---> Package epydoc.noarch 0:3.0.1-9.fc15 will be installed     --> Processing Dependency: texlive-latex for package: epydoc-3.0.1-9.fc15.noarch     Package texlive-latex-2007-66.fc16.x86_64 is obsoleted by 1:tex-latex-svn23639-1     .noarch which is already installed     --> Processing Dependency: texlive-dvips for package: epydoc-3.0.1-9.fc15.noarch     Package texlive-dvips-2007-66.fc16.x86_64 is obsoleted by 1:tex-dvips-svn26765-1     .noarch which is already installed     --> Finished Dependency Resolution     Error: Package: epydoc-3.0.1-9.fc15.noarch (fedora)                Requires: texlive-dvips                Available: texlive-dvips-2007-65.fc16.x86_64 (fedora)                    texlive-dvips = 2007-65.fc16                Available: texlive-dvips-2007-66.fc16.x86_64 (updates)                    texlive-dvips = 2007-66.fc16     Error: Package: epydoc-3.0.1-9.fc15.noarch (fedora)                Requires: texlive-latex                Available: texlive-latex-2007-65.fc16.x86_64 (fedora)                    texlive-latex = 2007-65.fc16                Available: texlive-latex-2007-66.fc16.x86_64 (updates)                    texlive-latex = 2007-66.fc16      You could try using --skip-broken to work around the problem      You could try running: rpm -Va --nofiles --nodigest


title: Unexpected ordering of strings in `sort` command

text: I'm trying to sort a text file using certain columns in the file as a sort key. Since the file doesn't have separators and fields sometimes stick to each other, I have to convert spaces to some distinctive character (like '@') and then extract columns from the whole string as from the field #1. I've stumbled upon a problem that `sort` orders strings in some manner unknown to me. Example:               $ cat aaa.txt      @1     @2      1      2     1      2       Now replace spaces by '@':               $ sed y/\ /@/ aaa.txt     @1     @2     @1     @2     1@     2@      Now try to sort them:               $sed y/\ /@/ aaa.txt | sort     @1     @1     1@     @2     @2     2@      And the result is embarassing. Lexically, '@' must be before or after the '1'. If '@'>'1' then why strings '@1' are before '1@'? If '@'<'1' then why strings '@2' are after '1@'?