Re: Why does `df` lie about free space

2004-03-16 Thread Matthew Hunt
On Tue, Mar 16, 2004 at 02:31:11AM +0200, Kyryll A Mirnenko wrote:

>   So whats wrong with `df` (e.g. statfs/fstatfs)?

It's not a bug, any more than it was when you asked on Friday.

-- 
Matthew Hunt <[EMAIL PROTECTED]> * Salvage, like other forms of virtue, is
http://www.pobox.com/~mph/   * its own reward.  -George Reamerstaff
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: 'There are suspended jobs.'

2004-01-28 Thread Matthew Hunt
On Wed, Jan 28, 2004 at 03:28:13PM -0600, W. D. wrote:

> How do I find out which jobs are suspended, and how
> to un-suspend them?

Type "jobs".

The jobs will be listed, each having a number in brackets.  If you want
to un-suspend number 3, say "fg %3".

-- 
Matthew Hunt <[EMAIL PROTECTED]> * UNIX is a lever for the
http://www.pobox.com/~mph/   * intellect. -J.R. Mashey
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: showing total/free memory

2004-01-28 Thread Matthew Hunt
On Thu, Jan 29, 2004 at 08:03:46AM +1100, Rowdy wrote:

> I am setting up MRTG and at the moment I am parsing /var/run/dmesg.boot 
> and the output from `top -b -d 1` to get total and free memory 
> respectively, but I hope there is an easier way.

Try "vmstat" instead.

-- 
Matthew Hunt <[EMAIL PROTECTED]> * Clearly there are more things in the
http://www.pobox.com/~mph/   * heavens than anyone anticipated. -enp
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: umounting /

2003-12-11 Thread Matthew Hunt
On Thu, Dec 11, 2003 at 11:55:22AM -0800, Dan Strick wrote:

> (Why did you *want* to unmount the root?  To fsck it or dump it?)

Forcing it to be remounted read-only may help in such cases.

wopr:~# mount -u -o ro -f /
wopr:~# mount
/dev/da0s1a on / (ufs, local, read-only)
/dev/da0s1f on /home (ufs, local, soft-updates)
/dev/da0s1e on /usr (ufs, local, soft-updates)
mfs:20 on /tmp (mfs, asynchronous, local, nosuid)
procfs on /proc (procfs, local)

-- 
Matthew Hunt <[EMAIL PROTECTED]> * Salvage, like other forms of virtue, is
http://www.pobox.com/~mph/   * its own reward.  -George Reamerstaff
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Recursion with grep?

2003-11-13 Thread Matthew Hunt
On Thu, Nov 13, 2003 at 02:55:34PM -0800, Chris Readle wrote:

> You can also do this with something like:
> 
> ls -laR | egrep *.c

He's trying to search the contents of files for a string.  Your
suggestion searches the directory listing (and not in a very useful way,
since *.c does not mean the same thing as a regular expression as it
does as a wildcard, and it could also match parts of the "ls -l" output
besides the filename).

-- 
Matthew Hunt <[EMAIL PROTECTED]> * Stay close to the Vorlon.
http://www.pobox.com/~mph/   *
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Recursion with grep?

2003-11-13 Thread Matthew Hunt
On Thu, Nov 13, 2003 at 05:37:39PM -0500, Francisco Reyes wrote:

> The man page for grep says to use "-r" to recurse, yet when I try
> something like
> 
> grep -r -li string *.c
> 
> I get no files. However, if I go into one of the subdirectories and do a
> plain grep  *.c then  is found on several files.

