Deleting A Directory!


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Deleting A Directory!
# 1  
Old 10-19-2001
Question Deleting A Directory!

This must be simple! How do you delete a directory that contains other files and directories?Smilie
# 2  
Old 10-19-2001
man rm

check out the options listed for rm
think "recursive"
# 3  
Old 10-19-2001
rm -fr
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Deleting directory with leading hyphen in name

I asked this question last month in Stack Exchange (linux - delete directory with leading hyphen - Server Fault) and none of the answers supplied worked. I have somehow created a directory with a leading hyphen and cannot get rid of it. # ls -li | grep p 2621441 drwxr-xr-x. 2 root root... (4 Replies)
Discussion started by: edstevens
4 Replies

2. AIX

Deleting a Directory

I have a directory under my home directory called: my work. I cannot delete this directory and I want to. If anyone needs additional information. Please let me know. Any help you can provide is greatly appreciated. (8 Replies)
Discussion started by: Nerdgirl1313
8 Replies

3. Shell Programming and Scripting

Deleting 3 days old logs from a directory

As i am working in unix environment so i have an logs that is created by my application at the following location that is /opt/app/glac/current/servers/ops/logs inside the logs directory there are different kinds of logs(that is the file having extension as .log ) have been created... (1 Reply)
Discussion started by: 2015nks
1 Replies

4. UNIX for Dummies Questions & Answers

Deleting a directory and zipping another directory

Hi Folks, I have a directory in unix that is /usr/local/pos contain the folowing directoreis ..that is dir1 dir2 dir3 now I want to delete only dir2 please advise how to remove the directory dir 2 ..that is rm command and how to use it , and second if I want to zip the dir3 please... (1 Reply)
Discussion started by: punpun66
1 Replies

5. Shell Programming and Scripting

Excluding directory during deleting

Hi all, I'm trying to work on a script to delete files older then 31 day's in certain directories. Now, that works, but in one directory there are 3 other maps which contains files that can be deleted but one map which contains files that can't be deleted. My current command is: find... (6 Replies)
Discussion started by: JasperG
6 Replies

6. SCO

Deleting a directory that is not empty

I know someone will probably laugh at this question, I probably knew the answer many years ago when I was doing this full time but here goes..... I have a directory that has many files and sub-directories in it, RMDIR will not delete a directory that is not empty so what is the command to... (1 Reply)
Discussion started by: moondogi
1 Replies

7. Shell Programming and Scripting

Deleting the file only to all the directory and sub directory

I need the unix command or shell script to delete all the file in current directory and sub directory. (7 Replies)
Discussion started by: kingganesh04
7 Replies

8. Linux

deleting only directory not files

Hi Guys, I want to know wheather it is possible to delete directory not files, Example: In one directory there are 10 dirs and 100 files but my req is to delete only dirs not file Wheather it is possible ? (13 Replies)
Discussion started by: manoj.solaris
13 Replies

9. Shell Programming and Scripting

deleting empty files in a directory

Hello Gurus, I want to delete only empty files (files with 0 bytes) at once from the local directory. Rightnow I need to go through all the files one by one manually and check the empty files before deleting them. Is there any unix command that finds and deletes empty files in a directory?... (5 Replies)
Discussion started by: berlin_germany
5 Replies

10. UNIX for Advanced & Expert Users

Accidentally deleting directory/files

Hi, I accidentally deleted a big directory with all its sub-directories and bunch of source code files which I have been developing for about 2 years... What will I do now, how can I retrieve my files, directory hierarchy back ??? If anyone, please HELP ! ! ! ... (4 Replies)
Discussion started by: milhan
4 Replies
Login or Register to Ask a Question