How to empty (“truncate”) a file on linux that already exists and is protected in someway?

You have the noclobber option set. The error looks like it’s from csh, so you would do:

cat /dev/null >! file

If I’m wrong and you are using bash, you should do:

cat /dev/null >| file

in bash, you can also shorten that to:

>| file

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)