12
votes
1answer
19k views

In bash is if [ -z “$1” ] and if [ “$1” = “” ] the same?

What is the difference between if [ -z "$1" ] and if [ "$1" = "" ] or are they the same? I have found my self writing the second one in some scripts, but then I read here that the -z flag ...
1
vote
1answer
267 views

Good graphics card for TV-Out

I am looking for a graphics card (AGP) with a TV-Out (SVideo or Composite) that is not a PITA with X. I guess it depends on the driver/X-Server. The card needs to be small and should not have a huge ...
4
votes
1answer
158 views

Building a kitchen appliance: stream, surf, touch screen, boot fast

I want to build an appliance for the kitchen. It is supposed to play music (files, streams, CDA), surf the web (recipe sites!), maybe play video (files and streams) display todays agenda during ...
1
vote
1answer
864 views

How to disable multiple logins in GNOME?

Basically, I want to disable multiple logins. The family laptop (not mine) has a problem with the x server -- at least it seems to be the x server. When two users are logged in simultaneously the ...
3
votes
2answers
9k views

How to generate grub.conf from scratch in Fedora 14?

It seems that I hit following bug in Fedora 14 - I deselected installing grub into the MBR while using the graphical installer, because I want to use an existing grub instance. Now, I want to look up ...
3
votes
2answers
589 views

Are packages cryptographically signed in Fedora 14?

I am installing Fedora 14 and I am wondering if the Fedora packages are cryptographically signed package signatures are checked by the installer by default package signatures are checked by yum when ...
2
votes
1answer
103 views

Does the Fedora installer not include default URLs for installation mirrors?

I installed Fedora 14 using a slightly non-standard method, i.e. loading the install media vmlinuz/initrd.img files via an existing grub2 instance. (I fetched them from a mirror). The installer works ...
1
vote
1answer
2k views

Wine cdrom mount locations on Linux Mint 10 (Ubuntu 10.10) — problems post install/switching discs

I've been trying to install a few windows games with wine on Linux Mint 10 (based on ubuntu 10.10), but I am finding that my cd-rom mount points aren't standard. ie: rather than /media/cdrom I get ...
2
votes
1answer
671 views

Blacklisting websites for certain users

This question is two part. First, If I had a list of websites that I would've liked to block. How do I tell my computer do to block those and any relevant subdomains? Secondly, How do I get this ...
10
votes
4answers
16k views

How can I make a program executable from everywhere

What should I do if I want to be able to run a given program regardless of my current directory? Should I create a symbolic link to the program in the /bin folder?
3
votes
4answers
328 views

Is there a way to redirect a file that is written

I have an application which I can not change, that writes to a big 250 GB plain text file. After compressing with GZ it is only 30 GB. This application has no option of compressing it's output, and ...
2
votes
3answers
2k views

messed up bottom panel - Fedora 14 KDE

I just started using Fedora 14 KDE (installed it yesterday). I'm coming from Windows, and the bottom "panel" was very convenient in its similarity to the Windows taskbar. Unfortunately, I clicked an ...
1
vote
2answers
889 views

All but MPlayer and VLC unable to play MP4 video?

