search for files in a directory hierarchy

learn more… | top users | synonyms

0
votes
2answers
148 views

find and replace multiple files using a file as input to find and another to replace

I need to replace several chunks of text inside some php scripts... i have: find . -name 'products.php' -exec grep --silent 'TEXT_TO_FIND' {} \; -exec ls {} \; -exec sed -i ...
0
votes
2answers
60 views

Running expand on a set of files

I'm trying to run the expand shell command on all files found by a find command. I've tried -exec and xargs but both failed. Can anyone explain me why? I'm on a mac for the record. find . -name ...
4
votes
1answer
93 views

Look on all server desktops for outstanding files before deleting profiles

We have about 70 servers that we are in the process of moving into a domain environment, so we are converting our users from local accounts to domain controlled accounts. How can we determine which ...
0
votes
1answer
17 views

Searching for files containing text (not string) in bash

How do I find files containing some particular text containing newlines and plenty of other charachters all sorts of quotes and backslashes using terminal?
0
votes
1answer
13 views

Bash find file with specific permission for group, no matter permission for user and others

Using only octal notation, I need to find file that have only read permissions for group, no matter which owner and other permission are. Which is the right command? I can't find it. Thank you.
0
votes
1answer
26 views

find files which are not currently in use

I'm trying to archive some older files, but don't want to touch all the files which are currently in use. What's the best way to ask find to exclude "in use" files? Right now I'm working on this ...
0
votes
1answer
35 views

Is there a tool for indexing a directory in order to perform cheap content search? (hashing by word, for example)

I am often using grep -R on an entire directory tree to find all files that contains a specified word. I wonder if there is a tool that makes the whole operation much faster, maybe via hashing? (Unix ...
0
votes
1answer
134 views

Correctly predicting the amount of disk usage with find/ls/stat and df?

I'm trying to programatically calculate the number of files that can fit on a drive. The drive uses LUKS/ext4 and has a block size of 4096. Below is a df printout of the drive. Filesystem ...
-1
votes
1answer
73 views

Cygwin find integration

I would like to find all NON read-only files in my directory using cygwin's find command. Is it possible ?
2
votes
0answers
171 views

Compress all apache log files which don't have any symlink pointing to them

I'm using cronolog to let the apache log files rotate. I'm using fail2ban to monitor those log files and ban in case of abuse. There's always an access.log symlink which is created by cronolog and ...
1
vote
0answers
137 views

Composer runtime error when deleting subdirectories

I am running 'composer install' on my server, and then using the script feature to delete all subdirectories called '.git' but I am running in the following composer error. Delete all .git dirs find: ...
0
votes
0answers
74 views

Finding and renaming directories by regex in linux

I'm trying to match (and later rename) directory names like: A0000 (SOME-NAME) A0001 (SOME-OTHER-NAME) A0001 (ANOTHER-NAME) I'm testing to see if I match any using the find command but doesn't seem ...
0
votes
0answers
52 views

Clarifying what modifies atime and the impact the find command might have

So on a regular basis I clear out files from my server which have an atime +160 with a command such as: (technically to delete old files but avoid any file that might have been accessed recently) ...