Skip to content

Magenaut

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

command-line

Is it possible to save as sudo from nano after you’ve forgotten to run as sudo?

August 7, 2022 by Magenaut

A lot of the time I edit a file with nano, try to save and get a permission error because I forgot to run it as sudo. Is there some quick way I can become sudo without having to re-open and re-edit the file?

Categories Q&A, Unix & Linux Tags command-line, nano, sudo Leave a comment

How to bring up a wi-fi interface from a command line?

August 7, 2022 by Magenaut

I can’t figure out how to properly bring up the wi-fi card on my laptop. When I turn it on and issue

Categories Q&A, Unix & Linux Tags command-line, debian, linux, networking, wifi Leave a comment

Is there a unix command line tool that can analyze font files?

August 7, 2022 by Magenaut

Given a directory of font files (TTF and OTF) I’d like to inspect each font and determine what style (regular, italic, bold, bold-italic) it is. Is there a command line tool for unix flavored operating systems that can do this? Or does anyone know how to extract the metadata from a TTF or OTF font file?

Categories Q&A, Unix & Linux Tags command-line, fonts, linux, shell Leave a comment

How to list files in a zip without extra information in command line

August 7, 2022 by Magenaut

In my bash command line, when I use unzip -l test.zip I get the output like this:

Categories Q&A, Unix & Linux Tags command-line, filenames, zip Leave a comment

Disable CTRL-D from closing my window with the terminator terminal emulator)

August 7, 2022 by Magenaut

I am often logged in several SSH sessions at once. To logout from several sessions, I press CTRL+d, until I am back on my local machine. However, I occasionally press it once too many, and my terminal exits. Is there a way to make CTRL+d unable to close my terminal ? I am using terminator … Read more

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

Read columns from file into separate variables

August 7, 2022 by Magenaut

I need to read the following input into separate columns as variables?
input.txt

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

How to efficiently generate large, uniformly distributed, random integers in bash?

August 7, 2022 by Magenaut

I have been wondering what would be the best way to get good randomness in bash, i.e., what would be a procedure to get a random positive integer between MIN and MAX such that

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

Create a test file with lots of zero bytes

August 7, 2022 by Magenaut

I know how to create an empty file:

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

Filtering invalid utf8

August 7, 2022 by Magenaut

I have a text file in an unknown or mixed encoding. I want to see the lines that contain a byte sequence that is not valid UTF-8 (by piping the text file into some program). Equivalently, I want to filter out the lines that are valid UTF-8. In other words, I’m looking for grep [notutf8].

Categories Q&A, Unix & Linux Tags character-encoding, command-line, text-processing, unicode Leave a comment

How can I replace a string in a previous command on the command-line?

August 7, 2022 by Magenaut

I need to run a command, and then run the same command again with just one string changed.

Categories Q&A, Unix & Linux Tags bash, command-line Leave a comment
Older posts
Newer posts
← Previous Page1 … Page17 Page18 Page19 … Page23 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