Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Modify your terminal shell prompt UNIX
The tcsh shell (the one that launches when you start a terminal) has a prompt which looks like this:

[machinename:~] username%

You can modify the prompt with the set prompt = command (subtle, I know!). Over on the MacNN forums, this thread includes a great tutorial (written by blanalex) on how to generate some unique and useful prompt strings, including those with colored foregrounds and backgrounds.

I've reproduced the final how-to from the discussion in the remainder of this article, in case the MacNN posting goes away anytime soon.
read more (546 words)   Post a comment  •  Comments (9)  
  • Currently 2.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (4 votes cast)
 
[54,967 views] Email Article To a Friend View Printable Version
An intro to UNIX file permissions UNIX
If you're new to UNIX, the concept of file permissions can be somewhat daunting, to say the least. In a nutshell, permissions control who is able to do what to any given file or directory. It's important that they're properly set, otherwise certain things (such as CGI's for your web server, or shell scripts) may not work as you expect them to.

Read the rest of this article if you'd like an introduction to managing permissions in UNIX. Although quite detailed, this is not intended to be a complete education on file permissions; a good UNIX book is still recommended as the best way to further increase your knowledge.
read more (923 words)   Post a comment  •  Comments (4)  
  • Currently 1.40 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (5 votes cast)
 
[16,333 views] Email Article To a Friend View Printable Version
Adding users from the shell UNIX
"JasonB" has written two shell scripts which enable the addition and deletion of users to your OS X system from the command line. Normally this would be done in Netinfo, but the command line option is nice if you ever want to do this remotely.

His scripts and instructions can be found on this page of his web site.

I have not tried these yet personally, but there's no reason to believe they won't work.
  Post a comment  •  Comments (4)  
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (5 votes cast)
 
[5,346 views] Email Article To a Friend View Printable Version
Problems compiling UNIX
[Editor's note: See the comments for suggestions on making this work.]

What does it mean when running "make" gives lots of "nothing to be done for all" messages? I'm trying to compile Windowmaker-0.62.1 (Xfree86 for Darwin is installed and works) ...
./configure --host=powerpc-apple-nextstep
works, but "make" seems to fail.
  Post a comment  •  Comments (3)  
  • Currently 1.33 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (6 votes cast)
 
[3,549 views] Email Article To a Friend View Printable Version
Customize your SSH/telnet message UNIX
If you use SSH or telnet to connect to your OS X box remotely, you'll notice that you see Welcome to Darwin! every time you connect.

If you'd like it to say something more meaningful or entertaining, simply pick your favorite editor and edit
/etc/motd
Insert the message of your choice and save your changes. Now you'll be connecting to "Tom's Terrific G4 Tower of Terror!" instead of boring old Darwin!
  Post a comment  •  Comments (0)  
  • Currently 1.40 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (5 votes cast)
 
[7,211 views] Email Article To a Friend View Printable Version
GUI for UNIX crontab UNIX
crontab is a program that is used to schedule programs to run at certain intervals. It's used in OS X to schedule things like the updating of the index that makes "locate" and "whereis" function. You update crontab through a terminal session.

"anothermacguy" posted on the MacNN forums that he had found a GUI front-end for crontab. Sven Schmidt is the author, and you can find information and the program on his homepage.
  Post a comment  •  Comments (0)  
  • Currently 1.67 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (6 votes cast)
 
[10,370 views] Email Article To a Friend View Printable Version
ntpd under OSX UNIX
This one comes from a message posted by "Fred" to OmniGroup's "Mac OS X Admin" mailing list. He notes that if you open OSX's Date and Time system preferences panel and specify a time server to be used to keep the system clock synchronized, the built-in copy of ntpd will be started locally, which will enable other machines on the network to get correct time from your OSX machine.
  Post a comment  •  Comments (3)  
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (5 votes cast)
 
[15,892 views] Email Article To a Friend View Printable Version
Enabling anonymous FTP UNIX
Anonymous FTP allows guests to access your machine in a limited manner, to either upload or download files. You can put FTP links on web pages that connect the users directly to your anonymous site; it's a convenient way of giving them easy downloads.

Read on for step-by-step directions on how to set this up on your machine. Before proceeding with this one, you should be comfortable at the command line, and probably have at least some knowledge of users, groups, and permissions in UNIX.
read more (458 words)   Post a comment  •  Comments (26)  
  • Currently 1.80 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (5 votes cast)
 
[50,006 views] Email Article To a Friend View Printable Version
Mac vs. UNIX line breaks UNIX
If you're having trouble getting something to work right, and that something is based on a text file (for example, a Perl CGI script or a page of HTML), make sure you don't have any hidden Mac line breaks (also called line endings) in the file!

If you installed or modified the file using a GUI-based tool, there's a chance you accidentally inserted Mac line breaks. I know (from personal experience!) that Mac line breaks can make both Perl scripts and static HTML pages non-functional if they show up in the wrong spot. Read the rest to see how to find and remove the line breaks...
read more (141 words)   Post a comment  •  Comments (19)  
  • Currently 2.20 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (5 votes cast)
 
[73,213 views] Email Article To a Friend View Printable Version
How to compile a UNIX app for X UNIX
[Editor's note: Please see the comments for some useful suggestions]

I have been having some nagging difficulties compiling c code into X ... Can any one explain the full path to doing this this successfully ?

I mean this must be one of the most appealing aspects of OS X, the ability to run any shell based unix app.....if you could get it to actually work.... :-(

I keep getting the compiler demanding a machine type when using the ./configure command. However when I specify a system like BSD, Darwin, PPC or whatever nothing seems to work. A typical result is:
read more (70 words)   Post a comment  •  Comments (6)  
  • Currently 1.20 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (5 votes cast)
 
[11,022 views] Email Article To a Friend View Printable Version