Isso não funcionará dessa maneira. Você tem que ir com uma sintaxe estendida:
find /etc -type l >| file1.txt 2>&1
minha bash opção noclobber está ativada e eu já tenho um arquivo file1.txt .
Eu quero escrever no arquivo existente redirecionando stdout e stderr para file1.txt enquanto sobrescrevendo a opção noclobber . Abaixo está o meu comando
find /etc -type l &>| file1.txt
Isso está me dando bash syntax error. Unexpected token '|'
Ou você pode simplesmente mudar para outro shell como zsh , onde &>| apenas funciona :
find /etc -type l &>| somefile
Tags bash files io-redirection