|
|
#1 |
|
Prospect
Join Date: Jun 2002
Location: Connecticut, U.S.A.
Posts: 40
|
Broken "head"
It would seem that my "head" command is broken. Not sure when it happened, I believe it was after I installed the latest Perl. For example here is what happens :
joe% sudo sh /etc/daily daily run output Removing scratch and junk files: rm: ./Mount01: is a directory rm: ./Mount02: is a directory rm: ./Mount03: is a directory rm: ./Mount04: is a directory rm: ./vi.recover: is a directory rm: ./zBooterMnt: is a directory Backing up NetInfo data Checking subsystem status: disks: Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/disk1s2 39085800 8336896 30492904 21% / fdesc 1 1 0 100% /dev /dev/disk0s2 10032204 3344568 6687636 33% /Volumes/backup Last dump(s) done (Dump '>' file systems): mail: /etc/mail/sendmail.cf: line 93: fileclass: cannot open '/etc/mail/local-host-names': Group writable directory network: Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll lo0 16384 <Link#1> 8099 0 8099 0 0 lo0 16384 127 localhost 8099 - 8099 - - gif0* 1280 <Link#2> 0 0 0 0 0 stf0* 1280 <Link#3> 0 0 0 0 0 en1 1500 <Link#4> 00:30:65:1f:19:d2 73367 0 51740 0 0 en1 1500 fe80:4::230 fe80:4::230:65ff: 73367 - 51740 - - en1 1500 10.0.1/24 10.0.1.2 73367 - 51740 - - en0 1500 <Link#5> 00:30:65:57:e5:aa 0 0 0 0 0 en0 1500 fe80:5::230 fe80:5::230:65ff: 0 - 0 - - ruptime: no hosts in /var/rwho. Rotating log files: system.logUnknown option: 1 Usage: head [-options] <url>... -m <method> use method for the request (default is 'HEAD') -f make request even if head believes method is illegal -b <base> Use the specified URL as base -t <timeout> Set timeout value -i <time> Set the If-Modified-Since header on the request -c <conttype> use this content-type for POST, PUT, CHECKIN -a Use text mode for content I/O -p <proxyurl> use this as a proxy -P don't load proxy settings from environment -H <header> send this HTTP header (you can specify several) -u Display method and URL before any response -U Display request headers (implies -u) -s Display response status code -S Display response status chain -e Display response headers -d Do not display content -o <format> Process HTML content in various ways -v Show program version -h Print this message -x Extra debugging output kill: usage: kill [-s sigspec | -n signum | -sigspec] [pid | job]... or kill -l [sigspec] everything looks ok, except for the broke head. Thanks in advance. joe I'm on a G4/400 running OS X 10.2.1 if that helps. Developer tools that came with Jag are installed. I use CPAN to install Perl modules. |
|
|
|
|
|
#2 |
|
League Commissioner
Join Date: Jan 2002
Posts: 5,536
|
that doesn't look like the /usr/bin/head command.
what is your path? what does % which head say? i'd say that your path has a dir entry ahead of /usr/bin and it contains an executable named head in it that shouldn't be in the mix. |
|
|
|
|
|
#3 |
|
Prospect
Join Date: Jun 2002
Location: Connecticut, U.S.A.
Posts: 40
|
Hi Merv,
here's the info joe% echo $path /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/vscanx joe% which head /usr/bin/head what does that say about the problem? Joe |
|
|
|
|
|
#4 |
|
Site Admin
Join Date: Jan 2002
Location: Montreal
Posts: 32,473
|
I suspect HEAD (not head)
I suspect that this is a difficulty with the case-insensitivity of the HFS file system. I seem to recall that some Perl module installed a sym-link in /usr/bin called "HEAD" which made an HTTP HEAD request. Of course this overwrites the "head" program that is in /usr/bin
If this is the case, your solution is to use Pacifist (or other utility) to grab "head" from the CD and put it back. (Change HEAD to some other name if you want to keep it.) |
|
|
|
|
|
#5 |
|
Prospect
Join Date: Jun 2002
Location: Connecticut, U.S.A.
Posts: 40
|
Thanks I'll give it a try and report back tomorrow evening.
joe |
|
|
|
|
|
#6 | |||||||||||||||||||
|
League Commissioner
Join Date: Jan 2002
Posts: 5,536
|
Re: I suspect HEAD (not head)
thanks, hayne. good catch. always review 3rd party installs for rogue stomps {sigh} -- conventions are great! everybody has one! |
|||||||||||||||||||
|
|
|
|
|
#7 | |||||||||||||||||||
|
Major Leaguer
Join Date: Jan 2002
Location: Adelaide, South Australia
Posts: 470
|
That'll be LWP (library for www programming in perl). I'm almost definite that the latest version of that (group of) module(s) doesn't let the head-banging occur. Hang on...
Yep, things go in /usr/local/bin now, as per this entry in the "Changes" file for "libwww-perl-5.65" distribution.
So now you can have it all: get your head from /usr/bin and get HEAD in /usr/local/bin. Ooh aah! Cheers, Paul |
|||||||||||||||||||
|
|
|
|
|
#8 |
|
Prospect
Join Date: Jun 2002
Location: Connecticut, U.S.A.
Posts: 40
|
Broken head is fixed!.
Thanks a bunch gang. I was able to rm the offending HEAD and cp the correct head from the Jag install disk to my /usr/bin. Now all is well. For general info it was LWP that caused the problem.
I'm really learning a lot from everyone here. Joe |
|
|
|
![]() |
|
|