I have a specific MP4 video file that plays fine in MPlayer and VLC, but other programs on my Arch Linux box (Banshee, Gnome's Movie Player) are unable to play it. Most seem to treat it as having zero ...
6
votes
3answers
2k views

AWK: wrap lines to 72 characters

$ awk 'length > 72' {HOW TO PRINT THE LINEs IN PCS?} msg ie I want it to add \n after 72 chars and continue, so initially you may need to remove all single \ns and the add them. It may be easier ...
10
votes
2answers
6k views

Calculate md5sum of a CD/DVD

I have an ISO file, which I burned to a CD. Now how can I check if the CD is correctly created? I would like a command that calculate the hash sum that I can use to check with the hash sum I calculate ...
2
votes
1answer
573 views

Can I alter my Fedora LVM LV to install a new distro as a dual-boot?

My question is almost a duplicate of this question, but not quite because that one is about ext3 and I am already using LVM. I have an older HP Pavilion laptop running Fedora 11. I chose Fedora ...
2
votes
1answer
1k views

TightVNC not running gnome-session

I have a Debian Lenny box with Gnome desktop. I've installed Tightvnc server on it and would like to see a Gnome session when connecting from another computer using VNC viewer. But for some reason it ...
8
votes
1answer
1k views

Why does the linux kernel use linux-libre code to get rid of binary blobs?

I ask this question because I'm curious as to whether there is some sort of performance advantage offered from the binary blobs that are in the Linux kernel. Since many of these blobs have been ...
5
votes
2answers
9k views

How do I extract a specific directory from a tarball? and strip a leading directory?

I want to extract a specific directory from the wordpress tarball. specifically wp-includes to .. It appears that the directory structure inside the tarball is wordpress/wp-includes but I just ...
3
votes
2answers
2k views

How to write a script to execute files in multiple directories

How do I write a script to execute the files in multiple directories? The problem is this: I have many directories, and each has a data file to be read and analyzed by a python script (say, a.py). I ...
1
vote
2answers
2k views

How to configure Kate to always use 2 spaces for tabulation?

By default Kate inserts 2 spaces on Tab press but switches to real tabs starting from the fourth Tab level. Can I disable this and use spaces always, regardless to the depth? I want this because I ...
4
votes
1answer
109 views

What is this construct in bash? mycommand(){dosomething;}

I actually found following one-liner on commandfu.com: cmdfu(){ curl "http://www.commandlinefu.com/commands/matching/$@/$(echo -n $@ | openssl base64)/plaintext"; } I have not come across a similar ...
4
votes
1answer
81 views

When I schedule a command with 'at', can I change where the output is mailed to?

When I schedule a job/command with at to be executed in the future, the standard output and error of the command is "mailed" to the user that did the scheduling. So after my job runs, I get a message ...
26
votes
3answers
7k views

How to pass parameters to an alias?

For bash script, I can use "$@" to access arguments. What's the equivalent when I use an alias?
2
votes
1answer
4k views

What repositories do I need to install heartbeat and haproxy on RHEL?

So I am now managing two RHEL machines that I need to install haproxy and heartbeat on. When I follow instructions to do so I get the following: [admin@p2378442 ~]$ sudo yum -y install heartbeat ...
20
votes
3answers
34k views

How to merge all (text) files in a directory into one?

I've got 14 files all being parts of one text. I'd like to merge them into one. How to do that?
5
votes
1answer
121 views

apt-get - How to complain on failed upgrade?

I'm trying to write a script to upgrade a bunch of remote machines and would like to verify that one package in particular is upgraded. With yum, I could say yum upgrade specific-package, and it ...
11
votes
6answers
9k views

How to stop cursor from blinking

How do I make the cursor stop blinking when in a TTY? (or anywhere else). BONUS Points for one universal setting that stops the cursor blinking almost everywhere.
3
votes
1answer
3k views

Find the disk-space usage of a directory and all it's files [duplicate]

Possible Duplicate: How to know the size of a directory? If I run ls -lh then any given directory is just shown as 4.0K. How can I can make it consider the files the directory refers to ...
2
votes
1answer
5k views

Bacula + bat on Ubuntu Maverick

Okay, so I have a goal, and I'm unsure of the best steps to take to get there. Goal: Set up a Linux VM in VirtualBox (Host: Windows Server 2008 R2) Setup Bacula in a Linux environment Get Bacula to ...
11
votes
3answers
596 views

version control for /etc under *BSD

What turnkey solutions exist to put /etc under version control, under various unices? Turnkey doesn't necessarily mean part of the base install, but the following features would be nice: hooks into ...
22
votes
4answers
25k views

Understanding the exclamation mark (!) in bash

I used history | less to get the lines of previous commands and from the numbers on the left hand side I found the line I wanted repeated (eg. 22) and did !22 at the command prompt and it ...
1
vote
1answer
347 views

Using find to find symlinks that point to a certain pattern of files

I have several directories that all have various symlinks in them. I want find (or another program) to find based on where the symlinks point to. For example this is how it currently works: ...
3
votes
2answers
723 views

Forcing emacs to run with `-nw` when called from terminal

note: This question might have been asked before ( I think I saw it somewhere), but a quick search did not reveal anything. I would like to tell the difference when a command is run from a shell. ...
13
votes
1answer
6k views

Number of files per directory

I have a directory with about 100000 small files (each file is from 1-3 lines, each file is a text file). In size the directory isn't very big (< 2GB). This data lives in a professionally ...
2
votes
1answer
673 views

Why are updates pushed to Fedora's updates-testing repos initially invisible?

I follow various bugs on Red Hat Bugzilla, and I just received a notification from the Fedora Update System that a new package was available for testing that supposedly fixes a bug I was interested ...
4
votes
5answers
7k views

How to do a print screen or capture an area of the screen

Is there an equivalent of the Window's Print Screen + Paste (or better yet the Mac OS Cmd+Shift+4, Space) in gnome?
7
votes
3answers
9k views

/etc/cron.daily/foo : Send email to a particular user instead of root?

I'm running CentOS 5.5. We have several cronjobs stored in /etc/cron.daily/ . We would like the email for some of these cronjobs to go to a particular email address, while the rest of the emails in ...
3
votes
2answers
329 views

Getting the number and names of windows in Xvfb

I am currently working with Xvfb to grab the screenshots of my programs. Is there a way to determine the number and the names of the windows that are currently "displayed" in Xvfb? Where can I find ...
1
vote
2answers
299 views

forwarding DHCP packets

I've got this configuration: WRouter ->(by wifi) Computer1 And I want to add another computer (computer2) connected by cable to computer1. Is it possible then to configure computer1 to forward ...
1
vote
1answer
237 views

No sound from cli apps or from zsnes

Some programs don't have sound, in particular ZSNES and anything I run from the command line. So my question has two parts: How can I diagnose this problem? (I'm thinking of a command like lspci ...
1
vote
1answer
434 views

How to get touchpad functional, again?

I messed something up and can't get my touchpad functional at all on GNOME 2.30 any more. I looked at Mouse Preferences on the Touchpad tab, and can't find the magic switch. The touchpad works on the ...
3
votes
2answers
3k views

How do I see what symlinks exist for a given directory?

I want to do some housekeeping in a directory, and I want to see if a given directory has any symlinks pointing to it. I can easily enough see what directory a symlink points to, but now I want to see ...
2
votes
1answer
1k views

How to uninstall RHEL from a dual-boot system?

I had RHEL 5 and WinXP on dual-boot and then from WinXP I deleted those partitions which were allocated to RHEL. Now I am not able to start my computer. The booting process stops at grub. I tried ...
2
votes
2answers
654 views

How to turn off permanent highlighting of all braces (not just pairs) in vim

I have no idea how I modified vim such that all braces are highlighted, not just matching ones, but I want to turn it off now. How do I do that? The usual highlighting of matching braces works fine.
3
votes
2answers
419 views

I need help with a cronjob to watch for runaway processes and kill them

I have an interesting situation, I have a runaway ruby process - I know exactly how I trigger it. Point is, it got me thinking about runaway processes (CPU usage or memory usage). How would one ...
9
votes
4answers
1k views

GRUB on USB Drive — adding OSes

Some Background: Coming from a largely Windows background (though I'm familiar with Ubuntu, etc.) and using a Windows 7 machine to complete this task Have gotten GRUB installed successfully to the ...
7
votes
2answers
1k views

red-green color blindness compatible vim theme

I am looking for a vim theme accessible to users with red green color blindness. In particular, the red text on a dark terminal background all but disappears. Do any of you know of a good theme? Or ...
5
votes
8answers
5k views

Find out if the OS is running in a virtual environment

Is there any way to find out if the OS I'm running (actually installing) is running in a VMWare machine. I need to disable ntp settings if the automated install is done on a virtual machine but keep ...
9
votes
2answers
804 views

What's the + in find /path/ -exec command '{}' + do?

What's the + in find /path/ -exec command '{}' + do? as opposed to find /path/ -exec command '{}' \;

15 30 50 per page