macchanger: Too many open files in system

I'm having a problem with `macchanger`. Whenever I try to run the command `macchanger -r eth1`, I get the following error:               ERROR: Can't change MAC: interface up or not permission: Too many open files in system      I'm running this command as root, and the `ulimit` is set to **unlimited**. What can I do to avoid this error?


How do you format a USB stick after it is being labled "unrecognised" by Ubuntu?

I have a memory stick which I had cleaned of old data fragments. The memory stick was mounted on /dev/sdc1 so I did:               dd if=/dev/zero of=/dev/sdc1 bs=1M      After the task was complete, my usb memory stick became unrecognized. What do you do in this case to make the drive recognized again and partition it as FAT?


Bash prompt when my home directory is a symbolic link

I symlinked my `/host/Users/Kevin` folder to `/home/Kevin`. I also edit the `/etc/passwd` file to `/home/Kevin`. I logged out and logged back in, however when I open up a terminal it's a bash prompt like so:               kevin@ubuntu:/host/Users/Kevin$      But when I `cd` or `echo $HOME` it changes to:               kevin@ubuntu:~$      or when I `echo $HOME` it prints `/home/Kevin`. How can I make it open up in this format by default?


How do I access files on an external hard drive?

edited 02-25: I thank @Anthon for his replies. I still do not, however, understand the meaning or the how of "pinging" ("Once you update your Q, ping the commenters..."). I also do not understand the meaning of "If you don't know what he means ask him in a comment under his" (?). I do hope he and the others excuse the fact that I've not contacted them directly about this updated question. As well, thank you @Jenny D for your (patient and clear) instructions and information. I've printed them out and will use. @ganessh: It is a NTFS drive @Zelda - I pulled the drive because the computer in which it was installed had a failing (well, failed) motherboard, and I needed to get to the data. I had no problems with the drive when it was still in the (alive) computer. @Babin Ionston-I downloaded the ntfs3g pkg (and vague instructions) but am having a difficult time with the installation. I will however, keep trying, and if unsuccessful, will write down the challenges and bring the question here. It would be _enormously_ beneficial for new members to receive a "write this/not that" message to make it very clear what information is needed by members to respond to a question (and I don't remember receiving such when I signed up, but perhaps I did). Although I'm quite honored with the patience shown by most of the folks who have responded to my question, I think doing so would save everyone time. All: I will try out these suggestions (and instructions) and report back. Thank you. ============= I have a lot of files on an external hard drive that I wish to access on my (now) Linux-based computer. The computer is now running Mint 16 (Cinnamon). The drive is a SATA drive I pulled from my Windows computer. That computer ran Windows 7. The problems I experience are:   1. The drive appears on my desktop, and all of the folders on it (I believe) do display in the folder list. I can access some folders quickly (and see the contents) but not others (including the folder with the files I need--mostly Word/Excel files). These files are in a folder that was formerly in the Users folder on my Windows computer.    2. My computer freezes when I click on this file (and this is the largest folder--approx 12 GB) I see a spinning disk and (I think) the word "processing"above it. Then the computer locks up: the cursor freezes, or doesn't freeze, but I can't close the window. I receive a message (I think it says "accessing") and a spinning disk, but the files do not open, and the computer freezes. I then have to reboot.    3. I also tried copying the files to the computer, but was not able to do so (the freezing began).  My question: What do I need to access these files? Also (and once again), what information should I provide you all to make answering my question(s) easier? Please note that I am new to Linux, so do not assume that I understand terms (like ping) or abbreviations that may be familiar to you.


Transfer all messages of thunderbird with windows 7 to thunderbird ubuntu 14.04?

How can I transfer all messages and contacts of thunderbird with windows 7 to thunderbird ubuntu 14.04? I know that have a free app called mozbackup. But it don't works with linux. There a way that can I make this moving? Thanks!


Making a real universal bootable Arch pen drive

I've followed this article, and been able to get a fully working 32-bit installation on a _Kingston DataTraveler_ 8GB pen drive, with a BIOS boot partition, and a home/root `ext4` file system without journaling partition, and no swap. I'm using GPT partitions. The problem is that pen in which I installed Arch only works on my computer. That is, if I insert it in other computer (the ones I tested had Windows with BIOS, not UEFI), I cannot change the boot order, because the pen does not appear as a bootable device. **How can I get it to run on any computer, the same way the usual Arch Linux installation pen does?** That is the whole point, to have a pen that is ensured to boot on any computer to which I have physical access, rendering its usual data protection measures, i.e. login passwords, useless! _(evil laugh)_ I see the normal installation pen has an EFI instead of a BIOS Boot partition. I don't mind reinstalling the system, but I'd surely prefer if I could copy the latest installation media ISO and tweak the necessary options (auto login, hostname, clearing of changes on reboot, etc.). **Can I do that? How exactly?** Is this supported? What exactly, besides what is referred in the article, and the EFI boot partition, do I need to watch out for? Must I use `fdisk` or is `gdisk` OK? What bootloader should I choose? I'd prefer GRUB, simply because I'm used to it, but I heard Syslinux is better (and easier) for this purpose.


Debian 7 - Kernel Panic after libc6 update

I installed and configured Debian 7.2 Wheezy AMD64 few days ago, I spent days configuring everything out and installing useful apps etc, so finally I tried to install Wine.   And what happened?   Dependency problem - libc6 is version 2.13 but it should be 2.17 to satisfy Wine. Unfortunately, there is no stable version available so I used sid to install libc6 2.17. It got installed, but, after finishing installation, all commands stopped working. I was unable to call any command, it just reports that command is NOT found. I thought that reboot may fix the problem, so I done hard-reboot and after GRUB menu it stucks:               switch_root can't execute '/sbin/init' no such file or directory     Kernel Panic - not syncing      And my Debian is now is in unusable state. I have Dual Boot with Windows 7 64-bit. I also have Debian 7.2 Wheezy AMD64 live on USB flash so I can use it for repair. I do not have enough experience with Debian based distros to solve this. Can someone give me step-by-step guide?


How do I edit /etc/rc.local?

Im using Raspbian and trying to edit `/etc/rc.local`. When I run `sudo nano etc/rc.local` or just `sudo nano rc.local` it creates a new file. And anything I try to edit in leafpad won't save.


CentOS: Avoid that ALT-F4 switches to console

At least every Linux system that I worked with used the convention to switch to the non-graphical consoles by `Ctrl`-`Alt`-`F1`, `Ctrl`-`Alt`-`F2` and so on. Recently, I installed CentOS 6.3 on a machine. The installation is non- customized and uses Gnome 2. To my surprise `Alt`-`F4` switches to console. `Alt`-`F1` then brings you back to the XServer. How can I change the keybinding to `Ctrl`-`Alt` instead of simply `Alt`? It also seems to bypass Gnome's key bindings. In Gnome, I tried to define `Alt`-`F4` as close window, but it does not work but still switches to the console.


Combining awk statements

I'd like to combine those awk statements:               awk -F'\t' 'NF>1 && $NF!=""' #prints every row with more than two fields      awk '$1 ~ /^[0-9]/'        #prints every row starting with a number      awk -F'\t' 'NF==1'           #prints every row with one only field     awk '$1 ~ /^[A-Z]/'        #prints every row starting with a capital letter       in order to get a statement printing every row that begins with a capital letter AND contains one only field, and every row with more than two fields, each of them starting with an integer. Sample input:               NAME_1     1        11  11     key 11     KEY KEY      Expected output:               NAME_1     11  11


Print PDF scaled-down and aligned

I want to print a PDF file with all pages scaled down equally (to, say, 70 %). The scaled-down pages should then be left-aligned on the printing paper. This doesn't seem to be possible with `lpr` alone. With `pdfjam` I can scale the pages (`\--scale 0.7`) but I don't know/see any option to align the scaled pages. A negative offset (like `\--offset '-3cm 0cm'`) doesn't work.


What is a datastore especially when considering *nix systems as hosts?

Is it the `.vmx` files that are created on installing VMWare, does it differs across Windows and Linux platforms as hosts? How can we create or browse datastores when the host is Linux or Windows?


Running an xterm remotely with ssh -Y, defies the coloring I setup in .Xresources

The `xterm` seems to not read the colors I set in my ~/.Xresources file when I connect to a Linux PC remotely. Basically, if I'm sitting in front of my PC and I run an `xterm` from Xsession, the colors will obey whatever is in my ~/.Xresources file - no problem there. Here is my ~/.Xresources file:               XTerm*background: black     Xterm*XtDefaultBackground: black     Xterm*XtDefaultForeground: white     XTerm*foreground: white      But if I log on to that same computer remotely and run an `xterm` (which will appear locally though), the colors are again the default (black fonts on white background). It seems irrational that `xterm` does not read .Xresources file in this case! What am I missing?


Setting up smartmontools

I recently built a small server running lubuntu and decided it would be wise to setup smartmontools in order to monitor the drive health. SMART seems to be built into lubuntu in gnome-disks, however, it was not configurable to any degree other than on or off. I proceeded to install hdparm and smartmontools and configured both according to this http://zackreed.me/articles/60-spin- down-idle-hard-disks. My disk, however, still does not enter standby mode. I checked gnome-disks once more and saw that SMART was running itself once every 10 minutes due to turning smartctl on in terminal. Does anybody know of any way to fix this so that the disk can enter standby mode?


How to run cinnamon properly?

I am running cinnamon fallback, the output of `inxi -SGx` is               System:    Host: elie-Hp Kernel: 3.2.0-23-generic x86_64 (64 bit, gcc: 4.6.3) Desktop: Gnome Distro: Linux Mint 13 Maya     Graphics:  Card-1: Intel 2nd Generation Core Processor Family Integrated Graphics Controller bus-ID: 00:02.0                 Card-2: Advanced Micro Devices [AMD] nee ATI Seymour [Radeon HD 6400M Series] bus-ID: 01:00.0                 X.Org: 1.11.3 drivers: vesa,intel (unloaded: fbdev) Resolution: 1368x768@0.0hz                 GLX Renderer: N/A GLX Version: N/A Direct Rendering: N/A      Is there a chance that i can run cinnamon properly and not in fallbak mode?


Recovering truncated file

I'm in a peculiar situation. While editing a Perl program I accidentally truncated the file to zero length (using an Emacs lisp code I was developing). I need to recover that program... How do I that ? I tried debugfs utility but that was of no help cuz the program wasn't deleted but truncated to zero length & then saved by the lisp code without a prompt.


Triple compression and I only save 1% in space?

I've been trying to save space on my linux server, and I had a folder containting, in subfolders, 22GB of images. So I decided to compress them. First I used tar:               tar -zcf folder.tar folder       Then gzip               gzip folder      And finally, for good measure, just in case, bzip2               bzip2 folder      And after all that, the total of all the `folder.tar.gz.bzip2`s, came to still 22GB! With, using finer precision, a 1% space saving! Have I done something wrong here? I would expect many times more than a 1% saving! How else can I compress the files?


Why do the nfs4 tutorials recommend to bind mount sub directories

All NFS4 tutorials I have encountered so far recommend bind mounting real directories into the export root. Is this a technical necessity? If I had a directory that's only meant to be exported, is it sufficient to make it a subdirectory of the export root or does it really need to be bind mounted?


Unable to do head or tail for a file

I have a .CSV file which upon passing the `file test_file.csv` command gives the output as:               test_file.csv: ISO-8859 English text, with CR line terminators      When I am using `cat, head or tail` command on the file, it is returning me the total file content on the screen. How do I convert the line terminators so that I will be able to use these commands and use the file for further processing. Also, I was wondering if there is a way to know how this file was generated/created? Please suggest.


dumpe2fs - lifetime writes - what is it

For example, if I run:               sudo dumpe2fs /dev/sda1      I get detailed information about the partition. I'm confused about this part, `Lifetime` writes, returns the following for my boot partition:               Lifetime writes:          12 kB      What does this `12 Kb` mean? This is full output:               user@root:/data$ sudo dumpe2fs /dev/sdb1     dumpe2fs 1.42.9 (4-Feb-2014)     Filesystem volume name:   <none>     Last mounted on:          <not available>     Filesystem UUID:          5524d5a6-4635-48a6-8cd9-a636e3ad2b2c     Filesystem magic number:  0xEF53     Filesystem revision #:    1 (dynamic)     Filesystem features:      ext_attr resize_inode dir_index filetype sparse_super large_file     Filesystem flags:         signed_directory_hash      Default mount options:    user_xattr acl     Filesystem state:         clean     Errors behavior:          Continue     Filesystem OS type:       Linux     Inode count:              121680     Block count:              486144     Reserved block count:     0     Free blocks:              477783     Free inodes:              121669     First block:              0     Block size:               4096     Fragment size:            4096     Reserved GDT blocks:      118     Blocks per group:         32768     Fragments per group:      32768     Inodes per group:         8112     Inode blocks per group:   507     Filesystem created:       Thu Mar 27 03:18:09 2014     Last mount time:          Thu Mar 27 03:18:34 2014     Last write time:          Thu Mar 27 03:18:56 2014     Mount count:              1     Maximum mount count:      -1     Last checked:             Thu Mar 27 03:18:09 2014     Check interval:           0 (<none>)     Lifetime writes:          12 kB     Reserved blocks uid:      0 (user root)     Reserved blocks gid:      0 (group root)     First inode:              11     Inode size:           256     Required extra isize:     28     Desired extra isize:      28     Default directory hash:   half_md4     Directory Hash Seed:      8f43123d-1451-4047-a26c-d5227fd80240


Write-only permission for a directory doesn't allow to rename (move) files inside?

In fact, I would like to ask more general question -- "what does write permission for a directory allow you to do exactly?" -- but let's approach it with a concrete example. It is a long question, if you are in a hurry **read the bold** -- it should cover the main part. Different sources (nice question, one more, grymoire's) say something similar to the following on the directory permissions: > r, read -- reading of the directory's content (filenames inside) > > w, write -- changing the directory's attributes (e.g. modification time) and > creating/renaming/removing entries inside > > x, search -- accessing files inside, you have access to the inode of the > file, hence you can reach it's actual content My problem is with the description of `w`. What directory's attributes does it give you access to? **I cannot create/rename/remove a file inside a directory with only write permission** : I make a directory (`tdir/`) and a file inside (`afile`), `chmod -x-r tdir/`, `mv tdir/afile tdir/af`, `rm tdir/afile`, `touch tdir/newfile` -- all fail with permission denial, unless I set `x` permission to the directory as well. And `x` alone doesn't give you the permission to create/rename/remove files inside the directory. **In order to do that you need both`x` and `w`**. But `touch tdir` does change the modification time of the directory with `w` only. I would rephrase the sources above this way for the compliance with the issue: a directory's `r` allows you to see the filenames inside, but no access to the actual file (to the inode); `x` gives you access to the inodes of the files (which means you can see their permissions and, according to it, have access to the contents), but you still cannot change anything in the directory; directory is actually some sort of a file and to change something in it you need the `w` permission. Thus, when you are changing something in the directory you need `w` permission. If your change requires inodes of the files in the directory -- you need `x` as well. It explains why you cannot remove a file inside a directory with `w` only: **when removing a file you need to reduce the link count of the inode by 1 -- you need to know the inode -- thus you need`x` for the directory**. **But why do you need`x` for creating (you could ask the system to create a file without exposing the inode?) and renaming/moving the file (when you move a file you don't change it in any way, you only change the records inside the directories and their inode counts?)?** Maybe it is just an implementation thing? I.e. indeed you don't need the inode for renaming/creating files -- you need only filenames and `w` permission; but inode and filename constitute one record in the directory; thus changing the filenames = changing the records = kind of accessing the inodes. And also what attributes do directories have besides modification time, permissions and files records? What else in the directory can you change with `w` only?


Ksnapshot generates grayscale EPS screenshots only

Every time I want to take an EPS screenshot with KSnapshot it is grayscaled even though the real screenshot contains colors. This only happens when I choose the EPS format in KSnapshot, not with the other formats. I'm using ubuntu 14.04 with KDE 4.13.1. Any ideas? Charlie


Suppress "Alarm clock: 14" from ping

I've made a simple script for rebooting my router and afterwards showing a progress bar until my computer has an internet connection again. When running the script I get the following output:               The router is now rebooting...     ############################################bin/reboot_router: line 48:  4758 Alarm clock: 14         ping -Q -c 1 -t 1 google.com >&/dev/null     #bin/reboot_router: line 48:  4761 Alarm clock: 14         ping -Q -c 1 -t 1 google.com >&/dev/null     #bin/reboot_router: line 48:  4763 Alarm clock: 14         ping -Q -c 1 -t 1 google.com >&/dev/null     #####bin/reboot_router: line 48:  4773 Alarm clock: 14         ping -Q -c 1 -t 1 google.com >&/dev/null     #bin/reboot_router: line 48:  4775 Alarm clock: 14         ping -Q -c 1 -t 1 google.com >&/dev/null     ##bin/reboot_router: line 48:  4777 Alarm clock: 14         ping -Q -c 1 -t 1 google.com >&/dev/null     #      I want to suppress the `Alarm clock: 14` thing from appearing, so the output becomes:               The router is now rebooting...     #######################################################      The relevant part of the script is:               #!/bin/bash          COLUMNS=$(tput cols)          # Reboot router code here          echo 'The router is now rebooting...'          min_time=60     max_time=120     start_time=$SECONDS     time=0     progress=0          until [[ $min_time -lt $time ]] && ping -Q -c 1 -t 1 google.com &> /dev/null; do         let time=SECONDS-start_time         let new_progress=COLUMNS*time/max_time         let diff=new_progress-progress         let progress=new_progress         for((i=0; i<diff; i++)); do             echo -n '#'         done         sleep 1     done          echo


Latex auto package loading

In Windows, TexWorks loads the missing `sty` packages itself. In Linux it doesn't: how is this `sty` loading managed in Linux?


Choosing Linux Distro for PostgreSQL

I'll begin by saying I'm a newbie sys admin. I need a new PostgreSQL 9.1 machine. My go to distro is Debian (for no good reason other than it's what I first learned). However, when I started looking at documentation, it appears that Debian manages those packages from http://backports-master.debian.org/Instructions/. This is apparently a repo for unstable packages that haven't really been tested on Debian. Here's the question: Is my assessment right? Is this what the backports repo is? If this isn't stable, why would I put it on a production box? Is there another distro with a package manager that I should be looking at instead?


Kickstart file not being found in VituralBox

![enter image description here](http://i.stack.imgur.com/zRTLz.jpg)I am installing a STIG RHEL on a virtual box and therefore have a custom kick start file in the iso I am using. The iso structure looks like this for the kickstart file               ROOT     |     |----stig_fix              |              |----stig_fix.cfg      However, when I try to install using the iso image from the storage option in vituralbox, it keeps saying it can not find the kickstart file. Does anyone know what value I should make ks equal to in the main menu, to get vitural box to be able to find the kickstart file?


Alternative to watch which support colors

I have a command (`phpunit`) which has a colored output. According to the `watch`, command I should be able to use the `\--color` flag to allow color rendering to pass through. However, this isn't working. Is there any other ways of solving this?


Fedora 19 eclipse issue

I have just installed Fedora 19 from the DVD ISO and I am having this irritating problem. Whenever I start eclipse it shows me:               "Eclipse Platform" is not responding.       You may choose to wait a short while for it to continue or force        the application to quit entirely.      and I have to select wait and then it works for me. I think I noticed, when installing Fedora, that it had no option to make a selection to install Java as I had for eclipse. How can I start Eclipse without getting this message? ![enter image description here](http://i.stack.imgur.com/795GA.jpg)


LXC and deployment of web application code

l'm currently in the learning stage of using LXC. Now I'm at the point where I'm ready to deploy my application (written in PHP) to my containers. I've been using DeployHQ (deploying over ssh 2) to get my application from GitHub for this in my old setup, but I'm having issues understanding how I can get the files from my host to my lxc containers. Is it only possible for me to go from my containers and out to get the code?


Setting KDE to crop the laptop's screen to match external VGA device's ratio

I have a laptop with 16:9 screen ration. Sometimes I need to attach it to a projector via VGA. The projector ratio is 4:3. I use `System Settings`->`Hardware`->`Display and Monitor`->`Size & Orientation` to enable the VGA connection and set it's resolution. The problem is that all the resolutions for the VGA are 4:3, while the resolution for the laptop's screen is 1600x900(which is 16:9). That means that whatever resolution I pick, either the image on the projector is cut, the image on the local screen is cut, or both. Is there a way to force crop the local screen to 4:3? Ofcourse, I want the sides of the screens to be blank, not the to crop the image itself.


LVM: possible to recover full snapshot?

Accidentally, I have let a LV snapshot created by libvirt/virt-manager run to full. Is there any way I can at least recover (some) data written to the snapshot? Many thanks!               lvs       /dev/vm_storage/vm_win_01: read failed after 0 of 4096 at 268435390464: Input/output error       /dev/vm_storage/vm_win_01: read failed after 0 of 4096 at 268435447808: Input/output error       /dev/vm_storage/vm_win_01: read failed after 0 of 4096 at 0: Input/output error       /dev/vm_storage/vm_win_01: read failed after 0 of 4096 at 4096: Input/output error       LV          VG         Attr       LSize  Pool Origin                    Data%  Move Log Cpy%Sync Convert       vm_win_01   vm_storage swi-I-s--- 50.00g      [vm_win_01_vorigin]   100.00            lvdisplay     --- Logical volume ---       LV Path                /dev/vm_storage/vm_win_01       LV Name                vm_win_01       VG Name                vm_storage       LV UUID                wiONtF-6bXR-nleO-P2v7-e6mw-ezdg-tvBPbz       LV Write Access        read/write       LV Creation host, time cubist-vh001, 2014-07-22 18:38:55 +0800       LV snapshot status     INACTIVE destination for vm_win_01_vorigin       LV Status              available       # open                 0       LV Size                250.00 GiB       Current LE             64000       COW-table size         50.00 GiB       COW-table LE           12800       Snapshot chunk size    4.00 KiB       Segments               1       Allocation             inherit       Read ahead sectors     auto       - currently set to     256       Block device           254:7          dmsetup table | grep win     vm_storage-vm_win_01_vorigin: 0 524288000 snapshot-origin 254:4     vm_storage-vm_win_01: 0 524288000 snapshot 254:4 254:6 P 8     vm_storage-vm_win_01_vorigin-real: 0 524288000 zero      vm_storage-vm_win_01-cow: 0 104857600 linear 8:3 104859648


Config to re-enable gtk2 tear-off menus?

Following an apt-get update on Debian jessie/sid, several Gtk2 applications no longer have tear-off menus enabled. I'm aware that this is a deprecated capability of Gtk (and disagree strongly with the GNOME team's rational for deprecating the feature), but if this _is_ a config issue (and I've dug it up repeatedly in the past), how would I re- enable it? gconf-editor doesn't seem to affect the behavior.


alias Not able to execute source command

I am trying to define a following alias in my .aliases file.               alias sett 'cleartool setview viewXYZ_!*; cd /path_dir1/dir2/; source ./env/script-name'      I use it as `sett myview` on commnd prompt when I open a new Terminal. First 2 commands work but source ... does not. ./env is a sub-directory of dir2 Can anyone explain why?


Atheros ethernet driver

I have openSUSE 11.4 installed on my HP pavilion dm4-2015dx. The ethernet card (Attansic ethernet controler is shown in Yast's hardware info) was not recognized and after many days of googleing i found similar problem that has been solved. I tried to do what is described on ubuntu forum but it didn't work for me. Although I finally have eth0 - but connection cant be established. Next thing I tried to enable Tumbleweed repository and update to kernel 3.0 (which could have drivers). Short after updating kernel I had two eth devices, but only one was activated when plugged in LAN cable. Still couldn't connect. After rebooting there is only one eth device - but not sure which one. How can I "uninstall" drivers from ubuntu forum? Or did Kernel override them? Any other suggestion on how to solve my problem is more than welcome! Thanks


Obtaining the staus of all input/output ports connnected to system

What's the command to list the all I/O ports connected to system? Also, how do I get the status of all individual ports? For example: printer How do I determine whether a printer is ready to print or if there are any jobs are waiting? For example: monitor How do I determine whether the monitor(s) is/are active or not?


How can this init script start without its dependency?

I'm working on some lsb init scripts. Here's the init info from one of them:               ### BEGIN INIT INFO     # Provides:     myscript     # Required-Start:   networking myotherscript     # Required-Stop:    networking myotherscript     # Default-Start:    2 3 4 5     # Default-Stop:     0 1 6     # Short-Description:    Starts my daemon     ### END INIT INFO      And the init info from myotherscript               ### BEGIN INIT INFO     # Provides:     myotherscript     # Required-Start:   networking     # Required-Stop:    networking     # Default-Start:    2 3 4 5     # Default-Stop:     0 1 6     # Short-Description:    Starts my other daemon     ### END INIT INFO      If I understand correctly, running `service myscript start` should not work unless myotherscript is running. However, executing `service myscript start` does indeed work. Why don't I at least get an error about the unmet dependency?


Detecting extension files doesn't executed for a period

How can I detect the `.class` files in my workspace which haven't executed for a certain period, and remove them?


How well will the AMD Radeon HD 7950 gpu perform on Linux?

The time has come for me to upgrade my aging gpu (9800 gt). The AMD 7950 has caught my attention because of the attractive price with pleasing benchmarks. But it is common knowledge that AMD GPUs have poor support on Linux. What sort of performance can I expect, with say, the latest version of Ubuntu? Will I have issues starting X. Will I have issues with a dual monitor setup? Will basic games such as minecraft or neverball play as expected without problems? Will there be any issues with video playback or flash? I tried doing some research with how this card performs on Linux, but google lacks any usable resources. If the 7950 is completely useless when paired with a Linux system, can someone suggest a comparable nvidia gpu for the same price range with similar performance?


How to fetch logs from diffrent servers using one command? For example, suppose I want to fetch logs for same id in different servers. I have to go to each server and search for logs. Is there any way to do it one go?


Execute a command in a different path

When using Git VCS, I execute all of the git commands on the directory that contains a .git repository. I want to execute a git-pull through an SSH trigger but how do I define the path to the repository to perform the action on?


How to stop emacs server

I started a Emacs in my terminal, and then started running Emacs server inside it by `M-x server-start`. Now I would like to cancel running the Emacs server without exiting the Emacs process. There seems to be no command for that. How can i do that? Thanks.


scp does not transfer files correctly

I am using `scp` to transfer some large files (> 1 GB) from my laptop (Ubuntu 12.04) to my desktop (Ubuntu 14.04). The laptop has a wireless connection to my router and the desktop has a cable connection. Out of curiosity I decided to verify the transferred files using an md5 digest: I created the digest on the source computer, transferred it to the target computer, and used it with the `-c` option to verify the transferred files. To my surprise, more than 50% of the times I get an error:               md5sum: WARNING: 1 computed checksum did NOT match      My question: does data corruption occur so often with `scp`? I would expect that (1) data transfer errors are rather rare, and (2) `scp` checks its data and possibly resends it in case of error. What can be the cause of these errors? My hypotheses:   1. Bad WLAN connection that frequently corrupts data during transfer.   2. Bad memory: `md5sum -c` fails even thought the data is correct because the RAM is not working properly.   3. Bad hard disk: `md5sum -c` fails because the disk contains error.   4. A combination of the above reasons. Note that my hard disk and RAM are pretty new: I bought them 5 months ago.


mutt once promted password, used for both imap and smtp

my password for imap and smtp are the same and mutt version is using integrated smtp settings. if i do not want to store my password in any script nor encrypting it with pgp/openssl nor using wallet password managers. and if i want exactly:   * to be asked just once for password   * same password to be used for imap and smtp (to not be asked again inside same mutt session) what is best way to achieve this. my already figured-out solution are this .muttrc config lines:               set imap_pass=`read -s -p 'mail-password : ' mailpass ; echo $mailpass`     set smtp_pass=$imap_pass      and it is ~OK for my needs. Just because i am new to mutt, i am wondering is there some better way ... (... like using omitted imap_pass and smtp_pass, which will result in mutt's promting for imap_pass, and than convincing somehow mutt to use same for smtp).


How to use ifconfig to show active interface only

By default `ifconfig` will show me all available interfaces , but what if I just want to display `active` ones? Like, `en0` only in below.               en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500         ether 14:10:9f:e0:eb:c9          inet6 fe80::1610:9fff:fee0:ebc9%en0 prefixlen 64 scopeid 0x4          inet X.X.X.X netmask 0xffffff00 broadcast 101.6.69.255         nd6 options=1<PERFORMNUD>         media: autoselect         **status: active**     en3: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500         options=60<TSO4,TSO6>         ether 32:00:14:e7:4f:80          media: autoselect <full-duplex>         **status: inactive**      Notice `ifconfig en0` will not satisfy, `en0` is not always the active one ;) I'm running Mac OS X.


Uninstall MySQL server without removing or breaking any client functionality

I have an Ubuntu webserver which once used a local database, but we migrated it and now the database is stored remotely on a separate server accessed from many different places. The webserver runs code in PHP and in Python and connects to the remote database using PHP's built-in MySQL support and using Python MySQLdb module. I'm not longer using the local database on the webserver, and want to remove any unnecessary MySQL server stuff from the webserver because at the moment I have a mysqld process sitting there using 2.8% of my memory and 0.3% of my CPU for no good purpose. I've run               sudo apt-get remove mysql-server     sudo apt-get autoremove     sudo apt-get autoclean      but I'm still able to access the database stored on the web server by typing `mysql -u root -p` and the mysqld process is still using resources. I'm pretty timid about fiddling around to try and fix the problem because I don't know which `mysql-` packages, if any, are depended upon by PHP or MySQLd to connect to the database on the remote database server. What do I need to do to get rid of the database hosted on the webserver and get rid of the resource-munching mysqld process without breaking the webserver's ability to connect to the remote database?


Is it mandatory to have a variable in awk's first statement?

I am having some hard time with awk today. If I try to do:               df|awk '{print $2; $some=$2; print $some}'      It works as expected and I get the size of the disks twice but if I do:               df|awk '{$some=$2; print $some}'      I just get blank lines. Why is this happening? Something is maybe wrong in my understanding but why the usage of a field mandatory for subsequent fields to work? I also tried doing:               df|awk '{print "hello"; $some=$2; print $some}'      and I got some "hello", each separated by a newline. Where is $some=$2 lost? My `df` command outputs:               Filesystem     1K-blocks     Used Available Use% Mounted on     /dev/sda5       38448788 32098732   4396932  88% /     udev             1914564        4   1914560   1% /dev     tmpfs             768744      984    767760   1% /run


Install virtual machine as non-root?

Is it possible to install any virtual machine software as non-root user and run it ? Which VM's are possible to be installed with out need of root access ? If it is not possible what would be the most light weight virtual machine to use for a few VM's running windows xp sp3 ?


How to convert dd disk image to Clonezilla?

I have disk image from VirtualBox, it is a raw image, just like dd makes it, now I would like to restore the system to real machine using Clonezilla. However Clonezilla does not recognize the image (there is no "restore" option which means Clonezilla does not see it). **The question is** -- how to convert dd disk image file into Clonezilla format? So I could restore the system.


Fedora 14 root missing capability

I am trying to run a process that performs a clone() operation using a set of flags (CLONE_NEWIPC, CLONE_NEWNET, ...) that require CAP_SYS_ADMIN capability. This should not be a problem since I am running the process as root, but for some reason, it works on a debian wheezy 3.2.0 but not on a fedora 14 2.6.32. It throws an EPERM error which according to the CLONE(2) man page, means it was run by "an unprivileged process (process without CAP_SYS_ADMIN)". Again, everything is running as root. Any ideas why this is happening and how to fix it?


rsync an mpd playlist

An mpd playlist looks like this: syncrel.m3u               Bob Dylan - The Times They Are A-Changin' [V0]/04. One Too Many Mornings.mp3     Bob Dylan - The Times They Are A-Changin' [V0]/01. The Times They Are A-Changin'.mp3/      Or it can be configured to store the full path: syncfull.m3u               /home/share/media/audio/Bob Dylan - The Times They Are A-Changin' [V0]/01. The Times They Are A-Changin'.mp3     /home/share/media/audio/Bob Dylan - The Times They Are A-Changin' [V0]/03. With God On Our Side.mp3      I want to `rsync` those files to /media/sdg/MUSIC. I want it to delete files from the destination if they get removed from the playlist. I can not get the incantation right. I thought I had it last night, but when I reran it, it didn't work. I've tried every combination of `include-from`, `exclude=*`, etc. I can think of.


Is there a way to get anti-aliased icons in X, running Linux?

When I use graphical desktop-environment on Linux, no matter really what I use, I notice some icons tend to look aliased. It seems like there is perhaps a lack of anti-aliasing, like the curves on Windows and icons look far more blocky than they do on Windows. I am running at a high resolution, 1680x1050. Still, since things look so smooth in Windows 7, I want to know if Linux graphics just are not there yet, or if there is a problem with my configuration? Most of the time I am using Fluxbox, if that makes a difference.


Is there a small, lightweight application to have desktop icons like on Windows?

I run Fluxbox with tint2 which I am very happy with, as I prefer it to running a full desktop environment, even a lightweight desktop environment. On the other hand, my normal workflow revolves around having files I am currently working on on the desktop. Is there any sort of application that can give me "desktop icons" in the same way MS Windows and KDE/Gnome have, allowing files and shortcuts on the desktop? Ideally something that would fit in well with my fluxbox/tint2 setup and not require gnome or kde....


Check standard output of a background processs in real time

Let us say I submit a process in the background and I want to see the stdout and stderr. In another post it was suggested:               command > logfile 2>&1 &      But when I do head logfile I do not see anything? Is it not real time? if not, is there anyway to print to the logfile real time?


Poor TTY resolution with nVidia driver

The resolution of the TTY1-6 is poor ~ 640×480 Ubuntu 11.10 | Grub2 | nVidia | NVIDIA GT215 Board I went through the process on this site and after the edit the GRUB menu appears in the correct (more refined resolution). But after it boots into GNOME (via gdm3) and I attempt to view terminal 1-6 the screen is barely or completely unreadable. I am able to revert my changes but I am looking to restore the fine resolution the terminal screens are capable of. To determine the screen resolutions avail. to me, I used:               hwinfo --framebuffer | grep "Mode"     Mode 0x0369: 1680x1050 (+6720), 24 bits      These are the steps I went through. edit 1) grub config 2) initramfs modules, then 3) update               sudo vi  /etc/default/grub      Find the following three lines.               GRUB_CMDLINE_LINUX_DEFAULT="quiet  splash"     GRUB_CMDLINE_LINUX=""     ...     #GRUB_GFXMODE=640×480      Change them to:               GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset video=uvesafb:mode_option=1680x1050-24,mtrr=3,scroll=ywrap"     GRUB_CMDLINE_LINUX="vga=0x0369"     ...     GRUB_GFXMODE=1680x1050      Then:               sudo vi  /etc/initramfs-tools/modules      Adding/editing line:               uvesafb mode_option=1680x1050-24 mtrr=3 scroll=ywrap      Create a new file:               echo FRAMEBUFFER=y |  sudo tee /etc/initramfs-tools/conf.d/splash      Finally update the configuration files:               sudo update-grub2     sudo update-initramfs -u      Again, the GRUB menu in the beginning of the boot-up process shows the more refined resolution (including small font size), but small refined focused resolution disappears for terminals after boot up.


Is it possible to use ssh-copy-id once password based logins are disabled? Otherwise, is there an utility for adding an authorized public key to a user or should I edit the `~/.ssh/authorized_keys` file manually?


Booting from command line

I have a desktop version of #! installed on my laptop. I am quite new to Linux, but learning more everyday. I would like to know if it is possible to choose on start-up to boot into the Desktop, as it is now by default, or start in a command line environment (with a graphical display enabled). That way if I need just to go through files quickly I could do so with the terminal commands, but I could also call a graphical program if needed (ie thunar). I'm thinking I can avoid loading the desktop when I don't need it. Of course, I would like to keep the possibility of logging into the desktop.


Altered fstab - no longer able to SSH or access http

I might have done something stupid on my person debian server - I altered the fstab file. I changed udev to dev to try to fix a mounting issue in /dev/sda1 but after I restarted the server, I cannot access it with ping, ssh, smb, or http. Is the issue related to my uneducated fstab change or should I be looking someplace else?                 [/Volumes]$ ping 192.168.0.190       PING 192.168.0.190 (192.168.0.190): 56 data bytes       Request timeout for icmp_seq 0       Request timeout for icmp_seq 1       Request timeout for icmp_seq 2       Request timeout for icmp_seq 3       ç^C       --- 192.168.0.190 ping statistics ---       5 packets transmitted, 0 packets received, 100.0% packet loss            21:05:31       [/Volumes]$ ssh wall       ssh: connect to host 192.168.0.190 port 22: No route to host            21:05:34       [/Volumes]$ ssh wall       ssh: connect to host 192.168.0.190 port 22: Host is down


What are the pros/cons of the various methods to block brute force SSH attacks?

There are a number of different packages out there to shut out IPs from which brute-force SSH attacks are launched on your system. For example:   * DenyHosts   * Sshguard   * fail2ban What are the pros/cons of these, or any others? My current solution is to take the email that logwatch generates every day and dump the egregious IP addresses into a text file which I feed into a script that then rebuilds iptables. It's hacky, time-consuming and manual, and I'd like a better way. (Note that I didn't ask what was the "best" way to solve the problem, because there is no "best" way to do anything.)


How can I install perldoc on Ubuntu?

Ubuntu 10.10 comes with Perl 5.10.1 pre-installed, but strangely enough `perldoc` isn't part of the package.               $ perldoc     You need to install the perl-doc package to use this program.      How can I make this feature available?


Is it possible to use a router with dd-wrt/openWrt/etc as a radar detector?

Maybe a stupid question...but would it be possible to use a router with some kind of linux firmware and a laptop in a car as a radar detector?


Problem when changing the font size in nedit

Whenever I open Nedit, the following error appears ----               Cannot convert string "-*-helvetica-medium-r-normal-*-*-120-*-*-*-iso8859-1" to type FontStruct          Cannot convert string "-*-helvetica-bold-r-normal-*-*-120-*-*-*-iso8859-1" to type FontStruct          Cannot convert string "-*-helvetica-medium-o-normal-*-*-120-*-*-*-iso8859-1" to type FontStruct          Cannot convert string "-*-courier-medium-r-normal-*-*-120-*-*-*-iso8859-1" to type FontStruct          Cannot convert string "-*-courier-bold-r-normal-*-*-120-*-*-*-iso8859-1" to type FontStruct          Cannot convert string "-*-courier-medium-o-normal-*-*-120-*-*-*-iso8859-1" to type      FontStruct      Im unable to edit the font style in preferences.......   Please help me out to fix this.......


How to permamently disable SELinux?

We run a site with big traffic surges and, because of that, SELinux usually thinks that the traffic is a SYN flood attack. We have this same problem on many different CentOS servers. Despite `/etc/selinux/config` being set with disabled or permissive, when the servers boot, selinux is in enforcing mode again. The only way to disable SELinux is by doing `echo 0 > /proc/sys/net/ipv4/tcp_syncookies` every time the servers boot. I know that one solution could be to do a cron job with the abovementioned command on every boot but I wonder if anyone has some idea of what could be the reason why the modification of `/etc/selinux/config` is not enough (maybe it is enabled somewhere else; any idea on where to look or how to find it?).


Why is my initial ramdisk so big?

I'm running Ubuntu 11.10, which came with kernel version `3.0.0-14`. I downloaded and built a kernel from the `3.1.0` branch. After installing the new kernel, I see that my `/boot/initrd.img-3.1.0` file is HUGE. It's 114MB, while my `/boot/initrd.img-3.0.0-14-generic` is about 13MB. I want to get rid of the bloat, which is clearly unnecessary. When building the new kernel, I copied my `/boot/config-3.0.0-14-generic` to `.config` in my build directory, as to keep the configuration of my original kernel. I ran `make oldconfig`, selected the defaults for all the new options, and then built the kernel. Looking at the file sizes within each of the initrd cpio archives, I see that all of my .ko modules are larger in size in the 3.1.0 ramdisk, than the 3.0.0-14. I assumed there was an unnecessary debug flag checked in my config file, but I don't see anything different that was not already enabled in the 3.0.0-14 config file. My `/boot/config-3.0.0-14-generic` is here: http://pastebin.com/UjH7nEqd And my `/boot/config-3.0.1` is here: http://pastebin.com/HyT0M2k1 Can anyone explain where all the unnecessary bloat is coming from?


Samba 3.6.12 and NIS

We were able to use Samba and NIS on Samba 3.0.8 on Solaris 10 U5. When we update system to Solaris 10 U11, samba version became 3.6.12. And we are unable to authenticate like old style. I did not include some parameters on below(create directory mask,etc...) Old `smb.conf`                   [global]         workgroup = WORKGROUPNAME         server string =  Samba Server         security = SERVER         password server = dc6n, dc7n         username map = /etc/sfw/username.map         local master = No         dns proxy = No         wins server = dc6n, dc7n         kernel oplocks = No         host msdfs = No         map archive = No         oplocks = No         level2 oplocks = No      old `nsswitch.conf`                   passwd files nis         hosts  files nis       We try to set same configuration to Samba 3.6.12, but it did not work. So I decided to use security = ADS with Kerberos. This is worked but the way we did not want. Because, only windows domain users were able to login and NIS users not. New `/etc/smb.conf`                   workgroup = WORKGROUPNAME         realm = domain.com         security = ADS         password server = dc6n.domain.com         utmp = Yes         idmap config *:backend = tdb         idmap config *:range = 5000-9999         idmap config NETADM:backend = tdb         idmap config NETADM:range = 10000-90000         idmap uid = 100000-500000         idmap gid = 100000-500000         template homedir = /home/%U         template shell = /bin/tcsh         winbind cache time = 1800         winbind enum users = No         winbind enum groups = No         winbind use default domain = Yes         winbind separator = /         create krb5 conf = No         local master = yes         domain login = yes         domain master = yes         preferred master = yes      New `/etc/nsswitch.conf`                   passwd files winbind  nis         hosts  files winbind  nis       New `/etc/krb5.conf`                   [libdefaults]              domain.com = domain.com             dns_lookup_kdc = true               [realms]              symantec.local = {                  kdc = dc6n.domain.com                 admin_server = dc6n.domain.com             }               [domain_realm]          .domain.com = domain.com      I am able to get users info from AD and NIS with `wbinfo` and `genent` commands. How can we authenticate like old style again?


extracting certain info from output

I'm trying to extract certain info from ffmpeg output. Sample ffmpeg output:               configuration:  --enable-memalign-hack --enable-mp3lame --enable-gpl --disable-vhook --disable-ffplay --disable-ffserver --enable-a52 --enable-xvid --enable-faac --enable-faad --enable-amr_nb --enable-amr_wb --enable-pthreads --enable-x264      libavutil version: 49.0.0     libavcodec version: 51.9.0     libavformat version: 50.4.0     built on Apr 15 2006 04:58:19, gcc: 4.0.1 (Apple Computer, Inc. build 5250)     Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'file.mov':     Duration: 00:01:32.0, start: 0.000000, bitrate: 63489 kb/s     Stream #0.0(eng): Audio: pcm_s16le, 48000 Hz, stereo, 1536 kb/s     Stream #0.1(eng), 29.97 fps(r): Video: Apple ProRes 422, 1280x720     Must supply at least one output file      I want to get back a string with just Duration, frame rate, codec, and size, e.g.:               [00:01:32_29.97_Apple ProRes 422_1280x720]      I tried starting with this (from another hint):               ffmpeg -i file.mov 2>&1 | sed -n 's/Duration: \(.*\), start/\1/gp'      to get the Duration, but that just 'removed' the `Duration` and `, start`, i.e.:               00:01:32.0: 0.000000, bitrate: 63489 kb/s      PS: I'd also like to remove the `Apple` from `Apple ProRes 422` :-) Thanks! Update: I was able to extract the codec with               sed -n "s/.*\Video: \(.*\),.*/\1/p"      but I don't know how to (a) get the size and framerate, and (b) combine the searches on one line...


Moved folder into other has now disappeared

Two folders in same directory and I wanted to move one into other with command `mv foo /foo2` but now foo has vanished.


Configuring Apache 2.4 for CGI on FreeBSD

I am trying to run CGI on FreeBSD 9.2.   1. I installed Apache 4.2 (`pkg install apache42`)   2. Configured it to load CGI module.    3. Also, I did `chmod a+x` on files in `cgi-bin` directory.  And when I connect to the server to a test CGI script, the server printed this error message.               AH01215: (13)Permission denied: exec of '/usr/local/www/apache24/cgi-bin/test-cgi' failed     End of script output before headers: test-cgi      What's wrong and how to fix this problem?


How to turn off STARTTLS for internal relaying of emails?

I read with interest from sendmail guide that it is possible to disable TLS. I tried doing so for internal mails by adding the following lines in `/etc/mail/access`:               Try_TLS:my.server           NO     Try_TLS:localhost6.localdomain6         NO     Try_TLS:localhost.localdomain           NO     Try_TLS:localhost           NO     Try_TLS:127.0.0.1           NO      However, it doesn't seem to work and I am still seeing the following:               Received: from my.server (localhost6.localdomain6 [127.0.0.1])         by my.server (8.14.8/8.14.8) with ESMTP id s6H2Wanf004005         (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO)         for <user@my.server>; Tue, 15 Jul 2014 10:32:36 +0000     Received: (from user@localhost)         by my.server (8.14.8/8.14.8/client) id s6H2WZfQ004004         for user; Tue, 15 Jul 2014 10:32:35 +0000      Any idea?


Difference between Cross GCC and Linux GCC toolchain

While creating new C++ Project in Eclipse, I am being asked about toolchain. What is the practical difference between these toolchains - `Cross GCC` and `Linux GCC`. In what circumstances use them? Does it have something to do with whether the project is going to be compiled both on linux and windows machines? In one of the answers we can read: > Generally a cross compiler is a compiler producing code for a different kind > of system than yours. so if I compile project on target machine using own makefiles, it does not matter what option I will choose here, right?


Cannot find lib in path

I am trying to start a program that relies on some libraries that are in my path, however, the program says it cannot find the files:               11:45:27 ~ > echo $PATH     /usr/share/fsl/5.0/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/mri/Scripts:/home/mri/Scripts/MRI:/home/mri/Software/BRAINS3/bin:/home/mri/Software/BRAINS3/lib:/home/mri/Software/ITK_Build/bin:/home/mri/Software/ITK_Build/lib:/home/mri/Software/VTK_Build/bin:/home/mri/Software/VTK_Build/lib:/usr/lib/fsl/5.0          11:45:33 ~ > brains3     /home/mri/Software/BRAINS3/bin/brains3_real: error while loading shared libraries: libiplUtils.so: cannot open shared object file: No such file or directory          11:45:35 ~ > sudo find / -name libiplUtils.so     [sudo] password for mri:      /home/mri/Software/BRAINS3/lib/libiplUtils.so      Does anybody have an idea how to fix this?


Trouble adding existing user to existing group in ubuntu

I was trying to add a user called bill to www group               useradd -G www bill      It gives me error               UX: useradd: ERROR: bill is already in use.  Choose another.      I checked if this user already in the group www by typing this command               group bill      it resulted               bill:bill      Which means he is not in www group but still i keep getting the error Later I realized from this link that there are different commands to add existing user to existing group and adding a new user to new group. So I tries this command to add bill (an existing user) to www (an existing group)               usermod -a -G www bill      It gives me syntax error               UX: usermod: ERROR: Invalid syntax.     usage:  usermod -u uid [-o] | -g group | -G group[[,group]...] |                     -d dir [-m] | -s shell | -c comment |                     -l new_logname | -f inactive | -e expire |                     -A authorization [, authorization ...] | -K key=value ... |                     -P profile [, profile ...] | -R role [, role ...] login      Please help


Increment numbers inside strings by an offset

I want to search a text file for strings like these.               [task0]     [task1]     ...     [task1613]      and increment each by a given offset, in this case by 3640. So, with the example I gave above, I'd get the following.               [task3640]     [task3641]     ...     [task5253]      I want each of the incremented numbers in their original positions in the target file though, with `[task#]` wrapped around the number. Using `sed`:               sed "/^\[task/s/[0-9]*\]/3640+&/" ./test.file2      I can get something like:               [task3640+0]     [task3640+1]     ...     [task3640+1614]      but that isn't very useful because I don't know how to evaluate the expressions in place and I'm fairly sure that `sed` isn't suited for this. I'm thinking that `awk` or `perl` would work better for this, but I'm fairly inept at both of them. Can someone at least point me in the right direction, please? I've spent way longer than I want to admit on this already. For a more detailed view of what I want to do see this page on pastebin.


install kernel headers without overwriting old headers

I've built a newer (3.16-rc2) kernel which is running fine. My userspace program needs to link against the newer headers as it uses some new definitions in fcntrl.h etc. My question is how do I preserve the headers of the old kernel when running "make headers_install" ? If run               make headers_install INSTALL_HDR_PATH=/usr/src/kernels/`uname -r`       Header definitions clash as /usr/src/include is still in the PATH. Whats the proper way to handle this?


Determine maximum column length for every column in csv-file

To determine the maximum length of each column in a comma-separated csv-file I hacked together a bash-script. When I ran it on a linux system it produced the correct output, but I need it to run on OS X and it relies on the GNU version of `wc` that can be used with the parameter `-L` for `\--max-line-length`. The version of `wc` on OSX does not support that specific option and I'm looking for an alternative. My script (which not be that good - it reflects my poor scripting skills I guess):               #!/bin/bash          for((i=1;i< `head -1 $1|awk '{print NF}' FS=,`+1 ;i++));         do echo  | xargs echo -n "Column$i: " &&          cut -d, -f $i $1 |wc -L  ; done      Which prints:               Column1: 6     Column2: 7     Column3: 4     Column4: 4     Column5: 3      For my test-file:               123,eeeee,2323,tyty,3     154523,eegfeee,23,yty,343      I know installing the GNU CoreUtils through Homebrew might be a solution, but that's not a path I want to take as I'm sure it can be solved without modifying the system.


PPTP VPN in CentOS 7

I recently installed CentOS 7 (Gnome), but I realized that there are no options for setting up a PPTP VPN client. I tried to install `networkmanager-pptp-gnome`, but unfortunately it's not available in EPEL and CentOS repository. How can I add PPTP VPN to CentOS? ![No PPTP](http://i.stack.imgur.com/2XVd6.png)


"usb 3-2: can't set config #1, error -110" - USB keyboard works in Windows 8 laptop but on PC only until Linux boots

I tried 2 new USB keyboards that work until Linux starts booting. When booting I saw:               [    8.365211] usb 3-2: New USB device found, idVendor=1a2c, idProduct=0b23     [    8.404863] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0     [    8.444623] usb 3-2: Product: USB Keyboard     [   10.641472] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)     [   13.481363] usb 3-2: can't set config #1, error -110     [   13.523672] usb 3-2: USB disconnect, device number 2     [   13.804028] usb 3-2: new low-speed USB device number 3 using uhci_hcd      `lsusb` shows no keyboard. _I can't try anything requiring SuperUser permissions because it requires my password._ > **I've found using google:**   * **110** is related to **power** , some say not enough others it's overcurrent protection   * Toggle `usb legacy mode` in BIOS.I toggled it and also `usb 1.1 emulation` (description mentions typing special keyboard keys) and `plug n play aware os`   * Unload ehci module (responsible for usb 2.0) **requires root** and all usb devices will work slower (To type, I would keep using Ultimate Control (requires Android) that I have installed earlier but it can't even type normally because it capitalizes letters randomly {it didn't do that before this problem, maybe this is a coincidence} and no android keyboard has all PC keyboard keys working as on a PC keyboard or have them at all.) > **This occurs with:**   * _Titanum TK101_ and _Tracer Patriot Black_ keyboard (these keyboards look identical except logo and key stickers, maybe hardware is same)   * K8T NEO-FSR Motherboard version 1.0 with **last BIOS**   * COLORSIT 330U-FPH PSU   * AMD Venice 3000+ CPU   * **Lubuntu 14.04/10 64-bit** OS (I've run `do-release-upgrade -d` and update it everyday)   * Linux 3.16-rc3   * BIOS always showing **CPU stepping as CG** and its temp as less than 30°C and motherboard temp always less than 40°C and voltages within ATX specification. I don't know how:     1. correct these values are     2. much they change during work. > UPDATE this problem is being avoided by using a keyboard which is exactly > the same model (tracer patriot black) but with a ps/2 connector.The seller > said me these keyboards work on Linux/Ubuntu machines (telling Me he > installs Linux sometimes for his clients), making Me believe the problem is > also caused by my old PC machine. **Any other info? I don't know what else, please tell Me**


What is the difference of -a and -e in bash's conditional expressions?

From `man bash`:               CONDITIONAL EXPRESSIONS     [...]            -a file                   True if file exists.     [...]            -e file                   True if file exists.        1. So what is the difference between `[ -a $FILE ]` and `[ -e $FILE ]`, if any?   2. If there is no real difference, why do two flags for the same purpose exist?


how to assign values of the column for given conditional statements

I need help with a script to assign values of the column with a given conditional argument. To be specific, here is my data and my condition input `data.file`:               0.4     3.6     -2.4     0.1     -2.0     1.6     2.2     3.6      condition: assign R if data.file greater than 2(>2), assign S if data.file less than -2(<-2), and assign M if data.file greater than or equal to-2 and less than or equal to 2 [-2,2]. Desired output file `out.file`               0.4  M     3.6  R     -2.4 S     0.1  M     -2.0 M     1.6  M     2.2  R     3.6  R


tmux "last-session" binding

How could I bind to last (most recent) session? The obvious `last-session` leads to an "unknown command" error.               bind-key z last-session


Running `sudo /sbin/service mysqld start` causes system to crash

OS: CentOS 5.10   Service: Amazon Web Services   Attempted to remove MySQL 5.0 and install MySQL 5.6 I had a server set up, and was going to use MySQL, but it was was set up with MySQL 5.0. Since there are performance improvements and other features added, and there wasn't yet any data or anything, I wanted to install MySQL 5.6. I was following the guide posted by Oracle to get an RPM installed for use on RHEL 5: http://dev.mysql.com/doc/mysql-repo-excerpt/5.6/en/linux-installation-yum- repo.html Everything went swimmingly, and I could start the service immediately after installing - but... When I got to this step: > Always run the program mysql_secure_installation to secure your MySQL > installation: > > shell> mysql_secure_installation > > mysql_secure_installation allows you to perform important operations like > setting root password, removing anonymous users, and so on. The program is > safe and easy to use. It is important to remember the root password you set > though. See mysql_secure_installation — Improve MySQL Installation Security > for details. I ran mysql_secure_installation, and when it asked for a password, I attempted to just press enter, since I had not yet set one for root@localhost. I was informed that the password was incorrect. So tried what the previous password was, and was given an error that I have since lost because I'm connecting through putty, and the window closed when I lost the connection. In any case - I just asked for the password again, so I tried just pressing enter, and the old password again, niether worked. So I cancelled the process, ran `sudo /sbin/service mysqld stop` and then `sudo /sbin/service mysqld start`. The shell stopped, hung for a second, and then the window closed, and thus my connection. I tried to open the ssh connection again, but it timed out. After waiting a few minutes, I could ssh back into the server. Every time I attempt to start the mysqld service, my ssh session closes. Does that maybe mean that sshd is crashing as well? The log file `/var/log/mysql.log` contains only the following:               131204 23:49:02 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql     131204 23:50:53 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended     131205 00:05:12 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql     131205 00:06:28 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended     131205 00:08:09 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql     131205 00:09:14 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended     131205 00:13:54 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql     131205 00:15:04 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended     131205 00:25:12 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql     131205 00:26:45 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended      I've tried running mysql manually, and the same thing happens. What do I do from here? * * * # Edit: I just ran mysqld_safe to see what the output is, and it gets this far:               [user@machine mysql]$ sudo /usr/bin/mysqld_safe     131205 01:13:33 mysqld_safe Logging to '/var/log/mysqld.log'.     131205 01:13:33 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql     Killed      Before hanging up on me. What happens if I move those databases that InnoDB uses? * * * As per Patrick, I checked `dmesg`, and searched for `mysqld`. I found the following:               type=1400 audit(1386200078.706:1929): avc:  denied  { read } for  pid=20563 comm="nohup" path="/usr/sbin/mysqld" dev=xvda1 ino=375035 scontext=user_u:system_r:netutils_t:s0 tcontext=system_u:object_r:mysqld_exec_t:s0 tclass=file     sudo invoked oom-killer: gfp_mask=0x201d2, order=0, oomkilladj=0          Call Trace:      [<ffffffff802c1b64>] out_of_memory+0x8b/0x203      [<ffffffff8020fa5d>] __alloc_pages+0x27f/0x308      [<ffffffff802139dd>] __do_page_cache_readahead+0xc8/0x1af      [<ffffffff8021424e>] filemap_nopage+0x14c/0x360      [<ffffffff80208e9d>] __handle_mm_fault+0x444/0x144f      [<ffffffff8026ea01>] monotonic_clock+0x35/0x7b      [<ffffffff8029b54a>] attach_pid+0x7c/0xa9      [<ffffffff80266d94>] do_page_fault+0xf72/0x131b      [<ffffffff8024901b>] skb_dequeue+0x48/0x50      [<ffffffff80254146>] unix_release_sock+0x19e/0x1fa      [<ffffffff80261df5>] thread_return+0x6c/0x113      [<ffffffff80207116>] kmem_cache_free+0x84/0xd7      [<ffffffff80207116>] kmem_cache_free+0x84/0xd7      [<ffffffff8025f82b>] error_exit+0x0/0x6e      And:               mysqld invoked oom-killer: gfp_mask=0x201d2, order=0, oomkilladj=0          Call Trace:      [<ffffffff802c1b64>] out_of_memory+0x8b/0x203      [<ffffffff8020fa5d>] __alloc_pages+0x27f/0x308      [<ffffffff802139dd>] __do_page_cache_readahead+0xc8/0x1af      [<ffffffff8021424e>] filemap_nopage+0x14c/0x360      [<ffffffff80208e9d>] __handle_mm_fault+0x444/0x144f      [<ffffffff8020622a>] hypercall_page+0x22a/0x1000      [<ffffffff8020622a>] hypercall_page+0x22a/0x1000      [<ffffffff80266d94>] do_page_fault+0xf72/0x131b      [<ffffffff80236fd3>] __vm_enough_memory+0xee/0xfc      [<ffffffff8020e472>] do_mmap_pgoff+0x35e/0x74a      [<ffffffff80236fd3>] __vm_enough_memory+0xee/0xfc      [<ffffffff80263929>] _spin_lock_irqsave+0x9/0x14      [<ffffffff802313f1>] __up_write+0x27/0xf2      [<ffffffff8025f82b>] error_exit+0x0/0x6e          Mem-info:     DMA per-cpu:     cpu 0 hot: high 0, batch 1 used:0     cpu 0 cold: high 0, batch 1 used:0     DMA32 per-cpu:     cpu 0 hot: high 186, batch 31 used:79     cpu 0 cold: high 62, batch 15 used:58     Normal per-cpu: empty     HighMem per-cpu: empty     Free pages:        4780kB (0kB HighMem)     Active:114881 inactive:1 dirty:1 writeback:0 unstable:0 free:1195 slab:5226 mapped-file:541 mapped-anon:114329 pagetables:1094     DMA free:2004kB min:48kB low:60kB high:72kB active:540kB inactive:0kB present:9076kB pages_scanned:1381592 all_unreclaimable? yes     lowmem_reserve[]: 0 489 489 489     DMA32 free:2776kB min:2804kB low:3504kB high:4204kB active:458984kB inactive:4kB present:500960kB pages_scanned:10643850 all_unreclaimable? yes     lowmem_reserve[]: 0 0 0 0     Normal free:0kB min:0kB low:0kB high:0kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no     lowmem_reserve[]: 0 0 0 0     HighMem free:0kB min:128kB low:128kB high:128kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no     lowmem_reserve[]: 0 0 0 0     DMA: 1*4kB 0*8kB 1*16kB 0*32kB 1*64kB 1*128kB 1*256kB 1*512kB 1*1024kB 0*2048kB 0*4096kB = 2004kB     DMA32: 28*4kB 1*8kB 0*16kB 1*32kB 1*64kB 0*128kB 0*256kB 1*512kB 0*1024kB 1*2048kB 0*4096kB = 2776kB     Normal: empty     HighMem: empty     585 pagecache pages     Swap cache: add 0, delete 0, find 0/0, race 0+0     Free swap  = 0kB     Total swap = 0kB     Free swap:            0kB     131072 pages of RAM     5993 reserved pages     4445 pages shared     0 pages swap cached     Out of memory: Killed process 20563, UID 0, (mysqld).      * * * What do I do from here?


How to delete a line if string is the only thing on the line

How can I use sed or something else to delete a line only if the string I'm searching for is the only thing on the line? Example output:                   device-address-binding: ?         database-revision: 20       -- Found 198 Objects        },        {          object-identifier: (Analog Input, 1)         object-type: ({  Analog Input  },)         object-name: "CA-1 T EXT"         descrip      I need to delete the lines containing " }," but only on lines that have nothing else. If I use sed to match and delete a line containing " }," on the output above the line "object-type" would also get deleted. It would be nice to search for " },/n" but we all know sed doesnt work that way. Thanks for your help.


Can't use "userspace" cpufreq governor and set cpu frequency

I'm trying to change the cpu frequency on my laptop (running Linux), and not having any success.   Here are some details:               # uname -a     Linux yoga 3.12.21-gentoo-r1 #4 SMP Thu Jul 10 17:32:31 HKT 2014 x86_64 Intel(R) Core(TM) i5-3317U CPU @ 1.70GHz GenuineIntel GNU/Linux          # cpufreq-info     cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009     Report errors and bugs to cpufreq@vger.kernel.org, please.     analyzing CPU 0:       driver: intel_pstate       CPUs which run at the same hardware frequency: 0       CPUs which need to have their frequency coordinated by software: 0       maximum transition latency: 0.97 ms.       hardware limits: 800 MHz - 2.60 GHz       available cpufreq governors: performance, powersave       current policy: frequency should be within 800 MHz and 2.60 GHz.                       The governor "powersave" may decide which speed to use                       within this range.       current CPU frequency is 2.42 GHz (asserted by call to hardware).     (similar information for cpus 1, 2 and 3)          # cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors     performance powersave      I initially had the userspace governor built into the kernel, but then I also tried building it as a module (with the same results); it was loaded while running the above commands (and I couldn't find any system messages when loading it):               # lsmod     Module                  Size  Used by     cpufreq_userspace       1525  0     (some other modules)      And here are the commands I tried for changing the frequency:               # cpufreq-set -f 800MHz     Error setting new values. Common errors:     - Do you have proper administration rights? (super-user?)     - Is the governor you requested available and modprobed?     - Trying to set an invalid policy?     - Trying to set a specific frequency, but userspace governor is not available,        for example because of hardware which cannot be set to a specific frequency        or because the userspace governor isn't loaded?          # cpufreq-set -g userspace       Error setting new values. Common errors:     - Do you have proper administration rights? (super-user?)     - Is the governor you requested available and modprobed?     - Trying to set an invalid policy?     - Trying to set a specific frequency, but userspace governor is not available,        for example because of hardware which cannot be set to a specific frequency        or because the userspace governor isn't loaded?      Any ideas?


