Skip to main content

Posts

Analyzing Linux User Activities

If you want to analyze which users are logged in, how long they logged in, which commands they have executed etc., you can use below commands and methods. Login Logs Login log files are stored in following locations: /var/log/wtmp – the login & logout history of users, as well as system boots and shutdowns. /var/run/utmp – currently logged in users. /var/log/btmp – failed login attempts. /var/log/lastlog - information about the last successful logins. No need to check these log files manually. You can instead use below commands. who and w commands who : prints information about users who are currently logged in. who command uses /var/run/utmp file by default. who #username #login time #remote hostname/ip address userX pts/0 2025-03-07 15:14 (111.111.33.111) Usernames and the number of currently logged on users: who -q # usernames of currently logged in users userX userY # the number of currently logged in users users=2 who co...
Recent posts

WinMerge のセットアップと使う方

WinMerge は、Windows 用のオープン ソースの差分およびマージ ツールです。WinMerge は、フォルダーとファイルの両方を比較し、違いを理解して扱いやすい視覚的なテキスト形式で表示します。この記事でWinMerge のセットアップと使う方を教えます。 source: https://winmerge.org WinMerge をダウンロード WinMerge のウェブサイト に行って、「WinMerge-2.16.44-x64-Setup.exe」ボタンを押し、WinMerge 2.16 をダウンロードしてください。 WinMerge をインストール ダウンロードされたソフトウェアをクリックし、ポップアップ画面で「Next」を押してください 「Languages」部分をスクロールダウンし、「Japanese menus and dialogs」を選択し、「Next」ボタンを押してください ターミナル等からも WinMerge をアクセス出来ようにする為に「Add WinMerge folder to your system path」オプションを選択し、希望によって他のオプション選択してください 「Enable Explorer context menu Integration」オプションを選択したら、フォルダ/ファイルを右キリックし、コンテクストメニューから WinMerge を開くようになります。 「Install」ボタンを押し、「Next」ボタンを押し、その後、「Finish」ボタンを押してください 言語を日本語にする もし WinMerge の言語が日本語じゃなくて、英語なら、「Edit」タブから「Options」を押してください。 ポップアップ画面で右側の下にある「Languages」と言うドロップダウンメニューから日本語を選択し、「OK」ボタンを押してください WinMerge を使う方 「ファイル」タッブから「開く」を押し 参照ボタンを押し、比較したいフォルダ・ファイルを指定 比較したいフォルダを指定する方法: ポップアップ画面から対象のフォルダーを選択し、「Open」を押してくだい 何も選択しないで、「Open」を押してくだい 右側下にある「比較」ボタンを押し ...

Git squash merge explained

There are many ways to integrate changes in git: regular / normal git merge, git squash merge, git rebase etc. This article explains git squash merge by comparing it to regular merge. Let’s use below example: In the repository with default main branch, after two commits, a new feature branch is created. Some work happened in feature branch. feature branch now has 2 commits that it shares with main branch, and three exclusive commits (exists only in feature branch). In the meantime, others worked on main branch and added two new commits (exists only in main branch). git log output of the main branch: c72d4a9 ( HEAD - > main ) fourth commit on main 2c3dd61 third commit on main 0c2eec3 second commit on main 9b968e8 first commit on main git log output of the feature branch: 786650f ( HEAD - > feature ) third commit on feature 21cbaf1 second commit on feature 677bc7f first commit on feature 0c2eec3 second commit on main 9b968e8 first commit on mai...

Free AI chatbots' comparison

As of November 2024 there are many LLM powered chatbots, such as ChatGPT by OpenAI, Gemini (formerly Bard) by Google, Claude (family of LLMs) by Anthropic and more. Majority of these chatbots have paid and free tiers. Although there are many review and comparisons of these chatbots, they mainly focus on the premium (paid) versions of these chatbots. However, not everyone is willing to shell out $20 per month. I, being broke, have been using free version of chatbots since they came out. Based on my actual use, not the benchmark results, I decided to write a comparison review of free tier of AI chatbots. I know that I can’t just say “based on my experience XY chatbot is the best, end of story”. I need to show some material so that you as a reader can confirm the results. On later section of the post, I will discuss the prompts I used in detail. Little heads-up, I tried to use prompts that have less to do with factual accuracy. I have never seen or heard of a large language model...