Skip to content

Magenaut

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

Unix & Linux

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

Where can I get the original Unix?

August 10, 2022 by Magenaut

Package: simh (3.8.1-5)

Categories Q&A, Unix & Linux Tags historical-unix Leave a comment

Bash script: check if a file is a text file

August 10, 2022 by Magenaut

From the fact that it says file $attachment
rather than file "$attachment",
I guess your script cannot handle filenames that contain spaces. 
But, be advised that filenames can contain spaces,
and well-written scripts can handle them.  Note, then:

Categories Q&A, Unix & Linux Tags bash, file-command, scripting, shell Leave a comment

How can I find a rogue alias declaration?

August 10, 2022 by Magenaut

I’m trying to find where a specific alias has been declared. I’ve searched all the usual places I know to look for aliases:

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

Why does cron silently fail to run sudo stuff in my script?

August 10, 2022 by Magenaut

I have a script run from a non-privileged users’ crontab that invokes some commands using sudo. Except it doesn’t. The script runs fine but the sudo’ed commands silently fail.

Categories Q&A, Unix & Linux Tags cron, sudo 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 can I fix “cannot find a valid baseurl for repo” errors on CentOS?

August 10, 2022 by Magenaut

I finished installing CentOS 6, but when I tried running yum update I got:

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

How to know if extglob is enabled in the current bash session?

August 10, 2022 by Magenaut

I have a bash terminal open. I want to find out whether the option extglob is enabled or disabled in this session, before I change its value. How can I do this?

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

What does it mean to have a $”dollarsign-prefixed string” in a script?

August 10, 2022 by Magenaut

I just saw this in an init script:

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

Grep word within a file then copy the file

August 10, 2022 by Magenaut

I have a collection of files ( *.zip, *.txt, *.tar.gz, *.doc, …etc ). These files reside within a path. I want to find all the files ( *.txt), then copy, only, the text files that contain specific words ( e.g LINUX/UNIX).

Categories Q&A, Unix & Linux Tags cp, find, grep, text-processing Leave a comment
Older posts
Newer posts
← Previous Page1 … Page44 Page45 Page46 … 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