Questions specifically about Linux but not specific to a particular distribution. If the question could apply to any Unix-like system, specify your Linux distribution in the body of your question but do not use the /linux tag.

learn more… | top users | synonyms

2
votes
1answer
773 views

How to know the number of messages received in a message queue at a point of time

I have a implementation where the hardware dispatches 300 packets every second to a host application through DMA transfer and then to the host application's message queue. When packets are sent at ...
10
votes
1answer
5k views

What does fsck -p (preen) do on ext4?

I was reading a blog post about filesystem repair and the author posted a good question… fsck -p is supposed to fix minor errors automatically without human intervention. But what exactly will it fix ...
5
votes
3answers
2k views

Installing Fedora from USB key

How do I load a Fedora DVD iso onto USB so I can install it from there. I've tried dd as in here: Fedora instructions but for some reason this didn't work. Here's what I've tried: sudo dd ...
3
votes
1answer
2k views

LVM2 partition alignment

How to do the following with Linux tools : LVM partition alignment and alignment of partition on LVM ? What in case where I want to setup LVM partition (for "pv") and then partitions ? To be more ...
1
vote
2answers
1k views

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 ...
4
votes
2answers
3k views

Uptime and who -b are showing different times when the system was last booted on Linux

I have a Linux system where it is showing to me two different times when the system was last booted. root@linux:~ # who -b; uptime system boot 2009-07-09 20:51 11:48am up 1 day 0:54, 1 ...
3
votes
1answer
647 views

Keyboard input not displayed on the screen?

