On Sat, 23 Apr 2016 06:13 pm, Paul Rubin wrote:

> Steven D'Aprano <st...@pearwood.info> writes:
>> I want to remove a directory, including all files and subdirectories
>> under it, but without following symlinks. I want the symlinks to be
>> deleted, not the files pointed to by those symlinks.
> 
> rm -r shouldn't follow symlinks like you mention.


"rm -r" gives me a NameError when I run it in my Python script :-)

But seriously, where is that documented? I've read the man page for rm, and
it doesn't say anything about treatment of symlinks, nor is there an option
to follow/not follow symlinks. So I never trust rm -r unless I know what
I'm deleting.



-- 
Steven

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to