Re: Can't remove or change a directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Nov 16, 2007 at 12:28:07AM -0500, Tony Nelson wrote:
> At 1:22 PM -0600 11/15/07, Mikkel L. Ellertson wrote:
>  ...
> >...Did you know that
> >to remove a directory, you should use rmdir, and not rm? There is
> >also "rm -d <directory>", but that is limited to root, and should be
> >used with care.
> 
> What is the benefit of using rmdir rather than rm -rf, other than having to
> empty the directory first?  (I use two steps, ll dir followed by editing
> the command to be rm -rf.)
> 
rmdir will only remove empty directories, thus if you are expecting
the directory to be empty when you remove it it's an insurance against
removing files by mistake.

I'm alway *very* careful and think hard before hitting return when I
use 'rm -rf' it's so unforgiving!

-- 
Chris Green

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux