Skip to content

Magenaut

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

bash

./executable: cannot execute binary file

August 8, 2022 by Magenaut

I have a script that works well when I ssh to the server to execute it myself, but has problems when Hudson, a continuous integration server, runs it.

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

Execute bash commands over SSH while staying in interactive mode afterwards

August 8, 2022 by Magenaut

Probably it is a weird thing I would like to achieve but:
I would like to SSH to a remote host and then execute some bash commands like “alias” automatically to use them afterwards in an interactive mode. The remote host does not allow the personal environment.

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

Fast way to build a test file with every second listed in YYYY-mm-dd HH:MM:SS format

August 8, 2022 by Magenaut

I want to create a large test file with lines containg dates listed by the second, but my method is taking inordinately long… (or at least, that’s how it feels 🙂 … 43 minutes to create only 1051201 lines. 20.1 MB file….

Categories Q&A, Unix & Linux Tags bash, date, performance, text-processing Leave a comment

Echoing progress from a background process without hijacking prompt

August 8, 2022 by Magenaut

Consider the simple script hello:

Categories Q&A, Unix & Linux Tags background-process, bash, prompt, shell Leave a comment

number of folders in a directory (recursive)

August 8, 2022 by Magenaut

I would like to print the number of folders (recursive, excluding hidden folders) in a given CWD / current directory. What command, or series of commands can I use to ascertain this information?

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

Differentiating between running and being sourced in a bash shell script?

August 8, 2022 by Magenaut

Either what I’m asking here is extremely unorthodox/unconventional/risky, or my Google-fu skills just aren’t up to snuff…

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

Is there any way to undo a bash history modification?

August 8, 2022 by Magenaut

By pressing up, I can go through previously entered commands. I’ve noticed though that if I modify one of them, that alters the history. For instance, if I type:

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

Remote for-loop over SSH

August 8, 2022 by Magenaut

I have the following in a script

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

What is the right way to consistently mangle bash terminal?

August 8, 2022 by Magenaut

I’m on OSX 10.11.1 and occasionally my bash terminal gets mangled. It often happens when I accidentally cat a binary file. The result can be seen on the image below. The output becomes weird, and I can’t type ascii characters anymore.

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

What are the environment variables by default?

August 8, 2022 by Magenaut

When starting a bash shell process, what are the default environment variables, except those specified in the startup file?

Categories Q&A, Unix & Linux Tags bash, environment-variables Leave a comment
Older posts
Newer posts
← Previous Page1 … Page37 Page38 Page39 … 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