I recently had a bunch of entries in my btmp log [because of a boneheaded move on my part] I resolved the issue, but now I would like to clear that log, I copied it somewhere else for reference and then I attempted to null the file, but to no avail. I then checked the permissions for the file itself and everything looks right? Just unsure of why it will not let sudo access the file.
user@localhost:~$ sudo cat /dev/null > /var/log/btmp -bash: /var/log/btmp: Permission denied user@localhost:~$ ls -a -l /var/log/btmp -rw-rw---- 1 root utmp 5502336 Aug 20 18:59 /var/log/btmp
Just looking for some other ideas.. I tried changing the permissions and then changing them back just because. I also tried a few other ways to remove the text. But I want to figure out why this doesn't just work. Thanks for any help!