This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: os.remove should behave like rm, not unlink
Type: Stage:
Components: Library (Lib) Versions: Python 2.4
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: whit537
Priority: normal Keywords:

Created on 2006-01-02 16:51 by whit537, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg27212 - (view) Author: Chad Whitacre (whit537) Date: 2006-01-02 16:51
Description
===========
As expected, os.unlink only removes the file reference
explicitly named, so if you have multiple links to the
same file, os.unlink leaves those not named. However, I
would expect os.remove to be equivalent to rm --
removing all references -- but it is a straight alias
for os.unlink. 


Environment
===========
Python 2.4.2
FreeBSD 4.11


Steps to Reproduce
==================
$ touch foo
$ ls -i
1689942 foo
$ ln foo bar
$ ls -i
1689942 bar     1689942 foo
$ python -c 'import os; os.remove("bar")'
$ l -i


Expected Result
===============
$ 


Actual Result
=============
1689942 foo
$ 
msg27213 - (view) Author: Chad Whitacre (whit537) Date: 2006-01-02 17:22
Logged In: YES 
user_id=340931

Nevermind, that's not how rm behaves. *blush*
History
Date User Action Args
2022-04-11 14:56:14adminsetgithub: 42747
2006-01-02 16:51:52whit537create