Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Removing a directory wit files inside 2

Status
Not open for further replies.

nyhawkey

Vendor
Dec 16, 2003
1
US
I need to remove files from a SCO Unix system that has files inside of it. What is the command to do this? When I use rmdir, it tells me that the directories have files and cannot be removed.
 
rm -r

Theophilos.

-----------

There are only 10 kinds of people: Those who understand binary and those who don't.
 
But be very careful to ensure that you're where you think you are before using rm -r

Been there, done that!
 
To know what you do:
rm -ri

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
As an alternative you can use the folowing in your .profile, so you will always know where you are (like the good old MS-DOS [tongue] )

Code:
:
:
CH_DIR() {
  cd $1 && PS1="`pwd` # "
}
:
:
alias cd=CH_DIR
:
:

Theophilos.

-----------

There are only 10 kinds of people: Those who understand binary and those who don't.
 
Except that setting the prompt to show current location is highly shell-dependant. I'm partial to Korn shell so I use:

Code:
PS1=`uname -n`' - root $PWD => '

I have several 5.0.6 boxen that I telnet into, hence the 'uname -n'. "root" lets me know I'm in the system as GOD. "$PWD" returns the current directory location. This produces a very informative prompt:

training - root /usr3/merge =>


Dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top