View Single Post
  #1  
Old October 7th, 2001, 04:06 PM
AdmiralAK's Avatar
AdmiralAK AdmiralAK is offline
Simply Daemonic
 
Join Date: Oct 2000
Location: Classified
Posts: 5,787
Thanks: 0
Thanked 0 Times in 0 Posts
AdmiralAK is on a distinguished road
HOW-TO: UNIX basics for newbies

OK, here is a small "how to" for knowing how to do a few basic things in UNIX (specifically the terminal in OS X).

Now when you open you your terminal you probably see something like:

Welcome to Darwin!
[hostname:~] your_username%

--> for the purposes of this HOW to we will use this:
Welcome to Darwin!
[admiralty:~] admiral%
<--


Now you might wonder how to so stuff in the terminal.
This is where the HOW-TO comes in handy.
(NOTE: I will do one command per post )

Lets start off with a command that lets you see what exaclty you have in teh directory you are in!

This command is the ls command.
The ls command could be thought of as "list" (list what's here). Doing the ls gives you something like this:

Code:
[admiralty:~] admiral% ls
Desktop   Library   Music     Public    admiralty
Documents Movies    Pictures  Sites
[admiralty:~] admiral%

What is in sylver color are the contents of where I am now (which happens to be my home directory).

------
There are special "flags" that go along with the LS command which "format" the output. Three useful ones are the following:

Code:
[admiralty:~] admiral% ls -a
.                   .FBCIndex           Documents           Pictures
..                  .FBCLockFolder      Library             Public
.CFUserTextEncoding .Trash              Movies              Sites
.DS_Store           Desktop             Music               admiralty
[admiralty:~] admiral%
the -a flag tells the ls command to show you EVERYTHING, yes!, even the invisible files (that start with a period (.) )

-----

There also exists the -l command which "lists" everything in a row. Lets examine it:

Code:
[admiralty:~] admiral% ls -l
total 0
drwx------   4 admiral  staff  264 Oct  4 19:29 Desktop
drwx------   5 admiral  staff  264 Oct  4 19:29 Documents
drwx------  22 admiral  staff  704 Oct  7 15:10 Library
drwx------   2 admiral  staff  264 Oct  4 19:30 Movies
drwx------   2 admiral  staff  264 Oct  4 19:30 Music
drwx------   2 admiral  staff  264 Oct  4 19:30 Pictures
drwxr-xr-x   3 admiral  staff  264 Aug 21 13:34 Public
drwxr-xr-x   4 admiral  staff  264 Aug 21 13:34 Sites
drwxr-xr-x   9 admiral  staff  264 Oct  4 19:47 admiralty
[admiralty:~] admiral%
Now you might be wondering what drwxrwxrwx is and all that stuff that is above.

--> continues bellow
__________________
<<------------------------------>>
Seid ihr bereit fuer Club Admiralty ????
Club Admiralty: Http://www.club-admiralty.com
Copyright 1996-present
Bonified Gadget Geek :-)
<<------------------------------>>
Reply With Quote