[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Remove directory tree without following symlinks

Steven D'Aprano <steve at 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.