"*.bak"
to strip the extension, where 's/\e.bak$//'
is the rule:” I know this is an old thread but shouldn’t there be screen shots of the output of this command?
]]>@Buchan
Thanks for the useful insights.
]]>“You should only use su if there is no other option”
What? Really, blanket sudo is worse than su.
What is wrong with:
su -c '> /var/log/uptime.log'
(Hint: nothing)
Regarding the solution in.the article that uses:
$ su $ sudo ...
What is the purposeof the ‘sudo’? Again: nothing.
Regarding killing processes using pidof and then kill, it can be more effecrive to use pkill (if you are unfamiliar with pkill, you van use prgrep to see which processes pkill would kill, they take mostly the same optioms).
]]>@Anonymous
Works just fine. thanks for the useful suggestion.
]]>cat /dev/null | sudo tee /var/log/uptime.log
]]>