observing script execution with monit script seems to ignore pipes

I want to have a bash command running in the background and being watched by monit. To get the PID of this process, I found this script on the web and I modified it to fit my commands: (named sdr.sh)               #!/bin/bash          NAME="sdr"     LOG_FILE="/tmp/$NAME.log"     PID_FILE="/var/run/$NAME.pid"     CMD="/usr/local/bin/rtl_fm -o 4 -A lut -s 22050 -f 254.2355M - | /usr/local/bin/multimon-ng -t raw -f alpha /dev/stdin |& /home/me/import.rb"          function startnotification {     VAR=`ps -ef | grep "$CMD" | grep -v grep | wc -l`     if [ $VAR -gt 0 ]; then     echo "$NAME already running..."     else     nohup $CMD > $LOG_FILE 2>&1 &     echo $! > $PID_FILE     echo "$NAME listener is started..."     fi     }          function stopnotification {     kill `cat /var/run/$NAME.pid`     rm -f $PID_FILE     echo "$NAME listener stopped."     }     case $1 in     start) startnotification;;     stop)  stopnotification;;     restart)     stopnotification     startnotification;;     *)     echo "usage: $NAME {start|stop}" ;;     esac     exit 0      When I execute the command               /usr/local/bin/rtl_fm -o 4 -A lut -s 22050 -f 254.2355M - | /usr/local/bin/multimon-ng -t raw -a POCSAG1200 -f alpha /dev/stdin |& /home/me/import.rb      In my bash cmd it works fine. But when I do a `sdr.sh start` I get the following error:               /usr/local/bin/rtl_fm: invalid option -- 'a'      As you can see, the `-a` is a parameter of `multimon-ng` and not of `rtl_fm`. It seems, that this pipe is not interpreted as pipe.


