nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

Shell Delete Directory

This is a discussion on Shell Delete Directory within the Slackware forums, part of the Linux Distribution category; How do I delete a directory under Linux shell prompt?...


Go Back   nixCraft Linux Forum > Linux Distribution > Slackware

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 04-19-2008, 04:28 PM
chimu's Avatar
Contributors
User
 
Join Date: Mar 2005
My distro: Ubuntu
Posts: 33
chimu is an unknown quantity at this point
Default Shell Delete Directory

How do I delete a directory under Linux shell prompt?
Reply With Quote
  #2 (permalink)  
Old 04-19-2008, 04:30 PM
rockdalinux's Avatar
Contributors
User
 
Join Date: May 2005
Location: Bangalore
My distro: RHEL, HP-UX, Solaris, FreeBSD, Ubuntu
Posts: 521
rockdalinux is on a distinguished road
Default

Directories must be empty before rmdir command:
Code:
rmdir directory
rmdir x/y
rmdir your-dir-name
Linux delete directory with rmdir command
__________________
Rocky Jr.
You may have my body & soul, but you will never touch my pride!

If you have knowledge, let others light their candles at it.

Certified to work on HP-UX / Sun Solaris / RedHat
Reply With Quote
  #3 (permalink)  
Old 05-31-2008, 03:36 PM
Junior Member
User
 
Join Date: May 2008
My distro: RedHat/Solaris
Posts: 6
aasif.shaikh is on a distinguished road
Default

If you want to delete the folder without emptying it.
U can use `rm -rf folder_name` but beware as it will delete all the data inside that folder.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
Shell Script to Automatically Delete a File via Cron Job kakarla Shell scripting 2 01-29-2008 08:54 AM
Linux delete mail for root or any other user from a shell prompt raj Getting started tutorials 0 05-05-2007 01:36 AM
Shell script to delete a file with a dialog utility shankar100 Shell scripting 4 03-02-2007 10:22 AM
delete directory linux chiku Linux software 4 07-22-2006 06:56 PM
error shell script no such file or directory /bin/sh Linux software 1 01-08-2006 08:34 PM


All times are GMT +5.5. The time now is 12:42 AM.


Powered by vBulletin® Version 3.7.2 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30