E-Mail:

Dave Taylor

How to turn your Linux system into a DHCP server

I am planning to install DHCP on my Linux Server. I do not know that much in Linux (Red Hat), however. How can I install and configure a DHCP server on my system?
First off, a definition. DHCP is the Dynamic Host Configuration Protocol and rather than use the default DHCP server included with your Red [...]

How do I rotate files in Unix?

On Solaris I have cron job which creates some log files and it puts it under a directory, this directory name is created based on system date for example directory name are like 08162005, 08172005 so on..
What I need is I want to do a rotation for these log directories every 14 days since these [...]

What does “cat -” do?

Hello I would like to know the what exactly does cat - mean in Unix? I was recently reading through an article that mentioned this command and couldn’t understand what it did.
“cat” is the ‘concatenate’ program and its purpose is to display the contents of one or more file. Add the ‘-’ flag, however, [...]

How do I customize a script from “Wicked Cool Shell Scripts”?

Regarding script #41 (calculating available disk space), out of your book Wicked Cool Shell Scripts, I am unclear how I can have this script calculate the free space on one specific drive, namely /Volumes/Documents HD in my case.
I’d also love to know how I can automatically email the results of this same script, say [...]

How do I extract users from /etc/password in a shell script?

I am working on a script where I would like to grab the usernames out of the passwd file for a defined range of UIDs. For example I would like to pull the usernames for all users in /etc/passwd that are in the range of 5000-5999. Can you help?
While this task might initially [...]

How do I re-redirect stdin in a Unix or Linux shell script?

Hi Dave. I’m trying to create a shell script in HP-UX Unix that looks like this:
while read usrname
do
lsh $usrname
done < $file
and in lsh I added some error checks. If one occurs I ask the user to correct their input, but the code didn’t work that way and it continues to [...]

Redirecting input in a unix shell script?

I have several SCO Unix script that read a parameter from user input or otherwise I put the param within my script, such as ftp scripts and so on. How can I read those parameters from a file insted?
Example: I write an ftp script that will connect to a remote location and bring files, right [...]

Slackware Linux screen resolution problem?

I am using Slackware 10.1 GNU/Linux? OS and quite happy with that. Though I am an advance user, I am having a problem with that!
I want to set the screen resolution to 1152 X 864 with 75Hz Monitor VF that works well with dual boot Windows 2000 Pro. Currently Slackware shows, 800 x 600, 1024 [...]

Bootloader configuration for Ubuntu, Yellow Dog Linux and Mac OS X?

Dave, I’m following your setup for installing Ubuntu, Yellowdog, and OSX on a G4. I purchased a new secondary hard drive and have successfully installed OSX, Ubuntu Linux and Yellowdog Linux 4.0.1.
I’ve installed the three OS’s and have reached the step where Yellowdog now takes precedence over ubuntu and Ubuntu is no longer visible [...]

How can I hide passwords in a shell script?

We have to do sudo in a shell/perl scripts for certain commands. As you know sudo needs password to be supplied. sudo has -S option for stdin.
For example:
echo $pw | sudo -S command
Assume, somehow, we figure out the password and pass it in for the above echo. But, the buggest concern is, if [...]

How do I enable root login with ssh?

Dave, I’ve been using ssh like a good Internet citizen to connect to my remote server, but for security reasons the ISP has disabled root login from ssh on every server. Problem is, I really need to be able to log in as root occasionally. How do I re-enable it?

How do I delete all occurances of a file in Linux?

How can I delete one file from every place on my disk using Linux? In Windows’ I’d open up a command window and use the command
    del archive.txt /s
but what’s the Linux equivalent?

How Can I Quickly Create Millions Of Tiny Files In Linux?

Dave, I have searched the Web over and can’t seem to find an appropriate answer to this question. I have a need for a script that will create millions of 1-5Kbyte files in a Linux filesystem for testing purposes. I have to do this on a regular basis and it would be really cool to [...]

Where can I find the ‘rev’ command line utility?

Dave, I am a Sun Solaris sysadmin and really liked your book
Wicked Cool Shell Scripts. However, I don’t seem to find the “rev” utility on any of my Sun servers running Solaris 2.6, 7, 8, and even 9. I couldn’t find it on the sunfreeware.com site either. Could you tell me where I can find it?

Why do the fonts in Firefox Linux look so terrible?

Dave, Why is it that, “out of the box”, the Firefox browser looks great (font wise) when run on a Windows OS but looks terrible (almost too small and unreadable) on any Linux OS I have tried it on. It is probably the number one killer reason for me not switching to Linux.

How do I list files that don’t match a pattern?

Dave, I have a straightforward Linux question that’s got me stumped. I have a directory with lots of files that include an underscore, but I want to produce a listing of files that don’t have the underscore, not those that do have it. I can get it with a combination of ls, grep -v and [...]

How do I set up Mail Filters in Ximian Evolution on Linux?

I’ve been migrating to Ximian Evolution on my Linux box and I love it, but I haven’t been able to figure out how to set up all the mailing list rules I want to add to the program. Can you help me figure out how to set up a mailing list rule?

What’s acceptable syntax in Unix and Linux sh scripts?

Dave, I ran across your sites and Wicked Cool Shell Scripts book while trying to convince myself that `sleep 0` is a valid and relatively portable command to use freely in my unix shell scripts.

I looked at a few of the Bourne shell scripts and they seem to use constructs like $( … ) and [...]

40 queries / 1.958 seconds.