Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

rm -d

Posted on 1997-04-29
3
Medium Priority
?
494 Views
Last Modified: 2013-12-05
When I try to remove a directory with rm -d, as documented in the rm man page, I always get the message "Operation not permitted", even if I login as root. I have tried the same thing on a FreeBSD system, and it worked, even if the situation was the same, with the same access privileges for all the files involved. Can you help me?
(I want to use rm -d, not rmdir or rm -r; in fact the same thing happens if I write a program which uses the unlink system call)
0
Comment
Question by:alfredotod
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 1

Expert Comment

by:strobert
ID: 1626220
what linux distribution (redhat/slackware) are you using?
Also what kernel version?

why not rm -rf?  
if the directory is not empty then the filesystem should get checked to free the blocks.  (basically refs to the used blacks get nuked, but the blocks don't get marked as free).

It looks to be a bug in the unlink syscall.  I'll let you know if I find for info.
0
 
LVL 1

Accepted Solution

by:
fln earned 300 total points
ID: 1626221
In linux usr rm -R
capital R to remove a dir, or rm -Rf to put som power behind...
0
 
LVL 2

Expert Comment

by:jprohart
ID: 1626222
according to the man page -r and -R are equiv (redhat 4.0 manpages)

he wanted to be able to do a rm -d
this does a unlink on the dir, all contents basically get left floating attached to nothing (why I said -- quoting the man page -- that you should do a fsck after the command)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question