search for files in a directory hierarchy

learn more… | top users | synonyms

0
votes
2answers
186 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
70 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
96 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 ...
1
vote
1answer
30 views

Identifying files being actively written to CIFS share

Is there a way to identify files that are actively being written to a CIFS mount in Linux? I am interested in skipping those files. My first thought would be to fine tune the find command with ...
0
votes
1answer
270 views

Command find show “Value too large for defined data type”

When I run the "find" command in any folder, works perfect, but only in a particular folder I get this: root#find . find:.: Value too large for defined data type It is a shared folder from another ...
0
votes
1answer
29 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
22 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
49 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
36 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
250 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
74 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
202 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
198 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: ...
1
vote
0answers
63 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) ...
0
votes
0answers
17 views

How to find a.out(not ELF) files?

I want to find the old format files a.out (not ELF). Simply I don't know what should return file. The following link doesn't help How can I tell an a.out binary from an ELF one?: Use the file ...