GNU bug report logs - #21051
direct/file deletion

Previous Next

Package: coreutils;

Reported by: Lee Sung <lsung <at> juniper.net>

Date: Mon, 13 Jul 2015 21:44:02 UTC

Severity: normal

Tags: notabug

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Bob Proulx <bob <at> proulx.com>
To: Lee Sung <lsung <at> juniper.net>
Cc: 21051 <at> debbugs.gnu.org
Subject: bug#21051: direct/file deletion
Date: Tue, 14 Jul 2015 16:54:01 -0600
Lee Sung wrote:
> [lsung <at> hw-lnx-shell3 ~/fpc_i2cs_cpld]$ ls -al
> total 28
> drwxr-xr-x   3 lsung ipg        4096 Jul 13 11:23 .
> drwxr-xr-x  26 lsung qa-others 20480 Jul 13 11:40 ..
> drwxr-xr-x   2 lsung ipg        4096 Jul 13 11:23 rtl
> 
> I want to delete  dir fpc_i2cs_cpld, but I cannot.

Easiest is to change directory one above and then delete it.  The
easiest way is with rm -r -f which will perform a recursive removal of
everything in the directory depth first from the bottom up.

  cd ..
  rm -rf fpc_i2cs_cpld  # warning: recursive removal

But you could also delete it using the full path.

  rm -rf ~/fpc_i2cs_cpld  # warning: recursive removal

> How would I delete directory "." and ".."

Those entries are required infrastructure and should not be deleted.
The "." directory refers to the current directory.  The ".." refers to
the parent directory.  The ".." entry on some classic Unix file
systems may be unlinked but I don't believe that any current Linux
file system allows this.  This is a restriction imposed by the kernel
and not by coreutils.

Bob




This bug report was last modified 6 years and 218 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.