Below you will find pages that utilize the taxonomy term “linux”
Posts
Aspire, Podman in windows
REM download https://github.com/containers/podman/releases/download/v5.2.5/podman-remote-release-windows_amd64.zip REM unzip it to C:\DIM\podman-remote-release-windows_amd64 SET PODMAN_HOME=C:\DIM\podman-remote-release-windows_amd64\podman-5.2.5 set PATH=%PATH%;%PODMAN_HOME%\usr\bin podman machine init podman machine start set DOTNET_ASPIRE_CONTAINER_RUNTIME=podman Get podman desktop from https://podman.io/
Posts
Change content of a file in block or byte level
Since wrote Things learnt from recent preparation of 1T data for testing, I had figured out how to do that on the following weekends. Today I couldn’t get the steps to do so immediately. It is better to note down for my next time usage. The detailed steps is as following
Find the location in the file
Get the block contains contents to modify
Extract the block to a file and modify it
Posts
Things learnt from recent preparation of 1T data for testing
Several things learnt from recent preparation of data for testing.
Question the way when it takes too long to process data sed: remove last n lines In the past I always thought sed is the fastest way to manipulate data. Is it true for all the cases? I generated 1T testing data in ndjson format, however the last lines of those files are corrupted json data. I had to remove the last line.
Posts
Install selinux and disable it
After thrice attempts, I finally successfully completed the task Selinux Installation at https://engineer.kodekloud.com/practice. Since it is not straightforward, I posted here.
> sudo yum install -y selinux* > # SELINUX=disabled > # change SELINUX in /etc/selinux/config > cat /etc/selinux/config | grep SELINUX # SELINUX= can take one of these three values: SELINUX=disabled # SELINUXTYPE= can take one of three values: SELINUXTYPE=targeted
Posts
Skip first line before running xargs
Do you know how to skip first line before data pipe into xargs?
Today I need to export custom resources and want to avoid error messages because the column names line in the output of kubectl. I knew there is a command line option (--no-headers) of kubectl and managed to get the option, but I don’t want to spend time to search the option in future. Is there any way to skip first line before data pipe into xargs?
Posts
linux utils equivalent in powershell
I never thought I will learn to use powershell seriously. Now I joined NTUC, there are many restrictions. Today I started to use linux utils equivalent in powershell.
dig: Resolve-DnsName
telnet: Test-NetConnection
host: Get-Host
touch: New-Item
cat: Get-Content
tail: Get-Content
grep: Where-Object or Select-String
man: Get-Help
References https://mathieubuisson.github.io/powershell-linux-bash/#pwd- -
Posts
Set timezone in asp.net 6.0 in linux container
According to many articles one the web, the way to set timezone is as following:
cp /usr/share/zoneinfo/Asia/Singapore /etc/localtime echo 'Asia/Singapore' > /etc/timezone You can indeed get the correct time if you run it in dotnet core 5 docker linux containers. However you couldn’t get the correct local time in dotnet 6.0. I found the issue About time incorrect of docker image about aspnet-6 #62545. After I tried serveral combinations mentioned in the issue, finally I got a working solution.