Find pattern from one file listed in another

I want to find patterns that are listed in one file and find them in other file. The second file has those patterns separated by commas. for e.g. first file F1 has genes               ENSG00000187546     ENSG00000113492       ENSG00000166971      and second file F2 has those genes along with some more columns(five columns) which I need                region     gene           chromosome  start       end           intronic   ENSG00000135870 1   173921301   173921301     intergenic  ENSG00000166971(dist=56181),ENSG00000103494(dist=37091) 16 53594504    53594504     ncRNA_intronic  ENSG00000215231 5   5039185 5039185     intronic    ENSG00000157890 15  66353740    66353740      So the gene ENSG00000166971 which is present in the second file does not show up in grep because it has another gene with it,separated by comma. My code is:               grep -f "F1.txt" "F2.txt" >output.txt      I want those values even if one of them is present,and the associated data with it.Is there any way to do this?


How to make fonts available to the system

I'm using Android Studio, and in the drop down list of fonts is Source Code Pro. On that list, the font looks quite nice, but the preview below (and what I get when I select it) is horrible. I'm using "size 14". I thought perhaps that Android Studio is using a bitmap for that text, rather than rendering it, and I couldn't find any evidence the font was installed as the System Settings part of Linux Mint KDE 13 doesn't offer it in any lists of fonts, so I downloaded it, copied the files (.otf.woff and .ttf.woff format) into               /usr/share/fonts/truetype      then ran               fc-cache -fv      Part of the output of this is:               /usr/share/fonts/truetype/sourcecodepro: caching, new cache contents: 0 fonts, 0 dirs      Suggesting it's not recognizing it. I've even rebooted (Windows habits die hard) but I can't see this font anywhere other than in Android Studio. Am I doing something wrong in how I install this font?