We use the `exceed tool to connect to our UNIX servers, but sometimes the command-line behaves erratically. When I am typing some command on the command-line, nothing happens -- nothing is displayed ...
2
votes
1answer
465 views

Disable action keys

I'm running openSUSE on HP Pavilion dm4. I have a bunch of action keys (volume up/down, brightness, wifi etc.) on my function keys. For using standard Fx keys I have to hold Fn key. The problem is ...
4
votes
3answers
1k views

clear command in Konsole

I know about the Linux clear command, but it just moves the previous output from the visible part of terminal window (KDE Konsole). I can still scroll up and see all previous text. Is there similar ...
4
votes
1answer
907 views

Is there a tool in linux that allows multi-line regex expressions?

I'm wanting to find the results of a multi-line regular expression in linux. I tried grep, but like most linux utilities it's line based. Is there something similar that allows me to search across ...
9
votes
3answers
5k views

Is there an alternative to CUPS?

When printing with Linux is there an alternative to using CUPS? After using it for a couple of weeks printing suddenly stopped working. The 'processing' light would come on and that would be the end. ...
17
votes
3answers
8k views

Understanding /dev and its subdirs and files

$ ls -l /dev/stdin /dev/fd/0 lrwx------ 1 tim tim 64 2011-08-07 09:53 /dev/fd/0 -> /dev/pts/2 lrwxrwxrwx 1 root root 15 2011-08-06 08:14 /dev/stdin -> /proc/self/fd/0 $ ls -l /dev/pts/2 ...
3
votes
1answer
755 views

Change screen “hardstatus” color dynamically

I show the hard-disk free space in hardstatus screen. But also I want change the color of this value when it's less than a value to alert me. I have done a script that it checks this and it returns a ...
3
votes
1answer
2k views

vim is too slow when saving files

I run vi under Linux CentOS 5.3. Each time I exit from a file, I have to wait several seconds before vi saves the file. The same thing happens with vim. I ran this command: strace -odetails -ff -f ...
3
votes
2answers
218 views

Different formats of object files in Linux

I was wondering what are some formats of object files in Linux? There are two types of object files that I know: executable, which has ELF format object files that are generated by gcc after ...
11
votes
2answers
12k views

How to include local header files in linux kernel module

Say I have a module mymod with source files as follows: src/mod/mymod.c src/inc/mymod.h I try to include mymod.h as follows #include <mymod.h> My makefile contains EXTRA_CFLAGS= ...
2
votes
1answer
357 views

rotating buffer type file logging utility

I'am trying to debug a server that throws a lot of logs on stdout/stderr. I need to redirect only last N lines to a file. Something like a rotating buffer feature there in tcpdump's -C & -W flags. ...
1
vote
1answer
265 views

Comprehensive /etc/auto.disks script for autofs that takes into consideration all mounted disks, including NTFS and FAT32?

Does anyone have a more comprehensive /etc/auto.disks script for autofs that takes into consideration all mounted disks, even NTFS, FAT32? So all that's needed to mount any attached drive is ls ...
4
votes
0answers
1k views

Automounting not working correctly for CIFS shares; weird results

I followed the guide on this page to get samba shares working via autofs: http://www.howtoforge.com/accessing_windows_or_samba_shares_using_autofs Servers and Configuration My Samba server (remote) ...
2
votes
1answer
1k views

CLI filesystem benchmark for random read/write with specified block size

I'm in search of a filesystem benchmark utility. I basically want to run a test which should be able to do random reads/writes on a specified drive with a given block size. e.g. a 4K random write on a ...
4
votes
2answers
841 views

Permanently switching to zsh in a script, without being root and without being asked for the password

Is there any way to run chsh -s /bin/zsh without being root and without being asked for the password? I want to put it into a non-interactive script that isn't called by root.
12
votes
4answers
5k views

If I connect a physical device, how can I ever know which device file belongs to it?

Say I plug in several USB drives which don't get automatically mounted. How can I find out which device file belongs to which physical device, so I can mount it for example? I'm running Mac OS X but ...
2
votes
2answers
800 views

dracut and separate /usr?

I would like to use systemd on my Gentoo box. Unfortunately, I have /usr on a separate partition and Gentoo puts libdbus into /usr/lib, leading to a segfault on boot, since systemd relies on dbus. ...
6
votes
6answers
20k views

How can I create and grant a normal user with root privileges?

I'm wondering how to create and grant a normal user (for example, named 'sybase') with root privileges? I found useradd, adduser, and passwd to be useful, but are there any other files to modify to ...
4
votes
1answer
6k views

List only bind mounts

Rather than using mount | grep, I'd like to use mount -l -t bind, but that doesn't work, and -t none shows all mounts.
2
votes
3answers
3k views

Linux + how to verify mirror configuration on linux red-hat

I have an IBM blade server and we've installed RedHat Linux on the machine. How can we check if we have both disks running as a mirror, or if everything is only running on a single disk? What ...
6
votes
4answers
10k views

How do I kill all a user's processes using their UID

I want to kill all running processes of a particular user from either a shell script or native code on a linux system. Do I have to read the /proc directory and look for these? Any ideas? Is there a ...
4
votes
2answers
3k views

How to get information about word, address size, address bus size, data bus size and instruction bus size?

I was wondering how to get information about the following things from the command line in Linux: word (i.e. the size that the CPU can process at one time, which may not be the OS bit-depth), ...
7
votes
1answer
4k views

Linux - LXC; deploying images with tiniest possible X11

is it currently possible to setup LXC containers with X11 capabilities? I'm looking forward for the lightest available X11 container (memory-wise), hardware acceleration a plus but not essential. If ...
11
votes
1answer
22k views

Setting /proc/sys/vm/drop_caches to clear cache

As part of doing some cold cache timings, I'm trying to free the OS cache. The kernel documentation says: drop_caches Writing to this will cause the kernel to drop clean caches, dentries and inodes ...
3
votes
1answer
165 views

mounting volume protected against user access

I need to mount a directory in a way that prevents user accessing it. However I need to have access to all attributes (including permission) from root. Is following method safe or is there a way ...
7
votes
3answers
5k views

How can you trim mp3 files using `ffmpeg`?

Here is a Linux audio MP3 puzzle that has been bugging me for awhile: How to trim the beginning few seconds off an MP3 audio file? (I can't get ffmpeg -ss to work with either 00:01 or 1.000 format) ...
4
votes
2answers
450 views

How to configure CONFIG_DEFAULT_RELATIME to disable relatime

Since linux 2.6.30, filesystems are mounted with "relatime" by default. In this discussion, Ingo Molnar says he has added the CONFIG_DEFAULT_RELATIME kernel option, which: makes 'norelatime' the ...
7
votes
1answer
806 views

barcode scanner input when running xorg and evdev

When I scan a barcode in a text console (CTRL+ALT+F1 or not running X) I get the correct input, but when I try with an application running on X, I don't get the correct barcode. The scanner is ...
8
votes
2answers
6k views

Cleancache vs zram?

I have an old laptop here with only 512 MB of RAM. Since a few kernel releases, I am using zram to convert 256 MB of it to a compressed ramdisk which is then used as swap. This has proved to be very ...
3
votes
2answers
2k views

py3compile error - Unable to get the locale encoding

After reinstalled the python3.2, I got the error as below when call py3compile: Fatal Python error: Py_Initialize: Unable to get the locale encoding LookupError: no codec search functions registered: ...
6
votes
6answers
5k views

How can I improve battery life in Fedora 15?

I am seeing a horrible battery life with Fedora 15 (lovelock) with Gnome Shell 3 on my laptop. I keep the screen brightness, back light pretty low. I still get about 1 hr 50 minutes battery life out ...
10
votes
3answers
3k views

How do I log into my Linux laptop if I have forgotten both the login and password?

How do I log into my Linux laptop if I have forgotten both the username and password?
2
votes
1answer
175 views

How can I configure a set of computers to netboot?

I have a number of machines which I'll be deploying in the near future. As suggested here, I could use network booting to get these computers online without even having a hard disk in them. According ...
4
votes
2answers
784 views

Output sound by writing to /dev/dsp

I know that it is possible to write arbitrary data into /dev/dsp and a noise will come up from the speakers. But whatever data I pass to this file the noise is the same. I wonder is it possible to ...
1
vote
1answer
354 views

Native and non-native support of thread/process programming in Linux?

POSIX thread (pthread) and OpenMP are both libraries for thread programming. But is it right that they are not native to Linux, i.e. they have to be installed by user later? If yes, what are the ...
3
votes
4answers
3k views

Recover files from corrupt DVD

I have a DVD+RW containing a lot of images and videos. Multiple DVD drives fail to read or mount it. I tried to follow this to try and recover the files using DVDisaster, and have created an iso file. ...
12
votes
8answers
3k views

How can I build a custom distribution for running a simple web browser?

You'll have to forgive me, as I'm relatively new at doing something like this, but I need to do the following and I know that it has and can be done. Basically, a few friends and me are assembling ...
1
vote
4answers
759 views

tee and grep at the same time (shell)?

I'm trying to run a server that writes to $log (a txt file) and then find all the text in the logfile that starts with '[1]' and put it in another file. Here's my attempt. tee -a $log works along with ...
4
votes
3answers
2k views

Recommended fstab settings

I made a new partition for my home drive by following this guide I have no idea what the fstab setting it suggests mean: UUID=???????? /home ext3 nodev,nosuid 0 2 I ...
2
votes
2answers
617 views

Transparent local proxy to many proxies

In Firefox is add-on FoxyProxy, which makes possible use many proxy with filtering URLs. I need it for any browser, but in many of them it is only possible to set one proxy server. I need a ...
4
votes
1answer
1k views

Linux support for new Sony Vaio Z external graphics card?

The new Sony Vaio Z series laptop comes with a media dock that has a USB connection (Light Peak) to an external AMD Radeon graphics card. What is the support for devices like this in Linux?
19
votes
4answers
5k views

What happens to the output of a process that has been disowned and lost its terminal?

If I close the virtual terminal, where some process was started, does the output just go straight to /dev/null, or can it pollute memory somehow? Can I anyhow grab the output to continue reading it at ...
3
votes
2answers
6k views

ACPI wakeup from keyboard/mouse via /proc/acpi/wakeup after suspend. How to find the correct device?

I'd like to wakeup my system via keyboard or mouse. This can be done via /proc/acpi/wakeup and a simple echo DEVNAME > /proc/acpi/wakeup my wakeup file looks like this Device S-state ...
3
votes
1answer
777 views

Hauppauge TV Tuner Card with Motorola STB and LIRC

I have a MythTV PV VM under Xen which I've spent about 2 weeks getting up and running. Everything seems to be working fine; PCI passthrough gives the card to the guest OS (OpenSUSE 11.4), the digital ...