search for files in a directory hierarchy

learn more… | top users | synonyms

2
votes
2answers
2k views

How do I make (non-gnu-)grep ignore binary files?

Hey, I am on a HP-UX server here. When recursively grepping a directory tree, I have problems when the tree also contains binary files: grep treats them as text files and displays very long lines ...
0
votes
2answers
1k views

find files modified in an interval on unix

I am on linux and have tried to figure out the find command for a while to be able to list the directories modified in a 24 hour period a certain number of days ago, but I can't get it to work. Among ...
1
vote
3answers
274 views

find . -name “foo” | more doesn't work

I'm a unix newb. I'm using find, but I'm getting too many results to fit on my screen since it's listing the permissions denied folders. I've tried piping it to more but that doesn't seem to have any ...
4
votes
2answers
2k views

Why does this regex not work on linux?

prescript: I am not sure where this question belongs i cant say it works on windows but from my understanding this regex is correct and how i would write it (except maybe the ^ at the beginning) ...
14
votes
4answers
10k views

Shell Scripting: Using find to delete files matching a pattern

I'm trying to write a bash command that will delete all files matching a specific pattern - in this case, it's all of the old vmware log files that have built up. I've tried this command: find . ...
3
votes
2answers
287 views

What does rm {} + do?

As in find -L /etc/ssl/certs/ -type l -exec rm {} + So it finds all broken symlinks and deletes them. But how exactly do I interpret the {} + part?
2
votes
4answers
3k views

Use 'find' to determine files modified yesterday

I'm sure this is an age old question with a simple answer, but I've tried every combination I know to try and haven't come up with anything. And searching Google is less than pleasant since searching ...
9
votes
3answers
180 views

Find's -true option: what for?

GNU find (and others?) has a -true test along with the normal -name, -mode, -user and so on. From the man page: -true Always true. Every time I see the man page I notice this and wonder when ...
3
votes
5answers
339 views

Deleting files in Linux

I need to find all files matching a certain criteria and delete them - here's a snippet: /var/www/somesite/releases/{many directories}/tmp/attachment_fu I'd like to find all files in any ...
0
votes
4answers
481 views

Subversion Path on Ubuntu Server

Might be a dumb question. But I installed SVN 1.4.6 via apt-get. Everythings working dandy with no issues. I want to backup all the SVN files so I figured to backup /svn which is where appache is ...
10
votes
3answers
3k views

Unix magic, delete all .pyc files from a tree of directories?

Is there a quick way of deleting all the .pyc files from a tree of directories?
7
votes
3answers
9k views

how to find files with incorrect permissions on unix?

I'm looking for a way to search a directory or directories and list all the files that have the wrong permissions for a public directory.
5
votes
2answers
6k views

How to count all subfolders in an directory?

How can I count how many folders (including subfolders) I have under an specific folder?
2
votes
2answers
439 views

Unable to change the font in bold to yellow font in Less

Problem: to change the bolding which affects the word "expression" to the color yellow in Less: My commands which affects Less export LESS_TERMCAP_mb=$'\E[01;31m' # begin blinking export ...
15
votes
5answers
25k views

How do I find (or exclude) all directories and sub-directories matching a certain pattern (in Linux)?

I'm trying to use the Linux find command to find all directories and sub-directories that do not have .svn (Subversion hidden folders) in their path. I can only get it to exclude the actual .svn ...
11
votes
9answers
5k views

How do I master the UNIX find command?

I think I am fairly advanced in my use of find but EVERY time I use it I cannot for the life of me remember the method to close the -exec option. I spend a good deal of time reading every time I use ...
1
vote
4answers
166 views

Unable to find a file by content

The file contains the following line google.friendconnect I got the line from the following command cat * | grep google However, I do not know its location. How can you get the precise location ...
6
votes
6answers
9k views

How do I find all files and directories writable by a specific user?

Under Linux, how can I find all the files and directories that are writable (or, actually, not writable) by a particular user? Edit: To clarify, I meant under a particular subdir, not systemwide. ...
3
votes
4answers
3k views

How to restrict find command search to return only files modified before certain date?

I'd like to constrain the following search to only files with a modified date <= "2009-05-29 11:59:00" find /path -name "*.sb" ! -name "*[^0-9]*.sb" -type f -print I'm using CentOS
1
vote
1answer
105 views

ignoring errors in find / output

how do I filter out permissions errors out of find / | grep foo output?
4
votes
4answers
6k views

Locate, Find, Which - How do I launch an index/scan command for these utilities?

How do I re-scan my drive so my 'search utilities' are able to find a new file on my system? I'm having a tough time googling HOW TOs for launching an index/scan command to any of this applications. ...
6
votes
6answers
8k views

How to Find a file in FreeBSD

I'm trying to locate all copies of example.filename on my FreeBSD server. What's the best / easiest / most efficient way to do this?