Skip to content

Magenaut

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

Unix & Linux

Why is the wild card character * so different between the zip and rm commands?

August 10, 2022 by Magenaut

I put together a script to do some file operations for me. I am using the wild card operator * to apply functions to all files of a type, but there is one thing I don’t get. I can unzip all files in a folder like this

Categories Q&A, Unix & Linux Tags rm, shell, wildcards, zip Leave a comment

How to highlight a word in the output of “cat”?

August 10, 2022 by Magenaut

I can do the following to see if some word is available in the output of “cat”: cat filename | grep word This filters the output and shows only those lines which contain “word”. Now, is it possible to only highlight the “word” in the output, without dropping other lines? Answers: Thank you for visiting … Read more

Categories Q&A, Unix & Linux Tags cat, highlighting Leave a comment

Refer to a file under the same directory of a script found in $PATH

August 10, 2022 by Magenaut

I have a bash script file, which is put under some directory added to $PATH so that I can call the script from any directory.

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

Parenthesis works in bash shell itself, but not in bash script

August 10, 2022 by Magenaut

I can run this command from my command line prompt:

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

Can btrfs track / avoid bad blocks?

August 10, 2022 by Magenaut

I have a HDD which I don’t entirely trust, but still want to use (burstcoin mining, where if I get a bad block in a file, I’ll only lose a few cents).

Categories Q&A, Unix & Linux Tags badblocks, btrfs Leave a comment

Remote desktop over SSH reverse tunnel to replace TeamViewer

August 10, 2022 by Magenaut

I want to open a remote desktop session from my laptop to desktop over my SSH (reverse) tunnel. That should be simple (or at least doable), right? Until now I’ve been using Team Viewer to log in to the remote desktop. I’d like to achieve similar results without Team Viewer.

Categories Q&A, Unix & Linux Tags netcat, remote-desktop, ssh, ssh-tunneling Leave a comment

Why doesn’t echo called as /bin/sh -c echo foo output anything?

August 10, 2022 by Magenaut

For example, while this works:

Categories Q&A, Unix & Linux Tags arguments, command-line, echo, shell Leave a comment

Detecting pattern at the end of a line with grep

August 10, 2022 by Magenaut

If I do:

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

Which is the most portable of sed, awk, perl and sh?

August 10, 2022 by Magenaut

Can someone put these tools in order of portability? Which of these is certain to be found on even the most minimal *nix systems? Is any of them 100% sure to be present? My guess is that the order is the following:

Categories Q&A, Unix & Linux Tags portability, posix Leave a comment

Joining bash arguments into single string with spaces

August 10, 2022 by Magenaut

I’m trying to join all of the arguments to a Bash function into one single string with spaces separating each argument. I also need to have the string include single quotes around the whole string.

Categories Q&A, Unix & Linux Tags bash, shell-script Leave a comment
Older posts
Newer posts
← Previous Page1 … Page101 Page102 Page103 … 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