Skip to content

Magenaut

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

bash

realpath command not found

August 7, 2022 by Magenaut

I have debian squeeze amd64. My current shell is bash. If I write the following in my terminal, it works:

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

cp vs. cat to copy a file

August 7, 2022 by Magenaut

cp a b and cat a > b, what’s the difference?

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

How do you time how long a command took to run?

August 7, 2022 by Magenaut

How would you find out how long a running process took to complete? Example: date; dd bs=1m if=/foo of=bar; date ^This example only has 1 second of resolution. Any shell is acceptable. Answers: Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue … Read more

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

Does a shortcut for executing a series of commands in bash history exist?

August 7, 2022 by Magenaut

Suppose I have the following trivial example in my history:

Categories Q&A, Unix & Linux Tags bash, command-history, command-line Leave a comment

Escaping both forward slash and back slash with sed

August 7, 2022 by Magenaut

I have the following string: /tmp/test/folder1/test.txt

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

How to trigger error using Trap command

August 7, 2022 by Magenaut

I am using Ubuntu 12.04.2. I am trying to use “trap” command to capture abnormal or error in my shell script but I am also trying to manually trigger “Error” exit.

Categories Q&A, Unix & Linux Tags bash, error-handling, shell, trap Leave a comment

When is /etc/bash.bashrc invoked?

August 7, 2022 by Magenaut

What is this file anyway? Documentation makes no mention of it. And it’s not supposed to be run automatically (version 4.3, 2 February 2014):

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

Is it possible for there to be a login shell that’s not interactive?

August 7, 2022 by Magenaut

In interpreting this flowchart

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

Testing if a file descriptor is valid

August 7, 2022 by Magenaut

I’d like to make a bash script output additional information to file descriptors (FDs) greater than or equal to 3, when they are open. To test whether an FD is open, I devised the following trick:

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

Verify the length of a variable

August 7, 2022 by Magenaut

I’ve to verify the length of variable read (my script limit to five the characters inserted), I think about something like this:

Categories Q&A, Unix & Linux Tags bash, shell, string Leave a comment
Older posts
Newer posts
← Previous Page1 … Page56 Page57 Page58 … Page65 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