When using "-r", the arguments to grep should be directories.  It will
process all of the files in the given directories, recursively.  There is
no provision for searching a subset of the files (i.e. "*.c).  If you
need to do that, use find and xargs.

-- 
Matthew Hunt <[EMAIL PROTECTED]> * UNIX is a lever for the
http://www.pobox.com/~mph/   * intellect. -J.R. Mashey
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: complex crontab query

2003-09-30 Thread Matthew Hunt
On Tue, Sep 30, 2003 at 10:56:20PM +0200, Kai Grossjohann wrote:

> My understanding is that putting more than one condition in it
> performs a logical conjunction.  So wouldn't it work to do like this?
> 
> # minute hour dom month dow command
> 031-7 * 4   mycommand

I thought that might be the case, but the man page says:

# Commands are executed by cron(8) when the minute, hour, and month of
# year fields match the current time, and when at least one of the two
# day fields (day of month, or day of week) matches the current time
# (see ``Note'' below).

...

# Note: The day of a command's execution can be specified by two fields
# -- day of month, and day of week.  If both fields are restricted (ie,
# aren't *), the command will be run when either field matches the
# current time.  For example, ``30 4 1,15 * 5'' would cause a command
# to be run at 4:30 am on the 1st and 15th of each month, plus every
# Friday.

-- 
Matthew Hunt <[EMAIL PROTECTED]> * Salvage, like other forms of virtue, is
http://www.pobox.com/~mph/   * its own reward.  -George Reamerstaff
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: complex crontab query

2003-09-30 Thread Matthew Hunt
Here are untested examples that I think should work.  They run the job
at 3:00 am (the first two fields).

On Tue, Sep 30, 2003 at 07:49:57PM +0300, Odhiambo Washington wrote:

> 1. 3rd day and 28th day of each month (seems easy)

0  3  3,28  *  *  mycommand

> 2. Every first Thursday of the month

0  3  1-7   *  *  [ `date +%a` = Thu ] && mycommand

-- 
Matthew Hunt <[EMAIL PROTECTED]> * Science rules.
http://www.pobox.com/~mph/   *
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Re:Re: Cat a directory

2003-09-22 Thread Matthew Hunt
On Mon, Sep 22, 2003 at 09:06:00AM +0300, Karlsson Mikael HKI/SOSV wrote:

> Try to run for example "cat /bin" in Linux, HP-UX, Solaris and other
> *NIXes and I'm 90% certain that they will not show the directory but
> an error message saying something.

"cat /bin" on Solaris 9 does exactly the same thing as on FreeBSD; shows
the contents of the directory, just like you're asking it to.  Just because
you can't fathom a use for this behavior doesn't mean it's wrong.  If
you don't want to see it, don't ask "cat" to show it to you.

-- 
Matthew Hunt <[EMAIL PROTECTED]> * Science rules.
http://www.pobox.com/~mph/   *
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Newbie - CD Burning Question

2003-09-03 Thread Matthew Hunt
On Wed, Sep 03, 2003 at 02:20:51PM -0700, Tony Pagliocco wrote:

> The command I am using is 
> 
> # burncd -f /dec/acd0c data /home/www/directory fixate

Should be "dev", not "dec".  Is this just a typo in your email, or were
you really typing "dec"?  If you were, maybe that explains the error.

> What I want to do is copy a whole directory and burn it
> to my cd-rom

You can't do that directly.  You need to make an "image" of the CD-ROM
before you burn it; you can use "mkisofs" from the Ports Collection to
do this.

Basically, you can say:

# mkisofs -o image.iso /home/www/directory
# burncd -f /dev/acd0c data image.iso fixate

Note that image.iso will be approximately as large as the sum of all
the files are going onto the CD.

-- 
Matthew Hunt <[EMAIL PROTECTED]> * UNIX is a lever for the
http://www.pobox.com/~mph/   * intellect. -J.R. Mashey
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Cannot install any port

2003-07-28 Thread Matthew Hunt
On Sat, Jul 26, 2003 at 12:27:03AM -0500, Dan Nelson wrote:

> You sure?  Are you failing with this error:
> 
>  ===>  Checking if portd/portname already installed
>  *** Error code 1
> 
> This is almost certainly caused by an old pkg_info command that does
> not understand -O.  To disprove me:

As I've posted before, the problem is not always as simple as it's made
out to be.  When I upgraded to 4.8-STABLE, I still got that error.  It
was because of a corrupt directory in /var/pkg/db, which was causing
pkg_info -O to abort before finishing.  Running the failing "pkg_info -O
whatever" command by hand made the problem visible, and I deleted the
bad directory.

-- 
Matthew Hunt <[EMAIL PROTECTED]> * Clearly there are more things in the
http://www.pobox.com/~mph/   * heavens than anyone anticipated. -enp
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: spamassassin slow to process messages

2003-07-07 Thread Matthew Hunt
On Tue, Jul 08, 2003 at 09:08:37AM +1000, Andrew Thomson wrote:

> I've got a CPU: Pentium III/Pentium III Xeon/Celeron (930.32-MHz
> 686-class CPU) and I'm seeing performance like,
> 
> Jul  8 08:25:11 athomson spamd[52016]: clean message (0.4/5.0) for
> ajt:1001 in 10.2 seconds, 2132 bytes. 

Well, that's pretty bad.  I see:

Jul  7 04:05:49 wopr spamd[66708]: identified spam (8.4/5.0) for mph:501 in 4.0 
seconds, 1206 bytes. 
Jul  7 04:08:18 wopr spamd[66726]: clean message (-5.3/5.0) for mph:501 in 7.1 
seconds, 2553 bytes. 

This is on a Cyrix 6x86 (166 MHz 486-class CPU) with no L2 cache.  :-)