How to chain ssh and stay in prompt

I want to create a script that when I double click runs:   1. 'ssh -Y server1'   2. WITHIN server1 run 'ssh -Y server2' (server2 not accessible outside)   3. I now have the terminal prompt connected to server2 waiting to run commands


Vuescan Application

I have Kodak i1120 document scanner. Driver is available for windows only. But an application named `Vuescan` managed to run it on Linux ( tried on Ubuntu 11.10 and 10.04 ). How they had managed to do so ? Is it possible to use Windows scanner driver on Linux ? Same as that of `ndiswrapper` for `wireless media`


How to get total disk read/write in bytes per hdd device from /proc

How to get total disk read/write in bytes per hdd device? for example if i have sda, sdb, and sdc, is there any file on `/proc` that i could use similar to `/proc/net/dev` for networking?


CentOS 6.4: Unable to mount disc, doesn't like UDF

I'm trying to use a CD on CentOS 6.4, but I keep getting this error: > Unable to mount Disc Error mounting: mount: unknown filesystem type 'udf' I've installed `udftools` I've tried changing the permissions around on `/dev/sr0` to no avail. I've tried various ways of mounting the disc such as:   * `mount /dev/sr0 /mnt` (unknown filesystem type 'udf')   * `mount -t auto /dev/sr0 /mnt` (unknown filesystem type 'udf')   * `mount -r -t iso9660 /dev/sr0 /mnt` (wrong fs type...)   * `mount -t udf /dev/sr0 /mnt` (unknown filesystem type 'udf', despite being in the man page for mount)   * `dd if=/dev/sr0 of=disc.iso` -> `mount -o loop disc.iso /mnt -t iso9660` I can see and read from the disc just fine in a VM on that host and on other physical machines. It also seems to happen with just about every disc that I've tried. Any thoughts?


