Warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory

Posted in IT StuffTagged

After a recent Ubuntu update, I get this error. What finally helped was putting to the file /etc/environment: LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 For some reason, it was missing. The outputs for locale and other commands appeared like the variables were properly defined. In other words, don’t take for granted all the basic stuff is declared where….

How to fix a locale setting warning from Perl and/or *nix bash?

Posted in IT StuffTagged ,

Perl is sometime called by a *nix script and, after an update I get recently this warning message (in particular when I run apt or npm command): perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_CTYPE = "UTF-8", LANG = "en_US.UTF-8" are supported and….

How to kill all processes with a given (partial) name?

Posted in IT StuffTagged ,

Usually I open more than on instance of tail -f to monitor my application, so, to kill all with one single command I can use this: ps -ef | grep tail | grep -v grep | awk ‘{print $2}’ | xargs kill -9ps -ef | grep tail | grep -v grep | awk ‘{print $2}’….

Linux: mow much RAM is used per program

Posted in IT StuffTagged , ,

The script is a very helpful to show how much RAM is used by single process. This script is written by Pádraig Brady, He can be contacted at P@draigBrady.com. The script itself follows: #!/usr/bin/env python   # Try to determine how much RAM is currently being used per program. # Note the per program, not….