Large .cache directory – Linux

[user@myhost .cache]$ du -sh 72M .    So what is this? Pip cache ‘pip cache dir’ [user@myhost ~]$ pip cache dir /home/user/.cache/pip [user@myhost ~]$ to clean – ‘pip cache purge’ [user@myhost ~]$ pip cache purge Files removed: 155    check the space [user@myhost .cache]$ du -sh 2.5M . [user@jibsheet .cache]$ 95% or more reduction of space.

Some sendmail tips with AWS and Debian

Configuration strings use left tick – hex 60 on left, hex 27 at the end.  PAY attention error – DNS Host unknown (Name server: ‘some-smtp.server.com’) This error is caused by using python/bash like single ticks on both sides `SMART_HOST’, `email-smtp.eu1.amazonaws.com’ AWS uses port 587 – don’t even bother trying to use port 22. it will not respond. this will appear […]

xz extension – what is it?

I was playing around with SuSE distribution and found the messages archived with xz extension. It appears to work with zgrep. Here is the documentation   https://github.com/xz-mirror/xz 0. Overview ———– XZ Utils provide a general-purpose data-compression library plus command-line tools. The native file format is the .xz format, but also the legacy .lzma format is supported. The .xz format supports […]

Crontab – tips and reference

Crontab tips edit – “contrab -e” to list “crontab -l” Link to Manpage online – https://man7.org/linux/man-pages/man5/crontab.5.html   // shamelessly stolen from stackoverflow crontab does not understand “intervals”, it only understands “schedule” valid hours: 0-23 — valid minutes: 0-59 example #1 30 * * * * your_command this means “run when the minute of each hour is 30” (would run at: 1:30, […]

Time testing for Python – Linux

This has always been a hot topic.  Especially since Y2k. How to test those monthly, yearly transitions. Here is a blog that explains the tools available https://adamj.eu/tech/2020/06/03/introducing-time-machine/ freezegun – https://github.com/spulec/freezegun  

Installing python3 on Amazon Linux2

Python3 isn’t installed by default – Python 2.7 is by default. Use ‘yum’. apt-get was in the older version of Amazon Linux. [root@ip-x.y.z.12 ec2-user]# sudo yum install python3 Loaded plugins: extras_suggestions, langpacks, priorities, update-motd amzn2-core | 3.7 kB 00:00 Resolving Dependencies –> Running transaction check —> Package python3.x86_64 0:3.7.9-1.amzn2.0.1 will be installed –> Processing Dependency: python3-libs(x86-64) = 3.7.9-1.amzn2.0.1 for package: […]