Addition with 'sed'

I am trying to perform a mathematical operation with `sed`, but it continues to treat my variables as strings. The input is of this kind:               $ echo 12 | sed 's/[0-9]*/&+3/'     $ 12+3      I'd like to have 15 as output. I need to do the operation and replace its mathematical result in only one passage, because I am running the program as a Python daemon, and I want to avoid passages like redirecting `stdout` on files, open those files, perform operations, extract the result, do the replacement. To me, `sed` seems the best to perform all in one line. I've tried to cast both input and output in various ways like               $ echo 12 | sed 's/[0-9]*/int(&+3)/'     $ echo 12 | sed 's/[0-9]*/\int(&+3)/'     $ echo 12 | sed 's/[0-9]*/\int(&+3)/'      but the result was always a printing of the second field.


Replace whole line in a file from command-line

I have a text file which has some contents similar to this:               # General information about the project.     project = u'Py6S'     copyright = u'2012, Robin Wilson'          # The version info for the project you're documenting, acts as replacement for     # |version| and |release|, also used in various other places throughout the     # built documents.     #     # The short X.Y version.     version = '0.5'     # The full version, including alpha/beta/rc tags.     release = '0.5'      I would like to replace the `version = '0.5'` line with `version = X` where X is a command-line argument given to a script, and then do the same for the `release =` line. Is there a simple command I can call to do this sort of replacing? I've looked into `sed` a bit, but it seems that the global substitution in sed would require me to search for `version = '0.5'`, but all I really want to search for is a line beginning with `version =` - as I have no idea what the version might be when I run the script! Any ideas?


