Forums | MacLife

You are not logged in.

#1 2002-12-22 1:13 pm

adndgamer
Member
From: Stevens Point, Wisconsin
Registered: 2000-03-25
Posts: 4947
Website

What happened to the cal command?

I tried running cal, the little command line calendar program, and I get an error message:

Code:

[quicksilver:~] unixgeek% cal
/usr/bin/cal: Exec format error. Binary file not executable.

Can anybody help me out?


Unix-fu.com: *nix, perl, D&D, and other geekiness.

Blog

Offline

 

#2 2002-12-22 2:24 pm

Buzzword
Member
From: college, ny
Registered: 1999-03-21
Posts: 7255

Re: What happened to the cal command?

Huh.  What was the last thing you did before it stopped working?  It could be that the file just got corrupted somehow and you'll need a new copy.  The only other thing I can think of, and I don't think it'd work, is to run "chmod a+x /usr/bin/cal" on it.


Just another CitiBank hacker...

Offline

 

#3 2002-12-22 2:29 pm

Buzzword
Member
From: college, ny
Registered: 1999-03-21
Posts: 7255

Re: What happened to the cal command?

I did a bit more research... wait, did this ever work for you?  From the looks of it, it seems like you're trying to run cal on the wrong system (see http://www.cdf.toronto.edu/cdf/linuxfaq.html#USING4 , though the specific Linux/Solaris thing might not apply for you).  You might have gotten the wrong version.

A couple background questions:  Which *nix distro are you running?  Where did you download cal from?  Did you compile it, or download an installer, and if an installer, do you know which?


Just another CitiBank hacker...

Offline

 

#4 2002-12-22 2:56 pm

adndgamer
Member
From: Stevens Point, Wisconsin
Registered: 2000-03-25
Posts: 4947
Website

Re: What happened to the cal command?

Sorry, shoulda posted more info.

This is on a Mac OS X.  It worked last time I remember using it (which was at least before 10.2.3).

I tried doing chmod a+x /usr/bin/cal

Code:

[quicksilver:~] unixgeek% chmod a+x /usr/bin/cal
Segmentation fault

I think I'm just going to find another copy of it and replace it.

Thanks smile


Unix-fu.com: *nix, perl, D&D, and other geekiness.

Blog

Offline

 

#5 2002-12-22 2:58 pm

Buzzword
Member
From: college, ny
Registered: 1999-03-21
Posts: 7255

Re: What happened to the cal command?

huh, that's odd that it would stop working, then.  Yeah, sounds like somethign just got fuddled.  Good luck :-)


Just another CitiBank hacker...

Offline

 

#6 2002-12-22 6:40 pm

adndgamer
Member
From: Stevens Point, Wisconsin
Registered: 2000-03-25
Posts: 4947
Website

Re: What happened to the cal command?

Thanks. Anybody wanna post a copy of their cal program, found in /usr/bin/ ?

big_smile


Unix-fu.com: *nix, perl, D&D, and other geekiness.

Blog

Offline

 

#7 2002-12-22 7:26 pm

GUI
Chief Dolt
Royal Wombat
From: NC
Registered: 1999-06-08
Posts: 4828
Website

Re: What happened to the cal command?


Hard work may not kill you, but why take chances?

Offline

 

#8 2002-12-26 12:27 am

adndgamer
Member
From: Stevens Point, Wisconsin
Registered: 2000-03-25
Posts: 4947
Website

Re: What happened to the cal command?

http://www2.nickm.org:8080/temp/cal.tar.gz

Thanks, but it seems I must of come too late.  It must of been taken down.

However, I have noticed the same thing happening with other programs, such as ping.

I'm going off to the Apple Discussion Boards to see if anybody else has this problem.

Thanks again guys smile


Unix-fu.com: *nix, perl, D&D, and other geekiness.

Blog

Offline

 

#9 2002-12-26 3:14 pm

GUI
Chief Dolt
Royal Wombat
From: NC
Registered: 1999-06-08
Posts: 4828
Website

