Skip to content

Magenaut

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

shell

Best way to remove file extension from a string?

August 11, 2022 by Magenaut

So, I’m using a script I’ve made to convert videos to the webm format. A certain program calls the script, sending %f which is the full, absolute file name of the video, like this:

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

ls command: what does the first line mean?

August 11, 2022 by Magenaut

When I do ls -l I get this:

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

How can I find broken symlinks

August 11, 2022 by Magenaut

Is there a way to find all symbolic links that don’t point anywere?

Categories Q&A, Unix & Linux Tags find, shell, symlink Leave a comment

monitoring file changes + process access to files

August 11, 2022 by Magenaut

I would like to see what’s happening in my app server folders, i.e. which files are changed by process x or which *.war files have been changed (replaced/created) in the last x minutes.

Categories Q&A, Unix & Linux Tags files, monitoring, process, shell Leave a comment

What is the portable (POSIX) way to achieve process substitution?

August 11, 2022 by Magenaut

Some shells, like bash, support Process Substitution which is a way to present process output as a file, like this:

Categories Q&A, Unix & Linux Tags pipe, posix, process-substitution, shell Leave a comment

Can files be created with permissions set on the command line?

August 11, 2022 by Magenaut

When creating directories, mkdir -m <mode> <dir> provides for creating one or more directories with the given mode/permissions set (atomically).

Categories Q&A, Unix & Linux Tags files, permissions, shell Leave a comment

login/non-login and interactive/non-interactive shells

August 11, 2022 by Magenaut

login shell: A login shell logs you into the system as a specific user, necessary for this is a username and password. When you hit ctrl+alt+F1 to login into a virtual terminal you get after successful login: a login shell (that is interactive). Sourced files:

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

Do we have more history for cd?

August 11, 2022 by Magenaut

cd - can move to the last visited directory. Can we visit more history other than the last one?

Categories Q&A, Unix & Linux Tags bash, cd-command, pushd, shell, zsh Leave a comment

/dev/tcp listen instead of nc listen

August 11, 2022 by Magenaut

With a netcat listener like:

Categories Q&A, Unix & Linux Tags bash, io-redirection, netcat, rhel, shell Leave a comment

Grabbing the first [x] characters for a string from a pipe

August 11, 2022 by Magenaut

If I have really long output from a command (single line) but I know I only want the first [x] (let’s say 8) characters of the output, what’s the easiest way to get that? There aren’t any delimiters.

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