Some Unix Knowledge

Santiago

Registered
Hey Folks just signed in, great place.

I used to work on AIX PPC r6000 workstations for 2 years or so. So i am remembering commands I used back then.


Logging out from the terminal window:

kill -9 -1

To quit an application from the command line:

kill (Process Number from the Process viewer)

To open an app:

open (Name of App- Case sensitive in UFS)

to know the HD space taken by a directory, be inside that directory:

du -ks

Navigation:

cd (Directory Name) Exp: Moves you to that dir.

cd.. Exp: Moves you back one dir

ls Exp: Lists files in a directory.

ls -l Exp Lists files in a list with permisions visible, and size.

ls -al same deal but it will also show hidden files and

directories.

rm (File Name) Delete that file.

rm *.* *1= x file *2= extension ie: .bin .txt etc

This removes all the files with this extension in that directory.


mkdir (name) creates a directory with the name you

assign


rmdir (Dir Name) removes the directory with the

specified name.


ping (Network IP) Pings the IP you specify in

numbers. Might work with letters.


That is about it from what I now remember. I only wish I could edit the window colors like an X Term/ AIXTERM terminal window. If anybody knows please tell me, I have looked in the bundles but dont wanna mess up anything since it is in objective C or something.

Cheers












 
Yeah, you can corize the terminal windows!

There are really two ways to do it, one will colorize the window you are currently using, but that will go away when you close the window. If that is what you want, hit cmd-I (or select Inspector from the shell menu) then switch popup to color.

If you want to set defaults for all future terminal windows go to the "Terminal" window and select "preferences" then scroll down to color. :)
 
Is there a true X-windows implementation? In other words, can I use a Mac OS X enabled machine to run X-windows software on a Unix/Linux server?

For those of you who'd like to test this out, from the terminal window, log into a Unix machine and run xeyes

The commands are:

(on your macosxmachine)
xhost unixmachineaddress
ssh unixmachineaddress
(login)

setenv DISPLAY macosxmachineaddress:0.0
xclock &

(or xeyes, etc.)

If this works, I'll have to abandon my pursuit of an Intel/Linux machine and buy one of those cool looking cubes...
 
Don't ever try to run this command:

%kill -9 -1

Unless you want to get booted out your login session and all your work might not be saved. If this command is run, all your foreground/background process' , open applications, documents, etc, are killed/terminated.

To logout from your account on UNIX do:

%exit
OR
%logout

Or while on the same machine, just:

Command-q

 
Originally posted by express
Is there a true X-windows implementation? In other words, can I use a Mac OS X enabled machine to run
X-windows software on a Unix/Linux server?


The answer is no, sadly. Apple's "Quartz"/NeXTStep's Display Postscript are totally seperate graphics engines, and arn't compatible with the X Window System v11r6. I don't actually have OS 10 installed, (I'm an old Mac geek whose now working mostly with Unix (Solaris/Irix/BSD) and Linux) but I imagine that it should be easy to port existing free implementations as long as Apple provides C & Unix standard libraries. The do, I'm sure, if the OS X Terminal has any functional programs. There are plenty of xwindows display systems ('display servers', which usually seems backwards to the uninitiated) available for Macs, PCs, and allmost any other platform. The Mac version translates X graphics primitives into QuickDraw, and PC versions to GDI or DirectX... surely the same thing can be done with MacOS X & Quartz.

X Windows is wonderfully network transparent - and I use it constantly, of course - but even on an attached display, it's not well suited for hardware accelerated graphics. John Carmack has been critical of X Windows for a while - Quake 3 doesn't usually run well on linux, for instance, though the standard open source program (http://www.xfree86.org) has a new version (4) that is helping.

PS- Linux is a poor substitute for BSD. :) Really.
 
in case people that relatively new at this need help for some items in the console. The man command is a win, it opens the manual for the operation you are going to be running in the term. eg

[localhost:~] name% man tar
[localhost:~] name% man ftp
[localhost:~] name% man telnet

I believe that John Carmack has ported X Window onto OS X, I haven't seen it myself naturally, I would pay handsomely to be sitting in id's office, but it has been mentioned.
 
Carmack actually ported X-Windows to Darwin, the open-source kernel that is part of OS X. From what I've heard it's pretty stable... However, this will not let you run X-Windows under OS X (X-Windows + Darwin would be a completely seperate setup from OS X, which is Darwin + Aqua + etc.). To run X-Windows apps under OS X, check out the Tenon product mentioned in an earlier post. It runs apps seamlessly and even includes Aqua-like widgets for X-Windows.

-n8
 
i have a folder in my users section called My Documents. i tried typing "cd My Documents". it didn't work i tryed typing (My Documents), Mydocu~1, and nothng works... Whats the answer?

BoLinDilly
 
Originally posted by bolindilly
type cd "my documents"

(you need to put it in "quotes")

Or have the "\" (Otherwise known as backslash) to preceed the space between the two words.

 
You can also speed up accessing files from the command line by typing part of the name, then hitting the 'tab' key the rest of the name will be auto-entered. If you have typed something that has a few alternatives,pressing tab will list those and allow you to continue typing.

Eid
 
Eid's right. If you plan to use any Unix much, get used to hitting tab constantly. It's a life-saver!

I've got a question for all of you whose Unix knowledge dwarfs my own: Which shell is this that's currently running by default on OS X? Is it tcsh? Are there other shells installed, and if so how do I try them out?

Thanks!
 
Default shell is tcsh. Others are bash, zsh, csh, um... Couple of others, I think. Most people use tcsh or bash, anyway, so those are the ones that matter.
 
Originally posted by eisnel
Eid's right. If you plan to use any Unix much, get used to hitting tab constantly. It's a life-saver!

I've got a question for all of you whose Unix knowledge dwarfs my own: Which shell is this that's currently running by default on OS X? Is it tcsh? Are there other shells installed, and if so how do I try them out?

Thanks!

The default shell is tcsh.. If you ever want to know what shell you are running, you can type: echo $SHELL This will return the value and location of the currently running shell. I believe the other shells are zsh, csh, and tcsh (no bash unfortunatly!). I forgot how to switch shells (from the command line), I'll post if I remember.
Hope this helps.
 
Originally posted by eisnel
Eid's right. If you plan to use any Unix much, get used to hitting tab constantly. It's a life-saver!

I've got a question for all of you whose Unix knowledge dwarfs my own: Which shell is this that's currently running by default on OS X? Is it tcsh? Are there other shells installed, and if so how do I try them out?

Thanks!
[/QUOTE

Go to the command line, type "echo $SHELL" [minus the quotes] and press the return key. I'm betting the next thing on your screen will be tcsh. This is the name of the default shell. I don't know what other shells are installed as I don't own OS X yet. I've never paid for Beta software before and don't plan to start now.

Other shells that are available on the Internet are bash, zsh, csh, korn and some others that I don't recall.

If you plan on using tcsh a lot, I suggest you get the O'Reilly computer book _Using csh & tcsh_ by Paul DuBois (ISBN 1-565-992-132-1) as it's very good. There's also a website at http://www.primate.wisc.edu/software/csh-tcsh-book/
 
Hi,
while we are speaking of unix command line,
i was trying to compile a java applet with the command javac which is available but i end up with erros like class graphics not found.
Is the java compiler really usable under os X?
bye
 
Back
Top