Re: What happened to the cal command?

Due to stupidity my server is unavailable until I can find a power adapter for my router. Sorry about that.


Hard work may not kill you, but why take chances?

Offline

 

#10 2002-12-27 7:30 pm

[MA] Flying_Meat
Member
From: Frisco?
Registered: 2001-03-31
Posts: 8350

Re: What happened to the cal command?

looks like it's there but the executable attribute got turned off er something.

Do "ls -l /usr/bin/cal"

It should look like this:
-r-xr-xr-x   1 root     wheel       14328 Dec 19 14:37 cal

All the x's need to be there.


...and watch out for the flying meat!

Offline

 

#11 2002-12-28 4:18 am

adndgamer
Member
From: Stevens Point, Wisconsin
Registered: 2000-03-25
Posts: 4947
Website

Re: What happened to the cal command?

Code:

[localhost:~] unixgeek% ls -l /usr/bin/cal
-r-xr-xr-x  1 root  wheel  14328 Dec 19 22:01 /usr/bin/cal

Any ideas?


Unix-fu.com: *nix, perl, D&D, and other geekiness.

Blog

Offline

 

#12 2002-12-28 4:46 am

Buzzword
Member
From: college, ny
Registered: 1999-03-21
Posts: 7255

Re: What happened to the cal command?

No, from the look of the error, my [relatively uninformed] opinion would be that it's not an attribute problem, because the terminal correctly recognizes that it should be executable.  Otherwise it would say "Permission denied".  I think that for some reason, that executable got corrupted, or is otherwise not readable by your kernel.  What confuses me is why this might happen.

Btw, my cal binary is smaller than yours, nya nya! tongue


Just another CitiBank hacker...

Offline

 

#13 2002-12-29 2:46 am

adndgamer
Member
From: Stevens Point, Wisconsin
Registered: 2000-03-25
Posts: 4947
Website

Re: What happened to the cal command?

I just can't figure out how they would of gotten corrupted.  I might try reinstalling the Dev tools cd.  Not sure if that will work.  I didn't see anything at the Discussion boards at Apple, but then again I could have just missed it.

Ah well...


Unix-fu.com: *nix, perl, D&D, and other geekiness.

Blog

Offline

 

#14 2003-01-01 9:22 pm

adndgamer
Member
From: Stevens Point, Wisconsin
Registered: 2000-03-25
Posts: 4947
Website

Re: What happened to the cal command?

Well, I had another problem and so reinstalled 10.2.

Everything works good now.  cool


Unix-fu.com: *nix, perl, D&D, and other geekiness.

Blog

Offline

 

#15 2003-01-01 11:07 pm

Buzzword
Member
From: college, ny
Registered: 1999-03-21
Posts: 7255

Re: What happened to the cal command?

wierd...


Just another CitiBank hacker...

Offline

 

#16 2003-01-02 6:53 pm

adndgamer
Member
From: Stevens Point, Wisconsin
Registered: 2000-03-25
Posts: 4947
Website

Re: What happened to the cal command?

Yeah. I'm pretty sure it was just 10.2.3 that messed with it.


Unix-fu.com: *nix, perl, D&D, and other geekiness.

Blog

Offline

 

#17 2003-01-08 12:44 pm

luserpete
Member
Registered: 2002-09-25
Posts: 83

Re: What happened to the cal command?

i have 10.2.3 installed and my cal command works perfectly fine.

Offline

 

#18 2003-01-09 12:34 am

[MA] Flying_Meat
Member
From: Frisco?
Registered: 2001-03-31
Posts: 8350

Re: What happened to the cal command?

same here.


...and watch out for the flying meat!

Offline

 

#19 2003-01-11 7:23 pm

c.i.t
the human windmill!
From: MA.
Registered: 2001-04-08
Posts: 469
Website

Re: What happened to the cal command?

chmod 255 it.

If that doesn't work for some weird reason, download it off of me: http://homepage.mac.com/oddball/cal.sit
(you might have to chmod 255 it aswell...)


This is not real life. This is text.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson