Skip to content

Magenaut

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

find

How to return both file name and line number with find … -exec grep?

August 10, 2022 by Magenaut

When using find, how do I return the file name and the line number when searching for a string? I manage to return the file name in one command and the line numbers with another one, but I can’t seem to combine them.

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

List of Recently Modified Files

August 10, 2022 by Magenaut

How can I Get a list of all files modified , say 3 months ago.
I checked this question but I was not able to apply it to my scenario.
I am trying this now , it seems to be working , but I know there should be a better way using find.

Categories Q&A, Unix & Linux Tags date, files, find, ls Leave a comment

find searching in parent directories instead of subdirectories

August 10, 2022 by Magenaut

I’m nested deep in a file tree, and I’d like to find which parent directory contains a file.

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

Find files that contain multiple keywords anywhere in the file

August 10, 2022 by Magenaut

I’m looking for a way to list all files in a directory that contain the full set of keywords I’m seeking, anywhere in the file.

Categories Q&A, Unix & Linux Tags awk, find, grep, shell, text-processing Leave a comment

Exclude directory in find

August 10, 2022 by Magenaut

How can I find every file and directory matching a pattern, excluding one directory using find?

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

Delete all files except in a certain subdirectory with find

August 10, 2022 by Magenaut

I want to recursively delete all files not accessed in a while in folder a, except all files in the subfolder b.

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

Finding all “Non-Binary” files

August 10, 2022 by Magenaut

Is it possible to use the find command to find all the “non-binary” files in a directory? Here’s the problem I’m trying to solve.

Categories Q&A, Unix & Linux Tags files, find, newlines, text Leave a comment

Finding a substring in files across subdirectories with a single built-in command?

August 10, 2022 by Magenaut

In Windows, if I wanted to find a string across all files in all subdirectories, I would do something like

Categories Q&A, Unix & Linux Tags find, grep, linux, recursive Leave a comment

How do I perform an action on all files with a specific extension in subfolders in an elegant way?

August 10, 2022 by Magenaut

My current best bet is:

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

How to find files by file type?

August 10, 2022 by Magenaut

I know I can find files using find: find . -type f -name 'sunrise'. Example result:

Categories Q&A, Unix & Linux Tags file-command, file-types, files, find Leave a comment
Older posts
Newer posts
← Previous Page1 Page2 Page3 Page4 … Page10 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