Skip to content

Magenaut

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

command-line

How can I move files by type recursively from a directory and its sub-directories to another directory?

August 11, 2022 by Magenaut

What would be a good way to move a file type from a directory and all of its sub-directories?

Categories Q&A, Unix & Linux Tags command-line, directory, find, rename Leave a comment

How does one extract a command’s exit status into a variable?

August 11, 2022 by Magenaut

I started learning Bash a couple of days ago.

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

Remove ^M character from log files

August 11, 2022 by Magenaut

Remove ^M character from log files.

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

^x^y unix trick for all instances in last command?

August 11, 2022 by Magenaut

One of my favorite Unix tricks is ^x^y, which will take the last command and replace the first instance of “x” with “y”. However, I’m wondering if a similar trick works to replace all instances of “x” with “y” in the last command?

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

syntax_highlight | lpr

August 11, 2022 by Magenaut

Does anyone know of a simple way to produce the PostScript corresponding to a syntax-highlighted version of a source file that can be piped directly to a PostScript printer?

Categories Q&A, Unix & Linux Tags command-line, highlighting, postscript, printing Leave a comment

How can I remove the BOM from a UTF-8 file?

August 11, 2022 by Magenaut

I have a file in UTF-8 encoding with BOM and want to remove the BOM. Are there any linux command-line tools to remove the BOM from the file?

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

How to move the first x files

August 10, 2022 by Magenaut

I have this huge folder with thousands of unordered files. Is it feasible to move the first 5000s to a subfolder via the mv command? For now I move files with

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

Do command line options take an equals sign between option name and value?

August 10, 2022 by Magenaut

Just using kubectl as an example, I note that

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

How to execute consecutive commands from history?

August 10, 2022 by Magenaut

Suppose I want to execute a sequence of four commands that I have executed before. If the first one is 432 in the command-history, then I could do:

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

Are Linux utilities smart when running piped commands?

August 10, 2022 by Magenaut

I was just running a few commands in a terminal and I started wondering, does Unix/Linux take shortcuts when running piped commands?

Categories Q&A, Unix & Linux Tags command-line, efficiency, pipe, utilities Leave a comment
Older posts
Newer posts
← Previous Page1 … Page4 Page5 Page6 … 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