Public bug reported:

Command rm -rf .
writes:
rm: cannot remove directory: ‘.’

That is OK. But it does not delete the content of the dir ‘.’. Command rm -rf * 
is not the alternative because
1) it does not include hidden files/directories,
2) number of files could exceed max command line length.

Alternative is: find . -delete, but I vote for repairing the rm command.

Commands to reproduce:
mkdir tmp_rm_test
cd tmp_rm_test
echo a>.a
mkdir b
ls -A
rm -rf .
ls -A
find . -delete
ls -A
cd ..
rmdir tmp_rm_test

ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: coreutils 8.20-3ubuntu5
ProcVersionSignature: Ubuntu 3.11.0-18.12-lowlatency 3.11.10.4
Uname: Linux 3.11.0-18-lowlatency i686
ApportVersion: 2.12.5-0ubuntu2.2
Architecture: i386
Date: Tue Mar 25 09:57:39 2014
EcryptfsInUse: Yes
MarkForUpload: True
SourcePackage: coreutils
UpgradeStatus: Upgraded to saucy on 2013-10-24 (152 days ago)

** Affects: coreutils (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: apport-bug i386 saucy

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1297147

Title:
  rm -rf . does not delete content of the dir

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/coreutils/+bug/1297147/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to