Timeline for Why can't I remove the '.' directory?
Current License: CC BY-SA 3.0
18 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 15, 2016 at 17:58 | comment | added | Barmar |
Even if it were allowed, rmdir . wouldn't remove the working directory, because the link to it in the parent would still exist. It would just remove the directory's link to itself.
|
|
| Jun 15, 2016 at 13:06 | history | edited | Braiam |
edited tags
|
|
| Jun 13, 2016 at 18:13 | vote | accept | JobHunter69 | ||
| Jun 13, 2016 at 15:25 | history | tweeted | twitter.com/StackUnix/status/742377243830308865 | ||
| Jun 13, 2016 at 11:04 | history | reopened | terdon♦ bash Users with the bash badge or a synonym can single-handedly close bash questions as duplicates and reopen them as needed. | ||
| Jun 13, 2016 at 11:04 | history | closed |
jasonwryan garethTheRed Thomas Dickey heemayl terdon♦ bash Users with the bash badge or a synonym can single-handedly close bash questions as duplicates and reopen them as needed. |
Duplicate of Why is '.' a hard link in Unix?, Remove a directory from inside using the command line interface [duplicate] | |
| Jun 13, 2016 at 11:04 | comment | added | terdon♦ | Relevant: Does 'rm .*' ever delete the parent directory? | |
| Jun 13, 2016 at 9:42 | comment | added | gerrit |
Imagine doing rm -rf .* only to find this including not only . but also .., and then ../.., and then…
|
|
| Jun 13, 2016 at 8:57 | comment | added | michael | Image you've climbed up into a tree to cut off a branch. Which side of the cut do you sit on when you begin to saw? (That's the Linux file system in a nutshell.) | |
| Jun 13, 2016 at 8:43 | comment | added | jlliagre | @ThomasDickey this isn't a duplicate of that one either, only slightly related. In the other question, the OP is not using dot as parameter and the command doesn't fail. | |
| Jun 13, 2016 at 7:32 | answer | added | jlliagre | timeline score: 90 | |
| Jun 13, 2016 at 6:57 | history | edited | JobHunter69 | CC BY-SA 3.0 |
added 15 characters in body
|
| Jun 13, 2016 at 6:56 | vote | accept | JobHunter69 | ||
| Jun 13, 2016 at 18:12 | |||||
| Jun 13, 2016 at 6:50 | review | Close votes | |||
| Jun 13, 2016 at 9:31 | |||||
| Jun 13, 2016 at 6:45 | comment | added | JdeBP |
This question does not duplicate that one. That one asks why the hard link exists as a physical entity, rather than being synthesized. This question asks not only why rm . and rmdir . do not work, but why they are specified as not working, which is independent of the physical existence of a hard link.
|
|
| Jun 13, 2016 at 6:32 | answer | added | Julie Pelletier | timeline score: 9 | |
| Jun 13, 2016 at 6:17 | comment | added | faadi | Try rm -r 'pwd' to remove the current dir without actually moving to parent dir | |
| Jun 13, 2016 at 6:06 | history | asked | JobHunter69 | CC BY-SA 3.0 |