Is the machine heavily loaded with other work?  Assuming that there are
no messages between the ones you posted, it doesn't look like the machine
is overburdened by mail alone.

-- 
Matthew Hunt <[EMAIL PROTECTED]> * Science rules.
http://www.pobox.com/~mph/   *
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Disable PING command

2003-07-03 Thread Matthew Hunt
On Thu, Jul 03, 2003 at 03:02:22PM -0700, K Anderson wrote:

> Well, all I have to do then as a user who can't run ping is get it from 
> someplace else and just do ./ping in my home directory. Correct? Or even 
> use a perl script to do it. If that's possible.

No.  Normal users can't create the raw sockets that ping needs to work.
A ping executable, no matter where it came from, is not going to work unless
it's suid root (or run by root).  Normal users obviously cannot mark an
executable suid root.

> The above example then becomes pointless and the poster did ask to 
> disable it or get rid of it all together. Just shutting down the 
> /sbin/ping isn't enough. That's all I am saying. :)

You're wrong.  You would be right if we were talking about lots of other
programs, but not ping.

-- 
Matthew Hunt <[EMAIL PROTECTED]> * Science rules.
http://www.pobox.com/~mph/   *
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Disable PING command

2003-07-03 Thread Matthew Hunt
On Thu, Jul 03, 2003 at 02:03:57PM -0700, K Anderson wrote:

> Good luck. All it takes is a user to port, transfere, compile, copy, 
> move or hack in a ping command of their own. Any languages could be 
> used, PERL, PHP, Python and much more.

Well, it takes that along with making their copy SUID root, which they
presumably can't do.

wopr:~$ sudo chmod u-s /sbin/ping
wopr:~$ ping wopr
ping: socket: Operation not permitted
wopr:~$ sudo chmod u+s /sbin/ping
wopr:~$ ping wopr
PING wopr.caltech.edu (131.215.103.10): 56 data bytes
64 bytes from 131.215.103.10: icmp_seq=0 ttl=64 time=0.240 ms

-- 
Matthew Hunt <[EMAIL PROTECTED]> * Science rules.
http://www.pobox.com/~mph/   *
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: mac file to unix format

2003-02-26 Thread Matthew Hunt
On Wed, Feb 26, 2003 at 02:10:51PM -0600, Bryan Cassidy wrote:

> I have found many Mac wallpapers online that are in .sit format and I
> was wondering if there was a way I could convert a .sit file to say a
> .png file so I could use the image on freebsd 5?

.sit is Stuffit, an archiver/compressor similar to zip, or tar+gzip.
You'll need to extract the file(s) in the archive and see what graphics
format they're really in.

Take a look at /usr/ports/archivers/stuffit.  I don't know if it works
with all Stuffit files or not (e.g. it may be outdated).

-- 
Matthew Hunt <[EMAIL PROTECTED]> * Eight lanes of shimmering cement from
http://www.pobox.com/~mph/   * here to Pasadena!

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message


Re: OT: MUTT folders

2003-02-19 Thread Matthew Hunt
On Wed, Feb 19, 2003 at 03:36:35PM -0600, Brian Henning wrote:

> i have been reading throught the file /usr/local/share/doc/mutt/manual.txt and i
> cannot figure out how to change which folder i am reading. i have some mail
> folders in ~/Mail that i cannot figure out how to access from mutt...

Hit "c".  Type the name of the folder.  (You can say "=blah" as a shortcut
for "~/Mail/blah".)

-- 
Matthew Hunt <[EMAIL PROTECTED]> * Science rules.
http://www.pobox.com/~mph/   *

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message



Re: PS1 command! ?

2003-02-12 Thread Matthew Hunt
On Thu, Feb 13, 2003 at 10:01:58AM +1030, [EMAIL PROTECTED] wrote:

> *) PS1="$(PS1)S ";;

> Yet on login I get this error message:
> bash: PS1: command not found

$(foo) is the same as `foo`.  It runs the command "foo" and uses its
output.  So the shell is looking for a command called PS1.

You want ${PS1} (curly braces, not parentheses).  I think your mind has
been tainted by Makefiles which use $(foo) for variable substitution.

-- 
Matthew Hunt <[EMAIL PROTECTED]> * Science rules.
http://www.pobox.com/~mph/   *

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message



Re: how to delete a file called ????

2003-02-12 Thread Matthew Hunt
On Wed, Feb 12, 2003 at 12:59:18PM -0800, Kent Stewart wrote:

> I had always used the -i to go along with it. I tried it with ??? and 
> abc and a "rm -- ???" deleted both files, which wasn't what I expected 
> if wildcarding was turned off with the "--".

