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

Command line FTP basics UNIX
If you're new to UNIX in general, and have only used programs like Fetch or Transmit as FTP tools in the past, you may find the command-line version of FTP quite daunting. There are times when you might want to use this, though, such as when remotely connected to your Mac, and you'd like to download some files locally.

Over in this MacFixit Forums thread, 'JohnBaxter' posted a nice overview of key commands to use when running FTP in a terminal session.
  Post a comment  •  Comments (1)  
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[15,125 views] Email Article To a Friend View Printable Version
Open directory windows from the Terminal UNIX
It's been fairly well covered that you can drag a file or directory into a terminal window to auto-type its path, but I haven't seen the corollary mentioned:

You can open a Finder window for the current working directory by entering open .
You can also open a window for the containing directory with
open ..

It's a very handy way to get at hidden files and paths without making them visible in the GUI.
  Post a comment  •  Comments (1)  
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[7,060 views] Email Article To a Friend View Printable Version
Launch mySQL at system startup UNIX
The following tutorial explains how to get mySQL (via safe_mysqld) started at system boot. "It took some time, but it's working now."

Read the rest of this article if you'd like your mySQL server to launch when you start your machine.

[Editor's note: I haven't installed this yet myself, but I will, and I'll comment back if I have any problems]
read more (219 words)   Post a comment  •  Comments (11)  
  • Currently 4.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[10,796 views] Email Article To a Friend View Printable Version
Finding UNIX commands using 'apropos' UNIX
As you get more adventurous in terminal mode, you may wish to explore UNIX commands to get your work done. There's a command called "apropos" that searches all the man(ual) pages for keywords, and voila, a list of appropriate commands appear.

BUT - OS X's "apropos" doesn't work until you establish a "whatis" database. How? Simple:

1) Start a terminal session and get into su mode (root).

2) Type the follow line exactly:
/usr/libexec/makewhatis

3) Wait several seconds for the root prompt to appear, and quit the terminal session.

Now, you can start a terminal session as yourself, and the "apropos" command will work. For more information about apropos, type "man apropos".

[Editor's note: I published a related tip quite a while back, but I'm sure not everyone has dug through all the pages, so I thought this was a good chance to bring it up again. Note that the makewhatis will also run if you leave your machine on regularly; it's part of a scheduled task that runs (if I recall correctly) weekly.]
  Post a comment  •  Comments (3)  
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[6,501 views] Email Article To a Friend View Printable Version
Boot into Aqua from single user mode UNIX
If you boot into single user mode [Editor: command-S at startup; this is the mode from which you can run a file system check, fsck] you can boot into Aqua/Finder by typing:

exit

This appears not to work if you've mounted the drive with write access. It also works if you've entered single user from Aqua by typing the following in the Terminal:

sudo shutdown now
  Post a comment  •  Comments (2)  
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[6,224 views] Email Article To a Friend View Printable Version
Fix for PHP bug reporting error UNIX
If you create a PHP page in Dreamweaver or similar Macintosh application, any bugs will be reported as being on line 1, no matter where they are. This is because the PHP parser is expecting Unix style line breaks. Since it doesn't find them, it thinks the entire page is all one line. This doesn't hurt the running of the PHP code, but it does make it very hard to find any typos or other bugs in the code.

The easiest way to fix this is to open the PHP document in BBEdit and Save As. Click on the OPTIONS button, and select Unix line breaks.

Also, if you are looking for a good SQL tutorial, with a live SQL server, check the following URLS:

www.sqlcourse.com
www.sqlcourse2.com
  Post a comment  •  Comments (1)  
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[2,368 views] Email Article To a Friend View Printable Version
Using multiple IP addresses for serving UNIX
IP aliasing allows your server (or more accurately your interface card) to respond to more than one IP address.

I like to use a mixture of header based IP and real or aliased IP addresses, meaning that a number of URL's point (in DNS) to the same IP number, and other URL's have their own IP address.

eg
www.foobar.com -> 174.32.3.52
www.foobar2.com -> 174.32.3.52
www.foobar3.com -> 174.32.3.52

www.different.com -> 174.32.3.60

To do this, your interface device has to recognise and listen for the different IP numbers. This is done via IP aliasing.

Using the ifconfig command in OSX/BSD appears to be different from Linux.

Instructions for the syntax to do this is over on the Stepwise site.

Linux instructions for IP aliasing are available at Linux Documentation Project

You will also need to add listen directives to the apache config file - this is covered else where on this site.
  Post a comment  •  Comments (0)  
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[2,935 views] Email Article To a Friend View Printable Version
How to launch a terminal app from the toolbar UNIX
For those of you out there that like to do M*ing (Moo, Mud, Muck, Mush, Cold, etc) there is a Unix program called TinyFugue that, to my knowledge, is the leading client for these types of games. This installs just fine on OSX and runs great. (You can go to FreshMeat to find TinyFugue)

I have found that if you just drag the file 'tf' (the TinyFugue app) to the Toolbar and click on it absolutely nothing happens.

Here is how you can get it working. You can go and Get Info on the 'tf' file itself, then 'Show Application' and set it to 'A specific application' and have it fire up Terminal. You will need to set it to show 'All Applications' and you will get a warning that it is not known if this application will launch up this file, but it works great.

I do not know if this works with all terminal based apps, but it did work for TinyFugue.

~jamie
  Post a comment  •  Comments (1)  
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[6,635 views] Email Article To a Friend View Printable Version
Darwin FreeBSD Ports Collection UNIX
rlucia writes: "Now we have some patches to The FreeBSD Ports Collection to make it working on Darwin 1.3 (as shipped with Mac OS X). I also patched pkg_* from FreeBSD source tree to use with Darwin. The work is at early stage but I could compile and install (also deinstall) lots of packages."

Check it out at Darwin pkg, Darwin ports or compiled packages files.
  Post a comment  •  Comments (1)  
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[5,499 views] Email Article To a Friend View Printable Version
How to run a compiled UNIX application UNIX
[Editor's note: See the comments for the answer]

I built a hello world simple application that built great. That simply means that it compiled. I did this in my home directory in a terminal application. It compiles to a.out. When I try to run this application it says I cannot find a.out. Any clues on how I can make this work?
  Post a comment  •  Comments (3)  
  • Currently 5.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[8,476 views] Email Article To a Friend View Printable Version