Skip to content

Magenaut

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

Unix & Linux

Delete duplicate lines pairwise?

August 8, 2022 by Magenaut

I encountered this use case today. It seems simple at first glance, but fiddling around with sort, uniq, sed and awk revealed that it’s nontrivial.

Categories Q&A, Unix & Linux Tags sed, text-processing, uniq Leave a comment

Do the virtual address spaces of all the processes have the same content in their “Kernel” parts?

August 8, 2022 by Magenaut

The Linux Programming Interface shows the layout of a virtual address space of a process:

Categories Q&A, Unix & Linux Tags linux, linux-kernel, virtual-memory Leave a comment

comparing the first column of two files and printing the entire row of the second file if the first columns match

August 8, 2022 by Magenaut

I have two files in these formats:

Categories Q&A, Unix & Linux Tags awk, grep, join Leave a comment

Why is there no apparent clone or fork in simple bash command and how it’s done?

August 8, 2022 by Magenaut

Consider the following (with sh being /bin/dash):

Categories Q&A, Unix & Linux Tags shell, strace, syscalls Leave a comment

Why doesn’t cp have a progress bar like wget?

August 8, 2022 by Magenaut

Please note that I don’t ask how. I already know options like pv and rsync -P.

Categories Q&A, Unix & Linux Tags architecture, cp, wget Leave a comment

What is the difference between ping -w and ping -W?

August 8, 2022 by Magenaut

What is the -w (deadline) flag in ping for? I cannot find a description of it in the ping man page; only for -W, which takes seconds as a parameter. What is the difference between them, and how can I set a ping timeout (if host is not responding) to 200ms?

Categories Q&A, Unix & Linux Tags ping, shell, timeout Leave a comment

renaming images to include creation date in name

August 8, 2022 by Magenaut

When I look at the properties of an image, I can see the date the photo was taken in “Date Taken”. When I edit the images (proprietary program) this data gets lost.

Categories Q&A, Unix & Linux Tags images, rename Leave a comment

Remapping both Caps Lock and Shift+Caps Lock in xkb

August 8, 2022 by Magenaut

I am trying to configure xkb such that Caps Lock is mapped to the Compose key and Shift+Caps Lock functions as the traditional Caps Lock. I put the following in a new file called /usr/share/X11/xkb/symbols/gdwatson:

Categories Q&A, Unix & Linux Tags keyboard-layout, xkb Leave a comment

Obtaining PID of command earlier in Pipeline

August 8, 2022 by Magenaut

I’m writing a bash script to use inotifywait to monitor a directory and kick off actions when changes are detected. Something like:

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

Print pids and names of processes as they are created

August 8, 2022 by Magenaut

From the question here, the OP wants to repeatedly poll the pid of a process using pidof in a shell script. Of course this is inefficient as a new process must be started for the pidof program multiple times per second (I don’t know that this is the cause of the CPU spikes in the question, but it seems likely).

Categories Q&A, Unix & Linux Tags monitoring, process Leave a comment
Older posts
Newer posts
← Previous Page1 … Page214 Page215 Page216 … 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