WILDCARD PROCESSING IS NOT TURNED OFF WITH "--".

Sorry for yelling, but every time someone asks about removing a file with
an odd name, wrong notions like this one surface.

In Unix, wildcard processing is handled by the shell, not the program you're
running.  The program you're running gets the wildcard-expanded filenames,
and has no idea whether you used a wildcard or typed them by hand.  (This
explains why "mv *.foo *.bar" does not work the way a DOS user would expect
it to.)

"--" is an option processed by rm, just like "-r" or "-i".  It tells rm
to stop processing further options (i.e. treat arguments that start with "-"
as filenames rather than options.)  It has nothing to do with wildcard
processing, because the wildcards have already been expanded by the time
rm even has a chance to weigh its options.

"--" is the answer to "How do I delete a file called -i" not "How do I
delete a file called ???".  But some people seem to think they're all the
same question.

As I've mentioned before in this thread, it's completely possible that
the file doesn't even have question marks in its name, anyway, because
ls will display unprintable characters as question marks.

-- 
Matthew Hunt <[EMAIL PROTECTED]> * UNIX is a lever for the
http://www.pobox.com/~mph/   * intellect. -J.R. Mashey

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message



Re: how to delete a file called ????

2003-02-12 Thread Matthew Hunt
On Wed, Feb 12, 2003 at 02:21:43PM -0500, parv wrote:

>  find . -inum $( /bin/ls -i | fgrep '?' | awk '{print $1}' ) -print0 \
>  | xargs -0 rm -f

I'm going to go out on a limb and guess that the filename does not really
consist of question marks, but rather of unprintable characters that ls
displays as '?'.  Note:

# Note that ^A is a literal control-A, typed with control-V control-A
$ echo > ^A
$ ls
?

I recommend finding the inode number of the offending file:

$ ls -li
total 1
1238024 -rw-rw-r--  1 mph  mph  1 Feb 12 12:07 ?

The inode number in this case is 1238024.  Then you can double-check and
delete it with find:

$ find . -inum 1238024 
./+
$ find . -inum 1238024 -delete

(Note that find displays the name differently from ls.  It looks like a
bold "+" in my xterm.)

-- 
Matthew Hunt <[EMAIL PROTECTED]> * Inertia is a property
http://www.pobox.com/~mph/   * of matter.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message



Re: spamassassin port ...

2002-11-14 Thread Matthew Hunt
On Thu, Nov 14, 2002 at 01:42:15PM -0800, Gary W. Swearingen wrote:

> If 
> whereis string
> locate -i string
> find /usr/ports/ -iname '*string*'
> portinstall -n ':[sS][tT][rR][iI][nN][gG]'
> 
> won't find a port, it can usually be found with "grep" or an editor in
> "/usr/port/INDEX".

Or,

$ cd /usr/ports
$ make search key=spamassassin

-- 
Matthew Hunt <[EMAIL PROTECTED]> * Stay close to the Vorlon.
http://www.pobox.com/~mph/   *

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message



Re: changing build options for ports

2002-10-31 Thread Matthew Hunt
On Thu, Oct 31, 2002 at 02:13:37PM -0700, Soren Harward wrote:

> "you know, theres gotta be a better way to set these options than
> editing the Makefile".  What is the "best common practice" to set
> these options?

make -DWITHOUT_X11

For pararmeters whose value is important, say something like:

make PREFIX=/opt

-- 
Matthew Hunt <[EMAIL PROTECTED]> * Salvage, like other forms of virtue, is
http://www.pobox.com/~mph/   * its own reward.  -George Reamerstaff

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message



Re: Wondering about mail clients (specific features)

2002-09-26 Thread Matthew Hunt

On Thu, Sep 26, 2002 at 03:38:35PM -0500, Oscar Ricardo Silva wrote:

> my sanity I filter incoming mail from each list into its own mailbox.  I've 
> tried using pine with procmail and mail is filtered properly but I don't 
> know that there is new mail in mailboxes other than "In".
> 
> Is there something I'm missing in pine that will do this?  Are there other 
> mail clients that will notify you when new mail has been received and 
> placed in a mailbox other than "IN" ?

Yes, mutt will do this.  You need to add a line in your ~/.muttrc like
this:

mailboxes /var/mail/blah =donuts =wombatsex =flagellation

(The names of your incoming mailboxes may differ, depending on your
interests.  The = sign means the folder is in your ~/Mail directory.
There's probably some knob to change that, too.)

-- 
Matthew Hunt <[EMAIL PROTECTED]> * Clearly there are more things in the
http://www.pobox.com/~mph/   * heavens than anyone anticipated. -enp

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message