search for files in a directory hierarchy

learn more… | top users | synonyms

0
votes
2answers
15 views

How to direct errors from with a find exec command to a log file

Hi I have the following command that does yui optimizations and runs as a cron job. I want to log the output of the command to a log file. find . -type d -exec bash -c "cd '{}' && pwd &&...
0
votes
2answers
190 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 's/TEXT_TO_FIND/...
0
votes
2answers
71 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
97 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
33 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 mmin....
0
votes
1answer
537 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
30 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
23 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
54 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
260 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
75 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
210 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
211 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
64 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
44 views

list all files in subdirectories without listing the contents of parent (AIX)

I am trying to get a list of all files and directories under specific directories in AIX. find /usr/bin/* /usr/sbin/* /usr/local/bin/* usr/local/sbin/* /bin/* /sbin/* From this list I want to ...
0
votes
0answers
30 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 ...