[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: rm feature: don't attempt to remove the same file twice
From: |
Assaf Gordon |
Subject: |
Re: rm feature: don't attempt to remove the same file twice |
Date: |
Thu, 1 Sep 2016 11:32:18 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 |
Hello,
On 09/01/2016 06:00 AM, Ed Avis wrote:
% touch a
% rm a a
rm: cannot remove 'a': No such file or directory
'rm -f' might do the trick
(-f/--force : ignore nonexistent files and arguments, never prompt).
$ touch a
$ rm -f a a && echo ok
ok
However, remember '-f' also automatically assumes 'y' to all questions and
never prompts (depending on your situation it might be acceptable or not).
regards,
- assaf