# UNIX virgin needs help with command line commands



## alexachucarro (May 5, 2002)

I really have no idea what the commands in UNIX are. All i know is

top

cd /

sudo (yeah i know, don't bother warning me)

and thats it.

I wanted to delete a folder and all of its contents. The folder name is "White Star" minus the "". But when i type

cd White Star

it says 'too many arguements'

The space between White and Star isn't liked. What do i do?

Please can someone list a few handy commands that i can use? Thanks for your help.


----------



## lethe (May 5, 2002)

to deal with the space, type a backslash:
cd White\ Star

the backslash escapes the character that follows it, so that the shell won t interpret it (as seperator of arguments in this case).  this works for any character that the shell considers special.  escape it with a backslash so that the shell will not think so.

you could also quote it:
cd 'White Star'

to remove it, type rmdir 'White Star'.  this will not work if there is stuff in the directory.  in that case you can use rm -r 'White Star'.  rm is remove (file) and rmdir is remove directory.  the -r flag on rm tells it to remove recursively, ie go to every subdirectory  and remove its contents and then remove the directory.


----------



## nkuvu (May 5, 2002)

You can also look at the Unix Newbies thread.  It has some good general info.


----------



## Valrus (May 5, 2002)

Every time someone asks about a space, no one tells them about the autocompletion!

Type the first few letters and hit tab. If there is only one file that starts with the letters you typed, Terminal will finish typing the name for you, spaces and all.

Otherwise, hit tab again and you'll get a list of all possible file names starting with the characters you've typed so far.

The autocompletion is quite smart too. Try it out.

-the valrus


----------



## lethe (May 5, 2002)

that s right.  autocompletion will put in a backslash in front of the space.


----------



## alexachucarro (May 5, 2002)

Thanks everyone


----------



## nkuvu (May 5, 2002)

Valrus, you are wrong.  About the "no one ever mentions the autocompletion thing", that is.  I specifically posted to the thread I linked to about this very thing.

I included three different ways to fix the space issue, including auto completion.  So there.  


And FYI, this post is just to let everyone know that the Unix Newbies thread has been updated with the info about escaping spaces... not because I was upset by your posts or anything silly like that.


----------

