Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

Unix & Linux

Why should I use $[ EXPR ] instead of $(( EXPR ))?

August 9, 2022 by Magenaut

On the paragraph explaining arithmetic expansion, Bash’s user guide uncovers 2 different ways of evaluating an expression, the first one uses $(( EXPRESSION )) and the second one uses $[ EXPRESSION ]. The two ways seem pretty similar as the only difference I have found is:

Categories Q&A, Unix & Linux Tags bash Leave a comment

“askfirst” getty with systemd (“press enter to activate this console”)

August 9, 2022 by Magenaut

On a Debian Jessie system with systemd, how can I configure the terminals so that a message like Press enter to activate this console is displayed and the login prompt does not appear before hitting enter?

Categories Q&A, Unix & Linux Tags debian, getty, systemd, terminal Leave a comment

Need explanation on Resident Set Size/Virtual Size

August 9, 2022 by Magenaut

I found that pidstat would be a good tool to monitor processes. I want to calculate the average memory usage of a particular process. Here is some example output:

Categories Q&A, Unix & Linux Tags linux, memory, process Leave a comment

In Linux, which filesystems support reflinks?

August 9, 2022 by Magenaut

btrfs supports reflinks, XFS supports reflinks (since 2017 I think?).

Categories Q&A, Unix & Linux Tags filesystems, linux, reflink Leave a comment

How do I join an array of strings where each string has spaces?

August 9, 2022 by Magenaut

My bash script:

Categories Q&A, Unix & Linux Tags array, bash, quoting, shell-script Leave a comment

ssh, start a specific shell, and run a command on the remote machine?

August 9, 2022 by Magenaut

I am in a situation where several users are sharing the same user account on a remote machine. I have a “personal” directory where I wrote my own .zshrc file, and I would like to have a way to:

Categories Q&A, Unix & Linux Tags openssh, ssh Leave a comment

Nautilus context menu option to create new file

August 9, 2022 by Magenaut

I use Nautilus 3.10.1 on Trisquel 7.0 GNU/Linux. In context menu, there is no such option like create new file/document. So, I want to add such an option (which may work like that of existing option: New folder).

Categories Q&A, Unix & Linux Tags gnome, nautilus Leave a comment

What is the correct way to view your CPU speed on Linux?

August 9, 2022 by Magenaut

I found two commands to output information about my CPU: cat /proc/cpuinfo and lscpu. /proc/cpuinfo shows that my CPU speed is 2.1 Ghz, whereas lspcu says it is 3167 Mhz. Which one is correct?

Categories Q&A, Unix & Linux Tags cpu, linux Leave a comment

Practical limit on the number of btrfs snapshots?

August 9, 2022 by Magenaut

I am considering using btrfs on my data drive so that I can use snapper, or something like snapper, to take time based snapshots. I believe this will let me browse old versions of my data. This would be in addition to my current off site backup since a drive failure would wipe out the data and the snapshots.

Categories Q&A, Unix & Linux Tags btrfs, limit, performance, snapshot Leave a comment

How to run a command inside a running systemd container

August 9, 2022 by Magenaut

I have a systemd container running, and I can login into it with machinectl login <container>. How can I execute a command inside the container directly, i.e. without first logging in, executing the command, and then logging out?

Categories Q&A, Unix & Linux Tags containers, systemd Leave a comment
Older posts
Newer posts
← Previous Page1 … Page124 Page125 Page126 … Page371 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress