mcc on Nostr: Is there a way to do `mv`, in either linux or Perl, that will fail if I try to copy a ...
Is there a way to do `mv`, in either linux or Perl, that will fail if I try to copy a file over another file?
In the mv manpage, I find a `-n` or `--no-clobber` option which does indeed refuse to replace file A with file B. But it is a silent failure. $? is 0 after I run an unsuccessful `mv -n`.
Published at
2024-06-30 16:15:35Event JSON
{
"id": "e22a93b9b6cb404c105c190295d133227ba3ffc4500653550a4ca11823c5822f",
"pubkey": "582a41c6eca3d12c80acd248a7c8f3070c83c859b9ac1739cbecc074cf09a747",
"created_at": 1719764135,
"kind": 1,
"tags": [
[
"proxy",
"https://mastodon.social/@mcc/112706462392133355",
"web"
],
[
"proxy",
"https://mastodon.social/users/mcc/statuses/112706462392133355",
"activitypub"
],
[
"L",
"pink.momostr"
],
[
"l",
"pink.momostr.activitypub:https://mastodon.social/users/mcc/statuses/112706462392133355",
"pink.momostr"
],
[
"expiration",
"1722366744"
]
],
"content": "Is there a way to do `mv`, in either linux or Perl, that will fail if I try to copy a file over another file?\n\nIn the mv manpage, I find a `-n` or `--no-clobber` option which does indeed refuse to replace file A with file B. But it is a silent failure. $? is 0 after I run an unsuccessful `mv -n`.",
"sig": "29a7a9a23c47583da3932874c5f5ccd20827aec5d6bbb075cbfcf2d40f476674eed9e262eb16c22dbc195ce87119c0069264efb98a39d19d51ed8d9e03b0e6f7"
}