0
votes
3answers
80 views

Exclude with the find command [duplicate]

I need some help getting the find command to work right in a script working on. I need to be able to exclude some directories. Below I have what I'm doing as a work around. sudo find / ( -name ...
0
votes
1answer
32 views

Unix 'find' command to include/exclude subdirectories

Say the folder structure looks like this: . |--folder1 |--subfolder1 |--subfolder2 |--subfolder2 |--folder2 |--subfolder1 |--subfolder2 |--subfolder2 |--folder3 ...
0
votes
1answer
33 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
56 views

find all end subdirectories in a tree

given the following structure: oz123@debian:~/ $ tree . . ├── a │   ├── a1 │   ├── a2 │   └── a3 ├── a1 │   ├── a11 │   ├── a12 │   └── a31 ├── b │   └── b1 │   ├── b11 │   │   └── b21 │   ...
0
votes
2answers
275 views

UNIX ctime : how to keep this precious information in backups (tar)?

I have three questions related to the "ctime" information of a file. They are in bold (if you don't have time you can jump directly to them). A website on my dedicated server has been hacked. Lots ...
2
votes
2answers
658 views

Move files to another directory which are older than a date

I am looking for a solution to move files that are year older from today. My log partition is getting full, but I can not remove them. They are needed for a long long time. Anyway one solution I came ...
0
votes
4answers
149 views

is there an 'upwards' find?

To find files starting from a certain path, I can use find <path> .... If I want to find 'upwards', i.e. in the parent directory, and it's parent, and..., is there an equivalent tool? Intended ...
0
votes
4answers
203 views

Calculate disk space occupied by many .png files

I have 357 .png files located in different sub dirs of the current dir: settings# find . -name \*.png |wc -l 357 settings# find . -name \*.png | head ./assets/authenticationIcons/audio.png ...
5
votes
5answers
223 views

How to find all filenames with given extension

I need to find all .pem files on my system. Would the following do this? sudo find / -type f -name *.pem If not, how would I write a find command to find every file of the sort?
0
votes
2answers
870 views

finding files on linux in non hidden directory

In the following command i want to search only only the directories which are non hidden how can i do this using the following command .Iwant to ignore hidden directories while searching the log file ...
-2
votes
1answer
202 views

On Unix on could I get a listing of all mp3 files inside a directory containing other directories with their full path?

Someone said to me use the find command but I'm not exactly sure how to do it. Basically I need this: suppose I have a folder called dir1 and it contains three sub-directories (dir2, dir3 and dir4 ...
3
votes
1answer
133 views

How to find any symbolic links that point outside a given folder tree?

I have a bunch of folders/files that are 10+ levels deep. How can I find any symbolic links that point outside this folder tree? I tried find -type l but this returns all soft links... even ...
2
votes
1answer
181 views

Find and delete all but N largest files in 100s of directories

I have 100s of sibling directories on a BSD/Unix system, each with a collection of files in it. I'd like to delete all but the N largest files in each directory. (N is 5 for me.) Assuming that I can ...
6
votes
3answers
1k views

Non-recursive find on linux

I am trying to find all directories that are directly inside the current directory and older than a specific age. The trick is, I only want to consider the age of the immediate descendants of the ...
4
votes
1answer
4k views

How do I find circular symbolic links?

I'm working on a HP-UX system and I want to find if there are any circular symbolic links. So far I'm using the command: ls -lrt `find ./ -follow -type l` But it's only doing ls -lrt on current ...
0
votes
3answers
10k views

List all files added/modified on date

How can I use the find command to list all files for example modified on april 9 2011. Thank you, Chris
1
vote
4answers
542 views

Dos find command? [closed]

Are there any utility find commands that you can download and use in DOS which match the UNIX find command?
2
votes
2answers
87 views

How to list directories that aren't being symbolic linked to in a directory?

I'm trying to do some cleanup similar to this question. In a UNIX OS, I want to delete the directories that aren't being symbolic linked to in a given directory. e.g. I have a deployment script that ...
-1
votes
1answer
71 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 ?
3
votes
3answers
637 views

sh script to remove just txt files using find and exec rm warns me of missing argument to exec

find /full/path/dir -name '*.txt' -exec /bin/rm {} \; Fine in a shell, but pop it in a sh script along with some similar lines, to get it to run nightly from a cronjob, and it reports: find: ...
0
votes
3answers
1k views

exclude all hidden files and directories in solaris

Unix newbie could use your help. I'm using Solaris 10 and need to find all files, excluding all hidden files and directories. The ultimate goal is to put this in a script that will delete files 60+ ...
5
votes
3answers
2k views

A better unix find with parallel processing?

The unix find(1) utility is very useful allowing me to perform an action on many files that match certain specifications, e.g. find /dump -type f -name '*.xml' -exec java -jar ProcessFile.jar {} \; ...
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
990 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 ...
3
votes
2answers
282 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
2k 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 ...
6
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?
6
votes
3answers
7k 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.
9
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 ...