[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What is the difference between unlink and rm -f?
From: |
Peng Yu |
Subject: |
Re: What is the difference between unlink and rm -f? |
Date: |
Wed, 29 Jan 2020 20:42:20 -0600 |
So a one-line summary is
When the target can be delete, unlink and rm -f are the same;
otherwise, unlink will complain about the error and exit with 1, but
rm -f will do neither.
On 1/29/20, Kaz Kylheku (Coreutils) <address@hidden> wrote:
> On 2020-01-29 01:45, Peng Yu wrote:
>> Hi,
>>
>> It seems to me unlink and rm -f are the same if the goal is the delete
>> files. When are they different? Thanks.
>
> I answered this on Unix Stackexchange in 2016:
>
> https://unix.stackexchange.com/a/326711/16369
>
> :)
>
--
Regards,
Peng