Convert absolute symlink to relative symlink with simple Linux command

I have a complete sub-filesystem inside a path `/home/user/system` containing the standard Linux structure with directories `/bin`, `/home`, `/root`, `/usr`, `/var`, `/etc`,... This sub-filesystem contain symbolic links, either relative or absolute. The relative symlinks are just fine, they stay within the sub-filesystem under `/home/user/system`. But absolute symlinks are problematic, as they point to a target outside of the sub-filesystem. As an example we assume an absolute symlink as follows (seen inside the sub- filesystem):               /usr/file1 -> /usr/lib/file1      In the overall filesystem we have a link at `/home/user/system/usr/file1` that now point to a file `/usr/lib/file1` outside the sub-filesystem, instead of a file `/home/user/system/usr/lib/file1` _inside_ the sub-filesystem. I would like to have a simple script, preferably a single command line (rsync, chroot, find, ...) that converts every absolute symlink to a relative one. In the given example, that relative link would become               /usr/file1 -> ../usr/lib/file1


Downgrade gcc to 4.6.3 on fedora?

How can I downgrade gcc to 4.6.3 on fedora. I am working on a project that I do not have permission to update to be comparable with 4.8 and need to be able to install gcc 4.6.3. How can I do this?


How to configure mailx to support Gmail?

How can I set up `mailx` to send messages to my Gmail account? What I do now is run the command:               mail -s "hello kid" mymail@gmail.com      It freezes and does nothing. I tried some variations, but all of them just froze dead in my terminal. Is there anything I need to configure in `mailx` before actually using `mail`? There were different options found on the Internet, like making a `.mailrc` and other config files, but I got nowhere. Can someone provide me with more information on the subject?


Cannot access to localhost with 127.0.0.1

When I type 127.0.0.1 in address bar of browser, I get the following result:               Not Found          The requested URL / was not found on this server.          Apache/2.2.22 (Fedora) Server at 127.0.0.1 Port 80      What can cause this problem?


Linux I/O shared memory access

I'm pretty confused on how linux manages I/O shared memory to communicate with devices that use it. If I understood it correctly linux kernel starts mapped at 0x100000 (to avoid the first megabyte legacy ram data and to be stored in contiguous memory locations) and then after entering protected mode:   * on 32 bit systems there's a mapping like this http://i.stack.imgur.com/zEkq2.jpg The ZONE_NORMAL should be below 896 MB, so the mapping between the kernel linear 1GB and the physical 896 MB is always possible. Let's just ignore the ZONE_DMA for now (I read that this is just for legacy systems since PCI can now use DMA transfers everywhere in memory)   * on 64 bit systems the kernel linear address space should start from PAGE_OFFSET= 0xffff810000000000 and forth In both cases, if an address in the kernel space is greater than PAGE_OFFSET, should refer to a ioremap mapping (to be resolved through pagination), if it's lower than PAGE_OFFSET it could be resolved with a simple NEW_ADDRESS = OLD_ADDRESS - PAGE_OFFSET. Is this correct? Bonus question: when the kernel is up and running and the tidying up has been done, does it still physically reside from 0x100000 and forth (within the first GB) ? Even on 64bit systems?


path in environment variable PATH, but command still not found

I am working with a Redhat distribution. Mysql is installed with the binary in the following path:               /root/opt/rh/mysql55/root/usr/bin/mysql      Furthermore, the environmental variable PATH echos:               echo $PATH     /root/opt/rh/mysql55/root/usr/bin/mysql:/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/root/opt/rh/mysql55/root/usr/bin/mysql      The server has been restarted but if I type               mysql       into bash it returns the following:               # mysql -u root     -bash: mysql: command not found      Please advise **EDIT** Altered PATH EV to               /root/opt/rh/mysql55/root/usr/bin      using               export  mysql /opt/rh/mysql55/root/usr/bin     export  PATH  ${mysql}:${PATH}      Still get `command not found` After rebooting the server, echo $PATH is now:               /usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin      So, the path to mysql is gone.


Find last shutdown time

This is the command I am using:               last -x|grep shutdown | head -1      but it's giving me the duration with +2 hours:               shutdown system down  3.14-1-amd64     Mon Jul 21 08:43 - 22:19  (13:36)      the last shutdown time (08:43) is correct, but the startup time (22:19, should be 20:19) is incorrect. Is there a better command to check how long ago the PC was shutdown? or is my DST settings or something else causing this? PS: I am using Debian testing _(Linux rig 3.14-1-amd64 #1 SMP Debian 3.14.12-1 (2014-07-11) x86_64 GNU/Linux)_


How to determine the newly closed file within a continuous audit log rotation?

I am attempting to find the best way to determine when the second file (of a matching criteria) is created. The context is an audit log rotation. Given a directory where audit logs are created every hour, I need to execute a parsing `awk` script upon the audit log that has been closed off. What I mean by that, is that every hour a new audit log is created, and the old audit log is closed, containing up to an hours worth of information. The new log file is to be left alone until it too is closed and a new one created. I could create a bash shell script and use `find /home/tomcat/openam/openam/log -name amAuthentication.* -mmin -60` and then have this executed every 10 minutes via a `crontab` entry but I'm not sure how to write the rest of it. I suppose the script could start off by saving the contents of that find to a temp file, and upon every `crontab` execution, compare the new find command contents and when it changes, use the temp file as the input to the awk script. When the `awk` script is complete, save the contents of the new find to the file. * * * A colleague has suggested I use the old school 'sticky-bit' to flag processed files. Perhaps this is the way to proceed.


What is metadata, and how does it aid in the "fsck" process?

If I understand it correctly, "fsck" is used in UNIX systems to check for internal consistency within disks after there has been a crash. I was wondering, then, how it uses "metadata" to make sure that everything in the filesystem is consistent, for instance what steps the fsck process needs to take in order to restore and repair? -> edit: it would also be helpful if someone could clarify what "synchronous write-through" refers to in this picture as well.


Problem in Cross compiling TinyCC with CodeSourcery

I am trying to cross compiling homas Preud'homme's version of TinyCC by using following command               ./configure --cc=arm-none-linux-gnueabi-gcc --prefix=/home/shushant/tinycc/tc      and it shows following error message after running `make install`               make: Circular Makefile <- Makefile dependency dropped.     make -C lib native     make[1]: Entering directory `/home/shushant/tinycc/lib' arm-none-linux-gnueabi-gcc -c alloca86_64.S -o x86_64/alloca86_64.o -I..  -Wall -g -O2 -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -Wno-unused-result -DTCC_TARGET_X86_64     alloca86_64.S: Assembler messages:     alloca86_64.S:7: Error: expression too complex -- `pop %rdx'     alloca86_64.S:11: Error: ARM register expected -- `mov %rdi,%rax'     alloca86_64.S:13: Error: ARM register expected -- `add $15,%rax'     alloca86_64.S:14: Error: ARM register expected -- `and $-16,%rax'     alloca86_64.S:15: Error: bad instruction `jz p3'     alloca86_64.S:28: Error: ARM register expected -- `sub %rax,%rsp'     alloca86_64.S:29: Error: ARM register expected -- `mov %rsp,%rax'     alloca86_64.S:35: Error: expression too complex -- `push %rdx'     alloca86_64.S:36: Error: bad instruction `ret'     alloca86_64.S:40: Error: junk at end of line, first unrecognized character is `,'     make[1]: *** [x86_64/alloca86_64.o] Error 1     make[1]: Leaving directory `/home/shushant/tinycc/lib'     make: *** [libtcc1.a] Error 2      some how binaries is successfully generated but in wrong directory (at the root of `/home/shushant/tinycc`) instead of `/home/shushant/tinycc/tc` and when I am trying to run on android emulator its show`file not found` of course generated binaries is not supported by device. How can I fix it?


Command-line cURL submit form from other files

In this command:               curl -d param1=value1 -d param2=value2 http://example.com/submit      If `value1` is located in `file1.txt`, how can I make cURL include `file1.txt` in the command?


Install Puppy Linux or "Damn Small Linux" on Pogoplug (~NSLU2) possible

I am thinking about buying Pogoplug (50 $) which is in fact a NAS server similar to the famous `nslu2`. Like the `nslu2`, this device can be hacked to have a full fresh Linux server running. There are lots of tutorials on how to install Linux and `LAMP` to turn it into a web server. Check here **My question is if Pogoplug is able to run Linux, is it then possible to install Puppy Linux (or with live USB) with the graphical user interface?** I ask this because I don't know if there is a graphics board inside. Please excuse my lack of knowledge. Thanks for your time.